@bookers/ui 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,139 +1,149 @@
1
- (function(E,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("@tanstack/react-table"),require("@tanstack/react-virtual")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","@tanstack/react-table","@tanstack/react-virtual"],d):(E=typeof globalThis<"u"?globalThis:E||self,d(E.BookersUi={},E.jsxRuntime,E.React,E.ReactDOM,E.ReactTable,E.ReactVirtual))})(this,(function(E,d,S,Qo,He,Bh){"use strict";function Oi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=Oi(S),Vr=Oi(Qo);function zh(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return d.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ze(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s),l=n.length;n=[...n,s];const u=c=>{var y;const{scope:h,children:g,...w}=c,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||i,v=f.useMemo(()=>w,Object.values(w));return d.jsx(m.Provider,{value:v,children:g})};u.displayName=a+"Provider";function p(c,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[l])||i,w=f.useContext(g);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,p]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,Lh(o,...t)]}function Lh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function _i(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=_i(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():_i(e[o],null)}}}}function he(...e){return f.useCallback(mt(...e),e)}function Qt(e){const t=Hh(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(Yh);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Hh(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=jh(o),i=Gh(a,o.props);return o.type!==f.Fragment&&(i.ref=r?mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ai=Symbol("radix.slottable");function Vh(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ai,t}function Yh(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ai}function Gh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function jh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yr(e){const t=e+"CollectionProvider",[n,r]=Ze(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:y}=m,b=S.useRef(null),x=S.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:x,collectionRef:b,children:y})};s.displayName=t;const i=e+"CollectionSlot",l=Qt(i),u=S.forwardRef((m,v)=>{const{scope:y,children:b}=m,x=a(i,y),N=he(v,x.collectionRef);return d.jsx(l,{ref:N,children:b})});u.displayName=i;const p=e+"CollectionItemSlot",c="data-radix-collection-item",h=Qt(p),g=S.forwardRef((m,v)=>{const{scope:y,children:b,...x}=m,N=S.useRef(null),M=he(v,N),C=a(p,y);return S.useEffect(()=>(C.itemMap.set(N,{ref:N,...x}),()=>void C.itemMap.delete(N))),d.jsx(h,{[c]:"",ref:M,children:b})});g.displayName=p;function w(m){const v=a(e+"CollectionConsumer",m);return S.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((C,k)=>x.indexOf(C.ref.current)-x.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},w,r]}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Pe=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Rh=f[" useInsertionEffect ".trim().toString()]||Pe;function Qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=Uh({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const c=p.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=i},[i,r])}const u=f.useCallback(p=>{var c;if(i){const h=Kh(p)?p(e):p;h!==e&&((c=s.current)==null||c.call(s,h))}else a(p)},[i,e,a,s]);return[l,u]}function Uh({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return Rh(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function Kh(e){return typeof e=="function"}var qh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=qh.reduce((e,t)=>{const n=Qt(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ii(e,t){e&&Vr.flushSync(()=>e.dispatchEvent(t))}function Xh(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Be=e=>{const{present:t,children:n}=e,r=Zh(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,Qh(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};Be.displayName="Presence";function Zh(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=Xh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Gr(r.current);a.current=i==="mounted"?u:"none"},[i]),Pe(()=>{const u=r.current,p=o.current;if(p!==e){const h=a.current,g=Gr(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,c=g=>{const m=Gr(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Gr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Gr(e){return(e==null?void 0:e.animationName)||"none"}function Qh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jh=f[" useId ".trim().toString()]||(()=>{}),eg=0;function we(e){const[t,n]=f.useState(Jh());return Pe(()=>{n(r=>r??String(eg++))},[e]),t?`radix-${t}`:""}var jr="Collapsible",[tg,Fi]=Ze(jr),[ng,Jo]=tg(jr),Wi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=Qe({prop:r,defaultProp:o??!1,onChange:s,caller:jr});return d.jsx(ng,{scope:n,disabled:a,contentId:we(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:d.jsx(ne.div,{"data-state":ta(l),"data-disabled":a?"":void 0,...i,ref:t})})});Wi.displayName=jr;var $i="CollapsibleTrigger",Bi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Jo($i,n);return d.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ta(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:j(e.onClick,o.onOpenToggle)})});Bi.displayName=$i;var ea="CollapsibleContent",zi=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Jo(ea,e.__scopeCollapsible);return d.jsx(Be,{present:n||o.open,children:({present:a})=>d.jsx(rg,{...r,ref:t,present:a})})});zi.displayName=ea;var rg=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Jo(ea,n),[i,l]=f.useState(r),u=f.useRef(null),p=he(t,u),c=f.useRef(0),h=c.current,g=f.useRef(0),w=g.current,m=s.open||i,v=f.useRef(m),y=f.useRef(void 0);return f.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),Pe(()=>{const b=u.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();c.current=x.height,g.current=x.width,v.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),l(r)}},[s.open,r]),d.jsx(ne.div,{"data-state":ta(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&o})});function ta(e){return e?"open":"closed"}var og=Wi,ag=Bi,sg=zi,ig=f.createContext(void 0);function Jn(e){const t=f.useContext(ig);return e||t||"ltr"}var rt="Accordion",lg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[na,cg,dg]=Yr(rt),[Rr]=Ze(rt,[dg,Fi]),ra=Fi(),Li=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return d.jsx(na.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?d.jsx(hg,{...a,ref:t}):d.jsx(pg,{...o,ref:t})})});Li.displayName=rt;var[Hi,ug]=Rr(rt),[Vi,fg]=Rr(rt,{collapsible:!1}),pg=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,l]=Qe({prop:n,defaultProp:r??"",onChange:o,caller:rt});return d.jsx(Hi,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:S.useCallback(()=>a&&l(""),[a,l]),children:d.jsx(Vi,{scope:e.__scopeAccordion,collapsible:a,children:d.jsx(Yi,{...s,ref:t})})})}),hg=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Qe({prop:n,defaultProp:r??[],onChange:o,caller:rt}),l=S.useCallback(p=>i((c=[])=>[...c,p]),[i]),u=S.useCallback(p=>i((c=[])=>c.filter(h=>h!==p)),[i]);return d.jsx(Hi,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:d.jsx(Vi,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(Yi,{...a,ref:t})})})}),[gg,Ur]=Rr(rt),Yi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),l=he(i,t),u=cg(n),c=Jn(o)==="ltr",h=j(e.onKeyDown,g=>{var O;if(!lg.includes(g.key))return;const w=g.target,m=u().filter(V=>{var $;return!(($=V.ref.current)!=null&&$.disabled)}),v=m.findIndex(V=>V.ref.current===w),y=m.length;if(v===-1)return;g.preventDefault();let b=v;const x=0,N=y-1,M=()=>{b=v+1,b>N&&(b=x)},C=()=>{b=v-1,b<x&&(b=N)};switch(g.key){case"Home":b=x;break;case"End":b=N;break;case"ArrowRight":a==="horizontal"&&(c?M():C());break;case"ArrowDown":a==="vertical"&&M();break;case"ArrowLeft":a==="horizontal"&&(c?C():M());break;case"ArrowUp":a==="vertical"&&C();break}const k=b%y;(O=m[k].ref.current)==null||O.focus()});return d.jsx(gg,{scope:n,disabled:r,direction:o,orientation:a,children:d.jsx(na.Slot,{scope:n,children:d.jsx(ne.div,{...s,"data-orientation":a,ref:l,onKeyDown:r?void 0:h})})})}),Kr="AccordionItem",[mg,oa]=Rr(Kr),Gi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Ur(Kr,n),s=ug(Kr,n),i=ra(n),l=we(),u=r&&s.value.includes(r)||!1,p=a.disabled||e.disabled;return d.jsx(mg,{scope:n,open:u,disabled:p,triggerId:l,children:d.jsx(og,{"data-orientation":a.orientation,"data-state":Xi(u),...i,...o,ref:t,disabled:p,open:u,onOpenChange:c=>{c?s.onItemOpen(r):s.onItemClose(r)}})})});Gi.displayName=Kr;var ji="AccordionHeader",Ri=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Ur(rt,n),a=oa(ji,n);return d.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Xi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Ri.displayName=ji;var aa="AccordionTrigger",Ui=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Ur(rt,n),a=oa(aa,n),s=fg(aa,n),i=ra(n);return d.jsx(na.ItemSlot,{scope:n,children:d.jsx(ag,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});Ui.displayName=aa;var Ki="AccordionContent",qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Ur(rt,n),a=oa(Ki,n),s=ra(n);return d.jsx(sg,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});qi.displayName=Ki;function Xi(e){return e?"open":"closed"}var vg=Li,bg=Gi,yg=Ri,wg=Ui,xg=qi;/**
1
+ (function(T,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("@tanstack/react-table"),require("@tanstack/react-virtual")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","@tanstack/react-table","@tanstack/react-virtual"],c):(T=typeof globalThis<"u"?globalThis:T||self,c(T.BookersUi={},T.jsxRuntime,T.React,T.ReactDOM,T.ReactTable,T.ReactVirtual))})(this,(function(T,c,S,ra,He,Uh){"use strict";function Oi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=Oi(S),Gr=Oi(ra);function Rh(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return c.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ze(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s),l=n.length;n=[...n,s];const u=d=>{var b;const{scope:h,children:g,...w}=d,m=((b=h==null?void 0:h[e])==null?void 0:b[l])||i,v=f.useMemo(()=>w,Object.values(w));return c.jsx(m.Provider,{value:v,children:g})};u.displayName=a+"Provider";function p(d,h){var m;const g=((m=h==null?void 0:h[e])==null?void 0:m[l])||i,w=f.useContext(g);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,p]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,Kh(o,...t)]}function Kh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const d=l(a)[`__scope${u}`];return{...i,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function _i(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=_i(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():_i(e[o],null)}}}}function he(...e){return f.useCallback(mt(...e),e)}function en(e){const t=qh(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(Zh);if(l){const u=l.props.children,p=i.map(d=>d===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return c.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return c.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function qh(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=Jh(o),i=Qh(a,o.props);return o.type!==f.Fragment&&(i.ref=r?mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ii=Symbol("radix.slottable");function Xh(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ii,t}function Zh(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ii}function Qh(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Jh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function jr(e){const t=e+"CollectionProvider",[n,r]=Ze(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:b}=m,y=S.useRef(null),x=S.useRef(new Map).current;return c.jsx(o,{scope:v,itemMap:x,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",l=en(i),u=S.forwardRef((m,v)=>{const{scope:b,children:y}=m,x=a(i,b),k=he(v,x.collectionRef);return c.jsx(l,{ref:k,children:y})});u.displayName=i;const p=e+"CollectionItemSlot",d="data-radix-collection-item",h=en(p),g=S.forwardRef((m,v)=>{const{scope:b,children:y,...x}=m,k=S.useRef(null),E=he(v,k),C=a(p,b);return S.useEffect(()=>(C.itemMap.set(k,{ref:k,...x}),()=>void C.itemMap.delete(k))),c.jsx(h,{[d]:"",ref:E,children:y})});g.displayName=p;function w(m){const v=a(e+"CollectionConsumer",m);return S.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,N)=>x.indexOf(C.ref.current)-x.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},w,r]}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Pe=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},eg=f[" useInsertionEffect ".trim().toString()]||Pe;function Qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=tg({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const d=p.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=i},[i,r])}const u=f.useCallback(p=>{var d;if(i){const h=ng(p)?p(e):p;h!==e&&((d=s.current)==null||d.call(s,h))}else a(p)},[i,e,a,s]);return[l,u]}function tg({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return eg(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function ng(e){return typeof e=="function"}var rg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=rg.reduce((e,t)=>{const n=en(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ai(e,t){e&&Gr.flushSync(()=>e.dispatchEvent(t))}function og(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Be=e=>{const{present:t,children:n}=e,r=ag(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,sg(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};Be.displayName="Presence";function ag(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=og(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Ur(r.current);a.current=i==="mounted"?u:"none"},[i]),Pe(()=>{const u=r.current,p=o.current;if(p!==e){const h=a.current,g=Ur(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,d=g=>{const m=Ur(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Ur(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ur(e){return(e==null?void 0:e.animationName)||"none"}function sg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ig=f[" useId ".trim().toString()]||(()=>{}),lg=0;function xe(e){const[t,n]=f.useState(ig());return Pe(()=>{n(r=>r??String(lg++))},[e]),t?`radix-${t}`:""}var Rr="Collapsible",[cg,Fi]=Ze(Rr),[dg,oa]=cg(Rr),Wi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=Qe({prop:r,defaultProp:o??!1,onChange:s,caller:Rr});return c.jsx(dg,{scope:n,disabled:a,contentId:xe(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:c.jsx(ne.div,{"data-state":sa(l),"data-disabled":a?"":void 0,...i,ref:t})})});Wi.displayName=Rr;var $i="CollapsibleTrigger",Bi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=oa($i,n);return c.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":sa(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:j(e.onClick,o.onOpenToggle)})});Bi.displayName=$i;var aa="CollapsibleContent",zi=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oa(aa,e.__scopeCollapsible);return c.jsx(Be,{present:n||o.open,children:({present:a})=>c.jsx(ug,{...r,ref:t,present:a})})});zi.displayName=aa;var ug=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=oa(aa,n),[i,l]=f.useState(r),u=f.useRef(null),p=he(t,u),d=f.useRef(0),h=d.current,g=f.useRef(0),w=g.current,m=s.open||i,v=f.useRef(m),b=f.useRef(void 0);return f.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Pe(()=>{const y=u.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();d.current=x.height,g.current=x.width,v.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),l(r)}},[s.open,r]),c.jsx(ne.div,{"data-state":sa(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&o})});function sa(e){return e?"open":"closed"}var fg=Wi,pg=Bi,hg=zi,gg=f.createContext(void 0);function tr(e){const t=f.useContext(gg);return e||t||"ltr"}var rt="Accordion",mg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ia,vg,bg]=jr(rt),[Kr]=Ze(rt,[bg,Fi]),la=Fi(),Li=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return c.jsx(ia.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?c.jsx(Cg,{...a,ref:t}):c.jsx(xg,{...o,ref:t})})});Li.displayName=rt;var[Hi,yg]=Kr(rt),[Vi,wg]=Kr(rt,{collapsible:!1}),xg=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,l]=Qe({prop:n,defaultProp:r??"",onChange:o,caller:rt});return c.jsx(Hi,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:S.useCallback(()=>a&&l(""),[a,l]),children:c.jsx(Vi,{scope:e.__scopeAccordion,collapsible:a,children:c.jsx(Yi,{...s,ref:t})})})}),Cg=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Qe({prop:n,defaultProp:r??[],onChange:o,caller:rt}),l=S.useCallback(p=>i((d=[])=>[...d,p]),[i]),u=S.useCallback(p=>i((d=[])=>d.filter(h=>h!==p)),[i]);return c.jsx(Hi,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:c.jsx(Vi,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(Yi,{...a,ref:t})})})}),[Sg,qr]=Kr(rt),Yi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),l=he(i,t),u=vg(n),d=tr(o)==="ltr",h=j(e.onKeyDown,g=>{var M;if(!mg.includes(g.key))return;const w=g.target,m=u().filter(D=>{var I;return!((I=D.ref.current)!=null&&I.disabled)}),v=m.findIndex(D=>D.ref.current===w),b=m.length;if(v===-1)return;g.preventDefault();let y=v;const x=0,k=b-1,E=()=>{y=v+1,y>k&&(y=x)},C=()=>{y=v-1,y<x&&(y=k)};switch(g.key){case"Home":y=x;break;case"End":y=k;break;case"ArrowRight":a==="horizontal"&&(d?E():C());break;case"ArrowDown":a==="vertical"&&E();break;case"ArrowLeft":a==="horizontal"&&(d?C():E());break;case"ArrowUp":a==="vertical"&&C();break}const N=y%b;(M=m[N].ref.current)==null||M.focus()});return c.jsx(Sg,{scope:n,disabled:r,direction:o,orientation:a,children:c.jsx(ia.Slot,{scope:n,children:c.jsx(ne.div,{...s,"data-orientation":a,ref:l,onKeyDown:r?void 0:h})})})}),Xr="AccordionItem",[Ng,ca]=Kr(Xr),Gi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=qr(Xr,n),s=yg(Xr,n),i=la(n),l=xe(),u=r&&s.value.includes(r)||!1,p=a.disabled||e.disabled;return c.jsx(Ng,{scope:n,open:u,disabled:p,triggerId:l,children:c.jsx(fg,{"data-orientation":a.orientation,"data-state":Xi(u),...i,...o,ref:t,disabled:p,open:u,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})})});Gi.displayName=Xr;var ji="AccordionHeader",Ui=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=qr(rt,n),a=ca(ji,n);return c.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Xi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Ui.displayName=ji;var da="AccordionTrigger",Ri=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=qr(rt,n),a=ca(da,n),s=wg(da,n),i=la(n);return c.jsx(ia.ItemSlot,{scope:n,children:c.jsx(pg,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});Ri.displayName=da;var Ki="AccordionContent",qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=qr(rt,n),a=ca(Ki,n),s=la(n);return c.jsx(hg,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});qi.displayName=Ki;function Xi(e){return e?"open":"closed"}var kg=Li,Mg=Gi,Dg=Ui,Eg=Ri,Tg=qi;/**
2
2
  * @license lucide-react v0.475.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Cg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
6
+ */const Pg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
7
7
  * @license lucide-react v0.475.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */var Sg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
11
+ */var Og={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
12
  * @license lucide-react v0.475.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const Ng=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>S.createElement("svg",{ref:l,...Sg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zi("lucide",o),...i},[...s.map(([u,p])=>S.createElement(u,p)),...Array.isArray(a)?a:[a]]));/**
16
+ */const _g=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>S.createElement("svg",{ref:l,...Og,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zi("lucide",o),...i},[...s.map(([u,p])=>S.createElement(u,p)),...Array.isArray(a)?a:[a]]));/**
17
17
  * @license lucide-react v0.475.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},a)=>S.createElement(Ng,{ref:a,iconNode:t,className:Zi(`lucide-${Cg(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
21
+ */const be=(e,t)=>{const n=S.forwardRef(({className:r,...o},a)=>S.createElement(_g,{ref:a,iconNode:t,className:Zi(`lucide-${Pg(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
22
22
  * @license lucide-react v0.475.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const Mg=xe("ArrowDownNarrowWide",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]]);/**
26
+ */const Ig=be("ArrowDownNarrowWide",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]]);/**
27
27
  * @license lucide-react v0.475.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const kg=xe("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
31
+ */const Ag=be("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
32
32
  * @license lucide-react v0.475.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Eg=xe("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"}]]);/**
36
+ */const Fg=be("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"}]]);/**
37
37
  * @license lucide-react v0.475.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const er=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
41
+ */const yn=be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
42
42
  * @license lucide-react v0.475.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const Jt=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
46
+ */const Mt=be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
47
47
  * @license lucide-react v0.475.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const Qi=xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
51
+ */const Qi=be("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
52
52
  * @license lucide-react v0.475.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const vn=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
56
+ */const wn=be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
57
57
  * @license lucide-react v0.475.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const sa=xe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
61
+ */const Zr=be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
62
62
  * @license lucide-react v0.475.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const Dg=xe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
66
+ */const Wg=be("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
67
67
  * @license lucide-react v0.475.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const Tg=xe("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
71
+ */const $g=be("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
72
72
  * @license lucide-react v0.475.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const Pg=xe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
76
+ */const Bg=be("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
77
77
  * @license lucide-react v0.475.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const Og=xe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
81
+ */const zg=be("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
82
82
  * @license lucide-react v0.475.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const _g=xe("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]);/**
86
+ */const Lg=be("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
87
87
  * @license lucide-react v0.475.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const Ag=xe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
91
+ */const Hg=be("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
92
92
  * @license lucide-react v0.475.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const Ig=xe("Grip",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);/**
96
+ */const Vg=be("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]);/**
97
97
  * @license lucide-react v0.475.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const Fg=xe("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
101
+ */const Yg=be("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
102
102
  * @license lucide-react v0.475.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Wg=xe("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
106
+ */const Gg=be("Grip",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);/**
107
107
  * @license lucide-react v0.475.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const Ji=xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
111
+ */const jg=be("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
112
112
  * @license lucide-react v0.475.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const $g=xe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
116
+ */const Ug=be("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
117
117
  * @license lucide-react v0.475.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const Bg=xe("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
121
+ */const Ji=be("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
122
122
  * @license lucide-react v0.475.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const zg=xe("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
126
+ */const Rg=be("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
127
127
  * @license lucide-react v0.475.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const tr=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function el(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=el(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=el(e))&&(r&&(r+=" "),r+=t);return r}const nl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rl=tl,Me=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const p=n==null?void 0:n[u],c=a==null?void 0:a[u];if(p===null)return null;const h=nl(p)||nl(c);return o[u][h]}),i=n&&Object.entries(n).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:c,className:h,...g}=p;return Object.entries(g).every(w=>{let[m,v]=w;return Array.isArray(v)?v.includes({...a,...i}[m]):{...a,...i}[m]===v})?[...u,c,h]:u},[]);return rl(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},ia="-",Lg=e=>{const t=Vg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(ia);return i[0]===""&&i.length!==1&&i.shift(),ol(i,t)||Hg(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},ol=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ol(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(ia);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},al=/^\[(.+)\]$/,Hg=e=>{if(al.test(e)){const t=al.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Vg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Gg(Object.entries(e.classGroups),n).forEach(([a,s])=>{la(s,r,a,t)}),r},la=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:sl(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Yg(o)){la(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{la(s,sl(t,a),n,r)})})},sl=(e,t)=>{let n=e;return t.split(ia).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yg=e=>e.isThemeGetter,Gg=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,jg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},il="!",Rg=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const l=[];let u=0,p=0,c;for(let v=0;v<i.length;v++){let y=i[v];if(u===0){if(y===o&&(r||i.slice(v,v+a)===t)){l.push(i.slice(p,v)),p=v+a;continue}if(y==="/"){c=v;continue}}y==="["?u++:y==="]"&&u--}const h=l.length===0?i:i.substring(p),g=h.startsWith(il),w=g?h.substring(1):h,m=c&&c>p?c-p:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:m}};return n?i=>n({className:i,parseClassName:s}):s},Ug=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Kg=e=>({cache:jg(e.cacheSize),parseClassName:Rg(e),...Lg(e)}),qg=/\s+/,Xg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(qg);let i="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:p,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:g}=n(u);let w=!!g,m=r(w?h.substring(0,g):h);if(!m){if(!w){i=u+(i.length>0?" "+i:i);continue}if(m=r(h),!m){i=u+(i.length>0?" "+i:i);continue}w=!1}const v=Ug(p).join(":"),y=c?v+il:v,b=y+m;if(a.includes(b))continue;a.push(b);const x=o(m,w);for(let N=0;N<x.length;++N){const M=x[N];a.push(y+M)}i=u+(i.length>0?" "+i:i)}return i};function Zg(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ll(t))&&(r&&(r+=" "),r+=n);return r}const ll=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ll(e[r]))&&(n&&(n+=" "),n+=t);return n};function Qg(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((p,c)=>c(p),e());return n=Kg(u),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const u=r(l);if(u)return u;const p=Xg(l,n);return o(l,p),p}return function(){return a(Zg.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cl=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jg=/^\d+\/\d+$/,em=new Set(["px","full","screen"]),tm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,om=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,am=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kt=e=>bn(e)||em.has(e)||Jg.test(e),Wt=e=>yn(e,"length",pm),bn=e=>!!e&&!Number.isNaN(Number(e)),ca=e=>yn(e,"number",bn),nr=e=>!!e&&Number.isInteger(Number(e)),sm=e=>e.endsWith("%")&&bn(e.slice(0,-1)),le=e=>cl.test(e),$t=e=>tm.test(e),im=new Set(["length","size","percentage"]),lm=e=>yn(e,im,dl),cm=e=>yn(e,"position",dl),dm=new Set(["image","url"]),um=e=>yn(e,dm,gm),fm=e=>yn(e,"",hm),rr=()=>!0,yn=(e,t,n)=>{const r=cl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pm=e=>nm.test(e)&&!rm.test(e),dl=()=>!1,hm=e=>om.test(e),gm=e=>am.test(e),mm=Qg(()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),o=ve("borderColor"),a=ve("borderRadius"),s=ve("borderSpacing"),i=ve("borderWidth"),l=ve("contrast"),u=ve("grayscale"),p=ve("hueRotate"),c=ve("invert"),h=ve("gap"),g=ve("gradientColorStops"),w=ve("gradientColorStopPositions"),m=ve("inset"),v=ve("margin"),y=ve("opacity"),b=ve("padding"),x=ve("saturate"),N=ve("scale"),M=ve("sepia"),C=ve("skew"),k=ve("space"),O=ve("translate"),V=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",le,t],B=()=>[le,t],q=()=>["",kt,Wt],Y=()=>["auto",bn,le],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",le],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[bn,le];return{cacheSize:500,separator:":",theme:{colors:[rr],spacing:[kt,Wt],blur:["none","",$t,le],brightness:oe(),borderColor:[e],borderRadius:["none","","full",$t,le],borderSpacing:B(),borderWidth:q(),contrast:oe(),grayscale:_(),hueRotate:oe(),invert:_(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[sm,Wt],inset:U(),margin:U(),opacity:oe(),padding:B(),saturate:oe(),scale:oe(),sepia:_(),skew:oe(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[$t]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ae(),le]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nr,le]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",nr,le]}],"grid-cols":[{"grid-cols":[rr]}],"col-start-end":[{col:["auto",{span:["full",nr,le]},le]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[rr]}],"row-start-end":[{row:["auto",{span:[nr,le]},le]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[$t]},$t]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$t,Wt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ca]}],"font-family":[{font:[rr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",le]}],"line-clamp":[{"line-clamp":["none",bn,ca]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kt,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kt,Wt]}],"underline-offset":[{"underline-offset":["auto",kt,le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),cm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},um]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[kt,le]}],"outline-w":[{outline:[kt,Wt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[kt,Wt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$t,fm]}],"shadow-color":[{shadow:[rr]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",$t,le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[c]}],saturate:[{saturate:[x]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[nr,le]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kt,Wt,ca]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function D(...e){return mm(tl(e))}const ul=Me(["flex w-full items-center justify-between gap-4 text-left font-medium text-foreground","transition-[color,background-color] duration-150","hover:text-foreground/80","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","[&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:opacity-50"],{variants:{size:{sm:"py-2 text-sm",md:"py-3 text-sm",lg:"py-4 text-base"}},defaultVariants:{size:"md"}}),fl=Me(["overflow-hidden text-foreground","data-[state=open]:animate-accordion-down","data-[state=closed]:animate-accordion-up"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),pl=Me("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),da=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx(vg,{ref:r,className:D(pl({variant:t}),e),...n}));da.displayName="AccordionRoot";const ua=f.forwardRef(({className:e,...t},n)=>d.jsx(bg,{ref:n,className:D("border-b border-border last:border-b-0",e),...t}));ua.displayName="AccordionItem";const fa=f.forwardRef(({className:e,size:t,children:n,...r},o)=>d.jsx(yg,{className:"flex",children:d.jsxs(wg,{ref:o,className:D("group",ul({size:t}),"px-4",e),...r,children:[n,d.jsx(Jt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}));fa.displayName="AccordionTrigger";const pa=f.forwardRef(({className:e,size:t,children:n,...r},o)=>d.jsx(xg,{ref:o,className:D(fl({size:t}),e),...r,children:d.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));pa.displayName="AccordionContent";const hl=f.forwardRef(({items:e,size:t="md",variant:n="default",className:r,type:o="single",defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:u,dir:p},c)=>d.jsx(da,{ref:c,variant:n,className:r,type:o,defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:u,dir:p,children:e.map(h=>d.jsxs(ua,{value:h.value,children:[d.jsx(fa,{size:t,disabled:h.disabled,children:h.trigger}),d.jsx(pa,{size:t,children:h.content})]},h.value))}));hl.displayName="Accordion";const gl=Me(["relative w-full rounded-lg border p-4","[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4","[&>svg~*]:pl-7"],{variants:{variant:{default:"bg-background border-border text-foreground [&>svg]:text-foreground",info:"bg-info/10 border-info/30 text-foreground [&>svg]:text-info",success:"bg-success/10 border-success/30 text-foreground [&>svg]:text-success",warning:"bg-warning/10 border-warning/30 text-foreground [&>svg]:text-warning",destructive:"bg-destructive/10 border-destructive/30 text-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ml=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:D(gl({variant:t}),e),...n}));ml.displayName="Alert";const vl=f.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:D("mb-1 font-medium leading-none tracking-tight text-balance",e),...t}));vl.displayName="AlertTitle";const bl=f.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:D("text-sm leading-relaxed opacity-90 text-pretty",e),...t}));bl.displayName="AlertDescription";var vm=Symbol.for("react.lazy"),qr=f[" use ".trim().toString()];function bm(e){return typeof e=="object"&&e!==null&&"then"in e}function yl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===vm&&"_payload"in e&&bm(e._payload)}function ym(e){const t=wm(e),n=f.forwardRef((r,o)=>{let{children:a,...s}=r;yl(a)&&typeof qr=="function"&&(a=qr(a._payload));const i=f.Children.toArray(a),l=i.find(Cm);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function wm(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n;if(yl(o)&&typeof qr=="function"&&(o=qr(o._payload)),f.isValidElement(o)){const s=Nm(o),i=Sm(a,o.props);return o.type!==f.Fragment&&(i.ref=r?mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xm=Symbol("radix.slottable");function Cm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xm}function Sm(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Nm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Mm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],km=Mm.reduce((e,t)=>{const n=ym(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Em="AspectRatio",wl=f.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return d.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:d.jsx(km.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});wl.displayName=Em;var Dm=wl;const xl=f.forwardRef(({className:e,ratio:t=16/9,...n},r)=>d.jsx(Dm,{ref:r,ratio:t,className:D("overflow-hidden",e),...n}));xl.displayName="AspectRatio";const Cl=Me("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}});function Tm(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const Sl=f.forwardRef(({className:e,size:t,src:n,alt:r="",fallback:o,...a},s)=>{const[i,l]=f.useState(!1);f.useEffect(()=>{l(!1)},[n]);const u=o??(r?Tm(r):null),p=n&&!i;return d.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:D(Cl({size:t}),e),...a,children:p?d.jsx("img",{src:n,alt:"",className:"h-full w-full object-cover outline -outline-offset-1 outline-black/10",onError:()=>l(!0)}):d.jsx("span",{"aria-hidden":"true",className:"font-medium text-muted-foreground select-none",children:u??"?"})})});Sl.displayName="Avatar";const Nl=Me("inline-flex items-center rounded-sm px-2.5 py-0.5 text-xs font-ui font-medium transition-colors",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground",outline:"border border-border bg-transparent text-foreground",success:"bg-success/10 text-success",warning:"bg-warning/10 text-foreground"}},defaultVariants:{variant:"default"}}),Ml=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("span",{ref:r,className:D(Nl({variant:t}),e),...n}));Ml.displayName="Badge";const kl=Me(["relative inline-flex items-center justify-center gap-2","cursor-pointer","whitespace-nowrap rounded-md font-ui font-medium","ring-offset-background transition-[background-color,color,border-color,scale]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","active:scale-[0.96]","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:["bg-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-ring"],destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive/90","focus-visible:ring-ring"],outline:["border border-border bg-background text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],ghost:["bg-transparent text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],link:["bg-transparent text-primary underline underline-offset-4","justify-start","hover:text-primary/80","focus-visible:ring-ring","active:scale-100"]},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-5 text-sm",lg:"h-12 px-6 text-base"}},defaultVariants:{variant:"default",size:"md"}}),wn=f.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,icon:o,iconPosition:a="left",disabled:s,children:i,static:l=!1,...u},p)=>{const c=o?d.jsxs("span",{className:"relative inline-flex size-4 shrink-0",children:[d.jsx("span",{"aria-hidden":"true",className:D("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-0 translate-y-1 blur-sm":"opacity-100 translate-y-0 blur-0"),children:o}),d.jsx("span",{"aria-hidden":"true",className:D("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-1 blur-sm"),children:d.jsx(Ji,{className:"animate-spin"})})]}):r?d.jsx(Ji,{className:"animate-spin","aria-hidden":"true"}):null;return d.jsx("button",{ref:p,className:D(kl({variant:t,size:n}),a==="center"&&"aspect-square p-0",l&&"active:scale-100",e),disabled:s||r,"aria-busy":r||void 0,...u,children:a==="center"?c:d.jsxs(d.Fragment,{children:[a==="left"&&c,i,a==="right"&&c]})})});wn.displayName="Button";const El=Me(["peer appearance-none rounded-xs border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","indeterminate:bg-primary indeterminate:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Pm={sm:"size-2.5",md:"size-3",lg:"size-3.5"},Dl=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>{const a=Pm[t??"md"];return d.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[d.jsx("input",{type:"checkbox",ref:o,className:D(El({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...r}),d.jsx(er,{"aria-hidden":"true",className:D("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30",a)}),d.jsx($g,{"aria-hidden":"true",className:D("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-indeterminate:opacity-100 peer-disabled:opacity-30",a)})]})});Dl.displayName="Checkbox";var Tl=1,Om=.9,_m=.8,Am=.17,ha=.1,ga=.999,Im=.9999,Fm=.99,Wm=/[\\\/_+.#"@\[\(\{&]/,$m=/[\\\/_+.#"@\[\(\{&]/g,Bm=/[\s-]/,Pl=/[\s-]/g;function ma(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Tl:Fm;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),u=n.indexOf(l,o),p=0,c,h,g,w;u>=0;)c=ma(e,t,n,r,u+1,a+1,s),c>p&&(u===o?c*=Tl:Wm.test(e.charAt(u-1))?(c*=_m,g=e.slice(o,u-1).match($m),g&&o>0&&(c*=Math.pow(ga,g.length))):Bm.test(e.charAt(u-1))?(c*=Om,w=e.slice(o,u-1).match(Pl),w&&o>0&&(c*=Math.pow(ga,w.length))):(c*=Am,o>0&&(c*=Math.pow(ga,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=Im)),(c<ha&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(h=ma(e,t,n,r,u+1,a+2,s),h*ha>c&&(c=h*ha)),c>p&&(p=c),u=n.indexOf(l,u+1);return s[i]=p,p}function Ol(e){return e.toLowerCase().replace(Pl," ")}function zm(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ma(e,t,Ol(e),Ol(t),0,0,{})}function ot(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Lm(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Hm="DismissableLayer",va="dismissableLayer.update",Vm="dismissableLayer.pointerDownOutside",Ym="dismissableLayer.focusOutside",_l,Al=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xn=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(Al),[p,c]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),w=he(t,k=>c(k)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),b=p?m.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,N=b>=y,M=Rm(k=>{const O=k.target,V=[...u.branches].some($=>$.contains(O));!N||V||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},h),C=Um(k=>{const O=k.target;[...u.branches].some($=>$.contains(O))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},h);return Lm(k=>{b===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_l=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Il(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=_l)}},[p,h,n,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Il())},[p,u]),f.useEffect(()=>{const k=()=>g({});return document.addEventListener(va,k),()=>document.removeEventListener(va,k)},[]),d.jsx(ne.div,{...l,ref:w,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:j(e.onFocusCapture,C.onFocusCapture),onBlurCapture:j(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,M.onPointerDownCapture)})});xn.displayName=Hm;var Gm="DismissableLayerBranch",jm=f.forwardRef((e,t)=>{const n=f.useContext(Al),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(ne.div,{...e,ref:o})});jm.displayName=Gm;function Rm(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Fl(Vm,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Um(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&Fl(Ym,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Il(){const e=new CustomEvent(va);document.dispatchEvent(e)}function Fl(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ii(o,a):o.dispatchEvent(a)}var ba="focusScope.autoFocusOnMount",ya="focusScope.autoFocusOnUnmount",Wl={bubbles:!1,cancelable:!0},Km="FocusScope",or=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=ot(o),p=ot(a),c=f.useRef(null),h=he(t,m=>l(m)),g=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let m=function(x){if(g.paused||!i)return;const N=x.target;i.contains(N)?c.current=N:Bt(c.current,{select:!0})},v=function(x){if(g.paused||!i)return;const N=x.relatedTarget;N!==null&&(i.contains(N)||Bt(c.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const M of x)M.removedNodes.length>0&&Bt(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const b=new MutationObserver(y);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),b.disconnect()}}},[r,i,g.paused]),f.useEffect(()=>{if(i){zl.add(g);const m=document.activeElement;if(!i.contains(m)){const y=new CustomEvent(ba,Wl);i.addEventListener(ba,u),i.dispatchEvent(y),y.defaultPrevented||(qm(ev($l(i)),{select:!0}),document.activeElement===m&&Bt(i))}return()=>{i.removeEventListener(ba,u),setTimeout(()=>{const y=new CustomEvent(ya,Wl);i.addEventListener(ya,p),i.dispatchEvent(y),y.defaultPrevented||Bt(m??document.body,{select:!0}),i.removeEventListener(ya,p),zl.remove(g)},0)}}},[i,u,p,g]);const w=f.useCallback(m=>{if(!n&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const b=m.currentTarget,[x,N]=Xm(b);x&&N?!m.shiftKey&&y===N?(m.preventDefault(),n&&Bt(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),n&&Bt(N,{select:!0})):y===b&&m.preventDefault()}},[n,r,g.paused]);return d.jsx(ne.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});or.displayName=Km;function qm(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Bt(r,{select:t}),document.activeElement!==n)return}function Xm(e){const t=$l(e),n=Bl(t,e),r=Bl(t.reverse(),e);return[n,r]}function $l(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Bl(e,t){for(const n of e)if(!Zm(n,{upTo:t}))return n}function Zm(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Qm(e){return e instanceof HTMLInputElement&&"select"in e}function Bt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qm(e)&&t&&e.select()}}var zl=Jm();function Jm(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ll(e,t),e.unshift(t)},remove(t){var n;e=Ll(e,t),(n=e[0])==null||n.resume()}}}function Ll(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ev(e){return e.filter(t=>t.tagName!=="A")}var tv="Portal",Cn=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);Pe(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Qo.createPortal(d.jsx(ne.div,{...r,ref:t}),s):null});Cn.displayName=tv;var wa=0;function Xr(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Hl()),document.body.insertAdjacentElement("beforeend",e[1]??Hl()),wa++,()=>{wa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wa--}},[])}function Hl(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},vt.apply(this,arguments)};function Vl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function nv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zr="right-scroll-bar-position",Qr="width-before-scroll-bar",rv="with-scroll-bars-hidden",ov="--removed-body-scroll-bar-size";function xa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function av(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var sv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Yl=new WeakMap;function iv(e,t){var n=av(null,function(r){return e.forEach(function(o){return xa(o,r)})});return sv(function(){var r=Yl.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||xa(i,null)}),a.forEach(function(i){o.has(i)||xa(i,s)})}Yl.set(n,e)},[e]),n}function lv(e){return e}function cv(e,t){t===void 0&&(t=lv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var p=s;s=[],p.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),n}}}};return o}function dv(e){e===void 0&&(e={});var t=cv(null);return t.options=vt({async:!0,ssr:!1},e),t}var Gl=function(e){var t=e.sideCar,n=Vl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,vt({},n))};Gl.isSideCarExport=!0;function uv(e,t){return e.useMedium(t),Gl}var jl=dv(),Ca=function(){},Jr=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ca,onWheelCapture:Ca,onTouchMoveCapture:Ca}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,N=Vl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=h,C=iv([n,t]),k=vt(vt({},N),o);return f.createElement(f.Fragment,null,p&&f.createElement(M,{sideCar:jl,removeScrollBar:u,shards:c,noRelative:g,noIsolation:w,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?f.cloneElement(f.Children.only(i),vt(vt({},k),{ref:C})):f.createElement(b,vt({},k,{className:l,ref:C}),i))});Jr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jr.classNames={fullWidth:Qr,zeroRight:Zr};var fv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fv();return t&&e.setAttribute("nonce",t),e}function hv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pv())&&(hv(t,n),gv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vv=function(){var e=mv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Rl=function(){var e=vv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},bv={left:0,top:0,right:0,gap:0},Sa=function(e){return parseInt(e||"",10)||0},yv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Sa(n),Sa(r),Sa(o)]},wv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bv;var t=yv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xv=Rl(),Sn="data-scroll-locked",Cv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
132
- .`.concat(rv,` {
131
+ */const Kg=be("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
132
+ * @license lucide-react v0.475.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const qg=be("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
137
+ * @license lucide-react v0.475.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const tn=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function el(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=el(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=el(e))&&(r&&(r+=" "),r+=t);return r}const nl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rl=tl,Ce=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const p=n==null?void 0:n[u],d=a==null?void 0:a[u];if(p===null)return null;const h=nl(p)||nl(d);return o[u][h]}),i=n&&Object.entries(n).reduce((u,p)=>{let[d,h]=p;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:d,className:h,...g}=p;return Object.entries(g).every(w=>{let[m,v]=w;return Array.isArray(v)?v.includes({...a,...i}[m]):{...a,...i}[m]===v})?[...u,d,h]:u},[]);return rl(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},ua="-",Xg=e=>{const t=Qg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(ua);return i[0]===""&&i.length!==1&&i.shift(),ol(i,t)||Zg(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},ol=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ol(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(ua);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},al=/^\[(.+)\]$/,Zg=e=>{if(al.test(e)){const t=al.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Qg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return em(Object.entries(e.classGroups),n).forEach(([a,s])=>{fa(s,r,a,t)}),r},fa=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:sl(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Jg(o)){fa(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{fa(s,sl(t,a),n,r)})})},sl=(e,t)=>{let n=e;return t.split(ua).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Jg=e=>e.isThemeGetter,em=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,tm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},il="!",nm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const l=[];let u=0,p=0,d;for(let v=0;v<i.length;v++){let b=i[v];if(u===0){if(b===o&&(r||i.slice(v,v+a)===t)){l.push(i.slice(p,v)),p=v+a;continue}if(b==="/"){d=v;continue}}b==="["?u++:b==="]"&&u--}const h=l.length===0?i:i.substring(p),g=h.startsWith(il),w=g?h.substring(1):h,m=d&&d>p?d-p:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:m}};return n?i=>n({className:i,parseClassName:s}):s},rm=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},om=e=>({cache:tm(e.cacheSize),parseClassName:nm(e),...Xg(e)}),am=/\s+/,sm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(am);let i="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:p,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:g}=n(u);let w=!!g,m=r(w?h.substring(0,g):h);if(!m){if(!w){i=u+(i.length>0?" "+i:i);continue}if(m=r(h),!m){i=u+(i.length>0?" "+i:i);continue}w=!1}const v=rm(p).join(":"),b=d?v+il:v,y=b+m;if(a.includes(y))continue;a.push(y);const x=o(m,w);for(let k=0;k<x.length;++k){const E=x[k];a.push(b+E)}i=u+(i.length>0?" "+i:i)}return i};function im(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ll(t))&&(r&&(r+=" "),r+=n);return r}const ll=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ll(e[r]))&&(n&&(n+=" "),n+=t);return n};function lm(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((p,d)=>d(p),e());return n=om(u),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const u=r(l);if(u)return u;const p=sm(l,n);return o(l,p),p}return function(){return a(im.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cl=/^\[(?:([a-z-]+):)?(.+)\]$/i,cm=/^\d+\/\d+$/,dm=new Set(["px","full","screen"]),um=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>xn(e)||dm.has(e)||cm.test(e),$t=e=>Cn(e,"length",Sm),xn=e=>!!e&&!Number.isNaN(Number(e)),pa=e=>Cn(e,"number",xn),nr=e=>!!e&&Number.isInteger(Number(e)),mm=e=>e.endsWith("%")&&xn(e.slice(0,-1)),le=e=>cl.test(e),Bt=e=>um.test(e),vm=new Set(["length","size","percentage"]),bm=e=>Cn(e,vm,dl),ym=e=>Cn(e,"position",dl),wm=new Set(["image","url"]),xm=e=>Cn(e,wm,km),Cm=e=>Cn(e,"",Nm),rr=()=>!0,Cn=(e,t,n)=>{const r=cl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Sm=e=>fm.test(e)&&!pm.test(e),dl=()=>!1,Nm=e=>hm.test(e),km=e=>gm.test(e),Mm=lm(()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),o=ve("borderColor"),a=ve("borderRadius"),s=ve("borderSpacing"),i=ve("borderWidth"),l=ve("contrast"),u=ve("grayscale"),p=ve("hueRotate"),d=ve("invert"),h=ve("gap"),g=ve("gradientColorStops"),w=ve("gradientColorStopPositions"),m=ve("inset"),v=ve("margin"),b=ve("opacity"),y=ve("padding"),x=ve("saturate"),k=ve("scale"),E=ve("sepia"),C=ve("skew"),N=ve("space"),M=ve("translate"),D=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",le,t],z=()=>[le,t],q=()=>["",Dt,$t],Y=()=>["auto",xn,le],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",le],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[xn,le];return{cacheSize:500,separator:":",theme:{colors:[rr],spacing:[Dt,$t],blur:["none","",Bt,le],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Bt,le],borderSpacing:z(),borderWidth:q(),contrast:oe(),grayscale:A(),hueRotate:oe(),invert:A(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[mm,$t],inset:R(),margin:R(),opacity:oe(),padding:z(),saturate:oe(),scale:oe(),sepia:A(),skew:oe(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[Bt]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ae(),le]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nr,le]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",nr,le]}],"grid-cols":[{"grid-cols":[rr]}],"col-start-end":[{col:["auto",{span:["full",nr,le]},le]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[rr]}],"row-start-end":[{row:["auto",{span:[nr,le]},le]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[Bt]},Bt]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Bt,$t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pa]}],"font-family":[{font:[rr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",le]}],"line-clamp":[{"line-clamp":["none",xn,pa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dt,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dt,$t]}],"underline-offset":[{"underline-offset":["auto",Dt,le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),ym]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",bm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:B()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Dt,le]}],"outline-w":[{outline:[Dt,$t]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Dt,$t]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bt,Cm]}],"shadow-color":[{shadow:[rr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Bt,le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[nr,le]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dt,$t,pa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function P(...e){return Mm(tl(e))}const ul=Ce(["flex w-full items-center justify-between gap-4 text-left font-medium text-foreground","transition-[color,background-color] duration-150","hover:text-foreground/80","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","[&[data-disabled]]:cursor-not-allowed [&[data-disabled]]:opacity-50"],{variants:{size:{sm:"py-2 text-sm",md:"py-3 text-sm",lg:"py-4 text-base"}},defaultVariants:{size:"md"}}),fl=Ce(["overflow-hidden text-foreground","data-[state=open]:animate-accordion-down","data-[state=closed]:animate-accordion-up"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),pl=Ce("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),ha=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(kg,{ref:r,className:P(pl({variant:t}),e),...n}));ha.displayName="AccordionRoot";const ga=f.forwardRef(({className:e,...t},n)=>c.jsx(Mg,{ref:n,className:P("border-b border-border last:border-b-0",e),...t}));ga.displayName="AccordionItem";const ma=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Dg,{className:"flex",children:c.jsxs(Eg,{ref:o,className:P("group",ul({size:t}),"px-4",e),...r,children:[n,c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}));ma.displayName="AccordionTrigger";const va=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Tg,{ref:o,className:P(fl({size:t}),e),...r,children:c.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));va.displayName="AccordionContent";const hl=f.forwardRef(({items:e,size:t="md",variant:n="default",className:r,type:o="single",defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:u,dir:p},d)=>c.jsx(ha,{ref:d,variant:n,className:r,type:o,defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:u,dir:p,children:e.map(h=>c.jsxs(ga,{value:h.value,children:[c.jsx(ma,{size:t,disabled:h.disabled,children:h.trigger}),c.jsx(va,{size:t,children:h.content})]},h.value))}));hl.displayName="Accordion";const gl=Ce(["relative w-full rounded-lg border p-4","[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:size-4","[&>svg~*]:pl-7"],{variants:{variant:{default:"bg-background border-border text-foreground [&>svg]:text-foreground",info:"bg-info/10 border-info/30 text-foreground [&>svg]:text-info",success:"bg-success/10 border-success/30 text-foreground [&>svg]:text-success",warning:"bg-warning/10 border-warning/30 text-foreground [&>svg]:text-warning",destructive:"bg-destructive/10 border-destructive/30 text-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ml=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("div",{ref:r,role:"alert",className:P(gl({variant:t}),e),...n}));ml.displayName="Alert";const vl=f.forwardRef(({className:e,...t},n)=>c.jsx("h5",{ref:n,className:P("mb-1 font-medium leading-none tracking-tight text-balance",e),...t}));vl.displayName="AlertTitle";const bl=f.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:P("text-sm leading-relaxed opacity-90 text-pretty",e),...t}));bl.displayName="AlertDescription";var Dm=Symbol.for("react.lazy"),Qr=f[" use ".trim().toString()];function Em(e){return typeof e=="object"&&e!==null&&"then"in e}function yl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Dm&&"_payload"in e&&Em(e._payload)}function Tm(e){const t=Pm(e),n=f.forwardRef((r,o)=>{let{children:a,...s}=r;yl(a)&&typeof Qr=="function"&&(a=Qr(a._payload));const i=f.Children.toArray(a),l=i.find(_m);if(l){const u=l.props.children,p=i.map(d=>d===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return c.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return c.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Pm(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n;if(yl(o)&&typeof Qr=="function"&&(o=Qr(o._payload)),f.isValidElement(o)){const s=Am(o),i=Im(a,o.props);return o.type!==f.Fragment&&(i.ref=r?mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Om=Symbol("radix.slottable");function _m(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Om}function Im(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Am(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wm=Fm.reduce((e,t)=>{const n=Tm(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),$m="AspectRatio",wl=f.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return c.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:c.jsx(Wm.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});wl.displayName=$m;var Bm=wl;const xl=f.forwardRef(({className:e,ratio:t=16/9,...n},r)=>c.jsx(Bm,{ref:r,ratio:t,className:P("overflow-hidden",e),...n}));xl.displayName="AspectRatio";const Cl=Ce("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}});function zm(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const Sl=f.forwardRef(({className:e,size:t,src:n,alt:r="",fallback:o,...a},s)=>{const[i,l]=f.useState(!1);f.useEffect(()=>{l(!1)},[n]);const u=o??(r?zm(r):null),p=n&&!i;return c.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:P(Cl({size:t}),e),...a,children:p?c.jsx("img",{src:n,alt:"",className:"h-full w-full object-cover outline -outline-offset-1 outline-black/10",onError:()=>l(!0)}):c.jsx("span",{"aria-hidden":"true",className:"font-medium text-muted-foreground select-none",children:u??"?"})})});Sl.displayName="Avatar";const Nl=Ce("inline-flex items-center rounded-sm px-2.5 py-0.5 text-xs font-ui font-medium transition-colors",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground",outline:"border border-border bg-transparent text-foreground",success:"bg-success/10 text-success",warning:"bg-warning/10 text-foreground"}},defaultVariants:{variant:"default"}}),kl=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("span",{ref:r,className:P(Nl({variant:t}),e),...n}));kl.displayName="Badge";const Ml=Ce(["relative inline-flex items-center justify-center gap-2","cursor-pointer","whitespace-nowrap rounded-md font-ui font-medium","ring-offset-background transition-[background-color,color,border-color,scale]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","active:scale-[0.96]","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:["bg-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-ring"],destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive/90","focus-visible:ring-ring"],outline:["border border-border bg-background text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],ghost:["bg-transparent text-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring"],link:["bg-transparent text-primary underline underline-offset-4","justify-start","hover:text-primary/80","focus-visible:ring-ring","active:scale-100"]},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-5 text-sm",lg:"h-12 px-6 text-base"}},defaultVariants:{variant:"default",size:"md"}}),Sn=f.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,icon:o,iconPosition:a="left",disabled:s,children:i,static:l=!1,...u},p)=>{const d=o?c.jsxs("span",{className:"relative inline-flex size-4 shrink-0",children:[c.jsx("span",{"aria-hidden":"true",className:P("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-0 translate-y-1 blur-sm":"opacity-100 translate-y-0 blur-0"),children:o}),c.jsx("span",{"aria-hidden":"true",className:P("absolute inset-0 flex items-center justify-center transition-[opacity,translate,filter] duration-150",r?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-1 blur-sm"),children:c.jsx(Ji,{className:"animate-spin"})})]}):r?c.jsx(Ji,{className:"animate-spin","aria-hidden":"true"}):null;return c.jsx("button",{ref:p,className:P(Ml({variant:t,size:n}),a==="center"&&"aspect-square p-0",l&&"active:scale-100",e),disabled:s||r,"aria-busy":r||void 0,...u,children:a==="center"?d:c.jsxs(c.Fragment,{children:[a==="left"&&d,i,a==="right"&&d]})})});Sn.displayName="Button";const Dl=Ce(["peer appearance-none rounded-xs border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","indeterminate:bg-primary indeterminate:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Lm={sm:"size-2.5",md:"size-3",lg:"size-3.5"},El=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>{const a=Lm[t??"md"];return c.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[c.jsx("input",{type:"checkbox",ref:o,className:P(Dl({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...r}),c.jsx(yn,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30",a)}),c.jsx(Rg,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-indeterminate:opacity-100 peer-disabled:opacity-30",a)})]})});El.displayName="Checkbox";var Tl=1,Hm=.9,Vm=.8,Ym=.17,ba=.1,ya=.999,Gm=.9999,jm=.99,Um=/[\\\/_+.#"@\[\(\{&]/,Rm=/[\\\/_+.#"@\[\(\{&]/g,Km=/[\s-]/,Pl=/[\s-]/g;function wa(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Tl:jm;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),u=n.indexOf(l,o),p=0,d,h,g,w;u>=0;)d=wa(e,t,n,r,u+1,a+1,s),d>p&&(u===o?d*=Tl:Um.test(e.charAt(u-1))?(d*=Vm,g=e.slice(o,u-1).match(Rm),g&&o>0&&(d*=Math.pow(ya,g.length))):Km.test(e.charAt(u-1))?(d*=Hm,w=e.slice(o,u-1).match(Pl),w&&o>0&&(d*=Math.pow(ya,w.length))):(d*=Ym,o>0&&(d*=Math.pow(ya,u-o))),e.charAt(u)!==t.charAt(a)&&(d*=Gm)),(d<ba&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(h=wa(e,t,n,r,u+1,a+2,s),h*ba>d&&(d=h*ba)),d>p&&(p=d),u=n.indexOf(l,u+1);return s[i]=p,p}function Ol(e){return e.toLowerCase().replace(Pl," ")}function qm(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,wa(e,t,Ol(e),Ol(t),0,0,{})}function ot(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Xm(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Zm="DismissableLayer",xa="dismissableLayer.update",Qm="dismissableLayer.pointerDownOutside",Jm="dismissableLayer.focusOutside",_l,Il=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nn=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(Il),[p,d]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),w=he(t,N=>d(N)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),y=p?m.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=b,E=nv(N=>{const M=N.target,D=[...u.branches].some(I=>I.contains(M));!k||D||(o==null||o(N),s==null||s(N),N.defaultPrevented||i==null||i())},h),C=rv(N=>{const M=N.target;[...u.branches].some(I=>I.contains(M))||(a==null||a(N),s==null||s(N),N.defaultPrevented||i==null||i())},h);return Xm(N=>{y===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_l=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Al(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=_l)}},[p,h,n,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Al())},[p,u]),f.useEffect(()=>{const N=()=>g({});return document.addEventListener(xa,N),()=>document.removeEventListener(xa,N)},[]),c.jsx(ne.div,{...l,ref:w,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:j(e.onFocusCapture,C.onFocusCapture),onBlurCapture:j(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,E.onPointerDownCapture)})});Nn.displayName=Zm;var ev="DismissableLayerBranch",tv=f.forwardRef((e,t)=>{const n=f.useContext(Il),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),c.jsx(ne.div,{...e,ref:o})});tv.displayName=ev;function nv(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Fl(Qm,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rv(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&Fl(Jm,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Al(){const e=new CustomEvent(xa);document.dispatchEvent(e)}function Fl(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ai(o,a):o.dispatchEvent(a)}var Ca="focusScope.autoFocusOnMount",Sa="focusScope.autoFocusOnUnmount",Wl={bubbles:!1,cancelable:!0},ov="FocusScope",or=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=ot(o),p=ot(a),d=f.useRef(null),h=he(t,m=>l(m)),g=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let m=function(x){if(g.paused||!i)return;const k=x.target;i.contains(k)?d.current=k:zt(d.current,{select:!0})},v=function(x){if(g.paused||!i)return;const k=x.relatedTarget;k!==null&&(i.contains(k)||zt(d.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&zt(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),y.disconnect()}}},[r,i,g.paused]),f.useEffect(()=>{if(i){zl.add(g);const m=document.activeElement;if(!i.contains(m)){const b=new CustomEvent(Ca,Wl);i.addEventListener(Ca,u),i.dispatchEvent(b),b.defaultPrevented||(av(dv($l(i)),{select:!0}),document.activeElement===m&&zt(i))}return()=>{i.removeEventListener(Ca,u),setTimeout(()=>{const b=new CustomEvent(Sa,Wl);i.addEventListener(Sa,p),i.dispatchEvent(b),b.defaultPrevented||zt(m??document.body,{select:!0}),i.removeEventListener(Sa,p),zl.remove(g)},0)}}},[i,u,p,g]);const w=f.useCallback(m=>{if(!n&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(v&&b){const y=m.currentTarget,[x,k]=sv(y);x&&k?!m.shiftKey&&b===k?(m.preventDefault(),n&&zt(x,{select:!0})):m.shiftKey&&b===x&&(m.preventDefault(),n&&zt(k,{select:!0})):b===y&&m.preventDefault()}},[n,r,g.paused]);return c.jsx(ne.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});or.displayName=ov;function av(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zt(r,{select:t}),document.activeElement!==n)return}function sv(e){const t=$l(e),n=Bl(t,e),r=Bl(t.reverse(),e);return[n,r]}function $l(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Bl(e,t){for(const n of e)if(!iv(n,{upTo:t}))return n}function iv(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function lv(e){return e instanceof HTMLInputElement&&"select"in e}function zt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&lv(e)&&t&&e.select()}}var zl=cv();function cv(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ll(e,t),e.unshift(t)},remove(t){var n;e=Ll(e,t),(n=e[0])==null||n.resume()}}}function Ll(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dv(e){return e.filter(t=>t.tagName!=="A")}var uv="Portal",kn=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);Pe(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?ra.createPortal(c.jsx(ne.div,{...r,ref:t}),s):null});kn.displayName=uv;var Na=0;function Jr(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Hl()),document.body.insertAdjacentElement("beforeend",e[1]??Hl()),Na++,()=>{Na===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Na--}},[])}function Hl(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},vt.apply(this,arguments)};function Vl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function fv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eo="right-scroll-bar-position",to="width-before-scroll-bar",pv="with-scroll-bars-hidden",hv="--removed-body-scroll-bar-size";function ka(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gv(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var mv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Yl=new WeakMap;function vv(e,t){var n=gv(null,function(r){return e.forEach(function(o){return ka(o,r)})});return mv(function(){var r=Yl.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||ka(i,null)}),a.forEach(function(i){o.has(i)||ka(i,s)})}Yl.set(n,e)},[e]),n}function bv(e){return e}function yv(e,t){t===void 0&&(t=bv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var p=s;s=[],p.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),n}}}};return o}function wv(e){e===void 0&&(e={});var t=yv(null);return t.options=vt({async:!0,ssr:!1},e),t}var Gl=function(e){var t=e.sideCar,n=Vl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,vt({},n))};Gl.isSideCarExport=!0;function xv(e,t){return e.useMedium(t),Gl}var jl=wv(),Ma=function(){},no=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ma,onWheelCapture:Ma,onTouchMoveCapture:Ma}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,d=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,k=Vl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,C=vv([n,t]),N=vt(vt({},k),o);return f.createElement(f.Fragment,null,p&&f.createElement(E,{sideCar:jl,removeScrollBar:u,shards:d,noRelative:g,noIsolation:w,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:x}),s?f.cloneElement(f.Children.only(i),vt(vt({},N),{ref:C})):f.createElement(y,vt({},N,{className:l,ref:C}),i))});no.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},no.classNames={fullWidth:to,zeroRight:eo};var Cv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cv();return t&&e.setAttribute("nonce",t),e}function Nv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Mv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Sv())&&(Nv(t,n),kv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Dv=function(){var e=Mv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ul=function(){var e=Dv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ev={left:0,top:0,right:0,gap:0},Da=function(e){return parseInt(e||"",10)||0},Tv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Da(n),Da(r),Da(o)]},Pv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ev;var t=Tv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ov=Ul(),Mn="data-scroll-locked",_v=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
142
+ .`.concat(pv,` {
133
143
  overflow: hidden `).concat(r,`;
134
144
  padding-right: `).concat(i,"px ").concat(r,`;
135
145
  }
136
- body[`).concat(Sn,`] {
146
+ body[`).concat(Mn,`] {
137
147
  overflow: hidden `).concat(r,`;
138
148
  overscroll-behavior: contain;
139
149
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -146,30 +156,30 @@
146
156
  `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
147
157
  }
148
158
 
149
- .`).concat(Zr,` {
159
+ .`).concat(eo,` {
150
160
  right: `).concat(i,"px ").concat(r,`;
151
161
  }
152
162
 
153
- .`).concat(Qr,` {
163
+ .`).concat(to,` {
154
164
  margin-right: `).concat(i,"px ").concat(r,`;
155
165
  }
156
166
 
157
- .`).concat(Zr," .").concat(Zr,` {
167
+ .`).concat(eo," .").concat(eo,` {
158
168
  right: 0 `).concat(r,`;
159
169
  }
160
170
 
161
- .`).concat(Qr," .").concat(Qr,` {
171
+ .`).concat(to," .").concat(to,` {
162
172
  margin-right: 0 `).concat(r,`;
163
173
  }
164
174
 
165
- body[`).concat(Sn,`] {
166
- `).concat(ov,": ").concat(i,`px;
175
+ body[`).concat(Mn,`] {
176
+ `).concat(hv,": ").concat(i,`px;
167
177
  }
168
- `)},Ul=function(){var e=parseInt(document.body.getAttribute(Sn)||"0",10);return isFinite(e)?e:0},Sv=function(){f.useEffect(function(){return document.body.setAttribute(Sn,(Ul()+1).toString()),function(){var e=Ul()-1;e<=0?document.body.removeAttribute(Sn):document.body.setAttribute(Sn,e.toString())}},[])},Nv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Sv();var a=f.useMemo(function(){return wv(o)},[o]);return f.createElement(xv,{styles:Cv(a,!t,o,n?"":"!important")})},Na=!1;if(typeof window<"u")try{var eo=Object.defineProperty({},"passive",{get:function(){return Na=!0,!0}});window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{Na=!1}var Nn=Na?{passive:!1}:!1,Mv=function(e){return e.tagName==="TEXTAREA"},Kl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Mv(e)&&n[t]==="visible")},kv=function(e){return Kl(e,"overflowY")},Ev=function(e){return Kl(e,"overflowX")},ql=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xl(e,r);if(o){var a=Zl(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Tv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xl=function(e,t){return e==="v"?kv(t):Ev(t)},Zl=function(e,t){return e==="v"?Dv(t):Tv(t)},Pv=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ov=function(e,t,n,r,o){var a=Pv(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),u=!1,p=s>0,c=0,h=0;do{if(!i)break;var g=Zl(e,i),w=g[0],m=g[1],v=g[2],y=m-v-a*w;(w||y)&&Xl(e,i)&&(c+=y,h+=w);var b=i.parentNode;i=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(p&&Math.abs(c)<1||!p&&Math.abs(h)<1)&&(u=!0),u},to=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ql=function(e){return[e.deltaX,e.deltaY]},Jl=function(e){return e&&"current"in e?e.current:e},_v=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Av=function(e){return`
178
+ `)},Rl=function(){var e=parseInt(document.body.getAttribute(Mn)||"0",10);return isFinite(e)?e:0},Iv=function(){f.useEffect(function(){return document.body.setAttribute(Mn,(Rl()+1).toString()),function(){var e=Rl()-1;e<=0?document.body.removeAttribute(Mn):document.body.setAttribute(Mn,e.toString())}},[])},Av=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Iv();var a=f.useMemo(function(){return Pv(o)},[o]);return f.createElement(Ov,{styles:_v(a,!t,o,n?"":"!important")})},Ea=!1;if(typeof window<"u")try{var ro=Object.defineProperty({},"passive",{get:function(){return Ea=!0,!0}});window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{Ea=!1}var Dn=Ea?{passive:!1}:!1,Fv=function(e){return e.tagName==="TEXTAREA"},Kl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fv(e)&&n[t]==="visible")},Wv=function(e){return Kl(e,"overflowY")},$v=function(e){return Kl(e,"overflowX")},ql=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xl(e,r);if(o){var a=Zl(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xl=function(e,t){return e==="v"?Wv(t):$v(t)},Zl=function(e,t){return e==="v"?Bv(t):zv(t)},Lv=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hv=function(e,t,n,r,o){var a=Lv(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),u=!1,p=s>0,d=0,h=0;do{if(!i)break;var g=Zl(e,i),w=g[0],m=g[1],v=g[2],b=m-v-a*w;(w||b)&&Xl(e,i)&&(d+=b,h+=w);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(p&&Math.abs(d)<1||!p&&Math.abs(h)<1)&&(u=!0),u},oo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ql=function(e){return[e.deltaX,e.deltaY]},Jl=function(e){return e&&"current"in e?e.current:e},Vv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yv=function(e){return`
169
179
  .block-interactivity-`.concat(e,` {pointer-events: none;}
170
180
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
171
- `)},Iv=0,Mn=[];function Fv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Iv++)[0],a=f.useState(Rl)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=nv([e.lockRef.current],(e.shards||[]).map(Jl),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var y=to(m),b=n.current,x="deltaX"in m?m.deltaX:b[0]-y[0],N="deltaY"in m?m.deltaY:b[1]-y[1],M,C=m.target,k=Math.abs(x)>Math.abs(N)?"h":"v";if("touches"in m&&k==="h"&&C.type==="range")return!1;var O=window.getSelection(),V=O&&O.anchorNode,$=V?V===C||V.contains(C):!1;if($)return!1;var U=ql(k,C);if(!U)return!0;if(U?M=k:(M=k==="v"?"h":"v",U=ql(k,C)),!U)return!1;if(!r.current&&"changedTouches"in m&&(x||N)&&(r.current=M),!M)return!0;var B=r.current||M;return Ov(B,v,m,B==="h"?x:N)},[]),l=f.useCallback(function(m){var v=m;if(!(!Mn.length||Mn[Mn.length-1]!==a)){var y="deltaY"in v?Ql(v):to(v),b=t.current.filter(function(M){return M.name===v.type&&(M.target===v.target||v.target===M.shadowParent)&&_v(M.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var x=(s.current.shards||[]).map(Jl).filter(Boolean).filter(function(M){return M.contains(v.target)}),N=x.length>0?i(v,x[0]):!s.current.noIsolation;N&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(m,v,y,b){var x={name:m,delta:v,target:y,should:b,shadowParent:Wv(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(N){return N!==x})},1)},[]),p=f.useCallback(function(m){n.current=to(m),r.current=void 0},[]),c=f.useCallback(function(m){u(m.type,Ql(m),m.target,i(m,e.lockRef.current))},[]),h=f.useCallback(function(m){u(m.type,to(m),m.target,i(m,e.lockRef.current))},[]);f.useEffect(function(){return Mn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Nn),document.addEventListener("touchmove",l,Nn),document.addEventListener("touchstart",p,Nn),function(){Mn=Mn.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Nn),document.removeEventListener("touchmove",l,Nn),document.removeEventListener("touchstart",p,Nn)}},[]);var g=e.removeScrollBar,w=e.inert;return f.createElement(f.Fragment,null,w?f.createElement(a,{styles:Av(o)}):null,g?f.createElement(Nv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $v=uv(jl,Fv);var ar=f.forwardRef(function(e,t){return f.createElement(Jr,vt({},e,{ref:t,sideCar:$v}))});ar.classNames=Jr.classNames;var Bv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kn=new WeakMap,no=new WeakMap,ro={},Ma=0,ec=function(e){return e&&(e.host||ec(e.parentNode))},zv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ec(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Lv=function(e,t,n,r){var o=zv(t,Array.isArray(e)?e:[e]);ro[n]||(ro[n]=new WeakMap);var a=ro[n],s=[],i=new Set,l=new Set(o),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};o.forEach(u);var p=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))p(h);else try{var g=h.getAttribute(r),w=g!==null&&g!=="false",m=(kn.get(h)||0)+1,v=(a.get(h)||0)+1;kn.set(h,m),a.set(h,v),s.push(h),m===1&&w&&no.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return p(t),i.clear(),Ma++,function(){s.forEach(function(c){var h=kn.get(c)-1,g=a.get(c)-1;kn.set(c,h),a.set(c,g),h||(no.has(c)||c.removeAttribute(r),no.delete(c)),g||c.removeAttribute(n)}),Ma--,Ma||(kn=new WeakMap,kn=new WeakMap,no=new WeakMap,ro={})}},oo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Bv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Lv(r,o,n,"aria-hidden")):function(){return null}},ao="Dialog",[tc]=Ze(ao),[Hv,at]=tc(ao),nc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u,p]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:ao});return d.jsx(Hv,{scope:t,triggerRef:i,contentRef:l,contentId:we(),titleId:we(),descriptionId:we(),open:u,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(c=>!c),[p]),modal:s,children:n})};nc.displayName=ao;var rc="DialogTrigger",oc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(rc,n),a=he(t,o.triggerRef);return d.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Da(o.open),...r,ref:a,onClick:j(e.onClick,o.onOpenToggle)})});oc.displayName=rc;var ka="DialogPortal",[Vv,ac]=tc(ka,{forceMount:void 0}),sc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=at(ka,t);return d.jsx(Vv,{scope:t,forceMount:n,children:f.Children.map(r,s=>d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:s})}))})};sc.displayName=ka;var so="DialogOverlay",ic=f.forwardRef((e,t)=>{const n=ac(so,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(so,e.__scopeDialog);return a.modal?d.jsx(Be,{present:r||a.open,children:d.jsx(Gv,{...o,ref:t})}):null});ic.displayName=so;var Yv=Qt("DialogOverlay.RemoveScroll"),Gv=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(so,n);return d.jsx(ar,{as:Yv,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(ne.div,{"data-state":Da(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),en="DialogContent",lc=f.forwardRef((e,t)=>{const n=ac(en,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(en,e.__scopeDialog);return d.jsx(Be,{present:r||a.open,children:a.modal?d.jsx(jv,{...o,ref:t}):d.jsx(Rv,{...o,ref:t})})});lc.displayName=en;var jv=f.forwardRef((e,t)=>{const n=at(en,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return oo(a)},[]),d.jsx(cc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault())})}),Rv=f.forwardRef((e,t)=>{const n=at(en,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(cc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),cc=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=at(en,n),l=f.useRef(null),u=he(t,l);return Xr(),d.jsxs(d.Fragment,{children:[d.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(xn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Da(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(Uv,{titleId:i.titleId}),d.jsx(qv,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Ea="DialogTitle",dc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Ea,n);return d.jsx(ne.h2,{id:o.titleId,...r,ref:t})});dc.displayName=Ea;var uc="DialogDescription",fc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(uc,n);return d.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});fc.displayName=uc;var pc="DialogClose",hc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(pc,n);return d.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});hc.displayName=pc;function Da(e){return e?"open":"closed"}var gc="DialogTitleWarning",[RN,mc]=zh(gc,{contentName:en,titleName:Ea,docsSlug:"dialog"}),Uv=({titleId:e})=>{const t=mc(gc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
181
+ `)},Gv=0,En=[];function jv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Gv++)[0],a=f.useState(Ul)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=fv([e.lockRef.current],(e.shards||[]).map(Jl),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var b=oo(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-b[0],k="deltaY"in m?m.deltaY:y[1]-b[1],E,C=m.target,N=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in m&&N==="h"&&C.type==="range")return!1;var M=window.getSelection(),D=M&&M.anchorNode,I=D?D===C||D.contains(C):!1;if(I)return!1;var R=ql(N,C);if(!R)return!0;if(R?E=N:(E=N==="v"?"h":"v",R=ql(N,C)),!R)return!1;if(!r.current&&"changedTouches"in m&&(x||k)&&(r.current=E),!E)return!0;var z=r.current||E;return Hv(z,v,m,z==="h"?x:k)},[]),l=f.useCallback(function(m){var v=m;if(!(!En.length||En[En.length-1]!==a)){var b="deltaY"in v?Ql(v):oo(v),y=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&Vv(E.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(Jl).filter(Boolean).filter(function(E){return E.contains(v.target)}),k=x.length>0?i(v,x[0]):!s.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(m,v,b,y){var x={name:m,delta:v,target:b,should:y,shadowParent:Uv(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(k){return k!==x})},1)},[]),p=f.useCallback(function(m){n.current=oo(m),r.current=void 0},[]),d=f.useCallback(function(m){u(m.type,Ql(m),m.target,i(m,e.lockRef.current))},[]),h=f.useCallback(function(m){u(m.type,oo(m),m.target,i(m,e.lockRef.current))},[]);f.useEffect(function(){return En.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Dn),document.addEventListener("touchmove",l,Dn),document.addEventListener("touchstart",p,Dn),function(){En=En.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Dn),document.removeEventListener("touchmove",l,Dn),document.removeEventListener("touchstart",p,Dn)}},[]);var g=e.removeScrollBar,w=e.inert;return f.createElement(f.Fragment,null,w?f.createElement(a,{styles:Yv(o)}):null,g?f.createElement(Av,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Uv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Rv=xv(jl,jv);var ar=f.forwardRef(function(e,t){return f.createElement(no,vt({},e,{ref:t,sideCar:Rv}))});ar.classNames=no.classNames;var Kv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tn=new WeakMap,ao=new WeakMap,so={},Ta=0,ec=function(e){return e&&(e.host||ec(e.parentNode))},qv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ec(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Xv=function(e,t,n,r){var o=qv(t,Array.isArray(e)?e:[e]);so[n]||(so[n]=new WeakMap);var a=so[n],s=[],i=new Set,l=new Set(o),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};o.forEach(u);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))p(h);else try{var g=h.getAttribute(r),w=g!==null&&g!=="false",m=(Tn.get(h)||0)+1,v=(a.get(h)||0)+1;Tn.set(h,m),a.set(h,v),s.push(h),m===1&&w&&ao.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return p(t),i.clear(),Ta++,function(){s.forEach(function(d){var h=Tn.get(d)-1,g=a.get(d)-1;Tn.set(d,h),a.set(d,g),h||(ao.has(d)||d.removeAttribute(r),ao.delete(d)),g||d.removeAttribute(n)}),Ta--,Ta||(Tn=new WeakMap,Tn=new WeakMap,ao=new WeakMap,so={})}},io=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Kv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Xv(r,o,n,"aria-hidden")):function(){return null}},lo="Dialog",[tc]=Ze(lo),[Zv,at]=tc(lo),nc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u,p]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:lo});return c.jsx(Zv,{scope:t,triggerRef:i,contentRef:l,contentId:xe(),titleId:xe(),descriptionId:xe(),open:u,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(d=>!d),[p]),modal:s,children:n})};nc.displayName=lo;var rc="DialogTrigger",oc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(rc,n),a=he(t,o.triggerRef);return c.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_a(o.open),...r,ref:a,onClick:j(e.onClick,o.onOpenToggle)})});oc.displayName=rc;var Pa="DialogPortal",[Qv,ac]=tc(Pa,{forceMount:void 0}),sc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=at(Pa,t);return c.jsx(Qv,{scope:t,forceMount:n,children:f.Children.map(r,s=>c.jsx(Be,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:s})}))})};sc.displayName=Pa;var co="DialogOverlay",ic=f.forwardRef((e,t)=>{const n=ac(co,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(co,e.__scopeDialog);return a.modal?c.jsx(Be,{present:r||a.open,children:c.jsx(eb,{...o,ref:t})}):null});ic.displayName=co;var Jv=en("DialogOverlay.RemoveScroll"),eb=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(co,n);return c.jsx(ar,{as:Jv,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(ne.div,{"data-state":_a(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nn="DialogContent",lc=f.forwardRef((e,t)=>{const n=ac(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(nn,e.__scopeDialog);return c.jsx(Be,{present:r||a.open,children:a.modal?c.jsx(tb,{...o,ref:t}):c.jsx(nb,{...o,ref:t})})});lc.displayName=nn;var tb=f.forwardRef((e,t)=>{const n=at(nn,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return io(a)},[]),c.jsx(cc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault())})}),nb=f.forwardRef((e,t)=>{const n=at(nn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return c.jsx(cc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),cc=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=at(nn,n),l=f.useRef(null),u=he(t,l);return Jr(),c.jsxs(c.Fragment,{children:[c.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:c.jsx(Nn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":_a(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(rb,{titleId:i.titleId}),c.jsx(ab,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Oa="DialogTitle",dc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Oa,n);return c.jsx(ne.h2,{id:o.titleId,...r,ref:t})});dc.displayName=Oa;var uc="DialogDescription",fc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(uc,n);return c.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});fc.displayName=uc;var pc="DialogClose",hc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(pc,n);return c.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});hc.displayName=pc;function _a(e){return e?"open":"closed"}var gc="DialogTitleWarning",[ok,mc]=Rh(gc,{contentName:nn,titleName:Oa,docsSlug:"dialog"}),rb=({titleId:e})=>{const t=mc(gc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
172
182
 
173
183
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
174
184
 
175
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Kv="DialogDescriptionWarning",qv=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mc(Kv).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vc=nc,Xv=oc,bc=sc,Ta=ic,Pa=lc,yc=dc,wc=fc,Zv=hc,sr='[cmdk-group=""]',Oa='[cmdk-group-items=""]',Qv='[cmdk-group-heading=""]',xc='[cmdk-item=""]',Cc=`${xc}:not([aria-disabled="true"])`,_a="cmdk-item-select",En="data-value",Jv=(e,t,n)=>zm(e,t,n),Sc=f.createContext(void 0),ir=()=>f.useContext(Sc),Nc=f.createContext(void 0),Aa=()=>f.useContext(Nc),Mc=f.createContext(void 0),io=f.forwardRef((e,t)=>{let n=Dn(()=>{var P,A;return{search:"",value:(A=(P=e.value)!=null?P:e.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Dn(()=>new Set),o=Dn(()=>new Map),a=Dn(()=>new Map),s=Dn(()=>new Set),i=Dc(e),{label:l,children:u,value:p,onValueChange:c,filter:h,shouldFilter:g,loop:w,disablePointerSelection:m=!1,vimBindings:v=!0,...y}=e,b=we(),x=we(),N=we(),M=f.useRef(null),C=ob();tn(()=>{if(p!==void 0){let P=p.trim();n.current.value=P,k.emit()}},[p]),tn(()=>{C(6,q)},[]);let k=f.useMemo(()=>({subscribe:P=>(s.current.add(P),()=>s.current.delete(P)),snapshot:()=>n.current,setState:(P,A,H)=>{var F,Z,I,R;if(!Object.is(n.current[P],A)){if(n.current[P]=A,P==="search")B(),$(),C(1,U);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(N);X?X.focus():(F=document.getElementById(b))==null||F.focus()}if(C(7,()=>{var X;n.current.selectedItemId=(X=Y())==null?void 0:X.id,k.emit()}),H||C(5,q),((Z=i.current)==null?void 0:Z.value)!==void 0){let X=A??"";(R=(I=i.current).onValueChange)==null||R.call(I,X);return}}k.emit()}},emit:()=>{s.current.forEach(P=>P())}}),[]),O=f.useMemo(()=>({value:(P,A,H)=>{var F;A!==((F=a.current.get(P))==null?void 0:F.value)&&(a.current.set(P,{value:A,keywords:H}),n.current.filtered.items.set(P,V(A,H)),C(2,()=>{$(),k.emit()}))},item:(P,A)=>(r.current.add(P),A&&(o.current.has(A)?o.current.get(A).add(P):o.current.set(A,new Set([P]))),C(3,()=>{B(),$(),n.current.value||U(),k.emit()}),()=>{a.current.delete(P),r.current.delete(P),n.current.filtered.items.delete(P);let H=Y();C(4,()=>{B(),(H==null?void 0:H.getAttribute("id"))===P&&U(),k.emit()})}),group:P=>(o.current.has(P)||o.current.set(P,new Set),()=>{a.current.delete(P),o.current.delete(P)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:b,inputId:N,labelId:x,listInnerRef:M}),[]);function V(P,A){var H,F;let Z=(F=(H=i.current)==null?void 0:H.filter)!=null?F:Jv;return P?Z(P,n.current.search,A):0}function $(){if(!n.current.search||i.current.shouldFilter===!1)return;let P=n.current.filtered.items,A=[];n.current.filtered.groups.forEach(F=>{let Z=o.current.get(F),I=0;Z.forEach(R=>{let X=P.get(R);I=Math.max(X,I)}),A.push([F,I])});let H=M.current;ae().sort((F,Z)=>{var I,R;let X=F.getAttribute("id"),se=Z.getAttribute("id");return((I=P.get(se))!=null?I:0)-((R=P.get(X))!=null?R:0)}).forEach(F=>{let Z=F.closest(Oa);Z?Z.appendChild(F.parentElement===Z?F:F.closest(`${Oa} > *`)):H.appendChild(F.parentElement===H?F:F.closest(`${Oa} > *`))}),A.sort((F,Z)=>Z[1]-F[1]).forEach(F=>{var Z;let I=(Z=M.current)==null?void 0:Z.querySelector(`${sr}[${En}="${encodeURIComponent(F[0])}"]`);I==null||I.parentElement.appendChild(I)})}function U(){let P=ae().find(H=>H.getAttribute("aria-disabled")!=="true"),A=P==null?void 0:P.getAttribute(En);k.setState("value",A||void 0)}function B(){var P,A,H,F;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Z=0;for(let I of r.current){let R=(A=(P=a.current.get(I))==null?void 0:P.value)!=null?A:"",X=(F=(H=a.current.get(I))==null?void 0:H.keywords)!=null?F:[],se=V(R,X);n.current.filtered.items.set(I,se),se>0&&Z++}for(let[I,R]of o.current)for(let X of R)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(I);break}n.current.filtered.count=Z}function q(){var P,A,H;let F=Y();F&&(((P=F.parentElement)==null?void 0:P.firstChild)===F&&((H=(A=F.closest(sr))==null?void 0:A.querySelector(Qv))==null||H.scrollIntoView({block:"nearest"})),F.scrollIntoView({block:"nearest"}))}function Y(){var P;return(P=M.current)==null?void 0:P.querySelector(`${xc}[aria-selected="true"]`)}function ae(){var P;return Array.from(((P=M.current)==null?void 0:P.querySelectorAll(Cc))||[])}function W(P){let A=ae()[P];A&&k.setState("value",A.getAttribute(En))}function K(P){var A;let H=Y(),F=ae(),Z=F.findIndex(R=>R===H),I=F[Z+P];(A=i.current)!=null&&A.loop&&(I=Z+P<0?F[F.length-1]:Z+P===F.length?F[0]:F[Z+P]),I&&k.setState("value",I.getAttribute(En))}function G(P){let A=Y(),H=A==null?void 0:A.closest(sr),F;for(;H&&!F;)H=P>0?nb(H,sr):rb(H,sr),F=H==null?void 0:H.querySelector(Cc);F?k.setState("value",F.getAttribute(En)):K(P)}let _=()=>W(ae().length-1),Q=P=>{P.preventDefault(),P.metaKey?_():P.altKey?G(1):K(1)},oe=P=>{P.preventDefault(),P.metaKey?W(0):P.altKey?G(-1):K(-1)};return f.createElement(ne.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:P=>{var A;(A=y.onKeyDown)==null||A.call(y,P);let H=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||H))switch(P.key){case"n":case"j":{v&&P.ctrlKey&&Q(P);break}case"ArrowDown":{Q(P);break}case"p":case"k":{v&&P.ctrlKey&&oe(P);break}case"ArrowUp":{oe(P);break}case"Home":{P.preventDefault(),W(0);break}case"End":{P.preventDefault(),_();break}case"Enter":{P.preventDefault();let F=Y();if(F){let Z=new Event(_a);F.dispatchEvent(Z)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:O.inputId,id:O.labelId,style:sb},l),lo(e,P=>f.createElement(Nc.Provider,{value:k},f.createElement(Sc.Provider,{value:O},P))))}),Ia=f.forwardRef((e,t)=>{var n,r;let o=we(),a=f.useRef(null),s=f.useContext(Mc),i=ir(),l=Dc(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;tn(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let p=Tc(o,a,[e.value,e.children,a],e.keywords),c=Aa(),h=zt(C=>C.value&&C.value===p.current),g=zt(C=>u||i.filter()===!1?!0:C.search?C.filtered.items.get(o)>0:!0);f.useEffect(()=>{let C=a.current;if(!(!C||e.disabled))return C.addEventListener(_a,w),()=>C.removeEventListener(_a,w)},[g,e.onSelect,e.disabled]);function w(){var C,k;m(),(k=(C=l.current).onSelect)==null||k.call(C,p.current)}function m(){c.setState("value",p.current,!0)}if(!g)return null;let{disabled:v,value:y,onSelect:b,forceMount:x,keywords:N,...M}=e;return f.createElement(ne.div,{ref:mt(a,t),...M,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||i.getDisablePointerSelection()?void 0:m,onClick:v?void 0:w},e.children)}),kc=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=we(),i=f.useRef(null),l=f.useRef(null),u=we(),p=ir(),c=zt(g=>o||p.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);tn(()=>p.group(s),[]),Tc(s,i,[e.value,e.heading,l]);let h=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(ne.div,{ref:mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),lo(e,g=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(Mc.Provider,{value:h},g))))}),Ec=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=zt(s=>!s.search);return!n&&!a?null:f.createElement(ne.div,{ref:mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),Fa=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Aa(),s=zt(u=>u.search),i=zt(u=>u.selectedItemId),l=ir();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(ne.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),Wa=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=zt(u=>u.selectedItemId),l=ir();return f.useEffect(()=>{if(s.current&&a.current){let u=s.current,p=a.current,c,h=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let g=u.offsetHeight;p.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(c),h.unobserve(u)}}},[]),f.createElement(ne.div,{ref:mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},lo(e,u=>f.createElement("div",{ref:mt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),eb=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(vc,{open:n,onOpenChange:r},f.createElement(bc,{container:s},f.createElement(Ta,{"cmdk-overlay":"",className:o}),f.createElement(Pa,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(io,{ref:t,...i}))))}),$a=f.forwardRef((e,t)=>zt(n=>n.filtered.count===0)?f.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),tb=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(ne.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},lo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))});Object.assign(io,{List:Wa,Item:Ia,Input:Fa,Group:kc,Separator:Ec,Dialog:eb,Empty:$a,Loading:tb});function nb(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function rb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Dc(e){let t=f.useRef(e);return tn(()=>{t.current=e}),t}var tn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function Dn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function zt(e){let t=Aa(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Tc(e,t,n,r=[]){let o=f.useRef(),a=ir();return tn(()=>{var s;let i=(()=>{var u;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(u=p.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(En,i),o.current=i}),o}var ob=()=>{let[e,t]=f.useState(),n=Dn(()=>new Map);return tn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function ab(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function lo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(ab(t),{ref:t.ref},n(t.props.children)):n(t)}var sb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ib=["top","right","bottom","left"],Lt=Math.min,Ve=Math.max,co=Math.round,uo=Math.floor,bt=e=>({x:e,y:e}),lb={left:"right",right:"left",bottom:"top",top:"bottom"};function Ba(e,t,n){return Ve(e,Lt(t,n))}function Et(e,t){return typeof e=="function"?e(t):e}function Dt(e){return e.split("-")[0]}function Tn(e){return e.split("-")[1]}function za(e){return e==="x"?"y":"x"}function La(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ha(e){return za(yt(e))}function cb(e,t,n){n===void 0&&(n=!1);const r=Tn(e),o=Ha(e),a=La(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=fo(s)),[s,fo(s)]}function db(e){const t=fo(e);return[Va(e),t,Va(t)]}function Va(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Pc=["left","right"],Oc=["right","left"],ub=["top","bottom"],fb=["bottom","top"];function pb(e,t,n){switch(e){case"top":case"bottom":return n?t?Oc:Pc:t?Pc:Oc;case"left":case"right":return t?ub:fb;default:return[]}}function hb(e,t,n,r){const o=Tn(e);let a=pb(Dt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Va)))),a}function fo(e){const t=Dt(e);return lb[t]+e.slice(t.length)}function gb(e){return{top:0,right:0,bottom:0,left:0,...e}}function _c(e){return typeof e!="number"?gb(e):{top:e,right:e,bottom:e,left:e}}function po(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ac(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),s=Ha(t),i=La(s),l=Dt(t),u=a==="y",p=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:c};break;case"left":g={x:r.x-o.width,y:c};break;default:g={x:r.x,y:r.y}}switch(Tn(t)){case"start":g[s]-=h*(n&&u?-1:1);break;case"end":g[s]+=h*(n&&u?-1:1);break}return g}async function mb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:c="floating",altBoundary:h=!1,padding:g=0}=Et(t,e),w=_c(g),v=i[h?c==="floating"?"reference":"floating":c],y=po(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),b=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),N=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},M=po(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:x,strategy:l}):b);return{top:(y.top-M.top+w.top)/N.y,bottom:(M.bottom-y.bottom+w.bottom)/N.y,left:(y.left-M.left+w.left)/N.x,right:(M.right-y.right+w.right)/N.x}}const vb=50,bb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:mb},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:c}=Ac(u,r,l),h=r,g=0;const w={};for(let m=0;m<a.length;m++){const v=a[m];if(!v)continue;const{name:y,fn:b}=v,{x,y:N,data:M,reset:C}=await b({x:p,y:c,initialPlacement:r,placement:h,strategy:o,middlewareData:w,rects:u,platform:i,elements:{reference:e,floating:t}});p=x??p,c=N??c,w[y]={...w[y],...M},C&&g<vb&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:c}=Ac(u,h,l)),m=-1)}return{x:p,y:c,placement:h,strategy:o,middlewareData:w}},yb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=Et(e,t)||{};if(u==null)return{};const c=_c(p),h={x:n,y:r},g=Ha(o),w=La(g),m=await s.getDimensions(u),v=g==="y",y=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",N=a.reference[w]+a.reference[g]-h[g]-a.floating[w],M=h[g]-a.reference[g],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=C?C[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(C)))&&(k=i.floating[x]||a.floating[w]);const O=N/2-M/2,V=k/2-m[w]/2-1,$=Lt(c[y],V),U=Lt(c[b],V),B=$,q=k-m[w]-U,Y=k/2-m[w]/2+O,ae=Ba(B,Y,q),W=!l.arrow&&Tn(o)!=null&&Y!==ae&&a.reference[w]/2-(Y<B?$:U)-m[w]/2<0,K=W?Y<B?Y-B:Y-q:0;return{[g]:h[g]+K,data:{[g]:ae,centerOffset:Y-ae-K,...W&&{alignmentOffset:K}},reset:W}}}),wb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Et(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Dt(o),b=yt(i),x=Dt(i)===i,N=await(l.isRTL==null?void 0:l.isRTL(u.floating)),M=h||(x||!m?[fo(i)]:db(i)),C=w!=="none";!h&&C&&M.push(...hb(i,m,w,N));const k=[i,...M],O=await l.detectOverflow(t,v),V=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&V.push(O[y]),c){const Y=cb(o,s,N);V.push(O[Y[0]],O[Y[1]])}if($=[...$,{placement:o,overflows:V}],!V.every(Y=>Y<=0)){var U,B;const Y=(((U=a.flip)==null?void 0:U.index)||0)+1,ae=k[Y];if(ae&&(!(c==="alignment"?b!==yt(ae):!1)||$.every(G=>yt(G.placement)===b?G.overflows[0]>0:!0)))return{data:{index:Y,overflows:$},reset:{placement:ae}};let W=(B=$.filter(K=>K.overflows[0]<=0).sort((K,G)=>K.overflows[1]-G.overflows[1])[0])==null?void 0:B.placement;if(!W)switch(g){case"bestFit":{var q;const K=(q=$.filter(G=>{if(C){const _=yt(G.placement);return _===b||_==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(_=>_>0).reduce((_,Q)=>_+Q,0)]).sort((G,_)=>G[1]-_[1])[0])==null?void 0:q[0];K&&(W=K);break}case"initialPlacement":W=i;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Ic(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fc(e){return ib.some(t=>e[t]>=0)}const xb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Et(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ic(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fc(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ic(s,n.floating);return{data:{escapedOffsets:i,escaped:Fc(i)}}}default:return{}}}}},Wc=new Set(["left","top"]);async function Cb(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Dt(n),i=Tn(n),l=yt(n)==="y",u=Wc.has(s)?-1:1,p=a&&l?-1:1,c=Et(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),l?{x:g*p,y:h*u}:{x:h*u,y:g*p}}const Sb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Cb(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Nb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...u}=Et(e,t),p={x:n,y:r},c=await a.detectOverflow(t,u),h=yt(Dt(o)),g=za(h);let w=p[g],m=p[h];if(s){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",x=w+c[y],N=w-c[b];w=Ba(x,w,N)}if(i){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=m+c[y],N=m-c[b];m=Ba(x,m,N)}const v=l.fn({...t,[g]:w,[h]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:s,[h]:i}}}}}},Mb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Et(e,t),p={x:n,y:r},c=yt(o),h=za(c);let g=p[h],w=p[c];const m=Et(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",N=a.reference[h]-a.floating[x]+v.mainAxis,M=a.reference[h]+a.reference[x]-v.mainAxis;g<N?g=N:g>M&&(g=M)}if(u){var y,b;const x=h==="y"?"width":"height",N=Wc.has(Dt(o)),M=a.reference[c]-a.floating[x]+(N&&((y=s.offset)==null?void 0:y[c])||0)+(N?0:v.crossAxis),C=a.reference[c]+a.reference[x]+(N?0:((b=s.offset)==null?void 0:b[c])||0)-(N?v.crossAxis:0);w<M?w=M:w>C&&(w=C)}return{[h]:g,[c]:w}}}},kb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Et(e,t),p=await s.detectOverflow(t,u),c=Dt(o),h=Tn(o),g=yt(o)==="y",{width:w,height:m}=a.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=h==="end"?"top":"bottom");const b=m-p.top-p.bottom,x=w-p.left-p.right,N=Lt(m-p[v],b),M=Lt(w-p[y],x),C=!t.middlewareData.shift;let k=N,O=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=b),C&&!h){const $=Ve(p.left,0),U=Ve(p.right,0),B=Ve(p.top,0),q=Ve(p.bottom,0);g?O=w-2*($!==0||U!==0?$+U:Ve(p.left,p.right)):k=m-2*(B!==0||q!==0?B+q:Ve(p.top,p.bottom))}await l({...t,availableWidth:O,availableHeight:k});const V=await s.getDimensions(i.floating);return w!==V.width||m!==V.height?{reset:{rects:!0}}:{}}}};function ho(){return typeof window<"u"}function Pn(e){return $c(e)?(e.nodeName||"").toLowerCase():"#document"}function Ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wt(e){var t;return(t=($c(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $c(e){return ho()?e instanceof Node||e instanceof Ye(e).Node:!1}function st(e){return ho()?e instanceof Element||e instanceof Ye(e).Element:!1}function Tt(e){return ho()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function Bc(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}function lr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Eb(e){return/^(table|td|th)$/.test(Pn(e))}function go(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Db=/transform|translate|scale|rotate|perspective|filter/,Tb=/paint|layout|strict|content/,nn=e=>!!e&&e!=="none";let Ya;function Ga(e){const t=st(e)?it(e):e;return nn(t.transform)||nn(t.translate)||nn(t.scale)||nn(t.rotate)||nn(t.perspective)||!ja()&&(nn(t.backdropFilter)||nn(t.filter))||Db.test(t.willChange||"")||Tb.test(t.contain||"")}function Pb(e){let t=Ht(e);for(;Tt(t)&&!On(t);){if(Ga(t))return t;if(go(t))return null;t=Ht(t)}return null}function ja(){return Ya==null&&(Ya=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ya}function On(e){return/^(html|body|#document)$/.test(Pn(e))}function it(e){return Ye(e).getComputedStyle(e)}function mo(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ht(e){if(Pn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bc(e)&&e.host||wt(e);return Bc(t)?t.host:t}function zc(e){const t=Ht(e);return On(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&lr(t)?t:zc(t)}function cr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ye(o);if(a){const i=Ra(s);return t.concat(s,s.visualViewport||[],lr(o)?o:[],i&&n?cr(i):[])}else return t.concat(o,cr(o,[],n))}function Ra(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=co(n)!==a||co(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ua(e){return st(e)?e:e.contextElement}function _n(e){const t=Ua(e);if(!Tt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Lc(t);let s=(a?co(n.width):n.width)/r,i=(a?co(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Ob=bt(0);function Hc(e){const t=Ye(e);return!ja()||!t.visualViewport?Ob:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _b(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function rn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ua(e);let s=bt(1);t&&(r?st(r)&&(s=_n(r)):s=_n(e));const i=_b(a,n,r)?Hc(a):bt(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,p=o.width/s.x,c=o.height/s.y;if(a){const h=Ye(a),g=r&&st(r)?Ye(r):r;let w=h,m=Ra(w);for(;m&&r&&g!==w;){const v=_n(m),y=m.getBoundingClientRect(),b=it(m),x=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,N=y.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,c*=v.y,l+=x,u+=N,w=Ye(m),m=Ra(w)}}return po({width:p,height:c,x:l,y:u})}function vo(e,t){const n=mo(e).scrollLeft;return t?t.left+n:rn(wt(e)).left+n}function Vc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ab(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=wt(r),i=t?go(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=bt(1);const p=bt(0),c=Tt(r);if((c||!c&&!a)&&((Pn(r)!=="body"||lr(s))&&(l=mo(r)),c)){const g=rn(r);u=_n(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=s&&!c&&!a?Vc(s,l):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+h.x,y:n.y*u.y-l.scrollTop*u.y+p.y+h.y}}function Ib(e){return Array.from(e.getClientRects())}function Fb(e){const t=wt(e),n=mo(e),r=e.ownerDocument.body,o=Ve(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ve(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vo(e);const i=-n.scrollTop;return it(r).direction==="rtl"&&(s+=Ve(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Yc=25;function Wb(e,t){const n=Ye(e),r=wt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const p=ja();(!p||p&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const u=vo(r);if(u<=0){const p=r.ownerDocument,c=p.body,h=getComputedStyle(c),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(r.clientWidth-c.clientWidth-g);w<=Yc&&(a-=w)}else u<=Yc&&(a+=u);return{width:a,height:s,x:i,y:l}}function $b(e,t){const n=rn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Tt(e)?_n(e):bt(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function Gc(e,t,n){let r;if(t==="viewport")r=Wb(e,n);else if(t==="document")r=Fb(wt(e));else if(st(t))r=$b(t,n);else{const o=Hc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return po(r)}function jc(e,t){const n=Ht(e);return n===t||!st(n)||On(n)?!1:it(n).position==="fixed"||jc(n,t)}function Bb(e,t){const n=t.get(e);if(n)return n;let r=cr(e,[],!1).filter(i=>st(i)&&Pn(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?Ht(e):e;for(;st(s)&&!On(s);){const i=it(s),l=Ga(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||lr(s)&&!l&&jc(e,s))?r=r.filter(p=>p!==s):o=i,s=Ht(s)}return t.set(e,r),r}function zb(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?go(t)?[]:Bb(t,this._c):[].concat(n),r],i=Gc(t,s[0],o);let l=i.top,u=i.right,p=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const g=Gc(t,s[h],o);l=Ve(g.top,l),u=Lt(g.right,u),p=Lt(g.bottom,p),c=Ve(g.left,c)}return{width:u-c,height:p-l,x:c,y:l}}function Lb(e){const{width:t,height:n}=Lc(e);return{width:t,height:n}}function Hb(e,t,n){const r=Tt(t),o=wt(t),a=n==="fixed",s=rn(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=vo(o)}if(r||!r&&!a)if((Pn(t)!=="body"||lr(o))&&(i=mo(t)),r){const g=rn(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&u();a&&!r&&o&&u();const p=o&&!r&&!a?Vc(o,i):bt(0),c=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:c,y:h,width:s.width,height:s.height}}function Ka(e){return it(e).position==="static"}function Rc(e,t){if(!Tt(e)||it(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wt(e)===n&&(n=n.ownerDocument.body),n}function Uc(e,t){const n=Ye(e);if(go(e))return n;if(!Tt(e)){let o=Ht(e);for(;o&&!On(o);){if(st(o)&&!Ka(o))return o;o=Ht(o)}return n}let r=Rc(e,t);for(;r&&Eb(r)&&Ka(r);)r=Rc(r,t);return r&&On(r)&&Ka(r)&&!Ga(r)?n:r||Pb(e)||n}const Vb=async function(e){const t=this.getOffsetParent||Uc,n=this.getDimensions,r=await n(e.floating);return{reference:Hb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Yb(e){return it(e).direction==="rtl"}const Gb={convertOffsetParentRelativeRectToViewportRelativeRect:Ab,getDocumentElement:wt,getClippingRect:zb,getOffsetParent:Uc,getElementRects:Vb,getClientRects:Ib,getDimensions:Lb,getScale:_n,isElement:st,isRTL:Yb};function Kc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jb(e,t){let n=null,r;const o=wt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:p,top:c,width:h,height:g}=u;if(i||t(),!h||!g)return;const w=uo(c),m=uo(o.clientWidth-(p+h)),v=uo(o.clientHeight-(c+g)),y=uo(p),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Ve(0,Lt(1,l))||1};let N=!0;function M(C){const k=C[0].intersectionRatio;if(k!==l){if(!N)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!Kc(u,e.getBoundingClientRect())&&s(),N=!1}try{n=new IntersectionObserver(M,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(M,x)}n.observe(e)}return s(!0),a}function Rb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ua(e),p=o||a?[...u?cr(u):[],...t?cr(t):[]]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const c=u&&i?jb(u,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),u&&!l&&g.observe(u),t&&g.observe(t));let w,m=l?rn(e):null;l&&v();function v(){const y=rn(e);m&&!Kc(m,y)&&n(),m=y,w=requestAnimationFrame(v)}return n(),()=>{var y;p.forEach(b=>{o&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),c==null||c(),(y=g)==null||y.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const Ub=Sb,Kb=Nb,qb=wb,Xb=kb,Zb=xb,qc=yb,Qb=Mb,Jb=(e,t,n)=>{const r=new Map,o={platform:Gb,...n},a={...o.platform,_c:r};return bb(e,t,{...o,platform:a})};var ey=typeof document<"u",ty=function(){},bo=ey?S.useLayoutEffect:ty;function yo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!yo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Xc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zc(e,t){const n=Xc(e);return Math.round(t*n)/n}function qa(e){const t=f.useRef(e);return bo(()=>{t.current=e}),t}function ny(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=f.useState(r);yo(h,r)||g(r);const[w,m]=f.useState(null),[v,y]=f.useState(null),b=f.useCallback(G=>{G!==C.current&&(C.current=G,m(G))},[]),x=f.useCallback(G=>{G!==k.current&&(k.current=G,y(G))},[]),N=a||w,M=s||v,C=f.useRef(null),k=f.useRef(null),O=f.useRef(p),V=l!=null,$=qa(l),U=qa(o),B=qa(u),q=f.useCallback(()=>{if(!C.current||!k.current)return;const G={placement:t,strategy:n,middleware:h};U.current&&(G.platform=U.current),Jb(C.current,k.current,G).then(_=>{const Q={..._,isPositioned:B.current!==!1};Y.current&&!yo(O.current,Q)&&(O.current=Q,Vr.flushSync(()=>{c(Q)}))})},[h,t,n,U,B]);bo(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,c(G=>({...G,isPositioned:!1})))},[u]);const Y=f.useRef(!1);bo(()=>(Y.current=!0,()=>{Y.current=!1}),[]),bo(()=>{if(N&&(C.current=N),M&&(k.current=M),N&&M){if($.current)return $.current(N,M,q);q()}},[N,M,q,$,V]);const ae=f.useMemo(()=>({reference:C,floating:k,setReference:b,setFloating:x}),[b,x]),W=f.useMemo(()=>({reference:N,floating:M}),[N,M]),K=f.useMemo(()=>{const G={position:n,left:0,top:0};if(!W.floating)return G;const _=Zc(W.floating,p.x),Q=Zc(W.floating,p.y);return i?{...G,transform:"translate("+_+"px, "+Q+"px)",...Xc(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Q}},[n,i,W.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:q,refs:ae,elements:W,floatingStyles:K}),[p,q,ae,W,K])}const ry=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qc({element:r.current,padding:o}).fn(n):{}:r?qc({element:r,padding:o}).fn(n):{}}}},oy=(e,t)=>{const n=Ub(e);return{name:n.name,fn:n.fn,options:[e,t]}},ay=(e,t)=>{const n=Kb(e);return{name:n.name,fn:n.fn,options:[e,t]}},sy=(e,t)=>({fn:Qb(e).fn,options:[e,t]}),iy=(e,t)=>{const n=qb(e);return{name:n.name,fn:n.fn,options:[e,t]}},ly=(e,t)=>{const n=Xb(e);return{name:n.name,fn:n.fn,options:[e,t]}},cy=(e,t)=>{const n=Zb(e);return{name:n.name,fn:n.fn,options:[e,t]}},dy=(e,t)=>{const n=ry(e);return{name:n.name,fn:n.fn,options:[e,t]}};var uy="Arrow",Qc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(ne.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qc.displayName=uy;var fy=Qc;function py(e){const[t,n]=f.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Xa="Popper",[Jc,Vt]=Ze(Xa),[hy,ed]=Jc(Xa),td=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(hy,{scope:t,anchor:r,onAnchorChange:o,children:n})};td.displayName=Xa;var nd="PopperAnchor",rd=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=ed(nd,n),s=f.useRef(null),i=he(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:d.jsx(ne.div,{...o,ref:i})});rd.displayName=nd;var Za="PopperContent",[gy,my]=Jc(Za),od=f.forwardRef((e,t)=>{var I,R,X,se,de,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=ed(Za,n),[y,b]=f.useState(null),x=he(t,ke=>b(ke)),[N,M]=f.useState(null),C=py(N),k=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,V=r+(a!=="center"?"-"+a:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},U=Array.isArray(u)?u:[u],B=U.length>0,q={padding:$,boundary:U.filter(by),altBoundary:B},{refs:Y,floatingStyles:ae,placement:W,isPositioned:K,middlewareData:G}=ny({strategy:"fixed",placement:V,whileElementsMounted:(...ke)=>Rb(...ke,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[oy({mainAxis:o+O,alignmentAxis:s}),l&&ay({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?sy():void 0,...q}),l&&iy({...q}),ly({...q,apply:({elements:ke,rects:De,availableWidth:tt,availableHeight:Re})=>{const{width:Fe,height:Kt}=De.reference,Ee=ke.floating.style;Ee.setProperty("--radix-popper-available-width",`${tt}px`),Ee.setProperty("--radix-popper-available-height",`${Re}px`),Ee.setProperty("--radix-popper-anchor-width",`${Fe}px`),Ee.setProperty("--radix-popper-anchor-height",`${Kt}px`)}}),N&&dy({element:N,padding:i}),yy({arrowWidth:k,arrowHeight:O}),h&&cy({strategy:"referenceHidden",...q})]}),[_,Q]=id(W),oe=ot(w);Pe(()=>{K&&(oe==null||oe())},[K,oe]);const P=(I=G.arrow)==null?void 0:I.x,A=(R=G.arrow)==null?void 0:R.y,H=((X=G.arrow)==null?void 0:X.centerOffset)!==0,[F,Z]=f.useState();return Pe(()=>{y&&Z(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:K?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[(se=G.transformOrigin)==null?void 0:se.x,(de=G.transformOrigin)==null?void 0:de.y].join(" "),...((ce=G.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(gy,{scope:n,placedSide:_,onArrowChange:M,arrowX:P,arrowY:A,shouldHideArrow:H,children:d.jsx(ne.div,{"data-side":_,"data-align":Q,...m,ref:x,style:{...m.style,animation:K?void 0:"none"}})})})});od.displayName=Za;var ad="PopperArrow",vy={top:"bottom",right:"left",bottom:"top",left:"right"},sd=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=my(ad,r),s=vy[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(fy,{...o,ref:n,style:{...o.style,display:"block"}})})});sd.displayName=ad;function by(e){return e!==null}var yy=e=>({name:"transformOrigin",options:e,fn(t){var v,y,b;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,p]=id(n),c={start:"0%",center:"50%",end:"100%"}[p],h=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,g=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let w="",m="";return u==="bottom"?(w=s?c:`${h}px`,m=`${-l}px`):u==="top"?(w=s?c:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(w=`${-l}px`,m=s?c:`${g}px`):u==="left"&&(w=`${r.floating.width+l}px`,m=s?c:`${g}px`),{data:{x:w,y:m}}}});function id(e){const[t,n="center"]=e.split("-");return[t,n]}var dr=td,ur=rd,wo=od,xo=sd,Co="Popover",[ld]=Ze(Co,[Vt]),fr=Vt(),[wy,Yt]=ld(Co),cd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=fr(t),l=f.useRef(null),[u,p]=f.useState(!1),[c,h]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:Co});return d.jsx(dr,{...i,children:d.jsx(wy,{scope:t,contentId:we(),triggerRef:l,open:c,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>p(!0),[]),onCustomAnchorRemove:f.useCallback(()=>p(!1),[]),modal:s,children:n})})};cd.displayName=Co;var dd="PopoverAnchor",ud=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(dd,n),a=fr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),d.jsx(ur,{...a,...r,ref:t})});ud.displayName=dd;var fd="PopoverTrigger",pd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(fd,n),a=fr(n),s=he(t,o.triggerRef),i=d.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yd(o.open),...r,ref:s,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(ur,{asChild:!0,...a,children:i})});pd.displayName=fd;var Qa="PopoverPortal",[xy,Cy]=ld(Qa,{forceMount:void 0}),hd=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Yt(Qa,t);return d.jsx(xy,{scope:t,forceMount:n,children:d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:r})})})};hd.displayName=Qa;var An="PopoverContent",gd=f.forwardRef((e,t)=>{const n=Cy(An,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Yt(An,e.__scopePopover);return d.jsx(Be,{present:r||a.open,children:a.modal?d.jsx(Ny,{...o,ref:t}):d.jsx(My,{...o,ref:t})})});gd.displayName=An;var Sy=Qt("PopoverContent.RemoveScroll"),Ny=f.forwardRef((e,t)=>{const n=Yt(An,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return oo(s)},[]),d.jsx(ar,{as:Sy,allowPinchZoom:!0,children:d.jsx(md,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),My=f.forwardRef((e,t)=>{const n=Yt(An,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(md,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),md=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:p,...c}=e,h=Yt(An,n),g=fr(n);return Xr(),d.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:d.jsx(wo,{"data-state":yd(h.open),role:"dialog",id:h.contentId,...g,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),vd="PopoverClose",bd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Yt(vd,n);return d.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});bd.displayName=vd;var ky="PopoverArrow",Ey=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=fr(n);return d.jsx(xo,{...o,...r,ref:t})});Ey.displayName=ky;function yd(e){return e?"open":"closed"}var Dy=cd,Ty=ud,Py=pd,Oy=hd,wd=gd,_y=bd;const In=Dy,So=Py,Ay=_y,Iy=Ty,on=f.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>d.jsx(Oy,{children:d.jsx(wd,{ref:o,align:t,sideOffset:n,className:D("z-50 rounded-lg ring-1 ring-border/60 bg-background p-4 shadow-md outline-none","origin-(--radix-popover-content-transform-origin)","data-[state=open]:animate-popover-in","data-[state=closed]:animate-popover-out",e),...r})}));on.displayName=wd.displayName;const xd=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>d.jsxs(In,{...s,children:[d.jsx(So,{asChild:!0,children:t}),d.jsx(on,{side:n,align:r,sideOffset:o,className:a,children:e})]});xd.displayName="Popover";const Cd=Me(["w-full flex items-center justify-between gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Ja=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>d.jsxs("button",{ref:s,type:"button",className:D(Cd({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[d.jsx("span",{className:D("truncate",!o&&"text-muted-foreground"),children:o??r}),d.jsx(Jt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})]}));Ja.displayName="ComboBoxTrigger";const Sd=f.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>d.jsx(on,{ref:s,className:D("w-[var(--radix-popover-trigger-width)] p-0",e),align:a,sideOffset:4,children:d.jsxs(io,{className:"w-full",value:r,onValueChange:o,children:[d.jsx("div",{className:"border-b border-border",children:d.jsx(Fa,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),d.jsx(Wa,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));Sd.displayName="ComboBoxContent";const Nd=f.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>d.jsxs(Ia,{ref:a,className:D("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),onSelect:r,...o,children:[d.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:n&&d.jsx(er,{className:"size-4","aria-hidden":"true"})}),t]}));Nd.displayName="ComboBoxItem";const Md=f.forwardRef(({className:e,children:t,...n},r)=>d.jsx($a,{ref:r,className:D("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));Md.displayName="ComboBoxEmpty";const kd=f.forwardRef(({className:e,heading:t,children:n,...r},o)=>d.jsx(kc,{ref:o,heading:t,className:D("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground",e),...r,children:n}));kd.displayName="ComboBoxGroup";const Ed=f.forwardRef(({className:e,...t},n)=>d.jsx(Ec,{ref:n,className:D("-mx-1 my-1 h-px bg-border",e),...t}));Ed.displayName="ComboBoxSeparator";const Dd=In;Dd.displayName="ComboBoxRoot";const Td=f.forwardRef(({options:e,value:t,onValueChange:n,placeholder:r="Select…",searchPlaceholder:o="Search…",emptyMessage:a="No results found.",size:s,isError:i,disabled:l,className:u},p)=>{const[c,h]=f.useState(!1),[g,w]=f.useState(""),m=f.useMemo(()=>{var y;return(y=e.find(b=>b.value===t))==null?void 0:y.label},[e,t]);function v(y){h(y),y||w("")}return d.jsxs(In,{open:c,onOpenChange:v,children:[d.jsx(So,{asChild:!0,children:d.jsx(Ja,{ref:p,size:s,isError:i,disabled:l,className:u,placeholder:r,"aria-expanded":c,"aria-haspopup":"listbox",children:m})}),d.jsx(on,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:d.jsxs(io,{className:"w-full",children:[d.jsx("div",{className:"border-b border-border",children:d.jsx(Fa,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:o,value:g,onValueChange:w})}),d.jsxs(Wa,{className:"max-h-60 overflow-y-auto p-1",children:[d.jsx($a,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(y=>d.jsxs(Ia,{value:y.label,disabled:y.disabled,className:D("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"),onSelect:()=>{n==null||n(y.value),h(!1)},children:[d.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:t===y.value&&d.jsx(er,{className:"size-4","aria-hidden":"true"})}),y.label]},y.value))]})]})})]})});Td.displayName="ComboBox";const Fy=new Set(["contains","equals","startsWith","endsWith","notContains","empty","notEmpty"]);function es(e){return Fy.has(e)}const ts=[{value:"contains",label:"Contains"},{value:"equals",label:"Equals"},{value:"startsWith",label:"Starts with"},{value:"endsWith",label:"Ends with"},{value:"notContains",label:"Does not contain"},{value:"empty",label:"Is empty"},{value:"notEmpty",label:"Is not empty"}];function Wy(e,t){const n=e.getValue(t);return n==null?"":typeof n=="string"?n:String(n)}const ns=(e,t,n,r)=>{const o=Wy(e,t).toLowerCase();if(n==null||n==="")return!0;if(typeof n=="string"){const u=n.trim().toLowerCase();return u===""||o.includes(u)}if(typeof n!="object"||n===null)return!0;const a=n,s=a.op,i=typeof a.value=="string"?a.value:"";if(!s||!es(s))return!0;const l=i.trim().toLowerCase();switch(s){case"empty":return o.trim()==="";case"notEmpty":return o.trim()!=="";case"contains":return l===""||o.includes(l);case"equals":return l===""?!0:o===l;case"startsWith":return l===""||o.startsWith(l);case"endsWith":return l===""||o.endsWith(l);case"notContains":return l===""?!0:!o.includes(l);default:return!0}};function $y(e){if(e==null||e==="")return{op:"contains",value:""};if(typeof e=="string")return{op:"contains",value:e};if(typeof e=="object"&&e!==null&&"op"in e){const t=e;if(es(t.op))return{op:t.op,value:t.value??""}}return{op:"contains",value:""}}function By(e){if(!(e.op==="contains"&&e.value.trim()===""))return e}const rs=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{className:"w-full min-w-0",children:d.jsx("table",{ref:n,className:D("w-full caption-bottom text-sm",e),...t})}));rs.displayName="Table";const os=f.forwardRef(({className:e,...t},n)=>d.jsx("thead",{ref:n,className:D("[&_tr]:border-b [&_tr]:border-border",e),...t}));os.displayName="TableHeader";const as=f.forwardRef(({className:e,...t},n)=>d.jsx("tbody",{ref:n,className:D("[&_tr:last-child]:border-0",e),...t}));as.displayName="TableBody";const ss=f.forwardRef(({className:e,...t},n)=>d.jsx("tfoot",{ref:n,className:D("border-t border-border bg-muted/50 font-medium","[&>tr]:last:border-b-0",e),...t}));ss.displayName="TableFooter";const Pt=f.forwardRef(({className:e,...t},n)=>d.jsx("tr",{ref:n,className:D("border-b border-border","transition-[background-color] duration-100","hover:bg-muted/50","data-[selected=true]:bg-muted",e),...t}));Pt.displayName="TableRow";const No=f.forwardRef(({className:e,...t},n)=>d.jsx("th",{ref:n,className:D("h-10 px-4 text-left align-middle","text-xs font-medium text-muted-foreground uppercase tracking-wide","whitespace-nowrap","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));No.displayName="TableHead";const an=f.forwardRef(({className:e,...t},n)=>d.jsx("td",{ref:n,className:D("px-4 py-3 align-middle","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));an.displayName="TableCell";const Pd=f.forwardRef(({className:e,...t},n)=>d.jsx("caption",{ref:n,className:D("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Pd.displayName="TableCaption";const is=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:D("animate-pulse rounded-md bg-muted",e),...t}));is.displayName="Skeleton";const Od=f.createContext({inGroup:!1}),_d=Me(["w-full rounded-md border border-input bg-background","font-body text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default","[&_svg]:pointer-events-none"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),pr=f.forwardRef(({className:e,size:t,isError:n,icon:r,iconPosition:o="left",...a},s)=>{const{inGroup:i}=f.use(Od);return d.jsxs("div",{className:"relative w-full",children:[r&&o==="left"&&d.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r}),d.jsx("input",{ref:s,className:D(_d({size:t}),i&&"border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0",n&&"border-destructive focus-visible:ring-destructive",r&&o==="left"&&"pl-9",r&&o==="right"&&"pr-9",e),"aria-invalid":n||void 0,...a}),r&&o==="right"&&d.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r})]})});pr.displayName="Input";const ls=f.forwardRef(({className:e,isError:t,children:n,...r},o)=>d.jsx(Od,{value:{inGroup:!0,isError:t},children:d.jsx("div",{ref:o,"aria-invalid":t||void 0,className:D("flex items-stretch overflow-hidden","rounded-md border border-input bg-background","divide-x divide-border","transition-[color,border-color,box-shadow]","focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background","has-[input:disabled]:opacity-50 has-[input:disabled]:pointer-events-none",t&&"border-destructive focus-within:ring-destructive",e),...r,children:n})}));ls.displayName="InputGroup";const cs=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:D("flex shrink-0 items-center px-3","bg-muted text-muted-foreground text-sm select-none",e),...t}));cs.displayName="InputAddon";const ds=f.forwardRef(({className:e,...t},n)=>d.jsx("nav",{ref:n,"aria-label":"Pagination",className:D("flex items-center gap-1",e),...t}));ds.displayName="PaginationRoot";const us=["inline-flex items-center justify-center","size-10 rounded-md text-sm font-ui font-medium select-none tabular-nums","transition-[color,background-color,box-shadow] duration-150","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"].join(" "),fs=f.forwardRef(({className:e,isActive:t,...n},r)=>d.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:D(us,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));fs.displayName="PaginationItem";const ps=f.forwardRef(({className:e,...t},n)=>d.jsx("button",{ref:n,"aria-label":"Previous page",className:D(us,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:d.jsx(Qi,{className:"size-4"})}));ps.displayName="PaginationPrev";const hs=f.forwardRef(({className:e,...t},n)=>d.jsx("button",{ref:n,"aria-label":"Next page",className:D(us,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:d.jsx(vn,{className:"size-4"})}));hs.displayName="PaginationNext";const gs=({className:e,...t})=>d.jsx("span",{"aria-hidden":"true",className:D("inline-flex size-9 items-center justify-center text-muted-foreground",e),...t,children:d.jsx(Og,{className:"size-4"})});gs.displayName="PaginationEllipsis";function zy(e,t,n){const r=Math.max(e-n,1),o=Math.min(e+n,t),a=r>2,s=o<t-1;if(!a&&!s)return Array.from({length:t},(i,l)=>l+1);if(!a){const i=3+2*n;return i>=t?Array.from({length:t},(l,u)=>u+1):[...Array.from({length:i},(l,u)=>u+1),"ellipsis-right",t]}if(!s){const i=3+2*n,l=t-i+1;return l<=1?Array.from({length:t},(u,p)=>p+1):[1,"ellipsis-left",...Array.from({length:i},(u,p)=>l+p)]}return[1,"ellipsis-left",...Array.from({length:o-r+1},(i,l)=>r+l),"ellipsis-right",t]}const ms=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=zy(e,t,r);return d.jsxs(ds,{className:o,...a,children:[d.jsx(ps,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?d.jsx(gs,{},i):d.jsx(fs,{isActive:i===e,onClick:()=>n(i),children:i},i)),d.jsx(hs,{onClick:()=>n(e+1),disabled:e>=t})]})};ms.displayName="Pagination";function Ad(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ly(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Id=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hy="VisuallyHidden",Fd=f.forwardRef((e,t)=>d.jsx(ne.span,{...e,ref:t,style:{...Id,...e.style}}));Fd.displayName=Hy;var Vy=Fd,Yy=[" ","Enter","ArrowUp","ArrowDown"],Gy=[" ","Enter"],sn="Select",[Mo,ko,jy]=Yr(sn),[Fn]=Ze(sn,[jy,Vt]),Eo=Vt(),[Ry,Gt]=Fn(sn),[Uy,Ky]=Fn(sn),Wd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:c,disabled:h,required:g,form:w}=e,m=Eo(t),[v,y]=f.useState(null),[b,x]=f.useState(null),[N,M]=f.useState(!1),C=Jn(u),[k,O]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:sn}),[V,$]=Qe({prop:s,defaultProp:i,onChange:l,caller:sn}),U=f.useRef(null),B=v?w||!!v.closest("form"):!0,[q,Y]=f.useState(new Set),ae=Array.from(q).map(W=>W.props.value).join(";");return d.jsx(dr,{...m,children:d.jsxs(Ry,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:M,contentId:we(),value:V,onValueChange:$,open:k,onOpenChange:O,dir:C,triggerPointerDownPosRef:U,disabled:h,children:[d.jsx(Mo.Provider,{scope:t,children:d.jsx(Uy,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(W=>{Y(K=>new Set(K).add(W))},[]),onNativeOptionRemove:f.useCallback(W=>{Y(K=>{const G=new Set(K);return G.delete(W),G})},[]),children:n})}),B?d.jsxs(su,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:c,value:V,onChange:W=>$(W.target.value),disabled:h,form:w,children:[V===void 0?d.jsx("option",{value:""}):null,Array.from(q)]},ae):null]})})};Wd.displayName=sn;var $d="SelectTrigger",Bd=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Eo(n),s=Gt($d,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=ko(n),p=f.useRef("touch"),[c,h,g]=lu(m=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),b=cu(v,m,y);b!==void 0&&s.onValueChange(b.value)}),w=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(ur,{asChild:!0,...a,children:d.jsx(ne.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":iu(s.value)?"":void 0,...o,ref:l,onClick:j(o.onClick,m=>{m.currentTarget.focus(),p.current!=="mouse"&&w(m)}),onPointerDown:j(o.onPointerDown,m=>{p.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:j(o.onKeyDown,m=>{const v=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Yy.includes(m.key)&&(w(),m.preventDefault())})})})});Bd.displayName=$d;var zd="SelectValue",Ld=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Gt(zd,n),{onValueNodeHasChildrenChange:u}=l,p=a!==void 0,c=he(t,l.onValueNodeChange);return Pe(()=>{u(p)},[u,p]),d.jsx(ne.span,{...i,ref:c,style:{pointerEvents:"none"},children:iu(l.value)?d.jsx(d.Fragment,{children:s}):a})});Ld.displayName=zd;var qy="SelectIcon",Xy=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Xy.displayName=qy;var Zy="SelectPortal",Hd=e=>d.jsx(Cn,{asChild:!0,...e});Hd.displayName=Zy;var ln="SelectContent",Vd=f.forwardRef((e,t)=>{const n=Gt(ln,e.__scopeSelect),[r,o]=f.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Vr.createPortal(d.jsx(Yd,{scope:e.__scopeSelect,children:d.jsx(Mo.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(Gd,{...e,ref:t})});Vd.displayName=ln;var lt=10,[Yd,jt]=Fn(ln),Qy="SelectContentImpl",Jy=Qt("SelectContent.RemoveScroll"),Gd=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,b=Gt(ln,n),[x,N]=f.useState(null),[M,C]=f.useState(null),k=he(t,I=>N(I)),[O,V]=f.useState(null),[$,U]=f.useState(null),B=ko(n),[q,Y]=f.useState(!1),ae=f.useRef(!1);f.useEffect(()=>{if(x)return oo(x)},[x]),Xr();const W=f.useCallback(I=>{const[R,...X]=B().map(ce=>ce.ref.current),[se]=X.slice(-1),de=document.activeElement;for(const ce of I)if(ce===de||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===R&&M&&(M.scrollTop=0),ce===se&&M&&(M.scrollTop=M.scrollHeight),ce==null||ce.focus(),document.activeElement!==de))return},[B,M]),K=f.useCallback(()=>W([O,x]),[W,O,x]);f.useEffect(()=>{q&&K()},[q,K]);const{onOpenChange:G,triggerPointerDownPosRef:_}=b;f.useEffect(()=>{if(x){let I={x:0,y:0};const R=se=>{var de,ce;I={x:Math.abs(Math.round(se.pageX)-(((de=_.current)==null?void 0:de.x)??0)),y:Math.abs(Math.round(se.pageY)-(((ce=_.current)==null?void 0:ce.y)??0))}},X=se=>{I.x<=10&&I.y<=10?se.preventDefault():x.contains(se.target)||G(!1),document.removeEventListener("pointermove",R),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,G,_]),f.useEffect(()=>{const I=()=>G(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[G]);const[Q,oe]=lu(I=>{const R=B().filter(de=>!de.disabled),X=R.find(de=>de.ref.current===document.activeElement),se=cu(R,I,X);se&&setTimeout(()=>se.ref.current.focus())}),P=f.useCallback((I,R,X)=>{const se=!ae.current&&!X;(b.value!==void 0&&b.value===R||se)&&(V(I),se&&(ae.current=!0))},[b.value]),A=f.useCallback(()=>x==null?void 0:x.focus(),[x]),H=f.useCallback((I,R,X)=>{const se=!ae.current&&!X;(b.value!==void 0&&b.value===R||se)&&U(I)},[b.value]),F=r==="popper"?vs:jd,Z=F===vs?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return d.jsx(Yd,{scope:n,content:x,viewport:M,onViewportChange:C,itemRefCallback:P,selectedItem:O,onItemLeave:A,itemTextRefCallback:H,focusSelectedItem:K,selectedItemText:$,position:r,isPositioned:q,searchRef:Q,children:d.jsx(ar,{as:Jy,allowPinchZoom:!0,children:d.jsx(or,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:j(o,I=>{var R;(R=b.trigger)==null||R.focus({preventScroll:!0}),I.preventDefault()}),children:d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:d.jsx(F,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...Z,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:j(y.onKeyDown,I=>{const R=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!R&&I.key.length===1&&oe(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let se=B().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(I.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const de=I.target,ce=se.indexOf(de);se=se.slice(ce+1)}setTimeout(()=>W(se)),I.preventDefault()}})})})})})})});Gd.displayName=Qy;var ew="SelectItemAlignedPosition",jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Gt(ln,n),s=jt(ln,n),[i,l]=f.useState(null),[u,p]=f.useState(null),c=he(t,k=>p(k)),h=ko(n),g=f.useRef(!1),w=f.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&m&&v&&y){const k=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),V=a.valueNode.getBoundingClientRect(),$=y.getBoundingClientRect();if(a.dir!=="rtl"){const de=$.left-O.left,ce=V.left-de,ke=k.left-ce,De=k.width+ke,tt=Math.max(De,O.width),Re=window.innerWidth-lt,Fe=Ad(ce,[lt,Math.max(lt,Re-tt)]);i.style.minWidth=De+"px",i.style.left=Fe+"px"}else{const de=O.right-$.right,ce=window.innerWidth-V.right-de,ke=window.innerWidth-k.right-ce,De=k.width+ke,tt=Math.max(De,O.width),Re=window.innerWidth-lt,Fe=Ad(ce,[lt,Math.max(lt,Re-tt)]);i.style.minWidth=De+"px",i.style.right=Fe+"px"}const U=h(),B=window.innerHeight-lt*2,q=m.scrollHeight,Y=window.getComputedStyle(u),ae=parseInt(Y.borderTopWidth,10),W=parseInt(Y.paddingTop,10),K=parseInt(Y.borderBottomWidth,10),G=parseInt(Y.paddingBottom,10),_=ae+W+q+G+K,Q=Math.min(v.offsetHeight*5,_),oe=window.getComputedStyle(m),P=parseInt(oe.paddingTop,10),A=parseInt(oe.paddingBottom,10),H=k.top+k.height/2-lt,F=B-H,Z=v.offsetHeight/2,I=v.offsetTop+Z,R=ae+W+I,X=_-R;if(R<=H){const de=U.length>0&&v===U[U.length-1].ref.current;i.style.bottom="0px";const ce=u.clientHeight-m.offsetTop-m.offsetHeight,ke=Math.max(F,Z+(de?A:0)+ce+K),De=R+ke;i.style.height=De+"px"}else{const de=U.length>0&&v===U[0].ref.current;i.style.top="0px";const ke=Math.max(H,ae+m.offsetTop+(de?P:0)+Z)+X;i.style.height=ke+"px",m.scrollTop=R-H+m.offsetTop}i.style.margin=`${lt}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,y,a.dir,r]);Pe(()=>x(),[x]);const[N,M]=f.useState();Pe(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(k=>{k&&w.current===!0&&(x(),b==null||b(),w.current=!1)},[x,b]);return d.jsx(nw,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:d.jsx(ne.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});jd.displayName=ew;var tw="SelectPopperPosition",vs=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...a}=e,s=Eo(n);return d.jsx(wo,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});vs.displayName=tw;var[nw,bs]=Fn(ln,{}),ys="SelectViewport",Rd=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=jt(ys,n),s=bs(ys,n),i=he(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(Mo.Slot,{scope:n,children:d.jsx(ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:j(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const g=Math.abs(l.current-p.scrollTop);if(g>0){const w=window.innerHeight-lt*2,m=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),y=Math.max(m,v);if(y<w){const b=y+g,x=Math.min(w,b),N=b-x;c.style.height=x+"px",c.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,c.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});Rd.displayName=ys;var Ud="SelectGroup",[rw,ow]=Fn(Ud),Kd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=we();return d.jsx(rw,{scope:n,id:o,children:d.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Kd.displayName=Ud;var qd="SelectLabel",Xd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ow(qd,n);return d.jsx(ne.div,{id:o.id,...r,ref:t})});Xd.displayName=qd;var Do="SelectItem",[aw,Zd]=Fn(Do),Qd=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Gt(Do,n),l=jt(Do,n),u=i.value===r,[p,c]=f.useState(a??""),[h,g]=f.useState(!1),w=he(t,b=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,b,r,o)}),m=we(),v=f.useRef("touch"),y=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(aw,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:f.useCallback(b=>{c(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:d.jsx(Mo.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:d.jsx(ne.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:j(s.onFocus,()=>g(!0)),onBlur:j(s.onBlur,()=>g(!1)),onClick:j(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:j(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:j(s.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:j(s.onPointerMove,b=>{var x;v.current=b.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(s.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:j(s.onKeyDown,b=>{var N;((N=l.searchRef)==null?void 0:N.current)!==""&&b.key===" "||(Gy.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});Qd.displayName=Do;var hr="SelectItemText",Jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Gt(hr,n),i=jt(hr,n),l=Zd(hr,n),u=Ky(hr,n),[p,c]=f.useState(null),h=he(t,y=>c(y),l.onItemTextChange,y=>{var b;return(b=i.itemTextRefCallback)==null?void 0:b.call(i,y,l.value,l.disabled)}),g=p==null?void 0:p.textContent,w=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return Pe(()=>(m(w),()=>v(w)),[m,v,w]),d.jsxs(d.Fragment,{children:[d.jsx(ne.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Vr.createPortal(a.children,s.valueNode):null]})});Jd.displayName=hr;var eu="SelectItemIndicator",tu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Zd(eu,n).isSelected?d.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});tu.displayName=eu;var ws="SelectScrollUpButton",nu=f.forwardRef((e,t)=>{const n=jt(ws,e.__scopeSelect),r=bs(ws,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(ou,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});nu.displayName=ws;var xs="SelectScrollDownButton",ru=f.forwardRef((e,t)=>{const n=jt(xs,e.__scopeSelect),r=bs(xs,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;a(p)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(ou,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ru.displayName=xs;var ou=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=jt("SelectScrollButton",n),s=f.useRef(null),i=ko(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Pe(()=>{var p;const u=i().find(c=>c.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),d.jsx(ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:j(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:j(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{l()})})}),sw="SelectSeparator",au=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});au.displayName=sw;var Cs="SelectArrow",iw=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Eo(n),a=Gt(Cs,n),s=jt(Cs,n);return a.open&&s.position==="popper"?d.jsx(xo,{...o,...r,ref:t}):null});iw.displayName=Cs;var lw="SelectBubbleInput",su=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=Ly(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&p){const c=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(ne.select,{...n,style:{...Id,...n.style},ref:a,defaultValue:t})});su.displayName=lw;function iu(e){return e===""||e===void 0}function lu(e){const t=ot(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function cu(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=cw(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function cw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dw=Wd,du=Bd,uw=Ld,fw=Hd,uu=Vd,pw=Rd,hw=Kd,fu=Xd,pu=Qd,gw=Jd,mw=tu,hu=nu,gu=ru,mu=au;const vu=Me(["w-full flex items-center justify-between gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-muted-foreground"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Ss=dw,vw=hw,Ns=uw,To=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>d.jsxs(du,{ref:a,className:D("group",vu({size:t,isError:n}),e),"aria-invalid":n||void 0,...o,children:[r,d.jsx(Jt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-150 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));To.displayName=du.displayName;const Ms=f.forwardRef(({className:e,...t},n)=>d.jsx(hu,{ref:n,className:D("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:d.jsx(sa,{className:"size-4"})}));Ms.displayName=hu.displayName;const ks=f.forwardRef(({className:e,...t},n)=>d.jsx(gu,{ref:n,className:D("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:d.jsx(Jt,{className:"size-4"})}));ks.displayName=gu.displayName;const Po=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(fw,{children:d.jsxs(uu,{ref:o,position:n,sideOffset:4,className:D("z-50 min-w-32 overflow-hidden rounded-lg ring-1 ring-border/60 bg-background text-foreground shadow-md","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",n==="popper"&&["data-[side=bottom]:translate-y-1","data-[side=top]:-translate-y-1"],e),...r,children:[d.jsx(Ms,{}),d.jsx(pw,{className:"p-1",children:t}),d.jsx(ks,{})]})}));Po.displayName=uu.displayName;const bu=f.forwardRef(({className:e,...t},n)=>d.jsx(fu,{ref:n,className:D("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));bu.displayName=fu.displayName;const Es=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(pu,{ref:r,className:D("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm","outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:d.jsx(mw,{children:d.jsx(er,{className:"size-4"})})}),d.jsx(gw,{children:t})]}));Es.displayName=pu.displayName;const yu=f.forwardRef(({className:e,...t},n)=>d.jsx(mu,{ref:n,className:D("-mx-1 my-1 h-px bg-border",e),...t}));yu.displayName=mu.displayName;const wu=f.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>d.jsxs(Ss,{disabled:r,...s,children:[d.jsx(To,{ref:i,size:t,isError:n,className:o,children:d.jsx(Ns,{placeholder:e})}),d.jsx(Po,{children:a})]}));wu.displayName="Select";var Ds="rovingFocusGroup.onEntryFocus",bw={bubbles:!1,cancelable:!0},gr="RovingFocusGroup",[Ts,xu,yw]=Yr(gr),[ww,Oo]=Ze(gr,[yw]),[xw,Cw]=ww(gr),Cu=f.forwardRef((e,t)=>d.jsx(Ts.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Ts.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Sw,{...e,ref:t})})}));Cu.displayName=gr;var Sw=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...c}=e,h=f.useRef(null),g=he(t,h),w=Jn(a),[m,v]=Qe({prop:s,defaultProp:i??null,onChange:l,caller:gr}),[y,b]=f.useState(!1),x=ot(u),N=xu(n),M=f.useRef(!1),[C,k]=f.useState(0);return f.useEffect(()=>{const O=h.current;if(O)return O.addEventListener(Ds,x),()=>O.removeEventListener(Ds,x)},[x]),d.jsx(xw,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(O=>v(O),[v]),onItemShiftTab:f.useCallback(()=>b(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(O=>O+1),[]),onFocusableItemRemove:f.useCallback(()=>k(O=>O-1),[]),children:d.jsx(ne.div,{tabIndex:y||C===0?-1:0,"data-orientation":r,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{M.current=!0}),onFocus:j(e.onFocus,O=>{const V=!M.current;if(O.target===O.currentTarget&&V&&!y){const $=new CustomEvent(Ds,bw);if(O.currentTarget.dispatchEvent($),!$.defaultPrevented){const U=N().filter(W=>W.focusable),B=U.find(W=>W.active),q=U.find(W=>W.id===m),ae=[B,q,...U].filter(Boolean).map(W=>W.ref.current);Mu(ae,p)}}M.current=!1}),onBlur:j(e.onBlur,()=>b(!1))})})}),Su="RovingFocusGroupItem",Nu=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=we(),u=a||l,p=Cw(Su,n),c=p.currentTabStopId===u,h=xu(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=p;return f.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),d.jsx(Ts.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(ne.span,{tabIndex:c?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:j(e.onMouseDown,v=>{r?p.onItemFocus(u):v.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:j(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=kw(v,p.orientation,p.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=h().filter(N=>N.focusable).map(N=>N.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const N=x.indexOf(v.currentTarget);x=p.loop?Ew(x,N+1):x.slice(N+1)}setTimeout(()=>Mu(x))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:m!=null}):s})})});Nu.displayName=Su;var Nw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kw(e,t,n){const r=Mw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Nw[r]}function Mu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ew(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ku=Cu,Eu=Nu,Ps=["Enter"," "],Dw=["ArrowDown","PageUp","Home"],Du=["ArrowUp","PageDown","End"],Tw=[...Dw,...Du],Pw={ltr:[...Ps,"ArrowRight"],rtl:[...Ps,"ArrowLeft"]},Ow={ltr:["ArrowLeft"],rtl:["ArrowRight"]},mr="Menu",[vr,_w,Aw]=Yr(mr),[cn,Tu]=Ze(mr,[Aw,Vt,Oo]),br=Vt(),Pu=Oo(),[Ou,Rt]=cn(mr),[Iw,yr]=cn(mr),_u=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=br(t),[l,u]=f.useState(null),p=f.useRef(!1),c=ot(a),h=Jn(o);return f.useEffect(()=>{const g=()=>{p.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>p.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),d.jsx(dr,{...i,children:d.jsx(Ou,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(Iw,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:p,dir:h,modal:s,children:r})})})};_u.displayName=mr;var Fw="MenuAnchor",Os=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return d.jsx(ur,{...o,...r,ref:t})});Os.displayName=Fw;var _s="MenuPortal",[Ww,Au]=cn(_s,{forceMount:void 0}),Iu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Rt(_s,t);return d.jsx(Ww,{scope:t,forceMount:n,children:d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:r})})})};Iu.displayName=_s;var Je="MenuContent",[$w,As]=cn(Je),Fu=f.forwardRef((e,t)=>{const n=Au(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Rt(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu);return d.jsx(vr.Provider,{scope:e.__scopeMenu,children:d.jsx(Be,{present:r||a.open,children:d.jsx(vr.Slot,{scope:e.__scopeMenu,children:s.modal?d.jsx(Bw,{...o,ref:t}):d.jsx(zw,{...o,ref:t})})})})}),Bw=f.forwardRef((e,t)=>{const n=Rt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return oo(a)},[]),d.jsx(Is,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zw=f.forwardRef((e,t)=>{const n=Rt(Je,e.__scopeMenu);return d.jsx(Is,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Lw=Qt("MenuContent.ScrollLock"),Is=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:c,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=Rt(Je,n),y=yr(Je,n),b=br(n),x=Pu(n),N=_w(n),[M,C]=f.useState(null),k=f.useRef(null),O=he(t,k,v.onContentChange),V=f.useRef(0),$=f.useRef(""),U=f.useRef(0),B=f.useRef(null),q=f.useRef("right"),Y=f.useRef(0),ae=w?ar:f.Fragment,W=w?{as:Lw,allowPinchZoom:!0}:void 0,K=_=>{var I,R;const Q=$.current+_,oe=N().filter(X=>!X.disabled),P=document.activeElement,A=(I=oe.find(X=>X.ref.current===P))==null?void 0:I.textValue,H=oe.map(X=>X.textValue),F=Qw(H,Q,A),Z=(R=oe.find(X=>X.textValue===F))==null?void 0:R.ref.current;(function X(se){$.current=se,window.clearTimeout(V.current),se!==""&&(V.current=window.setTimeout(()=>X(""),1e3))})(Q),Z&&setTimeout(()=>Z.focus())};f.useEffect(()=>()=>window.clearTimeout(V.current),[]),Xr();const G=f.useCallback(_=>{var oe,P;return q.current===((oe=B.current)==null?void 0:oe.side)&&e0(_,(P=B.current)==null?void 0:P.area)},[]);return d.jsx($w,{scope:n,searchRef:$,onItemEnter:f.useCallback(_=>{G(_)&&_.preventDefault()},[G]),onItemLeave:f.useCallback(_=>{var Q;G(_)||((Q=k.current)==null||Q.focus(),C(null))},[G]),onTriggerLeave:f.useCallback(_=>{G(_)&&_.preventDefault()},[G]),pointerGraceTimerRef:U,onPointerGraceIntentChange:f.useCallback(_=>{B.current=_},[]),children:d.jsx(ae,{...W,children:d.jsx(or,{asChild:!0,trapped:o,onMountAutoFocus:j(a,_=>{var Q;_.preventDefault(),(Q=k.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:c,onInteractOutside:h,onDismiss:g,children:d.jsx(ku,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:C,onEntryFocus:j(l,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(wo,{role:"menu","aria-orientation":"vertical","data-state":Ju(v.open),"data-radix-menu-content":"",dir:y.dir,...b,...m,ref:O,style:{outline:"none",...m.style},onKeyDown:j(m.onKeyDown,_=>{const oe=_.target.closest("[data-radix-menu-content]")===_.currentTarget,P=_.ctrlKey||_.altKey||_.metaKey,A=_.key.length===1;oe&&(_.key==="Tab"&&_.preventDefault(),!P&&A&&K(_.key));const H=k.current;if(_.target!==H||!Tw.includes(_.key))return;_.preventDefault();const Z=N().filter(I=>!I.disabled).map(I=>I.ref.current);Du.includes(_.key)&&Z.reverse(),Xw(Z)}),onBlur:j(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(V.current),$.current="")}),onPointerMove:j(e.onPointerMove,xr(_=>{const Q=_.target,oe=Y.current!==_.clientX;if(_.currentTarget.contains(Q)&&oe){const P=_.clientX>Y.current?"right":"left";q.current=P,Y.current=_.clientX}}))})})})})})})});Fu.displayName=Je;var Hw="MenuGroup",Fs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ne.div,{role:"group",...r,ref:t})});Fs.displayName=Hw;var Vw="MenuLabel",Wu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ne.div,{...r,ref:t})});Wu.displayName=Vw;var _o="MenuItem",$u="menu.itemSelect",Ao=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=yr(_o,e.__scopeMenu),i=As(_o,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),p=()=>{const c=a.current;if(!n&&c){const h=new CustomEvent($u,{bubbles:!0,cancelable:!0});c.addEventListener($u,g=>r==null?void 0:r(g),{once:!0}),Ii(c,h),h.defaultPrevented?u.current=!1:s.onClose()}};return d.jsx(Bu,{...o,ref:l,disabled:n,onClick:j(e.onClick,p),onPointerDown:c=>{var h;(h=e.onPointerDown)==null||h.call(e,c),u.current=!0},onPointerUp:j(e.onPointerUp,c=>{var h;u.current||(h=c.currentTarget)==null||h.click()}),onKeyDown:j(e.onKeyDown,c=>{const h=i.searchRef.current!=="";n||h&&c.key===" "||Ps.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});Ao.displayName=_o;var Bu=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=As(_o,n),i=Pu(n),l=f.useRef(null),u=he(t,l),[p,c]=f.useState(!1),[h,g]=f.useState("");return f.useEffect(()=>{const w=l.current;w&&g((w.textContent??"").trim())},[a.children]),d.jsx(vr.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:d.jsx(Eu,{asChild:!0,...i,focusable:!r,children:d.jsx(ne.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:j(e.onPointerMove,xr(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,xr(w=>s.onItemLeave(w))),onFocus:j(e.onFocus,()=>c(!0)),onBlur:j(e.onBlur,()=>c(!1))})})})}),Yw="MenuCheckboxItem",zu=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(Gu,{scope:e.__scopeMenu,checked:n,children:d.jsx(Ao,{role:"menuitemcheckbox","aria-checked":Io(n)?"mixed":n,...o,ref:t,"data-state":Bs(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(Io(n)?!0:!n),{checkForDefaultPrevented:!1})})})});zu.displayName=Yw;var Lu="MenuRadioGroup",[Gw,jw]=cn(Lu,{value:void 0,onValueChange:()=>{}}),Hu=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ot(r);return d.jsx(Gw,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(Fs,{...o,ref:t})})});Hu.displayName=Lu;var Vu="MenuRadioItem",Yu=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=jw(Vu,e.__scopeMenu),a=n===o.value;return d.jsx(Gu,{scope:e.__scopeMenu,checked:a,children:d.jsx(Ao,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Bs(a),onSelect:j(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Yu.displayName=Vu;var Ws="MenuItemIndicator",[Gu,Rw]=cn(Ws,{checked:!1}),ju=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Rw(Ws,n);return d.jsx(Be,{present:r||Io(a.checked)||a.checked===!0,children:d.jsx(ne.span,{...o,ref:t,"data-state":Bs(a.checked)})})});ju.displayName=Ws;var Uw="MenuSeparator",Ru=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ru.displayName=Uw;var Kw="MenuArrow",Uu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return d.jsx(xo,{...o,...r,ref:t})});Uu.displayName=Kw;var $s="MenuSub",[qw,Ku]=cn($s),qu=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Rt($s,t),s=br(t),[i,l]=f.useState(null),[u,p]=f.useState(null),c=ot(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(dr,{...s,children:d.jsx(Ou,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:p,children:d.jsx(qw,{scope:t,contentId:we(),triggerId:we(),trigger:i,onTriggerChange:l,children:n})})})};qu.displayName=$s;var wr="MenuSubTrigger",Xu=f.forwardRef((e,t)=>{const n=Rt(wr,e.__scopeMenu),r=yr(wr,e.__scopeMenu),o=Ku(wr,e.__scopeMenu),a=As(wr,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},p=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>p,[p]),f.useEffect(()=>{const c=i.current;return()=>{window.clearTimeout(c),l(null)}},[i,l]),d.jsx(Os,{asChild:!0,...u,children:d.jsx(Bu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ju(n.open),...e,ref:mt(t,o.onTriggerChange),onClick:c=>{var h;(h=e.onClick)==null||h.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,xr(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:j(e.onPointerLeave,xr(c=>{var g,w;p();const h=(g=n.content)==null?void 0:g.getBoundingClientRect();if(h){const m=(w=n.content)==null?void 0:w.dataset.side,v=m==="right",y=v?-5:5,b=h[v?"left":"right"],x=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+y,y:c.clientY},{x:b,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:b,y:h.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,c=>{var g;const h=a.searchRef.current!=="";e.disabled||h&&c.key===" "||Pw[r.dir].includes(c.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),c.preventDefault())})})})});Xu.displayName=wr;var Zu="MenuSubContent",Qu=f.forwardRef((e,t)=>{const n=Au(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Rt(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu),i=Ku(Zu,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(vr.Provider,{scope:e.__scopeMenu,children:d.jsx(Be,{present:r||a.open,children:d.jsx(vr.Slot,{scope:e.__scopeMenu,children:d.jsx(Is,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var c;s.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:j(e.onFocusOutside,p=>{p.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,p=>{s.onClose(),p.preventDefault()}),onKeyDown:j(e.onKeyDown,p=>{var g;const c=p.currentTarget.contains(p.target),h=Ow[s.dir].includes(p.key);c&&h&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});Qu.displayName=Zu;function Ju(e){return e?"open":"closed"}function Io(e){return e==="indeterminate"}function Bs(e){return Io(e)?"indeterminate":e?"checked":"unchecked"}function Xw(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qw(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Zw(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Jw(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>r!=h>r&&n<(c-u)*(r-p)/(h-p)+u&&(o=!o)}return o}function e0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jw(n,t)}function xr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var t0=_u,n0=Os,r0=Iu,o0=Fu,a0=Fs,s0=Wu,i0=Ao,l0=zu,c0=Hu,d0=Yu,u0=ju,f0=Ru,p0=Uu,h0=qu,g0=Xu,m0=Qu,Fo="DropdownMenu",[v0]=Ze(Fo,[Tu]),Ae=Tu(),[b0,ef]=v0(Fo),tf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ae(t),u=f.useRef(null),[p,c]=Qe({prop:o,defaultProp:a??!1,onChange:s,caller:Fo});return d.jsx(b0,{scope:t,triggerId:we(),triggerRef:u,contentId:we(),open:p,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(h=>!h),[c]),modal:i,children:d.jsx(t0,{...l,open:p,onOpenChange:c,dir:r,modal:i,children:n})})};tf.displayName=Fo;var nf="DropdownMenuTrigger",rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=ef(nf,n),s=Ae(n);return d.jsx(n0,{asChild:!0,...s,children:d.jsx(ne.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:mt(t,a.triggerRef),onPointerDown:j(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:j(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});rf.displayName=nf;var y0="DropdownMenuPortal",of=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ae(t);return d.jsx(r0,{...r,...n})};of.displayName=y0;var af="DropdownMenuContent",sf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ef(af,n),a=Ae(n),s=f.useRef(!1);return d.jsx(o0,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:j(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;(!o.modal||p)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sf.displayName=af;var w0="DropdownMenuGroup",lf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(a0,{...o,...r,ref:t})});lf.displayName=w0;var x0="DropdownMenuLabel",cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(s0,{...o,...r,ref:t})});cf.displayName=x0;var C0="DropdownMenuItem",df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(i0,{...o,...r,ref:t})});df.displayName=C0;var S0="DropdownMenuCheckboxItem",uf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(l0,{...o,...r,ref:t})});uf.displayName=S0;var N0="DropdownMenuRadioGroup",ff=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(c0,{...o,...r,ref:t})});ff.displayName=N0;var M0="DropdownMenuRadioItem",pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(d0,{...o,...r,ref:t})});pf.displayName=M0;var k0="DropdownMenuItemIndicator",hf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(u0,{...o,...r,ref:t})});hf.displayName=k0;var E0="DropdownMenuSeparator",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(f0,{...o,...r,ref:t})});gf.displayName=E0;var D0="DropdownMenuArrow",T0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(p0,{...o,...r,ref:t})});T0.displayName=D0;var P0=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ae(t),[i,l]=Qe({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(h0,{...s,open:i,onOpenChange:l,children:n})},O0="DropdownMenuSubTrigger",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(g0,{...o,...r,ref:t})});mf.displayName=O0;var _0="DropdownMenuSubContent",vf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ae(n);return d.jsx(m0,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vf.displayName=_0;var A0=tf,I0=rf,bf=of,yf=sf,F0=lf,wf=cf,xf=df,Cf=uf,W0=ff,Sf=pf,Nf=hf,Mf=gf,$0=P0,kf=mf,Ef=vf;const Wo=A0,$o=I0,B0=F0,z0=bf,zs=$0,Df=W0,Cr=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>d.jsx(bf,{children:d.jsx(yf,{ref:r,sideOffset:t,className:D("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","origin-(--radix-dropdown-menu-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...n})}));Cr.displayName=yf.displayName;const Ot=f.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>d.jsx(xf,{ref:o,className:D("relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",n==="destructive"&&"text-destructive focus:bg-destructive/10 focus:text-destructive [&_svg]:text-destructive",e),...r}));Ot.displayName=xf.displayName;const Ls=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs(Cf,{ref:o,className:D("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(Nf,{children:d.jsx(er,{className:"size-3.5"})})}),t]}));Ls.displayName=Cf.displayName;const Hs=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Sf,{ref:r,className:D("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(Nf,{children:d.jsx(Dg,{className:"size-2 fill-current"})})}),t]}));Hs.displayName=Sf.displayName;const Sr=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(wf,{ref:r,className:D("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Sr.displayName=wf.displayName;const Wn=f.forwardRef(({className:e,...t},n)=>d.jsx(Mf,{ref:n,className:D("-mx-1 my-1 h-px bg-border",e),...t}));Wn.displayName=Mf.displayName;const Bo=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(kf,{ref:o,className:D("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent data-[state=open]:bg-accent","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",e),...r,children:[n,d.jsx(vn,{className:"ml-auto"})]}));Bo.displayName=kf.displayName;const zo=f.forwardRef(({className:e,...t},n)=>d.jsx(Ef,{ref:n,className:D("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...t}));zo.displayName=Ef.displayName;const Tf=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>d.jsxs(Wo,{...s,children:[d.jsx($o,{asChild:!0,children:e}),d.jsx(Cr,{side:n,align:r,sideOffset:o,className:a,children:t.map((i,l)=>i.type==="separator"?d.jsx(Wn,{},l):i.type==="label"?d.jsx(Sr,{children:i.label},l):d.jsxs(Ot,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},l))})]});Tf.displayName="DropdownMenu";const Pf=f.createContext(null);function Of(){return f.useContext(Pf)}const _f="application/x-bookers-grouping-column-id",Nr="application/x-bookers-grouping-chip",_t="bookers-expand";function Af(e){return"columns"in e&&e.columns&&e.columns.length>0?e.columns.some(Af):e.footer!==void 0}function L0(){if(typeof document>"u")return{minPx:128,maxPx:1280};const e=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return{minPx:8*e,maxPx:Math.min(window.innerHeight*.9,80*e)}}function If(e,t){if(typeof e=="number")return e;const n=e.trim();if(n.includes("min(")||typeof document>"u")return t;const r=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return n.endsWith("rem")?parseFloat(n)*r:n.endsWith("vh")?parseFloat(n)/100*window.innerHeight:n.endsWith("px")?parseFloat(n):t}function Lo(e,t,n){return Math.min(Math.max(e,t),n)}function H0({scrollRegionRef:e,minPx:t,maxPx:n,onHeightChange:r}){const o=f.useRef(null),a=l=>{var p;l.preventDefault(),l.stopPropagation();const u=((p=e.current)==null?void 0:p.offsetHeight)??t;o.current={pointerId:l.pointerId,startY:l.clientY,startHeight:u},l.currentTarget.setPointerCapture(l.pointerId)},s=l=>{const u=o.current;if(!u||l.pointerId!==u.pointerId)return;const p=l.clientY-u.startY,c=Lo(u.startHeight+p,t,n);r(c)},i=l=>{const u=o.current;if(!(!u||l.pointerId!==u.pointerId)){o.current=null;try{l.currentTarget.releasePointerCapture(l.pointerId)}catch{}}};return d.jsx("div",{className:D("relative flex min-h-10 w-full shrink-0 cursor-ns-resize items-center justify-center","text-muted-foreground/45 transition-[color] duration-150 ease-out","hover:text-muted-foreground/75","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),role:"separator","aria-orientation":"horizontal","aria-label":"Drag to resize table height",tabIndex:0,onPointerDown:a,onPointerMove:s,onPointerUp:i,onPointerCancel:i,onKeyDown:l=>{var h;if(l.key!=="ArrowUp"&&l.key!=="ArrowDown")return;l.preventDefault();const u=16,p=((h=e.current)==null?void 0:h.offsetHeight)??t,c=l.key==="ArrowUp"?-u:u;r(Lo(p+c,t,n))},children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5","aria-hidden":!0,children:[d.jsx("span",{className:"h-px w-6 bg-border/50"}),d.jsx(_g,{className:"size-3 shrink-0",strokeWidth:1.5,"aria-hidden":!0}),d.jsx("span",{className:"h-px w-6 bg-border/50"})]})})}function V0({column:e,id:t,showClear:n}){const r=e.getFilterValue();return d.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[d.jsx(pr,{size:"sm",type:"text",value:String(r??""),onChange:o=>{const a=o.target.value;e.setFilterValue(a===""?void 0:a)},placeholder:"Filter…","aria-label":`Filter ${t}`,autoComplete:"off",className:"h-8 min-w-0 flex-1"}),n&&e.getIsFiltered()?d.jsx(wn,{type:"button",variant:"ghost",size:"sm",className:"size-8 min-w-8 shrink-0 px-0","aria-label":`Clear filter for ${t}`,onClick:()=>e.setFilterValue(void 0),children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})}):null]})}function Y0({column:e,id:t,showClear:n}){var c;const r=e.getFilterValue(),o=$y(r),a=o.op,s=o.value,i=a!=="empty"&&a!=="notEmpty",l=h=>{e.setFilterValue(By(h))},u=((c=ts.find(h=>h.value===a))==null?void 0:c.label)??a,p=e.getIsFiltered();return d.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[d.jsxs(ls,{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"min-w-0 flex-1",children:i?d.jsx(pr,{size:"sm",type:"text",value:s,onChange:h=>l({op:a,value:h.target.value}),placeholder:"Filter…","aria-label":`Filter ${t}`,autoComplete:"off",className:"w-full min-w-0"}):d.jsx("div",{className:"flex h-8 w-full min-w-0 items-center border-0 bg-background px-3 text-xs text-muted-foreground select-none",children:u})}),d.jsx(cs,{className:"p-0",children:d.jsxs(Wo,{children:[d.jsx($o,{asChild:!0,children:d.jsx(wn,{type:"button",variant:"ghost",size:"sm",className:D("h-8 min-w-8 shrink-0 rounded-none px-2 text-muted-foreground transition-colors",p&&"text-primary"),"aria-label":`${t} filter operator: ${u}`,children:d.jsxs("span",{className:"relative inline-flex size-4 items-center justify-center",children:[d.jsx(Fg,{className:"size-4","aria-hidden":!0}),p?d.jsx("span",{className:"absolute -right-0.5 -top-0.5 size-1.5 rounded-full bg-primary ring-2 ring-background","aria-hidden":!0}):null]})})}),d.jsx(Cr,{align:"end",className:"min-w-44",children:d.jsx(Df,{value:a,onValueChange:h=>{es(h)&&l({op:h,value:h==="empty"||h==="notEmpty"?"":s})},children:ts.map(h=>d.jsx(Hs,{value:h.value,children:h.label},h.value))})})]})})]}),n&&p?d.jsx(wn,{type:"button",variant:"ghost",size:"sm",className:"size-8 min-w-8 shrink-0 px-0","aria-label":`Clear filter for ${t}`,onClick:()=>e.setFilterValue(void 0),children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})}):null]})}function G0({column:e,enableAdvancedColumnFilters:t,showColumnFilterClear:n}){const r=e.id,o=e.columnDef.filterFn;return t&&(o===void 0||o===ns)?d.jsx(Y0,{column:e,id:r,showClear:n}):d.jsx(V0,{column:e,id:r,showClear:n})}function ct(e,t,n,r){const o=e!==void 0&&t!==void 0;return[o?e:n,o?t:r]}function Ff(e){return e.subRows.length===0?e.getIsGrouped()?0:1:e.subRows.reduce((t,n)=>t+Ff(n),0)}function j0({table:e,manualPagination:t,pageSizeOptions:n,paginationSiblingCount:r}){const{pageIndex:o,pageSize:a}=e.getState().pagination,s=t?e.getRowCount():e.getPrePaginationRowModel().rows.length,i=s===0?0:o*a+1,l=Math.min((o+1)*a,s),u=e.getPageCount(),p=f.useMemo(()=>{const c=[...new Set(n)].sort((h,g)=>h-g);return c.includes(a)||(c.push(a),c.sort((h,g)=>h-g)),c},[n,a]);return d.jsxs("div",{className:"mt-3 flex flex-col gap-3 border-border border-t pt-3 sm:flex-row sm:items-center sm:justify-between",children:[d.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:s===0?"No rows.":d.jsxs(d.Fragment,{children:["Showing"," ",d.jsx("span",{className:"text-foreground",children:i}),"–",d.jsx("span",{className:"text-foreground",children:l})," of ",d.jsx("span",{className:"text-foreground",children:s})]})}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-muted-foreground",children:"Rows per page"}),d.jsxs(Ss,{value:String(a),onValueChange:c=>{e.setPageSize(Number(c))},children:[d.jsx(To,{size:"sm",className:"w-18","aria-label":"Rows per page",children:d.jsx(Ns,{})}),d.jsx(Po,{children:p.map(c=>d.jsx(Es,{value:String(c),children:c},c))})]})]}),d.jsx(ms,{page:o+1,totalPages:Math.max(1,u),onPageChange:c=>e.setPageIndex(c-1),siblingCount:r})]})]})}function R0({data:e,columns:t,getRowId:n,enableSorting:r=!1,defaultSorting:o,sorting:a,onSortingChange:s,enableRowSelection:i=!1,defaultRowSelection:l,rowSelection:u,onRowSelectionChange:p,enableColumnResizing:c=!1,columnResizeMode:h="onChange",defaultColumnSizing:g,columnSizing:w,onColumnSizingChange:m,enableColumnReorder:v=!1,defaultColumnOrder:y,columnOrder:b,onColumnOrderChange:x,enableColumnPinning:N=!1,defaultColumnPinning:M,columnPinning:C,onColumnPinningChange:k,enableGlobalFilter:O=!1,showGlobalFilter:V=!0,globalFilterPlaceholder:$="Search…",defaultGlobalFilter:U="",globalFilter:B,onGlobalFilterChange:q,enableColumnFilters:Y=!1,showFilterRow:ae=!0,enableAdvancedColumnFilters:W=!0,showColumnFilterClear:K=!0,defaultColumnFilters:G,columnFilters:_,onColumnFiltersChange:Q,enableExpanding:oe=!1,defaultExpanded:P,expanded:A,onExpandedChange:H,getRowCanExpand:F,renderExpandedRow:Z,showExpandColumn:I=!1,expandedRowClassName:R,enableGrouping:X=!1,defaultGrouping:se,grouping:de,onGroupingChange:ce,showGroupingDropZone:ke=!0,groupingDropZoneLabel:De="Drag column headers here to set row groups.",groupingDropZoneHint:tt="Drag to add another group level.",isLoading:Re=!1,loadingRows:Fe=5,emptyState:Kt,enableColumnVisibility:Ee=!1,defaultColumnVisibility:Fr,columnVisibility:Wr,onColumnVisibilityChange:Oe,enableVirtualization:ft=!1,virtualScrollContainerHeight:We="min(35rem, 70vh)",virtualRowEstimateSize:fn=48,virtualOverscan:qt=8,enableFooter:Gn=!1,enableScrollContainerResize:Mt=!1,scrollContainerResizeMaxHeight:Xt="min(90vh, 80rem)",scrollContainerResizeMinHeight:Le="8rem",enablePagination:jn=!1,manualPagination:pt=!1,rowCount:Rn,pageCount:Un,defaultPagination:ht,pagination:Kn,onPaginationChange:qn,pageSizeOptions:pn=[10,20,50,100],paginationSiblingCount:Ue=1,className:ie,...pe},re){const[ue,J]=f.useState(o??[]),[te,Se]=ct(a,s,ue,J),[_e,Zt]=f.useState(l??{}),[ye,Te]=ct(u,p,_e,Zt),[Xn,Ke]=f.useState(g??{}),[qe,Uo]=ct(w,m,Xn,Ke),[Ft,Eh]=f.useState(y??[]),[L1,H1]=ct(b,x,Ft,Eh),[V1,Y1]=f.useState(M??{left:[],right:[]}),[G1,j1]=ct(C,k,V1,Y1),[R1,U1]=f.useState(U??""),[Ko,Si]=ct(B,q,R1,U1),[K1,q1]=f.useState(G??[]),[X1,Z1]=ct(_,Q,K1,q1),[Q1,J1]=f.useState(P??{}),[eN,Dh]=ct(A,H,Q1,J1),[tN,nN]=f.useState(se??[]),[Ni,$r]=ct(de,ce,tN,nN),[rN,oN]=f.useState(Fr??{}),[aN,sN]=ct(Wr,Oe,rN,oN),Mi=!!(jn&&!X),[iN,lN]=f.useState(()=>({pageIndex:(ht==null?void 0:ht.pageIndex)??0,pageSize:(ht==null?void 0:ht.pageSize)??10})),[cN,dN]=ct(Kn,qn,iN,lN),uN=O||Y,hn=!!(oe&&Z&&!X),ki=f.useMemo(()=>!hn||!I||t.some(z=>z.id===_t)?t:[{id:_t,header:()=>null,size:48,minSize:40,maxSize:56,enableSorting:!1,enableColumnFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,meta:{bookersExpandColumn:!0},cell:({row:z})=>d.jsx("button",{type:"button",className:D("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-sm","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]",!z.getCanExpand()&&"cursor-not-allowed opacity-40"),onClick:z.getToggleExpandedHandler(),"aria-expanded":z.getIsExpanded(),"aria-label":z.getIsExpanded()?"Collapse row details":"Expand row details",disabled:!z.getCanExpand(),children:d.jsx(vn,{className:D("size-4 transition-transform duration-150 ease-out",z.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})})},...t],[t,hn,I]),fN=f.useMemo(()=>Gn&&ki.some(Af),[Gn,ki]),Th=f.useMemo(()=>{const T={};return c&&(T.minSize=72,T.size=160,T.maxSize=640),Y&&(T.filterFn=W?ns:"includesString"),Object.keys(T).length>0?T:void 0},[c,Y,W]),qo=f.useRef(null),Zn=f.useRef(0),[pN,Xo]=f.useState(!1),gt=He.useReactTable({data:e,columns:ki,getCoreRowModel:He.getCoreRowModel(),enableSorting:r,...uN?{getFilteredRowModel:He.getFilteredRowModel(),...O?{enableGlobalFilter:!0,globalFilterFn:"includesString",onGlobalFilterChange:Si}:{},...Y?{onColumnFiltersChange:Z1}:{}}:{},...r?{getSortedRowModel:He.getSortedRowModel(),onSortingChange:Se}:{},...Mi?{getPaginationRowModel:He.getPaginationRowModel(),onPaginationChange:dN,...pt?{manualPagination:!0,...Rn!==void 0?{rowCount:Rn}:{},...Un!==void 0?{pageCount:Un}:{}}:{}}:{},...i?{onRowSelectionChange:Te,enableRowSelection:!0}:{},...c?{enableColumnResizing:!0,columnResizeMode:h,onColumnSizingChange:Uo}:{},...Th?{defaultColumn:Th}:{},...v?{onColumnOrderChange:H1}:{},enableColumnPinning:N,onColumnPinningChange:j1,...Ee?{enableHiding:!0,onColumnVisibilityChange:sN}:{enableHiding:!1},...hn?{enableExpanding:!0,manualExpanding:!0,getRowCanExpand:F??(()=>!0),onExpandedChange:Dh}:{},...X?{enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:He.getGroupedRowModel(),getExpandedRowModel:He.getExpandedRowModel(),onGroupingChange:$r,onExpandedChange:Dh}:{},state:{...r?{sorting:te}:{},...i?{rowSelection:ye}:{},...c?{columnSizing:qe}:{},...v?{columnOrder:L1}:{},columnPinning:G1,...O?{globalFilter:Ko}:{},...Y?{columnFilters:X1}:{},...X?{grouping:Ni}:{},...X||hn?{expanded:eN}:{},...Ee?{columnVisibility:aN}:{},...Mi?{pagination:cN}:{}},...n?{getRowId:(T,z)=>String(n(T,z))}:{}}),Br=gt.getVisibleLeafColumns().length,zr=gt.getRowModel().rows,Ph=f.useRef(null),Qn=ft&&!X&&!hn&&zr.length>0&&!Re,Ei=f.useRef(null),hN=f.useCallback(T=>{Ei.current=T,Ph.current=Qn?T:null},[Qn]),gn=f.useMemo(()=>{const T=L0(),z=If(Le,T.minPx),L=If(Xt,T.maxPx);return{minPx:Math.min(z,L),maxPx:Math.max(z,L)}},[Le,Xt]),[Zo,Oh]=f.useState(()=>Mt&&typeof We=="number"?We:null);f.useLayoutEffect(()=>{if(!Mt||Zo!==null)return;const T=Ei.current;T&&Oh(Lo(T.offsetHeight,gn.minPx,gn.maxPx))},[Mt,Zo,We,gn]);const _h=Bh.useVirtualizer({count:zr.length,getScrollElement:()=>Ph.current,estimateSize:()=>fn,overscan:qt,enabled:Qn}),gN=T=>{var nt;const z=T.column.getCanSort(),L=T.column.getIsSorted(),fe=!!((nt=T.column.columnDef.meta)!=null&&nt.bookersColumnHeaderActions);if(T.isPlaceholder)return null;if(!z||fe)return He.flexRender(T.column.columnDef.header,T.getContext());const Ne=T.column.getToggleSortingHandler();return d.jsxs("button",{type:"button",className:D("flex min-h-10 min-w-0 w-full cursor-pointer items-center gap-1.5 rounded-sm text-left select-none outline-none","transition-[color,scale] duration-150 ease-out hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:Ne,children:[He.flexRender(T.column.columnDef.header,T.getContext()),L==="asc"?d.jsx(sa,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,L==="desc"?d.jsx(Jt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]})},mN=(T,z)=>{!z||z===T||z===_t||T===_t||gt.setColumnOrder(L=>{const fe=L.length>0?L:gt.getAllLeafColumns().map(mn=>mn.id),Ne=fe.indexOf(z),nt=fe.indexOf(T);if(Ne===-1||nt===-1)return fe;const Xe=[...fe];if(Xe.splice(Ne,1),Xe.splice(nt,0,z),I&&hn&&Xe.includes(_t)){const mn=Xe.filter(Hr=>Hr!==_t);return[_t,...mn]}return Xe})},Di=gt.getHeaderGroups(),Ah=Di[0],Ih=2.5,vN=`${Di.length*Ih}rem`,Ti=T=>{const z=gt.getColumn(T);if(!z)return T;const L=z.columnDef.header;return typeof L=="string"?L:T},bN=(T,z)=>{T!==z&&$r(L=>{const fe=[...L],Ne=fe.filter(Xe=>Xe!==T),nt=Ne.indexOf(z);return nt===-1?fe:(Ne.splice(nt,0,T),Ne)})},yN=T=>{$r(z=>{const fe=[...z].filter(Ne=>Ne!==T);return fe.push(T),fe})},wN=T=>{var L;if(T.getIsPlaceholder())return null;if(T.getIsAggregated())return He.flexRender(T.column.columnDef.aggregatedCell??T.column.columnDef.cell,T.getContext());const z=!!((L=T.column.columnDef.meta)!=null&&L.bookersSkipGroupRowExpand);if(X&&T.getIsGrouped()&&!z){const fe=T.row,Ne=Ff(fe);return d.jsxs("span",{className:"flex min-h-10 min-w-0 items-center gap-1.5",children:[d.jsx("button",{type:"button",className:D("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-sm","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:fe.getToggleExpandedHandler(),"aria-expanded":fe.getIsExpanded(),"aria-label":`Toggle group ${fe.id}`,children:d.jsx(vn,{className:D("size-4 transition-transform duration-150 ease-out",fe.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})}),d.jsx("span",{className:"min-w-0 flex-1",children:He.flexRender(T.column.columnDef.cell,T.getContext())}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["(",Ne,")"]})]})}return He.flexRender(T.column.columnDef.cell,T.getContext())},Fh=T=>d.jsxs(f.Fragment,{children:[d.jsx(Pt,{"data-selected":T.getIsSelected()?"true":void 0,children:T.getVisibleCells().map((z,L)=>{const fe=z.column.getIsPinned();return d.jsx(an,{className:D(fe==="left"&&D("relative sticky z-30 bg-background",!z.column.getIsLastColumn("left")&&"border-r border-border",z.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),fe==="right"&&D("relative sticky z-30 bg-background",!z.column.getIsFirstColumn("right")&&"border-l border-border",z.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{...L===0&&T.depth>0?{paddingLeft:`${T.depth*.75+.75}rem`}:{},...c||fe?{width:z.column.getSize(),minWidth:z.column.getSize(),maxWidth:z.column.getSize()}:{},...fe==="left"?{left:z.column.getStart("left")}:{},...fe==="right"?{right:z.column.getAfter("right")}:{}},children:wN(z)},z.id)})}),hn&&T.getIsExpanded()&&Z?d.jsx(Pt,{"data-expanded-detail":T.id,children:d.jsx(an,{colSpan:Br,className:D("border-t border-border bg-muted/30 p-4 align-top",R),children:Z(T)})}):null]},T.id),Lr=Qn?_h.getVirtualItems():[],Pi=Qn&&Lr.length>0,Wh=Pi?Lr[0].start:0,$h=Pi?_h.getTotalSize()-Lr[Lr.length-1].end:0,xN=Mt?Zo!==null?{height:Zo}:{maxHeight:typeof We=="number"?`${We}px`:We,minHeight:typeof Le=="number"?`${Le}px`:Le}:{maxHeight:typeof We=="number"?`${We}px`:We};return d.jsx(Pf.Provider,{value:gt,children:d.jsxs("div",{ref:re,className:D("w-full min-w-0",ie),...pe,children:[O&&V?d.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:d.jsxs("div",{className:"relative min-w-0 max-w-sm flex-1 self-start",children:[d.jsx(pr,{size:"sm",type:"text",placeholder:$,value:Ko,onChange:T=>{Si(T.target.value)},"aria-label":$,autoComplete:"off",className:D("min-w-0 w-full",Ko.trim()!==""&&"pr-12")}),Ko.trim()!==""?d.jsx(wn,{type:"button",variant:"ghost",className:D("absolute right-1 top-1/2 z-10 flex size-10 -translate-y-1/2 items-center justify-center rounded-md px-0","bg-background text-muted-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),"aria-label":"Clear global search",onClick:()=>Si(""),children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})}):null]})}):null,X&&ke?d.jsxs("div",{role:"region","aria-label":"Row groups",className:D("mb-3 flex min-h-11 flex-wrap items-stretch gap-2 rounded-md border border-dashed px-2 py-1.5 transition-[border-color,box-shadow] duration-150 sm:items-center",pN?"border-primary/50 bg-primary/5 ring-1 ring-inset ring-primary/40":"border-border bg-muted/30"),onDragOver:T=>{T.preventDefault();const z=Array.from(T.dataTransfer.types);T.dataTransfer.dropEffect=z.includes(Nr)?"move":"copy"},onDragEnter:T=>{T.preventDefault(),Zn.current+=1,Xo(!0)},onDragLeave:()=>{Zn.current-=1,Zn.current<=0&&(Zn.current=0,Xo(!1))},onDrop:T=>{T.preventDefault(),Zn.current=0,Xo(!1);const z=T.dataTransfer.getData(Nr);if(z){yN(z);return}const L=T.dataTransfer.getData(_f);if(!L)return;const fe=gt.getColumn(L);fe!=null&&fe.getCanGroup()&&$r(Ne=>{const Xe=[...Ne].filter(mn=>mn!==L);return Xe.push(L),Xe})},children:[d.jsx("span",{className:"inline-flex size-10 shrink-0 items-center justify-center self-center rounded-sm text-muted-foreground",children:d.jsx(Wg,{className:"size-4","aria-hidden":!0})}),d.jsx("div",{className:"flex min-h-8 min-w-0 flex-1 flex-wrap items-center gap-1",children:Ni.length===0?d.jsx("span",{className:"text-sm text-muted-foreground select-none",children:De}):d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[Ni.map((T,z)=>d.jsxs(f.Fragment,{children:[z>0?d.jsx(vn,{className:"size-3.5 shrink-0 text-muted-foreground/80","aria-hidden":!0}):null,d.jsxs("div",{className:D("inline-flex w-full max-w-72 items-center rounded-md border border-border bg-background text-sm shadow-sm","transition-[border-color,box-shadow] duration-150"),onDragOver:L=>{L.preventDefault(),L.stopPropagation(),Array.from(L.dataTransfer.types).includes(Nr)&&(L.dataTransfer.dropEffect="move")},onDrop:L=>{L.preventDefault(),L.stopPropagation(),Zn.current=0,Xo(!1);const fe=L.dataTransfer.getData(Nr);fe&&bN(fe,T)},children:[d.jsx("span",{draggable:!0,"aria-label":`Reorder group: ${Ti(T)}`,className:D("inline-flex size-10 shrink-0 cursor-grab items-center justify-center rounded-l-md border-r border-border text-muted-foreground","touch-none transition-[color,background-color] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","active:cursor-grabbing"),onDragStart:L=>{L.dataTransfer.setData(Nr,T),L.dataTransfer.effectAllowed="move"},children:d.jsx(Ig,{className:"size-4","aria-hidden":!0})}),d.jsx("span",{className:"min-w-0 truncate px-1.5 font-medium text-foreground",children:Ti(T)}),d.jsx("button",{type:"button","aria-label":`Remove ${Ti(T)} from row groups`,className:D("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-r-md","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:()=>{$r(L=>[...L].filter(fe=>fe!==T))},children:d.jsx(tr,{className:"size-3.5","aria-hidden":!0})})]})]},T)),d.jsx("span",{className:"text-xs text-muted-foreground select-none",children:tt})]})})]}):null,d.jsxs("div",{className:"w-full",children:[d.jsx("div",{ref:hN,className:D("w-full min-h-0 overflow-auto [scrollbar-gutter:stable]",Qn&&"[overflow-anchor:none]"),style:xN,children:d.jsxs(rs,{className:D(c&&"table-fixed"),style:c?{width:gt.getTotalSize(),minWidth:"100%"}:void 0,children:[d.jsxs(os,{children:[Di.map((T,z)=>d.jsx(Pt,{children:T.headers.map(L=>{const fe=`${z*Ih}rem`,Ne=L.column.getIsPinned(),nt=c&&L.column.getCanResize()&&!L.isPlaceholder,Xe=L.column.id===_t,mn=v&&!L.isPlaceholder&&!Xe&&(!L.subHeaders||L.subHeaders.length===0),Hr=X&&!L.isPlaceholder&&!Xe&&L.column.getCanGroup()&&(!L.subHeaders||L.subHeaders.length===0);return d.jsxs(No,{colSpan:L.colSpan,className:D("relative sticky z-30 bg-background",Ne==="left"&&D("z-50 bg-background",!L.column.getIsLastColumn("left")&&"border-r border-border",L.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),Ne==="right"&&D("z-50 bg-background",!L.column.getIsFirstColumn("right")&&"border-l border-border",L.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:fe,...(c||Ne)&&!L.isPlaceholder?{width:L.getSize(),minWidth:L.getSize(),maxWidth:L.getSize()}:{},...Ne==="left"?{left:L.column.getStart("left")}:{},...Ne==="right"?{right:L.column.getAfter("right")}:{}},onDragOver:v?$e=>{$e.preventDefault(),$e.dataTransfer.dropEffect="move"}:void 0,onDrop:v?$e=>{$e.preventDefault();const CN=$e.dataTransfer.getData("application/x-bookers-column-id")||qo.current;mN(L.column.id,CN),qo.current=null}:void 0,children:[d.jsxs("span",{className:D("flex min-h-10 min-w-0 items-center gap-1",nt?"pr-1":"pr-2"),children:[mn?d.jsx("span",{draggable:!0,"aria-label":`Reorder column ${L.column.id}`,className:D("inline-flex size-10 shrink-0 cursor-grab items-center justify-center rounded-sm","text-muted-foreground","touch-none transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","active:cursor-grabbing active:scale-[0.96]"),onClick:$e=>$e.stopPropagation(),onDragStart:$e=>{qo.current=L.column.id,$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("application/x-bookers-column-id",L.column.id)},onDragEnd:()=>{qo.current=null},children:d.jsx(Ag,{className:"size-4","aria-hidden":"true"})}):null,d.jsx("span",{className:D("min-w-0 flex-1",Hr&&"cursor-grab active:cursor-grabbing"),draggable:Hr,onDragStart:Hr?$e=>{$e.dataTransfer.setData(_f,L.column.id),$e.dataTransfer.effectAllowed="copy"}:void 0,children:gN(L)})]}),nt?d.jsx("div",{"data-column-resize-handle":L.column.id,onClick:$e=>$e.stopPropagation(),onMouseDown:L.getResizeHandler(),onTouchStart:L.getResizeHandler(),className:D("absolute end-0 top-0 z-20 flex h-full w-2 cursor-col-resize select-none","touch-none items-center justify-end","transition-[opacity] duration-150 ease-out",L.column.getIsResizing()?"opacity-100":"opacity-75 hover:opacity-100"),"aria-hidden":!0,children:d.jsx("span",{className:"h-1/2 w-[3px] rounded-full bg-border"})}):null]},L.id)})},T.id)),Y&&ae&&Ah?d.jsx(Pt,{children:Ah.headers.map(T=>{const z=T.column.getIsPinned();return d.jsx(No,{colSpan:T.colSpan,className:D("relative sticky z-30 bg-background py-2",z==="left"&&D("z-50 bg-background",!T.column.getIsLastColumn("left")&&"border-r border-border",T.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),z==="right"&&D("z-50 bg-background",!T.column.getIsFirstColumn("right")&&"border-l border-border",T.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:vN,...(c||z)&&!T.isPlaceholder?{width:T.getSize(),minWidth:T.getSize(),maxWidth:T.getSize()}:{},...z==="left"?{left:T.column.getStart("left")}:{},...z==="right"?{right:T.column.getAfter("right")}:{}},children:!T.isPlaceholder&&T.column.getCanFilter()?d.jsx(G0,{column:T.column,enableAdvancedColumnFilters:W,showColumnFilterClear:K}):null},`filter-${T.id}`)})}):null]}),d.jsx(as,{children:Re?Array.from({length:Fe}).map((T,z)=>d.jsx(Pt,{children:d.jsx(an,{colSpan:Br,children:d.jsx(is,{className:"h-4 w-full"})})},z)):zr.length===0?d.jsx(Pt,{children:d.jsx(an,{colSpan:Br,className:"h-24 text-center text-sm text-muted-foreground",children:Kt??"No results."})}):Pi?d.jsxs(d.Fragment,{children:[Wh>0?d.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:d.jsx("td",{colSpan:Br,className:"h-0 border-0 p-0",style:{height:Wh}})}):null,Lr.map(T=>{const z=zr[T.index];return Fh(z)}),$h>0?d.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:d.jsx("td",{colSpan:Br,className:"h-0 border-0 p-0",style:{height:$h}})}):null]}):zr.map(T=>Fh(T))}),fN?d.jsx(ss,{className:"sticky bottom-0 z-20",children:gt.getFooterGroups().map(T=>d.jsx(Pt,{children:T.headers.map(z=>{const L=z.column.getIsPinned();return d.jsx(an,{colSpan:z.colSpan,className:D("border-border text-sm font-medium text-foreground",L==="left"&&D("relative sticky z-30 bg-muted/50",!z.column.getIsLastColumn("left")&&"border-r border-border",z.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),L==="right"&&D("relative sticky z-30 bg-muted/50",!z.column.getIsFirstColumn("right")&&"border-l border-border",z.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{...(c||L)&&!z.isPlaceholder?{width:z.getSize(),minWidth:z.getSize(),maxWidth:z.getSize()}:{},...L==="left"?{left:z.column.getStart("left")}:{},...L==="right"?{right:z.column.getAfter("right")}:{}},children:z.isPlaceholder?null:He.flexRender(z.column.columnDef.footer,z.getContext())},z.id)})},T.id))}):null]})}),Mi?d.jsx(j0,{table:gt,manualPagination:pt,pageSizeOptions:pn,paginationSiblingCount:Ue}):null,Mt?d.jsx(H0,{scrollRegionRef:Ei,minPx:gn.minPx,maxPx:gn.maxPx,onHeightChange:T=>Oh(Lo(T,gn.minPx,gn.maxPx))}):null]})]})})}const Wf=f.forwardRef(R0);Wf.displayName="DataTable";const U0={bookersColumnHeaderActions:!0};function K0(e){const t=e.columnDef.header;return typeof t=="string"?t:e.id}function q0({column:e,title:t,children:n,className:r,...o},a){const s=n??t,i=e.getCanSort(),l=e.getCanPin(),u=e.getIsSorted(),p=e.getIsPinned(),c=Of(),h=!!(c!=null&&c.options.enableHiding&&c.getAllLeafColumns().some(g=>g.getCanHide()));return d.jsxs("div",{ref:a,className:D("flex min-w-0 items-center gap-0.5",r),...o,children:[i?d.jsxs("button",{type:"button",className:D("flex min-h-10 min-w-0 flex-1 cursor-pointer items-center gap-1.5 rounded-sm px-0 text-left","text-xs font-medium uppercase tracking-wide text-muted-foreground","transition-[color,scale] duration-150 ease-out","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:e.getToggleSortingHandler(),children:[d.jsx("span",{className:"min-w-0 truncate",children:s}),u==="asc"?d.jsx(sa,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,u==="desc"?d.jsx(Jt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]}):d.jsx("span",{className:"flex min-h-10 min-w-0 flex-1 items-center px-0 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:d.jsx("span",{className:"min-w-0 truncate",children:s})}),(i||l||h)&&d.jsxs(Wo,{children:[d.jsx($o,{asChild:!0,children:d.jsx("button",{type:"button",className:D("inline-flex size-8 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-sm border-0","text-muted-foreground transition-[color,background-color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","outline-none focus:outline-none focus-visible:outline-none","focus:ring-0 focus-visible:ring-0 focus:shadow-none focus-visible:shadow-none","active:scale-[0.96]"),"aria-label":`Column actions (${e.id})`,onClick:g=>g.stopPropagation(),children:d.jsx(Pg,{className:"size-3.5","aria-hidden":"true"})})}),d.jsxs(Cr,{align:"end",className:"min-w-44",children:[i?d.jsxs(d.Fragment,{children:[d.jsx(Sr,{children:"Sort"}),d.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!1)},children:[d.jsx(kg,{className:"size-4","aria-hidden":"true"}),"Ascending"]}),d.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!0)},children:[d.jsx(Mg,{className:"size-4","aria-hidden":"true"}),"Descending"]}),d.jsx(Ot,{disabled:u===!1,onSelect:()=>{e.clearSorting()},children:"Clear sort"})]}):null,i&&l?d.jsx(Wn,{}):null,l?d.jsxs(zs,{children:[d.jsxs(Bo,{children:[d.jsx(zg,{className:"size-4","aria-hidden":"true"}),"Pin column"]}),d.jsxs(zo,{children:[d.jsx(Ot,{onSelect:e.pin.bind(e,"left"),children:"Pin left"}),d.jsx(Ot,{onSelect:e.pin.bind(e,"right"),children:"Pin right"}),d.jsxs(Ot,{disabled:p===!1,onSelect:e.pin.bind(e,!1),children:[d.jsx(Bg,{className:"size-4","aria-hidden":"true"}),"Unpin"]})]})]}):null,h&&c&&(i||l)?d.jsx(Wn,{}):null,h&&c?d.jsxs(zs,{children:[d.jsxs(Bo,{children:[d.jsx(Tg,{className:"size-4","aria-hidden":"true"}),"Columns"]}),d.jsxs(zo,{className:"min-w-48",children:[d.jsx(Sr,{className:"text-xs font-normal text-muted-foreground",children:"Show columns"}),d.jsx(Wn,{}),c.getAllLeafColumns().filter(g=>g.getCanHide()).map(g=>d.jsx(Ls,{checked:g.getIsVisible(),onCheckedChange:g.toggleVisibility.bind(g),children:K0(g)},g.id))]})]}):null]})]})]})}const $f=f.forwardRef(q0);$f.displayName="DataTableColumnHeader";const Bf=6048e5,X0=864e5,zf=Symbol.for("constructDateFrom");function Ce(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&zf in e?e[zf](t):e instanceof Date?new e.constructor(t):new Date(t)}function me(e,t){return Ce(t||e,e)}function Lf(e,t,n){const r=me(e,n==null?void 0:n.in);return isNaN(t)?Ce(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Hf(e,t,n){const r=me(e,n==null?void 0:n.in);if(isNaN(t))return Ce(e,NaN);if(!t)return r;const o=r.getDate(),a=Ce(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Z0={};function Mr(){return Z0}function $n(e,t){var i,l,u,p;const n=Mr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)??0,o=me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function kr(e,t){return $n(e,{...t,weekStartsOn:1})}function Vf(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Ce(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=kr(o),s=Ce(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=kr(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Yf(e){const t=me(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 Bn(e,...t){const n=Ce.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Er(e,t){const n=me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Vs(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t),a=Er(r),s=Er(o),i=+a-Yf(a),l=+s-Yf(s);return Math.round((i-l)/X0)}function Q0(e,t){const n=Vf(e,t),r=Ce(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kr(r)}function J0(e,t,n){return Lf(e,t*7,n)}function ex(e,t,n){return Hf(e,t*12,n)}function tx(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ce.bind(null,o));const a=me(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Ce(r,n||NaN)}function nx(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Ce.bind(null,o));const a=me(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Ce(r,n||NaN)}function rx(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t);return+Er(r)==+Er(o)}function Gf(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ox(e){return!(!Gf(e)&&typeof e!="number"||isNaN(+me(e)))}function jf(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function ax(e,t){const n=me(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Rf(e,t){const[n,r]=Bn(e,t.start,t.end);return{start:n,end:r}}function sx(e,t){const{start:n,end:r}=Rf(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Ce(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function ix(e,t){const n=me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function lx(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Uf(e,t){const n=me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function cx(e,t){const{start:n,end:r}=Rf(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const l=[];for(;+s<=a;)l.push(Ce(n,s)),s.setFullYear(s.getFullYear()+i);return o?l.reverse():l}function Kf(e,t){var i,l,u,p;const n=Mr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)??0,o=me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function dx(e,t){return Kf(e,{...t,weekStartsOn:1})}const ux={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"}},fx=(e,t,n)=>{let r;const o=ux[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ys(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const px={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hx={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mx={date:Ys({formats:px,defaultWidth:"full"}),time:Ys({formats:hx,defaultWidth:"full"}),dateTime:Ys({formats:gx,defaultWidth:"full"})},vx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bx=(e,t,n,r)=>vx[e];function Dr(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const yx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xx={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"]},Cx={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"]},Sx={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"}},Nx={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"}},Mx={ordinalNumber:(e,t)=>{const 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:Dr({values:yx,defaultWidth:"wide"}),quarter:Dr({values:wx,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Dr({values:xx,defaultWidth:"wide"}),day:Dr({values:Cx,defaultWidth:"wide"}),dayPeriod:Dr({values:Sx,defaultWidth:"wide",formattingValues:Nx,defaultFormattingWidth:"wide"})};function Tr(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?Ex(i,c=>c.test(s)):kx(i,c=>c.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const p=t.slice(s.length);return{value:u,rest:p}}}function kx(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ex(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Dx(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const Tx=/^(\d+)(th|st|nd|rd)?/i,Px=/\d+/i,Ox={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},_x={any:[/^b/i,/^(a|c)/i]},Ax={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ix={any:[/1/i,/2/i,/3/i,/4/i]},Fx={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},Wx={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]},$x={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},Bx={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]},zx={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},Lx={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}},Hx={ordinalNumber:Dx({matchPattern:Tx,parsePattern:Px,valueCallback:e=>parseInt(e,10)}),era:Tr({matchPatterns:Ox,defaultMatchWidth:"wide",parsePatterns:_x,defaultParseWidth:"any"}),quarter:Tr({matchPatterns:Ax,defaultMatchWidth:"wide",parsePatterns:Ix,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Tr({matchPatterns:Fx,defaultMatchWidth:"wide",parsePatterns:Wx,defaultParseWidth:"any"}),day:Tr({matchPatterns:$x,defaultMatchWidth:"wide",parsePatterns:Bx,defaultParseWidth:"any"}),dayPeriod:Tr({matchPatterns:zx,defaultMatchWidth:"any",parsePatterns:Lx,defaultParseWidth:"any"})},zn={code:"en-US",formatDistance:fx,formatLong:mx,formatRelative:bx,localize:Mx,match:Hx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vx(e,t){const n=me(e,t==null?void 0:t.in);return Vs(n,Uf(n))+1}function Gs(e,t){const n=me(e,t==null?void 0:t.in),r=+kr(n)-+Q0(n);return Math.round(r/Bf)+1}function qf(e,t){var p,c,h,g;const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Mr(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:c.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(h=o.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=Ce((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=$n(s,t),l=Ce((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=$n(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function Yx(e,t){var i,l,u,p;const n=Mr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??1,o=qf(e,t),a=Ce((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),$n(a,t)}function js(e,t){const n=me(e,t==null?void 0:t.in),r=+$n(n,t)-+Yx(n,t);return Math.round(r/Bf)+1}function ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ut={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ge(n+1,2)},d(e,t){return ge(e.getDate(),t.length)},a(e,t){const 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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ge(e.getHours()%12||12,t.length)},H(e,t){return ge(e.getHours(),t.length)},m(e,t){return ge(e.getMinutes(),t.length)},s(e,t){return ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ge(o,t.length)}},Ln={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xf={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ut.y(e,t)},Y:function(e,t,n,r){const o=qf(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ge(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ge(a,t.length)},R:function(e,t){const n=Vf(e);return ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return ge(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ge(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"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ge(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"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ut.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"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ge(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"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=js(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ge(o,t.length)},I:function(e,t,n){const r=Gs(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ut.d(e,t)},D:function(e,t,n){const r=Vx(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ge(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ge(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ge(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ge(o,t.length);case"io":return n.ordinalNumber(o,{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"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Ln.noon:r===0?o=Ln.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Ln.evening:r>=12?o=Ln.afternoon:r>=4?o=Ln.morning:o=Ln.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ut.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ut.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ut.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ut.s(e,t)},S:function(e,t){return Ut.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Qf(r);case"XXXX":case"XX":return dn(r);case"XXXXX":case"XXX":default:return dn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Qf(r);case"xxxx":case"xx":return dn(r);case"xxxxx":case"xxx":default:return dn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Zf(r,":");case"OOOO":default:return"GMT"+dn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Zf(r,":");case"zzzz":default:return"GMT"+dn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ge(r,t.length)},T:function(e,t,n){return ge(+e,t.length)}};function Zf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ge(a,2)}function Qf(e,t){return e%60===0?(e>0?"-":"+")+ge(Math.abs(e)/60,2):dn(e,t)}function dn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ge(Math.trunc(r/60),2),a=ge(r%60,2);return n+o+t+a}const Jf=(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"});case"PPPP":default:return t.date({width:"full"})}},ep=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Gx={p:ep,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Jf(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;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Jf(r,t)).replace("{{time}}",ep(o,t))}},jx=/^D+$/,Rx=/^Y+$/,Ux=["D","DD","YY","YYYY"];function Kx(e){return jx.test(e)}function qx(e){return Rx.test(e)}function Xx(e,t,n){const r=Zx(e,t,n);if(console.warn(r),Ux.includes(e))throw new RangeError(r)}function Zx(e,t,n){const 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`}const Qx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eC=/^'([^]*?)'?$/,tC=/''/g,nC=/[a-zA-Z]/;function Hn(e,t,n){var p,c,h,g,w,m,v,y;const r=Mr(),o=(n==null?void 0:n.locale)??r.locale??zn,a=(n==null?void 0:n.firstWeekContainsDate)??((c=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(h=r.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((m=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((y=(v=r.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??0,i=me(e,n==null?void 0:n.in);if(!ox(i))throw new RangeError("Invalid time value");let l=t.match(Jx).map(b=>{const x=b[0];if(x==="p"||x==="P"){const N=Gx[x];return N(b,o.formatLong)}return b}).join("").match(Qx).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const x=b[0];if(x==="'")return{isToken:!1,value:rC(b)};if(Xf[x])return{isToken:!0,value:b};if(x.match(nC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:b}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(b=>{if(!b.isToken)return b.value;const x=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&qx(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kx(x))&&Xx(x,t,String(e));const N=Xf[x[0]];return N(i,x,o.localize,u)}).join("")}function rC(e){const t=e.match(eC);return t?t[1].replace(tC,"'"):e}function oC(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Ce(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function aC(e,t){return me(e,t==null?void 0:t.in).getMonth()}function sC(e,t){return me(e,t==null?void 0:t.in).getFullYear()}function iC(e,t){return+me(e)>+me(t)}function lC(e,t){return+me(e)<+me(t)}function cC(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function dC(e,t,n){const[r,o]=Bn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function uC(e,t,n){const r=me(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Ce(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=oC(s);return r.setMonth(t,Math.min(a,i)),r}function fC(e,t,n){const r=me(e,n==null?void 0:n.in);return isNaN(+r)?Ce(e,NaN):(r.setFullYear(t),r)}function pC(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Rs={},Pr={};function un(e,t){try{const r=(Rs[e]||(Rs[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in Pr?Pr[r]:tp(r,r.split(":"))}catch{if(e in Pr)return Pr[e];const n=e==null?void 0:e.match(hC);return n?tp(e,n.slice(1)):NaN}}const hC=/([+-]\d\d):?(\d\d)?/;function tp(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Pr[e]=n*60+r>0?n*60+r+o:n*60-r-o}class xt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),rp(this),Us(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new xt(...n,t):new xt(Date.now(),t)}withTimeZone(t){return new xt(+this,t)}getTimezoneOffset(){const t=-un(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Us(this),+this}[Symbol.for("constructDateFrom")](t){return new xt(+new Date(t),this.timeZone)}}const np=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!np.test(e))return;const t=e.replace(np,"$1UTC");xt.prototype[t]&&(e.startsWith("get")?xt.prototype[e]=function(){return this.internal[t]()}:(xt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),gC(this),+this},xt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Us(this),+this}))});function Us(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-un(e.timeZone,e)*60))}function gC(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()),rp(e)}function rp(e){const t=un(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=-new Date(+r).getTimezoneOffset(),s=o-a,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const u=new Date(+e);u.setUTCSeconds(0);const p=o>0?u.getSeconds():(u.getSeconds()-60)%60,c=Math.round(-(un(e.timeZone,e)*60))%60;(c||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+c),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+c+p));const h=un(e.timeZone,e),g=h>0?Math.floor(h):Math.ceil(h),m=-new Date(+e).getTimezoneOffset()-g,v=g!==n,y=m-l;if(v&&y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const b=un(e.timeZone,e),x=b>0?Math.floor(b):Math.ceil(b),N=g-x;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}class Ie extends xt{static tz(t,...n){return n.length?new Ie(...n,t):new Ie(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${pC(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Ie(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ie(+new Date(t),this.timeZone)}}const op=5,mC=4;function vC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,op*7-1);return t.getMonth(e)===t.getMonth(a)?op:mC}function ap(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function bC(e,t){const n=ap(e,t),r=vC(e,t);return t.addDays(n,r*7-1)}const sp={...zn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Hn(s,i,{locale:zn,...n});let a=o(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 n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Hn(o,a,{locale:zn,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Hn(s,i,{locale:zn,...n});let a=o(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Hn(o,a,{locale:zn,...t}),r(e,"cccc")}}};class Ge{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ie.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Ie(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):Lf(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Hf(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):J0(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):ex(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Vs(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):jf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):sx(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):cx(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const s=[];return a.forEach(l=>{s.push(new Date(l,0,1))}),s},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):bC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):dx(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):ax(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Kf(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):lx(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Hn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Gs(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):aC(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):sC(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):js(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):iC(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):lC(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Gf(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):rx(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):cC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):dC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):tx(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):nx(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):uC(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):fC(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ap(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Er(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):kr(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):ix(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):$n(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Uf(r)},this.options={locale:sp,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&Ge.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,a=n==null?void 0:n.code;if(a&&Ge.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Ge.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"]);const Ct=new Ge;class ip{constructor(t,n,r=Ct){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class yC{constructor(t,n){this.date=t,this.weeks=n}}class wC{constructor(t,n){this.days=n,this.weekNumber=t}}function xC(e){return S.createElement("button",{...e})}function CC(e){return S.createElement("span",{...e})}function SC(e){const{size:t=24,orientation:n="left",className:r}=e;return S.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&S.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&S.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&S.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&S.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function NC(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function MC(e){const{day:t,modifiers:n,...r}=e,o=S.useRef(null);return S.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),S.createElement("button",{ref:o,...r})}var ee;(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"})(ee||(ee={}));var be;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(be||(be={}));var dt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(dt||(dt={}));var je;(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"})(je||(je={}));function kC(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[ee.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return S.createElement("span",{"data-disabled":a.disabled,className:o[ee.DropdownRoot]},S.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:p})=>S.createElement(r.Option,{key:l,value:l,disabled:p},u))),S.createElement("span",{className:o[ee.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,S.createElement(r.Chevron,{orientation:"down",size:18,className:o[ee.Chevron]})))}function EC(e){return S.createElement("div",{...e})}function DC(e){return S.createElement("div",{...e})}function TC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function PC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function OC(e){return S.createElement("table",{...e})}function _C(e){return S.createElement("div",{...e})}const lp=S.createContext(void 0);function Or(){const e=S.useContext(lp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function AC(e){const{components:t}=Or();return S.createElement(t.Dropdown,{...e})}function IC(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=Or(),p=S.useCallback(h=>{o&&(n==null||n(h))},[o,n]),c=S.useCallback(h=>{r&&(t==null||t(h))},[r,t]);return S.createElement("nav",{...a},S.createElement(s.PreviousMonthButton,{type:"button",className:i[ee.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},S.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[ee.Chevron],orientation:"left"})),S.createElement(s.NextMonthButton,{type:"button",className:i[ee.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:p},S.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ee.Chevron]})))}function FC(e){const{components:t}=Or();return S.createElement(t.Button,{...e})}function WC(e){return S.createElement("option",{...e})}function $C(e){const{components:t}=Or();return S.createElement(t.Button,{...e})}function BC(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function zC(e){return S.createElement("select",{...e})}function LC(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function HC(e){return S.createElement("th",{...e})}function VC(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function YC(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function GC(e){return S.createElement("th",{...e})}function jC(e){return S.createElement("tbody",{...e})}function RC(e){const{components:t}=Or();return S.createElement(t.Dropdown,{...e})}const UC=Object.freeze(Object.defineProperty({__proto__:null,Button:xC,CaptionLabel:CC,Chevron:SC,Day:NC,DayButton:MC,Dropdown:kC,DropdownNav:EC,Footer:DC,Month:TC,MonthCaption:PC,MonthGrid:OC,Months:_C,MonthsDropdown:AC,Nav:IC,NextMonthButton:FC,Option:WC,PreviousMonthButton:$C,Root:BC,Select:zC,Week:LC,WeekNumber:YC,WeekNumberHeader:GC,Weekday:HC,Weekdays:VC,Weeks:jC,YearsDropdown:RC},Symbol.toStringTag,{value:"Module"}));function At(e,t,n=!1,r=Ct){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Ks(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ho(e){return!!(e&&typeof e=="object"&&"from"in e)}function qs(e){return!!(e&&typeof e=="object"&&"after"in e)}function Xs(e){return!!(e&&typeof e=="object"&&"before"in e)}function cp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function dp(e,t){return Array.isArray(e)&&e.every(t.isDate)}function It(e,t,n=Ct){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(dp(i,n))return i.some(l=>o(e,l));if(Ho(i))return At(i,e,!1,n);if(cp(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Ks(i)){const l=a(i.before,e),u=a(i.after,e),p=l>0,c=u<0;return s(i.before,i.after)?c&&p:p||c}return qs(i)?a(e,i.after)>0:Xs(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function KC(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:u,today:p=o.today()}=t,{isSameDay:c,isSameMonth:h,startOfMonth:g,isBefore:w,endOfMonth:m,isAfter:v}=o,y=n&&g(n),b=r&&m(r),x={[be.focused]:[],[be.outside]:[],[be.disabled]:[],[be.hidden]:[],[be.today]:[]},N={};for(const M of e){const{date:C,displayMonth:k}=M,O=!!(k&&!h(C,k)),V=!!(y&&w(C,y)),$=!!(b&&v(C,b)),U=!!(a&&It(C,a,o)),B=!!(s&&It(C,s,o))||V||$||!u&&!l&&O||u&&l===!1&&O,q=c(C,p);O&&x.outside.push(M),U&&x.disabled.push(M),B&&x.hidden.push(M),q&&x.today.push(M),i&&Object.keys(i).forEach(Y=>{const ae=i==null?void 0:i[Y];ae&&It(C,ae,o)&&(N[Y]?N[Y].push(M):N[Y]=[M])})}return M=>{const C={[be.focused]:!1,[be.disabled]:!1,[be.hidden]:!1,[be.outside]:!1,[be.today]:!1},k={};for(const O in x){const V=x[O];C[O]=V.some($=>$===M)}for(const O in N)k[O]=N[O].some(V=>V===M);return{...C,...k}}}function qC(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[be[a]]?o.push(t[be[a]]):t[dt[a]]&&o.push(t[dt[a]]),o),[t[ee.Day]])}function XC(e){return{...UC,...e}}function ZC(e){const 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(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function QC(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in be)e[be[t]]=`rdp-${be[t]}`;for(const t in dt)e[dt[t]]=`rdp-${dt[t]}`;for(const t in je)e[je[t]]=`rdp-${je[t]}`;return e}function up(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const JC=up;function eS(e,t,n){return(n??new Ge(t)).format(e,"d")}function tS(e,t=Ct){return t.format(e,"LLLL")}function nS(e,t,n){return(n??new Ge(t)).format(e,"cccccc")}function rS(e,t=Ct){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function oS(){return""}function fp(e,t=Ct){return t.format(e,"yyyy")}const aS=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:up,formatDay:eS,formatMonthCaption:JC,formatMonthDropdown:tS,formatWeekNumber:rS,formatWeekNumberHeader:oS,formatWeekdayName:nS,formatYearCaption:fp,formatYearDropdown:fp},Symbol.toStringTag,{value:"Module"}));function sS(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...aS,...e}}function Zs(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const iS=Zs;function Qs(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const lS=Qs;function pp(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function hp(e){return"Choose the Month"}function gp(){return""}const cS="Go to the Next Month";function mp(e,t){return cS}function vp(e){return"Go to the Previous Month"}function bp(e,t,n){return(n??new Ge(t)).format(e,"cccc")}function yp(e,t){return`Week ${e}`}function wp(e){return"Week Number"}function xp(e){return"Choose the Year"}const dS=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:lS,labelDay:iS,labelDayButton:Zs,labelGrid:Qs,labelGridcell:pp,labelMonthDropdown:hp,labelNav:gp,labelNext:mp,labelPrevious:vp,labelWeekNumber:yp,labelWeekNumberHeader:wp,labelWeekday:bp,labelYearDropdown:xp},Symbol.toStringTag,{value:"Module"})),ut=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function uS(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...dS,...e??{},labelDayButton:ut(Zs,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:ut(hp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:ut(mp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:ut(vp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:ut(yp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:ut(xp,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:ut(Qs,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:ut(pp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:ut(gp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:ut(wp,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:ut(bp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function fS(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:u}=o;return l({start:s(e),end:i(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),w=u(h),m=t&&h<a(t)||n&&h>a(n)||!1;return{value:w,label:g,disabled:m}})}function pS(e,t={},n={}){let r={...t==null?void 0:t[ee.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function hS(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),s=[];for(let i=0;i<7;i++){const l=e.addDays(a,i);s.push(l)}return s}function gS(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:l}=r,u=a(e),p=s(t),c=i({start:u,end:p});return o&&c.reverse(),c.map(h=>{const g=n.formatYearDropdown(h,r);return{value:l(h),label:g,disabled:!1}})}function mS(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,o=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,a=l=>{const u=typeof l=="number"||typeof l=="string"?new Date(l):l;return new Ie(u.getFullYear(),u.getMonth(),u.getDate(),12,0,0,e)},s=l=>{const u=a(l);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0,0)};return{today:()=>a(Ie.tz(e)),newDate:(l,u,p)=>new Ie(l,u,p,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,u)=>{const p=a(l),c=(u==null?void 0:u.weekStartsOn)??o,h=(p.getDay()-c+7)%7;return p.setDate(p.getDate()-h),p},startOfISOWeek:l=>{const u=a(l),p=(u.getDay()-1+7)%7;return u.setDate(u.getDate()-p),u},startOfMonth:l=>{const u=a(l);return u.setDate(1),u},startOfYear:l=>{const u=a(l);return u.setMonth(0,1),u},endOfWeek:(l,u)=>{const p=a(l),g=((((u==null?void 0:u.weekStartsOn)??o)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+g),p},endOfISOWeek:l=>{const u=a(l),p=(7-u.getDay())%7;return u.setDate(u.getDate()+p),u},endOfMonth:l=>{const u=a(l);return u.setMonth(u.getMonth()+1,0),u},endOfYear:l=>{const u=a(l);return u.setMonth(11,31),u},eachMonthOfInterval:l=>{const u=a(l.start),p=a(l.end),c=[],h=new Ie(u.getFullYear(),u.getMonth(),1,12,0,0,e),g=p.getFullYear()*12+p.getMonth();for(;h.getFullYear()*12+h.getMonth()<=g;)c.push(new Ie(h,e)),h.setMonth(h.getMonth()+1,1);return c},addDays:(l,u)=>{const p=a(l);return p.setDate(p.getDate()+u),p},addWeeks:(l,u)=>{const p=a(l);return p.setDate(p.getDate()+u*7),p},addMonths:(l,u)=>{const p=a(l);return p.setMonth(p.getMonth()+u),p},addYears:(l,u)=>{const p=a(l);return p.setFullYear(p.getFullYear()+u),p},eachYearOfInterval:l=>{const u=a(l.start),p=a(l.end),c=[],h=new Ie(u.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=p.getFullYear();)c.push(new Ie(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return c},getWeek:(l,u)=>{var c;const p=s(l);return js(p,{weekStartsOn:(u==null?void 0:u.weekStartsOn)??o,firstWeekContainsDate:(u==null?void 0:u.firstWeekContainsDate)??((c=r==null?void 0:r.options)==null?void 0:c.firstWeekContainsDate)??1})},getISOWeek:l=>{const u=s(l);return Gs(u)},differenceInCalendarDays:(l,u)=>{const p=s(l),c=s(u);return Vs(p,c)},differenceInCalendarMonths:(l,u)=>{const p=s(l),c=s(u);return jf(p,c)}}}const _r=e=>e instanceof HTMLElement?e:null,Js=e=>[...e.querySelectorAll("[data-animated-month]")??[]],vS=e=>_r(e.querySelector("[data-animated-month]")),ei=e=>_r(e.querySelector("[data-animated-caption]")),ti=e=>_r(e.querySelector("[data-animated-weeks]")),bS=e=>_r(e.querySelector("[data-animated-nav]")),yS=e=>_r(e.querySelector("[data-animated-weekdays]"));function wS(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=S.useRef(null),i=S.useRef(r),l=S.useRef(!1);S.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const p=a.isSameMonth(r[0].date,u[0].date),c=a.isAfter(r[0].date,u[0].date),h=c?n[je.caption_after_enter]:n[je.caption_before_enter],g=c?n[je.weeks_after_enter]:n[je.weeks_before_enter],w=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(Js(m).forEach(x=>{if(!(x instanceof HTMLElement))return;const N=vS(x);N&&x.contains(N)&&x.removeChild(N);const M=ei(x);M&&M.classList.remove(h);const C=ti(x);C&&C.classList.remove(g)}),s.current=m):s.current=null,l.current||p||o)return;const v=w instanceof HTMLElement?Js(w):[],y=Js(e.current);if(y!=null&&y.every(b=>b instanceof HTMLElement)&&v&&v.every(b=>b instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const b=bS(e.current);b&&(b.style.zIndex="1"),y.forEach((x,N)=>{const M=v[N];if(!M)return;x.style.position="relative",x.style.overflow="hidden";const C=ei(x);C&&C.classList.add(h);const k=ti(x);k&&k.classList.add(g);const O=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),C&&C.classList.remove(h),k&&k.classList.remove(g),x.style.position="",x.style.overflow="",x.contains(M)&&x.removeChild(M)};M.style.pointerEvents="none",M.style.position="absolute",M.style.overflow="hidden",M.setAttribute("aria-hidden","true");const V=yS(M);V&&(V.style.opacity="0");const $=ei(M);$&&($.classList.add(c?n[je.caption_before_exit]:n[je.caption_after_exit]),$.addEventListener("animationend",O));const U=ti(M);U&&U.classList.add(c?n[je.weeks_before_exit]:n[je.weeks_after_exit]),x.insertBefore(M,x.firstChild)})}})}function xS(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:p,differenceInCalendarMonths:c,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:w,endOfWeek:m,isAfter:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:x}=r,N=l?y(o,r):s?b(o):x(o),M=l?h(a):s?g(w(a)):m(w(a)),C=t&&(l?h(t):s?g(t):m(t)),k=C&&v(M,C)?C:M,O=p(k,N),V=c(a,o)+1,$=[];for(let q=0;q<=O;q++){const Y=u(N,q);$.push(Y)}const B=(l?35:42)*V;if(i&&$.length<B){const q=B-$.length;for(let Y=0;Y<q;Y++){const ae=u($[$.length-1],1);$.push(ae)}}return $}function CS(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>a.concat(s.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function SS(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function Cp(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:u,addMonths:p,startOfMonth:c}=r;if(n&&u(n,l)<i-1){const h=-1*(i-1);l=p(n,h)}return t&&u(l,t)<0&&(l=t),c(l)}function NS(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:u,getWeek:p,startOfBroadcastWeek:c,startOfISOWeek:h,startOfWeek:g}=r,w=e.reduce((m,v)=>{const y=n.broadcastCalendar?c(v,r):n.ISOWeek?h(v):g(v),b=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),x=t.filter(k=>k>=y&&k<=b),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<N){const k=t.filter(O=>{const V=N-x.length;return O>b&&O<=o(b,V)});x.push(...k)}const M=x.reduce((k,O)=>{const V=n.ISOWeek?u(O):p(O),$=k.find(B=>B.weekNumber===V),U=new ip(O,v,r);return $?$.days.push(U):k.push(new wC(V,[U])),k},[]),C=new yC(v,M);return m.push(C),m},[]);return n.reverseMonths?w.reverse():w}function MS(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:u,newDate:p,today:c}=t,{fromYear:h,toYear:g,fromMonth:w,toMonth:m}=e;!n&&w&&(n=w),!n&&h&&(n=t.newDate(h,0,1)),!r&&m&&(r=m),!r&&g&&(r=p(g,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):h?n=p(h,0,1):!n&&v&&(n=o(l(e.today??c(),-100))),r?r=i(r):g?r=p(g,11,31):!r&&v&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function kS(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a:1,p=s(e);if(!t)return i(p,u);if(!(l(t,e)<a))return i(p,u)}function ES(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a??1:1,p=s(e);if(!t)return i(p,-u);if(!(l(p,t)<=0))return i(p,-u)}function DS(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Vo(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function TS(e,t){var N;const[n,r]=MS(e,t),{startOfMonth:o,endOfMonth:a}=t,s=Cp(e,n,r,t),[i,l]=Vo(s,e.month?s:void 0);S.useEffect(()=>{const M=Cp(e,n,r,t);l(M)},[e.timeZone]);const{months:u,weeks:p,days:c,previousMonth:h,nextMonth:g}=S.useMemo(()=>{const M=SS(i,r,{numberOfMonths:e.numberOfMonths},t),C=xS(M,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),k=NS(M,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),O=DS(k),V=CS(k),$=ES(i,n,e,t),U=kS(i,r,e,t);return{months:k,weeks:O,days:V,previousMonth:$,nextMonth:U}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(N=e.endMonth)==null?void 0:N.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:w,onMonthChange:m}=e,v=M=>p.some(C=>C.days.some(k=>k.isEqualTo(M))),y=M=>{if(w)return;let C=o(M);n&&C<o(n)&&(C=o(n)),r&&C>o(r)&&(C=o(r)),l(C),m==null||m(C)};return{months:u,weeks:p,days:c,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:y,goToDay:M=>{v(M)||y(M.date)}}}var St;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(St||(St={}));function Sp(e){return!e[be.disabled]&&!e[be.hidden]&&!e[be.outside]}function PS(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);Sp(i)&&(i[be.focused]&&a<St.FocusedModifier?(o=s,a=St.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<St.LastFocused?(o=s,a=St.LastFocused):n(s.date)&&a<St.Selected?(o=s,a=St.Selected):i[be.today]&&a<St.Today&&(o=s,a=St.Today))}return o||(o=e.find(s=>Sp(t(s)))),o}function OS(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:u,addMonths:p,addWeeks:c,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:w,endOfWeek:m,max:v,min:y,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:N}=s;let C={day:u,week:c,month:p,year:h,startOfWeek:k=>l?b(k,s):i?x(k):N(k),endOfWeek:k=>l?g(k):i?w(k):m(k)}[e](n,t==="after"?1:-1);return t==="before"&&r?C=v([r,C]):t==="after"&&o&&(C=y([o,C])),C}function Np(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=OS(e,t,n.date,r,o,a,s),u=!!(a.disabled&&It(l,a.disabled,s)),p=!!(a.hidden&&It(l,a.hidden,s)),c=l,h=new ip(l,c,s);return!u&&!p?h:Np(e,t,h,r,o,a,s,i+1)}function _S(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=S.useState(),l=PS(t.days,n,r||(()=>!1),s),[u,p]=S.useState(a?l:void 0);return{isFocusTarget:m=>!!(l!=null&&l.isEqualTo(m)),setFocused:p,focused:u,blur:()=>{i(u),p(void 0)},moveFocus:(m,v)=>{if(!u)return;const y=Np(m,v,u,t.navStart,t.navEnd,e,o);y&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(y))||(t.goToDay(y),p(y)))}}}function AS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Vo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,u=g=>(i==null?void 0:i.some(w=>l(w,g)))??!1,{min:p,max:c}=e;return{selected:i,select:(g,w,m)=>{let v=[...i??[]];if(u(g)){if((i==null?void 0:i.length)===p||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(y=>!l(y,g))}else(i==null?void 0:i.length)===c?v=[g]:v=[...v,g];return o||s(v),o==null||o(v,g,w,m),v},isSelected:u}}function IS(e,t,n=0,r=0,o=!1,a=Ct){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:u,isBefore:p}=a;let c;if(!s&&!i)c={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?n===0?c={from:s,to:e}:o?c={from:s,to:void 0}:c=void 0:p(e,s)?c={from:e,to:s}:c={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?c={from:s,to:i}:c=void 0;else if(l(s,e))c={from:s,to:n>0?void 0:e};else if(l(i,e))c={from:e,to:n>0?void 0:e};else if(p(e,s))c={from:e,to:i};else if(u(e,s))c={from:s,to:e};else if(u(e,i))c={from:s,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const h=a.differenceInCalendarDays(c.to,c.from);r>0&&h>r?c={from:e,to:void 0}:n>1&&h<n&&(c={from:e,to:void 0})}return c}function FS(e,t,n=Ct){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Mp(e,t,n=Ct){return At(e,t.from,!1,n)||At(e,t.to,!1,n)||At(t,e.from,!1,n)||At(t,e.to,!1,n)}function WS(e,t,n=Ct){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?At(e,i,!1,n):dp(i,n)?i.some(l=>At(e,l,!1,n)):Ho(i)?i.from&&i.to?Mp(e,{from:i.from,to:i.to},n):!1:cp(i)?FS(e,i.dayOfWeek,n):Ks(i)?n.isAfter(i.before,i.after)?Mp(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):It(e.from,i,n)||It(e.to,i,n):qs(i)||Xs(i)?It(e.from,i,n)||It(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(p=>p(i)))return!0;i=n.addDays(i,1)}}return!1}function $S(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,u]=Vo(a,i?a:void 0),p=i?a:l;return{selected:p,select:(g,w,m)=>{const{min:v,max:y}=e;let b;if(g){const x=p==null?void 0:p.from,N=p==null?void 0:p.to,M=!!x&&!!N,C=!!x&&!!N&&t.isSameDay(x,N)&&t.isSameDay(g,x);o&&(M||!(p!=null&&p.from))?!s&&C?b=void 0:b={from:g,to:void 0}:b=IS(g,p,v,y,s,t)}return r&&n&&(b!=null&&b.from)&&b.to&&WS({from:b.from,to:b.to},n,t)&&(b.from=g,b.to=void 0),i||u(b),i==null||i(b,g,w,m),b},isSelected:g=>p&&At(p,g,!1,t)}}function BS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Vo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(c,h,g)=>{let w=c;return!r&&i&&i&&l(c,i)&&(w=void 0),o||s(w),o==null||o(w,c,h,g),w},isSelected:c=>i?l(i,c):!1}}function zS(e,t){const n=BS(e,t),r=AS(e,t),o=$S(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function et(e,t){return e instanceof Ie&&e.timeZone===t?e:new Ie(e,t)}function Vn(e,t,n){return et(e,t)}function kp(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Vn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Vn(r,t):r):Ho(e)?{...e,from:e.from?et(e.from,t):e.from,to:e.to?et(e.to,t):e.to}:Ks(e)?{before:Vn(e.before,t),after:Vn(e.after,t)}:qs(e)?{after:Vn(e.after,t)}:Xs(e)?{before:Vn(e.before,t)}:e}function ni(e,t,n){return e&&(Array.isArray(e)?e.map(r=>kp(r,t)):kp(e,t))}function LS(e){var Ue;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=et(t.today,n)),t.month&&(t.month=et(t.month,n)),t.defaultMonth&&(t.defaultMonth=et(t.defaultMonth,n)),t.startMonth&&(t.startMonth=et(t.startMonth,n)),t.endMonth&&(t.endMonth=et(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=et(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(Ue=t.selected)==null?void 0:Ue.map(ie=>et(ie,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?et(t.selected.from,n):t.selected.from,to:t.selected.to?et(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=ni(t.disabled,n)),t.hidden!==void 0&&(t.hidden=ni(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(pe=>{var re;ie[pe]=ni((re=t.modifiers)==null?void 0:re[pe],n)}),t.modifiers=ie}const{components:r,formatters:o,labels:a,dateLib:s,locale:i,classNames:l}=S.useMemo(()=>{const ie={...sp,...t.locale},pe=t.broadcastCalendar?1:t.weekStartsOn,re=t.noonSafe&&t.timeZone?mS(t.timeZone,{weekStartsOn:pe,locale:ie}):void 0,ue=t.dateLib&&re?{...re,...t.dateLib}:t.dateLib??re,J=new Ge({locale:ie,weekStartsOn:pe,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},ue);return{dateLib:J,components:XC(t.components),formatters:sS(t.formatters),labels:uS(t.labels,J.options),locale:ie,classNames:{...QC(),...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:s.today()});const{captionLayout:u,mode:p,navLayout:c,numberOfMonths:h=1,onDayBlur:g,onDayClick:w,onDayFocus:m,onDayKeyDown:v,onDayMouseEnter:y,onDayMouseLeave:b,onNextClick:x,onPrevClick:N,showWeekNumber:M,styles:C}=t,{formatCaption:k,formatDay:O,formatMonthDropdown:V,formatWeekNumber:$,formatWeekNumberHeader:U,formatWeekdayName:B,formatYearDropdown:q}=o,Y=TS(t,s),{days:ae,months:W,navStart:K,navEnd:G,previousMonth:_,nextMonth:Q,goToMonth:oe}=Y,P=KC(ae,t,K,G,s),{isSelected:A,select:H,selected:F}=zS(t,s)??{},{blur:Z,focused:I,isFocusTarget:R,moveFocus:X,setFocused:se}=_S(t,Y,P,A??(()=>!1),s),{labelDayButton:de,labelGridcell:ce,labelGrid:ke,labelMonthDropdown:De,labelNav:tt,labelPrevious:Re,labelNext:Fe,labelWeekday:Kt,labelWeekNumber:Ee,labelWeekNumberHeader:Fr,labelYearDropdown:Wr}=a,Oe=S.useMemo(()=>hS(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),ft=p!==void 0||w!==void 0,We=S.useCallback(()=>{_&&(oe(_),N==null||N(_))},[_,oe,N]),fn=S.useCallback(()=>{Q&&(oe(Q),x==null||x(Q))},[oe,Q,x]),qt=S.useCallback((ie,pe)=>re=>{re.preventDefault(),re.stopPropagation(),se(ie),!pe.disabled&&(H==null||H(ie.date,pe,re),w==null||w(ie.date,pe,re))},[H,w,se]),Gn=S.useCallback((ie,pe)=>re=>{se(ie),m==null||m(ie.date,pe,re)},[m,se]),Mt=S.useCallback((ie,pe)=>re=>{Z(),g==null||g(ie.date,pe,re)},[Z,g]),Xt=S.useCallback((ie,pe)=>re=>{const ue={ArrowLeft:[re.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[re.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[re.shiftKey?"year":"week","after"],ArrowUp:[re.shiftKey?"year":"week","before"],PageUp:[re.shiftKey?"year":"month","before"],PageDown:[re.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ue[re.key]){re.preventDefault(),re.stopPropagation();const[J,te]=ue[re.key];X(J,te)}v==null||v(ie.date,pe,re)},[X,v,t.dir]),Le=S.useCallback((ie,pe)=>re=>{y==null||y(ie.date,pe,re)},[y]),jn=S.useCallback((ie,pe)=>re=>{b==null||b(ie.date,pe,re)},[b]),pt=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setMonth(s.startOfMonth(ie),re);oe(ue)},[s,oe]),Rn=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setYear(s.startOfMonth(ie),re);oe(ue)},[s,oe]),{className:Un,style:ht}=S.useMemo(()=>({className:[l[ee.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ee.Root],...t.style}}),[l,t.className,t.style,C]),Kn=ZC(t),qn=S.useRef(null);wS(qn,!!t.animate,{classNames:l,months:W,focused:I,dateLib:s});const pn={dayPickerProps:t,selected:F,select:H,isSelected:A,months:W,nextMonth:Q,previousMonth:_,goToMonth:oe,getModifiers:P,components:r,classNames:l,styles:C,labels:a,formatters:o};return S.createElement(lp.Provider,{value:pn},S.createElement(r.Root,{rootRef:t.animate?qn:void 0,className:Un,style:ht,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Kn},S.createElement(r.Months,{className:l[ee.Months],style:C==null?void 0:C[ee.Months]},!t.hideNavigation&&!c&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:fn,previousMonth:_,nextMonth:Q}),W.map((ie,pe)=>S.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ee.Month],style:C==null?void 0:C[ee.Month],key:pe,displayIndex:pe,calendarMonth:ie},c==="around"&&!t.hideNavigation&&pe===0&&S.createElement(r.PreviousMonthButton,{type:"button",className:l[ee.PreviousMonthButton],tabIndex:_?void 0:-1,"aria-disabled":_?void 0:!0,"aria-label":Re(_),onClick:We,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:_?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"right":"left"})),S.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ee.MonthCaption],style:C==null?void 0:C[ee.MonthCaption],calendarMonth:ie,displayIndex:pe},u!=null&&u.startsWith("dropdown")?S.createElement(r.DropdownNav,{className:l[ee.Dropdowns],style:C==null?void 0:C[ee.Dropdowns]},(()=>{const re=u==="dropdown"||u==="dropdown-months"?S.createElement(r.MonthsDropdown,{key:"month",className:l[ee.MonthsDropdown],"aria-label":De(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:pt(ie.date),options:fS(ie.date,K,G,o,s),style:C==null?void 0:C[ee.Dropdown],value:s.getMonth(ie.date)}):S.createElement("span",{key:"month"},V(ie.date,s)),ue=u==="dropdown"||u==="dropdown-years"?S.createElement(r.YearsDropdown,{key:"year",className:l[ee.YearsDropdown],"aria-label":Wr(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Rn(ie.date),options:gS(K,G,o,s,!!t.reverseYears),style:C==null?void 0:C[ee.Dropdown],value:s.getYear(ie.date)}):S.createElement("span",{key:"year"},q(ie.date,s));return s.getMonthYearOrder()==="year-first"?[ue,re]:[re,ue]})(),S.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"}},k(ie.date,s.options,s))):S.createElement(r.CaptionLabel,{className:l[ee.CaptionLabel],role:"status","aria-live":"polite"},k(ie.date,s.options,s))),c==="around"&&!t.hideNavigation&&pe===h-1&&S.createElement(r.NextMonthButton,{type:"button",className:l[ee.NextMonthButton],tabIndex:Q?void 0:-1,"aria-disabled":Q?void 0:!0,"aria-label":Fe(Q),onClick:fn,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:Q?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"left":"right"})),pe===h-1&&c==="after"&&!t.hideNavigation&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:fn,previousMonth:_,nextMonth:Q}),S.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":ke(ie.date,s.options,s)||void 0,className:l[ee.MonthGrid],style:C==null?void 0:C[ee.MonthGrid]},!t.hideWeekdays&&S.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ee.Weekdays],style:C==null?void 0:C[ee.Weekdays]},M&&S.createElement(r.WeekNumberHeader,{"aria-label":Fr(s.options),className:l[ee.WeekNumberHeader],style:C==null?void 0:C[ee.WeekNumberHeader],scope:"col"},U()),Oe.map(re=>S.createElement(r.Weekday,{"aria-label":Kt(re,s.options,s),className:l[ee.Weekday],key:String(re),style:C==null?void 0:C[ee.Weekday],scope:"col"},B(re,s.options,s)))),S.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ee.Weeks],style:C==null?void 0:C[ee.Weeks]},ie.weeks.map(re=>S.createElement(r.Week,{className:l[ee.Week],key:re.weekNumber,style:C==null?void 0:C[ee.Week],week:re},M&&S.createElement(r.WeekNumber,{week:re,style:C==null?void 0:C[ee.WeekNumber],"aria-label":Ee(re.weekNumber,{locale:i}),className:l[ee.WeekNumber],scope:"row",role:"rowheader"},$(re.weekNumber,s)),re.days.map(ue=>{const{date:J}=ue,te=P(ue);if(te[be.focused]=!te.hidden&&!!(I!=null&&I.isEqualTo(ue)),te[dt.selected]=(A==null?void 0:A(J))||te.selected,Ho(F)){const{from:ye,to:Te}=F;te[dt.range_start]=!!(ye&&Te&&s.isSameDay(J,ye)),te[dt.range_end]=!!(ye&&Te&&s.isSameDay(J,Te)),te[dt.range_middle]=At(F,J,!0,s)}const Se=pS(te,C,t.modifiersStyles),_e=qC(te,l,t.modifiersClassNames),Zt=!ft&&!te.hidden?ce(J,te,s.options,s):void 0;return S.createElement(r.Day,{key:`${ue.isoDate}_${ue.displayMonthId}`,day:ue,modifiers:te,className:_e.join(" "),style:Se,role:"gridcell","aria-selected":te.selected||void 0,"aria-label":Zt,"data-day":ue.isoDate,"data-month":ue.outside?ue.dateMonthId:void 0,"data-selected":te.selected||void 0,"data-disabled":te.disabled||void 0,"data-hidden":te.hidden||void 0,"data-outside":ue.outside||void 0,"data-focused":te.focused||void 0,"data-today":te.today||void 0},!te.hidden&&ft?S.createElement(r.DayButton,{className:l[ee.DayButton],style:C==null?void 0:C[ee.DayButton],type:"button",day:ue,modifiers:te,disabled:!te.focused&&te.disabled||void 0,"aria-disabled":te.focused&&te.disabled||void 0,tabIndex:R(ue)?0:-1,"aria-label":de(J,te,s.options,s),onClick:qt(ue,te),onBlur:Mt(ue,te),onFocus:Gn(ue,te),onKeyDown:Xt(ue,te),onMouseEnter:Le(ue,te),onMouseLeave:jn(ue,te)},O(J,s.options,s)):!te.hidden&&O(ue.date,s.options,s))})))))))),t.footer&&S.createElement(r.Footer,{className:l[ee.Footer],style:C==null?void 0:C[ee.Footer],role:"status","aria-live":"polite"},t.footer)))}const Ep=Me(["w-full flex items-center gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),ri=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>d.jsxs("button",{ref:s,type:"button",className:D(Ep({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[d.jsx(Eg,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),d.jsx("span",{className:D("flex-1 truncate text-left",!o&&"text-muted-foreground"),children:o??r})]}));ri.displayName="DatePickerTrigger";const oi=({className:e,classNames:t,...n})=>d.jsx(LS,{showOutsideDays:!0,className:D("p-3",e),classNames:{months:"relative flex gap-4",month:"flex flex-col gap-3",month_caption:"flex h-9 items-center justify-center",caption_label:"text-sm font-medium pointer-events-none",nav:"absolute inset-x-0 top-0 z-10 flex h-9 items-center justify-between",button_previous:D("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),button_next:D("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),month_grid:"w-full border-collapse",weekdays:"flex",weekday:"flex h-9 w-9 items-center justify-center text-xs font-normal text-muted-foreground",week:"mt-1 flex",day:"flex h-9 w-9 items-center justify-center p-0",day_button:D("h-9 w-9 rounded-md p-0 text-sm font-normal","transition-colors duration-100","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-selected:opacity-100"),selected:"rounded-md bg-primary text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",today:"rounded-md bg-accent text-accent-foreground",outside:"opacity-50 text-muted-foreground",disabled:"opacity-30 text-muted-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:r})=>r==="left"?d.jsx(Qi,{className:"size-4","aria-hidden":"true"}):d.jsx(vn,{className:"size-4","aria-hidden":"true"})},...n});oi.displayName="Calendar";const Dp=In;Dp.displayName="DatePickerRoot";const Tp=f.forwardRef(({className:e,align:t="start",...n},r)=>d.jsx(on,{ref:r,align:t,className:D("w-auto p-0",e),...n}));Tp.displayName="DatePickerContent";const Pp=f.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a date",formatStr:r="PPP",size:o,isError:a,disabled:s,className:i},l)=>{const[u,p]=f.useState(!1),c=e?Hn(e,r):void 0;return d.jsxs(In,{open:u,onOpenChange:p,children:[d.jsx(So,{asChild:!0,children:d.jsx(ri,{ref:l,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":u,"aria-haspopup":"dialog",children:c})}),d.jsx(on,{className:"w-auto p-0",align:"start",children:d.jsx(oi,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),p(!1)},defaultMonth:e})})]})});Pp.displayName="DatePicker";const Op=vc,_p=Xv,Ap=Zv,Ip=bc,ai=f.forwardRef(({className:e,...t},n)=>d.jsx(Ta,{ref:n,className:D("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-dialog-overlay-in","data-[state=closed]:animate-dialog-overlay-out",e),...t}));ai.displayName=Ta.displayName;const si=f.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>d.jsxs(Ip,{children:[d.jsx(ai,{}),d.jsx(Pa,{ref:i,onInteractOutside:l=>{n||l.preventDefault(),r==null||r(l)},onPointerDownOutside:l=>{n||l.preventDefault(),o==null||o(l)},onEscapeKeyDown:l=>{n||l.preventDefault(),a==null||a(l)},className:D("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-full max-w-lg rounded-xl bg-background p-6","ring-1 ring-border/60 shadow-lg","data-[state=open]:animate-dialog-content-in","data-[state=closed]:animate-dialog-content-out",e),...s,children:t})]}));si.displayName=Pa.displayName;const ii=({className:e,...t})=>d.jsx("div",{className:D("flex flex-col gap-1.5 mb-4",e),...t});ii.displayName="DialogHeader";const li=({className:e,...t})=>d.jsx("div",{className:D("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});li.displayName="DialogFooter";const ci=f.forwardRef(({className:e,...t},n)=>d.jsx(yc,{ref:n,className:D("text-lg font-semibold leading-none text-balance",e),...t}));ci.displayName=yc.displayName;const di=f.forwardRef(({className:e,...t},n)=>d.jsx(wc,{ref:n,className:D("text-sm text-muted-foreground text-pretty",e),...t}));di.displayName=wc.displayName;const Fp=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>d.jsxs(Op,{...i,children:[e&&d.jsx(_p,{asChild:!0,children:e}),d.jsxs(si,{className:a,dismissible:s,children:[s&&d.jsx(Ap,{className:D("absolute right-4 top-4 rounded-md p-3 text-muted-foreground","transition-[color,background-color] duration-150","hover:bg-accent hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Close",children:d.jsx(tr,{className:"size-4","aria-hidden":"true"})}),d.jsxs(ii,{children:[d.jsx(ci,{children:t}),n&&d.jsx(di,{children:n})]}),r,o&&d.jsx(li,{children:o})]})]});Fp.displayName="Dialog";const Wp=f.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:D("flex flex-col gap-1.5",e),...t}));Wp.displayName="Field";const $p=f.forwardRef(({className:e,required:t,children:n,...r},o)=>d.jsxs("label",{ref:o,className:D("text-sm font-medium leading-none text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r,children:[n,t&&d.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive",children:"*"})]}));$p.displayName="Label";const Bp=f.forwardRef(({className:e,isError:t,...n},r)=>d.jsx("p",{ref:r,className:D("text-xs",t?"text-destructive":"text-muted-foreground",e),...n}));Bp.displayName="FieldMessage";const zp=Me(["w-full appearance-none rounded-md border border-input bg-background pr-9","font-ui text-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),Lp=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>d.jsxs("div",{className:"group relative w-full",children:[d.jsx("select",{ref:a,className:D(zp({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...o,children:r}),d.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground group-has-[select:disabled]:opacity-50 [&_svg]:size-4",children:d.jsx(Jt,{})})]}));Lp.displayName="NativeSelect";const Hp=f.forwardRef(({className:e,value:t,...n},r)=>{const o=t===void 0,a=o?0:Math.min(100,Math.max(0,t));return d.jsx("div",{ref:r,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?void 0:a,className:D("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o?d.jsx("div",{className:"absolute h-full w-1/2 animate-progress-indeterminate rounded-full bg-primary"}):d.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-300 ease-out",style:{width:`${a}%`}})})});Hp.displayName="Progress";const ui=f.createContext({}),Vp=Me(["peer appearance-none rounded-full border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),HS=Me(["pointer-events-none absolute rounded-full bg-primary-foreground","opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"}},defaultVariants:{size:"md"}}),Yp=f.forwardRef(({className:e,size:t,isError:n,name:r,...o},a)=>{const s=f.use(ui);return d.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[d.jsx("input",{type:"radio",ref:a,name:r??s.name,className:D(Vp({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...o}),d.jsx("span",{"aria-hidden":"true",className:HS({size:t})})]})});Yp.displayName="Radio";const Gp=Me("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),jp=f.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>d.jsx(ui,{value:{name:t},children:d.jsx("div",{ref:a,role:"radiogroup",className:D(Gp({orientation:n}),e),...o,children:r})}));jp.displayName="RadioGroup";const Rp=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>d.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":n?void 0:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...r}));Rp.displayName="Separator";const Up=Me(["rounded-full bg-input transition-[background-color]","peer-checked:bg-primary","peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background","peer-disabled:opacity-50"],{variants:{size:{sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),VS=Me(["absolute top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm","transition-[translate]","peer-disabled:opacity-50"],{variants:{size:{sm:"left-0.5 size-3 peer-checked:translate-x-3",md:"left-0.5 size-4 peer-checked:translate-x-4",lg:"left-0.5 size-5 peer-checked:translate-x-5"}},defaultVariants:{size:"md"}}),Kp=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>d.jsxs("span",{className:"relative inline-flex shrink-0 items-center",children:[d.jsx("input",{type:"checkbox",role:"switch",ref:o,className:D("peer absolute inset-0 z-10 cursor-pointer opacity-0","disabled:cursor-not-allowed",e),"aria-invalid":n||void 0,...r}),d.jsx("span",{"aria-hidden":"true",className:D(Up({size:t}),n&&"ring-2 ring-destructive ring-offset-2 ring-offset-background",n&&"peer-focus-visible:ring-destructive")}),d.jsx("span",{"aria-hidden":"true",className:VS({size:t})})]}));Kp.displayName="Switch";var Yo="Tabs",[YS]=Ze(Yo,[Oo]),qp=Oo(),[GS,fi]=YS(Yo),Xp=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=Jn(i),[c,h]=Qe({prop:r,onChange:o,defaultProp:a??"",caller:Yo});return d.jsx(GS,{scope:n,baseId:we(),value:c,onValueChange:h,orientation:s,dir:p,activationMode:l,children:d.jsx(ne.div,{dir:p,"data-orientation":s,...u,ref:t})})});Xp.displayName=Yo;var Zp="TabsList",Qp=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=fi(Zp,n),s=qp(n);return d.jsx(ku,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(ne.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Qp.displayName=Zp;var Jp="TabsTrigger",eh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=fi(Jp,n),i=qp(n),l=rh(s.baseId,r),u=oh(s.baseId,r),p=r===s.value;return d.jsx(Eu,{asChild:!0,...i,focusable:!o,active:p,children:d.jsx(ne.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:j(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:j(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const c=s.activationMode!=="manual";!p&&!o&&c&&s.onValueChange(r)})})})});eh.displayName=Jp;var th="TabsContent",nh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=fi(th,n),l=rh(i.baseId,r),u=oh(i.baseId,r),p=r===i.value,c=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Be,{present:o||p,children:({present:h})=>d.jsx(ne.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});nh.displayName=th;function rh(e,t){return`${e}-trigger-${t}`}function oh(e,t){return`${e}-content-${t}`}var ah=Xp,sh=Qp,ih=eh,lh=nh;const pi=f.forwardRef(({className:e,...t},n)=>d.jsx(ah,{ref:n,className:D("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));pi.displayName=ah.displayName;const hi=f.forwardRef(({className:e,...t},n)=>d.jsx(sh,{ref:n,className:D("inline-flex items-center gap-1 rounded-lg bg-muted p-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:h-fit data-[orientation=vertical]:items-stretch",e),...t}));hi.displayName=sh.displayName;const gi=f.forwardRef(({className:e,...t},n)=>d.jsx(ih,{ref:n,className:D("inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-sm px-3 py-1.5 text-sm font-ui font-medium","text-muted-foreground select-none outline-none","transition-[color,background-color,box-shadow] duration-150","hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-muted","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm","data-[orientation=vertical]:justify-start","[&_svg]:size-4 [&_svg]:shrink-0",e),...t}));gi.displayName=ih.displayName;const mi=f.forwardRef(({className:e,...t},n)=>d.jsx(lh,{ref:n,className:D("mt-4 outline-none","group-data-[orientation=vertical]/tabs:mt-0 group-data-[orientation=vertical]/tabs:flex-1","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));mi.displayName=lh.displayName;const ch=({items:e,listClassName:t,className:n,...r})=>d.jsxs(pi,{className:n,...r,children:[d.jsx(hi,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>d.jsxs(gi,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>d.jsx(mi,{value:o,children:a},o))]});ch.displayName="Tabs";const dh=Me(["w-full rounded-md border border-input bg-background","font-body text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","resize-y","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default"],{variants:{size:{sm:"px-3 py-2 text-xs",md:"px-4 py-3 text-sm",lg:"px-4 py-4 text-base"}},defaultVariants:{size:"md"}}),uh=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>d.jsx("textarea",{ref:o,className:D(dh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));uh.displayName="Textarea";function jS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const RS=e=>{switch(e){case"success":return qS;case"info":return ZS;case"warning":return XS;case"error":return QS;default:return null}},US=Array(12).fill(0),KS=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},US.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),qS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),XS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ZS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),QS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),JS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),e1=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let vi=1;class t1{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:vi++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],S.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(r1(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,w=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...w})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,w=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...w})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,w=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...w})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const p=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!S.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,p)=>i.then(()=>s[0]==="reject"?p(s[1]):u(s[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||vi++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ze=new t1,n1=(e,t)=>{const n=(t==null?void 0:t.id)||vi++;return ze.addToast({title:e,...t,id:n}),n},r1=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",o1=n1,a1=()=>ze.toasts,s1=()=>ze.getActiveToasts(),i1=Object.assign(o1,{success:ze.success,info:ze.info,warning:ze.warning,error:ze.error,custom:ze.custom,message:ze.message,promise:ze.promise,dismiss:ze.dismiss,loading:ze.loading},{getHistory:a1,getToasts:s1});jS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Go(e){return e.label!==void 0}const l1=3,c1="24px",d1="16px",fh=4e3,u1=356,f1=14,p1=45,h1=200;function Nt(...e){return e.filter(Boolean).join(" ")}function g1(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const m1=e=>{var t,n,r,o,a,s,i,l,u;const{invert:p,toast:c,unstyled:h,interacting:g,setHeights:w,visibleToasts:m,heights:v,index:y,toasts:b,expanded:x,removeToast:N,defaultRichColors:M,closeButton:C,style:k,cancelButtonStyle:O,actionButtonStyle:V,className:$="",descriptionClassName:U="",duration:B,position:q,gap:Y,expandByDefault:ae,classNames:W,icons:K,closeButtonAriaLabel:G="Close toast"}=e,[_,Q]=S.useState(null),[oe,P]=S.useState(null),[A,H]=S.useState(!1),[F,Z]=S.useState(!1),[I,R]=S.useState(!1),[X,se]=S.useState(!1),[de,ce]=S.useState(!1),[ke,De]=S.useState(0),[tt,Re]=S.useState(0),Fe=S.useRef(c.duration||B||fh),Kt=S.useRef(null),Ee=S.useRef(null),Fr=y===0,Wr=y+1<=m,Oe=c.type,ft=c.dismissible!==!1,We=c.className||"",fn=c.descriptionClassName||"",qt=S.useMemo(()=>v.findIndex(J=>J.toastId===c.id)||0,[v,c.id]),Gn=S.useMemo(()=>{var J;return(J=c.closeButton)!=null?J:C},[c.closeButton,C]),Mt=S.useMemo(()=>c.duration||B||fh,[c.duration,B]),Xt=S.useRef(0),Le=S.useRef(0),jn=S.useRef(0),pt=S.useRef(null),[Rn,Un]=q.split("-"),ht=S.useMemo(()=>v.reduce((J,te,Se)=>Se>=qt?J:J+te.height,0),[v,qt]),Kn=e1(),qn=c.invert||p,pn=Oe==="loading";Le.current=S.useMemo(()=>qt*Y+ht,[qt,ht]),S.useEffect(()=>{Fe.current=Mt},[Mt]),S.useEffect(()=>{H(!0)},[]),S.useEffect(()=>{const J=Ee.current;if(J){const te=J.getBoundingClientRect().height;return Re(te),w(Se=>[{toastId:c.id,height:te,position:c.position},...Se]),()=>w(Se=>Se.filter(_e=>_e.toastId!==c.id))}},[w,c.id]),S.useLayoutEffect(()=>{if(!A)return;const J=Ee.current,te=J.style.height;J.style.height="auto";const Se=J.getBoundingClientRect().height;J.style.height=te,Re(Se),w(_e=>_e.find(ye=>ye.toastId===c.id)?_e.map(ye=>ye.toastId===c.id?{...ye,height:Se}:ye):[{toastId:c.id,height:Se,position:c.position},..._e])},[A,c.title,c.description,w,c.id,c.jsx,c.action,c.cancel]);const Ue=S.useCallback(()=>{Z(!0),De(Le.current),w(J=>J.filter(te=>te.toastId!==c.id)),setTimeout(()=>{N(c)},h1)},[c,N,w,Le]);S.useEffect(()=>{if(c.promise&&Oe==="loading"||c.duration===1/0||c.type==="loading")return;let J;return x||g||Kn?(()=>{if(jn.current<Xt.current){const _e=new Date().getTime()-Xt.current;Fe.current=Fe.current-_e}jn.current=new Date().getTime()})():(()=>{Fe.current!==1/0&&(Xt.current=new Date().getTime(),J=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Ue()},Fe.current))})(),()=>clearTimeout(J)},[x,g,c,Oe,Kn,Ue]),S.useEffect(()=>{c.delete&&(Ue(),c.onDismiss==null||c.onDismiss.call(c,c))},[Ue,c.delete]);function ie(){var J;if(K!=null&&K.loading){var te;return S.createElement("div",{className:Nt(W==null?void 0:W.loader,c==null||(te=c.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":Oe==="loading"},K.loading)}return S.createElement(KS,{className:Nt(W==null?void 0:W.loader,c==null||(J=c.classNames)==null?void 0:J.loader),visible:Oe==="loading"})}const pe=c.icon||(K==null?void 0:K[Oe])||RS(Oe);var re,ue;return S.createElement("li",{tabIndex:0,ref:Ee,className:Nt($,We,W==null?void 0:W.toast,c==null||(t=c.classNames)==null?void 0:t.toast,W==null?void 0:W.default,W==null?void 0:W[Oe],c==null||(n=c.classNames)==null?void 0:n[Oe]),"data-sonner-toast":"","data-rich-colors":(re=c.richColors)!=null?re:M,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":A,"data-promise":!!c.promise,"data-swiped":de,"data-removed":F,"data-visible":Wr,"data-y-position":Rn,"data-x-position":Un,"data-index":y,"data-front":Fr,"data-swiping":I,"data-dismissible":ft,"data-type":Oe,"data-invert":qn,"data-swipe-out":X,"data-swipe-direction":oe,"data-expanded":!!(x||ae&&A),"data-testid":c.testId,style:{"--index":y,"--toasts-before":y,"--z-index":b.length-y,"--offset":`${F?ke:Le.current}px`,"--initial-height":ae?"auto":`${tt}px`,...k,...c.style},onDragEnd:()=>{R(!1),Q(null),pt.current=null},onPointerDown:J=>{J.button!==2&&(pn||!ft||(Kt.current=new Date,De(Le.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&(R(!0),pt.current={x:J.clientX,y:J.clientY})))},onPointerUp:()=>{var J,te,Se;if(X||!ft)return;pt.current=null;const _e=Number(((J=Ee.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Zt=Number(((te=Ee.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ye=new Date().getTime()-((Se=Kt.current)==null?void 0:Se.getTime()),Te=_==="x"?_e:Zt,Xn=Math.abs(Te)/ye;if(Math.abs(Te)>=p1||Xn>.11){De(Le.current),c.onDismiss==null||c.onDismiss.call(c,c),P(_==="x"?_e>0?"right":"left":Zt>0?"down":"up"),Ue(),se(!0);return}else{var Ke,qe;(Ke=Ee.current)==null||Ke.style.setProperty("--swipe-amount-x","0px"),(qe=Ee.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}ce(!1),R(!1),Q(null)},onPointerMove:J=>{var te,Se,_e;if(!pt.current||!ft||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;const ye=J.clientY-pt.current.y,Te=J.clientX-pt.current.x;var Xn;const Ke=(Xn=e.swipeDirections)!=null?Xn:g1(q);!_&&(Math.abs(Te)>1||Math.abs(ye)>1)&&Q(Math.abs(Te)>Math.abs(ye)?"x":"y");let qe={x:0,y:0};const Uo=Ft=>1/(1.5+Math.abs(Ft)/20);if(_==="y"){if(Ke.includes("top")||Ke.includes("bottom"))if(Ke.includes("top")&&ye<0||Ke.includes("bottom")&&ye>0)qe.y=ye;else{const Ft=ye*Uo(ye);qe.y=Math.abs(Ft)<Math.abs(ye)?Ft:ye}}else if(_==="x"&&(Ke.includes("left")||Ke.includes("right")))if(Ke.includes("left")&&Te<0||Ke.includes("right")&&Te>0)qe.x=Te;else{const Ft=Te*Uo(Te);qe.x=Math.abs(Ft)<Math.abs(Te)?Ft:Te}(Math.abs(qe.x)>0||Math.abs(qe.y)>0)&&ce(!0),(Se=Ee.current)==null||Se.style.setProperty("--swipe-amount-x",`${qe.x}px`),(_e=Ee.current)==null||_e.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Gn&&!c.jsx&&Oe!=="loading"?S.createElement("button",{"aria-label":G,"data-disabled":pn,"data-close-button":!0,onClick:pn||!ft?()=>{}:()=>{Ue(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Nt(W==null?void 0:W.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ue=K==null?void 0:K.close)!=null?ue:JS):null,(Oe||c.icon||c.promise)&&c.icon!==null&&((K==null?void 0:K[Oe])!==null||c.icon)?S.createElement("div",{"data-icon":"",className:Nt(W==null?void 0:W.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ie():null,c.type!=="loading"?pe:null):null,S.createElement("div",{"data-content":"",className:Nt(W==null?void 0:W.content,c==null||(a=c.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:Nt(W==null?void 0:W.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?S.createElement("div",{"data-description":"",className:Nt(U,fn,W==null?void 0:W.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),S.isValidElement(c.cancel)?c.cancel:c.cancel&&Go(c.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||O,onClick:J=>{Go(c.cancel)&&ft&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,J),Ue())},className:Nt(W==null?void 0:W.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,S.isValidElement(c.action)?c.action:c.action&&Go(c.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||V,onClick:J=>{Go(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,J),!J.defaultPrevented&&Ue())},className:Nt(W==null?void 0:W.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ph(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function v1(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?d1:c1;function l(u){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const b1=S.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:c,theme:h="light",richColors:g,duration:w,style:m,visibleToasts:v=l1,toastOptions:y,dir:b=ph(),gap:x=f1,icons:N,containerAriaLabel:M="Notifications"}=t,[C,k]=S.useState([]),O=S.useMemo(()=>r?C.filter(A=>A.toasterId===r):C.filter(A=>!A.toasterId),[C,r]),V=S.useMemo(()=>Array.from(new Set([a].concat(O.filter(A=>A.position).map(A=>A.position)))),[O,a]),[$,U]=S.useState([]),[B,q]=S.useState(!1),[Y,ae]=S.useState(!1),[W,K]=S.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=S.useRef(null),_=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=S.useRef(null),oe=S.useRef(!1),P=S.useCallback(A=>{k(H=>{var F;return(F=H.find(Z=>Z.id===A.id))!=null&&F.delete||ze.dismiss(A.id),H.filter(({id:Z})=>Z!==A.id)})},[]);return S.useEffect(()=>ze.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{k(H=>H.map(F=>F.id===A.id?{...F,delete:!0}:F))});return}setTimeout(()=>{Qo.flushSync(()=>{k(H=>{const F=H.findIndex(Z=>Z.id===A.id);return F!==-1?[...H.slice(0,F),{...H[F],...A},...H.slice(F+1)]:[A,...H]})})})}),[C]),S.useEffect(()=>{if(h!=="system"){K(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:H})=>{K(H?"dark":"light")})}catch{A.addListener(({matches:F})=>{try{K(F?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),S.useEffect(()=>{C.length<=1&&q(!1)},[C]),S.useEffect(()=>{const A=H=>{var F;if(s.every(R=>H[R]||H.code===R)){var I;q(!0),(I=G.current)==null||I.focus()}H.code==="Escape"&&(document.activeElement===G.current||(F=G.current)!=null&&F.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[s]),S.useEffect(()=>{if(G.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,oe.current=!1)}},[G.current]),S.createElement("section",{ref:n,"aria-label":`${M} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((A,H)=>{var F;const[Z,I]=A.split("-");return O.length?S.createElement("ol",{key:A,dir:b==="auto"?ph():b,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-sonner-theme":W,"data-y-position":Z,"data-x-position":I,style:{"--front-toast-height":`${((F=$[0])==null?void 0:F.height)||0}px`,"--width":`${u1}px`,"--gap":`${x}px`,...m,...v1(p,c)},onBlur:R=>{oe.current&&!R.currentTarget.contains(R.relatedTarget)&&(oe.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||oe.current||(oe.current=!0,Q.current=R.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Y||q(!1)},onDragEnd:()=>q(!1),onPointerDown:R=>{R.target instanceof HTMLElement&&R.target.dataset.dismissible==="false"||ae(!0)},onPointerUp:()=>ae(!1)},O.filter(R=>!R.position&&H===0||R.position===A).map((R,X)=>{var se,de;return S.createElement(m1,{key:R.id,icons:N,index:X,toast:R,defaultRichColors:g,duration:(se=y==null?void 0:y.duration)!=null?se:w,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:v,closeButton:(de=y==null?void 0:y.closeButton)!=null?de:l,interacting:Y,position:A,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:P,toasts:O.filter(ce=>ce.position==R.position),heights:$.filter(ce=>ce.position==R.position),setHeights:U,expandByDefault:i,gap:x,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),hh=({toastOptions:e,...t})=>{var n;return d.jsx(b1,{theme:"light",richColors:!0,position:"top-center",closeButton:!0,toastOptions:{...e,classNames:{...e==null?void 0:e.classNames,toast:`shadow-lg ${((n=e==null?void 0:e.classNames)==null?void 0:n.toast)??""}`.trim()}},...t})};hh.displayName="Toaster";var[jo]=Ze("Tooltip",[Vt]),Ro=Vt(),gh="TooltipProvider",y1=700,bi="tooltip.open",[w1,yi]=jo(gh),mh=e=>{const{__scopeTooltip:t,delayDuration:n=y1,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(w1,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};mh.displayName=gh;var Ar="Tooltip",[x1,Ir]=jo(Ar),vh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=yi(Ar,e.__scopeTooltip),u=Ro(t),[p,c]=f.useState(null),h=we(),g=f.useRef(0),w=s??l.disableHoverableContent,m=i??l.delayDuration,v=f.useRef(!1),[y,b]=Qe({prop:r,defaultProp:o??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(bi))):l.onClose(),a==null||a(k)},caller:Ar}),x=f.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),N=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,b(!0)},[b]),M=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b(!1)},[b]),C=f.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,b(!0),g.current=0},m)},[m,b]);return f.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),d.jsx(dr,{...u,children:d.jsx(x1,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:p,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?C():N()},[l.isOpenDelayedRef,C,N]),onTriggerLeave:f.useCallback(()=>{w?M():(window.clearTimeout(g.current),g.current=0)},[M,w]),onOpen:N,onClose:M,disableHoverableContent:w,children:n})})};vh.displayName=Ar;var wi="TooltipTrigger",bh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ir(wi,n),a=yi(wi,n),s=Ro(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(ur,{asChild:!0,...s,children:d.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:j(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:j(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:j(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:j(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});bh.displayName=wi;var xi="TooltipPortal",[C1,S1]=jo(xi,{forceMount:void 0}),yh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Ir(xi,t);return d.jsx(C1,{scope:t,forceMount:n,children:d.jsx(Be,{present:n||a.open,children:d.jsx(Cn,{asChild:!0,container:o,children:r})})})};yh.displayName=xi;var Yn="TooltipContent",wh=f.forwardRef((e,t)=>{const n=S1(Yn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Ir(Yn,e.__scopeTooltip);return d.jsx(Be,{present:r||s.open,children:s.disableHoverableContent?d.jsx(xh,{side:o,...a,ref:t}):d.jsx(N1,{side:o,...a,ref:t})})}),N1=f.forwardRef((e,t)=>{const n=Ir(Yn,e.__scopeTooltip),r=yi(Yn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=n,p=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{i(null),c(!1)},[c]),g=f.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},b=T1(y,v.getBoundingClientRect()),x=P1(y,b),N=O1(m.getBoundingClientRect()),M=A1([...x,...N]);i(M),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&p){const w=v=>g(v,p),m=v=>g(v,l);return l.addEventListener("pointerleave",w),p.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",m)}}},[l,p,g,h]),f.useEffect(()=>{if(s){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},b=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),x=!_1(y,s);b?h():x&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,p,s,u,h]),d.jsx(xh,{...e,ref:a})}),[M1,k1]=jo(Ar,{isInside:!1}),E1=Vh("TooltipContent"),xh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ir(Yn,n),u=Ro(n),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(bi,p),()=>document.removeEventListener(bi,p)),[p]),f.useEffect(()=>{if(l.trigger){const c=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&p()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,p]),d.jsx(xn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:p,children:d.jsxs(wo,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(E1,{children:r}),d.jsx(M1,{scope:n,isInside:!0,children:d.jsx(Vy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});wh.displayName=Yn;var Ch="TooltipArrow",D1=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return k1(Ch,n).isInside?null:d.jsx(xo,{...o,...r,ref:t})});D1.displayName=Ch;function T1(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function P1(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function O1(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function _1(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>r!=h>r&&n<(c-u)*(r-p)/(h-p)+u&&(o=!o)}return o}function A1(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),I1(t)}function I1(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var F1=mh,W1=vh,$1=bh,B1=yh,Sh=wh;const z1=F1,Nh=W1,Mh=$1,Ci=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>d.jsx(B1,{children:d.jsx(Sh,{ref:r,sideOffset:t,className:D("z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 shadow-md","text-xs font-body text-background font-medium","origin-(--radix-tooltip-content-transform-origin)","data-[state=delayed-open]:animate-tooltip-in","data-[state=instant-open]:animate-tooltip-in","data-[state=closed]:animate-tooltip-out",e),...n})}));Ci.displayName=Sh.displayName;const kh=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>d.jsxs(Nh,{...a,children:[d.jsx(Mh,{asChild:!0,children:t}),d.jsx(Ci,{side:n,align:r,sideOffset:o,children:e})]});kh.displayName="Tooltip",E.Accordion=hl,E.AccordionContent=pa,E.AccordionItem=ua,E.AccordionRoot=da,E.AccordionTrigger=fa,E.Alert=ml,E.AlertDescription=bl,E.AlertTitle=vl,E.AspectRatio=xl,E.Avatar=Sl,E.Badge=Ml,E.Button=wn,E.Calendar=oi,E.Checkbox=Dl,E.ComboBox=Td,E.ComboBoxContent=Sd,E.ComboBoxEmpty=Md,E.ComboBoxGroup=kd,E.ComboBoxItem=Nd,E.ComboBoxRoot=Dd,E.ComboBoxSeparator=Ed,E.ComboBoxTrigger=Ja,E.ComboBoxTriggerVariants=Cd,E.DATA_TABLE_EXPAND_COLUMN_ID=_t,E.DataTable=Wf,E.DataTableColumnHeader=$f,E.DatePicker=Pp,E.DatePickerContent=Tp,E.DatePickerRoot=Dp,E.DatePickerTrigger=ri,E.Dialog=Fp,E.DialogClose=Ap,E.DialogContent=si,E.DialogDescription=di,E.DialogFooter=li,E.DialogHeader=ii,E.DialogOverlay=ai,E.DialogPortal=Ip,E.DialogRoot=Op,E.DialogTitle=ci,E.DialogTrigger=_p,E.DropdownMenu=Tf,E.DropdownMenuCheckboxItem=Ls,E.DropdownMenuContent=Cr,E.DropdownMenuGroup=B0,E.DropdownMenuItem=Ot,E.DropdownMenuLabel=Sr,E.DropdownMenuPortal=z0,E.DropdownMenuRadioGroup=Df,E.DropdownMenuRadioItem=Hs,E.DropdownMenuRoot=Wo,E.DropdownMenuSeparator=Wn,E.DropdownMenuSub=zs,E.DropdownMenuSubContent=zo,E.DropdownMenuSubTrigger=Bo,E.DropdownMenuTrigger=$o,E.Field=Wp,E.FieldMessage=Bp,E.Input=pr,E.InputAddon=cs,E.InputGroup=ls,E.Label=$p,E.NativeSelect=Lp,E.Pagination=ms,E.PaginationEllipsis=gs,E.PaginationItem=fs,E.PaginationNext=hs,E.PaginationPrev=ps,E.PaginationRoot=ds,E.Popover=xd,E.PopoverAnchor=Iy,E.PopoverClose=Ay,E.PopoverContent=on,E.PopoverRoot=In,E.PopoverTrigger=So,E.Progress=Hp,E.Radio=Yp,E.RadioGroup=jp,E.RadioGroupContext=ui,E.STRING_COLUMN_FILTER_OPTIONS=ts,E.Select=wu,E.SelectContent=Po,E.SelectGroup=vw,E.SelectItem=Es,E.SelectLabel=bu,E.SelectRoot=Ss,E.SelectScrollDownButton=ks,E.SelectScrollUpButton=Ms,E.SelectSeparator=yu,E.SelectTrigger=To,E.SelectValue=Ns,E.Separator=Rp,E.Skeleton=is,E.Switch=Kp,E.Table=rs,E.TableBody=as,E.TableCaption=Pd,E.TableCell=an,E.TableFooter=ss,E.TableHead=No,E.TableHeader=os,E.TableRow=Pt,E.Tabs=ch,E.TabsContent=mi,E.TabsList=hi,E.TabsRoot=pi,E.TabsTrigger=gi,E.Textarea=uh,E.Toaster=hh,E.Tooltip=kh,E.TooltipContent=Ci,E.TooltipProvider=z1,E.TooltipRoot=Nh,E.TooltipTrigger=Mh,E.accordionContentVariants=fl,E.accordionRootVariants=pl,E.accordionTriggerVariants=ul,E.alertVariants=gl,E.avatarVariants=Cl,E.badgeVariants=Nl,E.bookersStringFilter=ns,E.buttonVariants=kl,E.checkboxVariants=El,E.cn=D,E.dataTableColumnHeaderMeta=U0,E.datePickerTriggerVariants=Ep,E.inputVariants=_d,E.nativeSelectVariants=zp,E.radioGroupVariants=Gp,E.radioVariants=Vp,E.selectTriggerVariants=vu,E.switchTrackVariants=Up,E.textareaVariants=dh,E.toast=i1,E.useDataTableTable=Of,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
185
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ob="DialogDescriptionWarning",ab=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mc(ob).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vc=nc,sb=oc,bc=sc,Ia=ic,Aa=lc,yc=dc,wc=fc,ib=hc,sr='[cmdk-group=""]',Fa='[cmdk-group-items=""]',lb='[cmdk-group-heading=""]',xc='[cmdk-item=""]',Cc=`${xc}:not([aria-disabled="true"])`,Wa="cmdk-item-select",Pn="data-value",cb=(e,t,n)=>qm(e,t,n),Sc=f.createContext(void 0),ir=()=>f.useContext(Sc),Nc=f.createContext(void 0),$a=()=>f.useContext(Nc),kc=f.createContext(void 0),lr=f.forwardRef((e,t)=>{let n=On(()=>{var _,F;return{search:"",value:(F=(_=e.value)!=null?_:e.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=On(()=>new Set),o=On(()=>new Map),a=On(()=>new Map),s=On(()=>new Set),i=Ec(e),{label:l,children:u,value:p,onValueChange:d,filter:h,shouldFilter:g,loop:w,disablePointerSelection:m=!1,vimBindings:v=!0,...b}=e,y=xe(),x=xe(),k=xe(),E=f.useRef(null),C=hb();rn(()=>{if(p!==void 0){let _=p.trim();n.current.value=_,N.emit()}},[p]),rn(()=>{C(6,q)},[]);let N=f.useMemo(()=>({subscribe:_=>(s.current.add(_),()=>s.current.delete(_)),snapshot:()=>n.current,setState:(_,F,V)=>{var $,Z,W,U;if(!Object.is(n.current[_],F)){if(n.current[_]=F,_==="search")z(),I(),C(1,R);else if(_==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(k);X?X.focus():($=document.getElementById(y))==null||$.focus()}if(C(7,()=>{var X;n.current.selectedItemId=(X=Y())==null?void 0:X.id,N.emit()}),V||C(5,q),((Z=i.current)==null?void 0:Z.value)!==void 0){let X=F??"";(U=(W=i.current).onValueChange)==null||U.call(W,X);return}}N.emit()}},emit:()=>{s.current.forEach(_=>_())}}),[]),M=f.useMemo(()=>({value:(_,F,V)=>{var $;F!==(($=a.current.get(_))==null?void 0:$.value)&&(a.current.set(_,{value:F,keywords:V}),n.current.filtered.items.set(_,D(F,V)),C(2,()=>{I(),N.emit()}))},item:(_,F)=>(r.current.add(_),F&&(o.current.has(F)?o.current.get(F).add(_):o.current.set(F,new Set([_]))),C(3,()=>{z(),I(),n.current.value||R(),N.emit()}),()=>{a.current.delete(_),r.current.delete(_),n.current.filtered.items.delete(_);let V=Y();C(4,()=>{z(),(V==null?void 0:V.getAttribute("id"))===_&&R(),N.emit()})}),group:_=>(o.current.has(_)||o.current.set(_,new Set),()=>{a.current.delete(_),o.current.delete(_)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:k,labelId:x,listInnerRef:E}),[]);function D(_,F){var V,$;let Z=($=(V=i.current)==null?void 0:V.filter)!=null?$:cb;return _?Z(_,n.current.search,F):0}function I(){if(!n.current.search||i.current.shouldFilter===!1)return;let _=n.current.filtered.items,F=[];n.current.filtered.groups.forEach($=>{let Z=o.current.get($),W=0;Z.forEach(U=>{let X=_.get(U);W=Math.max(X,W)}),F.push([$,W])});let V=E.current;ae().sort(($,Z)=>{var W,U;let X=$.getAttribute("id"),se=Z.getAttribute("id");return((W=_.get(se))!=null?W:0)-((U=_.get(X))!=null?U:0)}).forEach($=>{let Z=$.closest(Fa);Z?Z.appendChild($.parentElement===Z?$:$.closest(`${Fa} > *`)):V.appendChild($.parentElement===V?$:$.closest(`${Fa} > *`))}),F.sort(($,Z)=>Z[1]-$[1]).forEach($=>{var Z;let W=(Z=E.current)==null?void 0:Z.querySelector(`${sr}[${Pn}="${encodeURIComponent($[0])}"]`);W==null||W.parentElement.appendChild(W)})}function R(){let _=ae().find(V=>V.getAttribute("aria-disabled")!=="true"),F=_==null?void 0:_.getAttribute(Pn);N.setState("value",F||void 0)}function z(){var _,F,V,$;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Z=0;for(let W of r.current){let U=(F=(_=a.current.get(W))==null?void 0:_.value)!=null?F:"",X=($=(V=a.current.get(W))==null?void 0:V.keywords)!=null?$:[],se=D(U,X);n.current.filtered.items.set(W,se),se>0&&Z++}for(let[W,U]of o.current)for(let X of U)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=Z}function q(){var _,F,V;let $=Y();$&&(((_=$.parentElement)==null?void 0:_.firstChild)===$&&((V=(F=$.closest(sr))==null?void 0:F.querySelector(lb))==null||V.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function Y(){var _;return(_=E.current)==null?void 0:_.querySelector(`${xc}[aria-selected="true"]`)}function ae(){var _;return Array.from(((_=E.current)==null?void 0:_.querySelectorAll(Cc))||[])}function B(_){let F=ae()[_];F&&N.setState("value",F.getAttribute(Pn))}function K(_){var F;let V=Y(),$=ae(),Z=$.findIndex(U=>U===V),W=$[Z+_];(F=i.current)!=null&&F.loop&&(W=Z+_<0?$[$.length-1]:Z+_===$.length?$[0]:$[Z+_]),W&&N.setState("value",W.getAttribute(Pn))}function G(_){let F=Y(),V=F==null?void 0:F.closest(sr),$;for(;V&&!$;)V=_>0?fb(V,sr):pb(V,sr),$=V==null?void 0:V.querySelector(Cc);$?N.setState("value",$.getAttribute(Pn)):K(_)}let A=()=>B(ae().length-1),Q=_=>{_.preventDefault(),_.metaKey?A():_.altKey?G(1):K(1)},oe=_=>{_.preventDefault(),_.metaKey?B(0):_.altKey?G(-1):K(-1)};return f.createElement(ne.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:_=>{var F;(F=b.onKeyDown)==null||F.call(b,_);let V=_.nativeEvent.isComposing||_.keyCode===229;if(!(_.defaultPrevented||V))switch(_.key){case"n":case"j":{v&&_.ctrlKey&&Q(_);break}case"ArrowDown":{Q(_);break}case"p":case"k":{v&&_.ctrlKey&&oe(_);break}case"ArrowUp":{oe(_);break}case"Home":{_.preventDefault(),B(0);break}case"End":{_.preventDefault(),A();break}case"Enter":{_.preventDefault();let $=Y();if($){let Z=new Event(Wa);$.dispatchEvent(Z)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:mb},l),go(e,_=>f.createElement(Nc.Provider,{value:N},f.createElement(Sc.Provider,{value:M},_))))}),uo=f.forwardRef((e,t)=>{var n,r;let o=xe(),a=f.useRef(null),s=f.useContext(kc),i=ir(),l=Ec(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;rn(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let p=Tc(o,a,[e.value,e.children,a],e.keywords),d=$a(),h=Lt(C=>C.value&&C.value===p.current),g=Lt(C=>u||i.filter()===!1?!0:C.search?C.filtered.items.get(o)>0:!0);f.useEffect(()=>{let C=a.current;if(!(!C||e.disabled))return C.addEventListener(Wa,w),()=>C.removeEventListener(Wa,w)},[g,e.onSelect,e.disabled]);function w(){var C,N;m(),(N=(C=l.current).onSelect)==null||N.call(C,p.current)}function m(){d.setState("value",p.current,!0)}if(!g)return null;let{disabled:v,value:b,onSelect:y,forceMount:x,keywords:k,...E}=e;return f.createElement(ne.div,{ref:mt(a,t),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||i.getDisablePointerSelection()?void 0:m,onClick:v?void 0:w},e.children)}),Mc=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=xe(),i=f.useRef(null),l=f.useRef(null),u=xe(),p=ir(),d=Lt(g=>o||p.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);rn(()=>p.group(s),[]),Tc(s,i,[e.value,e.heading,l]);let h=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(ne.div,{ref:mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),go(e,g=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(kc.Provider,{value:h},g))))}),Dc=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Lt(s=>!s.search);return!n&&!a?null:f.createElement(ne.div,{ref:mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),fo=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=$a(),s=Lt(u=>u.search),i=Lt(u=>u.selectedItemId),l=ir();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(ne.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),po=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Lt(u=>u.selectedItemId),l=ir();return f.useEffect(()=>{if(s.current&&a.current){let u=s.current,p=a.current,d,h=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let g=u.offsetHeight;p.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(d),h.unobserve(u)}}},[]),f.createElement(ne.div,{ref:mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},go(e,u=>f.createElement("div",{ref:mt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),db=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(vc,{open:n,onOpenChange:r},f.createElement(bc,{container:s},f.createElement(Ia,{"cmdk-overlay":"",className:o}),f.createElement(Aa,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(lr,{ref:t,...i}))))}),ho=f.forwardRef((e,t)=>Lt(n=>n.filtered.count===0)?f.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),ub=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(ne.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},go(e,s=>f.createElement("div",{"aria-hidden":!0},s)))});Object.assign(lr,{List:po,Item:uo,Input:fo,Group:Mc,Separator:Dc,Dialog:db,Empty:ho,Loading:ub});function fb(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function pb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Ec(e){let t=f.useRef(e);return rn(()=>{t.current=e}),t}var rn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function On(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Lt(e){let t=$a(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Tc(e,t,n,r=[]){let o=f.useRef(),a=ir();return rn(()=>{var s;let i=(()=>{var u;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(u=p.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(Pn,i),o.current=i}),o}var hb=()=>{let[e,t]=f.useState(),n=On(()=>new Map);return rn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function gb(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function go({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(gb(t),{ref:t.ref},n(t.props.children)):n(t)}var mb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const vb=["top","right","bottom","left"],Ht=Math.min,Ve=Math.max,mo=Math.round,vo=Math.floor,bt=e=>({x:e,y:e}),bb={left:"right",right:"left",bottom:"top",top:"bottom"};function Ba(e,t,n){return Ve(e,Ht(t,n))}function Et(e,t){return typeof e=="function"?e(t):e}function Tt(e){return e.split("-")[0]}function _n(e){return e.split("-")[1]}function za(e){return e==="x"?"y":"x"}function La(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ha(e){return za(yt(e))}function yb(e,t,n){n===void 0&&(n=!1);const r=_n(e),o=Ha(e),a=La(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=bo(s)),[s,bo(s)]}function wb(e){const t=bo(e);return[Va(e),t,Va(t)]}function Va(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Pc=["left","right"],Oc=["right","left"],xb=["top","bottom"],Cb=["bottom","top"];function Sb(e,t,n){switch(e){case"top":case"bottom":return n?t?Oc:Pc:t?Pc:Oc;case"left":case"right":return t?xb:Cb;default:return[]}}function Nb(e,t,n,r){const o=_n(e);let a=Sb(Tt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Va)))),a}function bo(e){const t=Tt(e);return bb[t]+e.slice(t.length)}function kb(e){return{top:0,right:0,bottom:0,left:0,...e}}function _c(e){return typeof e!="number"?kb(e):{top:e,right:e,bottom:e,left:e}}function yo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ic(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),s=Ha(t),i=La(s),l=Tt(t),u=a==="y",p=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-o.width,y:d};break;default:g={x:r.x,y:r.y}}switch(_n(t)){case"start":g[s]-=h*(n&&u?-1:1);break;case"end":g[s]+=h*(n&&u?-1:1);break}return g}async function Mb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:h=!1,padding:g=0}=Et(t,e),w=_c(g),v=i[h?d==="floating"?"reference":"floating":d],b=yo(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),y=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),k=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},E=yo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(b.top-E.top+w.top)/k.y,bottom:(E.bottom-b.bottom+w.bottom)/k.y,left:(b.left-E.left+w.left)/k.x,right:(E.right-b.right+w.right)/k.x}}const Db=50,Eb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Mb},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:d}=Ic(u,r,l),h=r,g=0;const w={};for(let m=0;m<a.length;m++){const v=a[m];if(!v)continue;const{name:b,fn:y}=v,{x,y:k,data:E,reset:C}=await y({x:p,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:w,rects:u,platform:i,elements:{reference:e,floating:t}});p=x??p,d=k??d,w[b]={...w[b],...E},C&&g<Db&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:d}=Ic(u,h,l)),m=-1)}return{x:p,y:d,placement:h,strategy:o,middlewareData:w}},Tb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=Et(e,t)||{};if(u==null)return{};const d=_c(p),h={x:n,y:r},g=Ha(o),w=La(g),m=await s.getDimensions(u),v=g==="y",b=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",k=a.reference[w]+a.reference[g]-h[g]-a.floating[w],E=h[g]-a.reference[g],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let N=C?C[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(C)))&&(N=i.floating[x]||a.floating[w]);const M=k/2-E/2,D=N/2-m[w]/2-1,I=Ht(d[b],D),R=Ht(d[y],D),z=I,q=N-m[w]-R,Y=N/2-m[w]/2+M,ae=Ba(z,Y,q),B=!l.arrow&&_n(o)!=null&&Y!==ae&&a.reference[w]/2-(Y<z?I:R)-m[w]/2<0,K=B?Y<z?Y-z:Y-q:0;return{[g]:h[g]+K,data:{[g]:ae,centerOffset:Y-ae-K,...B&&{alignmentOffset:K}},reset:B}}}),Pb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Et(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Tt(o),y=yt(i),x=Tt(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=h||(x||!m?[bo(i)]:wb(i)),C=w!=="none";!h&&C&&E.push(...Nb(i,m,w,k));const N=[i,...E],M=await l.detectOverflow(t,v),D=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&D.push(M[b]),d){const Y=yb(o,s,k);D.push(M[Y[0]],M[Y[1]])}if(I=[...I,{placement:o,overflows:D}],!D.every(Y=>Y<=0)){var R,z;const Y=(((R=a.flip)==null?void 0:R.index)||0)+1,ae=N[Y];if(ae&&(!(d==="alignment"?y!==yt(ae):!1)||I.every(G=>yt(G.placement)===y?G.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:ae}};let B=(z=I.filter(K=>K.overflows[0]<=0).sort((K,G)=>K.overflows[1]-G.overflows[1])[0])==null?void 0:z.placement;if(!B)switch(g){case"bestFit":{var q;const K=(q=I.filter(G=>{if(C){const A=yt(G.placement);return A===y||A==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(A=>A>0).reduce((A,Q)=>A+Q,0)]).sort((G,A)=>G[1]-A[1])[0])==null?void 0:q[0];K&&(B=K);break}case"initialPlacement":B=i;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Ac(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fc(e){return vb.some(t=>e[t]>=0)}const Ob=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Et(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ac(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fc(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ac(s,n.floating);return{data:{escapedOffsets:i,escaped:Fc(i)}}}default:return{}}}}},Wc=new Set(["left","top"]);async function _b(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Tt(n),i=_n(n),l=yt(n)==="y",u=Wc.has(s)?-1:1,p=a&&l?-1:1,d=Et(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),l?{x:g*p,y:h*u}:{x:h*u,y:g*p}}const Ib=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await _b(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Ab=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...u}=Et(e,t),p={x:n,y:r},d=await a.detectOverflow(t,u),h=yt(Tt(o)),g=za(h);let w=p[g],m=p[h];if(s){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=w+d[b],k=w-d[y];w=Ba(x,w,k)}if(i){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+d[b],k=m-d[y];m=Ba(x,m,k)}const v=l.fn({...t,[g]:w,[h]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[g]:s,[h]:i}}}}}},Fb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Et(e,t),p={x:n,y:r},d=yt(o),h=za(d);let g=p[h],w=p[d];const m=Et(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",k=a.reference[h]-a.floating[x]+v.mainAxis,E=a.reference[h]+a.reference[x]-v.mainAxis;g<k?g=k:g>E&&(g=E)}if(u){var b,y;const x=h==="y"?"width":"height",k=Wc.has(Tt(o)),E=a.reference[d]-a.floating[x]+(k&&((b=s.offset)==null?void 0:b[d])||0)+(k?0:v.crossAxis),C=a.reference[d]+a.reference[x]+(k?0:((y=s.offset)==null?void 0:y[d])||0)-(k?v.crossAxis:0);w<E?w=E:w>C&&(w=C)}return{[h]:g,[d]:w}}}},Wb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Et(e,t),p=await s.detectOverflow(t,u),d=Tt(o),h=_n(o),g=yt(o)==="y",{width:w,height:m}=a.floating;let v,b;d==="top"||d==="bottom"?(v=d,b=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=d,v=h==="end"?"top":"bottom");const y=m-p.top-p.bottom,x=w-p.left-p.right,k=Ht(m-p[v],y),E=Ht(w-p[b],x),C=!t.middlewareData.shift;let N=k,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=y),C&&!h){const I=Ve(p.left,0),R=Ve(p.right,0),z=Ve(p.top,0),q=Ve(p.bottom,0);g?M=w-2*(I!==0||R!==0?I+R:Ve(p.left,p.right)):N=m-2*(z!==0||q!==0?z+q:Ve(p.top,p.bottom))}await l({...t,availableWidth:M,availableHeight:N});const D=await s.getDimensions(i.floating);return w!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function wo(){return typeof window<"u"}function In(e){return $c(e)?(e.nodeName||"").toLowerCase():"#document"}function Ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wt(e){var t;return(t=($c(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $c(e){return wo()?e instanceof Node||e instanceof Ye(e).Node:!1}function st(e){return wo()?e instanceof Element||e instanceof Ye(e).Element:!1}function Pt(e){return wo()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function Bc(e){return!wo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}function cr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function $b(e){return/^(table|td|th)$/.test(In(e))}function xo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Bb=/transform|translate|scale|rotate|perspective|filter/,zb=/paint|layout|strict|content/,on=e=>!!e&&e!=="none";let Ya;function Ga(e){const t=st(e)?it(e):e;return on(t.transform)||on(t.translate)||on(t.scale)||on(t.rotate)||on(t.perspective)||!ja()&&(on(t.backdropFilter)||on(t.filter))||Bb.test(t.willChange||"")||zb.test(t.contain||"")}function Lb(e){let t=Vt(e);for(;Pt(t)&&!An(t);){if(Ga(t))return t;if(xo(t))return null;t=Vt(t)}return null}function ja(){return Ya==null&&(Ya=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ya}function An(e){return/^(html|body|#document)$/.test(In(e))}function it(e){return Ye(e).getComputedStyle(e)}function Co(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vt(e){if(In(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bc(e)&&e.host||wt(e);return Bc(t)?t.host:t}function zc(e){const t=Vt(e);return An(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&cr(t)?t:zc(t)}function dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ye(o);if(a){const i=Ua(s);return t.concat(s,s.visualViewport||[],cr(o)?o:[],i&&n?dr(i):[])}else return t.concat(o,dr(o,[],n))}function Ua(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=mo(n)!==a||mo(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ra(e){return st(e)?e:e.contextElement}function Fn(e){const t=Ra(e);if(!Pt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Lc(t);let s=(a?mo(n.width):n.width)/r,i=(a?mo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Hb=bt(0);function Hc(e){const t=Ye(e);return!ja()||!t.visualViewport?Hb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function an(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ra(e);let s=bt(1);t&&(r?st(r)&&(s=Fn(r)):s=Fn(e));const i=Vb(a,n,r)?Hc(a):bt(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,p=o.width/s.x,d=o.height/s.y;if(a){const h=Ye(a),g=r&&st(r)?Ye(r):r;let w=h,m=Ua(w);for(;m&&r&&g!==w;){const v=Fn(m),b=m.getBoundingClientRect(),y=it(m),x=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,k=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,d*=v.y,l+=x,u+=k,w=Ye(m),m=Ua(w)}}return yo({width:p,height:d,x:l,y:u})}function So(e,t){const n=Co(e).scrollLeft;return t?t.left+n:an(wt(e)).left+n}function Vc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-So(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Yb(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=wt(r),i=t?xo(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=bt(1);const p=bt(0),d=Pt(r);if((d||!d&&!a)&&((In(r)!=="body"||cr(s))&&(l=Co(r)),d)){const g=an(r);u=Fn(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=s&&!d&&!a?Vc(s,l):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+h.x,y:n.y*u.y-l.scrollTop*u.y+p.y+h.y}}function Gb(e){return Array.from(e.getClientRects())}function jb(e){const t=wt(e),n=Co(e),r=e.ownerDocument.body,o=Ve(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ve(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+So(e);const i=-n.scrollTop;return it(r).direction==="rtl"&&(s+=Ve(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Yc=25;function Ub(e,t){const n=Ye(e),r=wt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const p=ja();(!p||p&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const u=So(r);if(u<=0){const p=r.ownerDocument,d=p.body,h=getComputedStyle(d),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(r.clientWidth-d.clientWidth-g);w<=Yc&&(a-=w)}else u<=Yc&&(a+=u);return{width:a,height:s,x:i,y:l}}function Rb(e,t){const n=an(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Pt(e)?Fn(e):bt(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function Gc(e,t,n){let r;if(t==="viewport")r=Ub(e,n);else if(t==="document")r=jb(wt(e));else if(st(t))r=Rb(t,n);else{const o=Hc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yo(r)}function jc(e,t){const n=Vt(e);return n===t||!st(n)||An(n)?!1:it(n).position==="fixed"||jc(n,t)}function Kb(e,t){const n=t.get(e);if(n)return n;let r=dr(e,[],!1).filter(i=>st(i)&&In(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?Vt(e):e;for(;st(s)&&!An(s);){const i=it(s),l=Ga(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||cr(s)&&!l&&jc(e,s))?r=r.filter(p=>p!==s):o=i,s=Vt(s)}return t.set(e,r),r}function qb(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?xo(t)?[]:Kb(t,this._c):[].concat(n),r],i=Gc(t,s[0],o);let l=i.top,u=i.right,p=i.bottom,d=i.left;for(let h=1;h<s.length;h++){const g=Gc(t,s[h],o);l=Ve(g.top,l),u=Ht(g.right,u),p=Ht(g.bottom,p),d=Ve(g.left,d)}return{width:u-d,height:p-l,x:d,y:l}}function Xb(e){const{width:t,height:n}=Lc(e);return{width:t,height:n}}function Zb(e,t,n){const r=Pt(t),o=wt(t),a=n==="fixed",s=an(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=So(o)}if(r||!r&&!a)if((In(t)!=="body"||cr(o))&&(i=Co(t)),r){const g=an(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&u();a&&!r&&o&&u();const p=o&&!r&&!a?Vc(o,i):bt(0),d=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:d,y:h,width:s.width,height:s.height}}function Ka(e){return it(e).position==="static"}function Uc(e,t){if(!Pt(e)||it(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wt(e)===n&&(n=n.ownerDocument.body),n}function Rc(e,t){const n=Ye(e);if(xo(e))return n;if(!Pt(e)){let o=Vt(e);for(;o&&!An(o);){if(st(o)&&!Ka(o))return o;o=Vt(o)}return n}let r=Uc(e,t);for(;r&&$b(r)&&Ka(r);)r=Uc(r,t);return r&&An(r)&&Ka(r)&&!Ga(r)?n:r||Lb(e)||n}const Qb=async function(e){const t=this.getOffsetParent||Rc,n=this.getDimensions,r=await n(e.floating);return{reference:Zb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Jb(e){return it(e).direction==="rtl"}const ey={convertOffsetParentRelativeRectToViewportRelativeRect:Yb,getDocumentElement:wt,getClippingRect:qb,getOffsetParent:Rc,getElementRects:Qb,getClientRects:Gb,getDimensions:Xb,getScale:Fn,isElement:st,isRTL:Jb};function Kc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ty(e,t){let n=null,r;const o=wt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:p,top:d,width:h,height:g}=u;if(i||t(),!h||!g)return;const w=vo(d),m=vo(o.clientWidth-(p+h)),v=vo(o.clientHeight-(d+g)),b=vo(p),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ve(0,Ht(1,l))||1};let k=!0;function E(C){const N=C[0].intersectionRatio;if(N!==l){if(!k)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!Kc(u,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),a}function ny(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ra(e),p=o||a?[...u?dr(u):[],...t?dr(t):[]]:[];p.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const d=u&&i?ty(u,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),u&&!l&&g.observe(u),t&&g.observe(t));let w,m=l?an(e):null;l&&v();function v(){const b=an(e);m&&!Kc(m,b)&&n(),m=b,w=requestAnimationFrame(v)}return n(),()=>{var b;p.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),d==null||d(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const ry=Ib,oy=Ab,ay=Pb,sy=Wb,iy=Ob,qc=Tb,ly=Fb,cy=(e,t,n)=>{const r=new Map,o={platform:ey,...n},a={...o.platform,_c:r};return Eb(e,t,{...o,platform:a})};var dy=typeof document<"u",uy=function(){},No=dy?S.useLayoutEffect:uy;function ko(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ko(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!ko(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Xc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zc(e,t){const n=Xc(e);return Math.round(t*n)/n}function qa(e){const t=f.useRef(e);return No(()=>{t.current=e}),t}function fy(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=f.useState(r);ko(h,r)||g(r);const[w,m]=f.useState(null),[v,b]=f.useState(null),y=f.useCallback(G=>{G!==C.current&&(C.current=G,m(G))},[]),x=f.useCallback(G=>{G!==N.current&&(N.current=G,b(G))},[]),k=a||w,E=s||v,C=f.useRef(null),N=f.useRef(null),M=f.useRef(p),D=l!=null,I=qa(l),R=qa(o),z=qa(u),q=f.useCallback(()=>{if(!C.current||!N.current)return;const G={placement:t,strategy:n,middleware:h};R.current&&(G.platform=R.current),cy(C.current,N.current,G).then(A=>{const Q={...A,isPositioned:z.current!==!1};Y.current&&!ko(M.current,Q)&&(M.current=Q,Gr.flushSync(()=>{d(Q)}))})},[h,t,n,R,z]);No(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(G=>({...G,isPositioned:!1})))},[u]);const Y=f.useRef(!1);No(()=>(Y.current=!0,()=>{Y.current=!1}),[]),No(()=>{if(k&&(C.current=k),E&&(N.current=E),k&&E){if(I.current)return I.current(k,E,q);q()}},[k,E,q,I,D]);const ae=f.useMemo(()=>({reference:C,floating:N,setReference:y,setFloating:x}),[y,x]),B=f.useMemo(()=>({reference:k,floating:E}),[k,E]),K=f.useMemo(()=>{const G={position:n,left:0,top:0};if(!B.floating)return G;const A=Zc(B.floating,p.x),Q=Zc(B.floating,p.y);return i?{...G,transform:"translate("+A+"px, "+Q+"px)",...Xc(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:Q}},[n,i,B.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:q,refs:ae,elements:B,floatingStyles:K}),[p,q,ae,B,K])}const py=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qc({element:r.current,padding:o}).fn(n):{}:r?qc({element:r,padding:o}).fn(n):{}}}},hy=(e,t)=>{const n=ry(e);return{name:n.name,fn:n.fn,options:[e,t]}},gy=(e,t)=>{const n=oy(e);return{name:n.name,fn:n.fn,options:[e,t]}},my=(e,t)=>({fn:ly(e).fn,options:[e,t]}),vy=(e,t)=>{const n=ay(e);return{name:n.name,fn:n.fn,options:[e,t]}},by=(e,t)=>{const n=sy(e);return{name:n.name,fn:n.fn,options:[e,t]}},yy=(e,t)=>{const n=iy(e);return{name:n.name,fn:n.fn,options:[e,t]}},wy=(e,t)=>{const n=py(e);return{name:n.name,fn:n.fn,options:[e,t]}};var xy="Arrow",Qc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return c.jsx(ne.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qc.displayName=xy;var Cy=Qc;function Sy(e){const[t,n]=f.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Xa="Popper",[Jc,Yt]=Ze(Xa),[Ny,ed]=Jc(Xa),td=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return c.jsx(Ny,{scope:t,anchor:r,onAnchorChange:o,children:n})};td.displayName=Xa;var nd="PopperAnchor",rd=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=ed(nd,n),s=f.useRef(null),i=he(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:c.jsx(ne.div,{...o,ref:i})});rd.displayName=nd;var Za="PopperContent",[ky,My]=Jc(Za),od=f.forwardRef((e,t)=>{var W,U,X,se,de,ce;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=ed(Za,n),[b,y]=f.useState(null),x=he(t,Me=>y(Me)),[k,E]=f.useState(null),C=Sy(k),N=(C==null?void 0:C.width)??0,M=(C==null?void 0:C.height)??0,D=r+(a!=="center"?"-"+a:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},R=Array.isArray(u)?u:[u],z=R.length>0,q={padding:I,boundary:R.filter(Ey),altBoundary:z},{refs:Y,floatingStyles:ae,placement:B,isPositioned:K,middlewareData:G}=fy({strategy:"fixed",placement:D,whileElementsMounted:(...Me)=>ny(...Me,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[hy({mainAxis:o+M,alignmentAxis:s}),l&&gy({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?my():void 0,...q}),l&&vy({...q}),by({...q,apply:({elements:Me,rects:Ee,availableWidth:tt,availableHeight:Ue})=>{const{width:Fe,height:Xt}=Ee.reference,De=Me.floating.style;De.setProperty("--radix-popper-available-width",`${tt}px`),De.setProperty("--radix-popper-available-height",`${Ue}px`),De.setProperty("--radix-popper-anchor-width",`${Fe}px`),De.setProperty("--radix-popper-anchor-height",`${Xt}px`)}}),k&&wy({element:k,padding:i}),Ty({arrowWidth:N,arrowHeight:M}),h&&yy({strategy:"referenceHidden",...q})]}),[A,Q]=id(B),oe=ot(w);Pe(()=>{K&&(oe==null||oe())},[K,oe]);const _=(W=G.arrow)==null?void 0:W.x,F=(U=G.arrow)==null?void 0:U.y,V=((X=G.arrow)==null?void 0:X.centerOffset)!==0,[$,Z]=f.useState();return Pe(()=>{b&&Z(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:K?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[(se=G.transformOrigin)==null?void 0:se.x,(de=G.transformOrigin)==null?void 0:de.y].join(" "),...((ce=G.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(ky,{scope:n,placedSide:A,onArrowChange:E,arrowX:_,arrowY:F,shouldHideArrow:V,children:c.jsx(ne.div,{"data-side":A,"data-align":Q,...m,ref:x,style:{...m.style,animation:K?void 0:"none"}})})})});od.displayName=Za;var ad="PopperArrow",Dy={top:"bottom",right:"left",bottom:"top",left:"right"},sd=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=My(ad,r),s=Dy[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:c.jsx(Cy,{...o,ref:n,style:{...o.style,display:"block"}})})});sd.displayName=ad;function Ey(e){return e!==null}var Ty=e=>({name:"transformOrigin",options:e,fn(t){var v,b,y;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,p]=id(n),d={start:"0%",center:"50%",end:"100%"}[p],h=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let w="",m="";return u==="bottom"?(w=s?d:`${h}px`,m=`${-l}px`):u==="top"?(w=s?d:`${h}px`,m=`${r.floating.height+l}px`):u==="right"?(w=`${-l}px`,m=s?d:`${g}px`):u==="left"&&(w=`${r.floating.width+l}px`,m=s?d:`${g}px`),{data:{x:w,y:m}}}});function id(e){const[t,n="center"]=e.split("-");return[t,n]}var ur=td,fr=rd,Mo=od,Do=sd,Eo="Popover",[ld]=Ze(Eo,[Yt]),pr=Yt(),[Py,Gt]=ld(Eo),cd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=pr(t),l=f.useRef(null),[u,p]=f.useState(!1),[d,h]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:Eo});return c.jsx(ur,{...i,children:c.jsx(Py,{scope:t,contentId:xe(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>p(!0),[]),onCustomAnchorRemove:f.useCallback(()=>p(!1),[]),modal:s,children:n})})};cd.displayName=Eo;var dd="PopoverAnchor",ud=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Gt(dd,n),a=pr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(fr,{...a,...r,ref:t})});ud.displayName=dd;var fd="PopoverTrigger",pd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Gt(fd,n),a=pr(n),s=he(t,o.triggerRef),i=c.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yd(o.open),...r,ref:s,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(fr,{asChild:!0,...a,children:i})});pd.displayName=fd;var Qa="PopoverPortal",[Oy,_y]=ld(Qa,{forceMount:void 0}),hd=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Gt(Qa,t);return c.jsx(Oy,{scope:t,forceMount:n,children:c.jsx(Be,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};hd.displayName=Qa;var Wn="PopoverContent",gd=f.forwardRef((e,t)=>{const n=_y(Wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Gt(Wn,e.__scopePopover);return c.jsx(Be,{present:r||a.open,children:a.modal?c.jsx(Ay,{...o,ref:t}):c.jsx(Fy,{...o,ref:t})})});gd.displayName=Wn;var Iy=en("PopoverContent.RemoveScroll"),Ay=f.forwardRef((e,t)=>{const n=Gt(Wn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return io(s)},[]),c.jsx(ar,{as:Iy,allowPinchZoom:!0,children:c.jsx(md,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Fy=f.forwardRef((e,t)=>{const n=Gt(Wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return c.jsx(md,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),md=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:p,...d}=e,h=Gt(Wn,n),g=pr(n);return Jr(),c.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(Mo,{"data-state":yd(h.open),role:"dialog",id:h.contentId,...g,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),vd="PopoverClose",bd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Gt(vd,n);return c.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});bd.displayName=vd;var Wy="PopoverArrow",$y=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=pr(n);return c.jsx(Do,{...o,...r,ref:t})});$y.displayName=Wy;function yd(e){return e?"open":"closed"}var By=cd,zy=ud,Ly=pd,Hy=hd,wd=gd,Vy=bd;const sn=By,hr=Ly,Yy=Vy,Gy=zy,jt=f.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>c.jsx(Hy,{children:c.jsx(wd,{ref:o,align:t,sideOffset:n,className:P("z-50 rounded-lg ring-1 ring-border/60 bg-background p-4 shadow-md outline-none","origin-(--radix-popover-content-transform-origin)","data-[state=open]:animate-popover-in","data-[state=closed]:animate-popover-out",e),...r})}));jt.displayName=wd.displayName;const xd=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(sn,{...s,children:[c.jsx(hr,{asChild:!0,children:t}),c.jsx(jt,{side:n,align:r,sideOffset:o,className:a,children:e})]});xd.displayName="Popover";const Cd=Ce(["w-full flex items-center justify-between gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Ja=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(Cd({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[c.jsx("span",{className:P("truncate",!o&&"text-muted-foreground"),children:o??r}),c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})]}));Ja.displayName="ComboBoxTrigger";const Sd=f.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>c.jsx(jt,{ref:s,className:P("w-[var(--radix-popover-trigger-width)] p-0",e),align:a,sideOffset:4,children:c.jsxs(lr,{className:"w-full",value:r,onValueChange:o,children:[c.jsx("div",{className:"border-b border-border",children:c.jsx(fo,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),c.jsx(po,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));Sd.displayName="ComboBoxContent";const Nd=f.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>c.jsxs(uo,{ref:a,className:P("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),onSelect:r,...o,children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:n&&c.jsx(yn,{className:"size-4","aria-hidden":"true"})}),t]}));Nd.displayName="ComboBoxItem";const kd=f.forwardRef(({className:e,children:t,...n},r)=>c.jsx(ho,{ref:r,className:P("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));kd.displayName="ComboBoxEmpty";const Md=f.forwardRef(({className:e,heading:t,children:n,...r},o)=>c.jsx(Mc,{ref:o,heading:t,className:P("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground",e),...r,children:n}));Md.displayName="ComboBoxGroup";const Dd=f.forwardRef(({className:e,...t},n)=>c.jsx(Dc,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Dd.displayName="ComboBoxSeparator";const Ed=sn;Ed.displayName="ComboBoxRoot";const Td=f.forwardRef(({options:e,value:t,onValueChange:n,placeholder:r="Select…",searchPlaceholder:o="Search…",emptyMessage:a="No results found.",size:s,isError:i,disabled:l,className:u},p)=>{const[d,h]=f.useState(!1),[g,w]=f.useState(""),m=f.useMemo(()=>{var b;return(b=e.find(y=>y.value===t))==null?void 0:b.label},[e,t]);function v(b){h(b),b||w("")}return c.jsxs(sn,{open:d,onOpenChange:v,children:[c.jsx(hr,{asChild:!0,children:c.jsx(Ja,{ref:p,size:s,isError:i,disabled:l,className:u,placeholder:r,"aria-expanded":d,"aria-haspopup":"listbox",children:m})}),c.jsx(jt,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:c.jsxs(lr,{className:"w-full",children:[c.jsx("div",{className:"border-b border-border",children:c.jsx(fo,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:o,value:g,onValueChange:w})}),c.jsxs(po,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(ho,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(b=>c.jsxs(uo,{value:b.label,disabled:b.disabled,className:P("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"),onSelect:()=>{n==null||n(b.value),h(!1)},children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:t===b.value&&c.jsx(yn,{className:"size-4","aria-hidden":"true"})}),b.label]},b.value))]})]})})]})});Td.displayName="ComboBox";const jy=new Set(["contains","equals","startsWith","endsWith","notContains","empty","notEmpty"]);function es(e){return jy.has(e)}const ts=[{value:"contains",label:"Contains"},{value:"equals",label:"Equals"},{value:"startsWith",label:"Starts with"},{value:"endsWith",label:"Ends with"},{value:"notContains",label:"Does not contain"},{value:"empty",label:"Is empty"},{value:"notEmpty",label:"Is not empty"}];function Uy(e,t){const n=e.getValue(t);return n==null?"":typeof n=="string"?n:String(n)}const ns=(e,t,n,r)=>{const o=Uy(e,t).toLowerCase();if(n==null||n==="")return!0;if(typeof n=="string"){const u=n.trim().toLowerCase();return u===""||o.includes(u)}if(typeof n!="object"||n===null)return!0;const a=n,s=a.op,i=typeof a.value=="string"?a.value:"";if(!s||!es(s))return!0;const l=i.trim().toLowerCase();switch(s){case"empty":return o.trim()==="";case"notEmpty":return o.trim()!=="";case"contains":return l===""||o.includes(l);case"equals":return l===""?!0:o===l;case"startsWith":return l===""||o.startsWith(l);case"endsWith":return l===""||o.endsWith(l);case"notContains":return l===""?!0:!o.includes(l);default:return!0}};function Ry(e){if(e==null||e==="")return{op:"contains",value:""};if(typeof e=="string")return{op:"contains",value:e};if(typeof e=="object"&&e!==null&&"op"in e){const t=e;if(es(t.op))return{op:t.op,value:t.value??""}}return{op:"contains",value:""}}function Ky(e){if(!(e.op==="contains"&&e.value.trim()===""))return e}const rs=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:"w-full min-w-0",children:c.jsx("table",{ref:n,className:P("w-full caption-bottom text-sm",e),...t})}));rs.displayName="Table";const os=f.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:P("[&_tr]:border-b [&_tr]:border-border",e),...t}));os.displayName="TableHeader";const as=f.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:P("[&_tr:last-child]:border-0",e),...t}));as.displayName="TableBody";const ss=f.forwardRef(({className:e,...t},n)=>c.jsx("tfoot",{ref:n,className:P("border-t border-border bg-muted/50 font-medium","[&>tr]:last:border-b-0",e),...t}));ss.displayName="TableFooter";const Ot=f.forwardRef(({className:e,...t},n)=>c.jsx("tr",{ref:n,className:P("border-b border-border","transition-[background-color] duration-100","hover:bg-muted/50","data-[selected=true]:bg-muted",e),...t}));Ot.displayName="TableRow";const To=f.forwardRef(({className:e,...t},n)=>c.jsx("th",{ref:n,className:P("h-10 px-4 text-left align-middle","text-xs font-medium text-muted-foreground uppercase tracking-wide","whitespace-nowrap","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));To.displayName="TableHead";const ln=f.forwardRef(({className:e,...t},n)=>c.jsx("td",{ref:n,className:P("px-4 py-3 align-middle","[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-px",e),...t}));ln.displayName="TableCell";const Pd=f.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:P("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Pd.displayName="TableCaption";const is=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("animate-pulse rounded-md bg-muted",e),...t}));is.displayName="Skeleton";const Od=f.createContext({inGroup:!1}),_d=Ce(["w-full rounded-md border border-input bg-background","font-body text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default","[&_svg]:pointer-events-none"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),gr=f.forwardRef(({className:e,size:t,isError:n,icon:r,iconPosition:o="left",...a},s)=>{const{inGroup:i}=f.use(Od);return c.jsxs("div",{className:"relative w-full",children:[r&&o==="left"&&c.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r}),c.jsx("input",{ref:s,className:P(_d({size:t}),i&&"border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0",n&&"border-destructive focus-visible:ring-destructive",r&&o==="left"&&"pl-9",r&&o==="right"&&"pr-9",e),"aria-invalid":n||void 0,...a}),r&&o==="right"&&c.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground [&_svg]:size-4",children:r})]})});gr.displayName="Input";const ls=f.forwardRef(({className:e,isError:t,children:n,...r},o)=>c.jsx(Od,{value:{inGroup:!0,isError:t},children:c.jsx("div",{ref:o,"aria-invalid":t||void 0,className:P("flex items-stretch overflow-hidden","rounded-md border border-input bg-background","divide-x divide-border","transition-[color,border-color,box-shadow]","focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background","has-[input:disabled]:opacity-50 has-[input:disabled]:pointer-events-none",t&&"border-destructive focus-within:ring-destructive",e),...r,children:n})}));ls.displayName="InputGroup";const cs=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("flex shrink-0 items-center px-3","bg-muted text-muted-foreground text-sm select-none",e),...t}));cs.displayName="InputAddon";const ds=f.forwardRef(({className:e,...t},n)=>c.jsx("nav",{ref:n,"aria-label":"Pagination",className:P("flex items-center gap-1",e),...t}));ds.displayName="PaginationRoot";const us=["inline-flex items-center justify-center","size-10 rounded-md text-sm font-ui font-medium select-none tabular-nums","transition-[color,background-color,box-shadow] duration-150","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"].join(" "),fs=f.forwardRef(({className:e,isActive:t,...n},r)=>c.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:P(us,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));fs.displayName="PaginationItem";const ps=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Previous page",className:P(us,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(Qi,{className:"size-4"})}));ps.displayName="PaginationPrev";const hs=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Next page",className:P(us,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(wn,{className:"size-4"})}));hs.displayName="PaginationNext";const gs=({className:e,...t})=>c.jsx("span",{"aria-hidden":"true",className:P("inline-flex size-9 items-center justify-center text-muted-foreground",e),...t,children:c.jsx(Lg,{className:"size-4"})});gs.displayName="PaginationEllipsis";function qy(e,t,n){const r=Math.max(e-n,1),o=Math.min(e+n,t),a=r>2,s=o<t-1;if(!a&&!s)return Array.from({length:t},(i,l)=>l+1);if(!a){const i=3+2*n;return i>=t?Array.from({length:t},(l,u)=>u+1):[...Array.from({length:i},(l,u)=>u+1),"ellipsis-right",t]}if(!s){const i=3+2*n,l=t-i+1;return l<=1?Array.from({length:t},(u,p)=>p+1):[1,"ellipsis-left",...Array.from({length:i},(u,p)=>l+p)]}return[1,"ellipsis-left",...Array.from({length:o-r+1},(i,l)=>r+l),"ellipsis-right",t]}const ms=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=qy(e,t,r);return c.jsxs(ds,{className:o,...a,children:[c.jsx(ps,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?c.jsx(gs,{},i):c.jsx(fs,{isActive:i===e,onClick:()=>n(i),children:i},i)),c.jsx(hs,{onClick:()=>n(e+1),disabled:e>=t})]})};ms.displayName="Pagination";function Id(e,[t,n]){return Math.min(n,Math.max(t,e))}function Xy(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ad=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zy="VisuallyHidden",Fd=f.forwardRef((e,t)=>c.jsx(ne.span,{...e,ref:t,style:{...Ad,...e.style}}));Fd.displayName=Zy;var Qy=Fd,Jy=[" ","Enter","ArrowUp","ArrowDown"],ew=[" ","Enter"],cn="Select",[Po,Oo,tw]=jr(cn),[$n]=Ze(cn,[tw,Yt]),_o=Yt(),[nw,Ut]=$n(cn),[rw,ow]=$n(cn),Wd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:d,disabled:h,required:g,form:w}=e,m=_o(t),[v,b]=f.useState(null),[y,x]=f.useState(null),[k,E]=f.useState(!1),C=tr(u),[N,M]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:cn}),[D,I]=Qe({prop:s,defaultProp:i,onChange:l,caller:cn}),R=f.useRef(null),z=v?w||!!v.closest("form"):!0,[q,Y]=f.useState(new Set),ae=Array.from(q).map(B=>B.props.value).join(";");return c.jsx(ur,{...m,children:c.jsxs(nw,{required:g,scope:t,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:E,contentId:xe(),value:D,onValueChange:I,open:N,onOpenChange:M,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[c.jsx(Po.Provider,{scope:t,children:c.jsx(rw,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(B=>{Y(K=>new Set(K).add(B))},[]),onNativeOptionRemove:f.useCallback(B=>{Y(K=>{const G=new Set(K);return G.delete(B),G})},[]),children:n})}),z?c.jsxs(su,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:d,value:D,onChange:B=>I(B.target.value),disabled:h,form:w,children:[D===void 0?c.jsx("option",{value:""}):null,Array.from(q)]},ae):null]})})};Wd.displayName=cn;var $d="SelectTrigger",Bd=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=_o(n),s=Ut($d,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=Oo(n),p=f.useRef("touch"),[d,h,g]=lu(m=>{const v=u().filter(x=>!x.disabled),b=v.find(x=>x.value===s.value),y=cu(v,m,b);y!==void 0&&s.onValueChange(y.value)}),w=m=>{i||(s.onOpenChange(!0),g()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(fr,{asChild:!0,...a,children:c.jsx(ne.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":iu(s.value)?"":void 0,...o,ref:l,onClick:j(o.onClick,m=>{m.currentTarget.focus(),p.current!=="mouse"&&w(m)}),onPointerDown:j(o.onPointerDown,m=>{p.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:j(o.onKeyDown,m=>{const v=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Jy.includes(m.key)&&(w(),m.preventDefault())})})})});Bd.displayName=$d;var zd="SelectValue",Ld=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Ut(zd,n),{onValueNodeHasChildrenChange:u}=l,p=a!==void 0,d=he(t,l.onValueNodeChange);return Pe(()=>{u(p)},[u,p]),c.jsx(ne.span,{...i,ref:d,style:{pointerEvents:"none"},children:iu(l.value)?c.jsx(c.Fragment,{children:s}):a})});Ld.displayName=zd;var aw="SelectIcon",sw=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});sw.displayName=aw;var iw="SelectPortal",Hd=e=>c.jsx(kn,{asChild:!0,...e});Hd.displayName=iw;var dn="SelectContent",Vd=f.forwardRef((e,t)=>{const n=Ut(dn,e.__scopeSelect),[r,o]=f.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Gr.createPortal(c.jsx(Yd,{scope:e.__scopeSelect,children:c.jsx(Po.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(Gd,{...e,ref:t})});Vd.displayName=dn;var lt=10,[Yd,Rt]=$n(dn),lw="SelectContentImpl",cw=en("SelectContent.RemoveScroll"),Gd=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:d,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...b}=e,y=Ut(dn,n),[x,k]=f.useState(null),[E,C]=f.useState(null),N=he(t,W=>k(W)),[M,D]=f.useState(null),[I,R]=f.useState(null),z=Oo(n),[q,Y]=f.useState(!1),ae=f.useRef(!1);f.useEffect(()=>{if(x)return io(x)},[x]),Jr();const B=f.useCallback(W=>{const[U,...X]=z().map(ce=>ce.ref.current),[se]=X.slice(-1),de=document.activeElement;for(const ce of W)if(ce===de||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===U&&E&&(E.scrollTop=0),ce===se&&E&&(E.scrollTop=E.scrollHeight),ce==null||ce.focus(),document.activeElement!==de))return},[z,E]),K=f.useCallback(()=>B([M,x]),[B,M,x]);f.useEffect(()=>{q&&K()},[q,K]);const{onOpenChange:G,triggerPointerDownPosRef:A}=y;f.useEffect(()=>{if(x){let W={x:0,y:0};const U=se=>{var de,ce;W={x:Math.abs(Math.round(se.pageX)-(((de=A.current)==null?void 0:de.x)??0)),y:Math.abs(Math.round(se.pageY)-(((ce=A.current)==null?void 0:ce.y)??0))}},X=se=>{W.x<=10&&W.y<=10?se.preventDefault():x.contains(se.target)||G(!1),document.removeEventListener("pointermove",U),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,G,A]),f.useEffect(()=>{const W=()=>G(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[G]);const[Q,oe]=lu(W=>{const U=z().filter(de=>!de.disabled),X=U.find(de=>de.ref.current===document.activeElement),se=cu(U,W,X);se&&setTimeout(()=>se.ref.current.focus())}),_=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&(D(W),se&&(ae.current=!0))},[y.value]),F=f.useCallback(()=>x==null?void 0:x.focus(),[x]),V=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&R(W)},[y.value]),$=r==="popper"?vs:jd,Z=$===vs?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:d,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return c.jsx(Yd,{scope:n,content:x,viewport:E,onViewportChange:C,itemRefCallback:_,selectedItem:M,onItemLeave:F,itemTextRefCallback:V,focusSelectedItem:K,selectedItemText:I,position:r,isPositioned:q,searchRef:Q,children:c.jsx(ar,{as:cw,allowPinchZoom:!0,children:c.jsx(or,{asChild:!0,trapped:y.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:j(o,W=>{var U;(U=y.trigger)==null||U.focus({preventScroll:!0}),W.preventDefault()}),children:c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsx($,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:W=>W.preventDefault(),...b,...Z,onPlaced:()=>Y(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:j(b.onKeyDown,W=>{const U=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!U&&W.key.length===1&&oe(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let se=z().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(W.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const de=W.target,ce=se.indexOf(de);se=se.slice(ce+1)}setTimeout(()=>B(se)),W.preventDefault()}})})})})})})});Gd.displayName=lw;var dw="SelectItemAlignedPosition",jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ut(dn,n),s=Rt(dn,n),[i,l]=f.useState(null),[u,p]=f.useState(null),d=he(t,N=>p(N)),h=Oo(n),g=f.useRef(!1),w=f.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:b,focusSelectedItem:y}=s,x=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&m&&v&&b){const N=a.trigger.getBoundingClientRect(),M=u.getBoundingClientRect(),D=a.valueNode.getBoundingClientRect(),I=b.getBoundingClientRect();if(a.dir!=="rtl"){const de=I.left-M.left,ce=D.left-de,Me=N.left-ce,Ee=N.width+Me,tt=Math.max(Ee,M.width),Ue=window.innerWidth-lt,Fe=Id(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.left=Fe+"px"}else{const de=M.right-I.right,ce=window.innerWidth-D.right-de,Me=window.innerWidth-N.right-ce,Ee=N.width+Me,tt=Math.max(Ee,M.width),Ue=window.innerWidth-lt,Fe=Id(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.right=Fe+"px"}const R=h(),z=window.innerHeight-lt*2,q=m.scrollHeight,Y=window.getComputedStyle(u),ae=parseInt(Y.borderTopWidth,10),B=parseInt(Y.paddingTop,10),K=parseInt(Y.borderBottomWidth,10),G=parseInt(Y.paddingBottom,10),A=ae+B+q+G+K,Q=Math.min(v.offsetHeight*5,A),oe=window.getComputedStyle(m),_=parseInt(oe.paddingTop,10),F=parseInt(oe.paddingBottom,10),V=N.top+N.height/2-lt,$=z-V,Z=v.offsetHeight/2,W=v.offsetTop+Z,U=ae+B+W,X=A-U;if(U<=V){const de=R.length>0&&v===R[R.length-1].ref.current;i.style.bottom="0px";const ce=u.clientHeight-m.offsetTop-m.offsetHeight,Me=Math.max($,Z+(de?F:0)+ce+K),Ee=U+Me;i.style.height=Ee+"px"}else{const de=R.length>0&&v===R[0].ref.current;i.style.top="0px";const Me=Math.max(V,ae+m.offsetTop+(de?_:0)+Z)+X;i.style.height=Me+"px",m.scrollTop=U-V+m.offsetTop}i.style.margin=`${lt}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,u,m,v,b,a.dir,r]);Pe(()=>x(),[x]);const[k,E]=f.useState();Pe(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(N=>{N&&w.current===!0&&(x(),y==null||y(),w.current=!1)},[x,y]);return c.jsx(fw,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:c.jsx(ne.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});jd.displayName=dw;var uw="SelectPopperPosition",vs=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...a}=e,s=_o(n);return c.jsx(Mo,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});vs.displayName=uw;var[fw,bs]=$n(dn,{}),ys="SelectViewport",Ud=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Rt(ys,n),s=bs(ys,n),i=he(t,a.onViewportChange),l=f.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(Po.Slot,{scope:n,children:c.jsx(ne.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:j(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&d){const g=Math.abs(l.current-p.scrollTop);if(g>0){const w=window.innerHeight-lt*2,m=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),b=Math.max(m,v);if(b<w){const y=b+g,x=Math.min(w,y),k=y-x;d.style.height=x+"px",d.style.bottom==="0px"&&(p.scrollTop=k>0?k:0,d.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});Ud.displayName=ys;var Rd="SelectGroup",[pw,hw]=$n(Rd),Kd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xe();return c.jsx(pw,{scope:n,id:o,children:c.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Kd.displayName=Rd;var qd="SelectLabel",Xd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=hw(qd,n);return c.jsx(ne.div,{id:o.id,...r,ref:t})});Xd.displayName=qd;var Io="SelectItem",[gw,Zd]=$n(Io),Qd=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Ut(Io,n),l=Rt(Io,n),u=i.value===r,[p,d]=f.useState(a??""),[h,g]=f.useState(!1),w=he(t,y=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,y,r,o)}),m=xe(),v=f.useRef("touch"),b=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(gw,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:f.useCallback(y=>{d(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(Po.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:c.jsx(ne.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:j(s.onFocus,()=>g(!0)),onBlur:j(s.onBlur,()=>g(!1)),onClick:j(s.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:j(s.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:j(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:j(s.onPointerMove,y=>{var x;v.current=y.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(s.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:j(s.onKeyDown,y=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&y.key===" "||(ew.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});Qd.displayName=Io;var mr="SelectItemText",Jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Ut(mr,n),i=Rt(mr,n),l=Zd(mr,n),u=ow(mr,n),[p,d]=f.useState(null),h=he(t,b=>d(b),l.onItemTextChange,b=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,b,l.value,l.disabled)}),g=p==null?void 0:p.textContent,w=f.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return Pe(()=>(m(w),()=>v(w)),[m,v,w]),c.jsxs(c.Fragment,{children:[c.jsx(ne.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Gr.createPortal(a.children,s.valueNode):null]})});Jd.displayName=mr;var eu="SelectItemIndicator",tu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Zd(eu,n).isSelected?c.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});tu.displayName=eu;var ws="SelectScrollUpButton",nu=f.forwardRef((e,t)=>{const n=Rt(ws,e.__scopeSelect),r=bs(ws,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(ou,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});nu.displayName=ws;var xs="SelectScrollDownButton",ru=f.forwardRef((e,t)=>{const n=Rt(xs,e.__scopeSelect),r=bs(xs,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;a(p)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(ou,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ru.displayName=xs;var ou=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Rt("SelectScrollButton",n),s=f.useRef(null),i=Oo(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Pe(()=>{var p;const u=i().find(d=>d.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),c.jsx(ne.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:j(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:j(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{l()})})}),mw="SelectSeparator",au=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});au.displayName=mw;var Cs="SelectArrow",vw=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=_o(n),a=Ut(Cs,n),s=Rt(Cs,n);return a.open&&s.position==="popper"?c.jsx(Do,{...o,...r,ref:t}):null});vw.displayName=Cs;var bw="SelectBubbleInput",su=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=Xy(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&p){const d=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(d)}},[s,t]),c.jsx(ne.select,{...n,style:{...Ad,...n.style},ref:a,defaultValue:t})});su.displayName=bw;function iu(e){return e===""||e===void 0}function lu(e){const t=ot(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function cu(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=yw(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function yw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ww=Wd,du=Bd,xw=Ld,Cw=Hd,uu=Vd,Sw=Ud,Nw=Kd,fu=Xd,pu=Qd,kw=Jd,Mw=tu,hu=nu,gu=ru,mu=au;const vu=Ce(["w-full flex items-center justify-between gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-muted-foreground"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Ss=ww,Dw=Nw,Ns=xw,Ao=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>c.jsxs(du,{ref:a,className:P("group",vu({size:t,isError:n}),e),"aria-invalid":n||void 0,...o,children:[r,c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground transition-[transform] duration-150 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Ao.displayName=du.displayName;const ks=f.forwardRef(({className:e,...t},n)=>c.jsx(hu,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:c.jsx(Zr,{className:"size-4"})}));ks.displayName=hu.displayName;const Ms=f.forwardRef(({className:e,...t},n)=>c.jsx(gu,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:c.jsx(Mt,{className:"size-4"})}));Ms.displayName=gu.displayName;const Fo=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>c.jsx(Cw,{children:c.jsxs(uu,{ref:o,position:n,sideOffset:4,className:P("z-50 min-w-32 overflow-hidden rounded-lg ring-1 ring-border/60 bg-background text-foreground shadow-md","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",n==="popper"&&["data-[side=bottom]:translate-y-1","data-[side=top]:-translate-y-1"],e),...r,children:[c.jsx(ks,{}),c.jsx(Sw,{className:"p-1",children:t}),c.jsx(Ms,{})]})}));Fo.displayName=uu.displayName;const bu=f.forwardRef(({className:e,...t},n)=>c.jsx(fu,{ref:n,className:P("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));bu.displayName=fu.displayName;const Ds=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(pu,{ref:r,className:P("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm","outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:c.jsx(Mw,{children:c.jsx(yn,{className:"size-4"})})}),c.jsx(kw,{children:t})]}));Ds.displayName=pu.displayName;const yu=f.forwardRef(({className:e,...t},n)=>c.jsx(mu,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));yu.displayName=mu.displayName;const wu=f.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>c.jsxs(Ss,{disabled:r,...s,children:[c.jsx(Ao,{ref:i,size:t,isError:n,className:o,children:c.jsx(Ns,{placeholder:e})}),c.jsx(Fo,{children:a})]}));wu.displayName="Select";var Es="rovingFocusGroup.onEntryFocus",Ew={bubbles:!1,cancelable:!0},vr="RovingFocusGroup",[Ts,xu,Tw]=jr(vr),[Pw,Wo]=Ze(vr,[Tw]),[Ow,_w]=Pw(vr),Cu=f.forwardRef((e,t)=>c.jsx(Ts.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Ts.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Iw,{...e,ref:t})})}));Cu.displayName=vr;var Iw=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...d}=e,h=f.useRef(null),g=he(t,h),w=tr(a),[m,v]=Qe({prop:s,defaultProp:i??null,onChange:l,caller:vr}),[b,y]=f.useState(!1),x=ot(u),k=xu(n),E=f.useRef(!1),[C,N]=f.useState(0);return f.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(Es,x),()=>M.removeEventListener(Es,x)},[x]),c.jsx(Ow,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(M=>v(M),[v]),onItemShiftTab:f.useCallback(()=>y(!0),[]),onFocusableItemAdd:f.useCallback(()=>N(M=>M+1),[]),onFocusableItemRemove:f.useCallback(()=>N(M=>M-1),[]),children:c.jsx(ne.div,{tabIndex:b||C===0?-1:0,"data-orientation":r,...d,ref:g,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{E.current=!0}),onFocus:j(e.onFocus,M=>{const D=!E.current;if(M.target===M.currentTarget&&D&&!b){const I=new CustomEvent(Es,Ew);if(M.currentTarget.dispatchEvent(I),!I.defaultPrevented){const R=k().filter(B=>B.focusable),z=R.find(B=>B.active),q=R.find(B=>B.id===m),ae=[z,q,...R].filter(Boolean).map(B=>B.ref.current);ku(ae,p)}}E.current=!1}),onBlur:j(e.onBlur,()=>y(!1))})})}),Su="RovingFocusGroupItem",Nu=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=xe(),u=a||l,p=_w(Su,n),d=p.currentTabStopId===u,h=xu(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=p;return f.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),c.jsx(Ts.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:c.jsx(ne.span,{tabIndex:d?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:j(e.onMouseDown,v=>{r?p.onItemFocus(u):v.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:j(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=Ww(v,p.orientation,p.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=h().filter(k=>k.focusable).map(k=>k.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const k=x.indexOf(v.currentTarget);x=p.loop?$w(x,k+1):x.slice(k+1)}setTimeout(()=>ku(x))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:m!=null}):s})})});Nu.displayName=Su;var Aw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ww(e,t,n){const r=Fw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Aw[r]}function ku(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $w(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Mu=Cu,Du=Nu,Ps=["Enter"," "],Bw=["ArrowDown","PageUp","Home"],Eu=["ArrowUp","PageDown","End"],zw=[...Bw,...Eu],Lw={ltr:[...Ps,"ArrowRight"],rtl:[...Ps,"ArrowLeft"]},Hw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},br="Menu",[yr,Vw,Yw]=jr(br),[un,Tu]=Ze(br,[Yw,Yt,Wo]),wr=Yt(),Pu=Wo(),[Ou,Kt]=un(br),[Gw,xr]=un(br),_u=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=wr(t),[l,u]=f.useState(null),p=f.useRef(!1),d=ot(a),h=tr(o);return f.useEffect(()=>{const g=()=>{p.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>p.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),c.jsx(ur,{...i,children:c.jsx(Ou,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:c.jsx(Gw,{scope:t,onClose:f.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:p,dir:h,modal:s,children:r})})})};_u.displayName=br;var jw="MenuAnchor",Os=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(fr,{...o,...r,ref:t})});Os.displayName=jw;var _s="MenuPortal",[Uw,Iu]=un(_s,{forceMount:void 0}),Au=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Kt(_s,t);return c.jsx(Uw,{scope:t,forceMount:n,children:c.jsx(Be,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};Au.displayName=_s;var Je="MenuContent",[Rw,Is]=un(Je),Fu=f.forwardRef((e,t)=>{const n=Iu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Kt(Je,e.__scopeMenu),s=xr(Je,e.__scopeMenu);return c.jsx(yr.Provider,{scope:e.__scopeMenu,children:c.jsx(Be,{present:r||a.open,children:c.jsx(yr.Slot,{scope:e.__scopeMenu,children:s.modal?c.jsx(Kw,{...o,ref:t}):c.jsx(qw,{...o,ref:t})})})})}),Kw=f.forwardRef((e,t)=>{const n=Kt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return io(a)},[]),c.jsx(As,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),qw=f.forwardRef((e,t)=>{const n=Kt(Je,e.__scopeMenu);return c.jsx(As,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Xw=en("MenuContent.ScrollLock"),As=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=Kt(Je,n),b=xr(Je,n),y=wr(n),x=Pu(n),k=Vw(n),[E,C]=f.useState(null),N=f.useRef(null),M=he(t,N,v.onContentChange),D=f.useRef(0),I=f.useRef(""),R=f.useRef(0),z=f.useRef(null),q=f.useRef("right"),Y=f.useRef(0),ae=w?ar:f.Fragment,B=w?{as:Xw,allowPinchZoom:!0}:void 0,K=A=>{var W,U;const Q=I.current+A,oe=k().filter(X=>!X.disabled),_=document.activeElement,F=(W=oe.find(X=>X.ref.current===_))==null?void 0:W.textValue,V=oe.map(X=>X.textValue),$=lx(V,Q,F),Z=(U=oe.find(X=>X.textValue===$))==null?void 0:U.ref.current;(function X(se){I.current=se,window.clearTimeout(D.current),se!==""&&(D.current=window.setTimeout(()=>X(""),1e3))})(Q),Z&&setTimeout(()=>Z.focus())};f.useEffect(()=>()=>window.clearTimeout(D.current),[]),Jr();const G=f.useCallback(A=>{var oe,_;return q.current===((oe=z.current)==null?void 0:oe.side)&&dx(A,(_=z.current)==null?void 0:_.area)},[]);return c.jsx(Rw,{scope:n,searchRef:I,onItemEnter:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),onItemLeave:f.useCallback(A=>{var Q;G(A)||((Q=N.current)==null||Q.focus(),C(null))},[G]),onTriggerLeave:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),pointerGraceTimerRef:R,onPointerGraceIntentChange:f.useCallback(A=>{z.current=A},[]),children:c.jsx(ae,{...B,children:c.jsx(or,{asChild:!0,trapped:o,onMountAutoFocus:j(a,A=>{var Q;A.preventDefault(),(Q=N.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:h,onDismiss:g,children:c.jsx(Mu,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:j(l,A=>{b.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Mo,{role:"menu","aria-orientation":"vertical","data-state":Ju(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:j(m.onKeyDown,A=>{const oe=A.target.closest("[data-radix-menu-content]")===A.currentTarget,_=A.ctrlKey||A.altKey||A.metaKey,F=A.key.length===1;oe&&(A.key==="Tab"&&A.preventDefault(),!_&&F&&K(A.key));const V=N.current;if(A.target!==V||!zw.includes(A.key))return;A.preventDefault();const Z=k().filter(W=>!W.disabled).map(W=>W.ref.current);Eu.includes(A.key)&&Z.reverse(),sx(Z)}),onBlur:j(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(D.current),I.current="")}),onPointerMove:j(e.onPointerMove,Sr(A=>{const Q=A.target,oe=Y.current!==A.clientX;if(A.currentTarget.contains(Q)&&oe){const _=A.clientX>Y.current?"right":"left";q.current=_,Y.current=A.clientX}}))})})})})})})});Fu.displayName=Je;var Zw="MenuGroup",Fs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"group",...r,ref:t})});Fs.displayName=Zw;var Qw="MenuLabel",Wu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{...r,ref:t})});Wu.displayName=Qw;var $o="MenuItem",$u="menu.itemSelect",Bo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=xr($o,e.__scopeMenu),i=Is($o,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),p=()=>{const d=a.current;if(!n&&d){const h=new CustomEvent($u,{bubbles:!0,cancelable:!0});d.addEventListener($u,g=>r==null?void 0:r(g),{once:!0}),Ai(d,h),h.defaultPrevented?u.current=!1:s.onClose()}};return c.jsx(Bu,{...o,ref:l,disabled:n,onClick:j(e.onClick,p),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:j(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:j(e.onKeyDown,d=>{const h=i.searchRef.current!=="";n||h&&d.key===" "||Ps.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Bo.displayName=$o;var Bu=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Is($o,n),i=Pu(n),l=f.useRef(null),u=he(t,l),[p,d]=f.useState(!1),[h,g]=f.useState("");return f.useEffect(()=>{const w=l.current;w&&g((w.textContent??"").trim())},[a.children]),c.jsx(yr.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:c.jsx(Du,{asChild:!0,...i,focusable:!r,children:c.jsx(ne.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:j(e.onPointerMove,Sr(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,Sr(w=>s.onItemLeave(w))),onFocus:j(e.onFocus,()=>d(!0)),onBlur:j(e.onBlur,()=>d(!1))})})})}),Jw="MenuCheckboxItem",zu=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Gu,{scope:e.__scopeMenu,checked:n,children:c.jsx(Bo,{role:"menuitemcheckbox","aria-checked":zo(n)?"mixed":n,...o,ref:t,"data-state":Bs(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(zo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});zu.displayName=Jw;var Lu="MenuRadioGroup",[ex,tx]=un(Lu,{value:void 0,onValueChange:()=>{}}),Hu=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ot(r);return c.jsx(ex,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c.jsx(Fs,{...o,ref:t})})});Hu.displayName=Lu;var Vu="MenuRadioItem",Yu=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=tx(Vu,e.__scopeMenu),a=n===o.value;return c.jsx(Gu,{scope:e.__scopeMenu,checked:a,children:c.jsx(Bo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Bs(a),onSelect:j(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Yu.displayName=Vu;var Ws="MenuItemIndicator",[Gu,nx]=un(Ws,{checked:!1}),ju=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=nx(Ws,n);return c.jsx(Be,{present:r||zo(a.checked)||a.checked===!0,children:c.jsx(ne.span,{...o,ref:t,"data-state":Bs(a.checked)})})});ju.displayName=Ws;var rx="MenuSeparator",Uu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Uu.displayName=rx;var ox="MenuArrow",Ru=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(Do,{...o,...r,ref:t})});Ru.displayName=ox;var $s="MenuSub",[ax,Ku]=un($s),qu=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Kt($s,t),s=wr(t),[i,l]=f.useState(null),[u,p]=f.useState(null),d=ot(o);return f.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),c.jsx(ur,{...s,children:c.jsx(Ou,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:p,children:c.jsx(ax,{scope:t,contentId:xe(),triggerId:xe(),trigger:i,onTriggerChange:l,children:n})})})};qu.displayName=$s;var Cr="MenuSubTrigger",Xu=f.forwardRef((e,t)=>{const n=Kt(Cr,e.__scopeMenu),r=xr(Cr,e.__scopeMenu),o=Ku(Cr,e.__scopeMenu),a=Is(Cr,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},p=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>p,[p]),f.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),l(null)}},[i,l]),c.jsx(Os,{asChild:!0,...u,children:c.jsx(Bu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ju(n.open),...e,ref:mt(t,o.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,Sr(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:j(e.onPointerLeave,Sr(d=>{var g,w;p();const h=(g=n.content)==null?void 0:g.getBoundingClientRect();if(h){const m=(w=n.content)==null?void 0:w.dataset.side,v=m==="right",b=v?-5:5,y=h[v?"left":"right"],x=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+b,y:d.clientY},{x:y,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,d=>{var g;const h=a.searchRef.current!=="";e.disabled||h&&d.key===" "||Lw[r.dir].includes(d.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),d.preventDefault())})})})});Xu.displayName=Cr;var Zu="MenuSubContent",Qu=f.forwardRef((e,t)=>{const n=Iu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Kt(Je,e.__scopeMenu),s=xr(Je,e.__scopeMenu),i=Ku(Zu,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return c.jsx(yr.Provider,{scope:e.__scopeMenu,children:c.jsx(Be,{present:r||a.open,children:c.jsx(yr.Slot,{scope:e.__scopeMenu,children:c.jsx(As,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var d;s.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:j(e.onFocusOutside,p=>{p.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,p=>{s.onClose(),p.preventDefault()}),onKeyDown:j(e.onKeyDown,p=>{var g;const d=p.currentTarget.contains(p.target),h=Hw[s.dir].includes(p.key);d&&h&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});Qu.displayName=Zu;function Ju(e){return e?"open":"closed"}function zo(e){return e==="indeterminate"}function Bs(e){return zo(e)?"indeterminate":e?"checked":"unchecked"}function sx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ix(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function lx(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=ix(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function cx(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,d=l.x,h=l.y;p>r!=h>r&&n<(d-u)*(r-p)/(h-p)+u&&(o=!o)}return o}function dx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return cx(n,t)}function Sr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ux=_u,fx=Os,px=Au,hx=Fu,gx=Fs,mx=Wu,vx=Bo,bx=zu,yx=Hu,wx=Yu,xx=ju,Cx=Uu,Sx=Ru,Nx=qu,kx=Xu,Mx=Qu,Lo="DropdownMenu",[Dx]=Ze(Lo,[Tu]),Ie=Tu(),[Ex,ef]=Dx(Lo),tf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ie(t),u=f.useRef(null),[p,d]=Qe({prop:o,defaultProp:a??!1,onChange:s,caller:Lo});return c.jsx(Ex,{scope:t,triggerId:xe(),triggerRef:u,contentId:xe(),open:p,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(h=>!h),[d]),modal:i,children:c.jsx(ux,{...l,open:p,onOpenChange:d,dir:r,modal:i,children:n})})};tf.displayName=Lo;var nf="DropdownMenuTrigger",rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=ef(nf,n),s=Ie(n);return c.jsx(fx,{asChild:!0,...s,children:c.jsx(ne.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:mt(t,a.triggerRef),onPointerDown:j(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:j(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});rf.displayName=nf;var Tx="DropdownMenuPortal",of=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ie(t);return c.jsx(px,{...r,...n})};of.displayName=Tx;var af="DropdownMenuContent",sf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ef(af,n),a=Ie(n),s=f.useRef(!1);return c.jsx(hx,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:j(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;(!o.modal||p)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sf.displayName=af;var Px="DropdownMenuGroup",lf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(gx,{...o,...r,ref:t})});lf.displayName=Px;var Ox="DropdownMenuLabel",cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(mx,{...o,...r,ref:t})});cf.displayName=Ox;var _x="DropdownMenuItem",df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(vx,{...o,...r,ref:t})});df.displayName=_x;var Ix="DropdownMenuCheckboxItem",uf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(bx,{...o,...r,ref:t})});uf.displayName=Ix;var Ax="DropdownMenuRadioGroup",ff=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(yx,{...o,...r,ref:t})});ff.displayName=Ax;var Fx="DropdownMenuRadioItem",pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(wx,{...o,...r,ref:t})});pf.displayName=Fx;var Wx="DropdownMenuItemIndicator",hf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(xx,{...o,...r,ref:t})});hf.displayName=Wx;var $x="DropdownMenuSeparator",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Cx,{...o,...r,ref:t})});gf.displayName=$x;var Bx="DropdownMenuArrow",zx=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Sx,{...o,...r,ref:t})});zx.displayName=Bx;var Lx=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ie(t),[i,l]=Qe({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return c.jsx(Nx,{...s,open:i,onOpenChange:l,children:n})},Hx="DropdownMenuSubTrigger",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(kx,{...o,...r,ref:t})});mf.displayName=Hx;var Vx="DropdownMenuSubContent",vf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Mx,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vf.displayName=Vx;var Yx=tf,Gx=rf,bf=of,yf=sf,jx=lf,wf=cf,xf=df,Cf=uf,Ux=ff,Sf=pf,Nf=hf,kf=gf,Rx=Lx,Mf=mf,Df=vf;const Ho=Yx,Vo=Gx,Kx=jx,qx=bf,zs=Rx,Ef=Ux,Nr=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(bf,{children:c.jsx(yf,{ref:r,sideOffset:t,className:P("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","origin-(--radix-dropdown-menu-content-transform-origin)","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...n})}));Nr.displayName=yf.displayName;const _t=f.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>c.jsx(xf,{ref:o,className:P("relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",n==="destructive"&&"text-destructive focus:bg-destructive/10 focus:text-destructive [&_svg]:text-destructive",e),...r}));_t.displayName=xf.displayName;const Ls=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>c.jsxs(Cf,{ref:o,className:P("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:n,...r,children:[c.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(Nf,{children:c.jsx(yn,{className:"size-3.5"})})}),t]}));Ls.displayName=Cf.displayName;const Hs=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Sf,{ref:r,className:P("relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none","transition-colors duration-100","focus:bg-accent focus:text-accent-foreground","data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:c.jsx(Nf,{children:c.jsx(Wg,{className:"size-2 fill-current"})})}),t]}));Hs.displayName=Sf.displayName;const kr=f.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(wf,{ref:r,className:P("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));kr.displayName=wf.displayName;const Bn=f.forwardRef(({className:e,...t},n)=>c.jsx(kf,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Bn.displayName=kf.displayName;const Yo=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>c.jsxs(Mf,{ref:o,className:P("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none","transition-colors duration-100","focus:bg-accent data-[state=open]:bg-accent","[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground",t&&"pl-8",e),...r,children:[n,c.jsx(wn,{className:"ml-auto"})]}));Yo.displayName=Mf.displayName;const Go=f.forwardRef(({className:e,...t},n)=>c.jsx(Df,{ref:n,className:P("z-50 min-w-32 rounded-lg p-1","ring-1 ring-border/60 bg-background shadow-md","data-[state=open]:animate-dropdown-in","data-[state=closed]:animate-dropdown-out",e),...t}));Go.displayName=Df.displayName;const Tf=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(Ho,{...s,children:[c.jsx(Vo,{asChild:!0,children:e}),c.jsx(Nr,{side:n,align:r,sideOffset:o,className:a,children:t.map((i,l)=>i.type==="separator"?c.jsx(Bn,{},l):i.type==="label"?c.jsx(kr,{children:i.label},l):c.jsxs(_t,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},l))})]});Tf.displayName="DropdownMenu";const Pf=f.createContext(null);function Of(){return f.useContext(Pf)}const _f="application/x-bookers-grouping-column-id",Mr="application/x-bookers-grouping-chip",It="bookers-expand";function If(e){return"columns"in e&&e.columns&&e.columns.length>0?e.columns.some(If):e.footer!==void 0}function Xx(){if(typeof document>"u")return{minPx:128,maxPx:1280};const e=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return{minPx:8*e,maxPx:Math.min(window.innerHeight*.9,80*e)}}function Af(e,t){if(typeof e=="number")return e;const n=e.trim();if(n.includes("min(")||typeof document>"u")return t;const r=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return n.endsWith("rem")?parseFloat(n)*r:n.endsWith("vh")?parseFloat(n)/100*window.innerHeight:n.endsWith("px")?parseFloat(n):t}function jo(e,t,n){return Math.min(Math.max(e,t),n)}function Zx({scrollRegionRef:e,minPx:t,maxPx:n,onHeightChange:r}){const o=f.useRef(null),a=l=>{var p;l.preventDefault(),l.stopPropagation();const u=((p=e.current)==null?void 0:p.offsetHeight)??t;o.current={pointerId:l.pointerId,startY:l.clientY,startHeight:u},l.currentTarget.setPointerCapture(l.pointerId)},s=l=>{const u=o.current;if(!u||l.pointerId!==u.pointerId)return;const p=l.clientY-u.startY,d=jo(u.startHeight+p,t,n);r(d)},i=l=>{const u=o.current;if(!(!u||l.pointerId!==u.pointerId)){o.current=null;try{l.currentTarget.releasePointerCapture(l.pointerId)}catch{}}};return c.jsx("div",{className:P("relative flex min-h-10 w-full shrink-0 cursor-ns-resize items-center justify-center","text-muted-foreground/45 transition-[color] duration-150 ease-out","hover:text-muted-foreground/75","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),role:"separator","aria-orientation":"horizontal","aria-label":"Drag to resize table height",tabIndex:0,onPointerDown:a,onPointerMove:s,onPointerUp:i,onPointerCancel:i,onKeyDown:l=>{var h;if(l.key!=="ArrowUp"&&l.key!=="ArrowDown")return;l.preventDefault();const u=16,p=((h=e.current)==null?void 0:h.offsetHeight)??t,d=l.key==="ArrowUp"?-u:u;r(jo(p+d,t,n))},children:c.jsxs("div",{className:"flex items-center justify-center gap-1.5","aria-hidden":!0,children:[c.jsx("span",{className:"h-px w-6 bg-border/50"}),c.jsx(Vg,{className:"size-3 shrink-0",strokeWidth:1.5,"aria-hidden":!0}),c.jsx("span",{className:"h-px w-6 bg-border/50"})]})})}function Qx({column:e,id:t,showClear:n}){const r=e.getFilterValue();return c.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[c.jsx(gr,{size:"sm",type:"text",value:String(r??""),onChange:o=>{const a=o.target.value;e.setFilterValue(a===""?void 0:a)},placeholder:"Filter…","aria-label":`Filter ${t}`,autoComplete:"off",className:"h-8 min-w-0 flex-1"}),n&&e.getIsFiltered()?c.jsx(Sn,{type:"button",variant:"ghost",size:"sm",className:"size-8 min-w-8 shrink-0 px-0","aria-label":`Clear filter for ${t}`,onClick:()=>e.setFilterValue(void 0),children:c.jsx(tn,{className:"size-3.5","aria-hidden":!0})}):null]})}function Jx({column:e,id:t,showClear:n}){var d;const r=e.getFilterValue(),o=Ry(r),a=o.op,s=o.value,i=a!=="empty"&&a!=="notEmpty",l=h=>{e.setFilterValue(Ky(h))},u=((d=ts.find(h=>h.value===a))==null?void 0:d.label)??a,p=e.getIsFiltered();return c.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[c.jsxs(ls,{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"min-w-0 flex-1",children:i?c.jsx(gr,{size:"sm",type:"text",value:s,onChange:h=>l({op:a,value:h.target.value}),placeholder:"Filter…","aria-label":`Filter ${t}`,autoComplete:"off",className:"w-full min-w-0"}):c.jsx("div",{className:"flex h-8 w-full min-w-0 items-center border-0 bg-background px-3 text-xs text-muted-foreground select-none",children:u})}),c.jsx(cs,{className:"p-0",children:c.jsxs(Ho,{children:[c.jsx(Vo,{asChild:!0,children:c.jsx(Sn,{type:"button",variant:"ghost",size:"sm",className:P("h-8 min-w-8 shrink-0 rounded-none px-2 text-muted-foreground transition-colors",p&&"text-primary"),"aria-label":`${t} filter operator: ${u}`,children:c.jsxs("span",{className:"relative inline-flex size-4 items-center justify-center",children:[c.jsx(jg,{className:"size-4","aria-hidden":!0}),p?c.jsx("span",{className:"absolute -right-0.5 -top-0.5 size-1.5 rounded-full bg-primary ring-2 ring-background","aria-hidden":!0}):null]})})}),c.jsx(Nr,{align:"end",className:"min-w-44",children:c.jsx(Ef,{value:a,onValueChange:h=>{es(h)&&l({op:h,value:h==="empty"||h==="notEmpty"?"":s})},children:ts.map(h=>c.jsx(Hs,{value:h.value,children:h.label},h.value))})})]})})]}),n&&p?c.jsx(Sn,{type:"button",variant:"ghost",size:"sm",className:"size-8 min-w-8 shrink-0 px-0","aria-label":`Clear filter for ${t}`,onClick:()=>e.setFilterValue(void 0),children:c.jsx(tn,{className:"size-3.5","aria-hidden":!0})}):null]})}function e0({column:e,enableAdvancedColumnFilters:t,showColumnFilterClear:n}){const r=e.id,o=e.columnDef.filterFn;return t&&(o===void 0||o===ns)?c.jsx(Jx,{column:e,id:r,showClear:n}):c.jsx(Qx,{column:e,id:r,showClear:n})}function ct(e,t,n,r){const o=e!==void 0&&t!==void 0;return[o?e:n,o?t:r]}function Ff(e){return e.subRows.length===0?e.getIsGrouped()?0:1:e.subRows.reduce((t,n)=>t+Ff(n),0)}function t0({table:e,manualPagination:t,pageSizeOptions:n,paginationSiblingCount:r}){const{pageIndex:o,pageSize:a}=e.getState().pagination,s=t?e.getRowCount():e.getPrePaginationRowModel().rows.length,i=s===0?0:o*a+1,l=Math.min((o+1)*a,s),u=e.getPageCount(),p=f.useMemo(()=>{const d=[...new Set(n)].sort((h,g)=>h-g);return d.includes(a)||(d.push(a),d.sort((h,g)=>h-g)),d},[n,a]);return c.jsxs("div",{className:"mt-3 flex flex-col gap-3 border-border border-t pt-3 sm:flex-row sm:items-center sm:justify-between",children:[c.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:s===0?"No rows.":c.jsxs(c.Fragment,{children:["Showing"," ",c.jsx("span",{className:"text-foreground",children:i}),"–",c.jsx("span",{className:"text-foreground",children:l})," of ",c.jsx("span",{className:"text-foreground",children:s})]})}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm text-muted-foreground",children:"Rows per page"}),c.jsxs(Ss,{value:String(a),onValueChange:d=>{e.setPageSize(Number(d))},children:[c.jsx(Ao,{size:"sm",className:"w-18","aria-label":"Rows per page",children:c.jsx(Ns,{})}),c.jsx(Fo,{children:p.map(d=>c.jsx(Ds,{value:String(d),children:d},d))})]})]}),c.jsx(ms,{page:o+1,totalPages:Math.max(1,u),onPageChange:d=>e.setPageIndex(d-1),siblingCount:r})]})]})}function n0({data:e,columns:t,getRowId:n,enableSorting:r=!1,defaultSorting:o,sorting:a,onSortingChange:s,enableRowSelection:i=!1,defaultRowSelection:l,rowSelection:u,onRowSelectionChange:p,enableColumnResizing:d=!1,columnResizeMode:h="onChange",defaultColumnSizing:g,columnSizing:w,onColumnSizingChange:m,enableColumnReorder:v=!1,defaultColumnOrder:b,columnOrder:y,onColumnOrderChange:x,enableColumnPinning:k=!1,defaultColumnPinning:E,columnPinning:C,onColumnPinningChange:N,enableGlobalFilter:M=!1,showGlobalFilter:D=!0,globalFilterPlaceholder:I="Search…",defaultGlobalFilter:R="",globalFilter:z,onGlobalFilterChange:q,enableColumnFilters:Y=!1,showFilterRow:ae=!0,enableAdvancedColumnFilters:B=!0,showColumnFilterClear:K=!0,defaultColumnFilters:G,columnFilters:A,onColumnFiltersChange:Q,enableExpanding:oe=!1,defaultExpanded:_,expanded:F,onExpandedChange:V,getRowCanExpand:$,renderExpandedRow:Z,showExpandColumn:W=!1,expandedRowClassName:U,enableGrouping:X=!1,defaultGrouping:se,grouping:de,onGroupingChange:ce,showGroupingDropZone:Me=!0,groupingDropZoneLabel:Ee="Drag column headers here to set row groups.",groupingDropZoneHint:tt="Drag to add another group level.",isLoading:Ue=!1,loadingRows:Fe=5,emptyState:Xt,enableColumnVisibility:De=!1,defaultColumnVisibility:$r,columnVisibility:Br,onColumnVisibilityChange:Oe,enableVirtualization:ft=!1,virtualScrollContainerHeight:We="min(35rem, 70vh)",virtualRowEstimateSize:hn=48,virtualOverscan:Zt=8,enableFooter:Un=!1,enableScrollContainerResize:kt=!1,scrollContainerResizeMaxHeight:Qt="min(90vh, 80rem)",scrollContainerResizeMinHeight:Le="8rem",enablePagination:Rn=!1,manualPagination:pt=!1,rowCount:Kn,pageCount:qn,defaultPagination:ht,pagination:Xn,onPaginationChange:Zn,pageSizeOptions:gn=[10,20,50,100],paginationSiblingCount:Re=1,className:ie,...pe},re){const[ue,J]=f.useState(o??[]),[te,Ne]=ct(a,s,ue,J),[_e,Jt]=f.useState(l??{}),[we,Te]=ct(u,p,_e,Jt),[Qn,Ke]=f.useState(g??{}),[qe,Qo]=ct(w,m,Qn,Ke),[Wt,Fh]=f.useState(b??[]),[XS,ZS]=ct(y,x,Wt,Fh),[QS,JS]=f.useState(E??{left:[],right:[]}),[eN,tN]=ct(C,N,QS,JS),[nN,rN]=f.useState(R??""),[Jo,Si]=ct(z,q,nN,rN),[oN,aN]=f.useState(G??[]),[sN,iN]=ct(A,Q,oN,aN),[lN,cN]=f.useState(_??{}),[dN,Wh]=ct(F,V,lN,cN),[uN,fN]=f.useState(se??[]),[Ni,zr]=ct(de,ce,uN,fN),[pN,hN]=f.useState($r??{}),[gN,mN]=ct(Br,Oe,pN,hN),ki=!!(Rn&&!X),[vN,bN]=f.useState(()=>({pageIndex:(ht==null?void 0:ht.pageIndex)??0,pageSize:(ht==null?void 0:ht.pageSize)??10})),[yN,wN]=ct(Xn,Zn,vN,bN),xN=M||Y,mn=!!(oe&&Z&&!X),Mi=f.useMemo(()=>!mn||!W||t.some(L=>L.id===It)?t:[{id:It,header:()=>null,size:48,minSize:40,maxSize:56,enableSorting:!1,enableColumnFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,meta:{bookersExpandColumn:!0},cell:({row:L})=>c.jsx("button",{type:"button",className:P("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-sm","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]",!L.getCanExpand()&&"cursor-not-allowed opacity-40"),onClick:L.getToggleExpandedHandler(),"aria-expanded":L.getIsExpanded(),"aria-label":L.getIsExpanded()?"Collapse row details":"Expand row details",disabled:!L.getCanExpand(),children:c.jsx(wn,{className:P("size-4 transition-transform duration-150 ease-out",L.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})})},...t],[t,mn,W]),CN=f.useMemo(()=>Un&&Mi.some(If),[Un,Mi]),$h=f.useMemo(()=>{const O={};return d&&(O.minSize=72,O.size=160,O.maxSize=640),Y&&(O.filterFn=B?ns:"includesString"),Object.keys(O).length>0?O:void 0},[d,Y,B]),ea=f.useRef(null),Jn=f.useRef(0),[SN,ta]=f.useState(!1),gt=He.useReactTable({data:e,columns:Mi,getCoreRowModel:He.getCoreRowModel(),enableSorting:r,...xN?{getFilteredRowModel:He.getFilteredRowModel(),...M?{enableGlobalFilter:!0,globalFilterFn:"includesString",onGlobalFilterChange:Si}:{},...Y?{onColumnFiltersChange:iN}:{}}:{},...r?{getSortedRowModel:He.getSortedRowModel(),onSortingChange:Ne}:{},...ki?{getPaginationRowModel:He.getPaginationRowModel(),onPaginationChange:wN,...pt?{manualPagination:!0,...Kn!==void 0?{rowCount:Kn}:{},...qn!==void 0?{pageCount:qn}:{}}:{}}:{},...i?{onRowSelectionChange:Te,enableRowSelection:!0}:{},...d?{enableColumnResizing:!0,columnResizeMode:h,onColumnSizingChange:Qo}:{},...$h?{defaultColumn:$h}:{},...v?{onColumnOrderChange:ZS}:{},enableColumnPinning:k,onColumnPinningChange:tN,...De?{enableHiding:!0,onColumnVisibilityChange:mN}:{enableHiding:!1},...mn?{enableExpanding:!0,manualExpanding:!0,getRowCanExpand:$??(()=>!0),onExpandedChange:Wh}:{},...X?{enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:He.getGroupedRowModel(),getExpandedRowModel:He.getExpandedRowModel(),onGroupingChange:zr,onExpandedChange:Wh}:{},state:{...r?{sorting:te}:{},...i?{rowSelection:we}:{},...d?{columnSizing:qe}:{},...v?{columnOrder:XS}:{},columnPinning:eN,...M?{globalFilter:Jo}:{},...Y?{columnFilters:sN}:{},...X?{grouping:Ni}:{},...X||mn?{expanded:dN}:{},...De?{columnVisibility:gN}:{},...ki?{pagination:yN}:{}},...n?{getRowId:(O,L)=>String(n(O,L))}:{}}),Lr=gt.getVisibleLeafColumns().length,Hr=gt.getRowModel().rows,Bh=f.useRef(null),er=ft&&!X&&!mn&&Hr.length>0&&!Ue,Di=f.useRef(null),NN=f.useCallback(O=>{Di.current=O,Bh.current=er?O:null},[er]),vn=f.useMemo(()=>{const O=Xx(),L=Af(Le,O.minPx),H=Af(Qt,O.maxPx);return{minPx:Math.min(L,H),maxPx:Math.max(L,H)}},[Le,Qt]),[na,zh]=f.useState(()=>kt&&typeof We=="number"?We:null);f.useLayoutEffect(()=>{if(!kt||na!==null)return;const O=Di.current;O&&zh(jo(O.offsetHeight,vn.minPx,vn.maxPx))},[kt,na,We,vn]);const Lh=Uh.useVirtualizer({count:Hr.length,getScrollElement:()=>Bh.current,estimateSize:()=>hn,overscan:Zt,enabled:er}),kN=O=>{var nt;const L=O.column.getCanSort(),H=O.column.getIsSorted(),fe=!!((nt=O.column.columnDef.meta)!=null&&nt.bookersColumnHeaderActions);if(O.isPlaceholder)return null;if(!L||fe)return He.flexRender(O.column.columnDef.header,O.getContext());const ke=O.column.getToggleSortingHandler();return c.jsxs("button",{type:"button",className:P("flex min-h-10 min-w-0 w-full cursor-pointer items-center gap-1.5 rounded-sm text-left select-none outline-none","transition-[color,scale] duration-150 ease-out hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:ke,children:[He.flexRender(O.column.columnDef.header,O.getContext()),H==="asc"?c.jsx(Zr,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,H==="desc"?c.jsx(Mt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]})},MN=(O,L)=>{!L||L===O||L===It||O===It||gt.setColumnOrder(H=>{const fe=H.length>0?H:gt.getAllLeafColumns().map(bn=>bn.id),ke=fe.indexOf(L),nt=fe.indexOf(O);if(ke===-1||nt===-1)return fe;const Xe=[...fe];if(Xe.splice(ke,1),Xe.splice(nt,0,L),W&&mn&&Xe.includes(It)){const bn=Xe.filter(Yr=>Yr!==It);return[It,...bn]}return Xe})},Ei=gt.getHeaderGroups(),Hh=Ei[0],Vh=2.5,DN=`${Ei.length*Vh}rem`,Ti=O=>{const L=gt.getColumn(O);if(!L)return O;const H=L.columnDef.header;return typeof H=="string"?H:O},EN=(O,L)=>{O!==L&&zr(H=>{const fe=[...H],ke=fe.filter(Xe=>Xe!==O),nt=ke.indexOf(L);return nt===-1?fe:(ke.splice(nt,0,O),ke)})},TN=O=>{zr(L=>{const fe=[...L].filter(ke=>ke!==O);return fe.push(O),fe})},PN=O=>{var H;if(O.getIsPlaceholder())return null;if(O.getIsAggregated())return He.flexRender(O.column.columnDef.aggregatedCell??O.column.columnDef.cell,O.getContext());const L=!!((H=O.column.columnDef.meta)!=null&&H.bookersSkipGroupRowExpand);if(X&&O.getIsGrouped()&&!L){const fe=O.row,ke=Ff(fe);return c.jsxs("span",{className:"flex min-h-10 min-w-0 items-center gap-1.5",children:[c.jsx("button",{type:"button",className:P("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-sm","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:fe.getToggleExpandedHandler(),"aria-expanded":fe.getIsExpanded(),"aria-label":`Toggle group ${fe.id}`,children:c.jsx(wn,{className:P("size-4 transition-transform duration-150 ease-out",fe.getIsExpanded()&&"rotate-90"),"aria-hidden":!0})}),c.jsx("span",{className:"min-w-0 flex-1",children:He.flexRender(O.column.columnDef.cell,O.getContext())}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["(",ke,")"]})]})}return He.flexRender(O.column.columnDef.cell,O.getContext())},Yh=O=>c.jsxs(f.Fragment,{children:[c.jsx(Ot,{"data-selected":O.getIsSelected()?"true":void 0,children:O.getVisibleCells().map((L,H)=>{const fe=L.column.getIsPinned();return c.jsx(ln,{className:P(fe==="left"&&P("relative sticky z-30 bg-background",!L.column.getIsLastColumn("left")&&"border-r border-border",L.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),fe==="right"&&P("relative sticky z-30 bg-background",!L.column.getIsFirstColumn("right")&&"border-l border-border",L.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{...H===0&&O.depth>0?{paddingLeft:`${O.depth*.75+.75}rem`}:{},...d||fe?{width:L.column.getSize(),minWidth:L.column.getSize(),maxWidth:L.column.getSize()}:{},...fe==="left"?{left:L.column.getStart("left")}:{},...fe==="right"?{right:L.column.getAfter("right")}:{}},children:PN(L)},L.id)})}),mn&&O.getIsExpanded()&&Z?c.jsx(Ot,{"data-expanded-detail":O.id,children:c.jsx(ln,{colSpan:Lr,className:P("border-t border-border bg-muted/30 p-4 align-top",U),children:Z(O)})}):null]},O.id),Vr=er?Lh.getVirtualItems():[],Pi=er&&Vr.length>0,Gh=Pi?Vr[0].start:0,jh=Pi?Lh.getTotalSize()-Vr[Vr.length-1].end:0,ON=kt?na!==null?{height:na}:{maxHeight:typeof We=="number"?`${We}px`:We,minHeight:typeof Le=="number"?`${Le}px`:Le}:{maxHeight:typeof We=="number"?`${We}px`:We};return c.jsx(Pf.Provider,{value:gt,children:c.jsxs("div",{ref:re,className:P("w-full min-w-0",ie),...pe,children:[M&&D?c.jsx("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:c.jsxs("div",{className:"relative min-w-0 max-w-sm flex-1 self-start",children:[c.jsx(gr,{size:"sm",type:"text",placeholder:I,value:Jo,onChange:O=>{Si(O.target.value)},"aria-label":I,autoComplete:"off",className:P("min-w-0 w-full",Jo.trim()!==""&&"pr-12")}),Jo.trim()!==""?c.jsx(Sn,{type:"button",variant:"ghost",className:P("absolute right-1 top-1/2 z-10 flex size-10 -translate-y-1/2 items-center justify-center rounded-md px-0","bg-background text-muted-foreground","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),"aria-label":"Clear global search",onClick:()=>Si(""),children:c.jsx(tn,{className:"size-3.5","aria-hidden":!0})}):null]})}):null,X&&Me?c.jsxs("div",{role:"region","aria-label":"Row groups",className:P("mb-3 flex min-h-11 flex-wrap items-stretch gap-2 rounded-md border border-dashed px-2 py-1.5 transition-[border-color,box-shadow] duration-150 sm:items-center",SN?"border-primary/50 bg-primary/5 ring-1 ring-inset ring-primary/40":"border-border bg-muted/30"),onDragOver:O=>{O.preventDefault();const L=Array.from(O.dataTransfer.types);O.dataTransfer.dropEffect=L.includes(Mr)?"move":"copy"},onDragEnter:O=>{O.preventDefault(),Jn.current+=1,ta(!0)},onDragLeave:()=>{Jn.current-=1,Jn.current<=0&&(Jn.current=0,ta(!1))},onDrop:O=>{O.preventDefault(),Jn.current=0,ta(!1);const L=O.dataTransfer.getData(Mr);if(L){TN(L);return}const H=O.dataTransfer.getData(_f);if(!H)return;const fe=gt.getColumn(H);fe!=null&&fe.getCanGroup()&&zr(ke=>{const Xe=[...ke].filter(bn=>bn!==H);return Xe.push(H),Xe})},children:[c.jsx("span",{className:"inline-flex size-10 shrink-0 items-center justify-center self-center rounded-sm text-muted-foreground",children:c.jsx(Ug,{className:"size-4","aria-hidden":!0})}),c.jsx("div",{className:"flex min-h-8 min-w-0 flex-1 flex-wrap items-center gap-1",children:Ni.length===0?c.jsx("span",{className:"text-sm text-muted-foreground select-none",children:Ee}):c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[Ni.map((O,L)=>c.jsxs(f.Fragment,{children:[L>0?c.jsx(wn,{className:"size-3.5 shrink-0 text-muted-foreground/80","aria-hidden":!0}):null,c.jsxs("div",{className:P("inline-flex w-full max-w-72 items-center rounded-md border border-border bg-background text-sm shadow-sm","transition-[border-color,box-shadow] duration-150"),onDragOver:H=>{H.preventDefault(),H.stopPropagation(),Array.from(H.dataTransfer.types).includes(Mr)&&(H.dataTransfer.dropEffect="move")},onDrop:H=>{H.preventDefault(),H.stopPropagation(),Jn.current=0,ta(!1);const fe=H.dataTransfer.getData(Mr);fe&&EN(fe,O)},children:[c.jsx("span",{draggable:!0,"aria-label":`Reorder group: ${Ti(O)}`,className:P("inline-flex size-10 shrink-0 cursor-grab items-center justify-center rounded-l-md border-r border-border text-muted-foreground","touch-none transition-[color,background-color] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","active:cursor-grabbing"),onDragStart:H=>{H.dataTransfer.setData(Mr,O),H.dataTransfer.effectAllowed="move"},children:c.jsx(Gg,{className:"size-4","aria-hidden":!0})}),c.jsx("span",{className:"min-w-0 truncate px-1.5 font-medium text-foreground",children:Ti(O)}),c.jsx("button",{type:"button","aria-label":`Remove ${Ti(O)} from row groups`,className:P("inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-r-md","text-muted-foreground transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:()=>{zr(H=>[...H].filter(fe=>fe!==O))},children:c.jsx(tn,{className:"size-3.5","aria-hidden":!0})})]})]},O)),c.jsx("span",{className:"text-xs text-muted-foreground select-none",children:tt})]})})]}):null,c.jsxs("div",{className:"w-full",children:[c.jsx("div",{ref:NN,className:P("w-full min-h-0 overflow-auto [scrollbar-gutter:stable]",er&&"[overflow-anchor:none]"),style:ON,children:c.jsxs(rs,{className:P(d&&"table-fixed"),style:d?{width:gt.getTotalSize(),minWidth:"100%"}:void 0,children:[c.jsxs(os,{children:[Ei.map((O,L)=>c.jsx(Ot,{children:O.headers.map(H=>{const fe=`${L*Vh}rem`,ke=H.column.getIsPinned(),nt=d&&H.column.getCanResize()&&!H.isPlaceholder,Xe=H.column.id===It,bn=v&&!H.isPlaceholder&&!Xe&&(!H.subHeaders||H.subHeaders.length===0),Yr=X&&!H.isPlaceholder&&!Xe&&H.column.getCanGroup()&&(!H.subHeaders||H.subHeaders.length===0);return c.jsxs(To,{colSpan:H.colSpan,className:P("relative sticky z-30 bg-background",ke==="left"&&P("z-50 bg-background",!H.column.getIsLastColumn("left")&&"border-r border-border",H.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),ke==="right"&&P("z-50 bg-background",!H.column.getIsFirstColumn("right")&&"border-l border-border",H.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:fe,...(d||ke)&&!H.isPlaceholder?{width:H.getSize(),minWidth:H.getSize(),maxWidth:H.getSize()}:{},...ke==="left"?{left:H.column.getStart("left")}:{},...ke==="right"?{right:H.column.getAfter("right")}:{}},onDragOver:v?$e=>{$e.preventDefault(),$e.dataTransfer.dropEffect="move"}:void 0,onDrop:v?$e=>{$e.preventDefault();const _N=$e.dataTransfer.getData("application/x-bookers-column-id")||ea.current;MN(H.column.id,_N),ea.current=null}:void 0,children:[c.jsxs("span",{className:P("flex min-h-10 min-w-0 items-center gap-1",nt?"pr-1":"pr-2"),children:[bn?c.jsx("span",{draggable:!0,"aria-label":`Reorder column ${H.column.id}`,className:P("inline-flex size-10 shrink-0 cursor-grab items-center justify-center rounded-sm","text-muted-foreground","touch-none transition-[color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","active:cursor-grabbing active:scale-[0.96]"),onClick:$e=>$e.stopPropagation(),onDragStart:$e=>{ea.current=H.column.id,$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("application/x-bookers-column-id",H.column.id)},onDragEnd:()=>{ea.current=null},children:c.jsx(Yg,{className:"size-4","aria-hidden":"true"})}):null,c.jsx("span",{className:P("min-w-0 flex-1",Yr&&"cursor-grab active:cursor-grabbing"),draggable:Yr,onDragStart:Yr?$e=>{$e.dataTransfer.setData(_f,H.column.id),$e.dataTransfer.effectAllowed="copy"}:void 0,children:kN(H)})]}),nt?c.jsx("div",{"data-column-resize-handle":H.column.id,onClick:$e=>$e.stopPropagation(),onMouseDown:H.getResizeHandler(),onTouchStart:H.getResizeHandler(),className:P("absolute end-0 top-0 z-20 flex h-full w-2 cursor-col-resize select-none","touch-none items-center justify-end","transition-[opacity] duration-150 ease-out",H.column.getIsResizing()?"opacity-100":"opacity-75 hover:opacity-100"),"aria-hidden":!0,children:c.jsx("span",{className:"h-1/2 w-[3px] rounded-full bg-border"})}):null]},H.id)})},O.id)),Y&&ae&&Hh?c.jsx(Ot,{children:Hh.headers.map(O=>{const L=O.column.getIsPinned();return c.jsx(To,{colSpan:O.colSpan,className:P("relative sticky z-30 bg-background py-2",L==="left"&&P("z-50 bg-background",!O.column.getIsLastColumn("left")&&"border-r border-border",O.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),L==="right"&&P("z-50 bg-background",!O.column.getIsFirstColumn("right")&&"border-l border-border",O.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:DN,...(d||L)&&!O.isPlaceholder?{width:O.getSize(),minWidth:O.getSize(),maxWidth:O.getSize()}:{},...L==="left"?{left:O.column.getStart("left")}:{},...L==="right"?{right:O.column.getAfter("right")}:{}},children:!O.isPlaceholder&&O.column.getCanFilter()?c.jsx(e0,{column:O.column,enableAdvancedColumnFilters:B,showColumnFilterClear:K}):null},`filter-${O.id}`)})}):null]}),c.jsx(as,{children:Ue?Array.from({length:Fe}).map((O,L)=>c.jsx(Ot,{children:c.jsx(ln,{colSpan:Lr,children:c.jsx(is,{className:"h-4 w-full"})})},L)):Hr.length===0?c.jsx(Ot,{children:c.jsx(ln,{colSpan:Lr,className:"h-24 text-center text-sm text-muted-foreground",children:Xt??"No results."})}):Pi?c.jsxs(c.Fragment,{children:[Gh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Lr,className:"h-0 border-0 p-0",style:{height:Gh}})}):null,Vr.map(O=>{const L=Hr[O.index];return Yh(L)}),jh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Lr,className:"h-0 border-0 p-0",style:{height:jh}})}):null]}):Hr.map(O=>Yh(O))}),CN?c.jsx(ss,{className:"sticky bottom-0 z-20",children:gt.getFooterGroups().map(O=>c.jsx(Ot,{children:O.headers.map(L=>{const H=L.column.getIsPinned();return c.jsx(ln,{colSpan:L.colSpan,className:P("border-border text-sm font-medium text-foreground",H==="left"&&P("relative sticky z-30 bg-muted/50",!L.column.getIsLastColumn("left")&&"border-r border-border",L.column.getIsLastColumn("left")&&"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-px after:bg-border"),H==="right"&&P("relative sticky z-30 bg-muted/50",!L.column.getIsFirstColumn("right")&&"border-l border-border",L.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{...(d||H)&&!L.isPlaceholder?{width:L.getSize(),minWidth:L.getSize(),maxWidth:L.getSize()}:{},...H==="left"?{left:L.column.getStart("left")}:{},...H==="right"?{right:L.column.getAfter("right")}:{}},children:L.isPlaceholder?null:He.flexRender(L.column.columnDef.footer,L.getContext())},L.id)})},O.id))}):null]})}),ki?c.jsx(t0,{table:gt,manualPagination:pt,pageSizeOptions:gn,paginationSiblingCount:Re}):null,kt?c.jsx(Zx,{scrollRegionRef:Di,minPx:vn.minPx,maxPx:vn.maxPx,onHeightChange:O=>zh(jo(O,vn.minPx,vn.maxPx))}):null]})]})})}const Wf=f.forwardRef(n0);Wf.displayName="DataTable";const r0={bookersColumnHeaderActions:!0};function o0(e){const t=e.columnDef.header;return typeof t=="string"?t:e.id}function a0({column:e,title:t,children:n,className:r,...o},a){const s=n??t,i=e.getCanSort(),l=e.getCanPin(),u=e.getIsSorted(),p=e.getIsPinned(),d=Of(),h=!!(d!=null&&d.options.enableHiding&&d.getAllLeafColumns().some(g=>g.getCanHide()));return c.jsxs("div",{ref:a,className:P("flex min-w-0 items-center gap-0.5",r),...o,children:[i?c.jsxs("button",{type:"button",className:P("flex min-h-10 min-w-0 flex-1 cursor-pointer items-center gap-1.5 rounded-sm px-0 text-left","text-xs font-medium uppercase tracking-wide text-muted-foreground","transition-[color,scale] duration-150 ease-out","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","active:scale-[0.96]"),onClick:e.getToggleSortingHandler(),children:[c.jsx("span",{className:"min-w-0 truncate",children:s}),u==="asc"?c.jsx(Zr,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,u==="desc"?c.jsx(Mt,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null]}):c.jsx("span",{className:"flex min-h-10 min-w-0 flex-1 items-center px-0 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:c.jsx("span",{className:"min-w-0 truncate",children:s})}),(i||l||h)&&c.jsxs(Ho,{children:[c.jsx(Vo,{asChild:!0,children:c.jsx("button",{type:"button",className:P("inline-flex size-8 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-sm border-0","text-muted-foreground transition-[color,background-color,scale] duration-150 ease-out","hover:bg-muted/60 hover:text-foreground","outline-none focus:outline-none focus-visible:outline-none","focus:ring-0 focus-visible:ring-0 focus:shadow-none focus-visible:shadow-none","active:scale-[0.96]"),"aria-label":`Column actions (${e.id})`,onClick:g=>g.stopPropagation(),children:c.jsx(zg,{className:"size-3.5","aria-hidden":"true"})})}),c.jsxs(Nr,{align:"end",className:"min-w-44",children:[i?c.jsxs(c.Fragment,{children:[c.jsx(kr,{children:"Sort"}),c.jsxs(_t,{onSelect:()=>{e.toggleSorting(!1)},children:[c.jsx(Ag,{className:"size-4","aria-hidden":"true"}),"Ascending"]}),c.jsxs(_t,{onSelect:()=>{e.toggleSorting(!0)},children:[c.jsx(Ig,{className:"size-4","aria-hidden":"true"}),"Descending"]}),c.jsx(_t,{disabled:u===!1,onSelect:()=>{e.clearSorting()},children:"Clear sort"})]}):null,i&&l?c.jsx(Bn,{}):null,l?c.jsxs(zs,{children:[c.jsxs(Yo,{children:[c.jsx(qg,{className:"size-4","aria-hidden":"true"}),"Pin column"]}),c.jsxs(Go,{children:[c.jsx(_t,{onSelect:e.pin.bind(e,"left"),children:"Pin left"}),c.jsx(_t,{onSelect:e.pin.bind(e,"right"),children:"Pin right"}),c.jsxs(_t,{disabled:p===!1,onSelect:e.pin.bind(e,!1),children:[c.jsx(Kg,{className:"size-4","aria-hidden":"true"}),"Unpin"]})]})]}):null,h&&d&&(i||l)?c.jsx(Bn,{}):null,h&&d?c.jsxs(zs,{children:[c.jsxs(Yo,{children:[c.jsx(Bg,{className:"size-4","aria-hidden":"true"}),"Columns"]}),c.jsxs(Go,{className:"min-w-48",children:[c.jsx(kr,{className:"text-xs font-normal text-muted-foreground",children:"Show columns"}),c.jsx(Bn,{}),d.getAllLeafColumns().filter(g=>g.getCanHide()).map(g=>c.jsx(Ls,{checked:g.getIsVisible(),onCheckedChange:g.toggleVisibility.bind(g),children:o0(g)},g.id))]})]}):null]})]})]})}const $f=f.forwardRef(a0);$f.displayName="DataTableColumnHeader";const Bf=6048e5,s0=864e5,zf=Symbol.for("constructDateFrom");function Se(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&zf in e?e[zf](t):e instanceof Date?new e.constructor(t):new Date(t)}function me(e,t){return Se(t||e,e)}function Lf(e,t,n){const r=me(e,n==null?void 0:n.in);return isNaN(t)?Se(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Hf(e,t,n){const r=me(e,n==null?void 0:n.in);if(isNaN(t))return Se(e,NaN);if(!t)return r;const o=r.getDate(),a=Se(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let i0={};function Dr(){return i0}function zn(e,t){var i,l,u,p;const n=Dr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)??0,o=me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Er(e,t){return zn(e,{...t,weekStartsOn:1})}function Vf(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Se(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Er(o),s=Se(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Er(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Yf(e){const t=me(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 Ln(e,...t){const n=Se.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Tr(e,t){const n=me(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Vs(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t),a=Tr(r),s=Tr(o),i=+a-Yf(a),l=+s-Yf(s);return Math.round((i-l)/s0)}function l0(e,t){const n=Vf(e,t),r=Se(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Er(r)}function c0(e,t,n){return Lf(e,t*7,n)}function d0(e,t,n){return Hf(e,t*12,n)}function u0(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Se.bind(null,o));const a=me(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function f0(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Se.bind(null,o));const a=me(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function p0(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return+Tr(r)==+Tr(o)}function Gf(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function h0(e){return!(!Gf(e)&&typeof e!="number"||isNaN(+me(e)))}function jf(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function g0(e,t){const n=me(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Uf(e,t){const[n,r]=Ln(e,t.start,t.end);return{start:n,end:r}}function m0(e,t){const{start:n,end:r}=Uf(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Se(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function v0(e,t){const n=me(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function b0(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Rf(e,t){const n=me(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function y0(e,t){const{start:n,end:r}=Uf(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const l=[];for(;+s<=a;)l.push(Se(n,s)),s.setFullYear(s.getFullYear()+i);return o?l.reverse():l}function Kf(e,t){var i,l,u,p;const n=Dr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.weekStartsOn)??0,o=me(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function w0(e,t){return Kf(e,{...t,weekStartsOn:1})}const x0={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"}},C0=(e,t,n)=>{let r;const o=x0[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ys(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const S0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},N0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},k0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M0={date:Ys({formats:S0,defaultWidth:"full"}),time:Ys({formats:N0,defaultWidth:"full"}),dateTime:Ys({formats:k0,defaultWidth:"full"})},D0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},E0=(e,t,n,r)=>D0[e];function Pr(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const T0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},P0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},O0={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"]},_0={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"]},I0={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"}},A0={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"}},F0={ordinalNumber:(e,t)=>{const 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:Pr({values:T0,defaultWidth:"wide"}),quarter:Pr({values:P0,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pr({values:O0,defaultWidth:"wide"}),day:Pr({values:_0,defaultWidth:"wide"}),dayPeriod:Pr({values:I0,defaultWidth:"wide",formattingValues:A0,defaultFormattingWidth:"wide"})};function Or(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?$0(i,d=>d.test(s)):W0(i,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const p=t.slice(s.length);return{value:u,rest:p}}}function W0(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function $0(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function B0(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const z0=/^(\d+)(th|st|nd|rd)?/i,L0=/\d+/i,H0={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},V0={any:[/^b/i,/^(a|c)/i]},Y0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},G0={any:[/1/i,/2/i,/3/i,/4/i]},j0={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},U0={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]},R0={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},K0={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]},q0={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},X0={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}},Z0={ordinalNumber:B0({matchPattern:z0,parsePattern:L0,valueCallback:e=>parseInt(e,10)}),era:Or({matchPatterns:H0,defaultMatchWidth:"wide",parsePatterns:V0,defaultParseWidth:"any"}),quarter:Or({matchPatterns:Y0,defaultMatchWidth:"wide",parsePatterns:G0,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Or({matchPatterns:j0,defaultMatchWidth:"wide",parsePatterns:U0,defaultParseWidth:"any"}),day:Or({matchPatterns:R0,defaultMatchWidth:"wide",parsePatterns:K0,defaultParseWidth:"any"}),dayPeriod:Or({matchPatterns:q0,defaultMatchWidth:"any",parsePatterns:X0,defaultParseWidth:"any"})},Hn={code:"en-US",formatDistance:C0,formatLong:M0,formatRelative:E0,localize:F0,match:Z0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Q0(e,t){const n=me(e,t==null?void 0:t.in);return Vs(n,Rf(n))+1}function Gs(e,t){const n=me(e,t==null?void 0:t.in),r=+Er(n)-+l0(n);return Math.round(r/Bf)+1}function qf(e,t){var p,d,h,g;const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=Dr(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(h=o.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=Se((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=zn(s,t),l=Se((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=zn(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function J0(e,t){var i,l,u,p;const n=Dr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(u=n.locale)==null?void 0:u.options)==null?void 0:p.firstWeekContainsDate)??1,o=qf(e,t),a=Se((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),zn(a,t)}function js(e,t){const n=me(e,t==null?void 0:t.in),r=+zn(n,t)-+J0(n,t);return Math.round(r/Bf)+1}function ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const qt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ge(n+1,2)},d(e,t){return ge(e.getDate(),t.length)},a(e,t){const 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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ge(e.getHours()%12||12,t.length)},H(e,t){return ge(e.getHours(),t.length)},m(e,t){return ge(e.getMinutes(),t.length)},s(e,t){return ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ge(o,t.length)}},Vn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xf={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return qt.y(e,t)},Y:function(e,t,n,r){const o=qf(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ge(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ge(a,t.length)},R:function(e,t){const n=Vf(e);return ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return ge(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ge(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"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ge(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"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return qt.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"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ge(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"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=js(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ge(o,t.length)},I:function(e,t,n){const r=Gs(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):qt.d(e,t)},D:function(e,t,n){const r=Q0(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ge(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ge(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ge(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ge(o,t.length);case"io":return n.ordinalNumber(o,{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"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Vn.noon:r===0?o=Vn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Vn.evening:r>=12?o=Vn.afternoon:r>=4?o=Vn.morning:o=Vn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return qt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):qt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):qt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):qt.s(e,t)},S:function(e,t){return qt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Qf(r);case"XXXX":case"XX":return fn(r);case"XXXXX":case"XXX":default:return fn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Qf(r);case"xxxx":case"xx":return fn(r);case"xxxxx":case"xxx":default:return fn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Zf(r,":");case"OOOO":default:return"GMT"+fn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Zf(r,":");case"zzzz":default:return"GMT"+fn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ge(r,t.length)},T:function(e,t,n){return ge(+e,t.length)}};function Zf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ge(a,2)}function Qf(e,t){return e%60===0?(e>0?"-":"+")+ge(Math.abs(e)/60,2):fn(e,t)}function fn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ge(Math.trunc(r/60),2),a=ge(r%60,2);return n+o+t+a}const Jf=(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"});case"PPPP":default:return t.date({width:"full"})}},ep=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},eC={p:ep,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Jf(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;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Jf(r,t)).replace("{{time}}",ep(o,t))}},tC=/^D+$/,nC=/^Y+$/,rC=["D","DD","YY","YYYY"];function oC(e){return tC.test(e)}function aC(e){return nC.test(e)}function sC(e,t,n){const r=iC(e,t,n);if(console.warn(r),rC.includes(e))throw new RangeError(r)}function iC(e,t,n){const 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`}const lC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dC=/^'([^]*?)'?$/,uC=/''/g,fC=/[a-zA-Z]/;function Yn(e,t,n){var p,d,h,g,w,m,v,b;const r=Dr(),o=(n==null?void 0:n.locale)??r.locale??Hn,a=(n==null?void 0:n.firstWeekContainsDate)??((d=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(h=r.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((m=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,i=me(e,n==null?void 0:n.in);if(!h0(i))throw new RangeError("Invalid time value");let l=t.match(cC).map(y=>{const x=y[0];if(x==="p"||x==="P"){const k=eC[x];return k(y,o.formatLong)}return y}).join("").match(lC).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const x=y[0];if(x==="'")return{isToken:!1,value:pC(y)};if(Xf[x])return{isToken:!0,value:y};if(x.match(fC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(y=>{if(!y.isToken)return y.value;const x=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&aC(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&oC(x))&&sC(x,t,String(e));const k=Xf[x[0]];return k(i,x,o.localize,u)}).join("")}function pC(e){const t=e.match(dC);return t?t[1].replace(uC,"'"):e}function hC(e,t){const n=me(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Se(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function gC(e,t){return me(e,t==null?void 0:t.in).getMonth()}function mC(e,t){return me(e,t==null?void 0:t.in).getFullYear()}function vC(e,t){return+me(e)>+me(t)}function bC(e,t){return+me(e)<+me(t)}function yC(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function wC(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function xC(e,t,n){const r=me(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Se(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=hC(s);return r.setMonth(t,Math.min(a,i)),r}function CC(e,t,n){const r=me(e,n==null?void 0:n.in);return isNaN(+r)?Se(e,NaN):(r.setFullYear(t),r)}function SC(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Us={},_r={};function pn(e,t){try{const r=(Us[e]||(Us[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in _r?_r[r]:tp(r,r.split(":"))}catch{if(e in _r)return _r[e];const n=e==null?void 0:e.match(NC);return n?tp(e,n.slice(1)):NaN}}const NC=/([+-]\d\d):?(\d\d)?/;function tp(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return _r[e]=n*60+r>0?n*60+r+o:n*60-r-o}class xt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(pn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),rp(this),Rs(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new xt(...n,t):new xt(Date.now(),t)}withTimeZone(t){return new xt(+this,t)}getTimezoneOffset(){const t=-pn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Rs(this),+this}[Symbol.for("constructDateFrom")](t){return new xt(+new Date(t),this.timeZone)}}const np=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!np.test(e))return;const t=e.replace(np,"$1UTC");xt.prototype[t]&&(e.startsWith("get")?xt.prototype[e]=function(){return this.internal[t]()}:(xt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),kC(this),+this},xt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Rs(this),+this}))});function Rs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-pn(e.timeZone,e)*60))}function kC(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()),rp(e)}function rp(e){const t=pn(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=-new Date(+r).getTimezoneOffset(),s=o-a,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const u=new Date(+e);u.setUTCSeconds(0);const p=o>0?u.getSeconds():(u.getSeconds()-60)%60,d=Math.round(-(pn(e.timeZone,e)*60))%60;(d||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+p));const h=pn(e.timeZone,e),g=h>0?Math.floor(h):Math.ceil(h),m=-new Date(+e).getTimezoneOffset()-g,v=g!==n,b=m-l;if(v&&b){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b);const y=pn(e.timeZone,e),x=y>0?Math.floor(y):Math.ceil(y),k=g-x;k&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+k),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+k))}}class Ae extends xt{static tz(t,...n){return n.length?new Ae(...n,t):new Ae(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${SC(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Ae(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ae(+new Date(t),this.timeZone)}}const op=5,MC=4;function DC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,op*7-1);return t.getMonth(e)===t.getMonth(a)?op:MC}function ap(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function EC(e,t){const n=ap(e,t),r=DC(e,t);return t.addDays(n,r*7-1)}const sp={...Hn,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Yn(s,i,{locale:Hn,...n});let a=o(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 n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Yn(o,a,{locale:Hn,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>Yn(s,i,{locale:Hn,...n});let a=o(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>Yn(o,a,{locale:Hn,...t}),r(e,"cccc")}}};class Ge{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ae.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Ae(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):Lf(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Hf(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):c0(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):d0(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Vs(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):jf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):m0(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):y0(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const s=[];return a.forEach(l=>{s.push(new Date(l,0,1))}),s},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):EC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):w0(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):g0(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Kf(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):b0(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Yn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Gs(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):gC(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):mC(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):js(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):vC(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):bC(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Gf(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):p0(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):yC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):wC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):u0(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):f0(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):xC(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):CC(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ap(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Tr(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Er(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):v0(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):zn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Rf(r)},this.options={locale:sp,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&Ge.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,a=n==null?void 0:n.code;if(a&&Ge.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Ge.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"]);const Ct=new Ge;class ip{constructor(t,n,r=Ct){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class TC{constructor(t,n){this.date=t,this.weeks=n}}class PC{constructor(t,n){this.days=n,this.weekNumber=t}}function OC(e){return S.createElement("button",{...e})}function _C(e){return S.createElement("span",{...e})}function IC(e){const{size:t=24,orientation:n="left",className:r}=e;return S.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&S.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&S.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&S.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&S.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function AC(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function FC(e){const{day:t,modifiers:n,...r}=e,o=S.useRef(null);return S.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),S.createElement("button",{ref:o,...r})}var ee;(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"})(ee||(ee={}));var ye;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ye||(ye={}));var dt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(dt||(dt={}));var je;(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"})(je||(je={}));function WC(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[ee.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return S.createElement("span",{"data-disabled":a.disabled,className:o[ee.DropdownRoot]},S.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:p})=>S.createElement(r.Option,{key:l,value:l,disabled:p},u))),S.createElement("span",{className:o[ee.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,S.createElement(r.Chevron,{orientation:"down",size:18,className:o[ee.Chevron]})))}function $C(e){return S.createElement("div",{...e})}function BC(e){return S.createElement("div",{...e})}function zC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function LC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function HC(e){return S.createElement("table",{...e})}function VC(e){return S.createElement("div",{...e})}const lp=S.createContext(void 0);function Ir(){const e=S.useContext(lp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function YC(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}function GC(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=Ir(),p=S.useCallback(h=>{o&&(n==null||n(h))},[o,n]),d=S.useCallback(h=>{r&&(t==null||t(h))},[r,t]);return S.createElement("nav",{...a},S.createElement(s.PreviousMonthButton,{type:"button",className:i[ee.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:d},S.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[ee.Chevron],orientation:"left"})),S.createElement(s.NextMonthButton,{type:"button",className:i[ee.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:p},S.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ee.Chevron]})))}function jC(e){const{components:t}=Ir();return S.createElement(t.Button,{...e})}function UC(e){return S.createElement("option",{...e})}function RC(e){const{components:t}=Ir();return S.createElement(t.Button,{...e})}function KC(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function qC(e){return S.createElement("select",{...e})}function XC(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function ZC(e){return S.createElement("th",{...e})}function QC(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function JC(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function e1(e){return S.createElement("th",{...e})}function t1(e){return S.createElement("tbody",{...e})}function n1(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}const r1=Object.freeze(Object.defineProperty({__proto__:null,Button:OC,CaptionLabel:_C,Chevron:IC,Day:AC,DayButton:FC,Dropdown:WC,DropdownNav:$C,Footer:BC,Month:zC,MonthCaption:LC,MonthGrid:HC,Months:VC,MonthsDropdown:YC,Nav:GC,NextMonthButton:jC,Option:UC,PreviousMonthButton:RC,Root:KC,Select:qC,Week:XC,WeekNumber:JC,WeekNumberHeader:e1,Weekday:ZC,Weekdays:QC,Weeks:t1,YearsDropdown:n1},Symbol.toStringTag,{value:"Module"}));function At(e,t,n=!1,r=Ct){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Ks(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Uo(e){return!!(e&&typeof e=="object"&&"from"in e)}function qs(e){return!!(e&&typeof e=="object"&&"after"in e)}function Xs(e){return!!(e&&typeof e=="object"&&"before"in e)}function cp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function dp(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ft(e,t,n=Ct){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(dp(i,n))return i.some(l=>o(e,l));if(Uo(i))return At(i,e,!1,n);if(cp(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Ks(i)){const l=a(i.before,e),u=a(i.after,e),p=l>0,d=u<0;return s(i.before,i.after)?d&&p:p||d}return qs(i)?a(e,i.after)>0:Xs(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function o1(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:u,today:p=o.today()}=t,{isSameDay:d,isSameMonth:h,startOfMonth:g,isBefore:w,endOfMonth:m,isAfter:v}=o,b=n&&g(n),y=r&&m(r),x={[ye.focused]:[],[ye.outside]:[],[ye.disabled]:[],[ye.hidden]:[],[ye.today]:[]},k={};for(const E of e){const{date:C,displayMonth:N}=E,M=!!(N&&!h(C,N)),D=!!(b&&w(C,b)),I=!!(y&&v(C,y)),R=!!(a&&Ft(C,a,o)),z=!!(s&&Ft(C,s,o))||D||I||!u&&!l&&M||u&&l===!1&&M,q=d(C,p);M&&x.outside.push(E),R&&x.disabled.push(E),z&&x.hidden.push(E),q&&x.today.push(E),i&&Object.keys(i).forEach(Y=>{const ae=i==null?void 0:i[Y];ae&&Ft(C,ae,o)&&(k[Y]?k[Y].push(E):k[Y]=[E])})}return E=>{const C={[ye.focused]:!1,[ye.disabled]:!1,[ye.hidden]:!1,[ye.outside]:!1,[ye.today]:!1},N={};for(const M in x){const D=x[M];C[M]=D.some(I=>I===E)}for(const M in k)N[M]=k[M].some(D=>D===E);return{...C,...N}}}function a1(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[ye[a]]?o.push(t[ye[a]]):t[dt[a]]&&o.push(t[dt[a]]),o),[t[ee.Day]])}function s1(e){return{...r1,...e}}function i1(e){const 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(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function l1(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in ye)e[ye[t]]=`rdp-${ye[t]}`;for(const t in dt)e[dt[t]]=`rdp-${dt[t]}`;for(const t in je)e[je[t]]=`rdp-${je[t]}`;return e}function up(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const c1=up;function d1(e,t,n){return(n??new Ge(t)).format(e,"d")}function u1(e,t=Ct){return t.format(e,"LLLL")}function f1(e,t,n){return(n??new Ge(t)).format(e,"cccccc")}function p1(e,t=Ct){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function h1(){return""}function fp(e,t=Ct){return t.format(e,"yyyy")}const g1=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:up,formatDay:d1,formatMonthCaption:c1,formatMonthDropdown:u1,formatWeekNumber:p1,formatWeekNumberHeader:h1,formatWeekdayName:f1,formatYearCaption:fp,formatYearDropdown:fp},Symbol.toStringTag,{value:"Module"}));function m1(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...g1,...e}}function Zs(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const v1=Zs;function Qs(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const b1=Qs;function pp(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function hp(e){return"Choose the Month"}function gp(){return""}const y1="Go to the Next Month";function mp(e,t){return y1}function vp(e){return"Go to the Previous Month"}function bp(e,t,n){return(n??new Ge(t)).format(e,"cccc")}function yp(e,t){return`Week ${e}`}function wp(e){return"Week Number"}function xp(e){return"Choose the Year"}const w1=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:b1,labelDay:v1,labelDayButton:Zs,labelGrid:Qs,labelGridcell:pp,labelMonthDropdown:hp,labelNav:gp,labelNext:mp,labelPrevious:vp,labelWeekNumber:yp,labelWeekNumberHeader:wp,labelWeekday:bp,labelYearDropdown:xp},Symbol.toStringTag,{value:"Module"})),ut=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function x1(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...w1,...e??{},labelDayButton:ut(Zs,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:ut(hp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:ut(mp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:ut(vp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:ut(yp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:ut(xp,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:ut(Qs,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:ut(pp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:ut(gp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:ut(wp,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:ut(bp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function C1(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:u}=o;return l({start:s(e),end:i(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),w=u(h),m=t&&h<a(t)||n&&h>a(n)||!1;return{value:w,label:g,disabled:m}})}function S1(e,t={},n={}){let r={...t==null?void 0:t[ee.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function N1(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),s=[];for(let i=0;i<7;i++){const l=e.addDays(a,i);s.push(l)}return s}function k1(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:l}=r,u=a(e),p=s(t),d=i({start:u,end:p});return o&&d.reverse(),d.map(h=>{const g=n.formatYearDropdown(h,r);return{value:l(h),label:g,disabled:!1}})}function M1(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,o=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,a=l=>{const u=typeof l=="number"||typeof l=="string"?new Date(l):l;return new Ae(u.getFullYear(),u.getMonth(),u.getDate(),12,0,0,e)},s=l=>{const u=a(l);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0,0)};return{today:()=>a(Ae.tz(e)),newDate:(l,u,p)=>new Ae(l,u,p,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,u)=>{const p=a(l),d=(u==null?void 0:u.weekStartsOn)??o,h=(p.getDay()-d+7)%7;return p.setDate(p.getDate()-h),p},startOfISOWeek:l=>{const u=a(l),p=(u.getDay()-1+7)%7;return u.setDate(u.getDate()-p),u},startOfMonth:l=>{const u=a(l);return u.setDate(1),u},startOfYear:l=>{const u=a(l);return u.setMonth(0,1),u},endOfWeek:(l,u)=>{const p=a(l),g=((((u==null?void 0:u.weekStartsOn)??o)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+g),p},endOfISOWeek:l=>{const u=a(l),p=(7-u.getDay())%7;return u.setDate(u.getDate()+p),u},endOfMonth:l=>{const u=a(l);return u.setMonth(u.getMonth()+1,0),u},endOfYear:l=>{const u=a(l);return u.setMonth(11,31),u},eachMonthOfInterval:l=>{const u=a(l.start),p=a(l.end),d=[],h=new Ae(u.getFullYear(),u.getMonth(),1,12,0,0,e),g=p.getFullYear()*12+p.getMonth();for(;h.getFullYear()*12+h.getMonth()<=g;)d.push(new Ae(h,e)),h.setMonth(h.getMonth()+1,1);return d},addDays:(l,u)=>{const p=a(l);return p.setDate(p.getDate()+u),p},addWeeks:(l,u)=>{const p=a(l);return p.setDate(p.getDate()+u*7),p},addMonths:(l,u)=>{const p=a(l);return p.setMonth(p.getMonth()+u),p},addYears:(l,u)=>{const p=a(l);return p.setFullYear(p.getFullYear()+u),p},eachYearOfInterval:l=>{const u=a(l.start),p=a(l.end),d=[],h=new Ae(u.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=p.getFullYear();)d.push(new Ae(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return d},getWeek:(l,u)=>{var d;const p=s(l);return js(p,{weekStartsOn:(u==null?void 0:u.weekStartsOn)??o,firstWeekContainsDate:(u==null?void 0:u.firstWeekContainsDate)??((d=r==null?void 0:r.options)==null?void 0:d.firstWeekContainsDate)??1})},getISOWeek:l=>{const u=s(l);return Gs(u)},differenceInCalendarDays:(l,u)=>{const p=s(l),d=s(u);return Vs(p,d)},differenceInCalendarMonths:(l,u)=>{const p=s(l),d=s(u);return jf(p,d)}}}const Ar=e=>e instanceof HTMLElement?e:null,Js=e=>[...e.querySelectorAll("[data-animated-month]")??[]],D1=e=>Ar(e.querySelector("[data-animated-month]")),ei=e=>Ar(e.querySelector("[data-animated-caption]")),ti=e=>Ar(e.querySelector("[data-animated-weeks]")),E1=e=>Ar(e.querySelector("[data-animated-nav]")),T1=e=>Ar(e.querySelector("[data-animated-weekdays]"));function P1(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=S.useRef(null),i=S.useRef(r),l=S.useRef(!1);S.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const p=a.isSameMonth(r[0].date,u[0].date),d=a.isAfter(r[0].date,u[0].date),h=d?n[je.caption_after_enter]:n[je.caption_before_enter],g=d?n[je.weeks_after_enter]:n[je.weeks_before_enter],w=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(Js(m).forEach(x=>{if(!(x instanceof HTMLElement))return;const k=D1(x);k&&x.contains(k)&&x.removeChild(k);const E=ei(x);E&&E.classList.remove(h);const C=ti(x);C&&C.classList.remove(g)}),s.current=m):s.current=null,l.current||p||o)return;const v=w instanceof HTMLElement?Js(w):[],b=Js(e.current);if(b!=null&&b.every(y=>y instanceof HTMLElement)&&v&&v.every(y=>y instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const y=E1(e.current);y&&(y.style.zIndex="1"),b.forEach((x,k)=>{const E=v[k];if(!E)return;x.style.position="relative",x.style.overflow="hidden";const C=ei(x);C&&C.classList.add(h);const N=ti(x);N&&N.classList.add(g);const M=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),y&&(y.style.zIndex=""),C&&C.classList.remove(h),N&&N.classList.remove(g),x.style.position="",x.style.overflow="",x.contains(E)&&x.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const D=T1(E);D&&(D.style.opacity="0");const I=ei(E);I&&(I.classList.add(d?n[je.caption_before_exit]:n[je.caption_after_exit]),I.addEventListener("animationend",M));const R=ti(E);R&&R.classList.add(d?n[je.weeks_before_exit]:n[je.weeks_after_exit]),x.insertBefore(E,x.firstChild)})}})}function O1(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:p,differenceInCalendarMonths:d,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:w,endOfWeek:m,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:y,startOfWeek:x}=r,k=l?b(o,r):s?y(o):x(o),E=l?h(a):s?g(w(a)):m(w(a)),C=t&&(l?h(t):s?g(t):m(t)),N=C&&v(E,C)?C:E,M=p(N,k),D=d(a,o)+1,I=[];for(let q=0;q<=M;q++){const Y=u(k,q);I.push(Y)}const z=(l?35:42)*D;if(i&&I.length<z){const q=z-I.length;for(let Y=0;Y<q;Y++){const ae=u(I[I.length-1],1);I.push(ae)}}return I}function _1(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>a.concat(s.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function I1(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function Cp(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:u,addMonths:p,startOfMonth:d}=r;if(n&&u(n,l)<i-1){const h=-1*(i-1);l=p(n,h)}return t&&u(l,t)<0&&(l=t),d(l)}function A1(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:u,getWeek:p,startOfBroadcastWeek:d,startOfISOWeek:h,startOfWeek:g}=r,w=e.reduce((m,v)=>{const b=n.broadcastCalendar?d(v,r):n.ISOWeek?h(v):g(v),y=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),x=t.filter(N=>N>=b&&N<=y),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<k){const N=t.filter(M=>{const D=k-x.length;return M>y&&M<=o(y,D)});x.push(...N)}const E=x.reduce((N,M)=>{const D=n.ISOWeek?u(M):p(M),I=N.find(z=>z.weekNumber===D),R=new ip(M,v,r);return I?I.days.push(R):N.push(new PC(D,[R])),N},[]),C=new TC(v,E);return m.push(C),m},[]);return n.reverseMonths?w.reverse():w}function F1(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:u,newDate:p,today:d}=t,{fromYear:h,toYear:g,fromMonth:w,toMonth:m}=e;!n&&w&&(n=w),!n&&h&&(n=t.newDate(h,0,1)),!r&&m&&(r=m),!r&&g&&(r=p(g,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):h?n=p(h,0,1):!n&&v&&(n=o(l(e.today??d(),-100))),r?r=i(r):g?r=p(g,11,31):!r&&v&&(r=u(e.today??d())),[n&&a(n),r&&a(r)]}function W1(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a:1,p=s(e);if(!t)return i(p,u);if(!(l(t,e)<a))return i(p,u)}function $1(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a??1:1,p=s(e);if(!t)return i(p,-u);if(!(l(p,t)<=0))return i(p,-u)}function B1(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Ro(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function z1(e,t){var k;const[n,r]=F1(e,t),{startOfMonth:o,endOfMonth:a}=t,s=Cp(e,n,r,t),[i,l]=Ro(s,e.month?s:void 0);S.useEffect(()=>{const E=Cp(e,n,r,t);l(E)},[e.timeZone]);const{months:u,weeks:p,days:d,previousMonth:h,nextMonth:g}=S.useMemo(()=>{const E=I1(i,r,{numberOfMonths:e.numberOfMonths},t),C=O1(E,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),N=A1(E,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),M=B1(N),D=_1(N),I=$1(i,n,e,t),R=W1(i,r,e,t);return{months:N,weeks:M,days:D,previousMonth:I,nextMonth:R}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(k=e.endMonth)==null?void 0:k.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:w,onMonthChange:m}=e,v=E=>p.some(C=>C.days.some(N=>N.isEqualTo(E))),b=E=>{if(w)return;let C=o(E);n&&C<o(n)&&(C=o(n)),r&&C>o(r)&&(C=o(r)),l(C),m==null||m(C)};return{months:u,weeks:p,days:d,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:b,goToDay:E=>{v(E)||b(E.date)}}}var St;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(St||(St={}));function Sp(e){return!e[ye.disabled]&&!e[ye.hidden]&&!e[ye.outside]}function L1(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);Sp(i)&&(i[ye.focused]&&a<St.FocusedModifier?(o=s,a=St.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<St.LastFocused?(o=s,a=St.LastFocused):n(s.date)&&a<St.Selected?(o=s,a=St.Selected):i[ye.today]&&a<St.Today&&(o=s,a=St.Today))}return o||(o=e.find(s=>Sp(t(s)))),o}function H1(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:u,addMonths:p,addWeeks:d,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:w,endOfWeek:m,max:v,min:b,startOfBroadcastWeek:y,startOfISOWeek:x,startOfWeek:k}=s;let C={day:u,week:d,month:p,year:h,startOfWeek:N=>l?y(N,s):i?x(N):k(N),endOfWeek:N=>l?g(N):i?w(N):m(N)}[e](n,t==="after"?1:-1);return t==="before"&&r?C=v([r,C]):t==="after"&&o&&(C=b([o,C])),C}function Np(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=H1(e,t,n.date,r,o,a,s),u=!!(a.disabled&&Ft(l,a.disabled,s)),p=!!(a.hidden&&Ft(l,a.hidden,s)),d=l,h=new ip(l,d,s);return!u&&!p?h:Np(e,t,h,r,o,a,s,i+1)}function V1(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=S.useState(),l=L1(t.days,n,r||(()=>!1),s),[u,p]=S.useState(a?l:void 0);return{isFocusTarget:m=>!!(l!=null&&l.isEqualTo(m)),setFocused:p,focused:u,blur:()=>{i(u),p(void 0)},moveFocus:(m,v)=>{if(!u)return;const b=Np(m,v,u,t.navStart,t.navEnd,e,o);b&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(b))||(t.goToDay(b),p(b)))}}}function Y1(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ro(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,u=g=>(i==null?void 0:i.some(w=>l(w,g)))??!1,{min:p,max:d}=e;return{selected:i,select:(g,w,m)=>{let v=[...i??[]];if(u(g)){if((i==null?void 0:i.length)===p||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(b=>!l(b,g))}else(i==null?void 0:i.length)===d?v=[g]:v=[...v,g];return o||s(v),o==null||o(v,g,w,m),v},isSelected:u}}function G1(e,t,n=0,r=0,o=!1,a=Ct){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:u,isBefore:p}=a;let d;if(!s&&!i)d={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?n===0?d={from:s,to:e}:o?d={from:s,to:void 0}:d=void 0:p(e,s)?d={from:e,to:s}:d={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?d={from:s,to:i}:d=void 0;else if(l(s,e))d={from:s,to:n>0?void 0:e};else if(l(i,e))d={from:e,to:n>0?void 0:e};else if(p(e,s))d={from:e,to:i};else if(u(e,s))d={from:s,to:e};else if(u(e,i))d={from:s,to:e};else throw new Error("Invalid range");if(d!=null&&d.from&&(d!=null&&d.to)){const h=a.differenceInCalendarDays(d.to,d.from);r>0&&h>r?d={from:e,to:void 0}:n>1&&h<n&&(d={from:e,to:void 0})}return d}function j1(e,t,n=Ct){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function kp(e,t,n=Ct){return At(e,t.from,!1,n)||At(e,t.to,!1,n)||At(t,e.from,!1,n)||At(t,e.to,!1,n)}function U1(e,t,n=Ct){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?At(e,i,!1,n):dp(i,n)?i.some(l=>At(e,l,!1,n)):Uo(i)?i.from&&i.to?kp(e,{from:i.from,to:i.to},n):!1:cp(i)?j1(e,i.dayOfWeek,n):Ks(i)?n.isAfter(i.before,i.after)?kp(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):Ft(e.from,i,n)||Ft(e.to,i,n):qs(i)||Xs(i)?Ft(e.from,i,n)||Ft(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(p=>p(i)))return!0;i=n.addDays(i,1)}}return!1}function R1(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,u]=Ro(a,i?a:void 0),p=i?a:l;return{selected:p,select:(g,w,m)=>{const{min:v,max:b}=e;let y;if(g){const x=p==null?void 0:p.from,k=p==null?void 0:p.to,E=!!x&&!!k,C=!!x&&!!k&&t.isSameDay(x,k)&&t.isSameDay(g,x);o&&(E||!(p!=null&&p.from))?!s&&C?y=void 0:y={from:g,to:void 0}:y=G1(g,p,v,b,s,t)}return r&&n&&(y!=null&&y.from)&&y.to&&U1({from:y.from,to:y.to},n,t)&&(y.from=g,y.to=void 0),i||u(y),i==null||i(y,g,w,m),y},isSelected:g=>p&&At(p,g,!1,t)}}function K1(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ro(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(d,h,g)=>{let w=d;return!r&&i&&i&&l(d,i)&&(w=void 0),o||s(w),o==null||o(w,d,h,g),w},isSelected:d=>i?l(i,d):!1}}function q1(e,t){const n=K1(e,t),r=Y1(e,t),o=R1(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function et(e,t){return e instanceof Ae&&e.timeZone===t?e:new Ae(e,t)}function Gn(e,t,n){return et(e,t)}function Mp(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Gn(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Gn(r,t):r):Uo(e)?{...e,from:e.from?et(e.from,t):e.from,to:e.to?et(e.to,t):e.to}:Ks(e)?{before:Gn(e.before,t),after:Gn(e.after,t)}:qs(e)?{after:Gn(e.after,t)}:Xs(e)?{before:Gn(e.before,t)}:e}function ni(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Mp(r,t)):Mp(e,t))}function X1(e){var Re;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=et(t.today,n)),t.month&&(t.month=et(t.month,n)),t.defaultMonth&&(t.defaultMonth=et(t.defaultMonth,n)),t.startMonth&&(t.startMonth=et(t.startMonth,n)),t.endMonth&&(t.endMonth=et(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=et(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(Re=t.selected)==null?void 0:Re.map(ie=>et(ie,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?et(t.selected.from,n):t.selected.from,to:t.selected.to?et(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=ni(t.disabled,n)),t.hidden!==void 0&&(t.hidden=ni(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(pe=>{var re;ie[pe]=ni((re=t.modifiers)==null?void 0:re[pe],n)}),t.modifiers=ie}const{components:r,formatters:o,labels:a,dateLib:s,locale:i,classNames:l}=S.useMemo(()=>{const ie={...sp,...t.locale},pe=t.broadcastCalendar?1:t.weekStartsOn,re=t.noonSafe&&t.timeZone?M1(t.timeZone,{weekStartsOn:pe,locale:ie}):void 0,ue=t.dateLib&&re?{...re,...t.dateLib}:t.dateLib??re,J=new Ge({locale:ie,weekStartsOn:pe,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},ue);return{dateLib:J,components:s1(t.components),formatters:m1(t.formatters),labels:x1(t.labels,J.options),locale:ie,classNames:{...l1(),...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:s.today()});const{captionLayout:u,mode:p,navLayout:d,numberOfMonths:h=1,onDayBlur:g,onDayClick:w,onDayFocus:m,onDayKeyDown:v,onDayMouseEnter:b,onDayMouseLeave:y,onNextClick:x,onPrevClick:k,showWeekNumber:E,styles:C}=t,{formatCaption:N,formatDay:M,formatMonthDropdown:D,formatWeekNumber:I,formatWeekNumberHeader:R,formatWeekdayName:z,formatYearDropdown:q}=o,Y=z1(t,s),{days:ae,months:B,navStart:K,navEnd:G,previousMonth:A,nextMonth:Q,goToMonth:oe}=Y,_=o1(ae,t,K,G,s),{isSelected:F,select:V,selected:$}=q1(t,s)??{},{blur:Z,focused:W,isFocusTarget:U,moveFocus:X,setFocused:se}=V1(t,Y,_,F??(()=>!1),s),{labelDayButton:de,labelGridcell:ce,labelGrid:Me,labelMonthDropdown:Ee,labelNav:tt,labelPrevious:Ue,labelNext:Fe,labelWeekday:Xt,labelWeekNumber:De,labelWeekNumberHeader:$r,labelYearDropdown:Br}=a,Oe=S.useMemo(()=>N1(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),ft=p!==void 0||w!==void 0,We=S.useCallback(()=>{A&&(oe(A),k==null||k(A))},[A,oe,k]),hn=S.useCallback(()=>{Q&&(oe(Q),x==null||x(Q))},[oe,Q,x]),Zt=S.useCallback((ie,pe)=>re=>{re.preventDefault(),re.stopPropagation(),se(ie),!pe.disabled&&(V==null||V(ie.date,pe,re),w==null||w(ie.date,pe,re))},[V,w,se]),Un=S.useCallback((ie,pe)=>re=>{se(ie),m==null||m(ie.date,pe,re)},[m,se]),kt=S.useCallback((ie,pe)=>re=>{Z(),g==null||g(ie.date,pe,re)},[Z,g]),Qt=S.useCallback((ie,pe)=>re=>{const ue={ArrowLeft:[re.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[re.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[re.shiftKey?"year":"week","after"],ArrowUp:[re.shiftKey?"year":"week","before"],PageUp:[re.shiftKey?"year":"month","before"],PageDown:[re.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ue[re.key]){re.preventDefault(),re.stopPropagation();const[J,te]=ue[re.key];X(J,te)}v==null||v(ie.date,pe,re)},[X,v,t.dir]),Le=S.useCallback((ie,pe)=>re=>{b==null||b(ie.date,pe,re)},[b]),Rn=S.useCallback((ie,pe)=>re=>{y==null||y(ie.date,pe,re)},[y]),pt=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setMonth(s.startOfMonth(ie),re);oe(ue)},[s,oe]),Kn=S.useCallback(ie=>pe=>{const re=Number(pe.target.value),ue=s.setYear(s.startOfMonth(ie),re);oe(ue)},[s,oe]),{className:qn,style:ht}=S.useMemo(()=>({className:[l[ee.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ee.Root],...t.style}}),[l,t.className,t.style,C]),Xn=i1(t),Zn=S.useRef(null);P1(Zn,!!t.animate,{classNames:l,months:B,focused:W,dateLib:s});const gn={dayPickerProps:t,selected:$,select:V,isSelected:F,months:B,nextMonth:Q,previousMonth:A,goToMonth:oe,getModifiers:_,components:r,classNames:l,styles:C,labels:a,formatters:o};return S.createElement(lp.Provider,{value:gn},S.createElement(r.Root,{rootRef:t.animate?Zn:void 0,className:qn,style:ht,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Xn},S.createElement(r.Months,{className:l[ee.Months],style:C==null?void 0:C[ee.Months]},!t.hideNavigation&&!d&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:hn,previousMonth:A,nextMonth:Q}),B.map((ie,pe)=>S.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[ee.Month],style:C==null?void 0:C[ee.Month],key:pe,displayIndex:pe,calendarMonth:ie},d==="around"&&!t.hideNavigation&&pe===0&&S.createElement(r.PreviousMonthButton,{type:"button",className:l[ee.PreviousMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":Ue(A),onClick:We,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:A?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"right":"left"})),S.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[ee.MonthCaption],style:C==null?void 0:C[ee.MonthCaption],calendarMonth:ie,displayIndex:pe},u!=null&&u.startsWith("dropdown")?S.createElement(r.DropdownNav,{className:l[ee.Dropdowns],style:C==null?void 0:C[ee.Dropdowns]},(()=>{const re=u==="dropdown"||u==="dropdown-months"?S.createElement(r.MonthsDropdown,{key:"month",className:l[ee.MonthsDropdown],"aria-label":Ee(),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:pt(ie.date),options:C1(ie.date,K,G,o,s),style:C==null?void 0:C[ee.Dropdown],value:s.getMonth(ie.date)}):S.createElement("span",{key:"month"},D(ie.date,s)),ue=u==="dropdown"||u==="dropdown-years"?S.createElement(r.YearsDropdown,{key:"year",className:l[ee.YearsDropdown],"aria-label":Br(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Kn(ie.date),options:k1(K,G,o,s,!!t.reverseYears),style:C==null?void 0:C[ee.Dropdown],value:s.getYear(ie.date)}):S.createElement("span",{key:"year"},q(ie.date,s));return s.getMonthYearOrder()==="year-first"?[ue,re]:[re,ue]})(),S.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"}},N(ie.date,s.options,s))):S.createElement(r.CaptionLabel,{className:l[ee.CaptionLabel],role:"status","aria-live":"polite"},N(ie.date,s.options,s))),d==="around"&&!t.hideNavigation&&pe===h-1&&S.createElement(r.NextMonthButton,{type:"button",className:l[ee.NextMonthButton],tabIndex:Q?void 0:-1,"aria-disabled":Q?void 0:!0,"aria-label":Fe(Q),onClick:hn,"data-animated-button":t.animate?"true":void 0},S.createElement(r.Chevron,{disabled:Q?void 0:!0,className:l[ee.Chevron],orientation:t.dir==="rtl"?"left":"right"})),pe===h-1&&d==="after"&&!t.hideNavigation&&S.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[ee.Nav],style:C==null?void 0:C[ee.Nav],"aria-label":tt(),onPreviousClick:We,onNextClick:hn,previousMonth:A,nextMonth:Q}),S.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":Me(ie.date,s.options,s)||void 0,className:l[ee.MonthGrid],style:C==null?void 0:C[ee.MonthGrid]},!t.hideWeekdays&&S.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[ee.Weekdays],style:C==null?void 0:C[ee.Weekdays]},E&&S.createElement(r.WeekNumberHeader,{"aria-label":$r(s.options),className:l[ee.WeekNumberHeader],style:C==null?void 0:C[ee.WeekNumberHeader],scope:"col"},R()),Oe.map(re=>S.createElement(r.Weekday,{"aria-label":Xt(re,s.options,s),className:l[ee.Weekday],key:String(re),style:C==null?void 0:C[ee.Weekday],scope:"col"},z(re,s.options,s)))),S.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[ee.Weeks],style:C==null?void 0:C[ee.Weeks]},ie.weeks.map(re=>S.createElement(r.Week,{className:l[ee.Week],key:re.weekNumber,style:C==null?void 0:C[ee.Week],week:re},E&&S.createElement(r.WeekNumber,{week:re,style:C==null?void 0:C[ee.WeekNumber],"aria-label":De(re.weekNumber,{locale:i}),className:l[ee.WeekNumber],scope:"row",role:"rowheader"},I(re.weekNumber,s)),re.days.map(ue=>{const{date:J}=ue,te=_(ue);if(te[ye.focused]=!te.hidden&&!!(W!=null&&W.isEqualTo(ue)),te[dt.selected]=(F==null?void 0:F(J))||te.selected,Uo($)){const{from:we,to:Te}=$;te[dt.range_start]=!!(we&&Te&&s.isSameDay(J,we)),te[dt.range_end]=!!(we&&Te&&s.isSameDay(J,Te)),te[dt.range_middle]=At($,J,!0,s)}const Ne=S1(te,C,t.modifiersStyles),_e=a1(te,l,t.modifiersClassNames),Jt=!ft&&!te.hidden?ce(J,te,s.options,s):void 0;return S.createElement(r.Day,{key:`${ue.isoDate}_${ue.displayMonthId}`,day:ue,modifiers:te,className:_e.join(" "),style:Ne,role:"gridcell","aria-selected":te.selected||void 0,"aria-label":Jt,"data-day":ue.isoDate,"data-month":ue.outside?ue.dateMonthId:void 0,"data-selected":te.selected||void 0,"data-disabled":te.disabled||void 0,"data-hidden":te.hidden||void 0,"data-outside":ue.outside||void 0,"data-focused":te.focused||void 0,"data-today":te.today||void 0},!te.hidden&&ft?S.createElement(r.DayButton,{className:l[ee.DayButton],style:C==null?void 0:C[ee.DayButton],type:"button",day:ue,modifiers:te,disabled:!te.focused&&te.disabled||void 0,"aria-disabled":te.focused&&te.disabled||void 0,tabIndex:U(ue)?0:-1,"aria-label":de(J,te,s.options,s),onClick:Zt(ue,te),onBlur:kt(ue,te),onFocus:Un(ue,te),onKeyDown:Qt(ue,te),onMouseEnter:Le(ue,te),onMouseLeave:Rn(ue,te)},M(J,s.options,s)):!te.hidden&&M(ue.date,s.options,s))})))))))),t.footer&&S.createElement(r.Footer,{className:l[ee.Footer],style:C==null?void 0:C[ee.Footer],role:"status","aria-live":"polite"},t.footer)))}const Dp=Ce(["w-full flex items-center gap-2","rounded-md border border-border bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow,scale]","active:scale-[0.96]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 text-xs",md:"h-10",lg:"h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),ri=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(Dp({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[c.jsx(Fg,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("span",{className:P("flex-1 truncate text-left",!o&&"text-muted-foreground"),children:o??r})]}));ri.displayName="DatePickerTrigger";const oi=({className:e,classNames:t,...n})=>c.jsx(X1,{showOutsideDays:!0,className:P("p-3",e),classNames:{months:"relative flex gap-4",month:"flex flex-col gap-3",month_caption:"flex h-9 items-center justify-center",caption_label:"text-sm font-medium pointer-events-none",nav:"absolute inset-x-0 top-0 z-10 flex h-9 items-center justify-between",button_previous:P("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),button_next:P("inline-flex h-9 w-9 items-center justify-center rounded-md","text-muted-foreground hover:bg-accent hover:text-accent-foreground","transition-colors duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),month_grid:"w-full border-collapse",weekdays:"flex",weekday:"flex h-9 w-9 items-center justify-center text-xs font-normal text-muted-foreground",week:"mt-1 flex",day:"flex h-9 w-9 items-center justify-center p-0",day_button:P("h-9 w-9 rounded-md p-0 text-sm font-normal","transition-colors duration-100","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","aria-selected:opacity-100"),selected:"rounded-md bg-primary text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",today:"rounded-md bg-accent text-accent-foreground",outside:"opacity-50 text-muted-foreground",disabled:"opacity-30 text-muted-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:r})=>r==="left"?c.jsx(Qi,{className:"size-4","aria-hidden":"true"}):c.jsx(wn,{className:"size-4","aria-hidden":"true"})},...n});oi.displayName="Calendar";const Ep=sn;Ep.displayName="DatePickerRoot";const Tp=f.forwardRef(({className:e,align:t="start",...n},r)=>c.jsx(jt,{ref:r,align:t,className:P("w-auto p-0",e),...n}));Tp.displayName="DatePickerContent";const Pp=f.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a date",formatStr:r="PPP",size:o,isError:a,disabled:s,className:i},l)=>{const[u,p]=f.useState(!1),d=e?Yn(e,r):void 0;return c.jsxs(sn,{open:u,onOpenChange:p,children:[c.jsx(hr,{asChild:!0,children:c.jsx(ri,{ref:l,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":u,"aria-haspopup":"dialog",children:d})}),c.jsx(jt,{className:"w-auto p-0",align:"start",children:c.jsx(oi,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),p(!1)},defaultMonth:e})})]})});Pp.displayName="DatePicker";const Op=vc,_p=sb,Ip=ib,Ap=bc,ai=f.forwardRef(({className:e,...t},n)=>c.jsx(Ia,{ref:n,className:P("fixed inset-0 z-50 bg-black/50","data-[state=open]:animate-dialog-overlay-in","data-[state=closed]:animate-dialog-overlay-out",e),...t}));ai.displayName=Ia.displayName;const si=f.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>c.jsxs(Ap,{children:[c.jsx(ai,{}),c.jsx(Aa,{ref:i,onInteractOutside:l=>{n||l.preventDefault(),r==null||r(l)},onPointerDownOutside:l=>{n||l.preventDefault(),o==null||o(l)},onEscapeKeyDown:l=>{n||l.preventDefault(),a==null||a(l)},className:P("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-full max-w-lg rounded-xl bg-background p-6","ring-1 ring-border/60 shadow-lg","data-[state=open]:animate-dialog-content-in","data-[state=closed]:animate-dialog-content-out",e),...s,children:t})]}));si.displayName=Aa.displayName;const ii=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col gap-1.5 mb-4",e),...t});ii.displayName="DialogHeader";const li=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});li.displayName="DialogFooter";const ci=f.forwardRef(({className:e,...t},n)=>c.jsx(yc,{ref:n,className:P("text-lg font-semibold leading-none text-balance",e),...t}));ci.displayName=yc.displayName;const di=f.forwardRef(({className:e,...t},n)=>c.jsx(wc,{ref:n,className:P("text-sm text-muted-foreground text-pretty",e),...t}));di.displayName=wc.displayName;const Fp=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>c.jsxs(Op,{...i,children:[e&&c.jsx(_p,{asChild:!0,children:e}),c.jsxs(si,{className:a,dismissible:s,children:[s&&c.jsx(Ip,{className:P("absolute right-4 top-4 rounded-md p-3 text-muted-foreground","transition-[color,background-color] duration-150","hover:bg-accent hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Close",children:c.jsx(tn,{className:"size-4","aria-hidden":"true"})}),c.jsxs(ii,{children:[c.jsx(ci,{children:t}),n&&c.jsx(di,{children:n})]}),r,o&&c.jsx(li,{children:o})]})]});Fp.displayName="Dialog";const Wp=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("flex flex-col gap-1.5",e),...t}));Wp.displayName="Field";const $p=f.forwardRef(({className:e,required:t,children:n,...r},o)=>c.jsxs("label",{ref:o,className:P("text-sm font-medium leading-none text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r,children:[n,t&&c.jsx("span",{"aria-hidden":"true",className:"ml-0.5 text-destructive",children:"*"})]}));$p.displayName="Label";const Bp=f.forwardRef(({className:e,isError:t,...n},r)=>c.jsx("p",{ref:r,className:P("text-xs",t?"text-destructive":"text-muted-foreground",e),...n}));Bp.displayName="FieldMessage";function zp(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const Lp=f.forwardRef(({accept:e,multiple:t,onFilesChange:n,isError:r,disabled:o,className:a},s)=>{const[i,l]=f.useState(!1),[u,p]=f.useState([]),[d,h]=f.useState({}),g=f.useRef(null),w=f.useCallback(D=>{g.current=D,typeof s=="function"?s(D):s&&(s.current=D)},[s]);f.useEffect(()=>{const D={};for(const I of u)I.type.startsWith("image/")&&(D[I.name]=URL.createObjectURL(I));return h(D),()=>{for(const I of Object.values(D))URL.revokeObjectURL(I)}},[u]);const m=D=>{p(D),n==null||n(D)},v=D=>{!D||D.length===0||m(Array.from(D))},b=D=>{m(u.filter(I=>I.name!==D))},y=D=>{D.preventDefault(),o||l(!0)},x=D=>{D.preventDefault()},k=D=>{D.preventDefault(),l(!1)},E=D=>{D.preventDefault(),l(!1),o||v(D.dataTransfer.files)},C=()=>{var D;o||(D=g.current)==null||D.click()},N=D=>{D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),C())},M=u.length>0;return c.jsxs("div",{role:"button",tabIndex:o?-1:0,"aria-label":"Upload files","aria-invalid":r||void 0,"aria-disabled":o||void 0,onClick:C,onKeyDown:N,onDragEnter:y,onDragOver:x,onDragLeave:k,onDrop:E,className:P("relative flex flex-col gap-3 rounded-lg","min-h-40 cursor-pointer select-none p-6","border-2 border-dashed transition-[border-color,background-color]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background",M?"items-start justify-start":"items-center justify-center text-center",i?"border-primary bg-primary/5":"border-input bg-background",r&&"border-destructive",o&&"pointer-events-none opacity-50",a),children:[M?c.jsxs("div",{className:"flex w-full flex-col gap-2",children:[u.map(D=>c.jsxs("div",{className:"flex items-center gap-3 rounded-md bg-muted/50 px-3 py-2",children:[d[D.name]?c.jsx("img",{src:d[D.name],alt:D.name,className:"size-8 shrink-0 rounded object-cover"}):c.jsx(Hg,{className:"size-8 shrink-0 text-muted-foreground","aria-hidden":!0}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"truncate font-ui text-sm font-medium",children:D.name}),c.jsx("p",{className:"text-xs text-muted-foreground",children:zp(D.size)})]}),c.jsx("button",{type:"button","aria-label":`Remove ${D.name}`,onClick:I=>{I.stopPropagation(),b(D.name)},className:P("shrink-0 rounded p-1 text-muted-foreground","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:c.jsx(tn,{className:"size-4","aria-hidden":!0})})]},D.name)),c.jsx("p",{className:"text-xs text-muted-foreground",children:i?"Drop to replace":"Click or drag to replace files"})]}):c.jsxs(c.Fragment,{children:[c.jsx($g,{className:P("size-10",i?"text-primary":"text-muted-foreground"),"aria-hidden":!0}),c.jsxs("div",{className:"flex flex-col items-center gap-1",children:[c.jsx("p",{className:"font-ui text-sm font-medium",children:i?"Drop files here":"Drag & drop files here, or click to browse"}),e&&c.jsx("p",{className:"text-xs text-muted-foreground",children:e})]})]}),c.jsx("input",{ref:w,type:"file",accept:e,multiple:t,disabled:o,className:"sr-only","aria-hidden":!0,tabIndex:-1,onChange:D=>{v(D.target.files),D.currentTarget.value=""}})]})});Lp.displayName="FileUpload";const Hp=Ce(["w-full flex items-center gap-2","rounded-md border border-input bg-background px-3 py-2 text-sm font-ui text-foreground","ring-offset-background","transition-[border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"min-h-8 text-xs",md:"min-h-10",lg:"min-h-11 text-base"},isError:{true:"border-destructive focus-visible:ring-destructive",false:""}},defaultVariants:{size:"md",isError:!1}}),Vp=f.forwardRef(({options:e,value:t,defaultValue:n,onValueChange:r,placeholder:o="Select…",searchPlaceholder:a="Search…",emptyMessage:s="No results found.",size:i,isError:l,disabled:u,className:p},d)=>{const h=t!==void 0,[g,w]=f.useState(n??[]),m=t??g,[v,b]=f.useState(!1),[y,x]=f.useState("");function k(M){b(M),M||x("")}function E(M){const D=m.includes(M)?m.filter(I=>I!==M):[...m,M];h||w(D),r==null||r(D)}function C(M){const D=m.filter(I=>I!==M);h||w(D),r==null||r(D)}const N=f.useMemo(()=>e.filter(M=>m.includes(M.value)),[e,m]);return c.jsxs(sn,{open:v,onOpenChange:k,children:[c.jsx(hr,{asChild:!0,children:c.jsxs("button",{ref:d,type:"button",disabled:u,"aria-expanded":v,"aria-haspopup":"listbox","aria-invalid":l||void 0,className:P(Hp({size:i,isError:l}),p),children:[c.jsx("span",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:m.length>0?N.map(M=>c.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded-sm bg-accent px-1.5 py-0.5 font-ui text-xs font-medium text-accent-foreground",children:[M.label,c.jsx("span",{role:"button",tabIndex:u?-1:0,"aria-label":`Remove ${M.label}`,onClick:D=>{D.stopPropagation(),C(M.value)},onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),D.stopPropagation(),C(M.value))},className:"ml-0.5 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:c.jsx(tn,{className:"size-3","aria-hidden":!0})})]},M.value)):c.jsx("span",{className:"text-muted-foreground",children:o})}),c.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0})]})}),c.jsx(jt,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",sideOffset:4,children:c.jsxs(lr,{className:"w-full",children:[c.jsx("div",{className:"border-b border-border",children:c.jsx(fo,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:a,value:y,onValueChange:x})}),c.jsxs(po,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(ho,{className:"py-6 text-center text-sm text-muted-foreground",children:s}),e.map(M=>c.jsxs(uo,{value:M.label,disabled:M.disabled,className:P("relative flex w-full cursor-pointer items-center rounded py-1.5 pr-2 pl-8 text-sm select-none","transition-colors duration-100 outline-none","aria-selected:bg-accent aria-selected:text-accent-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"),onSelect:()=>E(M.value),children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:m.includes(M.value)&&c.jsx(yn,{className:"size-4","aria-hidden":!0})}),M.label]},M.value))]})]})})]})});Vp.displayName="MultiSelect";const Yp=Ce(["w-full appearance-none rounded-md border border-input bg-background pr-9","font-ui text-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-4 text-base"}},defaultVariants:{size:"md"}}),Gp=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>c.jsxs("div",{className:"group relative w-full",children:[c.jsx("select",{ref:a,className:P(Yp({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...o,children:r}),c.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground group-has-[select:disabled]:opacity-50 [&_svg]:size-4",children:c.jsx(Mt,{})})]}));Gp.displayName="NativeSelect";const jp=Ce(["flex w-full overflow-hidden rounded-md border border-input bg-background","font-body text-foreground","transition-[border-color,box-shadow]","focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background"],{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"}},defaultVariants:{size:"md"}}),Up=f.forwardRef(({className:e,size:t,isError:n,min:r,max:o,step:a,disabled:s,...i},l)=>{const u=f.useRef(null),p=f.useCallback(g=>{u.current=g,typeof l=="function"?l(g):l&&(l.current=g)},[l]),d=g=>{var x;const w=u.current;if(!w)return;const m=parseFloat(w.value)||0,v=Number(a??1);let b=m+g*v;o!==void 0&&(b=Math.min(b,Number(o))),r!==void 0&&(b=Math.max(b,Number(r)));const y=(x=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:x.set;y==null||y.call(w,String(b)),w.dispatchEvent(new Event("input",{bubbles:!0}))},h=t==="sm"?"size-2.5":"size-3";return c.jsxs("div",{className:P(jp({size:t}),n&&"border-destructive focus-within:ring-destructive",s&&"cursor-not-allowed opacity-50",e),children:[c.jsx("input",{ref:p,type:"number",min:r,max:o,step:a,disabled:s,"aria-invalid":n||void 0,className:P("min-w-0 flex-1 border-0 bg-transparent py-0 focus:outline-none","tabular-nums appearance-none","[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",t==="sm"?"px-3":"px-4"),...i}),c.jsxs("div",{className:"flex shrink-0 flex-col border-l border-input",children:[c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increment",disabled:s,onClick:()=>d(1),className:P("flex flex-1 items-center justify-center px-2","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(Zr,{"aria-hidden":"true",className:h})}),c.jsx("div",{"aria-hidden":"true",className:"border-t border-input"}),c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:s,onClick:()=>d(-1),className:P("flex flex-1 items-center justify-center px-2","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(Mt,{"aria-hidden":"true",className:h})})]})]})});Up.displayName="NumberInput";const Rp=Ce(["flex items-center justify-center rounded-md border border-input bg-background","font-ui text-center font-medium tabular-nums","transition-[border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg"}},defaultVariants:{size:"md"}}),Kp=f.forwardRef(({length:e=6,value:t,defaultValue:n,onChange:r,isError:o,disabled:a,size:s,className:i},l)=>{const u=t!==void 0,[p,d]=f.useState(n??""),h=t??p,g=Array.from({length:e},(N,M)=>h[M]??""),w=f.useRef([]),m=f.useMemo(()=>Array.from({length:e},(N,M)=>D=>{w.current[M]=D,M===0&&(typeof l=="function"?l(D):l&&(l.current=D))}),[e,l]),v=f.useRef(!1),b=N=>{var M;v.current=!0,(M=w.current[N])==null||M.focus()},y=N=>{const M=N.join("").slice(0,e);u||d(M),r==null||r(M)},x=(N,M)=>{const D=M.target.value,I=[...g];I[N]=D,y(I),D&&N<e-1&&b(N+1)},k=(N,M)=>{if(M.key==="Backspace"){M.preventDefault();const D=[...g];D[N]?(D[N]="",y(D)):N>0&&(D[N-1]="",y(D),b(N-1))}else M.key==="ArrowLeft"?(M.preventDefault(),N>0&&b(N-1)):M.key==="ArrowRight"&&(M.preventDefault(),N<e-1&&b(N+1))},E=N=>{N.preventDefault();const M=N.clipboardData.getData("text").replace(/\D/g,"").slice(0,e),D=Array.from({length:e},(I,R)=>M[R]??"");y(D),b(Math.min(M.length,e-1))},C=(N,M)=>{if(v.current){v.current=!1,M.target.select();return}const D=g.findIndex(I=>!I);if(D!==-1&&N>D){b(D);return}M.target.select()};return c.jsx("div",{role:"group","aria-label":"One-time password",className:P("flex gap-2",i),children:g.map((N,M)=>c.jsx("input",{ref:m[M],type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,value:N,disabled:a,"aria-label":`Digit ${M+1} of ${e}`,"aria-invalid":o||void 0,className:P(Rp({size:s}),o&&"border-destructive focus-visible:ring-destructive"),onChange:D=>x(M,D),onKeyDown:D=>k(M,D),onPaste:E,onFocus:D=>C(M,D)},M))})});Kp.displayName="OTPInput";const qp=f.forwardRef(({className:e,value:t,...n},r)=>{const o=t===void 0,a=o?0:Math.min(100,Math.max(0,t));return c.jsx("div",{ref:r,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?void 0:a,className:P("relative h-2 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o?c.jsx("div",{className:"absolute h-full w-1/2 animate-progress-indeterminate rounded-full bg-primary"}):c.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-300 ease-out",style:{width:`${a}%`}})})});qp.displayName="Progress";const ui=f.createContext({}),Xp=Ce(["peer appearance-none rounded-full border border-input bg-background cursor-pointer","checked:bg-primary checked:border-primary","transition-[color,border-color,background-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Z1=Ce(["pointer-events-none absolute rounded-full bg-primary-foreground","opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"}},defaultVariants:{size:"md"}}),Zp=f.forwardRef(({className:e,size:t,isError:n,name:r,...o},a)=>{const s=f.use(ui);return c.jsxs("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[c.jsx("input",{type:"radio",ref:a,name:r??s.name,className:P(Xp({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...o}),c.jsx("span",{"aria-hidden":"true",className:Z1({size:t})})]})});Zp.displayName="Radio";const Qp=Ce("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),Jp=f.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>c.jsx(ui,{value:{name:t},children:c.jsx("div",{ref:a,role:"radiogroup",className:P(Qp({orientation:n}),e),...o,children:r})}));Jp.displayName="RadioGroup";const eh=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>c.jsx("div",{ref:o,role:n?"none":"separator","aria-orientation":n?void 0:t,className:P("shrink-0 bg-border",t==="horizontal"?"h-px w-full":"h-full w-px",e),...r}));eh.displayName="Separator";const th=Ce(["rounded-full bg-input transition-[background-color]","peer-checked:bg-primary","peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background","peer-disabled:opacity-50"],{variants:{size:{sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),Q1=Ce(["absolute top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm","transition-[translate]","peer-disabled:opacity-50"],{variants:{size:{sm:"left-0.5 size-3 peer-checked:translate-x-3",md:"left-0.5 size-4 peer-checked:translate-x-4",lg:"left-0.5 size-5 peer-checked:translate-x-5"}},defaultVariants:{size:"md"}}),nh=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>c.jsxs("span",{className:"relative inline-flex shrink-0 items-center",children:[c.jsx("input",{type:"checkbox",role:"switch",ref:o,className:P("peer absolute inset-0 z-10 cursor-pointer opacity-0","disabled:cursor-not-allowed",e),"aria-invalid":n||void 0,...r}),c.jsx("span",{"aria-hidden":"true",className:P(th({size:t}),n&&"ring-2 ring-destructive ring-offset-2 ring-offset-background",n&&"peer-focus-visible:ring-destructive")}),c.jsx("span",{"aria-hidden":"true",className:Q1({size:t})})]}));nh.displayName="Switch";var Ko="Tabs",[J1]=Ze(Ko,[Wo]),rh=Wo(),[eS,fi]=J1(Ko),oh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=tr(i),[d,h]=Qe({prop:r,onChange:o,defaultProp:a??"",caller:Ko});return c.jsx(eS,{scope:n,baseId:xe(),value:d,onValueChange:h,orientation:s,dir:p,activationMode:l,children:c.jsx(ne.div,{dir:p,"data-orientation":s,...u,ref:t})})});oh.displayName=Ko;var ah="TabsList",sh=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=fi(ah,n),s=rh(n);return c.jsx(Mu,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:c.jsx(ne.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});sh.displayName=ah;var ih="TabsTrigger",lh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=fi(ih,n),i=rh(n),l=uh(s.baseId,r),u=fh(s.baseId,r),p=r===s.value;return c.jsx(Du,{asChild:!0,...i,focusable:!o,active:p,children:c.jsx(ne.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:j(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:j(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const d=s.activationMode!=="manual";!p&&!o&&d&&s.onValueChange(r)})})})});lh.displayName=ih;var ch="TabsContent",dh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=fi(ch,n),l=uh(i.baseId,r),u=fh(i.baseId,r),p=r===i.value,d=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),c.jsx(Be,{present:o||p,children:({present:h})=>c.jsx(ne.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&a})})});dh.displayName=ch;function uh(e,t){return`${e}-trigger-${t}`}function fh(e,t){return`${e}-content-${t}`}var ph=oh,hh=sh,gh=lh,mh=dh;const pi=f.forwardRef(({className:e,...t},n)=>c.jsx(ph,{ref:n,className:P("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));pi.displayName=ph.displayName;const hi=f.forwardRef(({className:e,...t},n)=>c.jsx(hh,{ref:n,className:P("inline-flex items-center gap-1 rounded-lg bg-muted p-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:h-fit data-[orientation=vertical]:items-stretch",e),...t}));hi.displayName=hh.displayName;const gi=f.forwardRef(({className:e,...t},n)=>c.jsx(gh,{ref:n,className:P("inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-sm px-3 py-1.5 text-sm font-ui font-medium","text-muted-foreground select-none outline-none","transition-[color,background-color,box-shadow] duration-150","hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-muted","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm","data-[orientation=vertical]:justify-start","[&_svg]:size-4 [&_svg]:shrink-0",e),...t}));gi.displayName=gh.displayName;const mi=f.forwardRef(({className:e,...t},n)=>c.jsx(mh,{ref:n,className:P("mt-4 outline-none","group-data-[orientation=vertical]/tabs:mt-0 group-data-[orientation=vertical]/tabs:flex-1","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));mi.displayName=mh.displayName;const vh=({items:e,listClassName:t,className:n,...r})=>c.jsxs(pi,{className:n,...r,children:[c.jsx(hi,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>c.jsxs(gi,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>c.jsx(mi,{value:o,children:a},o))]});vh.displayName="Tabs";const bh=Ce(["w-full rounded-md border border-input bg-background","font-body text-foreground placeholder:text-muted-foreground","transition-[color,border-color,box-shadow]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background","resize-y","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","read-only:bg-muted read-only:cursor-default"],{variants:{size:{sm:"px-3 py-2 text-xs",md:"px-4 py-3 text-sm",lg:"px-4 py-4 text-base"}},defaultVariants:{size:"md"}}),yh=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>c.jsx("textarea",{ref:o,className:P(bh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));yh.displayName="Textarea";function tS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const nS=e=>{switch(e){case"success":return aS;case"info":return iS;case"warning":return sS;case"error":return lS;default:return null}},rS=Array(12).fill(0),oS=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},rS.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),aS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),sS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),iS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),lS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),cS=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dS=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let vi=1;class uS{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:vi++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],S.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(pS(u)&&!u.ok){a=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,w=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...w})}else if(u instanceof Error){a=!1;const d=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,w=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:h,...w})}else if(n.success!==void 0){a=!1;const d=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,w=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:h,...w})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const p=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!S.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:d,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,p)=>i.then(()=>s[0]==="reject"?p(s[1]):u(s[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||vi++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ze=new uS,fS=(e,t)=>{const n=(t==null?void 0:t.id)||vi++;return ze.addToast({title:e,...t,id:n}),n},pS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hS=fS,gS=()=>ze.toasts,mS=()=>ze.getActiveToasts(),vS=Object.assign(hS,{success:ze.success,info:ze.info,warning:ze.warning,error:ze.error,custom:ze.custom,message:ze.message,promise:ze.promise,dismiss:ze.dismiss,loading:ze.loading},{getHistory:gS,getToasts:mS});tS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function qo(e){return e.label!==void 0}const bS=3,yS="24px",wS="16px",wh=4e3,xS=356,CS=14,SS=45,NS=200;function Nt(...e){return e.filter(Boolean).join(" ")}function kS(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const MS=e=>{var t,n,r,o,a,s,i,l,u;const{invert:p,toast:d,unstyled:h,interacting:g,setHeights:w,visibleToasts:m,heights:v,index:b,toasts:y,expanded:x,removeToast:k,defaultRichColors:E,closeButton:C,style:N,cancelButtonStyle:M,actionButtonStyle:D,className:I="",descriptionClassName:R="",duration:z,position:q,gap:Y,expandByDefault:ae,classNames:B,icons:K,closeButtonAriaLabel:G="Close toast"}=e,[A,Q]=S.useState(null),[oe,_]=S.useState(null),[F,V]=S.useState(!1),[$,Z]=S.useState(!1),[W,U]=S.useState(!1),[X,se]=S.useState(!1),[de,ce]=S.useState(!1),[Me,Ee]=S.useState(0),[tt,Ue]=S.useState(0),Fe=S.useRef(d.duration||z||wh),Xt=S.useRef(null),De=S.useRef(null),$r=b===0,Br=b+1<=m,Oe=d.type,ft=d.dismissible!==!1,We=d.className||"",hn=d.descriptionClassName||"",Zt=S.useMemo(()=>v.findIndex(J=>J.toastId===d.id)||0,[v,d.id]),Un=S.useMemo(()=>{var J;return(J=d.closeButton)!=null?J:C},[d.closeButton,C]),kt=S.useMemo(()=>d.duration||z||wh,[d.duration,z]),Qt=S.useRef(0),Le=S.useRef(0),Rn=S.useRef(0),pt=S.useRef(null),[Kn,qn]=q.split("-"),ht=S.useMemo(()=>v.reduce((J,te,Ne)=>Ne>=Zt?J:J+te.height,0),[v,Zt]),Xn=dS(),Zn=d.invert||p,gn=Oe==="loading";Le.current=S.useMemo(()=>Zt*Y+ht,[Zt,ht]),S.useEffect(()=>{Fe.current=kt},[kt]),S.useEffect(()=>{V(!0)},[]),S.useEffect(()=>{const J=De.current;if(J){const te=J.getBoundingClientRect().height;return Ue(te),w(Ne=>[{toastId:d.id,height:te,position:d.position},...Ne]),()=>w(Ne=>Ne.filter(_e=>_e.toastId!==d.id))}},[w,d.id]),S.useLayoutEffect(()=>{if(!F)return;const J=De.current,te=J.style.height;J.style.height="auto";const Ne=J.getBoundingClientRect().height;J.style.height=te,Ue(Ne),w(_e=>_e.find(we=>we.toastId===d.id)?_e.map(we=>we.toastId===d.id?{...we,height:Ne}:we):[{toastId:d.id,height:Ne,position:d.position},..._e])},[F,d.title,d.description,w,d.id,d.jsx,d.action,d.cancel]);const Re=S.useCallback(()=>{Z(!0),Ee(Le.current),w(J=>J.filter(te=>te.toastId!==d.id)),setTimeout(()=>{k(d)},NS)},[d,k,w,Le]);S.useEffect(()=>{if(d.promise&&Oe==="loading"||d.duration===1/0||d.type==="loading")return;let J;return x||g||Xn?(()=>{if(Rn.current<Qt.current){const _e=new Date().getTime()-Qt.current;Fe.current=Fe.current-_e}Rn.current=new Date().getTime()})():(()=>{Fe.current!==1/0&&(Qt.current=new Date().getTime(),J=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Re()},Fe.current))})(),()=>clearTimeout(J)},[x,g,d,Oe,Xn,Re]),S.useEffect(()=>{d.delete&&(Re(),d.onDismiss==null||d.onDismiss.call(d,d))},[Re,d.delete]);function ie(){var J;if(K!=null&&K.loading){var te;return S.createElement("div",{className:Nt(B==null?void 0:B.loader,d==null||(te=d.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":Oe==="loading"},K.loading)}return S.createElement(oS,{className:Nt(B==null?void 0:B.loader,d==null||(J=d.classNames)==null?void 0:J.loader),visible:Oe==="loading"})}const pe=d.icon||(K==null?void 0:K[Oe])||nS(Oe);var re,ue;return S.createElement("li",{tabIndex:0,ref:De,className:Nt(I,We,B==null?void 0:B.toast,d==null||(t=d.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[Oe],d==null||(n=d.classNames)==null?void 0:n[Oe]),"data-sonner-toast":"","data-rich-colors":(re=d.richColors)!=null?re:E,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":F,"data-promise":!!d.promise,"data-swiped":de,"data-removed":$,"data-visible":Br,"data-y-position":Kn,"data-x-position":qn,"data-index":b,"data-front":$r,"data-swiping":W,"data-dismissible":ft,"data-type":Oe,"data-invert":Zn,"data-swipe-out":X,"data-swipe-direction":oe,"data-expanded":!!(x||ae&&F),"data-testid":d.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${$?Me:Le.current}px`,"--initial-height":ae?"auto":`${tt}px`,...N,...d.style},onDragEnd:()=>{U(!1),Q(null),pt.current=null},onPointerDown:J=>{J.button!==2&&(gn||!ft||(Xt.current=new Date,Ee(Le.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&(U(!0),pt.current={x:J.clientX,y:J.clientY})))},onPointerUp:()=>{var J,te,Ne;if(X||!ft)return;pt.current=null;const _e=Number(((J=De.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Jt=Number(((te=De.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((Ne=Xt.current)==null?void 0:Ne.getTime()),Te=A==="x"?_e:Jt,Qn=Math.abs(Te)/we;if(Math.abs(Te)>=SS||Qn>.11){Ee(Le.current),d.onDismiss==null||d.onDismiss.call(d,d),_(A==="x"?_e>0?"right":"left":Jt>0?"down":"up"),Re(),se(!0);return}else{var Ke,qe;(Ke=De.current)==null||Ke.style.setProperty("--swipe-amount-x","0px"),(qe=De.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}ce(!1),U(!1),Q(null)},onPointerMove:J=>{var te,Ne,_e;if(!pt.current||!ft||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;const we=J.clientY-pt.current.y,Te=J.clientX-pt.current.x;var Qn;const Ke=(Qn=e.swipeDirections)!=null?Qn:kS(q);!A&&(Math.abs(Te)>1||Math.abs(we)>1)&&Q(Math.abs(Te)>Math.abs(we)?"x":"y");let qe={x:0,y:0};const Qo=Wt=>1/(1.5+Math.abs(Wt)/20);if(A==="y"){if(Ke.includes("top")||Ke.includes("bottom"))if(Ke.includes("top")&&we<0||Ke.includes("bottom")&&we>0)qe.y=we;else{const Wt=we*Qo(we);qe.y=Math.abs(Wt)<Math.abs(we)?Wt:we}}else if(A==="x"&&(Ke.includes("left")||Ke.includes("right")))if(Ke.includes("left")&&Te<0||Ke.includes("right")&&Te>0)qe.x=Te;else{const Wt=Te*Qo(Te);qe.x=Math.abs(Wt)<Math.abs(Te)?Wt:Te}(Math.abs(qe.x)>0||Math.abs(qe.y)>0)&&ce(!0),(Ne=De.current)==null||Ne.style.setProperty("--swipe-amount-x",`${qe.x}px`),(_e=De.current)==null||_e.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Un&&!d.jsx&&Oe!=="loading"?S.createElement("button",{"aria-label":G,"data-disabled":gn,"data-close-button":!0,onClick:gn||!ft?()=>{}:()=>{Re(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Nt(B==null?void 0:B.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(ue=K==null?void 0:K.close)!=null?ue:cS):null,(Oe||d.icon||d.promise)&&d.icon!==null&&((K==null?void 0:K[Oe])!==null||d.icon)?S.createElement("div",{"data-icon":"",className:Nt(B==null?void 0:B.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||ie():null,d.type!=="loading"?pe:null):null,S.createElement("div",{"data-content":"",className:Nt(B==null?void 0:B.content,d==null||(a=d.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:Nt(B==null?void 0:B.title,d==null||(s=d.classNames)==null?void 0:s.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?S.createElement("div",{"data-description":"",className:Nt(R,hn,B==null?void 0:B.description,d==null||(i=d.classNames)==null?void 0:i.description)},typeof d.description=="function"?d.description():d.description):null),S.isValidElement(d.cancel)?d.cancel:d.cancel&&qo(d.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||M,onClick:J=>{qo(d.cancel)&&ft&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,J),Re())},className:Nt(B==null?void 0:B.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,S.isValidElement(d.action)?d.action:d.action&&qo(d.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||D,onClick:J=>{qo(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,J),!J.defaultPrevented&&Re())},className:Nt(B==null?void 0:B.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function xh(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function DS(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?wS:yS;function l(u){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const ES=S.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:d,theme:h="light",richColors:g,duration:w,style:m,visibleToasts:v=bS,toastOptions:b,dir:y=xh(),gap:x=CS,icons:k,containerAriaLabel:E="Notifications"}=t,[C,N]=S.useState([]),M=S.useMemo(()=>r?C.filter(F=>F.toasterId===r):C.filter(F=>!F.toasterId),[C,r]),D=S.useMemo(()=>Array.from(new Set([a].concat(M.filter(F=>F.position).map(F=>F.position)))),[M,a]),[I,R]=S.useState([]),[z,q]=S.useState(!1),[Y,ae]=S.useState(!1),[B,K]=S.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=S.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=S.useRef(null),oe=S.useRef(!1),_=S.useCallback(F=>{N(V=>{var $;return($=V.find(Z=>Z.id===F.id))!=null&&$.delete||ze.dismiss(F.id),V.filter(({id:Z})=>Z!==F.id)})},[]);return S.useEffect(()=>ze.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{N(V=>V.map($=>$.id===F.id?{...$,delete:!0}:$))});return}setTimeout(()=>{ra.flushSync(()=>{N(V=>{const $=V.findIndex(Z=>Z.id===F.id);return $!==-1?[...V.slice(0,$),{...V[$],...F},...V.slice($+1)]:[F,...V]})})})}),[C]),S.useEffect(()=>{if(h!=="system"){K(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:V})=>{K(V?"dark":"light")})}catch{F.addListener(({matches:$})=>{try{K($?"dark":"light")}catch(Z){console.error(Z)}})}},[h]),S.useEffect(()=>{C.length<=1&&q(!1)},[C]),S.useEffect(()=>{const F=V=>{var $;if(s.every(U=>V[U]||V.code===U)){var W;q(!0),(W=G.current)==null||W.focus()}V.code==="Escape"&&(document.activeElement===G.current||($=G.current)!=null&&$.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),S.useEffect(()=>{if(G.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,oe.current=!1)}},[G.current]),S.createElement("section",{ref:n,"aria-label":`${E} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((F,V)=>{var $;const[Z,W]=F.split("-");return M.length?S.createElement("ol",{key:F,dir:y==="auto"?xh():y,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":Z,"data-x-position":W,style:{"--front-toast-height":`${(($=I[0])==null?void 0:$.height)||0}px`,"--width":`${xS}px`,"--gap":`${x}px`,...m,...DS(p,d)},onBlur:U=>{oe.current&&!U.currentTarget.contains(U.relatedTarget)&&(oe.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||oe.current||(oe.current=!0,Q.current=U.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Y||q(!1)},onDragEnd:()=>q(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||ae(!0)},onPointerUp:()=>ae(!1)},M.filter(U=>!U.position&&V===0||U.position===F).map((U,X)=>{var se,de;return S.createElement(MS,{key:U.id,icons:k,index:X,toast:U,defaultRichColors:g,duration:(se=b==null?void 0:b.duration)!=null?se:w,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:o,visibleToasts:v,closeButton:(de=b==null?void 0:b.closeButton)!=null?de:l,interacting:Y,position:F,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:_,toasts:M.filter(ce=>ce.position==U.position),heights:I.filter(ce=>ce.position==U.position),setHeights:R,expandByDefault:i,gap:x,expanded:z,swipeDirections:t.swipeDirections})})):null}))}),Ch=({toastOptions:e,...t})=>{var n;return c.jsx(ES,{theme:"light",richColors:!0,position:"top-center",closeButton:!0,toastOptions:{...e,classNames:{...e==null?void 0:e.classNames,toast:`shadow-lg ${((n=e==null?void 0:e.classNames)==null?void 0:n.toast)??""}`.trim()}},...t})};Ch.displayName="Toaster";var[Xo]=Ze("Tooltip",[Yt]),Zo=Yt(),Sh="TooltipProvider",TS=700,bi="tooltip.open",[PS,yi]=Xo(Sh),Nh=e=>{const{__scopeTooltip:t,delayDuration:n=TS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(PS,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Nh.displayName=Sh;var Fr="Tooltip",[OS,Wr]=Xo(Fr),kh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=yi(Fr,e.__scopeTooltip),u=Zo(t),[p,d]=f.useState(null),h=xe(),g=f.useRef(0),w=s??l.disableHoverableContent,m=i??l.delayDuration,v=f.useRef(!1),[b,y]=Qe({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(bi))):l.onClose(),a==null||a(N)},caller:Fr}),x=f.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),k=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),E=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),C=f.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},m)},[m,y]);return f.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),c.jsx(ur,{...u,children:c.jsx(OS,{scope:t,contentId:h,open:b,stateAttribute:x,trigger:p,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?C():k()},[l.isOpenDelayedRef,C,k]),onTriggerLeave:f.useCallback(()=>{w?E():(window.clearTimeout(g.current),g.current=0)},[E,w]),onOpen:k,onClose:E,disableHoverableContent:w,children:n})})};kh.displayName=Fr;var wi="TooltipTrigger",Mh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Wr(wi,n),a=yi(wi,n),s=Zo(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),d=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.jsx(fr,{asChild:!0,...s,children:c.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:j(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:j(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:j(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:j(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});Mh.displayName=wi;var xi="TooltipPortal",[_S,IS]=Xo(xi,{forceMount:void 0}),Dh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Wr(xi,t);return c.jsx(_S,{scope:t,forceMount:n,children:c.jsx(Be,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};Dh.displayName=xi;var jn="TooltipContent",Eh=f.forwardRef((e,t)=>{const n=IS(jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Wr(jn,e.__scopeTooltip);return c.jsx(Be,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Th,{side:o,...a,ref:t}):c.jsx(AS,{side:o,...a,ref:t})})}),AS=f.forwardRef((e,t)=>{const n=Wr(jn,e.__scopeTooltip),r=yi(jn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=n,p=o.current,{onPointerInTransitChange:d}=r,h=f.useCallback(()=>{i(null),d(!1)},[d]),g=f.useCallback((w,m)=>{const v=w.currentTarget,b={x:w.clientX,y:w.clientY},y=zS(b,v.getBoundingClientRect()),x=LS(b,y),k=HS(m.getBoundingClientRect()),E=YS([...x,...k]);i(E),d(!0)},[d]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&p){const w=v=>g(v,p),m=v=>g(v,l);return l.addEventListener("pointerleave",w),p.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",m)}}},[l,p,g,h]),f.useEffect(()=>{if(s){const w=m=>{const v=m.target,b={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),x=!VS(b,s);y?h():x&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,p,s,u,h]),c.jsx(Th,{...e,ref:a})}),[FS,WS]=Xo(Fr,{isInside:!1}),$S=Xh("TooltipContent"),Th=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Wr(jn,n),u=Zo(n),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(bi,p),()=>document.removeEventListener(bi,p)),[p]),f.useEffect(()=>{if(l.trigger){const d=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&p()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,p]),c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:p,children:c.jsxs(Mo,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx($S,{children:r}),c.jsx(FS,{scope:n,isInside:!0,children:c.jsx(Qy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Eh.displayName=jn;var Ph="TooltipArrow",BS=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Zo(n);return WS(Ph,n).isInside?null:c.jsx(Do,{...o,...r,ref:t})});BS.displayName=Ph;function zS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function LS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function HS(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function VS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,d=l.x,h=l.y;p>r!=h>r&&n<(d-u)*(r-p)/(h-p)+u&&(o=!o)}return o}function YS(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),GS(t)}function GS(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var jS=Nh,US=kh,RS=Mh,KS=Dh,Oh=Eh;const qS=jS,_h=US,Ih=RS,Ci=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(KS,{children:c.jsx(Oh,{ref:r,sideOffset:t,className:P("z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 shadow-md","text-xs font-body text-background font-medium","origin-(--radix-tooltip-content-transform-origin)","data-[state=delayed-open]:animate-tooltip-in","data-[state=instant-open]:animate-tooltip-in","data-[state=closed]:animate-tooltip-out",e),...n})}));Ci.displayName=Oh.displayName;const Ah=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>c.jsxs(_h,{...a,children:[c.jsx(Ih,{asChild:!0,children:t}),c.jsx(Ci,{side:n,align:r,sideOffset:o,children:e})]});Ah.displayName="Tooltip",T.Accordion=hl,T.AccordionContent=va,T.AccordionItem=ga,T.AccordionRoot=ha,T.AccordionTrigger=ma,T.Alert=ml,T.AlertDescription=bl,T.AlertTitle=vl,T.AspectRatio=xl,T.Avatar=Sl,T.Badge=kl,T.Button=Sn,T.Calendar=oi,T.Checkbox=El,T.ComboBox=Td,T.ComboBoxContent=Sd,T.ComboBoxEmpty=kd,T.ComboBoxGroup=Md,T.ComboBoxItem=Nd,T.ComboBoxRoot=Ed,T.ComboBoxSeparator=Dd,T.ComboBoxTrigger=Ja,T.ComboBoxTriggerVariants=Cd,T.DATA_TABLE_EXPAND_COLUMN_ID=It,T.DataTable=Wf,T.DataTableColumnHeader=$f,T.DatePicker=Pp,T.DatePickerContent=Tp,T.DatePickerRoot=Ep,T.DatePickerTrigger=ri,T.Dialog=Fp,T.DialogClose=Ip,T.DialogContent=si,T.DialogDescription=di,T.DialogFooter=li,T.DialogHeader=ii,T.DialogOverlay=ai,T.DialogPortal=Ap,T.DialogRoot=Op,T.DialogTitle=ci,T.DialogTrigger=_p,T.DropdownMenu=Tf,T.DropdownMenuCheckboxItem=Ls,T.DropdownMenuContent=Nr,T.DropdownMenuGroup=Kx,T.DropdownMenuItem=_t,T.DropdownMenuLabel=kr,T.DropdownMenuPortal=qx,T.DropdownMenuRadioGroup=Ef,T.DropdownMenuRadioItem=Hs,T.DropdownMenuRoot=Ho,T.DropdownMenuSeparator=Bn,T.DropdownMenuSub=zs,T.DropdownMenuSubContent=Go,T.DropdownMenuSubTrigger=Yo,T.DropdownMenuTrigger=Vo,T.Field=Wp,T.FieldMessage=Bp,T.FileUpload=Lp,T.Input=gr,T.InputAddon=cs,T.InputGroup=ls,T.Label=$p,T.MultiSelect=Vp,T.NativeSelect=Gp,T.NumberInput=Up,T.OTPInput=Kp,T.Pagination=ms,T.PaginationEllipsis=gs,T.PaginationItem=fs,T.PaginationNext=hs,T.PaginationPrev=ps,T.PaginationRoot=ds,T.Popover=xd,T.PopoverAnchor=Gy,T.PopoverClose=Yy,T.PopoverContent=jt,T.PopoverRoot=sn,T.PopoverTrigger=hr,T.Progress=qp,T.Radio=Zp,T.RadioGroup=Jp,T.RadioGroupContext=ui,T.STRING_COLUMN_FILTER_OPTIONS=ts,T.Select=wu,T.SelectContent=Fo,T.SelectGroup=Dw,T.SelectItem=Ds,T.SelectLabel=bu,T.SelectRoot=Ss,T.SelectScrollDownButton=Ms,T.SelectScrollUpButton=ks,T.SelectSeparator=yu,T.SelectTrigger=Ao,T.SelectValue=Ns,T.Separator=eh,T.Skeleton=is,T.Switch=nh,T.Table=rs,T.TableBody=as,T.TableCaption=Pd,T.TableCell=ln,T.TableFooter=ss,T.TableHead=To,T.TableHeader=os,T.TableRow=Ot,T.Tabs=vh,T.TabsContent=mi,T.TabsList=hi,T.TabsRoot=pi,T.TabsTrigger=gi,T.Textarea=yh,T.Toaster=Ch,T.Tooltip=Ah,T.TooltipContent=Ci,T.TooltipProvider=qS,T.TooltipRoot=_h,T.TooltipTrigger=Ih,T.accordionContentVariants=fl,T.accordionRootVariants=pl,T.accordionTriggerVariants=ul,T.alertVariants=gl,T.avatarVariants=Cl,T.badgeVariants=Nl,T.bookersStringFilter=ns,T.buttonVariants=Ml,T.checkboxVariants=Dl,T.cn=P,T.dataTableColumnHeaderMeta=r0,T.datePickerTriggerVariants=Dp,T.formatBytes=zp,T.inputVariants=_d,T.multiSelectTriggerVariants=Hp,T.nativeSelectVariants=Yp,T.numberInputVariants=jp,T.otpSlotVariants=Rp,T.radioGroupVariants=Qp,T.radioVariants=Xp,T.selectTriggerVariants=vu,T.switchTrackVariants=th,T.textareaVariants=bh,T.toast=vS,T.useDataTableTable=Of,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));