@bookers/ui 0.6.0 → 0.8.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.
- package/dist/index.d.ts +16 -3
- package/dist/index.js +3301 -3210
- package/dist/index.umd.cjs +32 -32
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
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,oa,He,Zh){"use strict";function Ii(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=Ii(S),jr=Ii(oa);function Qh(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,Jh(o,...t)]}function Jh(...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 Ai(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=Ai(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():Ai(e[o],null)}}}}function he(...e){return f.useCallback(mt(...e),e)}function tn(e){const t=eg(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(ng);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 eg(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=og(o),i=rg(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 Fi=Symbol("radix.slottable");function tg(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Fi,t}function ng(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fi}function rg(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 og(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 Ur(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=tn(i),u=S.forwardRef((m,v)=>{const{scope:b,children:y}=m,x=a(i,b),N=he(v,x.collectionRef);return c.jsx(l,{ref:N,children:y})});u.displayName=i;const p=e+"CollectionItemSlot",d="data-radix-collection-item",h=tn(p),g=S.forwardRef((m,v)=>{const{scope:b,children:y,...x}=m,N=S.useRef(null),M=he(v,N),C=a(p,b);return S.useEffect(()=>(C.itemMap.set(N,{ref:N,...x}),()=>void C.itemMap.delete(N))),c.jsx(h,{[d]:"",ref:M,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,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:()=>{},ag=f[" useInsertionEffect ".trim().toString()]||Pe;function Qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=sg({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=ig(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 sg({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return ag(()=>{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 ig(e){return typeof e=="function"}var lg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=lg.reduce((e,t)=>{const n=tn(`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 Wi(e,t){e&&jr.flushSync(()=>e.dispatchEvent(t))}function cg(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Be=e=>{const{present:t,children:n}=e,r=dg(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,ug(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};Be.displayName="Presence";function dg(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=cg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Rr(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=Rr(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=Rr(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=Rr(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 Rr(e){return(e==null?void 0:e.animationName)||"none"}function ug(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 fg=f[" useId ".trim().toString()]||(()=>{}),pg=0;function xe(e){const[t,n]=f.useState(fg());return Pe(()=>{n(r=>r??String(pg++))},[e]),t?`radix-${t}`:""}var Kr="Collapsible",[hg,$i]=Ze(Kr),[gg,aa]=hg(Kr),Bi=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:Kr});return c.jsx(gg,{scope:n,disabled:a,contentId:xe(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:c.jsx(ne.div,{"data-state":ia(l),"data-disabled":a?"":void 0,...i,ref:t})})});Bi.displayName=Kr;var zi="CollapsibleTrigger",Li=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=aa(zi,n);return c.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ia(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:j(e.onClick,o.onOpenToggle)})});Li.displayName=zi;var sa="CollapsibleContent",Hi=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=aa(sa,e.__scopeCollapsible);return c.jsx(Be,{present:n||o.open,children:({present:a})=>c.jsx(mg,{...r,ref:t,present:a})})});Hi.displayName=sa;var mg=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=aa(sa,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":ia(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 ia(e){return e?"open":"closed"}var vg=Bi,bg=Li,yg=Hi,wg=f.createContext(void 0);function tr(e){const t=f.useContext(wg);return e||t||"ltr"}var rt="Accordion",xg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[la,Cg,Sg]=Ur(rt),[qr]=Ze(rt,[Sg,$i]),ca=$i(),Vi=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return c.jsx(la.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?c.jsx(Dg,{...a,ref:t}):c.jsx(Mg,{...o,ref:t})})});Vi.displayName=rt;var[Yi,Ng]=qr(rt),[Gi,kg]=qr(rt,{collapsible:!1}),Mg=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(Yi,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:S.useCallback(()=>a&&l(""),[a,l]),children:c.jsx(Gi,{scope:e.__scopeAccordion,collapsible:a,children:c.jsx(ji,{...s,ref:t})})})}),Dg=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(Yi,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:c.jsx(Gi,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(ji,{...a,ref:t})})})}),[Eg,Xr]=qr(rt),ji=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),d=tr(o)==="ltr",h=j(e.onKeyDown,g=>{var D;if(!xg.includes(g.key))return;const w=g.target,m=u().filter(E=>{var I;return!((I=E.ref.current)!=null&&I.disabled)}),v=m.findIndex(E=>E.ref.current===w),b=m.length;if(v===-1)return;g.preventDefault();let y=v;const x=0,N=b-1,M=()=>{y=v+1,y>N&&(y=x)},C=()=>{y=v-1,y<x&&(y=N)};switch(g.key){case"Home":y=x;break;case"End":y=N;break;case"ArrowRight":a==="horizontal"&&(d?M():C());break;case"ArrowDown":a==="vertical"&&M();break;case"ArrowLeft":a==="horizontal"&&(d?C():M());break;case"ArrowUp":a==="vertical"&&C();break}const k=y%b;(D=m[k].ref.current)==null||D.focus()});return c.jsx(Eg,{scope:n,disabled:r,direction:o,orientation:a,children:c.jsx(la.Slot,{scope:n,children:c.jsx(ne.div,{...s,"data-orientation":a,ref:l,onKeyDown:r?void 0:h})})})}),Zr="AccordionItem",[Tg,da]=qr(Zr),Ui=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Xr(Zr,n),s=Ng(Zr,n),i=ca(n),l=xe(),u=r&&s.value.includes(r)||!1,p=a.disabled||e.disabled;return c.jsx(Tg,{scope:n,open:u,disabled:p,triggerId:l,children:c.jsx(vg,{"data-orientation":a.orientation,"data-state":Qi(u),...i,...o,ref:t,disabled:p,open:u,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})})});Ui.displayName=Zr;var Ri="AccordionHeader",Ki=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(Ri,n);return c.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Qi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Ki.displayName=Ri;var ua="AccordionTrigger",qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(ua,n),s=kg(ua,n),i=ca(n);return c.jsx(la.ItemSlot,{scope:n,children:c.jsx(bg,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});qi.displayName=ua;var Xi="AccordionContent",Zi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(Xi,n),s=ca(n);return c.jsx(yg,{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}})});Zi.displayName=Xi;function Qi(e){return e?"open":"closed"}var Pg=Vi,_g=Ui,Og=Ki,Ig=qi,Ag=Zi;/**
|
|
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,oa,He,Qh){"use strict";function Ai(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=Ai(S),jr=Ai(oa);function Jh(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 d=u=>{var b;const{scope:h,children:g,...w}=u,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})};d.displayName=a+"Provider";function p(u,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(`\`${u}\` must be used within \`${a}\``)}return[d,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,eg(o,...t)]}function eg(...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:d})=>{const u=l(a)[`__scope${d}`];return{...i,...u}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Fi(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=Fi(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():Fi(e[o],null)}}}}function he(...e){return f.useCallback(mt(...e),e)}function tn(e){const t=tg(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(rg);if(l){const d=l.props.children,p=i.map(u=>u===l?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return c.jsx(t,{...s,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return c.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function tg(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=ag(o),i=og(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 Wi=Symbol("radix.slottable");function ng(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Wi,t}function rg(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wi}function og(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 ag(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 Ur(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=tn(i),d=S.forwardRef((m,v)=>{const{scope:b,children:y}=m,x=a(i,b),N=he(v,x.collectionRef);return c.jsx(l,{ref:N,children:y})});d.displayName=i;const p=e+"CollectionItemSlot",u="data-radix-collection-item",h=tn(p),g=S.forwardRef((m,v)=>{const{scope:b,children:y,...x}=m,N=S.useRef(null),M=he(v,N),C=a(p,b);return S.useEffect(()=>(C.itemMap.set(N,{ref:N,...x}),()=>void C.itemMap.delete(N))),c.jsx(h,{[u]:"",ref:M,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(`[${u}]`));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:d,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:()=>{},sg=f[" useInsertionEffect ".trim().toString()]||Pe;function Qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=ig({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const u=p.current;u!==i&&console.warn(`${r} is changing from ${u?"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 d=f.useCallback(p=>{var u;if(i){const h=lg(p)?p(e):p;h!==e&&((u=s.current)==null||u.call(s,h))}else a(p)},[i,e,a,s]);return[l,d]}function ig({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return sg(()=>{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 lg(e){return typeof e=="function"}var cg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=cg.reduce((e,t)=>{const n=tn(`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 $i(e,t){e&&jr.flushSync(()=>e.dispatchEvent(t))}function dg(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ze=e=>{const{present:t,children:n}=e,r=ug(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,fg(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};ze.displayName="Presence";function ug(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=dg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=Rr(r.current);a.current=i==="mounted"?d:"none"},[i]),Pe(()=>{const d=r.current,p=o.current;if(p!==e){const h=a.current,g=Rr(d);e?l("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,u=g=>{const m=Rr(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",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Rr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Rr(e){return(e==null?void 0:e.animationName)||"none"}function fg(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 pg=f[" useId ".trim().toString()]||(()=>{}),hg=0;function Ce(e){const[t,n]=f.useState(pg());return Pe(()=>{n(r=>r??String(hg++))},[e]),t?`radix-${t}`:""}var Kr="Collapsible",[gg,zi]=Ze(Kr),[mg,aa]=gg(Kr),Bi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,d]=Qe({prop:r,defaultProp:o??!1,onChange:s,caller:Kr});return c.jsx(mg,{scope:n,disabled:a,contentId:Ce(),open:l,onOpenToggle:f.useCallback(()=>d(p=>!p),[d]),children:c.jsx(ne.div,{"data-state":ia(l),"data-disabled":a?"":void 0,...i,ref:t})})});Bi.displayName=Kr;var Li="CollapsibleTrigger",Hi=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=aa(Li,n);return c.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ia(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:j(e.onClick,o.onOpenToggle)})});Hi.displayName=Li;var sa="CollapsibleContent",Vi=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=aa(sa,e.__scopeCollapsible);return c.jsx(ze,{present:n||o.open,children:({present:a})=>c.jsx(vg,{...r,ref:t,present:a})})});Vi.displayName=sa;var vg=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=aa(sa,n),[i,l]=f.useState(r),d=f.useRef(null),p=he(t,d),u=f.useRef(0),h=u.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=d.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();u.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":ia(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 ia(e){return e?"open":"closed"}var bg=Bi,yg=Hi,wg=Vi,xg=f.createContext(void 0);function tr(e){const t=f.useContext(xg);return e||t||"ltr"}var rt="Accordion",Cg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[la,Sg,Ng]=Ur(rt),[qr]=Ze(rt,[Ng,zi]),ca=zi(),Yi=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return c.jsx(la.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?c.jsx(Eg,{...a,ref:t}):c.jsx(Dg,{...o,ref:t})})});Yi.displayName=rt;var[Gi,kg]=qr(rt),[ji,Mg]=qr(rt,{collapsible:!1}),Dg=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(Gi,{scope:e.__scopeAccordion,value:S.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:S.useCallback(()=>a&&l(""),[a,l]),children:c.jsx(ji,{scope:e.__scopeAccordion,collapsible:a,children:c.jsx(Ui,{...s,ref:t})})})}),Eg=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((u=[])=>[...u,p]),[i]),d=S.useCallback(p=>i((u=[])=>u.filter(h=>h!==p)),[i]);return c.jsx(Gi,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:d,children:c.jsx(ji,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(Ui,{...a,ref:t})})})}),[Tg,Xr]=qr(rt),Ui=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),l=he(i,t),d=Sg(n),u=tr(o)==="ltr",h=j(e.onKeyDown,g=>{var D;if(!Cg.includes(g.key))return;const w=g.target,m=d().filter(E=>{var I;return!((I=E.ref.current)!=null&&I.disabled)}),v=m.findIndex(E=>E.ref.current===w),b=m.length;if(v===-1)return;g.preventDefault();let y=v;const x=0,N=b-1,M=()=>{y=v+1,y>N&&(y=x)},C=()=>{y=v-1,y<x&&(y=N)};switch(g.key){case"Home":y=x;break;case"End":y=N;break;case"ArrowRight":a==="horizontal"&&(u?M():C());break;case"ArrowDown":a==="vertical"&&M();break;case"ArrowLeft":a==="horizontal"&&(u?C():M());break;case"ArrowUp":a==="vertical"&&C();break}const k=y%b;(D=m[k].ref.current)==null||D.focus()});return c.jsx(Tg,{scope:n,disabled:r,direction:o,orientation:a,children:c.jsx(la.Slot,{scope:n,children:c.jsx(ne.div,{...s,"data-orientation":a,ref:l,onKeyDown:r?void 0:h})})})}),Zr="AccordionItem",[Pg,da]=qr(Zr),Ri=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Xr(Zr,n),s=kg(Zr,n),i=ca(n),l=Ce(),d=r&&s.value.includes(r)||!1,p=a.disabled||e.disabled;return c.jsx(Pg,{scope:n,open:d,disabled:p,triggerId:l,children:c.jsx(bg,{"data-orientation":a.orientation,"data-state":Ji(d),...i,...o,ref:t,disabled:p,open:d,onOpenChange:u=>{u?s.onItemOpen(r):s.onItemClose(r)}})})});Ri.displayName=Zr;var Ki="AccordionHeader",qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(Ki,n);return c.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Ji(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});qi.displayName=Ki;var ua="AccordionTrigger",Xi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(ua,n),s=Mg(ua,n),i=ca(n);return c.jsx(la.ItemSlot,{scope:n,children:c.jsx(yg,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});Xi.displayName=ua;var Zi="AccordionContent",Qi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Xr(rt,n),a=da(Zi,n),s=ca(n);return c.jsx(wg,{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=Zi;function Ji(e){return e?"open":"closed"}var _g=Yi,Og=Ri,Ig=qi,Ag=Xi,Fg=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
|
|
6
|
+
*/const Wg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),el=(...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
|
|
11
|
+
*/var $g={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
|
|
16
|
+
*/const zg=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,...$g,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:el("lucide",o),...i},[...s.map(([d,p])=>S.createElement(d,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 me=(e,t)=>{const n=S.forwardRef(({className:r,...o},a)=>S.createElement(
|
|
21
|
+
*/const me=(e,t)=>{const n=S.forwardRef(({className:r,...o},a)=>S.createElement(zg,{ref:a,iconNode:t,className:el(`lucide-${Wg(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.
|
|
@@ -28,12 +28,12 @@
|
|
|
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
|
|
31
|
+
*/const Lg=me("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
|
|
36
|
+
*/const Hg=me("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.
|
|
@@ -48,7 +48,7 @@
|
|
|
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
|
|
51
|
+
*/const tl=me("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.
|
|
@@ -63,72 +63,72 @@
|
|
|
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
|
|
66
|
+
*/const Vg=me("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
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
|
|
71
|
+
*/const Yg=me("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
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
|
|
76
|
+
*/const Gg=me("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
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
|
|
81
|
+
*/const jg=me("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
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
|
|
86
|
+
*/const Ug=me("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"}]]);/**
|
|
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
|
|
91
|
+
*/const Rg=me("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"}]]);/**
|
|
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
|
|
96
|
+
*/const Kg=me("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"}]]);/**
|
|
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
|
|
101
|
+
*/const qg=me("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"}]]);/**
|
|
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
|
|
106
|
+
*/const Xg=me("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"}]]);/**
|
|
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
|
|
111
|
+
*/const Zg=me("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"}]]);/**
|
|
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
|
|
116
|
+
*/const Qg=me("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"}]]);/**
|
|
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
|
|
121
|
+
*/const Jg=me("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"}]]);/**
|
|
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
|
|
126
|
+
*/const em=me("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
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
|
|
131
|
+
*/const tm=me("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"}]]);/**
|
|
132
132
|
* @license lucide-react v0.475.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
@@ -138,28 +138,28 @@
|
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const nl=me("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
142
142
|
* @license lucide-react v0.475.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const nm=me("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"}]]);/**
|
|
147
147
|
* @license lucide-react v0.475.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const rm=me("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"}]]);/**
|
|
152
152
|
* @license lucide-react v0.475.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const om=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
157
157
|
* @license lucide-react v0.475.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const $t=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function nl(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=nl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=nl(e))&&(r&&(r+=" "),r+=t);return r}const ol=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,al=rl,Ce=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return al(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=ol(p)||ol(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 al(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},pa="-",om=e=>{const t=sm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(pa);return i[0]===""&&i.length!==1&&i.shift(),sl(i,t)||am(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},sl=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?sl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(pa);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},il=/^\[(.+)\]$/,am=e=>{if(il.test(e)){const t=il.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sm=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return lm(Object.entries(e.classGroups),n).forEach(([a,s])=>{ha(s,r,a,t)}),r},ha=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:ll(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(im(o)){ha(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{ha(s,ll(t,a),n,r)})})},ll=(e,t)=>{let n=e;return t.split(pa).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},im=e=>e.isThemeGetter,lm=(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,cm=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)}}},cl="!",dm=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(cl),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},um=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},fm=e=>({cache:cm(e.cacheSize),parseClassName:dm(e),...om(e)}),pm=/\s+/,hm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(pm);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=um(p).join(":"),b=d?v+cl:v,y=b+m;if(a.includes(y))continue;a.push(y);const x=o(m,w);for(let N=0;N<x.length;++N){const M=x[N];a.push(b+M)}i=u+(i.length>0?" "+i:i)}return i};function gm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=dl(t))&&(r&&(r+=" "),r+=n);return r}const dl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=dl(e[r]))&&(n&&(n+=" "),n+=t);return n};function mm(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((p,d)=>d(p),e());return n=fm(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=hm(l,n);return o(l,p),p}return function(){return a(gm.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ul=/^\[(?:([a-z-]+):)?(.+)\]$/i,vm=/^\d+\/\d+$/,bm=new Set(["px","full","screen"]),ym=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wm=/\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$/,xm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Cm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>xn(e)||bm.has(e)||vm.test(e),Bt=e=>Cn(e,"length",_m),xn=e=>!!e&&!Number.isNaN(Number(e)),ga=e=>Cn(e,"number",xn),nr=e=>!!e&&Number.isInteger(Number(e)),Nm=e=>e.endsWith("%")&&xn(e.slice(0,-1)),le=e=>ul.test(e),zt=e=>ym.test(e),km=new Set(["length","size","percentage"]),Mm=e=>Cn(e,km,fl),Dm=e=>Cn(e,"position",fl),Em=new Set(["image","url"]),Tm=e=>Cn(e,Em,Im),Pm=e=>Cn(e,"",Om),rr=()=>!0,Cn=(e,t,n)=>{const r=ul.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},_m=e=>wm.test(e)&&!xm.test(e),fl=()=>!1,Om=e=>Cm.test(e),Im=e=>Sm.test(e),Am=mm(()=>{const e=be("colors"),t=be("spacing"),n=be("blur"),r=be("brightness"),o=be("borderColor"),a=be("borderRadius"),s=be("borderSpacing"),i=be("borderWidth"),l=be("contrast"),u=be("grayscale"),p=be("hueRotate"),d=be("invert"),h=be("gap"),g=be("gradientColorStops"),w=be("gradientColorStopPositions"),m=be("inset"),v=be("margin"),b=be("opacity"),y=be("padding"),x=be("saturate"),N=be("scale"),M=be("sepia"),C=be("skew"),k=be("space"),D=be("translate"),E=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",le,t],z=()=>[le,t],q=()=>["",Dt,Bt],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,Bt],blur:["none","",zt,le],brightness:oe(),borderColor:[e],borderRadius:["none","","full",zt,le],borderSpacing:z(),borderWidth:q(),contrast:oe(),grayscale:A(),hueRotate:oe(),invert:A(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[Nm,Bt],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:[zt]}],"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:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],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":[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:[zt]},zt]}],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",zt,Bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ga]}],"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,ga]}],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,Bt]}],"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(),Dm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Tm]}],"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,Bt]}],"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,Bt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zt,Pm]}],"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",zt,le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[d]}],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":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"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":[D]}],"translate-y":[{"translate-y":[D]}],"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,Bt,ga]}],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 Am(rl(e))}const pl=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"}}),hl=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"}}),gl=Ce("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),ma=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(Pg,{ref:r,className:P(gl({variant:t}),e),...n}));ma.displayName="AccordionRoot";const va=f.forwardRef(({className:e,...t},n)=>c.jsx(_g,{ref:n,className:P("border-b border-border last:border-b-0",e),...t}));va.displayName="AccordionItem";const ba=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Og,{className:"flex",children:c.jsxs(Ig,{ref:o,className:P("group",pl({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"})]})}));ba.displayName="AccordionTrigger";const ya=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Ag,{ref:o,className:P(hl({size:t}),e),...r,children:c.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));ya.displayName="AccordionContent";const ml=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(ma,{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(va,{value:h.value,children:[c.jsx(ba,{size:t,disabled:h.disabled,children:h.trigger}),c.jsx(ya,{size:t,children:h.content})]},h.value))}));ml.displayName="Accordion";const vl=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"}}),bl=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("div",{ref:r,role:"alert",className:P(vl({variant:t}),e),...n}));bl.displayName="Alert";const yl=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}));yl.displayName="AlertTitle";const wl=f.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:P("text-sm leading-relaxed opacity-90 text-pretty",e),...t}));wl.displayName="AlertDescription";var Fm=Symbol.for("react.lazy"),Jr=f[" use ".trim().toString()];function Wm(e){return typeof e=="object"&&e!==null&&"then"in e}function xl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Fm&&"_payload"in e&&Wm(e._payload)}function $m(e){const t=Bm(e),n=f.forwardRef((r,o)=>{let{children:a,...s}=r;xl(a)&&typeof Jr=="function"&&(a=Jr(a._payload));const i=f.Children.toArray(a),l=i.find(Lm);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 Bm(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n;if(xl(o)&&typeof Jr=="function"&&(o=Jr(o._payload)),f.isValidElement(o)){const s=Vm(o),i=Hm(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 zm=Symbol("radix.slottable");function Lm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zm}function Hm(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 Vm(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 Ym=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gm=Ym.reduce((e,t)=>{const n=$m(`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}},{}),jm="AspectRatio",Cl=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(Gm.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Cl.displayName=jm;var Um=Cl;const Sl=f.forwardRef(({className:e,ratio:t=16/9,...n},r)=>c.jsx(Um,{ref:r,ratio:t,className:P("overflow-hidden",e),...n}));Sl.displayName="AspectRatio";const Nl=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 Rm(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const kl=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?Rm(r):null),p=n&&!i;return c.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:P(Nl({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??"?"})})});kl.displayName="Avatar";const Ml=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"}}),Dl=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("span",{ref:r,className:P(Ml({variant:t}),e),...n}));Dl.displayName="Badge";const El=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(fa,{className:"animate-spin"})})]}):r?c.jsx(fa,{className:"animate-spin","aria-hidden":"true"}):null;return c.jsx("button",{ref:p,className:P(El({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 Tl=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"}}),Km={sm:"size-2.5",md:"size-3",lg:"size-3.5"},Pl=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>{const a=Km[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(Tl({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...r}),c.jsx(nn,{"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(tl,{"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)})]})});Pl.displayName="Checkbox";var _l=1,qm=.9,Xm=.8,Zm=.17,wa=.1,xa=.999,Qm=.9999,Jm=.99,ev=/[\\\/_+.#"@\[\(\{&]/,tv=/[\\\/_+.#"@\[\(\{&]/g,nv=/[\s-]/,Ol=/[\s-]/g;function Ca(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?_l: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=Ca(e,t,n,r,u+1,a+1,s),d>p&&(u===o?d*=_l:ev.test(e.charAt(u-1))?(d*=Xm,g=e.slice(o,u-1).match(tv),g&&o>0&&(d*=Math.pow(xa,g.length))):nv.test(e.charAt(u-1))?(d*=qm,w=e.slice(o,u-1).match(Ol),w&&o>0&&(d*=Math.pow(xa,w.length))):(d*=Zm,o>0&&(d*=Math.pow(xa,u-o))),e.charAt(u)!==t.charAt(a)&&(d*=Qm)),(d<wa&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(h=Ca(e,t,n,r,u+1,a+2,s),h*wa>d&&(d=h*wa)),d>p&&(p=d),u=n.indexOf(l,u+1);return s[i]=p,p}function Il(e){return e.toLowerCase().replace(Ol," ")}function rv(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Ca(e,t,Il(e),Il(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 ov(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 av="DismissableLayer",Sa="dismissableLayer.update",sv="dismissableLayer.pointerDownOutside",iv="dismissableLayer.focusOutside",Al,Fl=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(Fl),[p,d]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),w=he(t,k=>d(k)),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,N=y>=b,M=dv(k=>{const D=k.target,E=[...u.branches].some(I=>I.contains(D));!N||E||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},h),C=uv(k=>{const D=k.target;[...u.branches].some(I=>I.contains(D))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},h);return ov(k=>{y===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&&(Al=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Wl(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Al)}},[p,h,n,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Wl())},[p,u]),f.useEffect(()=>{const k=()=>g({});return document.addEventListener(Sa,k),()=>document.removeEventListener(Sa,k)},[]),c.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)})});Nn.displayName=av;var lv="DismissableLayerBranch",cv=f.forwardRef((e,t)=>{const n=f.useContext(Fl),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})});cv.displayName=lv;function dv(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(){$l(sv,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 uv(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&&$l(iv,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 Wl(){const e=new CustomEvent(Sa);document.dispatchEvent(e)}function $l(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?Wi(o,a):o.dispatchEvent(a)}var Na="focusScope.autoFocusOnMount",ka="focusScope.autoFocusOnUnmount",Bl={bubbles:!1,cancelable:!0},fv="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 N=x.target;i.contains(N)?d.current=N:Lt(d.current,{select:!0})},v=function(x){if(g.paused||!i)return;const N=x.relatedTarget;N!==null&&(i.contains(N)||Lt(d.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const M of x)M.removedNodes.length>0&&Lt(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){Hl.add(g);const m=document.activeElement;if(!i.contains(m)){const b=new CustomEvent(Na,Bl);i.addEventListener(Na,u),i.dispatchEvent(b),b.defaultPrevented||(pv(bv(zl(i)),{select:!0}),document.activeElement===m&&Lt(i))}return()=>{i.removeEventListener(Na,u),setTimeout(()=>{const b=new CustomEvent(ka,Bl);i.addEventListener(ka,p),i.dispatchEvent(b),b.defaultPrevented||Lt(m??document.body,{select:!0}),i.removeEventListener(ka,p),Hl.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,N]=hv(y);x&&N?!m.shiftKey&&b===N?(m.preventDefault(),n&&Lt(x,{select:!0})):m.shiftKey&&b===x&&(m.preventDefault(),n&&Lt(N,{select:!0})):b===y&&m.preventDefault()}},[n,r,g.paused]);return c.jsx(ne.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});or.displayName=fv;function pv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function hv(e){const t=zl(e),n=Ll(t,e),r=Ll(t.reverse(),e);return[n,r]}function zl(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 Ll(e,t){for(const n of e)if(!gv(n,{upTo:t}))return n}function gv(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 mv(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mv(e)&&t&&e.select()}}var Hl=vv();function vv(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Vl(e,t),e.unshift(t)},remove(t){var n;e=Vl(e,t),(n=e[0])==null||n.resume()}}}function Vl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bv(e){return e.filter(t=>t.tagName!=="A")}var yv="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?oa.createPortal(c.jsx(ne.div,{...r,ref:t}),s):null});kn.displayName=yv;var Ma=0;function eo(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Yl()),document.body.insertAdjacentElement("beforeend",e[1]??Yl()),Ma++,()=>{Ma===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ma--}},[])}function Yl(){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 Gl(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 wv(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 to="right-scroll-bar-position",no="width-before-scroll-bar",xv="with-scroll-bars-hidden",Cv="--removed-body-scroll-bar-size";function Da(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sv(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 Nv=typeof window<"u"?f.useLayoutEffect:f.useEffect,jl=new WeakMap;function kv(e,t){var n=Sv(null,function(r){return e.forEach(function(o){return Da(o,r)})});return Nv(function(){var r=jl.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Da(i,null)}),a.forEach(function(i){o.has(i)||Da(i,s)})}jl.set(n,e)},[e]),n}function Mv(e){return e}function Dv(e,t){t===void 0&&(t=Mv);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 Ev(e){e===void 0&&(e={});var t=Dv(null);return t.options=vt({async:!0,ssr:!1},e),t}var Ul=function(e){var t=e.sideCar,n=Gl(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))};Ul.isSideCarExport=!0;function Tv(e,t){return e.useMedium(t),Ul}var Rl=Ev(),Ea=function(){},ro=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ea,onWheelCapture:Ea,onTouchMoveCapture:Ea}),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,N=Gl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=h,C=kv([n,t]),k=vt(vt({},N),o);return f.createElement(f.Fragment,null,p&&f.createElement(M,{sideCar:Rl,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({},k),{ref:C})):f.createElement(y,vt({},k,{className:l,ref:C}),i))});ro.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ro.classNames={fullWidth:no,zeroRight:to};var Pv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _v(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Pv();return t&&e.setAttribute("nonce",t),e}function Ov(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Iv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Av=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_v())&&(Ov(t,n),Iv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fv=function(){var e=Av();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Kl=function(){var e=Fv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Wv={left:0,top:0,right:0,gap:0},Ta=function(e){return parseInt(e||"",10)||0},$v=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[Ta(n),Ta(r),Ta(o)]},Bv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wv;var t=$v(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])}},zv=Kl(),Mn="data-scroll-locked",Lv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
162
|
-
.`.concat(
|
|
161
|
+
*/const $t=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function rl(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=rl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ol(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rl(e))&&(r&&(r+=" "),r+=t);return r}const al=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sl=ol,ye=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return sl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const p=n==null?void 0:n[d],u=a==null?void 0:a[d];if(p===null)return null;const h=al(p)||al(u);return o[d][h]}),i=n&&Object.entries(n).reduce((d,p)=>{let[u,h]=p;return h===void 0||(d[u]=h),d},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,p)=>{let{class:u,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})?[...d,u,h]:d},[]);return sl(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},pa="-",am=e=>{const t=im(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(pa);return i[0]===""&&i.length!==1&&i.shift(),il(i,t)||sm(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},il=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?il(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(pa);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},ll=/^\[(.+)\]$/,sm=e=>{if(ll.test(e)){const t=ll.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},im=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return cm(Object.entries(e.classGroups),n).forEach(([a,s])=>{ha(s,r,a,t)}),r},ha=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:cl(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(lm(o)){ha(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{ha(s,cl(t,a),n,r)})})},cl=(e,t)=>{let n=e;return t.split(pa).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lm=e=>e.isThemeGetter,cm=(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,dm=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)}}},dl="!",um=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const l=[];let d=0,p=0,u;for(let v=0;v<i.length;v++){let b=i[v];if(d===0){if(b===o&&(r||i.slice(v,v+a)===t)){l.push(i.slice(p,v)),p=v+a;continue}if(b==="/"){u=v;continue}}b==="["?d++:b==="]"&&d--}const h=l.length===0?i:i.substring(p),g=h.startsWith(dl),w=g?h.substring(1):h,m=u&&u>p?u-p:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:m}};return n?i=>n({className:i,parseClassName:s}):s},fm=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},pm=e=>({cache:dm(e.cacheSize),parseClassName:um(e),...am(e)}),hm=/\s+/,gm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(hm);let i="";for(let l=s.length-1;l>=0;l-=1){const d=s[l],{modifiers:p,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:g}=n(d);let w=!!g,m=r(w?h.substring(0,g):h);if(!m){if(!w){i=d+(i.length>0?" "+i:i);continue}if(m=r(h),!m){i=d+(i.length>0?" "+i:i);continue}w=!1}const v=fm(p).join(":"),b=u?v+dl:v,y=b+m;if(a.includes(y))continue;a.push(y);const x=o(m,w);for(let N=0;N<x.length;++N){const M=x[N];a.push(b+M)}i=d+(i.length>0?" "+i:i)}return i};function mm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ul(t))&&(r&&(r+=" "),r+=n);return r}const ul=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ul(e[r]))&&(n&&(n+=" "),n+=t);return n};function vm(e,...t){let n,r,o,a=s;function s(l){const d=t.reduce((p,u)=>u(p),e());return n=pm(d),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const d=r(l);if(d)return d;const p=gm(l,n);return o(l,p),p}return function(){return a(mm.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},fl=/^\[(?:([a-z-]+):)?(.+)\]$/i,bm=/^\d+\/\d+$/,ym=new Set(["px","full","screen"]),wm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xm=/\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$/,Cm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>xn(e)||ym.has(e)||bm.test(e),zt=e=>Cn(e,"length",Om),xn=e=>!!e&&!Number.isNaN(Number(e)),ga=e=>Cn(e,"number",xn),nr=e=>!!e&&Number.isInteger(Number(e)),km=e=>e.endsWith("%")&&xn(e.slice(0,-1)),le=e=>fl.test(e),Bt=e=>wm.test(e),Mm=new Set(["length","size","percentage"]),Dm=e=>Cn(e,Mm,pl),Em=e=>Cn(e,"position",pl),Tm=new Set(["image","url"]),Pm=e=>Cn(e,Tm,Am),_m=e=>Cn(e,"",Im),rr=()=>!0,Cn=(e,t,n)=>{const r=fl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Om=e=>xm.test(e)&&!Cm.test(e),pl=()=>!1,Im=e=>Sm.test(e),Am=e=>Nm.test(e),Fm=vm(()=>{const e=be("colors"),t=be("spacing"),n=be("blur"),r=be("brightness"),o=be("borderColor"),a=be("borderRadius"),s=be("borderSpacing"),i=be("borderWidth"),l=be("contrast"),d=be("grayscale"),p=be("hueRotate"),u=be("invert"),h=be("gap"),g=be("gradientColorStops"),w=be("gradientColorStopPositions"),m=be("inset"),v=be("margin"),b=be("opacity"),y=be("padding"),x=be("saturate"),N=be("scale"),M=be("sepia"),C=be("skew"),k=be("space"),D=be("translate"),E=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",le,t],B=()=>[le,t],q=()=>["",Dt,zt],Y=()=>["auto",xn,le],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["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,zt],blur:["none","",Bt,le],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Bt,le],borderSpacing:B(),borderWidth:q(),contrast:oe(),grayscale:A(),hueRotate:oe(),invert:A(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[km,zt],inset:R(),margin:R(),opacity:oe(),padding:B(),saturate:oe(),scale:oe(),sepia:A(),skew:oe(),space:B(),translate:B()},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:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],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":[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:[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,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ga]}],"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,ga]}],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:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dt,zt]}],"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: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":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),Em]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Pm]}],"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:[...z(),"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:z()}],"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:["",...z()]}],"outline-offset":[{"outline-offset":[Dt,le]}],"outline-w":[{outline:[Dt,zt]}],"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,zt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bt,_m]}],"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:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[u]}],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":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"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":[D]}],"translate-y":[{"translate-y":[D]}],"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:[Dt,zt,ga]}],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 Fm(ol(e))}const hl=ye(["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"}}),gl=ye(["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"}}),ml=ye("w-full",{variants:{variant:{default:"rounded-lg border border-border",flush:""}},defaultVariants:{variant:"default"}}),ma=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(_g,{ref:r,className:P(ml({variant:t}),e),...n}));ma.displayName="AccordionRoot";const va=f.forwardRef(({className:e,...t},n)=>c.jsx(Og,{ref:n,className:P("border-b border-border last:border-b-0",e),...t}));va.displayName="AccordionItem";const ba=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Ig,{className:"flex",children:c.jsxs(Ag,{ref:o,className:P("group",hl({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"})]})}));ba.displayName="AccordionTrigger";const ya=f.forwardRef(({className:e,size:t,children:n,...r},o)=>c.jsx(Fg,{ref:o,className:P(gl({size:t}),e),...r,children:c.jsx("div",{className:"px-4 pb-4 pt-0",children:n})}));ya.displayName="AccordionContent";const vl=f.forwardRef(({items:e,size:t="md",variant:n="default",className:r,type:o="single",defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:d,dir:p},u)=>c.jsx(ma,{ref:u,variant:n,className:r,type:o,defaultValue:a,value:s,onValueChange:i,collapsible:l,disabled:d,dir:p,children:e.map(h=>c.jsxs(va,{value:h.value,children:[c.jsx(ba,{size:t,disabled:h.disabled,children:h.trigger}),c.jsx(ya,{size:t,children:h.content})]},h.value))}));vl.displayName="Accordion";const wa=f.createContext({size:"md"}),bl=ye(["relative w-full rounded-lg border flex","[&>svg]:shrink-0 [&>svg]:size-4 [&>svg]:mt-0.5"],{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"},size:{md:"p-4",sm:"p-3"}},defaultVariants:{variant:"default",size:"md"}});function Wm(e){if(!f.isValidElement(e))return!1;const t=e.type;return t.displayName==="AlertTitle"||t.displayName==="AlertDescription"}function $m(e){const t=f.Children.toArray(e);let n=null;const r=[];for(const o of t)!n&&!Wm(o)&&f.isValidElement(o)?n=o:r.push(o);return{icon:n,content:r}}const yl=f.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>{const{icon:s,content:i}=$m(r),l=s!=null,d=n??"md";return c.jsx(wa,{value:{size:d},children:c.jsx("div",{ref:a,role:"alert","data-size":d,className:P(bl({variant:t,size:d}),l?P("flex-row items-start",d==="sm"?"gap-2":"gap-2.5"):"flex-col",e),...o,children:l?c.jsxs(c.Fragment,{children:[s,c.jsx("div",{className:"min-w-0 flex-1",children:i})]}):r})})});yl.displayName="Alert";const zm=ye("mb-1 font-medium leading-none tracking-tight text-balance",{variants:{size:{md:"",sm:"text-sm"}},defaultVariants:{size:"md"}}),wl=f.forwardRef(({className:e,...t},n)=>{const{size:r}=f.use(wa);return c.jsx("h5",{ref:n,className:P(zm({size:r}),e),...t})});wl.displayName="AlertTitle";const Bm=ye("leading-relaxed opacity-90 text-pretty",{variants:{size:{md:"text-sm",sm:"text-xs"}},defaultVariants:{size:"md"}}),xl=f.forwardRef(({className:e,...t},n)=>{const{size:r}=f.use(wa);return c.jsx("p",{ref:n,className:P(Bm({size:r}),e),...t})});xl.displayName="AlertDescription";var Lm=Symbol.for("react.lazy"),Jr=f[" use ".trim().toString()];function Hm(e){return typeof e=="object"&&e!==null&&"then"in e}function Cl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Lm&&"_payload"in e&&Hm(e._payload)}function Vm(e){const t=Ym(e),n=f.forwardRef((r,o)=>{let{children:a,...s}=r;Cl(a)&&typeof Jr=="function"&&(a=Jr(a._payload));const i=f.Children.toArray(a),l=i.find(jm);if(l){const d=l.props.children,p=i.map(u=>u===l?f.Children.count(d)>1?f.Children.only(null):f.isValidElement(d)?d.props.children:null:u);return c.jsx(t,{...s,ref:o,children:f.isValidElement(d)?f.cloneElement(d,void 0,p):null})}return c.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Ym(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n;if(Cl(o)&&typeof Jr=="function"&&(o=Jr(o._payload)),f.isValidElement(o)){const s=Rm(o),i=Um(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 Gm=Symbol("radix.slottable");function jm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gm}function Um(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 Rm(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 Km=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qm=Km.reduce((e,t)=>{const n=Vm(`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}},{}),Xm="AspectRatio",Sl=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(qm.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Sl.displayName=Xm;var Zm=Sl;const Nl=f.forwardRef(({className:e,ratio:t=16/9,...n},r)=>c.jsx(Zm,{ref:r,ratio:t,className:P("overflow-hidden",e),...n}));Nl.displayName="AspectRatio";const kl=ye("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 Qm(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>t[0].toUpperCase()).join("")}const Ml=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 d=o??(r?Qm(r):null),p=n&&!i;return c.jsx("span",{ref:s,role:"img","aria-label":r||void 0,className:P(kl({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:d??"?"})})});Ml.displayName="Avatar";const Dl=ye("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"}}),El=f.forwardRef(({className:e,variant:t,...n},r)=>c.jsx("span",{ref:r,className:P(Dl({variant:t}),e),...n}));El.displayName="Badge";const Tl=ye(["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,...d},p)=>{const u=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(fa,{className:"animate-spin"})})]}):r?c.jsx(fa,{className:"animate-spin","aria-hidden":"true"}):null;return c.jsx("button",{ref:p,className:P(Tl({variant:t,size:n}),a==="center"&&"aspect-square p-0",l&&"active:scale-100",e),disabled:s||r,"aria-busy":r||void 0,...d,children:a==="center"?u:c.jsxs(c.Fragment,{children:[a==="left"&&u,i,a==="right"&&u]})})});Sn.displayName="Button";const Pl=ye(["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"}}),Jm={sm:"size-2.5",md:"size-3",lg:"size-3.5"},_l=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,...o},a)=>{const s=Jm[n??"md"];return c.jsxs("span",{className:P("relative inline-flex shrink-0 items-center justify-center",e),children:[c.jsx("input",{type:"checkbox",ref:a,className:P(Pl({size:n}),r&&"border-destructive",t),"aria-invalid":r||void 0,...o}),c.jsx(nn,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-checked:opacity-100 peer-disabled:opacity-30",s)}),c.jsx(nl,{"aria-hidden":"true",className:P("pointer-events-none absolute text-primary-foreground opacity-0 transition-opacity","peer-indeterminate:opacity-100 peer-disabled:opacity-30",s)})]})});_l.displayName="Checkbox";var Ol=1,ev=.9,tv=.8,nv=.17,xa=.1,Ca=.999,rv=.9999,ov=.99,av=/[\\\/_+.#"@\[\(\{&]/,sv=/[\\\/_+.#"@\[\(\{&]/g,iv=/[\s-]/,Il=/[\s-]/g;function Sa(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Ol:ov;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),d=n.indexOf(l,o),p=0,u,h,g,w;d>=0;)u=Sa(e,t,n,r,d+1,a+1,s),u>p&&(d===o?u*=Ol:av.test(e.charAt(d-1))?(u*=tv,g=e.slice(o,d-1).match(sv),g&&o>0&&(u*=Math.pow(Ca,g.length))):iv.test(e.charAt(d-1))?(u*=ev,w=e.slice(o,d-1).match(Il),w&&o>0&&(u*=Math.pow(Ca,w.length))):(u*=nv,o>0&&(u*=Math.pow(Ca,d-o))),e.charAt(d)!==t.charAt(a)&&(u*=rv)),(u<xa&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(h=Sa(e,t,n,r,d+1,a+2,s),h*xa>u&&(u=h*xa)),u>p&&(p=u),d=n.indexOf(l,d+1);return s[i]=p,p}function Al(e){return e.toLowerCase().replace(Il," ")}function lv(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Sa(e,t,Al(e),Al(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 cv(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 dv="DismissableLayer",Na="dismissableLayer.update",uv="dismissableLayer.pointerDownOutside",fv="dismissableLayer.focusOutside",Fl,Wl=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,d=f.useContext(Wl),[p,u]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),w=he(t,k=>u(k)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),y=p?m.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,N=y>=b,M=gv(k=>{const D=k.target,E=[...d.branches].some(I=>I.contains(D));!N||E||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},h),C=mv(k=>{const D=k.target;[...d.branches].some(I=>I.contains(D))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},h);return cv(k=>{y===d.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Fl=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),$l(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Fl)}},[p,h,n,d]),f.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),$l())},[p,d]),f.useEffect(()=>{const k=()=>g({});return document.addEventListener(Na,k),()=>document.removeEventListener(Na,k)},[]),c.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)})});Nn.displayName=dv;var pv="DismissableLayerBranch",hv=f.forwardRef((e,t)=>{const n=f.useContext(Wl),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})});hv.displayName=pv;function gv(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(){zl(uv,n,d,{discrete:!0})};const d={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 mv(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&&zl(fv,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 $l(){const e=new CustomEvent(Na);document.dispatchEvent(e)}function zl(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?$i(o,a):o.dispatchEvent(a)}var ka="focusScope.autoFocusOnMount",Ma="focusScope.autoFocusOnUnmount",Bl={bubbles:!1,cancelable:!0},vv="FocusScope",or=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),d=ot(o),p=ot(a),u=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)?u.current=N:Lt(u.current,{select:!0})},v=function(x){if(g.paused||!i)return;const N=x.relatedTarget;N!==null&&(i.contains(N)||Lt(u.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const M of x)M.removedNodes.length>0&&Lt(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){Vl.add(g);const m=document.activeElement;if(!i.contains(m)){const b=new CustomEvent(ka,Bl);i.addEventListener(ka,d),i.dispatchEvent(b),b.defaultPrevented||(bv(Sv(Ll(i)),{select:!0}),document.activeElement===m&&Lt(i))}return()=>{i.removeEventListener(ka,d),setTimeout(()=>{const b=new CustomEvent(Ma,Bl);i.addEventListener(Ma,p),i.dispatchEvent(b),b.defaultPrevented||Lt(m??document.body,{select:!0}),i.removeEventListener(Ma,p),Vl.remove(g)},0)}}},[i,d,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,N]=yv(y);x&&N?!m.shiftKey&&b===N?(m.preventDefault(),n&&Lt(x,{select:!0})):m.shiftKey&&b===x&&(m.preventDefault(),n&&Lt(N,{select:!0})):b===y&&m.preventDefault()}},[n,r,g.paused]);return c.jsx(ne.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});or.displayName=vv;function bv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function yv(e){const t=Ll(e),n=Hl(t,e),r=Hl(t.reverse(),e);return[n,r]}function Ll(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 Hl(e,t){for(const n of e)if(!wv(n,{upTo:t}))return n}function wv(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 xv(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xv(e)&&t&&e.select()}}var Vl=Cv();function Cv(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yl(e,t),e.unshift(t)},remove(t){var n;e=Yl(e,t),(n=e[0])==null||n.resume()}}}function Yl(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Sv(e){return e.filter(t=>t.tagName!=="A")}var Nv="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?oa.createPortal(c.jsx(ne.div,{...r,ref:t}),s):null});kn.displayName=Nv;var Da=0;function eo(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gl()),document.body.insertAdjacentElement("beforeend",e[1]??Gl()),Da++,()=>{Da===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Da--}},[])}function Gl(){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 jl(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 kv(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 to="right-scroll-bar-position",no="width-before-scroll-bar",Mv="with-scroll-bars-hidden",Dv="--removed-body-scroll-bar-size";function Ea(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ev(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 Tv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ul=new WeakMap;function Pv(e,t){var n=Ev(null,function(r){return e.forEach(function(o){return Ea(o,r)})});return Tv(function(){var r=Ul.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Ea(i,null)}),a.forEach(function(i){o.has(i)||Ea(i,s)})}Ul.set(n,e)},[e]),n}function _v(e){return e}function Ov(e,t){t===void 0&&(t=_v);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)},d=function(){return Promise.resolve().then(l)};d(),n={push:function(p){s.push(p),d()},filter:function(p){return s=s.filter(p),n}}}};return o}function Iv(e){e===void 0&&(e={});var t=Ov(null);return t.options=vt({async:!0,ssr:!1},e),t}var Rl=function(e){var t=e.sideCar,n=jl(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))};Rl.isSideCarExport=!0;function Av(e,t){return e.useMedium(t),Rl}var Kl=Iv(),Ta=function(){},ro=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Ta,onWheelCapture:Ta,onTouchMoveCapture:Ta}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,d=e.removeScrollBar,p=e.enabled,u=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,N=jl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=h,C=Pv([n,t]),k=vt(vt({},N),o);return f.createElement(f.Fragment,null,p&&f.createElement(M,{sideCar:Kl,removeScrollBar:d,shards:u,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(y,vt({},k,{className:l,ref:C}),i))});ro.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ro.classNames={fullWidth:no,zeroRight:to};var Fv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fv();return t&&e.setAttribute("nonce",t),e}function $v(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Bv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wv())&&($v(t,n),zv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lv=function(){var e=Bv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ql=function(){var e=Lv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Hv={left:0,top:0,right:0,gap:0},Pa=function(e){return parseInt(e||"",10)||0},Vv=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[Pa(n),Pa(r),Pa(o)]},Yv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Hv;var t=Vv(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])}},Gv=ql(),Mn="data-scroll-locked",jv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
162
|
+
.`.concat(Mv,` {
|
|
163
163
|
overflow: hidden `).concat(r,`;
|
|
164
164
|
padding-right: `).concat(i,"px ").concat(r,`;
|
|
165
165
|
}
|
|
@@ -193,13 +193,13 @@
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
body[`).concat(Mn,`] {
|
|
196
|
-
`).concat(
|
|
196
|
+
`).concat(Dv,": ").concat(i,`px;
|
|
197
197
|
}
|
|
198
|
-
`)},
|
|
198
|
+
`)},Xl=function(){var e=parseInt(document.body.getAttribute(Mn)||"0",10);return isFinite(e)?e:0},Uv=function(){f.useEffect(function(){return document.body.setAttribute(Mn,(Xl()+1).toString()),function(){var e=Xl()-1;e<=0?document.body.removeAttribute(Mn):document.body.setAttribute(Mn,e.toString())}},[])},Rv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Uv();var a=f.useMemo(function(){return Yv(o)},[o]);return f.createElement(Gv,{styles:jv(a,!t,o,n?"":"!important")})},_a=!1;if(typeof window<"u")try{var oo=Object.defineProperty({},"passive",{get:function(){return _a=!0,!0}});window.addEventListener("test",oo,oo),window.removeEventListener("test",oo,oo)}catch{_a=!1}var Dn=_a?{passive:!1}:!1,Kv=function(e){return e.tagName==="TEXTAREA"},Zl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Kv(e)&&n[t]==="visible")},qv=function(e){return Zl(e,"overflowY")},Xv=function(e){return Zl(e,"overflowX")},Ql=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Jl(e,r);if(o){var a=ec(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Qv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jl=function(e,t){return e==="v"?qv(t):Xv(t)},ec=function(e,t){return e==="v"?Zv(t):Qv(t)},Jv=function(e,t){return e==="h"&&t==="rtl"?-1:1},eb=function(e,t,n,r,o){var a=Jv(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),d=!1,p=s>0,u=0,h=0;do{if(!i)break;var g=ec(e,i),w=g[0],m=g[1],v=g[2],b=m-v-a*w;(w||b)&&Jl(e,i)&&(u+=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(u)<1||!p&&Math.abs(h)<1)&&(d=!0),d},ao=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tc=function(e){return[e.deltaX,e.deltaY]},nc=function(e){return e&&"current"in e?e.current:e},tb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nb=function(e){return`
|
|
199
199
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
200
200
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
201
|
-
`)},
|
|
201
|
+
`)},rb=0,En=[];function ob(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(rb++)[0],a=f.useState(ql)[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=kv([e.lockRef.current],(e.shards||[]).map(nc),!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=ao(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-b[0],N="deltaY"in m?m.deltaY:y[1]-b[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 D=window.getSelection(),E=D&&D.anchorNode,I=E?E===C||E.contains(C):!1;if(I)return!1;var R=Ql(k,C);if(!R)return!0;if(R?M=k:(M=k==="v"?"h":"v",R=Ql(k,C)),!R)return!1;if(!r.current&&"changedTouches"in m&&(x||N)&&(r.current=M),!M)return!0;var B=r.current||M;return eb(B,v,m,B==="h"?x:N)},[]),l=f.useCallback(function(m){var v=m;if(!(!En.length||En[En.length-1]!==a)){var b="deltaY"in v?tc(v):ao(v),y=t.current.filter(function(M){return M.name===v.type&&(M.target===v.target||v.target===M.shadowParent)&&tb(M.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(nc).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()}}},[]),d=f.useCallback(function(m,v,b,y){var x={name:m,delta:v,target:b,should:y,shadowParent:ab(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(N){return N!==x})},1)},[]),p=f.useCallback(function(m){n.current=ao(m),r.current=void 0},[]),u=f.useCallback(function(m){d(m.type,tc(m),m.target,i(m,e.lockRef.current))},[]),h=f.useCallback(function(m){d(m.type,ao(m),m.target,i(m,e.lockRef.current))},[]);f.useEffect(function(){return En.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,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:nb(o)}):null,g?f.createElement(Rv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ab(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sb=Av(Kl,ob);var ar=f.forwardRef(function(e,t){return f.createElement(ro,vt({},e,{ref:t,sideCar:sb}))});ar.classNames=ro.classNames;var ib=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Tn=new WeakMap,so=new WeakMap,io={},Oa=0,rc=function(e){return e&&(e.host||rc(e.parentNode))},lb=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=rc(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})},cb=function(e,t,n,r){var o=lb(t,Array.isArray(e)?e:[e]);io[n]||(io[n]=new WeakMap);var a=io[n],s=[],i=new Set,l=new Set(o),d=function(u){!u||i.has(u)||(i.add(u),d(u.parentNode))};o.forEach(d);var p=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.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&&so.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(),Oa++,function(){s.forEach(function(u){var h=Tn.get(u)-1,g=a.get(u)-1;Tn.set(u,h),a.set(u,g),h||(so.has(u)||u.removeAttribute(r),so.delete(u)),g||u.removeAttribute(n)}),Oa--,Oa||(Tn=new WeakMap,Tn=new WeakMap,so=new WeakMap,io={})}},lo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=ib(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),cb(r,o,n,"aria-hidden")):function(){return null}},co="Dialog",[oc]=Ze(co),[db,at]=oc(co),ac=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[d,p]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:co});return c.jsx(db,{scope:t,triggerRef:i,contentRef:l,contentId:Ce(),titleId:Ce(),descriptionId:Ce(),open:d,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(u=>!u),[p]),modal:s,children:n})};ac.displayName=co;var sc="DialogTrigger",ic=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(sc,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":Fa(o.open),...r,ref:a,onClick:j(e.onClick,o.onOpenToggle)})});ic.displayName=sc;var Ia="DialogPortal",[ub,lc]=oc(Ia,{forceMount:void 0}),cc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=at(Ia,t);return c.jsx(ub,{scope:t,forceMount:n,children:f.Children.map(r,s=>c.jsx(ze,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:s})}))})};cc.displayName=Ia;var uo="DialogOverlay",dc=f.forwardRef((e,t)=>{const n=lc(uo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(uo,e.__scopeDialog);return a.modal?c.jsx(ze,{present:r||a.open,children:c.jsx(pb,{...o,ref:t})}):null});dc.displayName=uo;var fb=tn("DialogOverlay.RemoveScroll"),pb=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(uo,n);return c.jsx(ar,{as:fb,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(ne.div,{"data-state":Fa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rn="DialogContent",uc=f.forwardRef((e,t)=>{const n=lc(rn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=at(rn,e.__scopeDialog);return c.jsx(ze,{present:r||a.open,children:a.modal?c.jsx(hb,{...o,ref:t}):c.jsx(gb,{...o,ref:t})})});uc.displayName=rn;var hb=f.forwardRef((e,t)=>{const n=at(rn,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return lo(a)},[]),c.jsx(fc,{...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())})}),gb=f.forwardRef((e,t)=>{const n=at(rn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return c.jsx(fc,{...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,d;(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;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),fc=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=at(rn,n),l=f.useRef(null),d=he(t,l);return eo(),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":Fa(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(mb,{titleId:i.titleId}),c.jsx(bb,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Aa="DialogTitle",pc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Aa,n);return c.jsx(ne.h2,{id:o.titleId,...r,ref:t})});pc.displayName=Aa;var hc="DialogDescription",gc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(hc,n);return c.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});gc.displayName=hc;var mc="DialogClose",vc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(mc,n);return c.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});vc.displayName=mc;function Fa(e){return e?"open":"closed"}var bc="DialogTitleWarning",[Pk,yc]=Jh(bc,{contentName:rn,titleName:Aa,docsSlug:"dialog"}),mb=({titleId:e})=>{const t=yc(bc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
202
202
|
|
|
203
203
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
204
204
|
|
|
205
|
-
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},fb="DialogDescriptionWarning",pb=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bc(fb).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},yc=oc,hb=sc,wc=lc,Fa=cc,Wa=dc,xc=fc,Cc=hc,gb=mc,sr='[cmdk-group=""]',$a='[cmdk-group-items=""]',mb='[cmdk-group-heading=""]',Sc='[cmdk-item=""]',Nc=`${Sc}:not([aria-disabled="true"])`,Ba="cmdk-item-select",Pn="data-value",vb=(e,t,n)=>rv(e,t,n),kc=f.createContext(void 0),ir=()=>f.useContext(kc),Mc=f.createContext(void 0),za=()=>f.useContext(Mc),Dc=f.createContext(void 0),lr=f.forwardRef((e,t)=>{let n=_n(()=>{var O,F;return{search:"",value:(F=(O=e.value)!=null?O:e.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=_n(()=>new Set),o=_n(()=>new Map),a=_n(()=>new Map),s=_n(()=>new Set),i=Pc(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(),N=xe(),M=f.useRef(null),C=Cb();on(()=>{if(p!==void 0){let O=p.trim();n.current.value=O,k.emit()}},[p]),on(()=>{C(6,q)},[]);let k=f.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,F,V)=>{var $,Z,W,U;if(!Object.is(n.current[O],F)){if(n.current[O]=F,O==="search")z(),I(),C(1,R);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(N);X?X.focus():($=document.getElementById(y))==null||$.focus()}if(C(7,()=>{var X;n.current.selectedItemId=(X=Y())==null?void 0:X.id,k.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}}k.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),D=f.useMemo(()=>({value:(O,F,V)=>{var $;F!==(($=a.current.get(O))==null?void 0:$.value)&&(a.current.set(O,{value:F,keywords:V}),n.current.filtered.items.set(O,E(F,V)),C(2,()=>{I(),k.emit()}))},item:(O,F)=>(r.current.add(O),F&&(o.current.has(F)?o.current.get(F).add(O):o.current.set(F,new Set([O]))),C(3,()=>{z(),I(),n.current.value||R(),k.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let V=Y();C(4,()=>{z(),(V==null?void 0:V.getAttribute("id"))===O&&R(),k.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:N,labelId:x,listInnerRef:M}),[]);function E(O,F){var V,$;let Z=($=(V=i.current)==null?void 0:V.filter)!=null?$:vb;return O?Z(O,n.current.search,F):0}function I(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,F=[];n.current.filtered.groups.forEach($=>{let Z=o.current.get($),W=0;Z.forEach(U=>{let X=O.get(U);W=Math.max(X,W)}),F.push([$,W])});let V=M.current;ae().sort(($,Z)=>{var W,U;let X=$.getAttribute("id"),se=Z.getAttribute("id");return((W=O.get(se))!=null?W:0)-((U=O.get(X))!=null?U:0)}).forEach($=>{let Z=$.closest($a);Z?Z.appendChild($.parentElement===Z?$:$.closest(`${$a} > *`)):V.appendChild($.parentElement===V?$:$.closest(`${$a} > *`))}),F.sort(($,Z)=>Z[1]-$[1]).forEach($=>{var Z;let W=(Z=M.current)==null?void 0:Z.querySelector(`${sr}[${Pn}="${encodeURIComponent($[0])}"]`);W==null||W.parentElement.appendChild(W)})}function R(){let O=ae().find(V=>V.getAttribute("aria-disabled")!=="true"),F=O==null?void 0:O.getAttribute(Pn);k.setState("value",F||void 0)}function z(){var O,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=(O=a.current.get(W))==null?void 0:O.value)!=null?F:"",X=($=(V=a.current.get(W))==null?void 0:V.keywords)!=null?$:[],se=E(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 O,F,V;let $=Y();$&&(((O=$.parentElement)==null?void 0:O.firstChild)===$&&((V=(F=$.closest(sr))==null?void 0:F.querySelector(mb))==null||V.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function Y(){var O;return(O=M.current)==null?void 0:O.querySelector(`${Sc}[aria-selected="true"]`)}function ae(){var O;return Array.from(((O=M.current)==null?void 0:O.querySelectorAll(Nc))||[])}function B(O){let F=ae()[O];F&&k.setState("value",F.getAttribute(Pn))}function K(O){var F;let V=Y(),$=ae(),Z=$.findIndex(U=>U===V),W=$[Z+O];(F=i.current)!=null&&F.loop&&(W=Z+O<0?$[$.length-1]:Z+O===$.length?$[0]:$[Z+O]),W&&k.setState("value",W.getAttribute(Pn))}function G(O){let F=Y(),V=F==null?void 0:F.closest(sr),$;for(;V&&!$;)V=O>0?wb(V,sr):xb(V,sr),$=V==null?void 0:V.querySelector(Nc);$?k.setState("value",$.getAttribute(Pn)):K(O)}let A=()=>B(ae().length-1),Q=O=>{O.preventDefault(),O.metaKey?A():O.altKey?G(1):K(1)},oe=O=>{O.preventDefault(),O.metaKey?B(0):O.altKey?G(-1):K(-1)};return f.createElement(ne.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:O=>{var F;(F=b.onKeyDown)==null||F.call(b,O);let V=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||V))switch(O.key){case"n":case"j":{v&&O.ctrlKey&&Q(O);break}case"ArrowDown":{Q(O);break}case"p":case"k":{v&&O.ctrlKey&&oe(O);break}case"ArrowUp":{oe(O);break}case"Home":{O.preventDefault(),B(0);break}case"End":{O.preventDefault(),A();break}case"Enter":{O.preventDefault();let $=Y();if($){let Z=new Event(Ba);$.dispatchEvent(Z)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:Nb},l),mo(e,O=>f.createElement(Mc.Provider,{value:k},f.createElement(kc.Provider,{value:D},O))))}),fo=f.forwardRef((e,t)=>{var n,r;let o=xe(),a=f.useRef(null),s=f.useContext(Dc),i=ir(),l=Pc(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;on(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let p=_c(o,a,[e.value,e.children,a],e.keywords),d=za(),h=Ht(C=>C.value&&C.value===p.current),g=Ht(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(Ba,w),()=>C.removeEventListener(Ba,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(){d.setState("value",p.current,!0)}if(!g)return null;let{disabled:v,value:b,onSelect:y,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)}),Ec=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=Ht(g=>o||p.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);on(()=>p.group(s),[]),_c(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),mo(e,g=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(Dc.Provider,{value:h},g))))}),Tc=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Ht(s=>!s.search);return!n&&!a?null:f.createElement(ne.div,{ref:mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),po=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=za(),s=Ht(u=>u.search),i=Ht(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)}})}),ho=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Ht(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},mo(e,u=>f.createElement("div",{ref:mt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),bb=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(yc,{open:n,onOpenChange:r},f.createElement(wc,{container:s},f.createElement(Fa,{"cmdk-overlay":"",className:o}),f.createElement(Wa,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(lr,{ref:t,...i}))))}),go=f.forwardRef((e,t)=>Ht(n=>n.filtered.count===0)?f.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),yb=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},mo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))});Object.assign(lr,{List:ho,Item:fo,Input:po,Group:Ec,Separator:Tc,Dialog:bb,Empty:go,Loading:yb});function wb(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function xb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Pc(e){let t=f.useRef(e);return on(()=>{t.current=e}),t}var on=typeof window>"u"?f.useEffect:f.useLayoutEffect;function _n(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Ht(e){let t=za(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function _c(e,t,n,r=[]){let o=f.useRef(),a=ir();return on(()=>{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 Cb=()=>{let[e,t]=f.useState(),n=_n(()=>new Map);return on(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Sb(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function mo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(Sb(t),{ref:t.ref},n(t.props.children)):n(t)}var Nb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const kb=["top","right","bottom","left"],Vt=Math.min,Ve=Math.max,vo=Math.round,bo=Math.floor,bt=e=>({x:e,y:e}),Mb={left:"right",right:"left",bottom:"top",top:"bottom"};function La(e,t,n){return Ve(e,Vt(t,n))}function Et(e,t){return typeof e=="function"?e(t):e}function Tt(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function Ha(e){return e==="x"?"y":"x"}function Va(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ya(e){return Ha(yt(e))}function Db(e,t,n){n===void 0&&(n=!1);const r=On(e),o=Ya(e),a=Va(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=yo(s)),[s,yo(s)]}function Eb(e){const t=yo(e);return[Ga(e),t,Ga(t)]}function Ga(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Oc=["left","right"],Ic=["right","left"],Tb=["top","bottom"],Pb=["bottom","top"];function _b(e,t,n){switch(e){case"top":case"bottom":return n?t?Ic:Oc:t?Oc:Ic;case"left":case"right":return t?Tb:Pb;default:return[]}}function Ob(e,t,n,r){const o=On(e);let a=_b(Tt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Ga)))),a}function yo(e){const t=Tt(e);return Mb[t]+e.slice(t.length)}function Ib(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ac(e){return typeof e!="number"?Ib(e):{top:e,right:e,bottom:e,left:e}}function wo(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 Fc(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),s=Ya(t),i=Va(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(On(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 Ab(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=Ac(g),v=i[h?d==="floating"?"reference":"floating":d],b=wo(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)),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=wo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(b.top-M.top+w.top)/N.y,bottom:(M.bottom-b.bottom+w.bottom)/N.y,left:(b.left-M.left+w.left)/N.x,right:(M.right-b.right+w.right)/N.x}}const Fb=50,Wb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Ab},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}=Fc(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:N,data:M,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=N??d,w[b]={...w[b],...M},C&&g<Fb&&(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}=Fc(u,h,l)),m=-1)}return{x:p,y:d,placement:h,strategy:o,middlewareData:w}},$b=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=Ac(p),h={x:n,y:r},g=Ya(o),w=Va(g),m=await s.getDimensions(u),v=g==="y",b=v?"top":"left",y=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 D=N/2-M/2,E=k/2-m[w]/2-1,I=Vt(d[b],E),R=Vt(d[y],E),z=I,q=k-m[w]-R,Y=k/2-m[w]/2+D,ae=La(z,Y,q),B=!l.arrow&&On(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}}}),Bb=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,N=await(l.isRTL==null?void 0:l.isRTL(u.floating)),M=h||(x||!m?[yo(i)]:Eb(i)),C=w!=="none";!h&&C&&M.push(...Ob(i,m,w,N));const k=[i,...M],D=await l.detectOverflow(t,v),E=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&E.push(D[b]),d){const Y=Db(o,s,N);E.push(D[Y[0]],D[Y[1]])}if(I=[...I,{placement:o,overflows:E}],!E.every(Y=>Y<=0)){var R,z;const Y=(((R=a.flip)==null?void 0:R.index)||0)+1,ae=k[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 Wc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $c(e){return kb.some(t=>e[t]>=0)}const zb=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=Wc(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:$c(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Wc(s,n.floating);return{data:{escapedOffsets:i,escaped:$c(i)}}}default:return{}}}}},Bc=new Set(["left","top"]);async function Lb(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=On(n),l=yt(n)==="y",u=Bc.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 Hb=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 Lb(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}}}}},Vb=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=Ha(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],N=w-d[y];w=La(x,w,N)}if(i){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+d[b],N=m-d[y];m=La(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}}}}}},Yb=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=Ha(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",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 b,y;const x=h==="y"?"width":"height",N=Bc.has(Tt(o)),M=a.reference[d]-a.floating[x]+(N&&((b=s.offset)==null?void 0:b[d])||0)+(N?0:v.crossAxis),C=a.reference[d]+a.reference[x]+(N?0:((y=s.offset)==null?void 0:y[d])||0)-(N?v.crossAxis:0);w<M?w=M:w>C&&(w=C)}return{[h]:g,[d]:w}}}},Gb=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=On(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,N=Vt(m-p[v],y),M=Vt(w-p[b],x),C=!t.middlewareData.shift;let k=N,D=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=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?D=w-2*(I!==0||R!==0?I+R:Ve(p.left,p.right)):k=m-2*(z!==0||q!==0?z+q:Ve(p.top,p.bottom))}await l({...t,availableWidth:D,availableHeight:k});const E=await s.getDimensions(i.floating);return w!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function xo(){return typeof window<"u"}function In(e){return zc(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=(zc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zc(e){return xo()?e instanceof Node||e instanceof Ye(e).Node:!1}function st(e){return xo()?e instanceof Element||e instanceof Ye(e).Element:!1}function Pt(e){return xo()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function Lc(e){return!xo()||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 jb(e){return/^(table|td|th)$/.test(In(e))}function Co(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ub=/transform|translate|scale|rotate|perspective|filter/,Rb=/paint|layout|strict|content/,an=e=>!!e&&e!=="none";let ja;function Ua(e){const t=st(e)?it(e):e;return an(t.transform)||an(t.translate)||an(t.scale)||an(t.rotate)||an(t.perspective)||!Ra()&&(an(t.backdropFilter)||an(t.filter))||Ub.test(t.willChange||"")||Rb.test(t.contain||"")}function Kb(e){let t=Yt(e);for(;Pt(t)&&!An(t);){if(Ua(t))return t;if(Co(t))return null;t=Yt(t)}return null}function Ra(){return ja==null&&(ja=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ja}function An(e){return/^(html|body|#document)$/.test(In(e))}function it(e){return Ye(e).getComputedStyle(e)}function So(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(In(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lc(e)&&e.host||wt(e);return Lc(t)?t.host:t}function Hc(e){const t=Yt(e);return An(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&cr(t)?t:Hc(t)}function dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Hc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ye(o);if(a){const i=Ka(s);return t.concat(s,s.visualViewport||[],cr(o)?o:[],i&&n?dr(i):[])}else return t.concat(o,dr(o,[],n))}function Ka(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vc(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=vo(n)!==a||vo(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function qa(e){return st(e)?e:e.contextElement}function Fn(e){const t=qa(e);if(!Pt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Vc(t);let s=(a?vo(n.width):n.width)/r,i=(a?vo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const qb=bt(0);function Yc(e){const t=Ye(e);return!Ra()||!t.visualViewport?qb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function sn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=qa(e);let s=bt(1);t&&(r?st(r)&&(s=Fn(r)):s=Fn(e));const i=Xb(a,n,r)?Yc(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=Ka(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,N=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,d*=v.y,l+=x,u+=N,w=Ye(m),m=Ka(w)}}return wo({width:p,height:d,x:l,y:u})}function No(e,t){const n=So(e).scrollLeft;return t?t.left+n:sn(wt(e)).left+n}function Gc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-No(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Zb(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=wt(r),i=t?Co(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=So(r)),d)){const g=sn(r);u=Fn(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=s&&!d&&!a?Gc(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 Qb(e){return Array.from(e.getClientRects())}function Jb(e){const t=wt(e),n=So(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+No(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 jc=25;function ey(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=Ra();(!p||p&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const u=No(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<=jc&&(a-=w)}else u<=jc&&(a+=u);return{width:a,height:s,x:i,y:l}}function ty(e,t){const n=sn(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 Uc(e,t,n){let r;if(t==="viewport")r=ey(e,n);else if(t==="document")r=Jb(wt(e));else if(st(t))r=ty(t,n);else{const o=Yc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wo(r)}function Rc(e,t){const n=Yt(e);return n===t||!st(n)||An(n)?!1:it(n).position==="fixed"||Rc(n,t)}function ny(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?Yt(e):e;for(;st(s)&&!An(s);){const i=it(s),l=Ua(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||cr(s)&&!l&&Rc(e,s))?r=r.filter(p=>p!==s):o=i,s=Yt(s)}return t.set(e,r),r}function ry(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Co(t)?[]:ny(t,this._c):[].concat(n),r],i=Uc(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=Uc(t,s[h],o);l=Ve(g.top,l),u=Vt(g.right,u),p=Vt(g.bottom,p),d=Ve(g.left,d)}return{width:u-d,height:p-l,x:d,y:l}}function oy(e){const{width:t,height:n}=Vc(e);return{width:t,height:n}}function ay(e,t,n){const r=Pt(t),o=wt(t),a=n==="fixed",s=sn(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=No(o)}if(r||!r&&!a)if((In(t)!=="body"||cr(o))&&(i=So(t)),r){const g=sn(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?Gc(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 Xa(e){return it(e).position==="static"}function Kc(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 qc(e,t){const n=Ye(e);if(Co(e))return n;if(!Pt(e)){let o=Yt(e);for(;o&&!An(o);){if(st(o)&&!Xa(o))return o;o=Yt(o)}return n}let r=Kc(e,t);for(;r&&jb(r)&&Xa(r);)r=Kc(r,t);return r&&An(r)&&Xa(r)&&!Ua(r)?n:r||Kb(e)||n}const sy=async function(e){const t=this.getOffsetParent||qc,n=this.getDimensions,r=await n(e.floating);return{reference:ay(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iy(e){return it(e).direction==="rtl"}const ly={convertOffsetParentRelativeRectToViewportRelativeRect:Zb,getDocumentElement:wt,getClippingRect:ry,getOffsetParent:qc,getElementRects:sy,getClientRects:Qb,getDimensions:oy,getScale:Fn,isElement:st,isRTL:iy};function Xc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cy(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=bo(d),m=bo(o.clientWidth-(p+h)),v=bo(o.clientHeight-(d+g)),b=bo(p),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ve(0,Vt(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&&!Xc(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 dy(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=qa(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?cy(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?sn(e):null;l&&v();function v(){const b=sn(e);m&&!Xc(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 uy=Hb,fy=Vb,py=Bb,hy=Gb,gy=zb,Zc=$b,my=Yb,vy=(e,t,n)=>{const r=new Map,o={platform:ly,...n},a={...o.platform,_c:r};return Wb(e,t,{...o,platform:a})};var by=typeof document<"u",yy=function(){},ko=by?S.useLayoutEffect:yy;function Mo(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(!Mo(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)&&!Mo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Qc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jc(e,t){const n=Qc(e);return Math.round(t*n)/n}function Za(e){const t=f.useRef(e);return ko(()=>{t.current=e}),t}function wy(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);Mo(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!==k.current&&(k.current=G,b(G))},[]),N=a||w,M=s||v,C=f.useRef(null),k=f.useRef(null),D=f.useRef(p),E=l!=null,I=Za(l),R=Za(o),z=Za(u),q=f.useCallback(()=>{if(!C.current||!k.current)return;const G={placement:t,strategy:n,middleware:h};R.current&&(G.platform=R.current),vy(C.current,k.current,G).then(A=>{const Q={...A,isPositioned:z.current!==!1};Y.current&&!Mo(D.current,Q)&&(D.current=Q,jr.flushSync(()=>{d(Q)}))})},[h,t,n,R,z]);ko(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(G=>({...G,isPositioned:!1})))},[u]);const Y=f.useRef(!1);ko(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ko(()=>{if(N&&(C.current=N),M&&(k.current=M),N&&M){if(I.current)return I.current(N,M,q);q()}},[N,M,q,I,E]);const ae=f.useMemo(()=>({reference:C,floating:k,setReference:y,setFloating:x}),[y,x]),B=f.useMemo(()=>({reference:N,floating:M}),[N,M]),K=f.useMemo(()=>{const G={position:n,left:0,top:0};if(!B.floating)return G;const A=Jc(B.floating,p.x),Q=Jc(B.floating,p.y);return i?{...G,transform:"translate("+A+"px, "+Q+"px)",...Qc(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 xy=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?Zc({element:r.current,padding:o}).fn(n):{}:r?Zc({element:r,padding:o}).fn(n):{}}}},Cy=(e,t)=>{const n=uy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sy=(e,t)=>{const n=fy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ny=(e,t)=>({fn:my(e).fn,options:[e,t]}),ky=(e,t)=>{const n=py(e);return{name:n.name,fn:n.fn,options:[e,t]}},My=(e,t)=>{const n=hy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dy=(e,t)=>{const n=gy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ey=(e,t)=>{const n=xy(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ty="Arrow",ed=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"})})});ed.displayName=Ty;var Py=ed;function _y(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 Qa="Popper",[td,Gt]=Ze(Qa),[Oy,nd]=td(Qa),rd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return c.jsx(Oy,{scope:t,anchor:r,onAnchorChange:o,children:n})};rd.displayName=Qa;var od="PopperAnchor",ad=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=nd(od,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})});ad.displayName=od;var Ja="PopperContent",[Iy,Ay]=td(Ja),sd=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=nd(Ja,n),[b,y]=f.useState(null),x=he(t,Me=>y(Me)),[N,M]=f.useState(null),C=_y(N),k=(C==null?void 0:C.width)??0,D=(C==null?void 0:C.height)??0,E=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(Wy),altBoundary:z},{refs:Y,floatingStyles:ae,placement:B,isPositioned:K,middlewareData:G}=wy({strategy:"fixed",placement:E,whileElementsMounted:(...Me)=>dy(...Me,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Cy({mainAxis:o+D,alignmentAxis:s}),l&&Sy({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Ny():void 0,...q}),l&&ky({...q}),My({...q,apply:({elements:Me,rects:Ee,availableWidth:tt,availableHeight:Ue})=>{const{width:Fe,height:Zt}=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",`${Zt}px`)}}),N&&Ey({element:N,padding:i}),$y({arrowWidth:k,arrowHeight:D}),h&&Dy({strategy:"referenceHidden",...q})]}),[A,Q]=cd(B),oe=ot(w);Pe(()=>{K&&(oe==null||oe())},[K,oe]);const O=(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(Iy,{scope:n,placedSide:A,onArrowChange:M,arrowX:O,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"}})})})});sd.displayName=Ja;var id="PopperArrow",Fy={top:"bottom",right:"left",bottom:"top",left:"right"},ld=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Ay(id,r),s=Fy[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(Py,{...o,ref:n,style:{...o.style,display:"block"}})})});ld.displayName=id;function Wy(e){return e!==null}var $y=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]=cd(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 cd(e){const[t,n="center"]=e.split("-");return[t,n]}var ur=rd,fr=ad,Do=sd,Eo=ld,To="Popover",[dd]=Ze(To,[Gt]),pr=Gt(),[By,jt]=dd(To),ud=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:To});return c.jsx(ur,{...i,children:c.jsx(By,{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})})};ud.displayName=To;var fd="PopoverAnchor",pd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(fd,n),a=pr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(fr,{...a,...r,ref:t})});pd.displayName=fd;var hd="PopoverTrigger",gd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(hd,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":xd(o.open),...r,ref:s,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(fr,{asChild:!0,...a,children:i})});gd.displayName=hd;var es="PopoverPortal",[zy,Ly]=dd(es,{forceMount:void 0}),md=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=jt(es,t);return c.jsx(zy,{scope:t,forceMount:n,children:c.jsx(Be,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};md.displayName=es;var Wn="PopoverContent",vd=f.forwardRef((e,t)=>{const n=Ly(Wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=jt(Wn,e.__scopePopover);return c.jsx(Be,{present:r||a.open,children:a.modal?c.jsx(Vy,{...o,ref:t}):c.jsx(Yy,{...o,ref:t})})});vd.displayName=Wn;var Hy=tn("PopoverContent.RemoveScroll"),Vy=f.forwardRef((e,t)=>{const n=jt(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 lo(s)},[]),c.jsx(ar,{as:Hy,allowPinchZoom:!0,children:c.jsx(bd,{...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})})})}),Yy=f.forwardRef((e,t)=>{const n=jt(Wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return c.jsx(bd,{...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()}})}),bd=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=jt(Wn,n),g=pr(n);return eo(),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(Do,{"data-state":xd(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)"}})})})}),yd="PopoverClose",wd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(yd,n);return c.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});wd.displayName=yd;var Gy="PopoverArrow",jy=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=pr(n);return c.jsx(Eo,{...o,...r,ref:t})});jy.displayName=Gy;function xd(e){return e?"open":"closed"}var Uy=ud,Ry=pd,Ky=gd,qy=md,Cd=vd,Xy=wd;const ln=Uy,hr=Ky,Zy=Xy,Qy=Ry,Ut=f.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>c.jsx(qy,{children:c.jsx(Cd,{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})}));Ut.displayName=Cd.displayName;const Sd=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(ln,{...s,children:[c.jsx(hr,{asChild:!0,children:t}),c.jsx(Ut,{side:n,align:r,sideOffset:o,className:a,children:e})]});Sd.displayName="Popover";const Nd=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}}),ts=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(Nd({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"})]}));ts.displayName="ComboBoxTrigger";const kd=f.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>c.jsx(Ut,{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(po,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),c.jsx(ho,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));kd.displayName="ComboBoxContent";const Md=f.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>c.jsxs(fo,{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(nn,{className:"size-4","aria-hidden":"true"})}),t]}));Md.displayName="ComboBoxItem";const Dd=f.forwardRef(({className:e,children:t,...n},r)=>c.jsx(go,{ref:r,className:P("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));Dd.displayName="ComboBoxEmpty";const Ed=f.forwardRef(({className:e,heading:t,children:n,...r},o)=>c.jsx(Ec,{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}));Ed.displayName="ComboBoxGroup";const Td=f.forwardRef(({className:e,...t},n)=>c.jsx(Tc,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Td.displayName="ComboBoxSeparator";const Pd=ln;Pd.displayName="ComboBoxRoot";const _d=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(ln,{open:d,onOpenChange:v,children:[c.jsx(hr,{asChild:!0,children:c.jsx(ts,{ref:p,size:s,isError:i,disabled:l,className:u,placeholder:r,"aria-expanded":d,"aria-haspopup":"listbox",children:m})}),c.jsx(Ut,{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(po,{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(ho,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(go,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(b=>c.jsxs(fo,{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(nn,{className:"size-4","aria-hidden":"true"})}),b.label]},b.value))]})]})})]})});_d.displayName="ComboBox";const Jy=new Set(["contains","equals","startsWith","endsWith","notContains","empty","notEmpty"]);function ns(e){return Jy.has(e)}const rs=[{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 ew(e,t){const n=e.getValue(t);return n==null?"":typeof n=="string"?n:String(n)}const os=(e,t,n,r)=>{const o=ew(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||!ns(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 tw(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(ns(t.op))return{op:t.op,value:t.value??""}}return{op:"contains",value:""}}function nw(e){if(!(e.op==="contains"&&e.value.trim()===""))return e}const as=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})}));as.displayName="Table";const ss=f.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:P("[&_tr]:border-b [&_tr]:border-border",e),...t}));ss.displayName="TableHeader";const is=f.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:P("[&_tr:last-child]:border-0",e),...t}));is.displayName="TableBody";const ls=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}));ls.displayName="TableFooter";const _t=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}));_t.displayName="TableRow";const Po=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}));Po.displayName="TableHead";const cn=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}));cn.displayName="TableCell";const Od=f.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:P("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Od.displayName="TableCaption";const cs=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("animate-pulse rounded-md bg-muted",e),...t}));cs.displayName="Skeleton";const Id=f.createContext({inGroup:!1}),Ad=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(Id);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(Ad({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 ds=f.forwardRef(({className:e,isError:t,children:n,...r},o)=>c.jsx(Id,{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})}));ds.displayName="InputGroup";const us=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}));us.displayName="InputAddon";const fs=f.forwardRef(({className:e,...t},n)=>c.jsx("nav",{ref:n,"aria-label":"Pagination",className:P("flex items-center gap-1",e),...t}));fs.displayName="PaginationRoot";const ps=["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(" "),hs=f.forwardRef(({className:e,isActive:t,...n},r)=>c.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:P(ps,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));hs.displayName="PaginationItem";const gs=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Previous page",className:P(ps,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(el,{className:"size-4"})}));gs.displayName="PaginationPrev";const ms=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Next page",className:P(ps,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(wn,{className:"size-4"})}));ms.displayName="PaginationNext";const vs=({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(Kg,{className:"size-4"})});vs.displayName="PaginationEllipsis";function rw(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 bs=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=rw(e,t,r);return c.jsxs(fs,{className:o,...a,children:[c.jsx(gs,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?c.jsx(vs,{},i):c.jsx(hs,{isActive:i===e,onClick:()=>n(i),children:i},i)),c.jsx(ms,{onClick:()=>n(e+1),disabled:e>=t})]})};bs.displayName="Pagination";function Fd(e,[t,n]){return Math.min(n,Math.max(t,e))}function ow(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 Wd=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"}),aw="VisuallyHidden",$d=f.forwardRef((e,t)=>c.jsx(ne.span,{...e,ref:t,style:{...Wd,...e.style}}));$d.displayName=aw;var sw=$d,iw=[" ","Enter","ArrowUp","ArrowDown"],lw=[" ","Enter"],dn="Select",[_o,Oo,cw]=Ur(dn),[$n]=Ze(dn,[cw,Gt]),Io=Gt(),[dw,Rt]=$n(dn),[uw,fw]=$n(dn),Bd=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=Io(t),[v,b]=f.useState(null),[y,x]=f.useState(null),[N,M]=f.useState(!1),C=tr(u),[k,D]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:dn}),[E,I]=Qe({prop:s,defaultProp:i,onChange:l,caller:dn}),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(dw,{required:g,scope:t,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:M,contentId:xe(),value:E,onValueChange:I,open:k,onOpenChange:D,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[c.jsx(_o.Provider,{scope:t,children:c.jsx(uw,{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(lu,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:d,value:E,onChange:B=>I(B.target.value),disabled:h,form:w,children:[E===void 0?c.jsx("option",{value:""}):null,Array.from(q)]},ae):null]})})};Bd.displayName=dn;var zd="SelectTrigger",Ld=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Io(n),s=Rt(zd,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=Oo(n),p=f.useRef("touch"),[d,h,g]=du(m=>{const v=u().filter(x=>!x.disabled),b=v.find(x=>x.value===s.value),y=uu(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":cu(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===" ")&&iw.includes(m.key)&&(w(),m.preventDefault())})})})});Ld.displayName=zd;var Hd="SelectValue",Vd=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Rt(Hd,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:cu(l.value)?c.jsx(c.Fragment,{children:s}):a})});Vd.displayName=Hd;var pw="SelectIcon",hw=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});hw.displayName=pw;var gw="SelectPortal",Yd=e=>c.jsx(kn,{asChild:!0,...e});Yd.displayName=gw;var un="SelectContent",Gd=f.forwardRef((e,t)=>{const n=Rt(un,e.__scopeSelect),[r,o]=f.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?jr.createPortal(c.jsx(jd,{scope:e.__scopeSelect,children:c.jsx(_o.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(Ud,{...e,ref:t})});Gd.displayName=un;var lt=10,[jd,Kt]=$n(un),mw="SelectContentImpl",vw=tn("SelectContent.RemoveScroll"),Ud=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=Rt(un,n),[x,N]=f.useState(null),[M,C]=f.useState(null),k=he(t,W=>N(W)),[D,E]=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 lo(x)},[x]),eo();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&&M&&(M.scrollTop=0),ce===se&&M&&(M.scrollTop=M.scrollHeight),ce==null||ce.focus(),document.activeElement!==de))return},[z,M]),K=f.useCallback(()=>B([D,x]),[B,D,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]=du(W=>{const U=z().filter(de=>!de.disabled),X=U.find(de=>de.ref.current===document.activeElement),se=uu(U,W,X);se&&setTimeout(()=>se.ref.current.focus())}),O=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&(E(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"?ys:Rd,Z=$===ys?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:d,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return c.jsx(jd,{scope:n,content:x,viewport:M,onViewportChange:C,itemRefCallback:O,selectedItem:D,onItemLeave:F,itemTextRefCallback:V,focusSelectedItem:K,selectedItemText:I,position:r,isPositioned:q,searchRef:Q,children:c.jsx(ar,{as:vw,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:k,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()}})})})})})})});Ud.displayName=mw;var bw="SelectItemAlignedPosition",Rd=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Rt(un,n),s=Kt(un,n),[i,l]=f.useState(null),[u,p]=f.useState(null),d=he(t,k=>p(k)),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 k=a.trigger.getBoundingClientRect(),D=u.getBoundingClientRect(),E=a.valueNode.getBoundingClientRect(),I=b.getBoundingClientRect();if(a.dir!=="rtl"){const de=I.left-D.left,ce=E.left-de,Me=k.left-ce,Ee=k.width+Me,tt=Math.max(Ee,D.width),Ue=window.innerWidth-lt,Fe=Fd(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.left=Fe+"px"}else{const de=D.right-I.right,ce=window.innerWidth-E.right-de,Me=window.innerWidth-k.right-ce,Ee=k.width+Me,tt=Math.max(Ee,D.width),Ue=window.innerWidth-lt,Fe=Fd(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),O=parseInt(oe.paddingTop,10),F=parseInt(oe.paddingBottom,10),V=k.top+k.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?O: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[N,M]=f.useState();Pe(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(k=>{k&&w.current===!0&&(x(),y==null||y(),w.current=!1)},[x,y]);return c.jsx(ww,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:c.jsx(ne.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Rd.displayName=bw;var yw="SelectPopperPosition",ys=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...a}=e,s=Io(n);return c.jsx(Do,{...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)"}})});ys.displayName=yw;var[ww,ws]=$n(un,{}),xs="SelectViewport",Kd=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Kt(xs,n),s=ws(xs,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(_o.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),N=y-x;d.style.height=x+"px",d.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,d.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});Kd.displayName=xs;var qd="SelectGroup",[xw,Cw]=$n(qd),Xd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xe();return c.jsx(xw,{scope:n,id:o,children:c.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Xd.displayName=qd;var Zd="SelectLabel",Qd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Cw(Zd,n);return c.jsx(ne.div,{id:o.id,...r,ref:t})});Qd.displayName=Zd;var Ao="SelectItem",[Sw,Jd]=$n(Ao),eu=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Rt(Ao,n),l=Kt(Ao,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(Sw,{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(_o.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 N;((N=l.searchRef)==null?void 0:N.current)!==""&&y.key===" "||(lw.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});eu.displayName=Ao;var mr="SelectItemText",tu=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Rt(mr,n),i=Kt(mr,n),l=Jd(mr,n),u=fw(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?jr.createPortal(a.children,s.valueNode):null]})});tu.displayName=mr;var nu="SelectItemIndicator",ru=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Jd(nu,n).isSelected?c.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});ru.displayName=nu;var Cs="SelectScrollUpButton",ou=f.forwardRef((e,t)=>{const n=Kt(Cs,e.__scopeSelect),r=ws(Cs,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(su,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});ou.displayName=Cs;var Ss="SelectScrollDownButton",au=f.forwardRef((e,t)=>{const n=Kt(Ss,e.__scopeSelect),r=ws(Ss,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(su,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});au.displayName=Ss;var su=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Kt("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()})})}),Nw="SelectSeparator",iu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});iu.displayName=Nw;var Ns="SelectArrow",kw=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Io(n),a=Rt(Ns,n),s=Kt(Ns,n);return a.open&&s.position==="popper"?c.jsx(Eo,{...o,...r,ref:t}):null});kw.displayName=Ns;var Mw="SelectBubbleInput",lu=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=ow(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:{...Wd,...n.style},ref:a,defaultValue:t})});lu.displayName=Mw;function cu(e){return e===""||e===void 0}function du(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 uu(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=Dw(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 Dw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ew=Bd,fu=Ld,Tw=Vd,Pw=Yd,pu=Gd,_w=Kd,Ow=Xd,hu=Qd,gu=eu,Iw=tu,Aw=ru,mu=ou,vu=au,bu=iu;const yu=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}}),ks=Ew,Fw=Ow,Ms=Tw,Fo=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>c.jsxs(fu,{ref:a,className:P("group",yu({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"})]}));Fo.displayName=fu.displayName;const Ds=f.forwardRef(({className:e,...t},n)=>c.jsx(mu,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:c.jsx(Qr,{className:"size-4"})}));Ds.displayName=mu.displayName;const Es=f.forwardRef(({className:e,...t},n)=>c.jsx(vu,{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"})}));Es.displayName=vu.displayName;const Wo=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>c.jsx(Pw,{children:c.jsxs(pu,{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(Ds,{}),c.jsx(_w,{className:"p-1",children:t}),c.jsx(Es,{})]})}));Wo.displayName=pu.displayName;const wu=f.forwardRef(({className:e,...t},n)=>c.jsx(hu,{ref:n,className:P("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));wu.displayName=hu.displayName;const Ts=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(gu,{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(Aw,{children:c.jsx(nn,{className:"size-4"})})}),c.jsx(Iw,{children:t})]}));Ts.displayName=gu.displayName;const xu=f.forwardRef(({className:e,...t},n)=>c.jsx(bu,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));xu.displayName=bu.displayName;const Cu=f.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>c.jsxs(ks,{disabled:r,...s,children:[c.jsx(Fo,{ref:i,size:t,isError:n,className:o,children:c.jsx(Ms,{placeholder:e})}),c.jsx(Wo,{children:a})]}));Cu.displayName="Select";var Ps="rovingFocusGroup.onEntryFocus",Ww={bubbles:!1,cancelable:!0},vr="RovingFocusGroup",[_s,Su,$w]=Ur(vr),[Bw,$o]=Ze(vr,[$w]),[zw,Lw]=Bw(vr),Nu=f.forwardRef((e,t)=>c.jsx(_s.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(_s.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Hw,{...e,ref:t})})}));Nu.displayName=vr;var Hw=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),N=Su(n),M=f.useRef(!1),[C,k]=f.useState(0);return f.useEffect(()=>{const D=h.current;if(D)return D.addEventListener(Ps,x),()=>D.removeEventListener(Ps,x)},[x]),c.jsx(zw,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(D=>v(D),[v]),onItemShiftTab:f.useCallback(()=>y(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(D=>D+1),[]),onFocusableItemRemove:f.useCallback(()=>k(D=>D-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,()=>{M.current=!0}),onFocus:j(e.onFocus,D=>{const E=!M.current;if(D.target===D.currentTarget&&E&&!b){const I=new CustomEvent(Ps,Ww);if(D.currentTarget.dispatchEvent(I),!I.defaultPrevented){const R=N().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);Du(ae,p)}}M.current=!1}),onBlur:j(e.onBlur,()=>y(!1))})})}),ku="RovingFocusGroupItem",Mu=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=Lw(ku,n),d=p.currentTabStopId===u,h=Su(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=p;return f.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),c.jsx(_s.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=Gw(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(N=>N.focusable).map(N=>N.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const N=x.indexOf(v.currentTarget);x=p.loop?jw(x,N+1):x.slice(N+1)}setTimeout(()=>Du(x))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:m!=null}):s})})});Mu.displayName=ku;var Vw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Gw(e,t,n){const r=Yw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Vw[r]}function Du(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function jw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Eu=Nu,Tu=Mu,Os=["Enter"," "],Uw=["ArrowDown","PageUp","Home"],Pu=["ArrowUp","PageDown","End"],Rw=[...Uw,...Pu],Kw={ltr:[...Os,"ArrowRight"],rtl:[...Os,"ArrowLeft"]},qw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},br="Menu",[yr,Xw,Zw]=Ur(br),[fn,_u]=Ze(br,[Zw,Gt,$o]),wr=Gt(),Ou=$o(),[Iu,qt]=fn(br),[Qw,xr]=fn(br),Au=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(Iu,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:c.jsx(Qw,{scope:t,onClose:f.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:p,dir:h,modal:s,children:r})})})};Au.displayName=br;var Jw="MenuAnchor",Is=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(fr,{...o,...r,ref:t})});Is.displayName=Jw;var As="MenuPortal",[ex,Fu]=fn(As,{forceMount:void 0}),Wu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=qt(As,t);return c.jsx(ex,{scope:t,forceMount:n,children:c.jsx(Be,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};Wu.displayName=As;var Je="MenuContent",[tx,Fs]=fn(Je),$u=f.forwardRef((e,t)=>{const n=Fu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(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(nx,{...o,ref:t}):c.jsx(rx,{...o,ref:t})})})})}),nx=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return lo(a)},[]),c.jsx(Ws,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),rx=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu);return c.jsx(Ws,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ox=tn("MenuContent.ScrollLock"),Ws=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=qt(Je,n),b=xr(Je,n),y=wr(n),x=Ou(n),N=Xw(n),[M,C]=f.useState(null),k=f.useRef(null),D=he(t,k,v.onContentChange),E=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:ox,allowPinchZoom:!0}:void 0,K=A=>{var W,U;const Q=I.current+A,oe=N().filter(X=>!X.disabled),O=document.activeElement,F=(W=oe.find(X=>X.ref.current===O))==null?void 0:W.textValue,V=oe.map(X=>X.textValue),$=mx(V,Q,F),Z=(U=oe.find(X=>X.textValue===$))==null?void 0:U.ref.current;(function X(se){I.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>X(""),1e3))})(Q),Z&&setTimeout(()=>Z.focus())};f.useEffect(()=>()=>window.clearTimeout(E.current),[]),eo();const G=f.useCallback(A=>{var oe,O;return q.current===((oe=z.current)==null?void 0:oe.side)&&bx(A,(O=z.current)==null?void 0:O.area)},[]);return c.jsx(tx,{scope:n,searchRef:I,onItemEnter:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),onItemLeave:f.useCallback(A=>{var Q;G(A)||((Q=k.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=k.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(Eu,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:C,onEntryFocus:j(l,A=>{b.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Do,{role:"menu","aria-orientation":"vertical","data-state":tf(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...m,ref:D,style:{outline:"none",...m.style},onKeyDown:j(m.onKeyDown,A=>{const oe=A.target.closest("[data-radix-menu-content]")===A.currentTarget,O=A.ctrlKey||A.altKey||A.metaKey,F=A.key.length===1;oe&&(A.key==="Tab"&&A.preventDefault(),!O&&F&&K(A.key));const V=k.current;if(A.target!==V||!Rw.includes(A.key))return;A.preventDefault();const Z=N().filter(W=>!W.disabled).map(W=>W.ref.current);Pu.includes(A.key)&&Z.reverse(),hx(Z)}),onBlur:j(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(E.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 O=A.clientX>Y.current?"right":"left";q.current=O,Y.current=A.clientX}}))})})})})})})});$u.displayName=Je;var ax="MenuGroup",$s=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"group",...r,ref:t})});$s.displayName=ax;var sx="MenuLabel",Bu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{...r,ref:t})});Bu.displayName=sx;var Bo="MenuItem",zu="menu.itemSelect",zo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=xr(Bo,e.__scopeMenu),i=Fs(Bo,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),p=()=>{const d=a.current;if(!n&&d){const h=new CustomEvent(zu,{bubbles:!0,cancelable:!0});d.addEventListener(zu,g=>r==null?void 0:r(g),{once:!0}),Wi(d,h),h.defaultPrevented?u.current=!1:s.onClose()}};return c.jsx(Lu,{...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===" "||Os.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});zo.displayName=Bo;var Lu=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Fs(Bo,n),i=Ou(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(Tu,{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))})})})}),ix="MenuCheckboxItem",Hu=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Uu,{scope:e.__scopeMenu,checked:n,children:c.jsx(zo,{role:"menuitemcheckbox","aria-checked":Lo(n)?"mixed":n,...o,ref:t,"data-state":Ls(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(Lo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Hu.displayName=ix;var Vu="MenuRadioGroup",[lx,cx]=fn(Vu,{value:void 0,onValueChange:()=>{}}),Yu=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ot(r);return c.jsx(lx,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c.jsx($s,{...o,ref:t})})});Yu.displayName=Vu;var Gu="MenuRadioItem",ju=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=cx(Gu,e.__scopeMenu),a=n===o.value;return c.jsx(Uu,{scope:e.__scopeMenu,checked:a,children:c.jsx(zo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ls(a),onSelect:j(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});ju.displayName=Gu;var Bs="MenuItemIndicator",[Uu,dx]=fn(Bs,{checked:!1}),Ru=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=dx(Bs,n);return c.jsx(Be,{present:r||Lo(a.checked)||a.checked===!0,children:c.jsx(ne.span,{...o,ref:t,"data-state":Ls(a.checked)})})});Ru.displayName=Bs;var ux="MenuSeparator",Ku=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ku.displayName=ux;var fx="MenuArrow",qu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(Eo,{...o,...r,ref:t})});qu.displayName=fx;var zs="MenuSub",[px,Xu]=fn(zs),Zu=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=qt(zs,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(Iu,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:p,children:c.jsx(px,{scope:t,contentId:xe(),triggerId:xe(),trigger:i,onTriggerChange:l,children:n})})})};Zu.displayName=zs;var Cr="MenuSubTrigger",Qu=f.forwardRef((e,t)=>{const n=qt(Cr,e.__scopeMenu),r=xr(Cr,e.__scopeMenu),o=Xu(Cr,e.__scopeMenu),a=Fs(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(Is,{asChild:!0,...u,children:c.jsx(Lu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":tf(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===" "||Kw[r.dir].includes(d.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),d.preventDefault())})})})});Qu.displayName=Cr;var Ju="MenuSubContent",ef=f.forwardRef((e,t)=>{const n=Fu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(Je,e.__scopeMenu),s=xr(Je,e.__scopeMenu),i=Xu(Ju,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(Ws,{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=qw[s.dir].includes(p.key);d&&h&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});ef.displayName=Ju;function tf(e){return e?"open":"closed"}function Lo(e){return e==="indeterminate"}function Ls(e){return Lo(e)?"indeterminate":e?"checked":"unchecked"}function hx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function mx(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=gx(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 vx(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 bx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return vx(n,t)}function Sr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var yx=Au,wx=Is,xx=Wu,Cx=$u,Sx=$s,Nx=Bu,kx=zo,Mx=Hu,Dx=Yu,Ex=ju,Tx=Ru,Px=Ku,_x=qu,Ox=Zu,Ix=Qu,Ax=ef,Ho="DropdownMenu",[Fx]=Ze(Ho,[_u]),Ie=_u(),[Wx,nf]=Fx(Ho),rf=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:Ho});return c.jsx(Wx,{scope:t,triggerId:xe(),triggerRef:u,contentId:xe(),open:p,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(h=>!h),[d]),modal:i,children:c.jsx(yx,{...l,open:p,onOpenChange:d,dir:r,modal:i,children:n})})};rf.displayName=Ho;var of="DropdownMenuTrigger",af=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=nf(of,n),s=Ie(n);return c.jsx(wx,{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())})})})});af.displayName=of;var $x="DropdownMenuPortal",sf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ie(t);return c.jsx(xx,{...r,...n})};sf.displayName=$x;var lf="DropdownMenuContent",cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nf(lf,n),a=Ie(n),s=f.useRef(!1);return c.jsx(Cx,{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)"}})});cf.displayName=lf;var Bx="DropdownMenuGroup",df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Sx,{...o,...r,ref:t})});df.displayName=Bx;var zx="DropdownMenuLabel",uf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Nx,{...o,...r,ref:t})});uf.displayName=zx;var Lx="DropdownMenuItem",ff=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(kx,{...o,...r,ref:t})});ff.displayName=Lx;var Hx="DropdownMenuCheckboxItem",pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Mx,{...o,...r,ref:t})});pf.displayName=Hx;var Vx="DropdownMenuRadioGroup",hf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Dx,{...o,...r,ref:t})});hf.displayName=Vx;var Yx="DropdownMenuRadioItem",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ex,{...o,...r,ref:t})});gf.displayName=Yx;var Gx="DropdownMenuItemIndicator",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Tx,{...o,...r,ref:t})});mf.displayName=Gx;var jx="DropdownMenuSeparator",vf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Px,{...o,...r,ref:t})});vf.displayName=jx;var Ux="DropdownMenuArrow",Rx=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(_x,{...o,...r,ref:t})});Rx.displayName=Ux;var Kx=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(Ox,{...s,open:i,onOpenChange:l,children:n})},qx="DropdownMenuSubTrigger",bf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ix,{...o,...r,ref:t})});bf.displayName=qx;var Xx="DropdownMenuSubContent",yf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ax,{...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)"}})});yf.displayName=Xx;var Zx=rf,Qx=af,wf=sf,xf=cf,Jx=df,Cf=uf,Sf=ff,Nf=pf,e0=hf,kf=gf,Mf=mf,Df=vf,t0=Kx,Ef=bf,Tf=yf;const Vo=Zx,Yo=Qx,n0=Jx,r0=wf,Hs=t0,Pf=e0,Nr=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(wf,{children:c.jsx(xf,{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=xf.displayName;const Ot=f.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>c.jsx(Sf,{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}));Ot.displayName=Sf.displayName;const Vs=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>c.jsxs(Nf,{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(Mf,{children:c.jsx(nn,{className:"size-3.5"})})}),t]}));Vs.displayName=Nf.displayName;const Ys=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(kf,{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(Mf,{children:c.jsx(Gg,{className:"size-2 fill-current"})})}),t]}));Ys.displayName=kf.displayName;const kr=f.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(Cf,{ref:r,className:P("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));kr.displayName=Cf.displayName;const Bn=f.forwardRef(({className:e,...t},n)=>c.jsx(Df,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Bn.displayName=Df.displayName;const Go=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>c.jsxs(Ef,{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"})]}));Go.displayName=Ef.displayName;const jo=f.forwardRef(({className:e,...t},n)=>c.jsx(Tf,{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}));jo.displayName=Tf.displayName;const _f=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(Vo,{...s,children:[c.jsx(Yo,{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(Ot,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},l))})]});_f.displayName="DropdownMenu";const Of=f.createContext(null);function If(){return f.useContext(Of)}const Af="application/x-bookers-grouping-column-id",Mr="application/x-bookers-grouping-chip",It="bookers-expand";function Ff(e){return"columns"in e&&e.columns&&e.columns.length>0?e.columns.some(Ff):e.footer!==void 0}function o0(){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 Wf(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 Uo(e,t,n){return Math.min(Math.max(e,t),n)}function a0({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=Uo(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(Uo(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(Xg,{className:"size-3 shrink-0",strokeWidth:1.5,"aria-hidden":!0}),c.jsx("span",{className:"h-px w-6 bg-border/50"})]})})}function s0({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($t,{className:"size-3.5","aria-hidden":!0})}):null]})}function i0({column:e,id:t,showClear:n}){var d;const r=e.getFilterValue(),o=tw(r),a=o.op,s=o.value,i=a!=="empty"&&a!=="notEmpty",l=h=>{e.setFilterValue(nw(h))},u=((d=rs.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(ds,{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(us,{className:"p-0",children:c.jsxs(Vo,{children:[c.jsx(Yo,{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(Pf,{value:a,onValueChange:h=>{ns(h)&&l({op:h,value:h==="empty"||h==="notEmpty"?"":s})},children:rs.map(h=>c.jsx(Ys,{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($t,{className:"size-3.5","aria-hidden":!0})}):null]})}function l0({column:e,enableAdvancedColumnFilters:t,showColumnFilterClear:n}){const r=e.id,o=e.columnDef.filterFn;return t&&(o===void 0||o===os)?c.jsx(i0,{column:e,id:r,showClear:n}):c.jsx(s0,{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 $f(e){return e.subRows.length===0?e.getIsGrouped()?0:1:e.subRows.reduce((t,n)=>t+$f(n),0)}function c0({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(ks,{value:String(a),onValueChange:d=>{e.setPageSize(Number(d))},children:[c.jsx(Fo,{size:"sm",className:"w-18","aria-label":"Rows per page",children:c.jsx(Ms,{})}),c.jsx(Wo,{children:p.map(d=>c.jsx(Ts,{value:String(d),children:d},d))})]})]}),c.jsx(bs,{page:o+1,totalPages:Math.max(1,u),onPageChange:d=>e.setPageIndex(d-1),siblingCount:r})]})]})}function d0({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:N=!1,defaultColumnPinning:M,columnPinning:C,onColumnPinningChange:k,enableGlobalFilter:D=!1,showGlobalFilter:E=!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:O,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:Zt,enableColumnVisibility:De=!1,defaultColumnVisibility:Br,columnVisibility:zr,onColumnVisibilityChange:_e,enableVirtualization:ft=!1,virtualScrollContainerHeight:We="min(35rem, 70vh)",virtualRowEstimateSize:gn=48,virtualOverscan:Qt=8,enableFooter:Un=!1,enableScrollContainerResize:kt=!1,scrollContainerResizeMaxHeight:Jt="min(90vh, 80rem)",scrollContainerResizeMinHeight:Le="8rem",enablePagination:Rn=!1,manualPagination:pt=!1,rowCount:Kn,pageCount:qn,defaultPagination:ht,pagination:Xn,onPaginationChange:Zn,pageSizeOptions:mn=[10,20,50,100],paginationSiblingCount:Re=1,className:ie,...pe},re){const[ue,J]=f.useState(o??[]),[te,Ne]=ct(a,s,ue,J),[Oe,en]=f.useState(l??{}),[we,Te]=ct(u,p,Oe,en),[Qn,Ke]=f.useState(g??{}),[qe,Jo]=ct(w,m,Qn,Ke),[Wt,Lh]=f.useState(b??[]),[pN,hN]=ct(y,x,Wt,Lh),[gN,mN]=f.useState(M??{left:[],right:[]}),[vN,bN]=ct(C,k,gN,mN),[yN,wN]=f.useState(R??""),[ea,ki]=ct(z,q,yN,wN),[xN,CN]=f.useState(G??[]),[SN,NN]=ct(A,Q,xN,CN),[kN,MN]=f.useState(O??{}),[DN,Hh]=ct(F,V,kN,MN),[EN,TN]=f.useState(se??[]),[Mi,Lr]=ct(de,ce,EN,TN),[PN,_N]=f.useState(Br??{}),[ON,IN]=ct(zr,_e,PN,_N),Di=!!(Rn&&!X),[AN,FN]=f.useState(()=>({pageIndex:(ht==null?void 0:ht.pageIndex)??0,pageSize:(ht==null?void 0:ht.pageSize)??10})),[WN,$N]=ct(Xn,Zn,AN,FN),BN=D||Y,vn=!!(oe&&Z&&!X),Ei=f.useMemo(()=>!vn||!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,vn,W]),zN=f.useMemo(()=>Un&&Ei.some(Ff),[Un,Ei]),Vh=f.useMemo(()=>{const _={};return d&&(_.minSize=72,_.size=160,_.maxSize=640),Y&&(_.filterFn=B?os:"includesString"),Object.keys(_).length>0?_:void 0},[d,Y,B]),ta=f.useRef(null),Jn=f.useRef(0),[LN,na]=f.useState(!1),gt=He.useReactTable({data:e,columns:Ei,getCoreRowModel:He.getCoreRowModel(),enableSorting:r,...BN?{getFilteredRowModel:He.getFilteredRowModel(),...D?{enableGlobalFilter:!0,globalFilterFn:"includesString",onGlobalFilterChange:ki}:{},...Y?{onColumnFiltersChange:NN}:{}}:{},...r?{getSortedRowModel:He.getSortedRowModel(),onSortingChange:Ne}:{},...Di?{getPaginationRowModel:He.getPaginationRowModel(),onPaginationChange:$N,...pt?{manualPagination:!0,...Kn!==void 0?{rowCount:Kn}:{},...qn!==void 0?{pageCount:qn}:{}}:{}}:{},...i?{onRowSelectionChange:Te,enableRowSelection:!0}:{},...d?{enableColumnResizing:!0,columnResizeMode:h,onColumnSizingChange:Jo}:{},...Vh?{defaultColumn:Vh}:{},...v?{onColumnOrderChange:hN}:{},enableColumnPinning:N,onColumnPinningChange:bN,...De?{enableHiding:!0,onColumnVisibilityChange:IN}:{enableHiding:!1},...vn?{enableExpanding:!0,manualExpanding:!0,getRowCanExpand:$??(()=>!0),onExpandedChange:Hh}:{},...X?{enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:He.getGroupedRowModel(),getExpandedRowModel:He.getExpandedRowModel(),onGroupingChange:Lr,onExpandedChange:Hh}:{},state:{...r?{sorting:te}:{},...i?{rowSelection:we}:{},...d?{columnSizing:qe}:{},...v?{columnOrder:pN}:{},columnPinning:vN,...D?{globalFilter:ea}:{},...Y?{columnFilters:SN}:{},...X?{grouping:Mi}:{},...X||vn?{expanded:DN}:{},...De?{columnVisibility:ON}:{},...Di?{pagination:WN}:{}},...n?{getRowId:(_,L)=>String(n(_,L))}:{}}),Hr=gt.getVisibleLeafColumns().length,Vr=gt.getRowModel().rows,Yh=f.useRef(null),er=ft&&!X&&!vn&&Vr.length>0&&!Ue,Ti=f.useRef(null),HN=f.useCallback(_=>{Ti.current=_,Yh.current=er?_:null},[er]),bn=f.useMemo(()=>{const _=o0(),L=Wf(Le,_.minPx),H=Wf(Jt,_.maxPx);return{minPx:Math.min(L,H),maxPx:Math.max(L,H)}},[Le,Jt]),[ra,Gh]=f.useState(()=>kt&&typeof We=="number"?We:null);f.useLayoutEffect(()=>{if(!kt||ra!==null)return;const _=Ti.current;_&&Gh(Uo(_.offsetHeight,bn.minPx,bn.maxPx))},[kt,ra,We,bn]);const jh=Zh.useVirtualizer({count:Vr.length,getScrollElement:()=>Yh.current,estimateSize:()=>gn,overscan:Qt,enabled:er}),VN=_=>{var nt;const L=_.column.getCanSort(),H=_.column.getIsSorted(),fe=!!((nt=_.column.columnDef.meta)!=null&&nt.bookersColumnHeaderActions);if(_.isPlaceholder)return null;if(!L||fe)return He.flexRender(_.column.columnDef.header,_.getContext());const ke=_.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(_.column.columnDef.header,_.getContext()),H==="asc"?c.jsx(Qr,{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]})},YN=(_,L)=>{!L||L===_||L===It||_===It||gt.setColumnOrder(H=>{const fe=H.length>0?H:gt.getAllLeafColumns().map(yn=>yn.id),ke=fe.indexOf(L),nt=fe.indexOf(_);if(ke===-1||nt===-1)return fe;const Xe=[...fe];if(Xe.splice(ke,1),Xe.splice(nt,0,L),W&&vn&&Xe.includes(It)){const yn=Xe.filter(Gr=>Gr!==It);return[It,...yn]}return Xe})},Pi=gt.getHeaderGroups(),Uh=Pi[0],Rh=2.5,GN=`${Pi.length*Rh}rem`,_i=_=>{const L=gt.getColumn(_);if(!L)return _;const H=L.columnDef.header;return typeof H=="string"?H:_},jN=(_,L)=>{_!==L&&Lr(H=>{const fe=[...H],ke=fe.filter(Xe=>Xe!==_),nt=ke.indexOf(L);return nt===-1?fe:(ke.splice(nt,0,_),ke)})},UN=_=>{Lr(L=>{const fe=[...L].filter(ke=>ke!==_);return fe.push(_),fe})},RN=_=>{var H;if(_.getIsPlaceholder())return null;if(_.getIsAggregated())return He.flexRender(_.column.columnDef.aggregatedCell??_.column.columnDef.cell,_.getContext());const L=!!((H=_.column.columnDef.meta)!=null&&H.bookersSkipGroupRowExpand);if(X&&_.getIsGrouped()&&!L){const fe=_.row,ke=$f(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(_.column.columnDef.cell,_.getContext())}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["(",ke,")"]})]})}return He.flexRender(_.column.columnDef.cell,_.getContext())},Kh=_=>c.jsxs(f.Fragment,{children:[c.jsx(_t,{"data-selected":_.getIsSelected()?"true":void 0,children:_.getVisibleCells().map((L,H)=>{const fe=L.column.getIsPinned();return c.jsx(cn,{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&&_.depth>0?{paddingLeft:`${_.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:RN(L)},L.id)})}),vn&&_.getIsExpanded()&&Z?c.jsx(_t,{"data-expanded-detail":_.id,children:c.jsx(cn,{colSpan:Hr,className:P("border-t border-border bg-muted/30 p-4 align-top",U),children:Z(_)})}):null]},_.id),Yr=er?jh.getVirtualItems():[],Oi=er&&Yr.length>0,qh=Oi?Yr[0].start:0,Xh=Oi?jh.getTotalSize()-Yr[Yr.length-1].end:0,KN=kt?ra!==null?{height:ra}:{maxHeight:typeof We=="number"?`${We}px`:We,minHeight:typeof Le=="number"?`${Le}px`:Le}:{maxHeight:typeof We=="number"?`${We}px`:We};return c.jsx(Of.Provider,{value:gt,children:c.jsxs("div",{ref:re,className:P("w-full min-w-0",ie),...pe,children:[D&&E?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:ea,onChange:_=>{ki(_.target.value)},"aria-label":I,autoComplete:"off",className:P("min-w-0 w-full",ea.trim()!==""&&"pr-12")}),ea.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:()=>ki(""),children:c.jsx($t,{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",LN?"border-primary/50 bg-primary/5 ring-1 ring-inset ring-primary/40":"border-border bg-muted/30"),onDragOver:_=>{_.preventDefault();const L=Array.from(_.dataTransfer.types);_.dataTransfer.dropEffect=L.includes(Mr)?"move":"copy"},onDragEnter:_=>{_.preventDefault(),Jn.current+=1,na(!0)},onDragLeave:()=>{Jn.current-=1,Jn.current<=0&&(Jn.current=0,na(!1))},onDrop:_=>{_.preventDefault(),Jn.current=0,na(!1);const L=_.dataTransfer.getData(Mr);if(L){UN(L);return}const H=_.dataTransfer.getData(Af);if(!H)return;const fe=gt.getColumn(H);fe!=null&&fe.getCanGroup()&&Lr(ke=>{const Xe=[...ke].filter(yn=>yn!==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(em,{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:Mi.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:[Mi.map((_,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,na(!1);const fe=H.dataTransfer.getData(Mr);fe&&jN(fe,_)},children:[c.jsx("span",{draggable:!0,"aria-label":`Reorder group: ${_i(_)}`,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,_),H.dataTransfer.effectAllowed="move"},children:c.jsx(Qg,{className:"size-4","aria-hidden":!0})}),c.jsx("span",{className:"min-w-0 truncate px-1.5 font-medium text-foreground",children:_i(_)}),c.jsx("button",{type:"button","aria-label":`Remove ${_i(_)} 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:()=>{Lr(H=>[...H].filter(fe=>fe!==_))},children:c.jsx($t,{className:"size-3.5","aria-hidden":!0})})]})]},_)),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:HN,className:P("w-full min-h-0 overflow-auto [scrollbar-gutter:stable]",er&&"[overflow-anchor:none]"),style:KN,children:c.jsxs(as,{className:P(d&&"table-fixed"),style:d?{width:gt.getTotalSize(),minWidth:"100%"}:void 0,children:[c.jsxs(ss,{children:[Pi.map((_,L)=>c.jsx(_t,{children:_.headers.map(H=>{const fe=`${L*Rh}rem`,ke=H.column.getIsPinned(),nt=d&&H.column.getCanResize()&&!H.isPlaceholder,Xe=H.column.id===It,yn=v&&!H.isPlaceholder&&!Xe&&(!H.subHeaders||H.subHeaders.length===0),Gr=X&&!H.isPlaceholder&&!Xe&&H.column.getCanGroup()&&(!H.subHeaders||H.subHeaders.length===0);return c.jsxs(Po,{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 qN=$e.dataTransfer.getData("application/x-bookers-column-id")||ta.current;YN(H.column.id,qN),ta.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:[yn?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=>{ta.current=H.column.id,$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("application/x-bookers-column-id",H.column.id)},onDragEnd:()=>{ta.current=null},children:c.jsx(Zg,{className:"size-4","aria-hidden":"true"})}):null,c.jsx("span",{className:P("min-w-0 flex-1",Gr&&"cursor-grab active:cursor-grabbing"),draggable:Gr,onDragStart:Gr?$e=>{$e.dataTransfer.setData(Af,H.column.id),$e.dataTransfer.effectAllowed="copy"}:void 0,children:VN(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)})},_.id)),Y&&ae&&Uh?c.jsx(_t,{children:Uh.headers.map(_=>{const L=_.column.getIsPinned();return c.jsx(Po,{colSpan:_.colSpan,className:P("relative sticky z-30 bg-background py-2",L==="left"&&P("z-50 bg-background",!_.column.getIsLastColumn("left")&&"border-r border-border",_.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",!_.column.getIsFirstColumn("right")&&"border-l border-border",_.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:GN,...(d||L)&&!_.isPlaceholder?{width:_.getSize(),minWidth:_.getSize(),maxWidth:_.getSize()}:{},...L==="left"?{left:_.column.getStart("left")}:{},...L==="right"?{right:_.column.getAfter("right")}:{}},children:!_.isPlaceholder&&_.column.getCanFilter()?c.jsx(l0,{column:_.column,enableAdvancedColumnFilters:B,showColumnFilterClear:K}):null},`filter-${_.id}`)})}):null]}),c.jsx(is,{children:Ue?Array.from({length:Fe}).map((_,L)=>c.jsx(_t,{children:c.jsx(cn,{colSpan:Hr,children:c.jsx(cs,{className:"h-4 w-full"})})},L)):Vr.length===0?c.jsx(_t,{children:c.jsx(cn,{colSpan:Hr,className:"h-24 text-center text-sm text-muted-foreground",children:Zt??"No results."})}):Oi?c.jsxs(c.Fragment,{children:[qh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Hr,className:"h-0 border-0 p-0",style:{height:qh}})}):null,Yr.map(_=>{const L=Vr[_.index];return Kh(L)}),Xh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Hr,className:"h-0 border-0 p-0",style:{height:Xh}})}):null]}):Vr.map(_=>Kh(_))}),zN?c.jsx(ls,{className:"sticky bottom-0 z-20",children:gt.getFooterGroups().map(_=>c.jsx(_t,{children:_.headers.map(L=>{const H=L.column.getIsPinned();return c.jsx(cn,{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)})},_.id))}):null]})}),Di?c.jsx(c0,{table:gt,manualPagination:pt,pageSizeOptions:mn,paginationSiblingCount:Re}):null,kt?c.jsx(a0,{scrollRegionRef:Ti,minPx:bn.minPx,maxPx:bn.maxPx,onHeightChange:_=>Gh(Uo(_,bn.minPx,bn.maxPx))}):null]})]})})}const Bf=f.forwardRef(d0);Bf.displayName="DataTable";const u0={bookersColumnHeaderActions:!0};function f0(e){const t=e.columnDef.header;return typeof t=="string"?t:e.id}function p0({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=If(),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(Qr,{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(Vo,{children:[c.jsx(Yo,{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(Rg,{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(Ot,{onSelect:()=>{e.toggleSorting(!1)},children:[c.jsx(zg,{className:"size-4","aria-hidden":"true"}),"Ascending"]}),c.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!0)},children:[c.jsx(Bg,{className:"size-4","aria-hidden":"true"}),"Descending"]}),c.jsx(Ot,{disabled:u===!1,onSelect:()=>{e.clearSorting()},children:"Clear sort"})]}):null,i&&l?c.jsx(Bn,{}):null,l?c.jsxs(Hs,{children:[c.jsxs(Go,{children:[c.jsx(nm,{className:"size-4","aria-hidden":"true"}),"Pin column"]}),c.jsxs(jo,{children:[c.jsx(Ot,{onSelect:e.pin.bind(e,"left"),children:"Pin left"}),c.jsx(Ot,{onSelect:e.pin.bind(e,"right"),children:"Pin right"}),c.jsxs(Ot,{disabled:p===!1,onSelect:e.pin.bind(e,!1),children:[c.jsx(tm,{className:"size-4","aria-hidden":"true"}),"Unpin"]})]})]}):null,h&&d&&(i||l)?c.jsx(Bn,{}):null,h&&d?c.jsxs(Hs,{children:[c.jsxs(Go,{children:[c.jsx(Ug,{className:"size-4","aria-hidden":"true"}),"Columns"]}),c.jsxs(jo,{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(Vs,{checked:g.getIsVisible(),onCheckedChange:g.toggleVisibility.bind(g),children:f0(g)},g.id))]})]}):null]})]})]})}const zf=f.forwardRef(p0);zf.displayName="DataTableColumnHeader";const Lf=6048e5,h0=864e5,Hf=Symbol.for("constructDateFrom");function Se(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Hf in e?e[Hf](t):e instanceof Date?new e.constructor(t):new Date(t)}function ve(e,t){return Se(t||e,e)}function Vf(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(t)?Se(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Yf(e,t,n){const r=ve(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 g0={};function Dr(){return g0}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=ve(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 Gf(e,t){const n=ve(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 jf(e){const t=ve(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=ve(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Gs(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t),a=Tr(r),s=Tr(o),i=+a-jf(a),l=+s-jf(s);return Math.round((i-l)/h0)}function m0(e,t){const n=Gf(e,t),r=Se(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Er(r)}function v0(e,t,n){return Vf(e,t*7,n)}function b0(e,t,n){return Yf(e,t*12,n)}function y0(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=ve(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function w0(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=ve(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function x0(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return+Tr(r)==+Tr(o)}function Uf(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function C0(e){return!(!Uf(e)&&typeof e!="number"||isNaN(+ve(e)))}function Rf(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 S0(e,t){const n=ve(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 Kf(e,t){const[n,r]=Ln(e,t.start,t.end);return{start:n,end:r}}function N0(e,t){const{start:n,end:r}=Kf(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 k0(e,t){const n=ve(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function M0(e,t){const n=ve(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 qf(e,t){const n=ve(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function D0(e,t){const{start:n,end:r}=Kf(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 Xf(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=ve(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 E0(e,t){return Xf(e,{...t,weekStartsOn:1})}const T0={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"}},P0=(e,t,n)=>{let r;const o=T0[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 js(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const _0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},O0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},I0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},A0={date:js({formats:_0,defaultWidth:"full"}),time:js({formats:O0,defaultWidth:"full"}),dateTime:js({formats:I0,defaultWidth:"full"})},F0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},W0=(e,t,n,r)=>F0[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 $0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},B0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z0={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"]},L0={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"]},H0={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"}},V0={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"}},Y0={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:$0,defaultWidth:"wide"}),quarter:Pr({values:B0,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pr({values:z0,defaultWidth:"wide"}),day:Pr({values:L0,defaultWidth:"wide"}),dayPeriod:Pr({values:H0,defaultWidth:"wide",formattingValues:V0,defaultFormattingWidth:"wide"})};function _r(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)?j0(i,d=>d.test(s)):G0(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 G0(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function j0(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function U0(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 R0=/^(\d+)(th|st|nd|rd)?/i,K0=/\d+/i,q0={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},X0={any:[/^b/i,/^(a|c)/i]},Z0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Q0={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},eC={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]},tC={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},nC={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]},rC={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},oC={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}},aC={ordinalNumber:U0({matchPattern:R0,parsePattern:K0,valueCallback:e=>parseInt(e,10)}),era:_r({matchPatterns:q0,defaultMatchWidth:"wide",parsePatterns:X0,defaultParseWidth:"any"}),quarter:_r({matchPatterns:Z0,defaultMatchWidth:"wide",parsePatterns:Q0,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_r({matchPatterns:J0,defaultMatchWidth:"wide",parsePatterns:eC,defaultParseWidth:"any"}),day:_r({matchPatterns:tC,defaultMatchWidth:"wide",parsePatterns:nC,defaultParseWidth:"any"}),dayPeriod:_r({matchPatterns:rC,defaultMatchWidth:"any",parsePatterns:oC,defaultParseWidth:"any"})},Hn={code:"en-US",formatDistance:P0,formatLong:A0,formatRelative:W0,localize:Y0,match:aC,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sC(e,t){const n=ve(e,t==null?void 0:t.in);return Gs(n,qf(n))+1}function Us(e,t){const n=ve(e,t==null?void 0:t.in),r=+Er(n)-+m0(n);return Math.round(r/Lf)+1}function Zf(e,t){var p,d,h,g;const n=ve(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 iC(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=Zf(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 Rs(e,t){const n=ve(e,t==null?void 0:t.in),r=+zn(n,t)-+iC(n,t);return Math.round(r/Lf)+1}function ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xt={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"},Qf={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 Xt.y(e,t)},Y:function(e,t,n,r){const o=Zf(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=Gf(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 Xt.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=Rs(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ge(o,t.length)},I:function(e,t,n){const r=Us(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"}):Xt.d(e,t)},D:function(e,t,n){const r=sC(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 Xt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xt.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"}):Xt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xt.s(e,t)},S:function(e,t){return Xt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ep(r);case"XXXX":case"XX":return pn(r);case"XXXXX":case"XXX":default:return pn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ep(r);case"xxxx":case"xx":return pn(r);case"xxxxx":case"xxx":default:return pn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Jf(r,":");case"OOOO":default:return"GMT"+pn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Jf(r,":");case"zzzz":default:return"GMT"+pn(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 Jf(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 ep(e,t){return e%60===0?(e>0?"-":"+")+ge(Math.abs(e)/60,2):pn(e,t)}function pn(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 tp=(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"})}},np=(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"})}},lC={p:np,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return tp(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}}",tp(r,t)).replace("{{time}}",np(o,t))}},cC=/^D+$/,dC=/^Y+$/,uC=["D","DD","YY","YYYY"];function fC(e){return cC.test(e)}function pC(e){return dC.test(e)}function hC(e,t,n){const r=gC(e,t,n);if(console.warn(r),uC.includes(e))throw new RangeError(r)}function gC(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 mC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bC=/^'([^]*?)'?$/,yC=/''/g,wC=/[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=ve(e,n==null?void 0:n.in);if(!C0(i))throw new RangeError("Invalid time value");let l=t.match(vC).map(y=>{const x=y[0];if(x==="p"||x==="P"){const N=lC[x];return N(y,o.formatLong)}return y}).join("").match(mC).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const x=y[0];if(x==="'")return{isToken:!1,value:xC(y)};if(Qf[x])return{isToken:!0,value:y};if(x.match(wC))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)&&pC(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&fC(x))&&hC(x,t,String(e));const N=Qf[x[0]];return N(i,x,o.localize,u)}).join("")}function xC(e){const t=e.match(bC);return t?t[1].replace(yC,"'"):e}function CC(e,t){const n=ve(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 SC(e,t){return ve(e,t==null?void 0:t.in).getMonth()}function NC(e,t){return ve(e,t==null?void 0:t.in).getFullYear()}function kC(e,t){return+ve(e)>+ve(t)}function MC(e,t){return+ve(e)<+ve(t)}function DC(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 EC(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function TC(e,t,n){const r=ve(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=CC(s);return r.setMonth(t,Math.min(a,i)),r}function PC(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(+r)?Se(e,NaN):(r.setFullYear(t),r)}function _C(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 Ks={},Or={};function hn(e,t){try{const r=(Ks[e]||(Ks[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in Or?Or[r]:rp(r,r.split(":"))}catch{if(e in Or)return Or[e];const n=e==null?void 0:e.match(OC);return n?rp(e,n.slice(1)):NaN}}const OC=/([+-]\d\d):?(\d\d)?/;function rp(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Or[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(hn(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)),ap(this),qs(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=-hn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),qs(this),+this}[Symbol.for("constructDateFrom")](t){return new xt(+new Date(t),this.timeZone)}}const op=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!op.test(e))return;const t=e.replace(op,"$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),IC(this),+this},xt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),qs(this),+this}))});function qs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-hn(e.timeZone,e)*60))}function IC(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()),ap(e)}function ap(e){const t=hn(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(-(hn(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=hn(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=hn(e.timeZone,e),x=y>0?Math.floor(y):Math.ceil(y),N=g-x;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}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} (${_C(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 sp=5,AC=4;function FC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,sp*7-1);return t.getMonth(e)===t.getMonth(a)?sp:AC}function ip(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 WC(e,t){const n=ip(e,t),r=FC(e,t);return t.addDays(n,r*7-1)}const lp={...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):Vf(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Yf(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):v0(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):b0(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Gs(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Rf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):N0(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):D0(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):WC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):E0(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):S0(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Xf(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):M0(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):Us(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):SC(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):NC(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Rs(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):kC(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):MC(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Uf(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):x0(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):DC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):EC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):y0(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):w0(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):TC(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):PC(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ip(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):k0(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):qf(r)},this.options={locale:lp,...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 cp{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 $C{constructor(t,n){this.date=t,this.weeks=n}}class BC{constructor(t,n){this.days=n,this.weekNumber=t}}function zC(e){return S.createElement("button",{...e})}function LC(e){return S.createElement("span",{...e})}function HC(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 VC(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function YC(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 GC(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 jC(e){return S.createElement("div",{...e})}function UC(e){return S.createElement("div",{...e})}function RC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function KC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function qC(e){return S.createElement("table",{...e})}function XC(e){return S.createElement("div",{...e})}const dp=S.createContext(void 0);function Ir(){const e=S.useContext(dp);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function ZC(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}function QC(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 e1(e){return S.createElement("option",{...e})}function t1(e){const{components:t}=Ir();return S.createElement(t.Button,{...e})}function n1(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function r1(e){return S.createElement("select",{...e})}function o1(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function a1(e){return S.createElement("th",{...e})}function s1(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function i1(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function l1(e){return S.createElement("th",{...e})}function c1(e){return S.createElement("tbody",{...e})}function d1(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}const u1=Object.freeze(Object.defineProperty({__proto__:null,Button:zC,CaptionLabel:LC,Chevron:HC,Day:VC,DayButton:YC,Dropdown:GC,DropdownNav:jC,Footer:UC,Month:RC,MonthCaption:KC,MonthGrid:qC,Months:XC,MonthsDropdown:ZC,Nav:QC,NextMonthButton:JC,Option:e1,PreviousMonthButton:t1,Root:n1,Select:r1,Week:o1,WeekNumber:i1,WeekNumberHeader:l1,Weekday:a1,Weekdays:s1,Weeks:c1,YearsDropdown:d1},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 Xs(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ro(e){return!!(e&&typeof e=="object"&&"from"in e)}function Zs(e){return!!(e&&typeof e=="object"&&"after"in e)}function Qs(e){return!!(e&&typeof e=="object"&&"before"in e)}function up(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function fp(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(fp(i,n))return i.some(l=>o(e,l));if(Ro(i))return At(i,e,!1,n);if(up(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Xs(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 Zs(i)?a(e,i.after)>0:Qs(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function f1(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]:[]},N={};for(const M of e){const{date:C,displayMonth:k}=M,D=!!(k&&!h(C,k)),E=!!(b&&w(C,b)),I=!!(y&&v(C,y)),R=!!(a&&Ft(C,a,o)),z=!!(s&&Ft(C,s,o))||E||I||!u&&!l&&D||u&&l===!1&&D,q=d(C,p);D&&x.outside.push(M),R&&x.disabled.push(M),z&&x.hidden.push(M),q&&x.today.push(M),i&&Object.keys(i).forEach(Y=>{const ae=i==null?void 0:i[Y];ae&&Ft(C,ae,o)&&(N[Y]?N[Y].push(M):N[Y]=[M])})}return M=>{const C={[ye.focused]:!1,[ye.disabled]:!1,[ye.hidden]:!1,[ye.outside]:!1,[ye.today]:!1},k={};for(const D in x){const E=x[D];C[D]=E.some(I=>I===M)}for(const D in N)k[D]=N[D].some(E=>E===M);return{...C,...k}}}function p1(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 h1(e){return{...u1,...e}}function g1(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 m1(){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 pp(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const v1=pp;function b1(e,t,n){return(n??new Ge(t)).format(e,"d")}function y1(e,t=Ct){return t.format(e,"LLLL")}function w1(e,t,n){return(n??new Ge(t)).format(e,"cccccc")}function x1(e,t=Ct){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function C1(){return""}function hp(e,t=Ct){return t.format(e,"yyyy")}const S1=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:pp,formatDay:b1,formatMonthCaption:v1,formatMonthDropdown:y1,formatWeekNumber:x1,formatWeekNumberHeader:C1,formatWeekdayName:w1,formatYearCaption:hp,formatYearDropdown:hp},Symbol.toStringTag,{value:"Module"}));function N1(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...S1,...e}}function Js(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 k1=Js;function ei(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const M1=ei;function gp(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function mp(e){return"Choose the Month"}function vp(){return""}const D1="Go to the Next Month";function bp(e,t){return D1}function yp(e){return"Go to the Previous Month"}function wp(e,t,n){return(n??new Ge(t)).format(e,"cccc")}function xp(e,t){return`Week ${e}`}function Cp(e){return"Week Number"}function Sp(e){return"Choose the Year"}const E1=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:M1,labelDay:k1,labelDayButton:Js,labelGrid:ei,labelGridcell:gp,labelMonthDropdown:mp,labelNav:vp,labelNext:bp,labelPrevious:yp,labelWeekNumber:xp,labelWeekNumberHeader:Cp,labelWeekday:wp,labelYearDropdown:Sp},Symbol.toStringTag,{value:"Module"})),ut=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function T1(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...E1,...e??{},labelDayButton:ut(Js,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:ut(mp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:ut(bp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:ut(yp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:ut(xp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:ut(Sp,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:ut(ei,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:ut(gp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:ut(vp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:ut(Cp,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:ut(wp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function P1(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 _1(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 O1(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 I1(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 A1(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 Rs(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 Us(u)},differenceInCalendarDays:(l,u)=>{const p=s(l),d=s(u);return Gs(p,d)},differenceInCalendarMonths:(l,u)=>{const p=s(l),d=s(u);return Rf(p,d)}}}const Ar=e=>e instanceof HTMLElement?e:null,ti=e=>[...e.querySelectorAll("[data-animated-month]")??[]],F1=e=>Ar(e.querySelector("[data-animated-month]")),ni=e=>Ar(e.querySelector("[data-animated-caption]")),ri=e=>Ar(e.querySelector("[data-animated-weeks]")),W1=e=>Ar(e.querySelector("[data-animated-nav]")),$1=e=>Ar(e.querySelector("[data-animated-weekdays]"));function B1(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?(ti(m).forEach(x=>{if(!(x instanceof HTMLElement))return;const N=F1(x);N&&x.contains(N)&&x.removeChild(N);const M=ni(x);M&&M.classList.remove(h);const C=ri(x);C&&C.classList.remove(g)}),s.current=m):s.current=null,l.current||p||o)return;const v=w instanceof HTMLElement?ti(w):[],b=ti(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=W1(e.current);y&&(y.style.zIndex="1"),b.forEach((x,N)=>{const M=v[N];if(!M)return;x.style.position="relative",x.style.overflow="hidden";const C=ni(x);C&&C.classList.add(h);const k=ri(x);k&&k.classList.add(g);const D=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),y&&(y.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 E=$1(M);E&&(E.style.opacity="0");const I=ni(M);I&&(I.classList.add(d?n[je.caption_before_exit]:n[je.caption_after_exit]),I.addEventListener("animationend",D));const R=ri(M);R&&R.classList.add(d?n[je.weeks_before_exit]:n[je.weeks_after_exit]),x.insertBefore(M,x.firstChild)})}})}function z1(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,N=l?b(o,r):s?y(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,D=p(k,N),E=d(a,o)+1,I=[];for(let q=0;q<=D;q++){const Y=u(N,q);I.push(Y)}const z=(l?35:42)*E;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 L1(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 H1(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 Np(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 V1(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(k=>k>=b&&k<=y),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<N){const k=t.filter(D=>{const E=N-x.length;return D>y&&D<=o(y,E)});x.push(...k)}const M=x.reduce((k,D)=>{const E=n.ISOWeek?u(D):p(D),I=k.find(z=>z.weekNumber===E),R=new cp(D,v,r);return I?I.days.push(R):k.push(new BC(E,[R])),k},[]),C=new $C(v,M);return m.push(C),m},[]);return n.reverseMonths?w.reverse():w}function Y1(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 G1(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 j1(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 U1(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Ko(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function R1(e,t){var N;const[n,r]=Y1(e,t),{startOfMonth:o,endOfMonth:a}=t,s=Np(e,n,r,t),[i,l]=Ko(s,e.month?s:void 0);S.useEffect(()=>{const M=Np(e,n,r,t);l(M)},[e.timeZone]);const{months:u,weeks:p,days:d,previousMonth:h,nextMonth:g}=S.useMemo(()=>{const M=H1(i,r,{numberOfMonths:e.numberOfMonths},t),C=z1(M,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),k=V1(M,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),D=U1(k),E=L1(k),I=j1(i,n,e,t),R=G1(i,r,e,t);return{months:k,weeks:D,days:E,previousMonth:I,nextMonth:R}},[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))),b=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:d,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:b,goToDay:M=>{v(M)||b(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 kp(e){return!e[ye.disabled]&&!e[ye.hidden]&&!e[ye.outside]}function K1(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);kp(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=>kp(t(s)))),o}function q1(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:N}=s;let C={day:u,week:d,month:p,year:h,startOfWeek:k=>l?y(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=b([o,C])),C}function Mp(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=q1(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 cp(l,d,s);return!u&&!p?h:Mp(e,t,h,r,o,a,s,i+1)}function X1(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=S.useState(),l=K1(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=Mp(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 Z1(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ko(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 Q1(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 Dp(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 eS(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):fp(i,n)?i.some(l=>At(e,l,!1,n)):Ro(i)?i.from&&i.to?Dp(e,{from:i.from,to:i.to},n):!1:up(i)?J1(e,i.dayOfWeek,n):Xs(i)?n.isAfter(i.before,i.after)?Dp(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):Ft(e.from,i,n)||Ft(e.to,i,n):Zs(i)||Qs(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 tS(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,u]=Ko(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,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?y=void 0:y={from:g,to:void 0}:y=Q1(g,p,v,b,s,t)}return r&&n&&(y!=null&&y.from)&&y.to&&eS({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 nS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ko(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 rS(e,t){const n=nS(e,t),r=Z1(e,t),o=tS(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 Ep(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):Ro(e)?{...e,from:e.from?et(e.from,t):e.from,to:e.to?et(e.to,t):e.to}:Xs(e)?{before:Gn(e.before,t),after:Gn(e.after,t)}:Zs(e)?{after:Gn(e.after,t)}:Qs(e)?{before:Gn(e.before,t)}:e}function oi(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Ep(r,t)):Ep(e,t))}function oS(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=oi(t.disabled,n)),t.hidden!==void 0&&(t.hidden=oi(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(pe=>{var re;ie[pe]=oi((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={...lp,...t.locale},pe=t.broadcastCalendar?1:t.weekStartsOn,re=t.noonSafe&&t.timeZone?A1(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:h1(t.components),formatters:N1(t.formatters),labels:T1(t.labels,J.options),locale:ie,classNames:{...m1(),...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:N,showWeekNumber:M,styles:C}=t,{formatCaption:k,formatDay:D,formatMonthDropdown:E,formatWeekNumber:I,formatWeekNumberHeader:R,formatWeekdayName:z,formatYearDropdown:q}=o,Y=R1(t,s),{days:ae,months:B,navStart:K,navEnd:G,previousMonth:A,nextMonth:Q,goToMonth:oe}=Y,O=f1(ae,t,K,G,s),{isSelected:F,select:V,selected:$}=rS(t,s)??{},{blur:Z,focused:W,isFocusTarget:U,moveFocus:X,setFocused:se}=X1(t,Y,O,F??(()=>!1),s),{labelDayButton:de,labelGridcell:ce,labelGrid:Me,labelMonthDropdown:Ee,labelNav:tt,labelPrevious:Ue,labelNext:Fe,labelWeekday:Zt,labelWeekNumber:De,labelWeekNumberHeader:Br,labelYearDropdown:zr}=a,_e=S.useMemo(()=>O1(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),N==null||N(A))},[A,oe,N]),gn=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&&(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]),Jt=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=g1(t),Zn=S.useRef(null);B1(Zn,!!t.animate,{classNames:l,months:B,focused:W,dateLib:s});const mn={dayPickerProps:t,selected:$,select:V,isSelected:F,months:B,nextMonth:Q,previousMonth:A,goToMonth:oe,getModifiers:O,components:r,classNames:l,styles:C,labels:a,formatters:o};return S.createElement(dp.Provider,{value:mn},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:gn,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:P1(ie.date,K,G,o,s),style:C==null?void 0:C[ee.Dropdown],value:s.getMonth(ie.date)}):S.createElement("span",{key:"month"},E(ie.date,s)),ue=u==="dropdown"||u==="dropdown-years"?S.createElement(r.YearsDropdown,{key:"year",className:l[ee.YearsDropdown],"aria-label":zr(s.options),classNames:l,components:r,disabled:!!t.disableNavigation,onChange:Kn(ie.date),options:I1(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))),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:gn,"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:gn,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]},M&&S.createElement(r.WeekNumberHeader,{"aria-label":Br(s.options),className:l[ee.WeekNumberHeader],style:C==null?void 0:C[ee.WeekNumberHeader],scope:"col"},R()),_e.map(re=>S.createElement(r.Weekday,{"aria-label":Zt(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},M&&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=O(ue);if(te[ye.focused]=!te.hidden&&!!(W!=null&&W.isEqualTo(ue)),te[dt.selected]=(F==null?void 0:F(J))||te.selected,Ro($)){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=_1(te,C,t.modifiersStyles),Oe=p1(te,l,t.modifiersClassNames),en=!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:Oe.join(" "),style:Ne,role:"gridcell","aria-selected":te.selected||void 0,"aria-label":en,"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:Qt(ue,te),onBlur:kt(ue,te),onFocus:Un(ue,te),onKeyDown:Jt(ue,te),onMouseEnter:Le(ue,te),onMouseLeave:Rn(ue,te)},D(J,s.options,s)):!te.hidden&&D(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 Tp=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}}),ai=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(Tp({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[c.jsx(Lg,{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})]}));ai.displayName="DatePickerTrigger";const si=({className:e,classNames:t,...n})=>c.jsx(oS,{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(el,{className:"size-4","aria-hidden":"true"}):c.jsx(wn,{className:"size-4","aria-hidden":"true"})},...n});si.displayName="Calendar";const Pp=ln;Pp.displayName="DatePickerRoot";const _p=f.forwardRef(({className:e,align:t="start",...n},r)=>c.jsx(Ut,{ref:r,align:t,className:P("w-auto p-0",e),...n}));_p.displayName="DatePickerContent";const Op=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(ln,{open:u,onOpenChange:p,children:[c.jsx(hr,{asChild:!0,children:c.jsx(ai,{ref:l,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":u,"aria-haspopup":"dialog",children:d})}),c.jsx(Ut,{className:"w-auto p-0",align:"start",children:c.jsx(si,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),p(!1)},defaultMonth:e})})]})});Op.displayName="DatePicker";const Ip=yc,Ap=hb,Fp=gb,Wp=wc,ii=f.forwardRef(({className:e,...t},n)=>c.jsx(Fa,{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}));ii.displayName=Fa.displayName;const li=f.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>c.jsxs(Wp,{children:[c.jsx(ii,{}),c.jsx(Wa,{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})]}));li.displayName=Wa.displayName;const ci=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col gap-1.5 mb-4",e),...t});ci.displayName="DialogHeader";const di=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});di.displayName="DialogFooter";const ui=f.forwardRef(({className:e,...t},n)=>c.jsx(xc,{ref:n,className:P("text-lg font-semibold leading-none text-balance",e),...t}));ui.displayName=xc.displayName;const fi=f.forwardRef(({className:e,...t},n)=>c.jsx(Cc,{ref:n,className:P("text-sm text-muted-foreground text-pretty",e),...t}));fi.displayName=Cc.displayName;const $p=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>c.jsxs(Ip,{...i,children:[e&&c.jsx(Ap,{asChild:!0,children:e}),c.jsxs(li,{className:a,dismissible:s,children:[s&&c.jsx(Fp,{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($t,{className:"size-4","aria-hidden":"true"})}),c.jsxs(ci,{children:[c.jsx(ui,{children:t}),n&&c.jsx(fi,{children:n})]}),r,o&&c.jsx(di,{children:o})]})]});$p.displayName="Dialog";const Bp=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("flex flex-col gap-1.5",e),...t}));Bp.displayName="Field";const zp=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:"*"})]}));zp.displayName="Label";const Lp=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}));Lp.displayName="FieldMessage";function Hp(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const Vp=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(E=>{g.current=E,typeof s=="function"?s(E):s&&(s.current=E)},[s]);f.useEffect(()=>{const E={};for(const I of u)I.type.startsWith("image/")&&(E[I.name]=URL.createObjectURL(I));return h(E),()=>{for(const I of Object.values(E))URL.revokeObjectURL(I)}},[u]);const m=E=>{p(E),n==null||n(E)},v=E=>{!E||E.length===0||m(Array.from(E))},b=E=>{m(u.filter(I=>I.name!==E))},y=E=>{E.preventDefault(),o||l(!0)},x=E=>{E.preventDefault()},N=E=>{E.preventDefault(),l(!1)},M=E=>{E.preventDefault(),l(!1),o||v(E.dataTransfer.files)},C=()=>{var E;o||(E=g.current)==null||E.click()},k=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),C())},D=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:k,onDragEnter:y,onDragOver:x,onDragLeave:N,onDrop:M,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",D?"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:[D?c.jsxs("div",{className:"flex w-full flex-col gap-2",children:[u.map(E=>c.jsxs("div",{className:"flex items-center gap-3 rounded-md bg-muted/50 px-3 py-2",children:[d[E.name]?c.jsx("img",{src:d[E.name],alt:E.name,className:"size-8 shrink-0 rounded object-cover"}):c.jsx(qg,{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:E.name}),c.jsx("p",{className:"text-xs text-muted-foreground",children:Hp(E.size)})]}),c.jsx("button",{type:"button","aria-label":`Remove ${E.name}`,onClick:I=>{I.stopPropagation(),b(E.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($t,{className:"size-4","aria-hidden":!0})})]},E.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(jg,{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:E=>{v(E.target.files),E.currentTarget.value=""}})]})});Vp.displayName="FileUpload";const Yp=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}}),Gp=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 N(D){b(D),D||x("")}function M(D){const E=m.includes(D)?m.filter(I=>I!==D):[...m,D];h||w(E),r==null||r(E)}function C(D){const E=m.filter(I=>I!==D);h||w(E),r==null||r(E)}const k=f.useMemo(()=>e.filter(D=>m.includes(D.value)),[e,m]);return c.jsxs(ln,{open:v,onOpenChange:N,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(Yp({size:i,isError:l}),p),children:[c.jsx("span",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:m.length>0?k.map(D=>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:[D.label,c.jsx("span",{role:"button",tabIndex:u?-1:0,"aria-label":`Remove ${D.label}`,onClick:E=>{E.stopPropagation(),C(D.value)},onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),E.stopPropagation(),C(D.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($t,{className:"size-3","aria-hidden":!0})})]},D.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(Ut,{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(po,{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(ho,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(go,{className:"py-6 text-center text-sm text-muted-foreground",children:s}),e.map(D=>c.jsxs(fo,{value:D.label,disabled:D.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:()=>M(D.value),children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:m.includes(D.value)&&c.jsx(nn,{className:"size-4","aria-hidden":!0})}),D.label]},D.value))]})]})})]})});Gp.displayName="MultiSelect";const jp=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"}}),Up=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(jp({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,{})})]}));Up.displayName="NativeSelect";const Rp=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"},layout:{vertical:"",horizontal:""}},defaultVariants:{size:"md",layout:"vertical"}}),Kp=f.forwardRef(({className:e,size:t,layout:n,isError:r,min:o,max:a,step:s,disabled:i,...l},u)=>{const p=f.useRef(null),d=f.useCallback(v=>{p.current=v,typeof u=="function"?u(v):u&&(u.current=v)},[u]),h=v=>{var C;const b=p.current;if(!b)return;const y=parseFloat(b.value)||0,x=Number(s??1);let N=y+v*x;a!==void 0&&(N=Math.min(N,Number(a))),o!==void 0&&(N=Math.max(N,Number(o)));const M=(C=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:C.set;M==null||M.call(b,String(N)),b.dispatchEvent(new Event("input",{bubbles:!0}))},g=t==="sm"?"size-2.5":"size-3",w=t==="sm"?"size-3":"size-4",m=t==="sm"?"px-2.5":"px-3";return c.jsx("div",{className:P(Rp({size:t,layout:n}),r&&"border-destructive focus-within:ring-destructive",i&&"cursor-not-allowed opacity-50",e),children:n==="horizontal"?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(tl,{"aria-hidden":"true",className:w})}),c.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),c.jsx("input",{ref:d,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||void 0,className:P("min-w-0 flex-1 border-0 bg-transparent py-0 focus:outline-none","tabular-nums appearance-none text-center font-medium text-primary","[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","px-2"),...l}),c.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increment",disabled:i,onClick:()=>h(1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(rm,{"aria-hidden":"true",className:w})})]}):c.jsxs(c.Fragment,{children:[c.jsx("input",{ref:d,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||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"),...l}),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:i,onClick:()=>h(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(Qr,{"aria-hidden":"true",className:g})}),c.jsx("div",{"aria-hidden":"true",className:"border-t border-input"}),c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-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:g})})]})]})})});Kp.displayName="NumberInput";const qp=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"}}),Xp=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},(k,D)=>h[D]??""),w=f.useRef([]),m=f.useMemo(()=>Array.from({length:e},(k,D)=>E=>{w.current[D]=E,D===0&&(typeof l=="function"?l(E):l&&(l.current=E))}),[e,l]),v=f.useRef(!1),b=k=>{var D;v.current=!0,(D=w.current[k])==null||D.focus()},y=k=>{const D=k.join("").slice(0,e);u||d(D),r==null||r(D)},x=(k,D)=>{const E=D.target.value,I=[...g];I[k]=E,y(I),E&&k<e-1&&b(k+1)},N=(k,D)=>{if(D.key==="Backspace"){D.preventDefault();const E=[...g];E[k]?(E[k]="",y(E)):k>0&&(E[k-1]="",y(E),b(k-1))}else D.key==="ArrowLeft"?(D.preventDefault(),k>0&&b(k-1)):D.key==="ArrowRight"&&(D.preventDefault(),k<e-1&&b(k+1))},M=k=>{k.preventDefault();const D=k.clipboardData.getData("text").replace(/\D/g,"").slice(0,e),E=Array.from({length:e},(I,R)=>D[R]??"");y(E),b(Math.min(D.length,e-1))},C=(k,D)=>{if(v.current){v.current=!1,D.target.select();return}const E=g.findIndex(I=>!I);if(E!==-1&&k>E){b(E);return}D.target.select()};return c.jsx("div",{role:"group","aria-label":"One-time password",className:P("flex gap-2",i),children:g.map((k,D)=>c.jsx("input",{ref:m[D],type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,value:k,disabled:a,"aria-label":`Digit ${D+1} of ${e}`,"aria-invalid":o||void 0,className:P(qp({size:s}),o&&"border-destructive focus-visible:ring-destructive"),onChange:E=>x(D,E),onKeyDown:E=>N(D,E),onPaste:M,onFocus:E=>C(D,E)},D))})});Xp.displayName="OTPInput";const Zp=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}%`}})})});Zp.displayName="Progress";const pi=f.createContext({}),Qp=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"}}),aS=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"}}),Jp=f.forwardRef(({className:e,size:t,isError:n,name:r,...o},a)=>{const s=f.use(pi);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(Qp({size:t}),n&&"border-destructive",e),"aria-invalid":n||void 0,...o}),c.jsx("span",{"aria-hidden":"true",className:aS({size:t})})]})});Jp.displayName="Radio";const eh=Ce("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),th=f.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>c.jsx(pi,{value:{name:t},children:c.jsx("div",{ref:a,role:"radiogroup",className:P(eh({orientation:n}),e),...o,children:r})}));th.displayName="RadioGroup";const nh=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}));nh.displayName="Separator";const rh=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"}}),sS=Ce(["absolute top-1/2 -translate-y-1/2 rounded-full bg-primary-foreground 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"}}),oh=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(rh({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:sS({size:t})})]}));oh.displayName="Switch";var qo="Tabs",[iS]=Ze(qo,[$o]),ah=$o(),[lS,hi]=iS(qo),sh=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:qo});return c.jsx(lS,{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})})});sh.displayName=qo;var ih="TabsList",lh=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=hi(ih,n),s=ah(n);return c.jsx(Eu,{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})})});lh.displayName=ih;var ch="TabsTrigger",dh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=hi(ch,n),i=ah(n),l=ph(s.baseId,r),u=hh(s.baseId,r),p=r===s.value;return c.jsx(Tu,{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)})})})});dh.displayName=ch;var uh="TabsContent",fh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=hi(uh,n),l=ph(i.baseId,r),u=hh(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})})});fh.displayName=uh;function ph(e,t){return`${e}-trigger-${t}`}function hh(e,t){return`${e}-content-${t}`}var gh=sh,mh=lh,vh=dh,bh=fh;const gi=f.forwardRef(({className:e,...t},n)=>c.jsx(gh,{ref:n,className:P("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));gi.displayName=gh.displayName;const mi=f.forwardRef(({className:e,...t},n)=>c.jsx(mh,{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}));mi.displayName=mh.displayName;const vi=f.forwardRef(({className:e,...t},n)=>c.jsx(vh,{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}));vi.displayName=vh.displayName;const bi=f.forwardRef(({className:e,...t},n)=>c.jsx(bh,{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}));bi.displayName=bh.displayName;const yh=({items:e,listClassName:t,className:n,...r})=>c.jsxs(gi,{className:n,...r,children:[c.jsx(mi,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>c.jsxs(vi,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>c.jsx(bi,{value:o,children:a},o))]});yh.displayName="Tabs";const wh=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"}}),xh=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>c.jsx("textarea",{ref:o,className:P(wh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));xh.displayName="Textarea";function cS(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 dS=e=>{switch(e){case"success":return pS;case"info":return gS;case"warning":return hS;case"error":return mS;default:return null}},uS=Array(12).fill(0),fS=({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}`})))),pS=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"})),hS=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"})),gS=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"})),mS=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"})),vS=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"})),bS=()=>{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 yi=1;class yS{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:yi++,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(xS(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)||yi++;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 yS,wS=(e,t)=>{const n=(t==null?void 0:t.id)||yi++;return ze.addToast({title:e,...t,id:n}),n},xS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",CS=wS,SS=()=>ze.toasts,NS=()=>ze.getActiveToasts(),Ch=Object.assign(CS,{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:SS,getToasts:NS});cS("[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 Xo(e){return e.label!==void 0}const kS=3,MS="24px",DS="16px",Sh=4e3,ES=356,TS=14,PS=45,_S=200;function Nt(...e){return e.filter(Boolean).join(" ")}function OS(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const IS=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:N,defaultRichColors:M,closeButton:C,style:k,cancelButtonStyle:D,actionButtonStyle:E,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,O]=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||Sh),Zt=S.useRef(null),De=S.useRef(null),Br=b===0,zr=b+1<=m,_e=d.type,ft=d.dismissible!==!1,We=d.className||"",gn=d.descriptionClassName||"",Qt=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||Sh,[d.duration,z]),Jt=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>=Qt?J:J+te.height,0),[v,Qt]),Xn=bS(),Zn=d.invert||p,mn=_e==="loading";Le.current=S.useMemo(()=>Qt*Y+ht,[Qt,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(Oe=>Oe.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(Oe=>Oe.find(we=>we.toastId===d.id)?Oe.map(we=>we.toastId===d.id?{...we,height:Ne}:we):[{toastId:d.id,height:Ne,position:d.position},...Oe])},[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(()=>{N(d)},_S)},[d,N,w,Le]);S.useEffect(()=>{if(d.promise&&_e==="loading"||d.duration===1/0||d.type==="loading")return;let J;return x||g||Xn?(()=>{if(Rn.current<Jt.current){const Oe=new Date().getTime()-Jt.current;Fe.current=Fe.current-Oe}Rn.current=new Date().getTime()})():(()=>{Fe.current!==1/0&&(Jt.current=new Date().getTime(),J=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Re()},Fe.current))})(),()=>clearTimeout(J)},[x,g,d,_e,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":_e==="loading"},K.loading)}return S.createElement(fS,{className:Nt(B==null?void 0:B.loader,d==null||(J=d.classNames)==null?void 0:J.loader),visible:_e==="loading"})}const pe=d.icon||(K==null?void 0:K[_e])||dS(_e);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[_e],d==null||(n=d.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(re=d.richColors)!=null?re:M,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":F,"data-promise":!!d.promise,"data-swiped":de,"data-removed":$,"data-visible":zr,"data-y-position":Kn,"data-x-position":qn,"data-index":b,"data-front":Br,"data-swiping":W,"data-dismissible":ft,"data-type":_e,"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`,...k,...d.style},onDragEnd:()=>{U(!1),Q(null),pt.current=null},onPointerDown:J=>{J.button!==2&&(mn||!ft||(Zt.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 Oe=Number(((J=De.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((te=De.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((Ne=Zt.current)==null?void 0:Ne.getTime()),Te=A==="x"?Oe:en,Qn=Math.abs(Te)/we;if(Math.abs(Te)>=PS||Qn>.11){Ee(Le.current),d.onDismiss==null||d.onDismiss.call(d,d),O(A==="x"?Oe>0?"right":"left":en>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,Oe;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:OS(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 Jo=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*Jo(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*Jo(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`),(Oe=De.current)==null||Oe.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Un&&!d.jsx&&_e!=="loading"?S.createElement("button",{"aria-label":G,"data-disabled":mn,"data-close-button":!0,onClick:mn||!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:vS):null,(_e||d.icon||d.promise)&&d.icon!==null&&((K==null?void 0:K[_e])!==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,gn,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&&Xo(d.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||D,onClick:J=>{Xo(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&&Xo(d.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||E,onClick:J=>{Xo(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 Nh(){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 AS(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?DS:MS;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 FS=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=kS,toastOptions:b,dir:y=Nh(),gap:x=TS,icons:N,containerAriaLabel:M="Notifications"}=t,[C,k]=S.useState([]),D=S.useMemo(()=>r?C.filter(F=>F.toasterId===r):C.filter(F=>!F.toasterId),[C,r]),E=S.useMemo(()=>Array.from(new Set([a].concat(D.filter(F=>F.position).map(F=>F.position)))),[D,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),O=S.useCallback(F=>{k(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(()=>{k(V=>V.map($=>$.id===F.id?{...$,delete:!0}:$))});return}setTimeout(()=>{oa.flushSync(()=>{k(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":`${M} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((F,V)=>{var $;const[Z,W]=F.split("-");return D.length?S.createElement("ol",{key:F,dir:y==="auto"?Nh():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":`${ES}px`,"--gap":`${x}px`,...m,...AS(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)},D.filter(U=>!U.position&&V===0||U.position===F).map((U,X)=>{var se,de;return S.createElement(IS,{key:U.id,icons:N,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:O,toasts:D.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}))}),WS={success:{halo:"bg-success/20",core:"bg-success text-success-foreground"},info:{halo:"bg-info/20",core:"bg-info text-info-foreground"},warning:{halo:"bg-warning/25",core:"bg-warning text-warning-foreground"},error:{halo:"bg-destructive/20",core:"bg-destructive text-destructive-foreground"},loading:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"},default:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"}};function $S({variant:e,icon:t,className:n}){const r=WS[e];return c.jsxs("span",{className:"bookers-toast-status","aria-hidden":"true",children:[c.jsx("span",{className:P("bookers-toast-status__halo",r.halo)}),c.jsx("span",{className:P("bookers-toast-status__core",r.core),children:c.jsx(t,{className:P("size-4",n),strokeWidth:2.25})})]})}function Fr(e,t,n){return c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),c.jsx($S,{variant:e,icon:t,className:n})]})}const kh=c.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),BS=Fr("success",nn),zS=Fr("info",Vg),LS=Fr("warning",Hg),HS=Fr("error",Yg),VS=Fr("loading",fa,"animate-spin");function YS(e,t){const n=(t==null?void 0:t.action)!==void 0;return Ch(e,{...t,icon:(t==null?void 0:t.icon)!==void 0?t.icon:kh,closeButton:(t==null?void 0:t.closeButton)??(n?!1:void 0)})}const GS=Object.assign(YS,Ch),Mh={toast:"bookers-toast",icon:"bookers-toast__icon",loader:"bookers-toast__loader",content:"bookers-toast__content",title:"bookers-toast__title",description:"bookers-toast__description",closeButton:"bookers-toast__close",actionButton:"bookers-toast__action",cancelButton:"bookers-toast__cancel"},jS={success:BS,info:zS,warning:LS,error:HS,loading:VS,default:kh,close:c.jsx($t,{className:"size-3.5",strokeWidth:2,"aria-hidden":"true"})},Dh=({toastOptions:e,richColors:t=!1,closeButton:n=!0,position:r="top-center",...o})=>{var a;return c.jsx(FS,{theme:"light",richColors:t,position:r,closeButton:n,icons:jS,className:"font-body",toastOptions:{unstyled:!0,...e,classNames:{...Mh,...e==null?void 0:e.classNames,toast:P(Mh.toast,(a=e==null?void 0:e.classNames)==null?void 0:a.toast)}},...o})};Dh.displayName="Toaster";var[Zo]=Ze("Tooltip",[Gt]),Qo=Gt(),Eh="TooltipProvider",US=700,wi="tooltip.open",[RS,xi]=Zo(Eh),Th=e=>{const{__scopeTooltip:t,delayDuration:n=US,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(RS,{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})};Th.displayName=Eh;var Wr="Tooltip",[KS,$r]=Zo(Wr),Ph=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=xi(Wr,e.__scopeTooltip),u=Qo(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:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(wi))):l.onClose(),a==null||a(k)},caller:Wr}),x=f.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),N=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),M=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(KS,{scope:t,contentId:h,open:b,stateAttribute:x,trigger:p,onTriggerChange:d,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})})};Ph.displayName=Wr;var Ci="TooltipTrigger",_h=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$r(Ci,n),a=xi(Ci,n),s=Qo(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)})})});_h.displayName=Ci;var Si="TooltipPortal",[qS,XS]=Zo(Si,{forceMount:void 0}),Oh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=$r(Si,t);return c.jsx(qS,{scope:t,forceMount:n,children:c.jsx(Be,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};Oh.displayName=Si;var jn="TooltipContent",Ih=f.forwardRef((e,t)=>{const n=XS(jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=$r(jn,e.__scopeTooltip);return c.jsx(Be,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Ah,{side:o,...a,ref:t}):c.jsx(ZS,{side:o,...a,ref:t})})}),ZS=f.forwardRef((e,t)=>{const n=$r(jn,e.__scopeTooltip),r=xi(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=nN(b,v.getBoundingClientRect()),x=rN(b,y),N=oN(m.getBoundingClientRect()),M=sN([...x,...N]);i(M),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=!aN(b,s);y?h():x&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,p,s,u,h]),c.jsx(Ah,{...e,ref:a})}),[QS,JS]=Zo(Wr,{isInside:!1}),eN=tg("TooltipContent"),Ah=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=$r(jn,n),u=Qo(n),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(wi,p),()=>document.removeEventListener(wi,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(Do,{"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(eN,{children:r}),c.jsx(QS,{scope:n,isInside:!0,children:c.jsx(sw,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Ih.displayName=jn;var Fh="TooltipArrow",tN=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qo(n);return JS(Fh,n).isInside?null:c.jsx(Eo,{...o,...r,ref:t})});tN.displayName=Fh;function nN(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 rN(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 oN(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 aN(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 sN(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),iN(t)}function iN(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 lN=Th,cN=Ph,dN=_h,uN=Oh,Wh=Ih;const fN=lN,$h=cN,Bh=dN,Ni=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(uN,{children:c.jsx(Wh,{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})}));Ni.displayName=Wh.displayName;const zh=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>c.jsxs($h,{...a,children:[c.jsx(Bh,{asChild:!0,children:t}),c.jsx(Ni,{side:n,align:r,sideOffset:o,children:e})]});zh.displayName="Tooltip",T.Accordion=ml,T.AccordionContent=ya,T.AccordionItem=va,T.AccordionRoot=ma,T.AccordionTrigger=ba,T.Alert=bl,T.AlertDescription=wl,T.AlertTitle=yl,T.AspectRatio=Sl,T.Avatar=kl,T.Badge=Dl,T.Button=Sn,T.Calendar=si,T.Checkbox=Pl,T.ComboBox=_d,T.ComboBoxContent=kd,T.ComboBoxEmpty=Dd,T.ComboBoxGroup=Ed,T.ComboBoxItem=Md,T.ComboBoxRoot=Pd,T.ComboBoxSeparator=Td,T.ComboBoxTrigger=ts,T.ComboBoxTriggerVariants=Nd,T.DATA_TABLE_EXPAND_COLUMN_ID=It,T.DataTable=Bf,T.DataTableColumnHeader=zf,T.DatePicker=Op,T.DatePickerContent=_p,T.DatePickerRoot=Pp,T.DatePickerTrigger=ai,T.Dialog=$p,T.DialogClose=Fp,T.DialogContent=li,T.DialogDescription=fi,T.DialogFooter=di,T.DialogHeader=ci,T.DialogOverlay=ii,T.DialogPortal=Wp,T.DialogRoot=Ip,T.DialogTitle=ui,T.DialogTrigger=Ap,T.DropdownMenu=_f,T.DropdownMenuCheckboxItem=Vs,T.DropdownMenuContent=Nr,T.DropdownMenuGroup=n0,T.DropdownMenuItem=Ot,T.DropdownMenuLabel=kr,T.DropdownMenuPortal=r0,T.DropdownMenuRadioGroup=Pf,T.DropdownMenuRadioItem=Ys,T.DropdownMenuRoot=Vo,T.DropdownMenuSeparator=Bn,T.DropdownMenuSub=Hs,T.DropdownMenuSubContent=jo,T.DropdownMenuSubTrigger=Go,T.DropdownMenuTrigger=Yo,T.Field=Bp,T.FieldMessage=Lp,T.FileUpload=Vp,T.Input=gr,T.InputAddon=us,T.InputGroup=ds,T.Label=zp,T.MultiSelect=Gp,T.NativeSelect=Up,T.NumberInput=Kp,T.OTPInput=Xp,T.Pagination=bs,T.PaginationEllipsis=vs,T.PaginationItem=hs,T.PaginationNext=ms,T.PaginationPrev=gs,T.PaginationRoot=fs,T.Popover=Sd,T.PopoverAnchor=Qy,T.PopoverClose=Zy,T.PopoverContent=Ut,T.PopoverRoot=ln,T.PopoverTrigger=hr,T.Progress=Zp,T.Radio=Jp,T.RadioGroup=th,T.RadioGroupContext=pi,T.STRING_COLUMN_FILTER_OPTIONS=rs,T.Select=Cu,T.SelectContent=Wo,T.SelectGroup=Fw,T.SelectItem=Ts,T.SelectLabel=wu,T.SelectRoot=ks,T.SelectScrollDownButton=Es,T.SelectScrollUpButton=Ds,T.SelectSeparator=xu,T.SelectTrigger=Fo,T.SelectValue=Ms,T.Separator=nh,T.Skeleton=cs,T.Switch=oh,T.Table=as,T.TableBody=is,T.TableCaption=Od,T.TableCell=cn,T.TableFooter=ls,T.TableHead=Po,T.TableHeader=ss,T.TableRow=_t,T.Tabs=yh,T.TabsContent=bi,T.TabsList=mi,T.TabsRoot=gi,T.TabsTrigger=vi,T.Textarea=xh,T.Toaster=Dh,T.Tooltip=zh,T.TooltipContent=Ni,T.TooltipProvider=fN,T.TooltipRoot=$h,T.TooltipTrigger=Bh,T.accordionContentVariants=hl,T.accordionRootVariants=gl,T.accordionTriggerVariants=pl,T.alertVariants=vl,T.avatarVariants=Nl,T.badgeVariants=Ml,T.bookersStringFilter=os,T.buttonVariants=El,T.checkboxVariants=Tl,T.cn=P,T.dataTableColumnHeaderMeta=u0,T.datePickerTriggerVariants=Tp,T.formatBytes=Hp,T.inputVariants=Ad,T.multiSelectTriggerVariants=Yp,T.nativeSelectVariants=jp,T.numberInputVariants=Rp,T.otpSlotVariants=qp,T.radioGroupVariants=eh,T.radioVariants=Qp,T.selectTriggerVariants=yu,T.switchTrackVariants=rh,T.textareaVariants=wh,T.toast=GS,T.useDataTableTable=If,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|
|
205
|
+
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},vb="DialogDescriptionWarning",bb=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yc(vb).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},wc=ac,yb=ic,xc=cc,Wa=dc,$a=uc,Cc=pc,Sc=gc,wb=vc,sr='[cmdk-group=""]',za='[cmdk-group-items=""]',xb='[cmdk-group-heading=""]',Nc='[cmdk-item=""]',kc=`${Nc}:not([aria-disabled="true"])`,Ba="cmdk-item-select",Pn="data-value",Cb=(e,t,n)=>lv(e,t,n),Mc=f.createContext(void 0),ir=()=>f.useContext(Mc),Dc=f.createContext(void 0),La=()=>f.useContext(Dc),Ec=f.createContext(void 0),lr=f.forwardRef((e,t)=>{let n=_n(()=>{var O,F;return{search:"",value:(F=(O=e.value)!=null?O:e.defaultValue)!=null?F:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=_n(()=>new Set),o=_n(()=>new Map),a=_n(()=>new Map),s=_n(()=>new Set),i=_c(e),{label:l,children:d,value:p,onValueChange:u,filter:h,shouldFilter:g,loop:w,disablePointerSelection:m=!1,vimBindings:v=!0,...b}=e,y=Ce(),x=Ce(),N=Ce(),M=f.useRef(null),C=Db();on(()=>{if(p!==void 0){let O=p.trim();n.current.value=O,k.emit()}},[p]),on(()=>{C(6,q)},[]);let k=f.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,F,V)=>{var $,Z,W,U;if(!Object.is(n.current[O],F)){if(n.current[O]=F,O==="search")B(),I(),C(1,R);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(N);X?X.focus():($=document.getElementById(y))==null||$.focus()}if(C(7,()=>{var X;n.current.selectedItemId=(X=Y())==null?void 0:X.id,k.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}}k.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),D=f.useMemo(()=>({value:(O,F,V)=>{var $;F!==(($=a.current.get(O))==null?void 0:$.value)&&(a.current.set(O,{value:F,keywords:V}),n.current.filtered.items.set(O,E(F,V)),C(2,()=>{I(),k.emit()}))},item:(O,F)=>(r.current.add(O),F&&(o.current.has(F)?o.current.get(F).add(O):o.current.set(F,new Set([O]))),C(3,()=>{B(),I(),n.current.value||R(),k.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let V=Y();C(4,()=>{B(),(V==null?void 0:V.getAttribute("id"))===O&&R(),k.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:N,labelId:x,listInnerRef:M}),[]);function E(O,F){var V,$;let Z=($=(V=i.current)==null?void 0:V.filter)!=null?$:Cb;return O?Z(O,n.current.search,F):0}function I(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,F=[];n.current.filtered.groups.forEach($=>{let Z=o.current.get($),W=0;Z.forEach(U=>{let X=O.get(U);W=Math.max(X,W)}),F.push([$,W])});let V=M.current;ae().sort(($,Z)=>{var W,U;let X=$.getAttribute("id"),se=Z.getAttribute("id");return((W=O.get(se))!=null?W:0)-((U=O.get(X))!=null?U:0)}).forEach($=>{let Z=$.closest(za);Z?Z.appendChild($.parentElement===Z?$:$.closest(`${za} > *`)):V.appendChild($.parentElement===V?$:$.closest(`${za} > *`))}),F.sort(($,Z)=>Z[1]-$[1]).forEach($=>{var Z;let W=(Z=M.current)==null?void 0:Z.querySelector(`${sr}[${Pn}="${encodeURIComponent($[0])}"]`);W==null||W.parentElement.appendChild(W)})}function R(){let O=ae().find(V=>V.getAttribute("aria-disabled")!=="true"),F=O==null?void 0:O.getAttribute(Pn);k.setState("value",F||void 0)}function B(){var O,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=(O=a.current.get(W))==null?void 0:O.value)!=null?F:"",X=($=(V=a.current.get(W))==null?void 0:V.keywords)!=null?$:[],se=E(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 O,F,V;let $=Y();$&&(((O=$.parentElement)==null?void 0:O.firstChild)===$&&((V=(F=$.closest(sr))==null?void 0:F.querySelector(xb))==null||V.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function Y(){var O;return(O=M.current)==null?void 0:O.querySelector(`${Nc}[aria-selected="true"]`)}function ae(){var O;return Array.from(((O=M.current)==null?void 0:O.querySelectorAll(kc))||[])}function z(O){let F=ae()[O];F&&k.setState("value",F.getAttribute(Pn))}function K(O){var F;let V=Y(),$=ae(),Z=$.findIndex(U=>U===V),W=$[Z+O];(F=i.current)!=null&&F.loop&&(W=Z+O<0?$[$.length-1]:Z+O===$.length?$[0]:$[Z+O]),W&&k.setState("value",W.getAttribute(Pn))}function G(O){let F=Y(),V=F==null?void 0:F.closest(sr),$;for(;V&&!$;)V=O>0?kb(V,sr):Mb(V,sr),$=V==null?void 0:V.querySelector(kc);$?k.setState("value",$.getAttribute(Pn)):K(O)}let A=()=>z(ae().length-1),Q=O=>{O.preventDefault(),O.metaKey?A():O.altKey?G(1):K(1)},oe=O=>{O.preventDefault(),O.metaKey?z(0):O.altKey?G(-1):K(-1)};return f.createElement(ne.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:O=>{var F;(F=b.onKeyDown)==null||F.call(b,O);let V=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||V))switch(O.key){case"n":case"j":{v&&O.ctrlKey&&Q(O);break}case"ArrowDown":{Q(O);break}case"p":case"k":{v&&O.ctrlKey&&oe(O);break}case"ArrowUp":{oe(O);break}case"Home":{O.preventDefault(),z(0);break}case"End":{O.preventDefault(),A();break}case"Enter":{O.preventDefault();let $=Y();if($){let Z=new Event(Ba);$.dispatchEvent(Z)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:Tb},l),mo(e,O=>f.createElement(Dc.Provider,{value:k},f.createElement(Mc.Provider,{value:D},O))))}),fo=f.forwardRef((e,t)=>{var n,r;let o=Ce(),a=f.useRef(null),s=f.useContext(Ec),i=ir(),l=_c(e),d=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;on(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let p=Oc(o,a,[e.value,e.children,a],e.keywords),u=La(),h=Ht(C=>C.value&&C.value===p.current),g=Ht(C=>d||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(Ba,w),()=>C.removeEventListener(Ba,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(){u.setState("value",p.current,!0)}if(!g)return null;let{disabled:v,value:b,onSelect:y,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)}),Tc=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=Ce(),i=f.useRef(null),l=f.useRef(null),d=Ce(),p=ir(),u=Ht(g=>o||p.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);on(()=>p.group(s),[]),Oc(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:u?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),mo(e,g=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},f.createElement(Ec.Provider,{value:h},g))))}),Pc=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Ht(s=>!s.search);return!n&&!a?null:f.createElement(ne.div,{ref:mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),po=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=La(),s=Ht(d=>d.search),i=Ht(d=>d.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:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),ho=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Ht(d=>d.selectedItemId),l=ir();return f.useEffect(()=>{if(s.current&&a.current){let d=s.current,p=a.current,u,h=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let g=d.offsetHeight;p.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(d),()=>{cancelAnimationFrame(u),h.unobserve(d)}}},[]),f.createElement(ne.div,{ref:mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},mo(e,d=>f.createElement("div",{ref:mt(s,l.listInnerRef),"cmdk-list-sizer":""},d)))}),Sb=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(wc,{open:n,onOpenChange:r},f.createElement(xc,{container:s},f.createElement(Wa,{"cmdk-overlay":"",className:o}),f.createElement($a,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(lr,{ref:t,...i}))))}),go=f.forwardRef((e,t)=>Ht(n=>n.filtered.count===0)?f.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Nb=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},mo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))});Object.assign(lr,{List:ho,Item:fo,Input:po,Group:Tc,Separator:Pc,Dialog:Sb,Empty:go,Loading:Nb});function kb(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Mb(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function _c(e){let t=f.useRef(e);return on(()=>{t.current=e}),t}var on=typeof window>"u"?f.useEffect:f.useLayoutEffect;function _n(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Ht(e){let t=La(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Oc(e,t,n,r=[]){let o=f.useRef(),a=ir();return on(()=>{var s;let i=(()=>{var d;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():o.current}})(),l=r.map(d=>d.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(Pn,i),o.current=i}),o}var Db=()=>{let[e,t]=f.useState(),n=_n(()=>new Map);return on(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Eb(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function mo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(Eb(t),{ref:t.ref},n(t.props.children)):n(t)}var Tb={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Pb=["top","right","bottom","left"],Vt=Math.min,Ve=Math.max,vo=Math.round,bo=Math.floor,bt=e=>({x:e,y:e}),_b={left:"right",right:"left",bottom:"top",top:"bottom"};function Ha(e,t,n){return Ve(e,Vt(t,n))}function Et(e,t){return typeof e=="function"?e(t):e}function Tt(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function Va(e){return e==="x"?"y":"x"}function Ya(e){return e==="y"?"height":"width"}function yt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ga(e){return Va(yt(e))}function Ob(e,t,n){n===void 0&&(n=!1);const r=On(e),o=Ga(e),a=Ya(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=yo(s)),[s,yo(s)]}function Ib(e){const t=yo(e);return[ja(e),t,ja(t)]}function ja(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ic=["left","right"],Ac=["right","left"],Ab=["top","bottom"],Fb=["bottom","top"];function Wb(e,t,n){switch(e){case"top":case"bottom":return n?t?Ac:Ic:t?Ic:Ac;case"left":case"right":return t?Ab:Fb;default:return[]}}function $b(e,t,n,r){const o=On(e);let a=Wb(Tt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ja)))),a}function yo(e){const t=Tt(e);return _b[t]+e.slice(t.length)}function zb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fc(e){return typeof e!="number"?zb(e):{top:e,right:e,bottom:e,left:e}}function wo(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 Wc(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),s=Ga(t),i=Ya(s),l=Tt(t),d=a==="y",p=r.x+r.width/2-o.width/2,u=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:u};break;case"left":g={x:r.x-o.width,y:u};break;default:g={x:r.x,y:r.y}}switch(On(t)){case"start":g[s]-=h*(n&&d?-1:1);break;case"end":g[s]+=h*(n&&d?-1:1);break}return g}async function Bb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=Et(t,e),w=Fc(g),v=i[h?u==="floating"?"reference":"floating":u],b=wo(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:d,rootBoundary:p,strategy:l})),y=u==="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=wo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(b.top-M.top+w.top)/N.y,bottom:(M.bottom-b.bottom+w.bottom)/N.y,left:(b.left-M.left+w.left)/N.x,right:(M.right-b.right+w.right)/N.x}}const Lb=50,Hb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Bb},l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:u}=Wc(d,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:N,data:M,reset:C}=await y({x:p,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:w,rects:d,platform:i,elements:{reference:e,floating:t}});p=x??p,u=N??u,w[b]={...w[b],...M},C&&g<Lb&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:u}=Wc(d,h,l)),m=-1)}return{x:p,y:u,placement:h,strategy:o,middlewareData:w}},Vb=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:d,padding:p=0}=Et(e,t)||{};if(d==null)return{};const u=Fc(p),h={x:n,y:r},g=Ga(o),w=Ya(g),m=await s.getDimensions(d),v=g==="y",b=v?"top":"left",y=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(d));let k=C?C[x]:0;(!k||!await(s.isElement==null?void 0:s.isElement(C)))&&(k=i.floating[x]||a.floating[w]);const D=N/2-M/2,E=k/2-m[w]/2-1,I=Vt(u[b],E),R=Vt(u[y],E),B=I,q=k-m[w]-R,Y=k/2-m[w]/2+D,ae=Ha(B,Y,q),z=!l.arrow&&On(o)!=null&&Y!==ae&&a.reference[w]/2-(Y<B?I:R)-m[w]/2<0,K=z?Y<B?Y-B:Y-q:0;return{[g]:h[g]+K,data:{[g]:ae,centerOffset:Y-ae-K,...z&&{alignmentOffset:K}},reset:z}}}),Yb=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:d}=t,{mainAxis:p=!0,crossAxis:u=!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,N=await(l.isRTL==null?void 0:l.isRTL(d.floating)),M=h||(x||!m?[yo(i)]:Ib(i)),C=w!=="none";!h&&C&&M.push(...$b(i,m,w,N));const k=[i,...M],D=await l.detectOverflow(t,v),E=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&E.push(D[b]),u){const Y=Ob(o,s,N);E.push(D[Y[0]],D[Y[1]])}if(I=[...I,{placement:o,overflows:E}],!E.every(Y=>Y<=0)){var R,B;const Y=(((R=a.flip)==null?void 0:R.index)||0)+1,ae=k[Y];if(ae&&(!(u==="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 z=(B=I.filter(K=>K.overflows[0]<=0).sort((K,G)=>K.overflows[1]-G.overflows[1])[0])==null?void 0:B.placement;if(!z)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&&(z=K);break}case"initialPlacement":z=i;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function $c(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zc(e){return Pb.some(t=>e[t]>=0)}const Gb=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=$c(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:zc(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=$c(s,n.floating);return{data:{escapedOffsets:i,escaped:zc(i)}}}default:return{}}}}},Bc=new Set(["left","top"]);async function jb(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=On(n),l=yt(n)==="y",d=Bc.has(s)?-1:1,p=a&&l?-1:1,u=Et(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),l?{x:g*p,y:h*d}:{x:h*d,y:g*p}}const Ub=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 jb(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}}}}},Rb=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}}},...d}=Et(e,t),p={x:n,y:r},u=await a.detectOverflow(t,d),h=yt(Tt(o)),g=Va(h);let w=p[g],m=p[h];if(s){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=w+u[b],N=w-u[y];w=Ha(x,w,N)}if(i){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+u[b],N=m-u[y];m=Ha(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}}}}}},Kb=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:d=!0}=Et(e,t),p={x:n,y:r},u=yt(o),h=Va(u);let g=p[h],w=p[u];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(d){var b,y;const x=h==="y"?"width":"height",N=Bc.has(Tt(o)),M=a.reference[u]-a.floating[x]+(N&&((b=s.offset)==null?void 0:b[u])||0)+(N?0:v.crossAxis),C=a.reference[u]+a.reference[x]+(N?0:((y=s.offset)==null?void 0:y[u])||0)-(N?v.crossAxis:0);w<M?w=M:w>C&&(w=C)}return{[h]:g,[u]:w}}}},qb=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=()=>{},...d}=Et(e,t),p=await s.detectOverflow(t,d),u=Tt(o),h=On(o),g=yt(o)==="y",{width:w,height:m}=a.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=u,v=h==="end"?"top":"bottom");const y=m-p.top-p.bottom,x=w-p.left-p.right,N=Vt(m-p[v],y),M=Vt(w-p[b],x),C=!t.middlewareData.shift;let k=N,D=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=y),C&&!h){const I=Ve(p.left,0),R=Ve(p.right,0),B=Ve(p.top,0),q=Ve(p.bottom,0);g?D=w-2*(I!==0||R!==0?I+R:Ve(p.left,p.right)):k=m-2*(B!==0||q!==0?B+q:Ve(p.top,p.bottom))}await l({...t,availableWidth:D,availableHeight:k});const E=await s.getDimensions(i.floating);return w!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function xo(){return typeof window<"u"}function In(e){return Lc(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=(Lc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lc(e){return xo()?e instanceof Node||e instanceof Ye(e).Node:!1}function st(e){return xo()?e instanceof Element||e instanceof Ye(e).Element:!1}function Pt(e){return xo()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function Hc(e){return!xo()||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 Xb(e){return/^(table|td|th)$/.test(In(e))}function Co(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Zb=/transform|translate|scale|rotate|perspective|filter/,Qb=/paint|layout|strict|content/,an=e=>!!e&&e!=="none";let Ua;function Ra(e){const t=st(e)?it(e):e;return an(t.transform)||an(t.translate)||an(t.scale)||an(t.rotate)||an(t.perspective)||!Ka()&&(an(t.backdropFilter)||an(t.filter))||Zb.test(t.willChange||"")||Qb.test(t.contain||"")}function Jb(e){let t=Yt(e);for(;Pt(t)&&!An(t);){if(Ra(t))return t;if(Co(t))return null;t=Yt(t)}return null}function Ka(){return Ua==null&&(Ua=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ua}function An(e){return/^(html|body|#document)$/.test(In(e))}function it(e){return Ye(e).getComputedStyle(e)}function So(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(In(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hc(e)&&e.host||wt(e);return Hc(t)?t.host:t}function Vc(e){const t=Yt(e);return An(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&cr(t)?t:Vc(t)}function dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Vc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ye(o);if(a){const i=qa(s);return t.concat(s,s.visualViewport||[],cr(o)?o:[],i&&n?dr(i):[])}else return t.concat(o,dr(o,[],n))}function qa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yc(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=vo(n)!==a||vo(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Xa(e){return st(e)?e:e.contextElement}function Fn(e){const t=Xa(e);if(!Pt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Yc(t);let s=(a?vo(n.width):n.width)/r,i=(a?vo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ey=bt(0);function Gc(e){const t=Ye(e);return!Ka()||!t.visualViewport?ey:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ty(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ye(e)?!1:t}function sn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Xa(e);let s=bt(1);t&&(r?st(r)&&(s=Fn(r)):s=Fn(e));const i=ty(a,n,r)?Gc(a):bt(0);let l=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,p=o.width/s.x,u=o.height/s.y;if(a){const h=Ye(a),g=r&&st(r)?Ye(r):r;let w=h,m=qa(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,N=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,d*=v.y,p*=v.x,u*=v.y,l+=x,d+=N,w=Ye(m),m=qa(w)}}return wo({width:p,height:u,x:l,y:d})}function No(e,t){const n=So(e).scrollLeft;return t?t.left+n:sn(wt(e)).left+n}function jc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-No(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ny(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=wt(r),i=t?Co(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},d=bt(1);const p=bt(0),u=Pt(r);if((u||!u&&!a)&&((In(r)!=="body"||cr(s))&&(l=So(r)),u)){const g=sn(r);d=Fn(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=s&&!u&&!a?jc(s,l):bt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+p.x+h.x,y:n.y*d.y-l.scrollTop*d.y+p.y+h.y}}function ry(e){return Array.from(e.getClientRects())}function oy(e){const t=wt(e),n=So(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+No(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 Uc=25;function ay(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=Ka();(!p||p&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const d=No(r);if(d<=0){const p=r.ownerDocument,u=p.body,h=getComputedStyle(u),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(r.clientWidth-u.clientWidth-g);w<=Uc&&(a-=w)}else d<=Uc&&(a+=d);return{width:a,height:s,x:i,y:l}}function sy(e,t){const n=sn(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,d=r*a.y;return{width:s,height:i,x:l,y:d}}function Rc(e,t,n){let r;if(t==="viewport")r=ay(e,n);else if(t==="document")r=oy(wt(e));else if(st(t))r=sy(t,n);else{const o=Gc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wo(r)}function Kc(e,t){const n=Yt(e);return n===t||!st(n)||An(n)?!1:it(n).position==="fixed"||Kc(n,t)}function iy(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?Yt(e):e;for(;st(s)&&!An(s);){const i=it(s),l=Ra(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||cr(s)&&!l&&Kc(e,s))?r=r.filter(p=>p!==s):o=i,s=Yt(s)}return t.set(e,r),r}function ly(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Co(t)?[]:iy(t,this._c):[].concat(n),r],i=Rc(t,s[0],o);let l=i.top,d=i.right,p=i.bottom,u=i.left;for(let h=1;h<s.length;h++){const g=Rc(t,s[h],o);l=Ve(g.top,l),d=Vt(g.right,d),p=Vt(g.bottom,p),u=Ve(g.left,u)}return{width:d-u,height:p-l,x:u,y:l}}function cy(e){const{width:t,height:n}=Yc(e);return{width:t,height:n}}function dy(e,t,n){const r=Pt(t),o=wt(t),a=n==="fixed",s=sn(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=bt(0);function d(){l.x=No(o)}if(r||!r&&!a)if((In(t)!=="body"||cr(o))&&(i=So(t)),r){const g=sn(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const p=o&&!r&&!a?jc(o,i):bt(0),u=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:u,y:h,width:s.width,height:s.height}}function Za(e){return it(e).position==="static"}function qc(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 Xc(e,t){const n=Ye(e);if(Co(e))return n;if(!Pt(e)){let o=Yt(e);for(;o&&!An(o);){if(st(o)&&!Za(o))return o;o=Yt(o)}return n}let r=qc(e,t);for(;r&&Xb(r)&&Za(r);)r=qc(r,t);return r&&An(r)&&Za(r)&&!Ra(r)?n:r||Jb(e)||n}const uy=async function(e){const t=this.getOffsetParent||Xc,n=this.getDimensions,r=await n(e.floating);return{reference:dy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fy(e){return it(e).direction==="rtl"}const py={convertOffsetParentRelativeRectToViewportRelativeRect:ny,getDocumentElement:wt,getClippingRect:ly,getOffsetParent:Xc,getElementRects:uy,getClientRects:ry,getDimensions:cy,getScale:Fn,isElement:st,isRTL:fy};function Zc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hy(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 d=e.getBoundingClientRect(),{left:p,top:u,width:h,height:g}=d;if(i||t(),!h||!g)return;const w=bo(u),m=bo(o.clientWidth-(p+h)),v=bo(o.clientHeight-(u+g)),b=bo(p),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ve(0,Vt(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&&!Zc(d,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 gy(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,d=Xa(e),p=o||a?[...d?dr(d):[],...t?dr(t):[]]:[];p.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const u=d&&i?hy(d,n):null;let h=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===d&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),d&&!l&&g.observe(d),t&&g.observe(t));let w,m=l?sn(e):null;l&&v();function v(){const b=sn(e);m&&!Zc(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)}),u==null||u(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const my=Ub,vy=Rb,by=Yb,yy=qb,wy=Gb,Qc=Vb,xy=Kb,Cy=(e,t,n)=>{const r=new Map,o={platform:py,...n},a={...o.platform,_c:r};return Hb(e,t,{...o,platform:a})};var Sy=typeof document<"u",Ny=function(){},ko=Sy?S.useLayoutEffect:Ny;function Mo(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(!Mo(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)&&!Mo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Jc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ed(e,t){const n=Jc(e);return Math.round(t*n)/n}function Qa(e){const t=f.useRef(e);return ko(()=>{t.current=e}),t}function ky(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:d}=e,[p,u]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=f.useState(r);Mo(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!==k.current&&(k.current=G,b(G))},[]),N=a||w,M=s||v,C=f.useRef(null),k=f.useRef(null),D=f.useRef(p),E=l!=null,I=Qa(l),R=Qa(o),B=Qa(d),q=f.useCallback(()=>{if(!C.current||!k.current)return;const G={placement:t,strategy:n,middleware:h};R.current&&(G.platform=R.current),Cy(C.current,k.current,G).then(A=>{const Q={...A,isPositioned:B.current!==!1};Y.current&&!Mo(D.current,Q)&&(D.current=Q,jr.flushSync(()=>{u(Q)}))})},[h,t,n,R,B]);ko(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(G=>({...G,isPositioned:!1})))},[d]);const Y=f.useRef(!1);ko(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ko(()=>{if(N&&(C.current=N),M&&(k.current=M),N&&M){if(I.current)return I.current(N,M,q);q()}},[N,M,q,I,E]);const ae=f.useMemo(()=>({reference:C,floating:k,setReference:y,setFloating:x}),[y,x]),z=f.useMemo(()=>({reference:N,floating:M}),[N,M]),K=f.useMemo(()=>{const G={position:n,left:0,top:0};if(!z.floating)return G;const A=ed(z.floating,p.x),Q=ed(z.floating,p.y);return i?{...G,transform:"translate("+A+"px, "+Q+"px)",...Jc(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:Q}},[n,i,z.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:q,refs:ae,elements:z,floatingStyles:K}),[p,q,ae,z,K])}const My=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):{}}}},Dy=(e,t)=>{const n=my(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ey=(e,t)=>{const n=vy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ty=(e,t)=>({fn:xy(e).fn,options:[e,t]}),Py=(e,t)=>{const n=by(e);return{name:n.name,fn:n.fn,options:[e,t]}},_y=(e,t)=>{const n=yy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Oy=(e,t)=>{const n=wy(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iy=(e,t)=>{const n=My(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ay="Arrow",td=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"})})});td.displayName=Ay;var Fy=td;function Wy(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,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,i=d.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 Ja="Popper",[nd,Gt]=Ze(Ja),[$y,rd]=nd(Ja),od=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return c.jsx($y,{scope:t,anchor:r,onAnchorChange:o,children:n})};od.displayName=Ja;var ad="PopperAnchor",sd=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=rd(ad,n),s=f.useRef(null),i=he(t,s),l=f.useRef(null);return f.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:c.jsx(ne.div,{...o,ref:i})});sd.displayName=ad;var es="PopperContent",[zy,By]=nd(es),id=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:d=[],collisionPadding:p=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=rd(es,n),[b,y]=f.useState(null),x=he(t,Me=>y(Me)),[N,M]=f.useState(null),C=Wy(N),k=(C==null?void 0:C.width)??0,D=(C==null?void 0:C.height)??0,E=r+(a!=="center"?"-"+a:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},R=Array.isArray(d)?d:[d],B=R.length>0,q={padding:I,boundary:R.filter(Hy),altBoundary:B},{refs:Y,floatingStyles:ae,placement:z,isPositioned:K,middlewareData:G}=ky({strategy:"fixed",placement:E,whileElementsMounted:(...Me)=>gy(...Me,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Dy({mainAxis:o+D,alignmentAxis:s}),l&&Ey({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Ty():void 0,...q}),l&&Py({...q}),_y({...q,apply:({elements:Me,rects:Ee,availableWidth:tt,availableHeight:Ue})=>{const{width:Fe,height:Zt}=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",`${Zt}px`)}}),N&&Iy({element:N,padding:i}),Vy({arrowWidth:k,arrowHeight:D}),h&&Oy({strategy:"referenceHidden",...q})]}),[A,Q]=dd(z),oe=ot(w);Pe(()=>{K&&(oe==null||oe())},[K,oe]);const O=(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(zy,{scope:n,placedSide:A,onArrowChange:M,arrowX:O,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"}})})})});id.displayName=es;var ld="PopperArrow",Ly={top:"bottom",right:"left",bottom:"top",left:"right"},cd=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=By(ld,r),s=Ly[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(Fy,{...o,ref:n,style:{...o.style,display:"block"}})})});cd.displayName=ld;function Hy(e){return e!==null}var Vy=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,[d,p]=dd(n),u={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 d==="bottom"?(w=s?u:`${h}px`,m=`${-l}px`):d==="top"?(w=s?u:`${h}px`,m=`${r.floating.height+l}px`):d==="right"?(w=`${-l}px`,m=s?u:`${g}px`):d==="left"&&(w=`${r.floating.width+l}px`,m=s?u:`${g}px`),{data:{x:w,y:m}}}});function dd(e){const[t,n="center"]=e.split("-");return[t,n]}var ur=od,fr=sd,Do=id,Eo=cd,To="Popover",[ud]=Ze(To,[Gt]),pr=Gt(),[Yy,jt]=ud(To),fd=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=pr(t),l=f.useRef(null),[d,p]=f.useState(!1),[u,h]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:To});return c.jsx(ur,{...i,children:c.jsx(Yy,{scope:t,contentId:Ce(),triggerRef:l,open:u,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:f.useCallback(()=>p(!0),[]),onCustomAnchorRemove:f.useCallback(()=>p(!1),[]),modal:s,children:n})})};fd.displayName=To;var pd="PopoverAnchor",hd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(pd,n),a=pr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(fr,{...a,...r,ref:t})});hd.displayName=pd;var gd="PopoverTrigger",md=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(gd,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":Cd(o.open),...r,ref:s,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(fr,{asChild:!0,...a,children:i})});md.displayName=gd;var ts="PopoverPortal",[Gy,jy]=ud(ts,{forceMount:void 0}),vd=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=jt(ts,t);return c.jsx(Gy,{scope:t,forceMount:n,children:c.jsx(ze,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};vd.displayName=ts;var Wn="PopoverContent",bd=f.forwardRef((e,t)=>{const n=jy(Wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=jt(Wn,e.__scopePopover);return c.jsx(ze,{present:r||a.open,children:a.modal?c.jsx(Ry,{...o,ref:t}):c.jsx(Ky,{...o,ref:t})})});bd.displayName=Wn;var Uy=tn("PopoverContent.RemoveScroll"),Ry=f.forwardRef((e,t)=>{const n=jt(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 lo(s)},[]),c.jsx(ar,{as:Uy,allowPinchZoom:!0,children:c.jsx(yd,{...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,d=i.button===2||l;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ky=f.forwardRef((e,t)=>{const n=jt(Wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return c.jsx(yd,{...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,d;(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;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),yd=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:p,...u}=e,h=jt(Wn,n),g=pr(n);return eo(),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:d,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(Do,{"data-state":Cd(h.open),role:"dialog",id:h.contentId,...g,...u,ref:t,style:{...u.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)"}})})})}),wd="PopoverClose",xd=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=jt(wd,n);return c.jsx(ne.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});xd.displayName=wd;var qy="PopoverArrow",Xy=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=pr(n);return c.jsx(Eo,{...o,...r,ref:t})});Xy.displayName=qy;function Cd(e){return e?"open":"closed"}var Zy=fd,Qy=hd,Jy=md,ew=vd,Sd=bd,tw=xd;const ln=Zy,hr=Jy,nw=tw,rw=Qy,Ut=f.forwardRef(({className:e,align:t="center",sideOffset:n=8,...r},o)=>c.jsx(ew,{children:c.jsx(Sd,{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})}));Ut.displayName=Sd.displayName;const Nd=({content:e,children:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(ln,{...s,children:[c.jsx(hr,{asChild:!0,children:t}),c.jsx(Ut,{side:n,align:r,sideOffset:o,className:a,children:e})]});Nd.displayName="Popover";const kd=ye(["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}}),ns=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(kd({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"})]}));ns.displayName="ComboBoxTrigger";const Md=f.forwardRef(({className:e,children:t,searchPlaceholder:n="Search…",searchValue:r,onSearchChange:o,align:a="start"},s)=>c.jsx(Ut,{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(po,{className:"w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none",placeholder:n})}),c.jsx(ho,{className:"max-h-60 overflow-y-auto p-1",children:t})]})}));Md.displayName="ComboBoxContent";const Dd=f.forwardRef(({className:e,children:t,selected:n,onSelect:r,...o},a)=>c.jsxs(fo,{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(nn,{className:"size-4","aria-hidden":"true"})}),t]}));Dd.displayName="ComboBoxItem";const Ed=f.forwardRef(({className:e,children:t,...n},r)=>c.jsx(go,{ref:r,className:P("py-6 text-center text-sm text-muted-foreground",e),...n,children:t}));Ed.displayName="ComboBoxEmpty";const Td=f.forwardRef(({className:e,heading:t,children:n,...r},o)=>c.jsx(Tc,{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}));Td.displayName="ComboBoxGroup";const Pd=f.forwardRef(({className:e,...t},n)=>c.jsx(Pc,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Pd.displayName="ComboBoxSeparator";const _d=ln;_d.displayName="ComboBoxRoot";const Od=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:d},p)=>{const[u,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(ln,{open:u,onOpenChange:v,children:[c.jsx(hr,{asChild:!0,children:c.jsx(ns,{ref:p,size:s,isError:i,disabled:l,className:d,placeholder:r,"aria-expanded":u,"aria-haspopup":"listbox",children:m})}),c.jsx(Ut,{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(po,{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(ho,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(go,{className:"py-6 text-center text-sm text-muted-foreground",children:a}),e.map(b=>c.jsxs(fo,{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(nn,{className:"size-4","aria-hidden":"true"})}),b.label]},b.value))]})]})})]})});Od.displayName="ComboBox";const ow=new Set(["contains","equals","startsWith","endsWith","notContains","empty","notEmpty"]);function rs(e){return ow.has(e)}const os=[{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 aw(e,t){const n=e.getValue(t);return n==null?"":typeof n=="string"?n:String(n)}const as=(e,t,n,r)=>{const o=aw(e,t).toLowerCase();if(n==null||n==="")return!0;if(typeof n=="string"){const d=n.trim().toLowerCase();return d===""||o.includes(d)}if(typeof n!="object"||n===null)return!0;const a=n,s=a.op,i=typeof a.value=="string"?a.value:"";if(!s||!rs(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 sw(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(rs(t.op))return{op:t.op,value:t.value??""}}return{op:"contains",value:""}}function iw(e){if(!(e.op==="contains"&&e.value.trim()===""))return e}const ss=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})}));ss.displayName="Table";const is=f.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:P("[&_tr]:border-b [&_tr]:border-border",e),...t}));is.displayName="TableHeader";const ls=f.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:P("[&_tr:last-child]:border-0",e),...t}));ls.displayName="TableBody";const cs=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}));cs.displayName="TableFooter";const _t=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}));_t.displayName="TableRow";const Po=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}));Po.displayName="TableHead";const cn=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}));cn.displayName="TableCell";const Id=f.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:P("mt-4 text-sm text-muted-foreground text-pretty",e),...t}));Id.displayName="TableCaption";const ds=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("animate-pulse rounded-md bg-muted",e),...t}));ds.displayName="Skeleton";const Ad=f.createContext({inGroup:!1}),Fd=ye(["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(Ad);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(Fd({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 us=f.forwardRef(({className:e,isError:t,children:n,...r},o)=>c.jsx(Ad,{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})}));us.displayName="InputGroup";const fs=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}));fs.displayName="InputAddon";const ps=f.forwardRef(({className:e,...t},n)=>c.jsx("nav",{ref:n,"aria-label":"Pagination",className:P("flex items-center gap-1",e),...t}));ps.displayName="PaginationRoot";const hs=["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(" "),gs=f.forwardRef(({className:e,isActive:t,...n},r)=>c.jsx("button",{ref:r,"aria-current":t?"page":void 0,className:P(hs,t?"bg-primary text-primary-foreground shadow-sm":"text-foreground hover:bg-accent hover:text-accent-foreground",e),...n}));gs.displayName="PaginationItem";const ms=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Previous page",className:P(hs,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(tl,{className:"size-4"})}));ms.displayName="PaginationPrev";const vs=f.forwardRef(({className:e,...t},n)=>c.jsx("button",{ref:n,"aria-label":"Next page",className:P(hs,"text-foreground hover:bg-accent hover:text-accent-foreground",e),...t,children:c.jsx(wn,{className:"size-4"})}));vs.displayName="PaginationNext";const bs=({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(qg,{className:"size-4"})});bs.displayName="PaginationEllipsis";function lw(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,d)=>d+1):[...Array.from({length:i},(l,d)=>d+1),"ellipsis-right",t]}if(!s){const i=3+2*n,l=t-i+1;return l<=1?Array.from({length:t},(d,p)=>p+1):[1,"ellipsis-left",...Array.from({length:i},(d,p)=>l+p)]}return[1,"ellipsis-left",...Array.from({length:o-r+1},(i,l)=>r+l),"ellipsis-right",t]}const ys=({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o,...a})=>{if(t<=1)return null;const s=lw(e,t,r);return c.jsxs(ps,{className:o,...a,children:[c.jsx(ms,{onClick:()=>n(e-1),disabled:e<=1}),s.map(i=>i==="ellipsis-left"||i==="ellipsis-right"?c.jsx(bs,{},i):c.jsx(gs,{isActive:i===e,onClick:()=>n(i),children:i},i)),c.jsx(vs,{onClick:()=>n(e+1),disabled:e>=t})]})};ys.displayName="Pagination";function Wd(e,[t,n]){return Math.min(n,Math.max(t,e))}function cw(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 $d=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"}),dw="VisuallyHidden",zd=f.forwardRef((e,t)=>c.jsx(ne.span,{...e,ref:t,style:{...$d,...e.style}}));zd.displayName=dw;var uw=zd,fw=[" ","Enter","ArrowUp","ArrowDown"],pw=[" ","Enter"],dn="Select",[_o,Oo,hw]=Ur(dn),[$n]=Ze(dn,[hw,Gt]),Io=Gt(),[gw,Rt]=$n(dn),[mw,vw]=$n(dn),Bd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:d,name:p,autoComplete:u,disabled:h,required:g,form:w}=e,m=Io(t),[v,b]=f.useState(null),[y,x]=f.useState(null),[N,M]=f.useState(!1),C=tr(d),[k,D]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:dn}),[E,I]=Qe({prop:s,defaultProp:i,onChange:l,caller:dn}),R=f.useRef(null),B=v?w||!!v.closest("form"):!0,[q,Y]=f.useState(new Set),ae=Array.from(q).map(z=>z.props.value).join(";");return c.jsx(ur,{...m,children:c.jsxs(gw,{required:g,scope:t,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:M,contentId:Ce(),value:E,onValueChange:I,open:k,onOpenChange:D,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[c.jsx(_o.Provider,{scope:t,children:c.jsx(mw,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(z=>{Y(K=>new Set(K).add(z))},[]),onNativeOptionRemove:f.useCallback(z=>{Y(K=>{const G=new Set(K);return G.delete(z),G})},[]),children:n})}),B?c.jsxs(cu,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:u,value:E,onChange:z=>I(z.target.value),disabled:h,form:w,children:[E===void 0?c.jsx("option",{value:""}):null,Array.from(q)]},ae):null]})})};Bd.displayName=dn;var Ld="SelectTrigger",Hd=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Io(n),s=Rt(Ld,n),i=s.disabled||r,l=he(t,s.onTriggerChange),d=Oo(n),p=f.useRef("touch"),[u,h,g]=uu(m=>{const v=d().filter(x=>!x.disabled),b=v.find(x=>x.value===s.value),y=fu(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":du(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=u.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&fw.includes(m.key)&&(w(),m.preventDefault())})})})});Hd.displayName=Ld;var Vd="SelectValue",Yd=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Rt(Vd,n),{onValueNodeHasChildrenChange:d}=l,p=a!==void 0,u=he(t,l.onValueNodeChange);return Pe(()=>{d(p)},[d,p]),c.jsx(ne.span,{...i,ref:u,style:{pointerEvents:"none"},children:du(l.value)?c.jsx(c.Fragment,{children:s}):a})});Yd.displayName=Vd;var bw="SelectIcon",yw=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(ne.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});yw.displayName=bw;var ww="SelectPortal",Gd=e=>c.jsx(kn,{asChild:!0,...e});Gd.displayName=ww;var un="SelectContent",jd=f.forwardRef((e,t)=>{const n=Rt(un,e.__scopeSelect),[r,o]=f.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?jr.createPortal(c.jsx(Ud,{scope:e.__scopeSelect,children:c.jsx(_o.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(Rd,{...e,ref:t})});jd.displayName=un;var lt=10,[Ud,Kt]=$n(un),xw="SelectContentImpl",Cw=tn("SelectContent.RemoveScroll"),Rd=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:d,alignOffset:p,arrowPadding:u,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...b}=e,y=Rt(un,n),[x,N]=f.useState(null),[M,C]=f.useState(null),k=he(t,W=>N(W)),[D,E]=f.useState(null),[I,R]=f.useState(null),B=Oo(n),[q,Y]=f.useState(!1),ae=f.useRef(!1);f.useEffect(()=>{if(x)return lo(x)},[x]),eo();const z=f.useCallback(W=>{const[U,...X]=B().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&&M&&(M.scrollTop=0),ce===se&&M&&(M.scrollTop=M.scrollHeight),ce==null||ce.focus(),document.activeElement!==de))return},[B,M]),K=f.useCallback(()=>z([D,x]),[z,D,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]=uu(W=>{const U=B().filter(de=>!de.disabled),X=U.find(de=>de.ref.current===document.activeElement),se=fu(U,W,X);se&&setTimeout(()=>se.ref.current.focus())}),O=f.useCallback((W,U,X)=>{const se=!ae.current&&!X;(y.value!==void 0&&y.value===U||se)&&(E(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"?ws:Kd,Z=$===ws?{side:i,sideOffset:l,align:d,alignOffset:p,arrowPadding:u,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return c.jsx(Ud,{scope:n,content:x,viewport:M,onViewportChange:C,itemRefCallback:O,selectedItem:D,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:k,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=B().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(()=>z(se)),W.preventDefault()}})})})})})})});Rd.displayName=xw;var Sw="SelectItemAlignedPosition",Kd=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Rt(un,n),s=Kt(un,n),[i,l]=f.useState(null),[d,p]=f.useState(null),u=he(t,k=>p(k)),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&&d&&m&&v&&b){const k=a.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),E=a.valueNode.getBoundingClientRect(),I=b.getBoundingClientRect();if(a.dir!=="rtl"){const de=I.left-D.left,ce=E.left-de,Me=k.left-ce,Ee=k.width+Me,tt=Math.max(Ee,D.width),Ue=window.innerWidth-lt,Fe=Wd(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.left=Fe+"px"}else{const de=D.right-I.right,ce=window.innerWidth-E.right-de,Me=window.innerWidth-k.right-ce,Ee=k.width+Me,tt=Math.max(Ee,D.width),Ue=window.innerWidth-lt,Fe=Wd(ce,[lt,Math.max(lt,Ue-tt)]);i.style.minWidth=Ee+"px",i.style.right=Fe+"px"}const R=h(),B=window.innerHeight-lt*2,q=m.scrollHeight,Y=window.getComputedStyle(d),ae=parseInt(Y.borderTopWidth,10),z=parseInt(Y.paddingTop,10),K=parseInt(Y.borderBottomWidth,10),G=parseInt(Y.paddingBottom,10),A=ae+z+q+G+K,Q=Math.min(v.offsetHeight*5,A),oe=window.getComputedStyle(m),O=parseInt(oe.paddingTop,10),F=parseInt(oe.paddingBottom,10),V=k.top+k.height/2-lt,$=B-V,Z=v.offsetHeight/2,W=v.offsetTop+Z,U=ae+z+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=d.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?O: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=B+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,i,d,m,v,b,a.dir,r]);Pe(()=>x(),[x]);const[N,M]=f.useState();Pe(()=>{d&&M(window.getComputedStyle(d).zIndex)},[d]);const C=f.useCallback(k=>{k&&w.current===!0&&(x(),y==null||y(),w.current=!1)},[x,y]);return c.jsx(kw,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:c.jsx(ne.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Kd.displayName=Sw;var Nw="SelectPopperPosition",ws=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...a}=e,s=Io(n);return c.jsx(Do,{...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)"}})});ws.displayName=Nw;var[kw,xs]=$n(un,{}),Cs="SelectViewport",qd=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Kt(Cs,n),s=xs(Cs,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(_o.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,d=>{const p=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&u){const g=Math.abs(l.current-p.scrollTop);if(g>0){const w=window.innerHeight-lt*2,m=parseFloat(u.style.minHeight),v=parseFloat(u.style.height),b=Math.max(m,v);if(b<w){const y=b+g,x=Math.min(w,y),N=y-x;u.style.height=x+"px",u.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,u.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});qd.displayName=Cs;var Xd="SelectGroup",[Mw,Dw]=$n(Xd),Zd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ce();return c.jsx(Mw,{scope:n,id:o,children:c.jsx(ne.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Zd.displayName=Xd;var Qd="SelectLabel",Jd=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Dw(Qd,n);return c.jsx(ne.div,{id:o.id,...r,ref:t})});Jd.displayName=Qd;var Ao="SelectItem",[Ew,eu]=$n(Ao),tu=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Rt(Ao,n),l=Kt(Ao,n),d=i.value===r,[p,u]=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=Ce(),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(Ew,{scope:n,value:r,disabled:o,textId:m,isSelected:d,onItemTextChange:f.useCallback(y=>{u(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(_o.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":d&&h,"data-state":d?"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 N;((N=l.searchRef)==null?void 0:N.current)!==""&&y.key===" "||(pw.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});tu.displayName=Ao;var mr="SelectItemText",nu=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Rt(mr,n),i=Kt(mr,n),l=eu(mr,n),d=vw(mr,n),[p,u]=f.useState(null),h=he(t,b=>u(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}=d;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?jr.createPortal(a.children,s.valueNode):null]})});nu.displayName=mr;var ru="SelectItemIndicator",ou=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return eu(ru,n).isSelected?c.jsx(ne.span,{"aria-hidden":!0,...r,ref:t}):null});ou.displayName=ru;var Ss="SelectScrollUpButton",au=f.forwardRef((e,t)=>{const n=Kt(Ss,e.__scopeSelect),r=xs(Ss,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(iu,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});au.displayName=Ss;var Ns="SelectScrollDownButton",su=f.forwardRef((e,t)=>{const n=Kt(Ns,e.__scopeSelect),r=xs(Ns,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<d;a(p)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(iu,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});su.displayName=Ns;var iu=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Kt("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 d=i().find(u=>u.ref.current===document.activeElement);(p=d==null?void 0:d.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 d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{l()})})}),Tw="SelectSeparator",lu=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(ne.div,{"aria-hidden":!0,...r,ref:t})});lu.displayName=Tw;var ks="SelectArrow",Pw=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Io(n),a=Rt(ks,n),s=Kt(ks,n);return a.open&&s.position==="popper"?c.jsx(Eo,{...o,...r,ref:t}):null});Pw.displayName=ks;var _w="SelectBubbleInput",cu=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=cw(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 u=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(u)}},[s,t]),c.jsx(ne.select,{...n,style:{...$d,...n.style},ref:a,defaultValue:t})});cu.displayName=_w;function du(e){return e===""||e===void 0}function uu(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(d){n.current=d,window.clearTimeout(r.current),d!==""&&(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 fu(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ow(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Ow(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Iw=Bd,pu=Hd,Aw=Yd,Fw=Gd,hu=jd,Ww=qd,$w=Zd,gu=Jd,mu=tu,zw=nu,Bw=ou,vu=au,bu=su,yu=lu;const wu=ye(["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}}),Ms=Iw,Lw=$w,Ds=Aw,Fo=f.forwardRef(({className:e,size:t,isError:n,children:r,...o},a)=>c.jsxs(pu,{ref:a,className:P("group",wu({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"})]}));Fo.displayName=pu.displayName;const Es=f.forwardRef(({className:e,...t},n)=>c.jsx(vu,{ref:n,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground",e),...t,children:c.jsx(Qr,{className:"size-4"})}));Es.displayName=vu.displayName;const Ts=f.forwardRef(({className:e,...t},n)=>c.jsx(bu,{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"})}));Ts.displayName=bu.displayName;const Wo=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>c.jsx(Fw,{children:c.jsxs(hu,{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(Es,{}),c.jsx(Ww,{className:"p-1",children:t}),c.jsx(Ts,{})]})}));Wo.displayName=hu.displayName;const xu=f.forwardRef(({className:e,...t},n)=>c.jsx(gu,{ref:n,className:P("px-2 py-1.5 text-xs font-semibold text-muted-foreground",e),...t}));xu.displayName=gu.displayName;const Ps=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(mu,{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(Bw,{children:c.jsx(nn,{className:"size-4"})})}),c.jsx(zw,{children:t})]}));Ps.displayName=mu.displayName;const Cu=f.forwardRef(({className:e,...t},n)=>c.jsx(yu,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));Cu.displayName=yu.displayName;const Su=f.forwardRef(({placeholder:e,size:t,isError:n,disabled:r,className:o,children:a,...s},i)=>c.jsxs(Ms,{disabled:r,...s,children:[c.jsx(Fo,{ref:i,size:t,isError:n,className:o,children:c.jsx(Ds,{placeholder:e})}),c.jsx(Wo,{children:a})]}));Su.displayName="Select";var _s="rovingFocusGroup.onEntryFocus",Hw={bubbles:!1,cancelable:!0},vr="RovingFocusGroup",[Os,Nu,Vw]=Ur(vr),[Yw,$o]=Ze(vr,[Vw]),[Gw,jw]=Yw(vr),ku=f.forwardRef((e,t)=>c.jsx(Os.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Os.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Uw,{...e,ref:t})})}));ku.displayName=vr;var Uw=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...u}=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(d),N=Nu(n),M=f.useRef(!1),[C,k]=f.useState(0);return f.useEffect(()=>{const D=h.current;if(D)return D.addEventListener(_s,x),()=>D.removeEventListener(_s,x)},[x]),c.jsx(Gw,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(D=>v(D),[v]),onItemShiftTab:f.useCallback(()=>y(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(D=>D+1),[]),onFocusableItemRemove:f.useCallback(()=>k(D=>D-1),[]),children:c.jsx(ne.div,{tabIndex:b||C===0?-1:0,"data-orientation":r,...u,ref:g,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{M.current=!0}),onFocus:j(e.onFocus,D=>{const E=!M.current;if(D.target===D.currentTarget&&E&&!b){const I=new CustomEvent(_s,Hw);if(D.currentTarget.dispatchEvent(I),!I.defaultPrevented){const R=N().filter(z=>z.focusable),B=R.find(z=>z.active),q=R.find(z=>z.id===m),ae=[B,q,...R].filter(Boolean).map(z=>z.ref.current);Eu(ae,p)}}M.current=!1}),onBlur:j(e.onBlur,()=>y(!1))})})}),Mu="RovingFocusGroupItem",Du=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=Ce(),d=a||l,p=jw(Mu,n),u=p.currentTabStopId===d,h=Nu(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=p;return f.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),c.jsx(Os.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:c.jsx(ne.span,{tabIndex:u?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:j(e.onMouseDown,v=>{r?p.onItemFocus(d):v.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:j(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=qw(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(N=>N.focusable).map(N=>N.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const N=x.indexOf(v.currentTarget);x=p.loop?Xw(x,N+1):x.slice(N+1)}setTimeout(()=>Eu(x))}}),children:typeof s=="function"?s({isCurrentTabStop:u,hasTabStop:m!=null}):s})})});Du.displayName=Mu;var Rw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function qw(e,t,n){const r=Kw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Rw[r]}function Eu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Xw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Tu=ku,Pu=Du,Is=["Enter"," "],Zw=["ArrowDown","PageUp","Home"],_u=["ArrowUp","PageDown","End"],Qw=[...Zw,..._u],Jw={ltr:[...Is,"ArrowRight"],rtl:[...Is,"ArrowLeft"]},ex={ltr:["ArrowLeft"],rtl:["ArrowRight"]},br="Menu",[yr,tx,nx]=Ur(br),[fn,Ou]=Ze(br,[nx,Gt,$o]),wr=Gt(),Iu=$o(),[Au,qt]=fn(br),[rx,xr]=fn(br),Fu=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=wr(t),[l,d]=f.useState(null),p=f.useRef(!1),u=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(Au,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:d,children:c.jsx(rx,{scope:t,onClose:f.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:p,dir:h,modal:s,children:r})})})};Fu.displayName=br;var ox="MenuAnchor",As=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(fr,{...o,...r,ref:t})});As.displayName=ox;var Fs="MenuPortal",[ax,Wu]=fn(Fs,{forceMount:void 0}),$u=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=qt(Fs,t);return c.jsx(ax,{scope:t,forceMount:n,children:c.jsx(ze,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};$u.displayName=Fs;var Je="MenuContent",[sx,Ws]=fn(Je),zu=f.forwardRef((e,t)=>{const n=Wu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(Je,e.__scopeMenu),s=xr(Je,e.__scopeMenu);return c.jsx(yr.Provider,{scope:e.__scopeMenu,children:c.jsx(ze,{present:r||a.open,children:c.jsx(yr.Slot,{scope:e.__scopeMenu,children:s.modal?c.jsx(ix,{...o,ref:t}):c.jsx(lx,{...o,ref:t})})})})}),ix=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return lo(a)},[]),c.jsx($s,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),lx=f.forwardRef((e,t)=>{const n=qt(Je,e.__scopeMenu);return c.jsx($s,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cx=tn("MenuContent.ScrollLock"),$s=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=qt(Je,n),b=xr(Je,n),y=wr(n),x=Iu(n),N=tx(n),[M,C]=f.useState(null),k=f.useRef(null),D=he(t,k,v.onContentChange),E=f.useRef(0),I=f.useRef(""),R=f.useRef(0),B=f.useRef(null),q=f.useRef("right"),Y=f.useRef(0),ae=w?ar:f.Fragment,z=w?{as:cx,allowPinchZoom:!0}:void 0,K=A=>{var W,U;const Q=I.current+A,oe=N().filter(X=>!X.disabled),O=document.activeElement,F=(W=oe.find(X=>X.ref.current===O))==null?void 0:W.textValue,V=oe.map(X=>X.textValue),$=xx(V,Q,F),Z=(U=oe.find(X=>X.textValue===$))==null?void 0:U.ref.current;(function X(se){I.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>X(""),1e3))})(Q),Z&&setTimeout(()=>Z.focus())};f.useEffect(()=>()=>window.clearTimeout(E.current),[]),eo();const G=f.useCallback(A=>{var oe,O;return q.current===((oe=B.current)==null?void 0:oe.side)&&Sx(A,(O=B.current)==null?void 0:O.area)},[]);return c.jsx(sx,{scope:n,searchRef:I,onItemEnter:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),onItemLeave:f.useCallback(A=>{var Q;G(A)||((Q=k.current)==null||Q.focus(),C(null))},[G]),onTriggerLeave:f.useCallback(A=>{G(A)&&A.preventDefault()},[G]),pointerGraceTimerRef:R,onPointerGraceIntentChange:f.useCallback(A=>{B.current=A},[]),children:c.jsx(ae,{...z,children:c.jsx(or,{asChild:!0,trapped:o,onMountAutoFocus:j(a,A=>{var Q;A.preventDefault(),(Q=k.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:h,onDismiss:g,children:c.jsx(Tu,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:C,onEntryFocus:j(l,A=>{b.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Do,{role:"menu","aria-orientation":"vertical","data-state":nf(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...m,ref:D,style:{outline:"none",...m.style},onKeyDown:j(m.onKeyDown,A=>{const oe=A.target.closest("[data-radix-menu-content]")===A.currentTarget,O=A.ctrlKey||A.altKey||A.metaKey,F=A.key.length===1;oe&&(A.key==="Tab"&&A.preventDefault(),!O&&F&&K(A.key));const V=k.current;if(A.target!==V||!Qw.includes(A.key))return;A.preventDefault();const Z=N().filter(W=>!W.disabled).map(W=>W.ref.current);_u.includes(A.key)&&Z.reverse(),yx(Z)}),onBlur:j(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(E.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 O=A.clientX>Y.current?"right":"left";q.current=O,Y.current=A.clientX}}))})})})})})})});zu.displayName=Je;var dx="MenuGroup",zs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"group",...r,ref:t})});zs.displayName=dx;var ux="MenuLabel",Bu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{...r,ref:t})});Bu.displayName=ux;var zo="MenuItem",Lu="menu.itemSelect",Bo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=xr(zo,e.__scopeMenu),i=Ws(zo,e.__scopeMenu),l=he(t,a),d=f.useRef(!1),p=()=>{const u=a.current;if(!n&&u){const h=new CustomEvent(Lu,{bubbles:!0,cancelable:!0});u.addEventListener(Lu,g=>r==null?void 0:r(g),{once:!0}),$i(u,h),h.defaultPrevented?d.current=!1:s.onClose()}};return c.jsx(Hu,{...o,ref:l,disabled:n,onClick:j(e.onClick,p),onPointerDown:u=>{var h;(h=e.onPointerDown)==null||h.call(e,u),d.current=!0},onPointerUp:j(e.onPointerUp,u=>{var h;d.current||(h=u.currentTarget)==null||h.click()}),onKeyDown:j(e.onKeyDown,u=>{const h=i.searchRef.current!=="";n||h&&u.key===" "||Is.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Bo.displayName=zo;var Hu=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=Ws(zo,n),i=Iu(n),l=f.useRef(null),d=he(t,l),[p,u]=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(Pu,{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:d,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,()=>u(!0)),onBlur:j(e.onBlur,()=>u(!1))})})})}),fx="MenuCheckboxItem",Vu=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Ru,{scope:e.__scopeMenu,checked:n,children:c.jsx(Bo,{role:"menuitemcheckbox","aria-checked":Lo(n)?"mixed":n,...o,ref:t,"data-state":Hs(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(Lo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Vu.displayName=fx;var Yu="MenuRadioGroup",[px,hx]=fn(Yu,{value:void 0,onValueChange:()=>{}}),Gu=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ot(r);return c.jsx(px,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c.jsx(zs,{...o,ref:t})})});Gu.displayName=Yu;var ju="MenuRadioItem",Uu=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=hx(ju,e.__scopeMenu),a=n===o.value;return c.jsx(Ru,{scope:e.__scopeMenu,checked:a,children:c.jsx(Bo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Hs(a),onSelect:j(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Uu.displayName=ju;var Bs="MenuItemIndicator",[Ru,gx]=fn(Bs,{checked:!1}),Ku=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=gx(Bs,n);return c.jsx(ze,{present:r||Lo(a.checked)||a.checked===!0,children:c.jsx(ne.span,{...o,ref:t,"data-state":Hs(a.checked)})})});Ku.displayName=Bs;var mx="MenuSeparator",qu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ne.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});qu.displayName=mx;var vx="MenuArrow",Xu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=wr(n);return c.jsx(Eo,{...o,...r,ref:t})});Xu.displayName=vx;var Ls="MenuSub",[bx,Zu]=fn(Ls),Qu=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=qt(Ls,t),s=wr(t),[i,l]=f.useState(null),[d,p]=f.useState(null),u=ot(o);return f.useEffect(()=>(a.open===!1&&u(!1),()=>u(!1)),[a.open,u]),c.jsx(ur,{...s,children:c.jsx(Au,{scope:t,open:r,onOpenChange:u,content:d,onContentChange:p,children:c.jsx(bx,{scope:t,contentId:Ce(),triggerId:Ce(),trigger:i,onTriggerChange:l,children:n})})})};Qu.displayName=Ls;var Cr="MenuSubTrigger",Ju=f.forwardRef((e,t)=>{const n=qt(Cr,e.__scopeMenu),r=xr(Cr,e.__scopeMenu),o=Zu(Cr,e.__scopeMenu),a=Ws(Cr,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,d={__scopeMenu:e.__scopeMenu},p=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>p,[p]),f.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),l(null)}},[i,l]),c.jsx(As,{asChild:!0,...d,children:c.jsx(Hu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":nf(n.open),...e,ref:mt(t,o.onTriggerChange),onClick:u=>{var h;(h=e.onClick)==null||h.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,Sr(u=>{a.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:j(e.onPointerLeave,Sr(u=>{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:u.clientX+b,y:u.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(u),u.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,u=>{var g;const h=a.searchRef.current!=="";e.disabled||h&&u.key===" "||Jw[r.dir].includes(u.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),u.preventDefault())})})})});Ju.displayName=Cr;var ef="MenuSubContent",tf=f.forwardRef((e,t)=>{const n=Wu(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(Je,e.__scopeMenu),s=xr(Je,e.__scopeMenu),i=Zu(ef,e.__scopeMenu),l=f.useRef(null),d=he(t,l);return c.jsx(yr.Provider,{scope:e.__scopeMenu,children:c.jsx(ze,{present:r||a.open,children:c.jsx(yr.Slot,{scope:e.__scopeMenu,children:c.jsx($s,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var u;s.isUsingKeyboardRef.current&&((u=l.current)==null||u.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 u=p.currentTarget.contains(p.target),h=ex[s.dir].includes(p.key);u&&h&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});tf.displayName=ef;function nf(e){return e?"open":"closed"}function Lo(e){return e==="indeterminate"}function Hs(e){return Lo(e)?"indeterminate":e?"checked":"unchecked"}function yx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xx(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=wx(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.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],d=i.x,p=i.y,u=l.x,h=l.y;p>r!=h>r&&n<(u-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function Sx(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 Nx=Fu,kx=As,Mx=$u,Dx=zu,Ex=zs,Tx=Bu,Px=Bo,_x=Vu,Ox=Gu,Ix=Uu,Ax=Ku,Fx=qu,Wx=Xu,$x=Qu,zx=Ju,Bx=tf,Ho="DropdownMenu",[Lx]=Ze(Ho,[Ou]),Ie=Ou(),[Hx,rf]=Lx(Ho),of=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ie(t),d=f.useRef(null),[p,u]=Qe({prop:o,defaultProp:a??!1,onChange:s,caller:Ho});return c.jsx(Hx,{scope:t,triggerId:Ce(),triggerRef:d,contentId:Ce(),open:p,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(h=>!h),[u]),modal:i,children:c.jsx(Nx,{...l,open:p,onOpenChange:u,dir:r,modal:i,children:n})})};of.displayName=Ho;var af="DropdownMenuTrigger",sf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=rf(af,n),s=Ie(n);return c.jsx(kx,{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())})})})});sf.displayName=af;var Vx="DropdownMenuPortal",lf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ie(t);return c.jsx(Mx,{...r,...n})};lf.displayName=Vx;var cf="DropdownMenuContent",df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=rf(cf,n),a=Ie(n),s=f.useRef(!1);return c.jsx(Dx,{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,d=l.button===0&&l.ctrlKey===!0,p=l.button===2||d;(!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)"}})});df.displayName=cf;var Yx="DropdownMenuGroup",uf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ex,{...o,...r,ref:t})});uf.displayName=Yx;var Gx="DropdownMenuLabel",ff=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Tx,{...o,...r,ref:t})});ff.displayName=Gx;var jx="DropdownMenuItem",pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Px,{...o,...r,ref:t})});pf.displayName=jx;var Ux="DropdownMenuCheckboxItem",hf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(_x,{...o,...r,ref:t})});hf.displayName=Ux;var Rx="DropdownMenuRadioGroup",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ox,{...o,...r,ref:t})});gf.displayName=Rx;var Kx="DropdownMenuRadioItem",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ix,{...o,...r,ref:t})});mf.displayName=Kx;var qx="DropdownMenuItemIndicator",vf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Ax,{...o,...r,ref:t})});vf.displayName=qx;var Xx="DropdownMenuSeparator",bf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Fx,{...o,...r,ref:t})});bf.displayName=Xx;var Zx="DropdownMenuArrow",Qx=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Wx,{...o,...r,ref:t})});Qx.displayName=Zx;var Jx=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($x,{...s,open:i,onOpenChange:l,children:n})},e0="DropdownMenuSubTrigger",yf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(zx,{...o,...r,ref:t})});yf.displayName=e0;var t0="DropdownMenuSubContent",wf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ie(n);return c.jsx(Bx,{...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)"}})});wf.displayName=t0;var n0=of,r0=sf,xf=lf,Cf=df,o0=uf,Sf=ff,Nf=pf,kf=hf,a0=gf,Mf=mf,Df=vf,Ef=bf,s0=Jx,Tf=yf,Pf=wf;const Vo=n0,Yo=r0,i0=o0,l0=xf,Vs=s0,_f=a0,Nr=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(xf,{children:c.jsx(Cf,{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=Cf.displayName;const Ot=f.forwardRef(({className:e,inset:t,variant:n="default",...r},o)=>c.jsx(Nf,{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}));Ot.displayName=Nf.displayName;const Ys=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>c.jsxs(kf,{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(Df,{children:c.jsx(nn,{className:"size-3.5"})})}),t]}));Ys.displayName=kf.displayName;const Gs=f.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Mf,{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(Df,{children:c.jsx(jg,{className:"size-2 fill-current"})})}),t]}));Gs.displayName=Mf.displayName;const kr=f.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(Sf,{ref:r,className:P("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));kr.displayName=Sf.displayName;const zn=f.forwardRef(({className:e,...t},n)=>c.jsx(Ef,{ref:n,className:P("-mx-1 my-1 h-px bg-border",e),...t}));zn.displayName=Ef.displayName;const Go=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>c.jsxs(Tf,{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"})]}));Go.displayName=Tf.displayName;const jo=f.forwardRef(({className:e,...t},n)=>c.jsx(Pf,{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}));jo.displayName=Pf.displayName;const Of=({trigger:e,items:t,side:n,align:r,sideOffset:o,contentClassName:a,...s})=>c.jsxs(Vo,{...s,children:[c.jsx(Yo,{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(zn,{},l):i.type==="label"?c.jsx(kr,{children:i.label},l):c.jsxs(Ot,{disabled:i.disabled,variant:i.variant,onSelect:i.onSelect,children:[i.icon,i.label]},l))})]});Of.displayName="DropdownMenu";const If=f.createContext(null);function Af(){return f.useContext(If)}const Ff="application/x-bookers-grouping-column-id",Mr="application/x-bookers-grouping-chip",It="bookers-expand";function Wf(e){return"columns"in e&&e.columns&&e.columns.length>0?e.columns.some(Wf):e.footer!==void 0}function c0(){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 $f(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 Uo(e,t,n){return Math.min(Math.max(e,t),n)}function d0({scrollRegionRef:e,minPx:t,maxPx:n,onHeightChange:r}){const o=f.useRef(null),a=l=>{var p;l.preventDefault(),l.stopPropagation();const d=((p=e.current)==null?void 0:p.offsetHeight)??t;o.current={pointerId:l.pointerId,startY:l.clientY,startHeight:d},l.currentTarget.setPointerCapture(l.pointerId)},s=l=>{const d=o.current;if(!d||l.pointerId!==d.pointerId)return;const p=l.clientY-d.startY,u=Uo(d.startHeight+p,t,n);r(u)},i=l=>{const d=o.current;if(!(!d||l.pointerId!==d.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 d=16,p=((h=e.current)==null?void 0:h.offsetHeight)??t,u=l.key==="ArrowUp"?-d:d;r(Uo(p+u,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(Zg,{className:"size-3 shrink-0",strokeWidth:1.5,"aria-hidden":!0}),c.jsx("span",{className:"h-px w-6 bg-border/50"})]})})}function u0({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($t,{className:"size-3.5","aria-hidden":!0})}):null]})}function f0({column:e,id:t,showClear:n}){var u;const r=e.getFilterValue(),o=sw(r),a=o.op,s=o.value,i=a!=="empty"&&a!=="notEmpty",l=h=>{e.setFilterValue(iw(h))},d=((u=os.find(h=>h.value===a))==null?void 0:u.label)??a,p=e.getIsFiltered();return c.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[c.jsxs(us,{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:d})}),c.jsx(fs,{className:"p-0",children:c.jsxs(Vo,{children:[c.jsx(Yo,{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: ${d}`,children:c.jsxs("span",{className:"relative inline-flex size-4 items-center justify-center",children:[c.jsx(em,{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(_f,{value:a,onValueChange:h=>{rs(h)&&l({op:h,value:h==="empty"||h==="notEmpty"?"":s})},children:os.map(h=>c.jsx(Gs,{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($t,{className:"size-3.5","aria-hidden":!0})}):null]})}function p0({column:e,enableAdvancedColumnFilters:t,showColumnFilterClear:n}){const r=e.id,o=e.columnDef.filterFn;return t&&(o===void 0||o===as)?c.jsx(f0,{column:e,id:r,showClear:n}):c.jsx(u0,{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 zf(e){return e.subRows.length===0?e.getIsGrouped()?0:1:e.subRows.reduce((t,n)=>t+zf(n),0)}function h0({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),d=e.getPageCount(),p=f.useMemo(()=>{const u=[...new Set(n)].sort((h,g)=>h-g);return u.includes(a)||(u.push(a),u.sort((h,g)=>h-g)),u},[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(Ms,{value:String(a),onValueChange:u=>{e.setPageSize(Number(u))},children:[c.jsx(Fo,{size:"sm",className:"w-18","aria-label":"Rows per page",children:c.jsx(Ds,{})}),c.jsx(Wo,{children:p.map(u=>c.jsx(Ps,{value:String(u),children:u},u))})]})]}),c.jsx(ys,{page:o+1,totalPages:Math.max(1,d),onPageChange:u=>e.setPageIndex(u-1),siblingCount:r})]})]})}function g0({data:e,columns:t,getRowId:n,enableSorting:r=!1,defaultSorting:o,sorting:a,onSortingChange:s,enableRowSelection:i=!1,defaultRowSelection:l,rowSelection:d,onRowSelectionChange:p,enableColumnResizing:u=!1,columnResizeMode:h="onChange",defaultColumnSizing:g,columnSizing:w,onColumnSizingChange:m,enableColumnReorder:v=!1,defaultColumnOrder:b,columnOrder:y,onColumnOrderChange:x,enableColumnPinning:N=!1,defaultColumnPinning:M,columnPinning:C,onColumnPinningChange:k,enableGlobalFilter:D=!1,showGlobalFilter:E=!0,globalFilterPlaceholder:I="Search…",defaultGlobalFilter:R="",globalFilter:B,onGlobalFilterChange:q,enableColumnFilters:Y=!1,showFilterRow:ae=!0,enableAdvancedColumnFilters:z=!0,showColumnFilterClear:K=!0,defaultColumnFilters:G,columnFilters:A,onColumnFiltersChange:Q,enableExpanding:oe=!1,defaultExpanded:O,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:Zt,enableColumnVisibility:De=!1,defaultColumnVisibility:zr,columnVisibility:Br,onColumnVisibilityChange:_e,enableVirtualization:ft=!1,virtualScrollContainerHeight:We="min(35rem, 70vh)",virtualRowEstimateSize:gn=48,virtualOverscan:Qt=8,enableFooter:Un=!1,enableScrollContainerResize:kt=!1,scrollContainerResizeMaxHeight:Jt="min(90vh, 80rem)",scrollContainerResizeMinHeight:Le="8rem",enablePagination:Rn=!1,manualPagination:pt=!1,rowCount:Kn,pageCount:qn,defaultPagination:ht,pagination:Xn,onPaginationChange:Zn,pageSizeOptions:mn=[10,20,50,100],paginationSiblingCount:Re=1,className:ie,...pe},re){const[ue,J]=f.useState(o??[]),[te,Ne]=ct(a,s,ue,J),[Oe,en]=f.useState(l??{}),[xe,Te]=ct(d,p,Oe,en),[Qn,Ke]=f.useState(g??{}),[qe,Jo]=ct(w,m,Qn,Ke),[Wt,Hh]=f.useState(b??[]),[bN,yN]=ct(y,x,Wt,Hh),[wN,xN]=f.useState(M??{left:[],right:[]}),[CN,SN]=ct(C,k,wN,xN),[NN,kN]=f.useState(R??""),[ea,Mi]=ct(B,q,NN,kN),[MN,DN]=f.useState(G??[]),[EN,TN]=ct(A,Q,MN,DN),[PN,_N]=f.useState(O??{}),[ON,Vh]=ct(F,V,PN,_N),[IN,AN]=f.useState(se??[]),[Di,Lr]=ct(de,ce,IN,AN),[FN,WN]=f.useState(zr??{}),[$N,zN]=ct(Br,_e,FN,WN),Ei=!!(Rn&&!X),[BN,LN]=f.useState(()=>({pageIndex:(ht==null?void 0:ht.pageIndex)??0,pageSize:(ht==null?void 0:ht.pageSize)??10})),[HN,VN]=ct(Xn,Zn,BN,LN),YN=D||Y,vn=!!(oe&&Z&&!X),Ti=f.useMemo(()=>!vn||!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,vn,W]),GN=f.useMemo(()=>Un&&Ti.some(Wf),[Un,Ti]),Yh=f.useMemo(()=>{const _={};return u&&(_.minSize=72,_.size=160,_.maxSize=640),Y&&(_.filterFn=z?as:"includesString"),Object.keys(_).length>0?_:void 0},[u,Y,z]),ta=f.useRef(null),Jn=f.useRef(0),[jN,na]=f.useState(!1),gt=He.useReactTable({data:e,columns:Ti,getCoreRowModel:He.getCoreRowModel(),enableSorting:r,...YN?{getFilteredRowModel:He.getFilteredRowModel(),...D?{enableGlobalFilter:!0,globalFilterFn:"includesString",onGlobalFilterChange:Mi}:{},...Y?{onColumnFiltersChange:TN}:{}}:{},...r?{getSortedRowModel:He.getSortedRowModel(),onSortingChange:Ne}:{},...Ei?{getPaginationRowModel:He.getPaginationRowModel(),onPaginationChange:VN,...pt?{manualPagination:!0,...Kn!==void 0?{rowCount:Kn}:{},...qn!==void 0?{pageCount:qn}:{}}:{}}:{},...i?{onRowSelectionChange:Te,enableRowSelection:!0}:{},...u?{enableColumnResizing:!0,columnResizeMode:h,onColumnSizingChange:Jo}:{},...Yh?{defaultColumn:Yh}:{},...v?{onColumnOrderChange:yN}:{},enableColumnPinning:N,onColumnPinningChange:SN,...De?{enableHiding:!0,onColumnVisibilityChange:zN}:{enableHiding:!1},...vn?{enableExpanding:!0,manualExpanding:!0,getRowCanExpand:$??(()=>!0),onExpandedChange:Vh}:{},...X?{enableGrouping:!0,enableExpanding:!0,getGroupedRowModel:He.getGroupedRowModel(),getExpandedRowModel:He.getExpandedRowModel(),onGroupingChange:Lr,onExpandedChange:Vh}:{},state:{...r?{sorting:te}:{},...i?{rowSelection:xe}:{},...u?{columnSizing:qe}:{},...v?{columnOrder:bN}:{},columnPinning:CN,...D?{globalFilter:ea}:{},...Y?{columnFilters:EN}:{},...X?{grouping:Di}:{},...X||vn?{expanded:ON}:{},...De?{columnVisibility:$N}:{},...Ei?{pagination:HN}:{}},...n?{getRowId:(_,L)=>String(n(_,L))}:{}}),Hr=gt.getVisibleLeafColumns().length,Vr=gt.getRowModel().rows,Gh=f.useRef(null),er=ft&&!X&&!vn&&Vr.length>0&&!Ue,Pi=f.useRef(null),UN=f.useCallback(_=>{Pi.current=_,Gh.current=er?_:null},[er]),bn=f.useMemo(()=>{const _=c0(),L=$f(Le,_.minPx),H=$f(Jt,_.maxPx);return{minPx:Math.min(L,H),maxPx:Math.max(L,H)}},[Le,Jt]),[ra,jh]=f.useState(()=>kt&&typeof We=="number"?We:null);f.useLayoutEffect(()=>{if(!kt||ra!==null)return;const _=Pi.current;_&&jh(Uo(_.offsetHeight,bn.minPx,bn.maxPx))},[kt,ra,We,bn]);const Uh=Qh.useVirtualizer({count:Vr.length,getScrollElement:()=>Gh.current,estimateSize:()=>gn,overscan:Qt,enabled:er}),RN=_=>{var nt;const L=_.column.getCanSort(),H=_.column.getIsSorted(),fe=!!((nt=_.column.columnDef.meta)!=null&&nt.bookersColumnHeaderActions);if(_.isPlaceholder)return null;if(!L||fe)return He.flexRender(_.column.columnDef.header,_.getContext());const ke=_.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(_.column.columnDef.header,_.getContext()),H==="asc"?c.jsx(Qr,{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]})},KN=(_,L)=>{!L||L===_||L===It||_===It||gt.setColumnOrder(H=>{const fe=H.length>0?H:gt.getAllLeafColumns().map(yn=>yn.id),ke=fe.indexOf(L),nt=fe.indexOf(_);if(ke===-1||nt===-1)return fe;const Xe=[...fe];if(Xe.splice(ke,1),Xe.splice(nt,0,L),W&&vn&&Xe.includes(It)){const yn=Xe.filter(Gr=>Gr!==It);return[It,...yn]}return Xe})},_i=gt.getHeaderGroups(),Rh=_i[0],Kh=2.5,qN=`${_i.length*Kh}rem`,Oi=_=>{const L=gt.getColumn(_);if(!L)return _;const H=L.columnDef.header;return typeof H=="string"?H:_},XN=(_,L)=>{_!==L&&Lr(H=>{const fe=[...H],ke=fe.filter(Xe=>Xe!==_),nt=ke.indexOf(L);return nt===-1?fe:(ke.splice(nt,0,_),ke)})},ZN=_=>{Lr(L=>{const fe=[...L].filter(ke=>ke!==_);return fe.push(_),fe})},QN=_=>{var H;if(_.getIsPlaceholder())return null;if(_.getIsAggregated())return He.flexRender(_.column.columnDef.aggregatedCell??_.column.columnDef.cell,_.getContext());const L=!!((H=_.column.columnDef.meta)!=null&&H.bookersSkipGroupRowExpand);if(X&&_.getIsGrouped()&&!L){const fe=_.row,ke=zf(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(_.column.columnDef.cell,_.getContext())}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["(",ke,")"]})]})}return He.flexRender(_.column.columnDef.cell,_.getContext())},qh=_=>c.jsxs(f.Fragment,{children:[c.jsx(_t,{"data-selected":_.getIsSelected()?"true":void 0,children:_.getVisibleCells().map((L,H)=>{const fe=L.column.getIsPinned();return c.jsx(cn,{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&&_.depth>0?{paddingLeft:`${_.depth*.75+.75}rem`}:{},...u||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:QN(L)},L.id)})}),vn&&_.getIsExpanded()&&Z?c.jsx(_t,{"data-expanded-detail":_.id,children:c.jsx(cn,{colSpan:Hr,className:P("border-t border-border bg-muted/30 p-4 align-top",U),children:Z(_)})}):null]},_.id),Yr=er?Uh.getVirtualItems():[],Ii=er&&Yr.length>0,Xh=Ii?Yr[0].start:0,Zh=Ii?Uh.getTotalSize()-Yr[Yr.length-1].end:0,JN=kt?ra!==null?{height:ra}:{maxHeight:typeof We=="number"?`${We}px`:We,minHeight:typeof Le=="number"?`${Le}px`:Le}:{maxHeight:typeof We=="number"?`${We}px`:We};return c.jsx(If.Provider,{value:gt,children:c.jsxs("div",{ref:re,className:P("w-full min-w-0",ie),...pe,children:[D&&E?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:ea,onChange:_=>{Mi(_.target.value)},"aria-label":I,autoComplete:"off",className:P("min-w-0 w-full",ea.trim()!==""&&"pr-12")}),ea.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:()=>Mi(""),children:c.jsx($t,{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",jN?"border-primary/50 bg-primary/5 ring-1 ring-inset ring-primary/40":"border-border bg-muted/30"),onDragOver:_=>{_.preventDefault();const L=Array.from(_.dataTransfer.types);_.dataTransfer.dropEffect=L.includes(Mr)?"move":"copy"},onDragEnter:_=>{_.preventDefault(),Jn.current+=1,na(!0)},onDragLeave:()=>{Jn.current-=1,Jn.current<=0&&(Jn.current=0,na(!1))},onDrop:_=>{_.preventDefault(),Jn.current=0,na(!1);const L=_.dataTransfer.getData(Mr);if(L){ZN(L);return}const H=_.dataTransfer.getData(Ff);if(!H)return;const fe=gt.getColumn(H);fe!=null&&fe.getCanGroup()&&Lr(ke=>{const Xe=[...ke].filter(yn=>yn!==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(tm,{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:Di.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:[Di.map((_,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,na(!1);const fe=H.dataTransfer.getData(Mr);fe&&XN(fe,_)},children:[c.jsx("span",{draggable:!0,"aria-label":`Reorder group: ${Oi(_)}`,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,_),H.dataTransfer.effectAllowed="move"},children:c.jsx(Jg,{className:"size-4","aria-hidden":!0})}),c.jsx("span",{className:"min-w-0 truncate px-1.5 font-medium text-foreground",children:Oi(_)}),c.jsx("button",{type:"button","aria-label":`Remove ${Oi(_)} 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:()=>{Lr(H=>[...H].filter(fe=>fe!==_))},children:c.jsx($t,{className:"size-3.5","aria-hidden":!0})})]})]},_)),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:UN,className:P("w-full min-h-0 overflow-auto [scrollbar-gutter:stable]",er&&"[overflow-anchor:none]"),style:JN,children:c.jsxs(ss,{className:P(u&&"table-fixed"),style:u?{width:gt.getTotalSize(),minWidth:"100%"}:void 0,children:[c.jsxs(is,{children:[_i.map((_,L)=>c.jsx(_t,{children:_.headers.map(H=>{const fe=`${L*Kh}rem`,ke=H.column.getIsPinned(),nt=u&&H.column.getCanResize()&&!H.isPlaceholder,Xe=H.column.id===It,yn=v&&!H.isPlaceholder&&!Xe&&(!H.subHeaders||H.subHeaders.length===0),Gr=X&&!H.isPlaceholder&&!Xe&&H.column.getCanGroup()&&(!H.subHeaders||H.subHeaders.length===0);return c.jsxs(Po,{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,...(u||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 ek=$e.dataTransfer.getData("application/x-bookers-column-id")||ta.current;KN(H.column.id,ek),ta.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:[yn?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=>{ta.current=H.column.id,$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("application/x-bookers-column-id",H.column.id)},onDragEnd:()=>{ta.current=null},children:c.jsx(Qg,{className:"size-4","aria-hidden":"true"})}):null,c.jsx("span",{className:P("min-w-0 flex-1",Gr&&"cursor-grab active:cursor-grabbing"),draggable:Gr,onDragStart:Gr?$e=>{$e.dataTransfer.setData(Ff,H.column.id),$e.dataTransfer.effectAllowed="copy"}:void 0,children:RN(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)})},_.id)),Y&&ae&&Rh?c.jsx(_t,{children:Rh.headers.map(_=>{const L=_.column.getIsPinned();return c.jsx(Po,{colSpan:_.colSpan,className:P("relative sticky z-30 bg-background py-2",L==="left"&&P("z-50 bg-background",!_.column.getIsLastColumn("left")&&"border-r border-border",_.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",!_.column.getIsFirstColumn("right")&&"border-l border-border",_.column.getIsFirstColumn("right")&&"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-px before:bg-border")),style:{top:qN,...(u||L)&&!_.isPlaceholder?{width:_.getSize(),minWidth:_.getSize(),maxWidth:_.getSize()}:{},...L==="left"?{left:_.column.getStart("left")}:{},...L==="right"?{right:_.column.getAfter("right")}:{}},children:!_.isPlaceholder&&_.column.getCanFilter()?c.jsx(p0,{column:_.column,enableAdvancedColumnFilters:z,showColumnFilterClear:K}):null},`filter-${_.id}`)})}):null]}),c.jsx(ls,{children:Ue?Array.from({length:Fe}).map((_,L)=>c.jsx(_t,{children:c.jsx(cn,{colSpan:Hr,children:c.jsx(ds,{className:"h-4 w-full"})})},L)):Vr.length===0?c.jsx(_t,{children:c.jsx(cn,{colSpan:Hr,className:"h-24 text-center text-sm text-muted-foreground",children:Zt??"No results."})}):Ii?c.jsxs(c.Fragment,{children:[Xh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Hr,className:"h-0 border-0 p-0",style:{height:Xh}})}):null,Yr.map(_=>{const L=Vr[_.index];return qh(L)}),Zh>0?c.jsx("tr",{className:"border-0 hover:bg-transparent","aria-hidden":!0,children:c.jsx("td",{colSpan:Hr,className:"h-0 border-0 p-0",style:{height:Zh}})}):null]}):Vr.map(_=>qh(_))}),GN?c.jsx(cs,{className:"sticky bottom-0 z-20",children:gt.getFooterGroups().map(_=>c.jsx(_t,{children:_.headers.map(L=>{const H=L.column.getIsPinned();return c.jsx(cn,{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:{...(u||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)})},_.id))}):null]})}),Ei?c.jsx(h0,{table:gt,manualPagination:pt,pageSizeOptions:mn,paginationSiblingCount:Re}):null,kt?c.jsx(d0,{scrollRegionRef:Pi,minPx:bn.minPx,maxPx:bn.maxPx,onHeightChange:_=>jh(Uo(_,bn.minPx,bn.maxPx))}):null]})]})})}const Bf=f.forwardRef(g0);Bf.displayName="DataTable";const m0={bookersColumnHeaderActions:!0};function v0(e){const t=e.columnDef.header;return typeof t=="string"?t:e.id}function b0({column:e,title:t,children:n,className:r,...o},a){const s=n??t,i=e.getCanSort(),l=e.getCanPin(),d=e.getIsSorted(),p=e.getIsPinned(),u=Af(),h=!!(u!=null&&u.options.enableHiding&&u.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}),d==="asc"?c.jsx(Qr,{className:"size-3.5 shrink-0","aria-hidden":"true"}):null,d==="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(Vo,{children:[c.jsx(Yo,{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(Kg,{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(Ot,{onSelect:()=>{e.toggleSorting(!1)},children:[c.jsx(Lg,{className:"size-4","aria-hidden":"true"}),"Ascending"]}),c.jsxs(Ot,{onSelect:()=>{e.toggleSorting(!0)},children:[c.jsx(Bg,{className:"size-4","aria-hidden":"true"}),"Descending"]}),c.jsx(Ot,{disabled:d===!1,onSelect:()=>{e.clearSorting()},children:"Clear sort"})]}):null,i&&l?c.jsx(zn,{}):null,l?c.jsxs(Vs,{children:[c.jsxs(Go,{children:[c.jsx(rm,{className:"size-4","aria-hidden":"true"}),"Pin column"]}),c.jsxs(jo,{children:[c.jsx(Ot,{onSelect:e.pin.bind(e,"left"),children:"Pin left"}),c.jsx(Ot,{onSelect:e.pin.bind(e,"right"),children:"Pin right"}),c.jsxs(Ot,{disabled:p===!1,onSelect:e.pin.bind(e,!1),children:[c.jsx(nm,{className:"size-4","aria-hidden":"true"}),"Unpin"]})]})]}):null,h&&u&&(i||l)?c.jsx(zn,{}):null,h&&u?c.jsxs(Vs,{children:[c.jsxs(Go,{children:[c.jsx(Rg,{className:"size-4","aria-hidden":"true"}),"Columns"]}),c.jsxs(jo,{className:"min-w-48",children:[c.jsx(kr,{className:"text-xs font-normal text-muted-foreground",children:"Show columns"}),c.jsx(zn,{}),u.getAllLeafColumns().filter(g=>g.getCanHide()).map(g=>c.jsx(Ys,{checked:g.getIsVisible(),onCheckedChange:g.toggleVisibility.bind(g),children:v0(g)},g.id))]})]}):null]})]})]})}const Lf=f.forwardRef(b0);Lf.displayName="DataTableColumnHeader";const Hf=6048e5,y0=864e5,Vf=Symbol.for("constructDateFrom");function Se(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Vf in e?e[Vf](t):e instanceof Date?new e.constructor(t):new Date(t)}function ve(e,t){return Se(t||e,e)}function Yf(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(t)?Se(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Gf(e,t,n){const r=ve(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 w0={};function Dr(){return w0}function Bn(e,t){var i,l,d,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=(d=n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,o=ve(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 Bn(e,{...t,weekStartsOn:1})}function jf(e,t){const n=ve(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 Uf(e){const t=ve(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=ve(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function js(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t),a=Tr(r),s=Tr(o),i=+a-Uf(a),l=+s-Uf(s);return Math.round((i-l)/y0)}function x0(e,t){const n=jf(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 Yf(e,t*7,n)}function S0(e,t,n){return Gf(e,t*12,n)}function N0(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=ve(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function k0(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=ve(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Se(r,n||NaN)}function M0(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return+Tr(r)==+Tr(o)}function Rf(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function D0(e){return!(!Rf(e)&&typeof e!="number"||isNaN(+ve(e)))}function Kf(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 E0(e,t){const n=ve(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 qf(e,t){const[n,r]=Ln(e,t.start,t.end);return{start:n,end:r}}function T0(e,t){const{start:n,end:r}=qf(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 P0(e,t){const n=ve(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function _0(e,t){const n=ve(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 Xf(e,t){const n=ve(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function O0(e,t){const{start:n,end:r}=qf(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 Zf(e,t){var i,l,d,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=(d=n.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,o=ve(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 I0(e,t){return Zf(e,{...t,weekStartsOn:1})}const A0={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"}},F0=(e,t,n)=>{let r;const o=A0[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 Us(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const W0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},z0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},B0={date:Us({formats:W0,defaultWidth:"full"}),time:Us({formats:$0,defaultWidth:"full"}),dateTime:Us({formats:z0,defaultWidth:"full"})},L0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},H0=(e,t,n,r)=>L0[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 V0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Y0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G0={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"]},j0={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"]},U0={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"}},R0={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"}},K0={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:V0,defaultWidth:"wide"}),quarter:Pr({values:Y0,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pr({values:G0,defaultWidth:"wide"}),day:Pr({values:j0,defaultWidth:"wide"}),dayPeriod:Pr({values:U0,defaultWidth:"wide",formattingValues:R0,defaultFormattingWidth:"wide"})};function _r(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)?X0(i,u=>u.test(s)):q0(i,u=>u.test(s));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const p=t.slice(s.length);return{value:d,rest:p}}}function q0(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function X0(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Z0(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 Q0=/^(\d+)(th|st|nd|rd)?/i,J0=/\d+/i,eC={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},tC={any:[/^b/i,/^(a|c)/i]},nC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rC={any:[/1/i,/2/i,/3/i,/4/i]},oC={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},aC={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]},sC={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},iC={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]},lC={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},cC={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}},dC={ordinalNumber:Z0({matchPattern:Q0,parsePattern:J0,valueCallback:e=>parseInt(e,10)}),era:_r({matchPatterns:eC,defaultMatchWidth:"wide",parsePatterns:tC,defaultParseWidth:"any"}),quarter:_r({matchPatterns:nC,defaultMatchWidth:"wide",parsePatterns:rC,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_r({matchPatterns:oC,defaultMatchWidth:"wide",parsePatterns:aC,defaultParseWidth:"any"}),day:_r({matchPatterns:sC,defaultMatchWidth:"wide",parsePatterns:iC,defaultParseWidth:"any"}),dayPeriod:_r({matchPatterns:lC,defaultMatchWidth:"any",parsePatterns:cC,defaultParseWidth:"any"})},Hn={code:"en-US",formatDistance:F0,formatLong:B0,formatRelative:H0,localize:K0,match:dC,options:{weekStartsOn:0,firstWeekContainsDate:1}};function uC(e,t){const n=ve(e,t==null?void 0:t.in);return js(n,Xf(n))+1}function Rs(e,t){const n=ve(e,t==null?void 0:t.in),r=+Er(n)-+x0(n);return Math.round(r/Hf)+1}function Qf(e,t){var p,u,h,g;const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=Dr(),a=(t==null?void 0:t.firstWeekContainsDate)??((u=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:u.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=Bn(s,t),l=Se((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const d=Bn(l,t);return+n>=+i?r+1:+n>=+d?r:r-1}function fC(e,t){var i,l,d,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=(d=n.locale)==null?void 0:d.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),Bn(a,t)}function Ks(e,t){const n=ve(e,t==null?void 0:t.in),r=+Bn(n,t)-+fC(n,t);return Math.round(r/Hf)+1}function ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Xt={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"},Jf={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 Xt.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=jf(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 Xt.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=Ks(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ge(o,t.length)},I:function(e,t,n){const r=Rs(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"}):Xt.d(e,t)},D:function(e,t,n){const r=uC(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 Xt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xt.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"}):Xt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xt.s(e,t)},S:function(e,t){return Xt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tp(r);case"XXXX":case"XX":return pn(r);case"XXXXX":case"XXX":default:return pn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tp(r);case"xxxx":case"xx":return pn(r);case"xxxxx":case"xxx":default:return pn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ep(r,":");case"OOOO":default:return"GMT"+pn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ep(r,":");case"zzzz":default:return"GMT"+pn(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 ep(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 tp(e,t){return e%60===0?(e>0?"-":"+")+ge(Math.abs(e)/60,2):pn(e,t)}function pn(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 np=(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"})}},rp=(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"})}},pC={p:rp,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return np(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}}",np(r,t)).replace("{{time}}",rp(o,t))}},hC=/^D+$/,gC=/^Y+$/,mC=["D","DD","YY","YYYY"];function vC(e){return hC.test(e)}function bC(e){return gC.test(e)}function yC(e,t,n){const r=wC(e,t,n);if(console.warn(r),mC.includes(e))throw new RangeError(r)}function wC(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 xC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,CC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SC=/^'([^]*?)'?$/,NC=/''/g,kC=/[a-zA-Z]/;function Yn(e,t,n){var p,u,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)??((u=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:u.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=ve(e,n==null?void 0:n.in);if(!D0(i))throw new RangeError("Invalid time value");let l=t.match(CC).map(y=>{const x=y[0];if(x==="p"||x==="P"){const N=pC[x];return N(y,o.formatLong)}return y}).join("").match(xC).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const x=y[0];if(x==="'")return{isToken:!1,value:MC(y)};if(Jf[x])return{isToken:!0,value:y};if(x.match(kC))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 d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(y=>{if(!y.isToken)return y.value;const x=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&bC(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&vC(x))&&yC(x,t,String(e));const N=Jf[x[0]];return N(i,x,o.localize,d)}).join("")}function MC(e){const t=e.match(SC);return t?t[1].replace(NC,"'"):e}function DC(e,t){const n=ve(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 EC(e,t){return ve(e,t==null?void 0:t.in).getMonth()}function TC(e,t){return ve(e,t==null?void 0:t.in).getFullYear()}function PC(e,t){return+ve(e)>+ve(t)}function _C(e,t){return+ve(e)<+ve(t)}function OC(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 IC(e,t,n){const[r,o]=Ln(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function AC(e,t,n){const r=ve(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=DC(s);return r.setMonth(t,Math.min(a,i)),r}function FC(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(+r)?Se(e,NaN):(r.setFullYear(t),r)}function WC(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 qs={},Or={};function hn(e,t){try{const r=(qs[e]||(qs[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in Or?Or[r]:op(r,r.split(":"))}catch{if(e in Or)return Or[e];const n=e==null?void 0:e.match($C);return n?op(e,n.slice(1)):NaN}}const $C=/([+-]\d\d):?(\d\d)?/;function op(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Or[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(hn(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)),sp(this),Xs(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=-hn(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Xs(this),+this}[Symbol.for("constructDateFrom")](t){return new xt(+new Date(t),this.timeZone)}}const ap=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ap.test(e))return;const t=e.replace(ap,"$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),zC(this),+this},xt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Xs(this),+this}))});function Xs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-hn(e.timeZone,e)*60))}function zC(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()),sp(e)}function sp(e){const t=hn(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 d=new Date(+e);d.setUTCSeconds(0);const p=o>0?d.getSeconds():(d.getSeconds()-60)%60,u=Math.round(-(hn(e.timeZone,e)*60))%60;(u||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+p));const h=hn(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=hn(e.timeZone,e),x=y>0?Math.floor(y):Math.ceil(y),N=g-x;N&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N))}}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} (${WC(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 ip=5,BC=4;function LC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,ip*7-1);return t.getMonth(e)===t.getMonth(a)?ip:BC}function lp(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 HC(e,t){const n=lp(e,t),r=LC(e,t);return t.addDays(n,r*7-1)}const cp={...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):Yf(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Gf(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):S0(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):js(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Kf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):T0(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):O0(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):HC(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):I0(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):E0(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Zf(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):_0(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):Rs(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):EC(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):TC(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Ks(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):PC(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):_C(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Rf(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):M0(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):OC(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):IC(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):N0(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):k0(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):AC(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):lp(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):P0(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Bn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Xf(r)},this.options={locale:cp,...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 dp{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 VC{constructor(t,n){this.date=t,this.weeks=n}}class YC{constructor(t,n){this.days=n,this.weekNumber=t}}function GC(e){return S.createElement("button",{...e})}function jC(e){return S.createElement("span",{...e})}function UC(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 RC(e){const{day:t,modifiers:n,...r}=e;return S.createElement("td",{...r})}function KC(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 we;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(we||(we={}));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 qC(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:d,disabled:p})=>S.createElement(r.Option,{key:l,value:l,disabled:p},d))),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 XC(e){return S.createElement("div",{...e})}function ZC(e){return S.createElement("div",{...e})}function QC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r},e.children)}function JC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return S.createElement("div",{...r})}function e1(e){return S.createElement("table",{...e})}function t1(e){return S.createElement("div",{...e})}const up=S.createContext(void 0);function Ir(){const e=S.useContext(up);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function n1(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}function r1(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:d}}=Ir(),p=S.useCallback(h=>{o&&(n==null||n(h))},[o,n]),u=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:u},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":d(o),onClick:p},S.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ee.Chevron]})))}function o1(e){const{components:t}=Ir();return S.createElement(t.Button,{...e})}function a1(e){return S.createElement("option",{...e})}function s1(e){const{components:t}=Ir();return S.createElement(t.Button,{...e})}function i1(e){const{rootRef:t,...n}=e;return S.createElement("div",{...n,ref:t})}function l1(e){return S.createElement("select",{...e})}function c1(e){const{week:t,...n}=e;return S.createElement("tr",{...n})}function d1(e){return S.createElement("th",{...e})}function u1(e){return S.createElement("thead",{"aria-hidden":!0},S.createElement("tr",{...e}))}function f1(e){const{week:t,...n}=e;return S.createElement("th",{...n})}function p1(e){return S.createElement("th",{...e})}function h1(e){return S.createElement("tbody",{...e})}function g1(e){const{components:t}=Ir();return S.createElement(t.Dropdown,{...e})}const m1=Object.freeze(Object.defineProperty({__proto__:null,Button:GC,CaptionLabel:jC,Chevron:UC,Day:RC,DayButton:KC,Dropdown:qC,DropdownNav:XC,Footer:ZC,Month:QC,MonthCaption:JC,MonthGrid:e1,Months:t1,MonthsDropdown:n1,Nav:r1,NextMonthButton:o1,Option:a1,PreviousMonthButton:s1,Root:i1,Select:l1,Week:c1,WeekNumber:f1,WeekNumberHeader:p1,Weekday:d1,Weekdays:u1,Weeks:h1,YearsDropdown:g1},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 Zs(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ro(e){return!!(e&&typeof e=="object"&&"from"in e)}function Qs(e){return!!(e&&typeof e=="object"&&"after"in e)}function Js(e){return!!(e&&typeof e=="object"&&"before"in e)}function fp(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function pp(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(pp(i,n))return i.some(l=>o(e,l));if(Ro(i))return At(i,e,!1,n);if(fp(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Zs(i)){const l=a(i.before,e),d=a(i.after,e),p=l>0,u=d<0;return s(i.before,i.after)?u&&p:p||u}return Qs(i)?a(e,i.after)>0:Js(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function v1(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:d,today:p=o.today()}=t,{isSameDay:u,isSameMonth:h,startOfMonth:g,isBefore:w,endOfMonth:m,isAfter:v}=o,b=n&&g(n),y=r&&m(r),x={[we.focused]:[],[we.outside]:[],[we.disabled]:[],[we.hidden]:[],[we.today]:[]},N={};for(const M of e){const{date:C,displayMonth:k}=M,D=!!(k&&!h(C,k)),E=!!(b&&w(C,b)),I=!!(y&&v(C,y)),R=!!(a&&Ft(C,a,o)),B=!!(s&&Ft(C,s,o))||E||I||!d&&!l&&D||d&&l===!1&&D,q=u(C,p);D&&x.outside.push(M),R&&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&&Ft(C,ae,o)&&(N[Y]?N[Y].push(M):N[Y]=[M])})}return M=>{const C={[we.focused]:!1,[we.disabled]:!1,[we.hidden]:!1,[we.outside]:!1,[we.today]:!1},k={};for(const D in x){const E=x[D];C[D]=E.some(I=>I===M)}for(const D in N)k[D]=N[D].some(E=>E===M);return{...C,...k}}}function b1(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[we[a]]?o.push(t[we[a]]):t[dt[a]]&&o.push(t[dt[a]]),o),[t[ee.Day]])}function y1(e){return{...m1,...e}}function w1(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 x1(){const e={};for(const t in ee)e[ee[t]]=`rdp-${ee[t]}`;for(const t in we)e[we[t]]=`rdp-${we[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 hp(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const C1=hp;function S1(e,t,n){return(n??new Ge(t)).format(e,"d")}function N1(e,t=Ct){return t.format(e,"LLLL")}function k1(e,t,n){return(n??new Ge(t)).format(e,"cccccc")}function M1(e,t=Ct){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function D1(){return""}function gp(e,t=Ct){return t.format(e,"yyyy")}const E1=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:hp,formatDay:S1,formatMonthCaption:C1,formatMonthDropdown:N1,formatWeekNumber:M1,formatWeekNumberHeader:D1,formatWeekdayName:k1,formatYearCaption:gp,formatYearDropdown:gp},Symbol.toStringTag,{value:"Module"}));function T1(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...E1,...e}}function ei(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 P1=ei;function ti(e,t,n){return(n??new Ge(t)).formatMonthYear(e)}const _1=ti;function mp(e,t,n,r){let o=(r??new Ge(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function vp(e){return"Choose the Month"}function bp(){return""}const O1="Go to the Next Month";function yp(e,t){return O1}function wp(e){return"Go to the Previous Month"}function xp(e,t,n){return(n??new Ge(t)).format(e,"cccc")}function Cp(e,t){return`Week ${e}`}function Sp(e){return"Week Number"}function Np(e){return"Choose the Year"}const I1=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:_1,labelDay:P1,labelDayButton:ei,labelGrid:ti,labelGridcell:mp,labelMonthDropdown:vp,labelNav:bp,labelNext:yp,labelPrevious:wp,labelWeekNumber:Cp,labelWeekNumberHeader:Sp,labelWeekday:xp,labelYearDropdown:Np},Symbol.toStringTag,{value:"Module"})),ut=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function A1(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...I1,...e??{},labelDayButton:ut(ei,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:ut(vp,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:ut(yp,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:ut(wp,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:ut(Cp,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:ut(Np,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:ut(ti,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:ut(mp,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:ut(bp,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:ut(Sp,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:ut(xp,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function F1(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:d}=o;return l({start:s(e),end:i(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),w=d(h),m=t&&h<a(t)||n&&h>a(n)||!1;return{value:w,label:g,disabled:m}})}function W1(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 $1(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 z1(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:l}=r,d=a(e),p=s(t),u=i({start:d,end:p});return o&&u.reverse(),u.map(h=>{const g=n.formatYearDropdown(h,r);return{value:l(h),label:g,disabled:!1}})}function B1(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 d=typeof l=="number"||typeof l=="string"?new Date(l):l;return new Ae(d.getFullYear(),d.getMonth(),d.getDate(),12,0,0,e)},s=l=>{const d=a(l);return new Date(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0,0)};return{today:()=>a(Ae.tz(e)),newDate:(l,d,p)=>new Ae(l,d,p,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,d)=>{const p=a(l),u=(d==null?void 0:d.weekStartsOn)??o,h=(p.getDay()-u+7)%7;return p.setDate(p.getDate()-h),p},startOfISOWeek:l=>{const d=a(l),p=(d.getDay()-1+7)%7;return d.setDate(d.getDate()-p),d},startOfMonth:l=>{const d=a(l);return d.setDate(1),d},startOfYear:l=>{const d=a(l);return d.setMonth(0,1),d},endOfWeek:(l,d)=>{const p=a(l),g=((((d==null?void 0:d.weekStartsOn)??o)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+g),p},endOfISOWeek:l=>{const d=a(l),p=(7-d.getDay())%7;return d.setDate(d.getDate()+p),d},endOfMonth:l=>{const d=a(l);return d.setMonth(d.getMonth()+1,0),d},endOfYear:l=>{const d=a(l);return d.setMonth(11,31),d},eachMonthOfInterval:l=>{const d=a(l.start),p=a(l.end),u=[],h=new Ae(d.getFullYear(),d.getMonth(),1,12,0,0,e),g=p.getFullYear()*12+p.getMonth();for(;h.getFullYear()*12+h.getMonth()<=g;)u.push(new Ae(h,e)),h.setMonth(h.getMonth()+1,1);return u},addDays:(l,d)=>{const p=a(l);return p.setDate(p.getDate()+d),p},addWeeks:(l,d)=>{const p=a(l);return p.setDate(p.getDate()+d*7),p},addMonths:(l,d)=>{const p=a(l);return p.setMonth(p.getMonth()+d),p},addYears:(l,d)=>{const p=a(l);return p.setFullYear(p.getFullYear()+d),p},eachYearOfInterval:l=>{const d=a(l.start),p=a(l.end),u=[],h=new Ae(d.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=p.getFullYear();)u.push(new Ae(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return u},getWeek:(l,d)=>{var u;const p=s(l);return Ks(p,{weekStartsOn:(d==null?void 0:d.weekStartsOn)??o,firstWeekContainsDate:(d==null?void 0:d.firstWeekContainsDate)??((u=r==null?void 0:r.options)==null?void 0:u.firstWeekContainsDate)??1})},getISOWeek:l=>{const d=s(l);return Rs(d)},differenceInCalendarDays:(l,d)=>{const p=s(l),u=s(d);return js(p,u)},differenceInCalendarMonths:(l,d)=>{const p=s(l),u=s(d);return Kf(p,u)}}}const Ar=e=>e instanceof HTMLElement?e:null,ni=e=>[...e.querySelectorAll("[data-animated-month]")??[]],L1=e=>Ar(e.querySelector("[data-animated-month]")),ri=e=>Ar(e.querySelector("[data-animated-caption]")),oi=e=>Ar(e.querySelector("[data-animated-weeks]")),H1=e=>Ar(e.querySelector("[data-animated-nav]")),V1=e=>Ar(e.querySelector("[data-animated-weekdays]"));function Y1(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 d=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const p=a.isSameMonth(r[0].date,d[0].date),u=a.isAfter(r[0].date,d[0].date),h=u?n[je.caption_after_enter]:n[je.caption_before_enter],g=u?n[je.weeks_after_enter]:n[je.weeks_before_enter],w=s.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(ni(m).forEach(x=>{if(!(x instanceof HTMLElement))return;const N=L1(x);N&&x.contains(N)&&x.removeChild(N);const M=ri(x);M&&M.classList.remove(h);const C=oi(x);C&&C.classList.remove(g)}),s.current=m):s.current=null,l.current||p||o)return;const v=w instanceof HTMLElement?ni(w):[],b=ni(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=H1(e.current);y&&(y.style.zIndex="1"),b.forEach((x,N)=>{const M=v[N];if(!M)return;x.style.position="relative",x.style.overflow="hidden";const C=ri(x);C&&C.classList.add(h);const k=oi(x);k&&k.classList.add(g);const D=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),y&&(y.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 E=V1(M);E&&(E.style.opacity="0");const I=ri(M);I&&(I.classList.add(u?n[je.caption_before_exit]:n[je.caption_after_exit]),I.addEventListener("animationend",D));const R=oi(M);R&&R.classList.add(u?n[je.weeks_before_exit]:n[je.weeks_after_exit]),x.insertBefore(M,x.firstChild)})}})}function G1(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:d,differenceInCalendarDays:p,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:w,endOfWeek:m,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:y,startOfWeek:x}=r,N=l?b(o,r):s?y(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,D=p(k,N),E=u(a,o)+1,I=[];for(let q=0;q<=D;q++){const Y=d(N,q);I.push(Y)}const B=(l?35:42)*E;if(i&&I.length<B){const q=B-I.length;for(let Y=0;Y<q;Y++){const ae=d(I[I.length-1],1);I.push(ae)}}return I}function j1(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 U1(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 kp(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:d,addMonths:p,startOfMonth:u}=r;if(n&&d(n,l)<i-1){const h=-1*(i-1);l=p(n,h)}return t&&d(l,t)<0&&(l=t),u(l)}function R1(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:d,getWeek:p,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:g}=r,w=e.reduce((m,v)=>{const b=n.broadcastCalendar?u(v,r):n.ISOWeek?h(v):g(v),y=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),x=t.filter(k=>k>=b&&k<=y),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&x.length<N){const k=t.filter(D=>{const E=N-x.length;return D>y&&D<=o(y,E)});x.push(...k)}const M=x.reduce((k,D)=>{const E=n.ISOWeek?d(D):p(D),I=k.find(B=>B.weekNumber===E),R=new dp(D,v,r);return I?I.days.push(R):k.push(new YC(E,[R])),k},[]),C=new VC(v,M);return m.push(C),m},[]);return n.reverseMonths?w.reverse():w}function K1(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:d,newDate:p,today:u}=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??u(),-100))),r?r=i(r):g?r=p(g,11,31):!r&&v&&(r=d(e.today??u())),[n&&a(n),r&&a(r)]}function q1(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,d=o?a:1,p=s(e);if(!t)return i(p,d);if(!(l(t,e)<a))return i(p,d)}function X1(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,d=o?a??1:1,p=s(e);if(!t)return i(p,-d);if(!(l(p,t)<=0))return i(p,-d)}function Z1(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Ko(e,t){const[n,r]=S.useState(e);return[t===void 0?n:t,r]}function Q1(e,t){var N;const[n,r]=K1(e,t),{startOfMonth:o,endOfMonth:a}=t,s=kp(e,n,r,t),[i,l]=Ko(s,e.month?s:void 0);S.useEffect(()=>{const M=kp(e,n,r,t);l(M)},[e.timeZone]);const{months:d,weeks:p,days:u,previousMonth:h,nextMonth:g}=S.useMemo(()=>{const M=U1(i,r,{numberOfMonths:e.numberOfMonths},t),C=G1(M,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),k=R1(M,C,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),D=Z1(k),E=j1(k),I=X1(i,n,e,t),R=q1(i,r,e,t);return{months:k,weeks:D,days:E,previousMonth:I,nextMonth:R}},[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))),b=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:d,weeks:p,days:u,navStart:n,navEnd:r,previousMonth:h,nextMonth:g,goToMonth:b,goToDay:M=>{v(M)||b(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 Mp(e){return!e[we.disabled]&&!e[we.hidden]&&!e[we.outside]}function J1(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);Mp(i)&&(i[we.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[we.today]&&a<St.Today&&(o=s,a=St.Today))}return o||(o=e.find(s=>Mp(t(s)))),o}function eS(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:d,addMonths:p,addWeeks:u,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:w,endOfWeek:m,max:v,min:b,startOfBroadcastWeek:y,startOfISOWeek:x,startOfWeek:N}=s;let C={day:d,week:u,month:p,year:h,startOfWeek:k=>l?y(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=b([o,C])),C}function Dp(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=eS(e,t,n.date,r,o,a,s),d=!!(a.disabled&&Ft(l,a.disabled,s)),p=!!(a.hidden&&Ft(l,a.hidden,s)),u=l,h=new dp(l,u,s);return!d&&!p?h:Dp(e,t,h,r,o,a,s,i+1)}function tS(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=S.useState(),l=J1(t.days,n,r||(()=>!1),s),[d,p]=S.useState(a?l:void 0);return{isFocusTarget:m=>!!(l!=null&&l.isEqualTo(m)),setFocused:p,focused:d,blur:()=>{i(d),p(void 0)},moveFocus:(m,v)=>{if(!d)return;const b=Dp(m,v,d,t.navStart,t.navEnd,e,o);b&&(e.disableNavigation&&!t.days.some(x=>x.isEqualTo(b))||(t.goToDay(b),p(b)))}}}function nS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ko(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,d=g=>(i==null?void 0:i.some(w=>l(w,g)))??!1,{min:p,max:u}=e;return{selected:i,select:(g,w,m)=>{let v=[...i??[]];if(d(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)===u?v=[g]:v=[...v,g];return o||s(v),o==null||o(v,g,w,m),v},isSelected:d}}function rS(e,t,n=0,r=0,o=!1,a=Ct){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:d,isBefore:p}=a;let u;if(!s&&!i)u={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?n===0?u={from:s,to:e}:o?u={from:s,to:void 0}:u=void 0:p(e,s)?u={from:e,to:s}:u={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?u={from:s,to:i}:u=void 0;else if(l(s,e))u={from:s,to:n>0?void 0:e};else if(l(i,e))u={from:e,to:n>0?void 0:e};else if(p(e,s))u={from:e,to:i};else if(d(e,s))u={from:s,to:e};else if(d(e,i))u={from:s,to:e};else throw new Error("Invalid range");if(u!=null&&u.from&&(u!=null&&u.to)){const h=a.differenceInCalendarDays(u.to,u.from);r>0&&h>r?u={from:e,to:void 0}:n>1&&h<n&&(u={from:e,to:void 0})}return u}function oS(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 Ep(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 aS(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):pp(i,n)?i.some(l=>At(e,l,!1,n)):Ro(i)?i.from&&i.to?Ep(e,{from:i.from,to:i.to},n):!1:fp(i)?oS(e,i.dayOfWeek,n):Zs(i)?n.isAfter(i.before,i.after)?Ep(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)||Js(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 d=0;d<=l;d++){if(s.some(p=>p(i)))return!0;i=n.addDays(i,1)}}return!1}function sS(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,d]=Ko(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,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?y=void 0:y={from:g,to:void 0}:y=rS(g,p,v,b,s,t)}return r&&n&&(y!=null&&y.from)&&y.to&&aS({from:y.from,to:y.to},n,t)&&(y.from=g,y.to=void 0),i||d(y),i==null||i(y,g,w,m),y},isSelected:g=>p&&At(p,g,!1,t)}}function iS(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Ko(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(u,h,g)=>{let w=u;return!r&&i&&i&&l(u,i)&&(w=void 0),o||s(w),o==null||o(w,u,h,g),w},isSelected:u=>i?l(i,u):!1}}function lS(e,t){const n=iS(e,t),r=nS(e,t),o=sS(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 Tp(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):Ro(e)?{...e,from:e.from?et(e.from,t):e.from,to:e.to?et(e.to,t):e.to}:Zs(e)?{before:Gn(e.before,t),after:Gn(e.after,t)}:Qs(e)?{after:Gn(e.after,t)}:Js(e)?{before:Gn(e.before,t)}:e}function ai(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Tp(r,t)):Tp(e,t))}function cS(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=ai(t.disabled,n)),t.hidden!==void 0&&(t.hidden=ai(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(pe=>{var re;ie[pe]=ai((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={...cp,...t.locale},pe=t.broadcastCalendar?1:t.weekStartsOn,re=t.noonSafe&&t.timeZone?B1(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:y1(t.components),formatters:T1(t.formatters),labels:A1(t.labels,J.options),locale:ie,classNames:{...x1(),...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:d,mode:p,navLayout:u,numberOfMonths:h=1,onDayBlur:g,onDayClick:w,onDayFocus:m,onDayKeyDown:v,onDayMouseEnter:b,onDayMouseLeave:y,onNextClick:x,onPrevClick:N,showWeekNumber:M,styles:C}=t,{formatCaption:k,formatDay:D,formatMonthDropdown:E,formatWeekNumber:I,formatWeekNumberHeader:R,formatWeekdayName:B,formatYearDropdown:q}=o,Y=Q1(t,s),{days:ae,months:z,navStart:K,navEnd:G,previousMonth:A,nextMonth:Q,goToMonth:oe}=Y,O=v1(ae,t,K,G,s),{isSelected:F,select:V,selected:$}=lS(t,s)??{},{blur:Z,focused:W,isFocusTarget:U,moveFocus:X,setFocused:se}=tS(t,Y,O,F??(()=>!1),s),{labelDayButton:de,labelGridcell:ce,labelGrid:Me,labelMonthDropdown:Ee,labelNav:tt,labelPrevious:Ue,labelNext:Fe,labelWeekday:Zt,labelWeekNumber:De,labelWeekNumberHeader:zr,labelYearDropdown:Br}=a,_e=S.useMemo(()=>$1(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),N==null||N(A))},[A,oe,N]),gn=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&&(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]),Jt=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=w1(t),Zn=S.useRef(null);Y1(Zn,!!t.animate,{classNames:l,months:z,focused:W,dateLib:s});const mn={dayPickerProps:t,selected:$,select:V,isSelected:F,months:z,nextMonth:Q,previousMonth:A,goToMonth:oe,getModifiers:O,components:r,classNames:l,styles:C,labels:a,formatters:o};return S.createElement(up.Provider,{value:mn},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&&!u&&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:gn,previousMonth:A,nextMonth:Q}),z.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},u==="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},d!=null&&d.startsWith("dropdown")?S.createElement(r.DropdownNav,{className:l[ee.Dropdowns],style:C==null?void 0:C[ee.Dropdowns]},(()=>{const re=d==="dropdown"||d==="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:F1(ie.date,K,G,o,s),style:C==null?void 0:C[ee.Dropdown],value:s.getMonth(ie.date)}):S.createElement("span",{key:"month"},E(ie.date,s)),ue=d==="dropdown"||d==="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:z1(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))),u==="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:gn,"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&&u==="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:gn,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]},M&&S.createElement(r.WeekNumberHeader,{"aria-label":zr(s.options),className:l[ee.WeekNumberHeader],style:C==null?void 0:C[ee.WeekNumberHeader],scope:"col"},R()),_e.map(re=>S.createElement(r.Weekday,{"aria-label":Zt(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":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=O(ue);if(te[we.focused]=!te.hidden&&!!(W!=null&&W.isEqualTo(ue)),te[dt.selected]=(F==null?void 0:F(J))||te.selected,Ro($)){const{from:xe,to:Te}=$;te[dt.range_start]=!!(xe&&Te&&s.isSameDay(J,xe)),te[dt.range_end]=!!(xe&&Te&&s.isSameDay(J,Te)),te[dt.range_middle]=At($,J,!0,s)}const Ne=W1(te,C,t.modifiersStyles),Oe=b1(te,l,t.modifiersClassNames),en=!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:Oe.join(" "),style:Ne,role:"gridcell","aria-selected":te.selected||void 0,"aria-label":en,"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:Qt(ue,te),onBlur:kt(ue,te),onFocus:Un(ue,te),onKeyDown:Jt(ue,te),onMouseEnter:Le(ue,te),onMouseLeave:Rn(ue,te)},D(J,s.options,s)):!te.hidden&&D(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 Pp=ye(["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}}),si=f.forwardRef(({className:e,size:t,isError:n,placeholder:r,children:o,...a},s)=>c.jsxs("button",{ref:s,type:"button",className:P(Pp({size:t,isError:n}),e),"aria-invalid":n||void 0,...a,children:[c.jsx(Hg,{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})]}));si.displayName="DatePickerTrigger";const ii=({className:e,classNames:t,...n})=>c.jsx(cS,{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(tl,{className:"size-4","aria-hidden":"true"}):c.jsx(wn,{className:"size-4","aria-hidden":"true"})},...n});ii.displayName="Calendar";const _p=ln;_p.displayName="DatePickerRoot";const Op=f.forwardRef(({className:e,align:t="start",...n},r)=>c.jsx(Ut,{ref:r,align:t,className:P("w-auto p-0",e),...n}));Op.displayName="DatePickerContent";const Ip=f.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a date",formatStr:r="PPP",size:o,isError:a,disabled:s,className:i},l)=>{const[d,p]=f.useState(!1),u=e?Yn(e,r):void 0;return c.jsxs(ln,{open:d,onOpenChange:p,children:[c.jsx(hr,{asChild:!0,children:c.jsx(si,{ref:l,size:o,isError:a,disabled:s,className:i,placeholder:n,"aria-expanded":d,"aria-haspopup":"dialog",children:u})}),c.jsx(Ut,{className:"w-auto p-0",align:"start",children:c.jsx(ii,{mode:"single",selected:e,onSelect:h=>{t==null||t(h),p(!1)},defaultMonth:e})})]})});Ip.displayName="DatePicker";const Ap=wc,Fp=yb,Wp=wb,$p=xc,li=f.forwardRef(({className:e,...t},n)=>c.jsx(Wa,{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}));li.displayName=Wa.displayName;const ci=f.forwardRef(({className:e,children:t,dismissible:n=!0,onInteractOutside:r,onPointerDownOutside:o,onEscapeKeyDown:a,...s},i)=>c.jsxs($p,{children:[c.jsx(li,{}),c.jsx($a,{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})]}));ci.displayName=$a.displayName;const di=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col gap-1.5 mb-4",e),...t});di.displayName="DialogHeader";const ui=({className:e,...t})=>c.jsx("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end mt-6",e),...t});ui.displayName="DialogFooter";const fi=f.forwardRef(({className:e,...t},n)=>c.jsx(Cc,{ref:n,className:P("text-lg font-semibold leading-none text-balance",e),...t}));fi.displayName=Cc.displayName;const pi=f.forwardRef(({className:e,...t},n)=>c.jsx(Sc,{ref:n,className:P("text-sm text-muted-foreground text-pretty",e),...t}));pi.displayName=Sc.displayName;const zp=({trigger:e,title:t,description:n,children:r,footer:o,contentClassName:a,dismissible:s=!0,...i})=>c.jsxs(Ap,{...i,children:[e&&c.jsx(Fp,{asChild:!0,children:e}),c.jsxs(ci,{className:a,dismissible:s,children:[s&&c.jsx(Wp,{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($t,{className:"size-4","aria-hidden":"true"})}),c.jsxs(di,{children:[c.jsx(fi,{children:t}),n&&c.jsx(pi,{children:n})]}),r,o&&c.jsx(ui,{children:o})]})]});zp.displayName="Dialog";const Bp=f.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:P("flex flex-col gap-1.5",e),...t}));Bp.displayName="Field";const Lp=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:"*"})]}));Lp.displayName="Label";const Hp=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}));Hp.displayName="FieldMessage";function Vp(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const Yp=f.forwardRef(({accept:e,multiple:t,onFilesChange:n,isError:r,disabled:o,className:a},s)=>{const[i,l]=f.useState(!1),[d,p]=f.useState([]),[u,h]=f.useState({}),g=f.useRef(null),w=f.useCallback(E=>{g.current=E,typeof s=="function"?s(E):s&&(s.current=E)},[s]);f.useEffect(()=>{const E={};for(const I of d)I.type.startsWith("image/")&&(E[I.name]=URL.createObjectURL(I));return h(E),()=>{for(const I of Object.values(E))URL.revokeObjectURL(I)}},[d]);const m=E=>{p(E),n==null||n(E)},v=E=>{!E||E.length===0||m(Array.from(E))},b=E=>{m(d.filter(I=>I.name!==E))},y=E=>{E.preventDefault(),o||l(!0)},x=E=>{E.preventDefault()},N=E=>{E.preventDefault(),l(!1)},M=E=>{E.preventDefault(),l(!1),o||v(E.dataTransfer.files)},C=()=>{var E;o||(E=g.current)==null||E.click()},k=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),C())},D=d.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:k,onDragEnter:y,onDragOver:x,onDragLeave:N,onDrop:M,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",D?"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:[D?c.jsxs("div",{className:"flex w-full flex-col gap-2",children:[d.map(E=>c.jsxs("div",{className:"flex items-center gap-3 rounded-md bg-muted/50 px-3 py-2",children:[u[E.name]?c.jsx("img",{src:u[E.name],alt:E.name,className:"size-8 shrink-0 rounded object-cover"}):c.jsx(Xg,{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:E.name}),c.jsx("p",{className:"text-xs text-muted-foreground",children:Vp(E.size)})]}),c.jsx("button",{type:"button","aria-label":`Remove ${E.name}`,onClick:I=>{I.stopPropagation(),b(E.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($t,{className:"size-4","aria-hidden":!0})})]},E.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(Ug,{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:E=>{v(E.target.files),E.currentTarget.value=""}})]})});Yp.displayName="FileUpload";const Gp=ye(["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}}),jp=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:d,className:p},u)=>{const h=t!==void 0,[g,w]=f.useState(n??[]),m=t??g,[v,b]=f.useState(!1),[y,x]=f.useState("");function N(D){b(D),D||x("")}function M(D){const E=m.includes(D)?m.filter(I=>I!==D):[...m,D];h||w(E),r==null||r(E)}function C(D){const E=m.filter(I=>I!==D);h||w(E),r==null||r(E)}const k=f.useMemo(()=>e.filter(D=>m.includes(D.value)),[e,m]);return c.jsxs(ln,{open:v,onOpenChange:N,children:[c.jsx(hr,{asChild:!0,children:c.jsxs("button",{ref:u,type:"button",disabled:d,"aria-expanded":v,"aria-haspopup":"listbox","aria-invalid":l||void 0,className:P(Gp({size:i,isError:l}),p),children:[c.jsx("span",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:m.length>0?k.map(D=>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:[D.label,c.jsx("span",{role:"button",tabIndex:d?-1:0,"aria-label":`Remove ${D.label}`,onClick:E=>{E.stopPropagation(),C(D.value)},onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),E.stopPropagation(),C(D.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($t,{className:"size-3","aria-hidden":!0})})]},D.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(Ut,{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(po,{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(ho,{className:"max-h-60 overflow-y-auto p-1",children:[c.jsx(go,{className:"py-6 text-center text-sm text-muted-foreground",children:s}),e.map(D=>c.jsxs(fo,{value:D.label,disabled:D.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:()=>M(D.value),children:[c.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:m.includes(D.value)&&c.jsx(nn,{className:"size-4","aria-hidden":!0})}),D.label]},D.value))]})]})})]})});jp.displayName="MultiSelect";const Up=ye(["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"}}),Rp=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(Up({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,{})})]}));Rp.displayName="NativeSelect";const Kp=ye(["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"},layout:{vertical:"",horizontal:""}},defaultVariants:{size:"md",layout:"vertical"}}),qp=f.forwardRef(({className:e,size:t,layout:n,isError:r,min:o,max:a,step:s,disabled:i,...l},d)=>{const p=f.useRef(null),u=f.useCallback(v=>{p.current=v,typeof d=="function"?d(v):d&&(d.current=v)},[d]),h=v=>{var C;const b=p.current;if(!b)return;const y=parseFloat(b.value)||0,x=Number(s??1);let N=y+v*x;a!==void 0&&(N=Math.min(N,Number(a))),o!==void 0&&(N=Math.max(N,Number(o)));const M=(C=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:C.set;M==null||M.call(b,String(N)),b.dispatchEvent(new Event("input",{bubbles:!0}))},g=t==="sm"?"size-2.5":"size-3",w=t==="sm"?"size-3":"size-4",m=t==="sm"?"px-2.5":"px-3";return c.jsx("div",{className:P(Kp({size:t,layout:n}),r&&"border-destructive focus-within:ring-destructive",i&&"cursor-not-allowed opacity-50",e),children:n==="horizontal"?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(nl,{"aria-hidden":"true",className:w})}),c.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),c.jsx("input",{ref:u,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||void 0,className:P("min-w-0 flex-1 border-0 bg-transparent py-0 focus:outline-none","tabular-nums appearance-none text-center font-medium text-primary","[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","px-2"),...l}),c.jsx("div",{"aria-hidden":"true",className:"border-l border-input"}),c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increment",disabled:i,onClick:()=>h(1),className:P("flex shrink-0 cursor-pointer items-center justify-center",m,"text-muted-foreground transition-[color,background-color,scale]","hover:bg-accent hover:text-accent-foreground","active:scale-[0.96]","disabled:pointer-events-none disabled:cursor-not-allowed"),children:c.jsx(om,{"aria-hidden":"true",className:w})})]}):c.jsxs(c.Fragment,{children:[c.jsx("input",{ref:u,type:"number",min:o,max:a,step:s,disabled:i,"aria-invalid":r||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"),...l}),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:i,onClick:()=>h(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(Qr,{"aria-hidden":"true",className:g})}),c.jsx("div",{"aria-hidden":"true",className:"border-t border-input"}),c.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrement",disabled:i,onClick:()=>h(-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:g})})]})]})})});qp.displayName="NumberInput";const Xp=ye(["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"}}),Zp=f.forwardRef(({length:e=6,value:t,defaultValue:n,onChange:r,isError:o,disabled:a,size:s,className:i},l)=>{const d=t!==void 0,[p,u]=f.useState(n??""),h=t??p,g=Array.from({length:e},(k,D)=>h[D]??""),w=f.useRef([]),m=f.useMemo(()=>Array.from({length:e},(k,D)=>E=>{w.current[D]=E,D===0&&(typeof l=="function"?l(E):l&&(l.current=E))}),[e,l]),v=f.useRef(!1),b=k=>{var D;v.current=!0,(D=w.current[k])==null||D.focus()},y=k=>{const D=k.join("").slice(0,e);d||u(D),r==null||r(D)},x=(k,D)=>{const E=D.target.value,I=[...g];I[k]=E,y(I),E&&k<e-1&&b(k+1)},N=(k,D)=>{if(D.key==="Backspace"){D.preventDefault();const E=[...g];E[k]?(E[k]="",y(E)):k>0&&(E[k-1]="",y(E),b(k-1))}else D.key==="ArrowLeft"?(D.preventDefault(),k>0&&b(k-1)):D.key==="ArrowRight"&&(D.preventDefault(),k<e-1&&b(k+1))},M=k=>{k.preventDefault();const D=k.clipboardData.getData("text").replace(/\D/g,"").slice(0,e),E=Array.from({length:e},(I,R)=>D[R]??"");y(E),b(Math.min(D.length,e-1))},C=(k,D)=>{if(v.current){v.current=!1,D.target.select();return}const E=g.findIndex(I=>!I);if(E!==-1&&k>E){b(E);return}D.target.select()};return c.jsx("div",{role:"group","aria-label":"One-time password",className:P("flex gap-2",i),children:g.map((k,D)=>c.jsx("input",{ref:m[D],type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,value:k,disabled:a,"aria-label":`Digit ${D+1} of ${e}`,"aria-invalid":o||void 0,className:P(Xp({size:s}),o&&"border-destructive focus-visible:ring-destructive"),onChange:E=>x(D,E),onKeyDown:E=>N(D,E),onPaste:M,onFocus:E=>C(D,E)},D))})});Zp.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 hi=f.createContext({}),Jp=ye(["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"}}),dS=ye(["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"}}),eh=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,name:o,...a},s)=>{const i=f.use(hi);return c.jsxs("span",{className:P("relative inline-flex shrink-0 items-center justify-center",e),children:[c.jsx("input",{type:"radio",ref:s,name:o??i.name,className:P(Jp({size:n}),r&&"border-destructive",t),"aria-invalid":r||void 0,...a}),c.jsx("span",{"aria-hidden":"true",className:dS({size:n})})]})});eh.displayName="Radio";const th=ye("flex",{variants:{orientation:{vertical:"flex-col gap-2",horizontal:"flex-row flex-wrap gap-4"}},defaultVariants:{orientation:"vertical"}}),nh=f.forwardRef(({className:e,name:t,orientation:n,children:r,...o},a)=>c.jsx(hi,{value:{name:t},children:c.jsx("div",{ref:a,role:"radiogroup",className:P(th({orientation:n}),e),...o,children:r})}));nh.displayName="RadioGroup";const rh=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}));rh.displayName="Separator";const oh=ye(["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"}}),uS=ye(["absolute top-1/2 -translate-y-1/2 rounded-full bg-primary-foreground 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"}}),ah=f.forwardRef(({className:e,inputClassName:t,size:n,isError:r,...o},a)=>c.jsxs("span",{className:P("relative inline-flex shrink-0 items-center",e),children:[c.jsx("input",{type:"checkbox",role:"switch",ref:a,className:P("peer absolute inset-0 z-10 cursor-pointer opacity-0","disabled:cursor-not-allowed",t),"aria-invalid":r||void 0,...o}),c.jsx("span",{"aria-hidden":"true",className:P(oh({size:n}),r&&"ring-2 ring-destructive ring-offset-2 ring-offset-background",r&&"peer-focus-visible:ring-destructive")}),c.jsx("span",{"aria-hidden":"true",className:uS({size:n})})]}));ah.displayName="Switch";var qo="Tabs",[fS]=Ze(qo,[$o]),sh=$o(),[pS,gi]=fS(qo),ih=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...d}=e,p=tr(i),[u,h]=Qe({prop:r,onChange:o,defaultProp:a??"",caller:qo});return c.jsx(pS,{scope:n,baseId:Ce(),value:u,onValueChange:h,orientation:s,dir:p,activationMode:l,children:c.jsx(ne.div,{dir:p,"data-orientation":s,...d,ref:t})})});ih.displayName=qo;var lh="TabsList",ch=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=gi(lh,n),s=sh(n);return c.jsx(Tu,{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})})});ch.displayName=lh;var dh="TabsTrigger",uh=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=gi(dh,n),i=sh(n),l=hh(s.baseId,r),d=gh(s.baseId,r),p=r===s.value;return c.jsx(Pu,{asChild:!0,...i,focusable:!o,active:p,children:c.jsx(ne.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:j(e.onMouseDown,u=>{!o&&u.button===0&&u.ctrlKey===!1?s.onValueChange(r):u.preventDefault()}),onKeyDown:j(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&s.onValueChange(r)}),onFocus:j(e.onFocus,()=>{const u=s.activationMode!=="manual";!p&&!o&&u&&s.onValueChange(r)})})})});uh.displayName=dh;var fh="TabsContent",ph=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=gi(fh,n),l=hh(i.baseId,r),d=gh(i.baseId,r),p=r===i.value,u=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(h)},[]),c.jsx(ze,{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:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:h&&a})})});ph.displayName=fh;function hh(e,t){return`${e}-trigger-${t}`}function gh(e,t){return`${e}-content-${t}`}var mh=ih,vh=ch,bh=uh,yh=ph;const mi=f.forwardRef(({className:e,...t},n)=>c.jsx(mh,{ref:n,className:P("group/tabs","data-[orientation=vertical]:flex data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6",e),...t}));mi.displayName=mh.displayName;const vi=f.forwardRef(({className:e,...t},n)=>c.jsx(vh,{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}));vi.displayName=vh.displayName;const bi=f.forwardRef(({className:e,...t},n)=>c.jsx(bh,{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}));bi.displayName=bh.displayName;const yi=f.forwardRef(({className:e,...t},n)=>c.jsx(yh,{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}));yi.displayName=yh.displayName;const wh=({items:e,listClassName:t,className:n,...r})=>c.jsxs(mi,{className:n,...r,children:[c.jsx(vi,{className:t,children:e.map(({value:o,label:a,disabled:s,icon:i})=>c.jsxs(bi,{value:o,disabled:s,children:[i,a]},o))}),e.map(({value:o,content:a})=>c.jsx(yi,{value:o,children:a},o))]});wh.displayName="Tabs";const xh=ye(["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"}}),Ch=f.forwardRef(({className:e,size:t,isError:n,...r},o)=>c.jsx("textarea",{ref:o,className:P(xh({size:t}),n&&"border-destructive focus-visible:ring-destructive",e),"aria-invalid":n||void 0,...r}));Ch.displayName="Textarea";function hS(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 gS=e=>{switch(e){case"success":return bS;case"info":return wS;case"warning":return yS;case"error":return xS;default:return null}},mS=Array(12).fill(0),vS=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},mS.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),bS=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"})),yS=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"})),wS=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"})),xS=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"})),SS=()=>{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 wi=1;class NS{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:wi++,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 d=>{if(s=["resolve",d],S.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(MS(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,w=typeof u=="object"&&!S.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...w})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,w=typeof u=="object"&&!S.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...w})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,h=typeof n.description=="function"?await n.description(d):n.description,w=typeof u=="object"&&!S.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:h,...w})}}).catch(async d=>{if(s=["reject",d],n.error!==void 0){a=!1;const p=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,g=typeof p=="object"&&!S.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:u,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((d,p)=>i.then(()=>s[0]==="reject"?p(s[1]):d(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)||wi++;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 Be=new NS,kS=(e,t)=>{const n=(t==null?void 0:t.id)||wi++;return Be.addToast({title:e,...t,id:n}),n},MS=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DS=kS,ES=()=>Be.toasts,TS=()=>Be.getActiveToasts(),Sh=Object.assign(DS,{success:Be.success,info:Be.info,warning:Be.warning,error:Be.error,custom:Be.custom,message:Be.message,promise:Be.promise,dismiss:Be.dismiss,loading:Be.loading},{getHistory:ES,getToasts:TS});hS("[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 Xo(e){return e.label!==void 0}const PS=3,_S="24px",OS="16px",Nh=4e3,IS=356,AS=14,FS=45,WS=200;function Nt(...e){return e.filter(Boolean).join(" ")}function $S(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const zS=e=>{var t,n,r,o,a,s,i,l,d;const{invert:p,toast:u,unstyled:h,interacting:g,setHeights:w,visibleToasts:m,heights:v,index:b,toasts:y,expanded:x,removeToast:N,defaultRichColors:M,closeButton:C,style:k,cancelButtonStyle:D,actionButtonStyle:E,className:I="",descriptionClassName:R="",duration:B,position:q,gap:Y,expandByDefault:ae,classNames:z,icons:K,closeButtonAriaLabel:G="Close toast"}=e,[A,Q]=S.useState(null),[oe,O]=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(u.duration||B||Nh),Zt=S.useRef(null),De=S.useRef(null),zr=b===0,Br=b+1<=m,_e=u.type,ft=u.dismissible!==!1,We=u.className||"",gn=u.descriptionClassName||"",Qt=S.useMemo(()=>v.findIndex(J=>J.toastId===u.id)||0,[v,u.id]),Un=S.useMemo(()=>{var J;return(J=u.closeButton)!=null?J:C},[u.closeButton,C]),kt=S.useMemo(()=>u.duration||B||Nh,[u.duration,B]),Jt=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>=Qt?J:J+te.height,0),[v,Qt]),Xn=SS(),Zn=u.invert||p,mn=_e==="loading";Le.current=S.useMemo(()=>Qt*Y+ht,[Qt,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:u.id,height:te,position:u.position},...Ne]),()=>w(Ne=>Ne.filter(Oe=>Oe.toastId!==u.id))}},[w,u.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(Oe=>Oe.find(xe=>xe.toastId===u.id)?Oe.map(xe=>xe.toastId===u.id?{...xe,height:Ne}:xe):[{toastId:u.id,height:Ne,position:u.position},...Oe])},[F,u.title,u.description,w,u.id,u.jsx,u.action,u.cancel]);const Re=S.useCallback(()=>{Z(!0),Ee(Le.current),w(J=>J.filter(te=>te.toastId!==u.id)),setTimeout(()=>{N(u)},WS)},[u,N,w,Le]);S.useEffect(()=>{if(u.promise&&_e==="loading"||u.duration===1/0||u.type==="loading")return;let J;return x||g||Xn?(()=>{if(Rn.current<Jt.current){const Oe=new Date().getTime()-Jt.current;Fe.current=Fe.current-Oe}Rn.current=new Date().getTime()})():(()=>{Fe.current!==1/0&&(Jt.current=new Date().getTime(),J=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Re()},Fe.current))})(),()=>clearTimeout(J)},[x,g,u,_e,Xn,Re]),S.useEffect(()=>{u.delete&&(Re(),u.onDismiss==null||u.onDismiss.call(u,u))},[Re,u.delete]);function ie(){var J;if(K!=null&&K.loading){var te;return S.createElement("div",{className:Nt(z==null?void 0:z.loader,u==null||(te=u.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":_e==="loading"},K.loading)}return S.createElement(vS,{className:Nt(z==null?void 0:z.loader,u==null||(J=u.classNames)==null?void 0:J.loader),visible:_e==="loading"})}const pe=u.icon||(K==null?void 0:K[_e])||gS(_e);var re,ue;return S.createElement("li",{tabIndex:0,ref:De,className:Nt(I,We,z==null?void 0:z.toast,u==null||(t=u.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[_e],u==null||(n=u.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(re=u.richColors)!=null?re:M,"data-styled":!(u.jsx||u.unstyled||h),"data-mounted":F,"data-promise":!!u.promise,"data-swiped":de,"data-removed":$,"data-visible":Br,"data-y-position":Kn,"data-x-position":qn,"data-index":b,"data-front":zr,"data-swiping":W,"data-dismissible":ft,"data-type":_e,"data-invert":Zn,"data-swipe-out":X,"data-swipe-direction":oe,"data-expanded":!!(x||ae&&F),"data-testid":u.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${$?Me:Le.current}px`,"--initial-height":ae?"auto":`${tt}px`,...k,...u.style},onDragEnd:()=>{U(!1),Q(null),pt.current=null},onPointerDown:J=>{J.button!==2&&(mn||!ft||(Zt.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 Oe=Number(((J=De.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((te=De.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((Ne=Zt.current)==null?void 0:Ne.getTime()),Te=A==="x"?Oe:en,Qn=Math.abs(Te)/xe;if(Math.abs(Te)>=FS||Qn>.11){Ee(Le.current),u.onDismiss==null||u.onDismiss.call(u,u),O(A==="x"?Oe>0?"right":"left":en>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,Oe;if(!pt.current||!ft||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;const xe=J.clientY-pt.current.y,Te=J.clientX-pt.current.x;var Qn;const Ke=(Qn=e.swipeDirections)!=null?Qn:$S(q);!A&&(Math.abs(Te)>1||Math.abs(xe)>1)&&Q(Math.abs(Te)>Math.abs(xe)?"x":"y");let qe={x:0,y:0};const Jo=Wt=>1/(1.5+Math.abs(Wt)/20);if(A==="y"){if(Ke.includes("top")||Ke.includes("bottom"))if(Ke.includes("top")&&xe<0||Ke.includes("bottom")&&xe>0)qe.y=xe;else{const Wt=xe*Jo(xe);qe.y=Math.abs(Wt)<Math.abs(xe)?Wt:xe}}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*Jo(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`),(Oe=De.current)==null||Oe.style.setProperty("--swipe-amount-y",`${qe.y}px`)}},Un&&!u.jsx&&_e!=="loading"?S.createElement("button",{"aria-label":G,"data-disabled":mn,"data-close-button":!0,onClick:mn||!ft?()=>{}:()=>{Re(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Nt(z==null?void 0:z.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(ue=K==null?void 0:K.close)!=null?ue:CS):null,(_e||u.icon||u.promise)&&u.icon!==null&&((K==null?void 0:K[_e])!==null||u.icon)?S.createElement("div",{"data-icon":"",className:Nt(z==null?void 0:z.icon,u==null||(o=u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||ie():null,u.type!=="loading"?pe:null):null,S.createElement("div",{"data-content":"",className:Nt(z==null?void 0:z.content,u==null||(a=u.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:Nt(z==null?void 0:z.title,u==null||(s=u.classNames)==null?void 0:s.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?S.createElement("div",{"data-description":"",className:Nt(R,gn,z==null?void 0:z.description,u==null||(i=u.classNames)==null?void 0:i.description)},typeof u.description=="function"?u.description():u.description):null),S.isValidElement(u.cancel)?u.cancel:u.cancel&&Xo(u.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||D,onClick:J=>{Xo(u.cancel)&&ft&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,J),Re())},className:Nt(z==null?void 0:z.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,S.isValidElement(u.action)?u.action:u.action&&Xo(u.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||E,onClick:J=>{Xo(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,J),!J.defaultPrevented&&Re())},className:Nt(z==null?void 0:z.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function kh(){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 BS(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?OS:_S;function l(d){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${s}-${d}`]=i:n[`${s}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):l(i)}),n}const LS=S.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:d,offset:p,mobileOffset:u,theme:h="light",richColors:g,duration:w,style:m,visibleToasts:v=PS,toastOptions:b,dir:y=kh(),gap:x=AS,icons:N,containerAriaLabel:M="Notifications"}=t,[C,k]=S.useState([]),D=S.useMemo(()=>r?C.filter(F=>F.toasterId===r):C.filter(F=>!F.toasterId),[C,r]),E=S.useMemo(()=>Array.from(new Set([a].concat(D.filter(F=>F.position).map(F=>F.position)))),[D,a]),[I,R]=S.useState([]),[B,q]=S.useState(!1),[Y,ae]=S.useState(!1),[z,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),O=S.useCallback(F=>{k(V=>{var $;return($=V.find(Z=>Z.id===F.id))!=null&&$.delete||Be.dismiss(F.id),V.filter(({id:Z})=>Z!==F.id)})},[]);return S.useEffect(()=>Be.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{k(V=>V.map($=>$.id===F.id?{...$,delete:!0}:$))});return}setTimeout(()=>{oa.flushSync(()=>{k(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":`${M} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((F,V)=>{var $;const[Z,W]=F.split("-");return D.length?S.createElement("ol",{key:F,dir:y==="auto"?kh():y,tabIndex:-1,ref:G,className:d,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":Z,"data-x-position":W,style:{"--front-toast-height":`${(($=I[0])==null?void 0:$.height)||0}px`,"--width":`${IS}px`,"--gap":`${x}px`,...m,...BS(p,u)},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)},D.filter(U=>!U.position&&V===0||U.position===F).map((U,X)=>{var se,de;return S.createElement(zS,{key:U.id,icons:N,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:O,toasts:D.filter(ce=>ce.position==U.position),heights:I.filter(ce=>ce.position==U.position),setHeights:R,expandByDefault:i,gap:x,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),HS={success:{halo:"bg-success/20",core:"bg-success text-success-foreground"},info:{halo:"bg-info/20",core:"bg-info text-info-foreground"},warning:{halo:"bg-warning/25",core:"bg-warning text-warning-foreground"},error:{halo:"bg-destructive/20",core:"bg-destructive text-destructive-foreground"},loading:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"},default:{halo:"bg-primary/15",core:"bg-primary text-primary-foreground"}};function VS({variant:e,icon:t,className:n}){const r=HS[e];return c.jsxs("span",{className:"bookers-toast-status","aria-hidden":"true",children:[c.jsx("span",{className:P("bookers-toast-status__halo",r.halo)}),c.jsx("span",{className:P("bookers-toast-status__core",r.core),children:c.jsx(t,{className:P("size-4",n),strokeWidth:2.25})})]})}function Fr(e,t,n){return c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),c.jsx(VS,{variant:e,icon:t,className:n})]})}const Mh=c.jsx("span",{className:"bookers-toast__bar","aria-hidden":"true"}),YS=Fr("success",nn),GS=Fr("info",Yg),jS=Fr("warning",Vg),US=Fr("error",Gg),RS=Fr("loading",fa,"animate-spin");function KS(e,t){const n=(t==null?void 0:t.action)!==void 0;return Sh(e,{...t,icon:(t==null?void 0:t.icon)!==void 0?t.icon:Mh,closeButton:(t==null?void 0:t.closeButton)??(n?!1:void 0)})}const qS=Object.assign(KS,Sh),Dh={toast:"bookers-toast",icon:"bookers-toast__icon",loader:"bookers-toast__loader",content:"bookers-toast__content",title:"bookers-toast__title",description:"bookers-toast__description",closeButton:"bookers-toast__close",actionButton:"bookers-toast__action",cancelButton:"bookers-toast__cancel"},XS={success:YS,info:GS,warning:jS,error:US,loading:RS,default:Mh,close:c.jsx($t,{className:"size-3.5",strokeWidth:2,"aria-hidden":"true"})},Eh=({toastOptions:e,richColors:t=!1,closeButton:n=!0,position:r="top-center",...o})=>{var a;return c.jsx(LS,{theme:"light",richColors:t,position:r,closeButton:n,icons:XS,className:"font-body",toastOptions:{unstyled:!0,...e,classNames:{...Dh,...e==null?void 0:e.classNames,toast:P(Dh.toast,(a=e==null?void 0:e.classNames)==null?void 0:a.toast)}},...o})};Eh.displayName="Toaster";var[Zo]=Ze("Tooltip",[Gt]),Qo=Gt(),Th="TooltipProvider",ZS=700,xi="tooltip.open",[QS,Ci]=Zo(Th),Ph=e=>{const{__scopeTooltip:t,delayDuration:n=ZS,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 d=l.current;return()=>window.clearTimeout(d)},[]),c.jsx(QS,{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(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};Ph.displayName=Th;var Wr="Tooltip",[JS,$r]=Zo(Wr),_h=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Ci(Wr,e.__scopeTooltip),d=Qo(t),[p,u]=f.useState(null),h=Ce(),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:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(xi))):l.onClose(),a==null||a(k)},caller:Wr}),x=f.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),N=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),M=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,{...d,children:c.jsx(JS,{scope:t,contentId:h,open:b,stateAttribute:x,trigger:p,onTriggerChange:u,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})})};_h.displayName=Wr;var Si="TooltipTrigger",Oh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$r(Si,n),a=Ci(Si,n),s=Qo(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),d=f.useRef(!1),p=f.useRef(!1),u=f.useCallback(()=>d.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),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(),d.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:j(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:j(e.onBlur,o.onClose),onClick:j(e.onClick,o.onClose)})})});Oh.displayName=Si;var Ni="TooltipPortal",[eN,tN]=Zo(Ni,{forceMount:void 0}),Ih=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=$r(Ni,t);return c.jsx(eN,{scope:t,forceMount:n,children:c.jsx(ze,{present:n||a.open,children:c.jsx(kn,{asChild:!0,container:o,children:r})})})};Ih.displayName=Ni;var jn="TooltipContent",Ah=f.forwardRef((e,t)=>{const n=tN(jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=$r(jn,e.__scopeTooltip);return c.jsx(ze,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Fh,{side:o,...a,ref:t}):c.jsx(nN,{side:o,...a,ref:t})})}),nN=f.forwardRef((e,t)=>{const n=$r(jn,e.__scopeTooltip),r=Ci(jn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:d}=n,p=o.current,{onPointerInTransitChange:u}=r,h=f.useCallback(()=>{i(null),u(!1)},[u]),g=f.useCallback((w,m)=>{const v=w.currentTarget,b={x:w.clientX,y:w.clientY},y=iN(b,v.getBoundingClientRect()),x=lN(b,y),N=cN(m.getBoundingClientRect()),M=uN([...x,...N]);i(M),u(!0)},[u]);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=!dN(b,s);y?h():x&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,p,s,d,h]),c.jsx(Fh,{...e,ref:a})}),[rN,oN]=Zo(Wr,{isInside:!1}),aN=ng("TooltipContent"),Fh=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=$r(jn,n),d=Qo(n),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(xi,p),()=>document.removeEventListener(xi,p)),[p]),f.useEffect(()=>{if(l.trigger){const u=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&p()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,p]),c.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u=>u.preventDefault(),onDismiss:p,children:c.jsxs(Do,{"data-state":l.stateAttribute,...d,...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(aN,{children:r}),c.jsx(rN,{scope:n,isInside:!0,children:c.jsx(uw,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Ah.displayName=jn;var Wh="TooltipArrow",sN=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qo(n);return oN(Wh,n).isInside?null:c.jsx(Eo,{...o,...r,ref:t})});sN.displayName=Wh;function iN(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 lN(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 cN(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 dN(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],d=i.x,p=i.y,u=l.x,h=l.y;p>r!=h>r&&n<(u-d)*(r-p)/(h-p)+d&&(o=!o)}return o}function uN(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),fN(t)}function fN(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 pN=Ph,hN=_h,gN=Oh,mN=Ih,$h=Ah;const vN=pN,zh=hN,Bh=gN,ki=f.forwardRef(({className:e,sideOffset:t=6,...n},r)=>c.jsx(mN,{children:c.jsx($h,{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})}));ki.displayName=$h.displayName;const Lh=({content:e,children:t,side:n,align:r,sideOffset:o,...a})=>c.jsxs(zh,{...a,children:[c.jsx(Bh,{asChild:!0,children:t}),c.jsx(ki,{side:n,align:r,sideOffset:o,children:e})]});Lh.displayName="Tooltip",T.Accordion=vl,T.AccordionContent=ya,T.AccordionItem=va,T.AccordionRoot=ma,T.AccordionTrigger=ba,T.Alert=yl,T.AlertDescription=xl,T.AlertTitle=wl,T.AspectRatio=Nl,T.Avatar=Ml,T.Badge=El,T.Button=Sn,T.Calendar=ii,T.Checkbox=_l,T.ComboBox=Od,T.ComboBoxContent=Md,T.ComboBoxEmpty=Ed,T.ComboBoxGroup=Td,T.ComboBoxItem=Dd,T.ComboBoxRoot=_d,T.ComboBoxSeparator=Pd,T.ComboBoxTrigger=ns,T.ComboBoxTriggerVariants=kd,T.DATA_TABLE_EXPAND_COLUMN_ID=It,T.DataTable=Bf,T.DataTableColumnHeader=Lf,T.DatePicker=Ip,T.DatePickerContent=Op,T.DatePickerRoot=_p,T.DatePickerTrigger=si,T.Dialog=zp,T.DialogClose=Wp,T.DialogContent=ci,T.DialogDescription=pi,T.DialogFooter=ui,T.DialogHeader=di,T.DialogOverlay=li,T.DialogPortal=$p,T.DialogRoot=Ap,T.DialogTitle=fi,T.DialogTrigger=Fp,T.DropdownMenu=Of,T.DropdownMenuCheckboxItem=Ys,T.DropdownMenuContent=Nr,T.DropdownMenuGroup=i0,T.DropdownMenuItem=Ot,T.DropdownMenuLabel=kr,T.DropdownMenuPortal=l0,T.DropdownMenuRadioGroup=_f,T.DropdownMenuRadioItem=Gs,T.DropdownMenuRoot=Vo,T.DropdownMenuSeparator=zn,T.DropdownMenuSub=Vs,T.DropdownMenuSubContent=jo,T.DropdownMenuSubTrigger=Go,T.DropdownMenuTrigger=Yo,T.Field=Bp,T.FieldMessage=Hp,T.FileUpload=Yp,T.Input=gr,T.InputAddon=fs,T.InputGroup=us,T.Label=Lp,T.MultiSelect=jp,T.NativeSelect=Rp,T.NumberInput=qp,T.OTPInput=Zp,T.Pagination=ys,T.PaginationEllipsis=bs,T.PaginationItem=gs,T.PaginationNext=vs,T.PaginationPrev=ms,T.PaginationRoot=ps,T.Popover=Nd,T.PopoverAnchor=rw,T.PopoverClose=nw,T.PopoverContent=Ut,T.PopoverRoot=ln,T.PopoverTrigger=hr,T.Progress=Qp,T.Radio=eh,T.RadioGroup=nh,T.RadioGroupContext=hi,T.STRING_COLUMN_FILTER_OPTIONS=os,T.Select=Su,T.SelectContent=Wo,T.SelectGroup=Lw,T.SelectItem=Ps,T.SelectLabel=xu,T.SelectRoot=Ms,T.SelectScrollDownButton=Ts,T.SelectScrollUpButton=Es,T.SelectSeparator=Cu,T.SelectTrigger=Fo,T.SelectValue=Ds,T.Separator=rh,T.Skeleton=ds,T.Switch=ah,T.Table=ss,T.TableBody=ls,T.TableCaption=Id,T.TableCell=cn,T.TableFooter=cs,T.TableHead=Po,T.TableHeader=is,T.TableRow=_t,T.Tabs=wh,T.TabsContent=yi,T.TabsList=vi,T.TabsRoot=mi,T.TabsTrigger=bi,T.Textarea=Ch,T.Toaster=Eh,T.Tooltip=Lh,T.TooltipContent=ki,T.TooltipProvider=vN,T.TooltipRoot=zh,T.TooltipTrigger=Bh,T.accordionContentVariants=gl,T.accordionRootVariants=ml,T.accordionTriggerVariants=hl,T.alertVariants=bl,T.avatarVariants=kl,T.badgeVariants=Dl,T.bookersStringFilter=as,T.buttonVariants=Tl,T.checkboxVariants=Pl,T.cn=P,T.dataTableColumnHeaderMeta=m0,T.datePickerTriggerVariants=Pp,T.formatBytes=Vp,T.inputVariants=Fd,T.multiSelectTriggerVariants=Gp,T.nativeSelectVariants=Up,T.numberInputVariants=Kp,T.otpSlotVariants=Xp,T.radioGroupVariants=th,T.radioVariants=Jp,T.selectTriggerVariants=wu,T.switchTrackVariants=oh,T.textareaVariants=xh,T.toast=qS,T.useDataTableTable=Af,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|