@reeverdev/ui 0.2.136 → 0.2.138
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.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
scrollbar-width: none;
|
|
41
41
|
}
|
|
42
42
|
`:""}
|
|
43
|
-
`;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsxRuntime.jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,className:u("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...a,children:r})]})});ze.displayName="ScrollArea";var ru=classVarianceAuthority.cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ou=W__namespace.forwardRef(({options:e,multiple:t=false,value:n,defaultValue:r,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,radius:p,className:g,...h},v)=>{let[b,w]=W__namespace.useState(false),[y,R]=W__namespace.useState(""),[C,x]=W__namespace.useState(r||""),[N,T]=W__namespace.useState(r||[]),[k,M]=W__namespace.useState({top:0,left:0,width:0}),P=W__namespace.useRef(null),E=W__namespace.useRef(null),D=W__namespace.useRef(null),H=W__namespace.useRef(null),L=n!==void 0?n:C,S=n!==void 0?n:N,V=n!==void 0,z=A=>{d&&L===A?(V||x(""),o?.("")):(V||x(A),o?.(A)),w(false),R("");},F=A=>{let Y=S.includes(A)?S.filter(ie=>ie!==A):[...S,A];V||T(Y),o?.(Y);},I=(A,Y)=>{Y.stopPropagation();let ie=S.filter(Te=>Te!==A);V||T(ie),o?.(ie);},K=A=>{A.stopPropagation(),t?(V||T([]),o?.([])):(V||x(""),o?.(""));},B=e.find(A=>A.value===L),q=e.filter(A=>S.includes(A.value)),ne=q.slice(0,m),G=q.length-m,O=s?e.filter(A=>A.label.toLowerCase().includes(y.toLowerCase())):e;W__namespace.useEffect(()=>{if(b&&E.current){let A=E.current.getBoundingClientRect();M({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}b||R("");},[b,s]),W__namespace.useEffect(()=>{let A=Y=>{let ie=Y.target,Te=P.current&&!P.current.contains(ie),U=D.current&&!D.current.contains(ie);Te&&U&&(w(false),R(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),W__namespace.useEffect(()=>{if(!b)return;let A=Y=>{D.current?.contains(Y.target)||(w(false),R(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[b]);let j=t?S.length>0:!!L;return jsxRuntime.jsxs("div",{ref:P,className:u("relative",g),...h,children:[jsxRuntime.jsxs("div",{ref:A=>{E.current=A,typeof v=="function"?v(A):v&&(v.current=A);},role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&w(!b),className:u(ru({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsxRuntime.jsx("span",{className:u(!B&&"text-muted-foreground"),children:B?B.label:a}),t&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:q.length===0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:a}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ne.map(A=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:Y=>I(A.value,Y),onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&I(A.value,Y);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},A.value)),G>0&&jsxRuntime.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",G," more"]})]})}),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&j&&jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:K,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&K(A);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4 opacity-50"})}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",b&&"rotate-180")})]})]}),b&&!c&&typeof document<"u"&&_a__namespace.createPortal(jsxRuntime.jsxs("div",{ref:D,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:k.top,left:k.left,minWidth:k.width},children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsxRuntime.jsx("input",{ref:H,type:"text",value:y,onChange:A=>R(A.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsxRuntime.jsx(ze,{style:{maxHeight:f},onWheel:A=>A.stopPropagation(),children:jsxRuntime.jsx("div",{className:"p-1",children:O.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(A=>{let Y=t?S.includes(A.value):L===A.value;return jsxRuntime.jsxs("div",{role:"option","aria-selected":Y,onClick:()=>{A.disabled||(t?F(A.value):z(A.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Y&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});ou.displayName="Select";var au=W__namespace.createContext(null),Wo=()=>{let e=W__namespace.useContext(au);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},zi=W__namespace.createContext({radius:"md"}),Oi=W__namespace.createContext(null),yn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),[s,i]=W__namespace.useState(-1),l=t!==void 0,c=l?t:o,d=W__namespace.useRef(null),m=W__namespace.useRef(null),f=W__namespace.useId(),p=W__namespace.useRef(new Map),g=W__namespace.useCallback(b=>{l||a(b),r?.(b),b||i(-1);},[l,r]),h=W__namespace.useCallback((b,w)=>{p.current.set(b,w);},[]),v=W__namespace.useCallback(b=>{p.current.delete(b);},[]);return jsxRuntime.jsx(au.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:v},children:e})};yn.displayName="Dropdown";var Rn=W__namespace.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Wo();return jsxRuntime.jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{n?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});Rn.displayName="DropdownTrigger";var VR={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},wn=W__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:v,contentId:b,activeIndex:w,setActiveIndex:y,items:R}=Wo(),[C,x]=W__namespace.useState({top:0,left:0}),[N,T]=W__namespace.useState(t),[k,M]=W__namespace.useState(false),P=W__namespace.useRef(0);if(W__namespace.useEffect(()=>{M(true);},[]),W__namespace.useEffect(()=>{p&&(P.current=R.current.size);},[p,R]),W__namespace.useEffect(()=>{if(!p||!h.current||!v.current)return;let D=()=>{if(!h.current||!v.current)return;let H=h.current.getBoundingClientRect(),L=v.current.getBoundingClientRect(),S=window.innerWidth,V=window.innerHeight,z=0,F=0,I=t;switch(t){case "top":z=H.top-L.height-n,z<a&&(z=H.bottom+n,I="bottom");break;case "bottom":z=H.bottom+n,z+L.height>V-a&&(z=H.top-L.height-n,I="top");break;case "left":F=H.left-L.width-n,F<a&&(F=H.right+n,I="right");break;case "right":F=H.right+n,F+L.width>S-a&&(F=H.left-L.width-n,I="left");break}if(I==="top"||I==="bottom"){switch(r){case "start":F=H.left+o;break;case "center":F=H.left+H.width/2-L.width/2;break;case "end":F=H.right-L.width-o;break}F<a?F=a:F+L.width>S-a&&(F=S-L.width-a);}else {switch(r){case "start":z=H.top+o;break;case "center":z=H.top+H.height/2-L.height/2;break;case "end":z=H.bottom-L.height-o;break}z<a?z=a:z+L.height>V-a&&(z=V-L.height-a);}x({top:z,left:F}),T(I);};return D(),window.addEventListener("resize",D),window.addEventListener("scroll",D,true),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",D,true);}},[p,t,n,r,o,a,h]),W__namespace.useEffect(()=>{if(!p)return;let D=H=>{let L=H.target;v.current&&!v.current.contains(L)&&h.current&&!h.current.contains(L)&&(s?.(),g(false));};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[p,g,s,h,v]),W__namespace.useEffect(()=>{if(!p)return;let D=H=>{let L=Array.from(R.current.entries()).sort(([V],[z])=>V-z).map(([,V])=>V),S=L.length;if(S!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),w===-1||w>=S-1?y(l?0:Math.min(w+1,S-1)):y(w+1);break;case "ArrowUp":H.preventDefault(),w<=0?y(l?S-1:0):y(w-1);break;case "Home":H.preventDefault(),y(0);break;case "End":H.preventDefault(),y(S-1);break;case "Enter":case " ":H.preventDefault(),w>=0&&w<S&&L[w]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,i,w,y,R,l,h]),W__namespace.useEffect(()=>{p&&w>=0&&Array.from(R.current.entries()).sort(([H],[L])=>H-L).map(([,H])=>H)[w]?.focus();},[p,w,R]),!k||!p)return null;let E={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[N];return _a__namespace.createPortal(jsxRuntime.jsx("div",{ref:D=>{v.current=D,typeof f=="function"?f(D):f&&(f.current=D);},id:b,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":N,className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",VR[c],E,e),style:{top:C.top,left:C.left},...m,children:jsxRuntime.jsx(zi.Provider,{value:{radius:c},children:d})}),document.body)});wn.displayName="DropdownContent";var su=0,iu={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},Wt=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Wo(),{radius:v}=W__namespace.useContext(zi),[b]=W__namespace.useState(()=>su++),w=W__namespace.useRef(null);W__namespace.useEffect(()=>(!n&&w.current&&g(b,w.current),()=>{h(b);}),[n,b,g,h]);let y=x=>{if(n){x.preventDefault();return}o?.(x),r?.(),m(false);},R=x=>{a?.(x),n||p(b);};return jsxRuntime.jsxs("div",{ref:x=>{w.current=x,typeof d=="function"?d(x):d&&(d.current=x);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===b?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",iu[v],t&&"pl-8",!n&&"cursor-pointer",e),onClick:y,onMouseEnter:R,...c,children:[s,l&&jsxRuntime.jsx("span",{className:"flex-1",children:l}),i]})});Wt.displayName="DropdownItem";var Bi=W__namespace.forwardRef(({className:e,inset:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Bi.displayName="DropdownSection";var lu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));lu.displayName="DropdownSeparator";var cu=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});cu.displayName="DropdownShortcut";var du=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));du.displayName="DropdownGroup";var uu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),{contentRef:s}=Wo(),i=t!==void 0,l=i?t:o,c=W__namespace.useRef(null),d=W__namespace.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsxRuntime.jsx(Oi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};uu.displayName="DropdownSub";var mu=W__namespace.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=W__namespace.useContext(Oi),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Wo(),{radius:p}=W__namespace.useContext(zi),[g]=W__namespace.useState(()=>su++),h=W__namespace.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:v,onOpenChange:b,triggerRef:w}=c;W__namespace.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let y=x=>{o?.(x),n||(d(g),b(true));},R=x=>{a?.(x);},C=x=>{s?.(x),(x.key==="ArrowRight"||x.key==="Enter"||x.key===" ")&&(x.preventDefault(),b(true));};return jsxRuntime.jsxs("div",{ref:x=>{h.current=x,w.current=x,typeof l=="function"?l(x):l&&(l.current=x);},role:"menuitem","aria-haspopup":"menu","aria-expanded":v,tabIndex:n?-1:0,"aria-disabled":n,"data-state":v?"open":"closed","data-disabled":n?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",iu[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:y,onMouseLeave:R,onKeyDown:C,...i,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});mu.displayName="DropdownSubTrigger";var pu=W__namespace.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=W__namespace.useContext(Oi);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=W__namespace.useState({top:0,left:0}),[h,v]=W__namespace.useState(false),b=W__namespace.useRef(null),w=W__namespace.useRef(null);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{if(!c||!m.current||!b.current)return;(()=>{if(!m.current||!b.current)return;let x=m.current.getBoundingClientRect(),N=b.current.getBoundingClientRect(),T=window.innerWidth,k=window.innerHeight,M=x.top+n,P=x.right+t;P+N.width>T-r&&(P=x.left-N.width-t),M+N.height>k-r&&(M=k-N.height-r),M<r&&(M=r),g({top:M,left:P});})();},[c,t,n,r,m]);let y=C=>{o?.(C),w.current&&(clearTimeout(w.current),w.current=null),d(true);},R=C=>{a?.(C);let x=C.relatedTarget;m.current?.contains(x)||f?.current?.contains(x)||(w.current=setTimeout(()=>{d(false);},100));};return W__namespace.useEffect(()=>()=>{w.current&&clearTimeout(w.current);},[]),!h||!c?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:C=>{b.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:y,onMouseLeave:R,...s}),document.body)});pu.displayName="DropdownSubContent";var AR=Bi;var bu=W__namespace.createContext(null),Fi=()=>{let e=W__namespace.useContext(bu);if(!e)throw new Error("Popover components must be used within a Popover");return e},rt=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),s=t!==void 0,i=s?t:o,l=W__namespace.useRef(null),c=W__namespace.useId(),d=W__namespace.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsxRuntime.jsx(bu.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};rt.displayName="Popover";var Dt=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{open:o,onOpenChange:a,triggerRef:s,contentId:i}=Fi();return jsxRuntime.jsx("button",{ref:c=>{s.current=c,typeof r=="function"?r(c):r&&(r.current=c);},type:"button","aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?i:void 0,onClick:c=>{t?.(c),a(!o);},...n,children:e})});Dt.displayName="PopoverTrigger";var oo=W__namespace.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Fi();return jsxRuntime.jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});oo.displayName="PopoverAnchor";var ot=W__namespace.forwardRef(({className:e,style:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:v}=Fi(),[b,w]=W__namespace.useState({top:0,left:0}),[y,R]=W__namespace.useState(false),[C,x]=W__namespace.useState(null);if(W__namespace.useEffect(()=>{R(true);},[]),W__namespace.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),M=C.getBoundingClientRect(),P=0,E=0;switch(n){case "top":P=k.top-M.height-r;break;case "bottom":P=k.bottom+r;break;case "left":E=k.left-M.width-r;break;case "right":E=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":E=k.left+a;break;case "center":E=k.left+k.width/2-M.width/2;break;case "end":E=k.right-M.width-a;break}else switch(o){case "start":P=k.top+a;break;case "center":P=k.top+k.height/2-M.height/2;break;case "end":P=k.bottom-M.height-a;break}w({top:P,left:E});};return T(),window.addEventListener("resize",T),window.addEventListener("scroll",T,true),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T,true);}},[p,n,r,o,a,h,C]),W__namespace.useEffect(()=>{if(!p)return;let T=k=>{let M=k.target;C&&!C.contains(M)&&h.current&&!h.current.contains(M)&&(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),W__namespace.useEffect(()=>{if(!p)return;let T=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!y||!p)return null;let N={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[n];return _a__namespace.createPortal(jsxRuntime.jsx("div",{ref:T=>{x(k=>k!==T?T:k),typeof f=="function"?f(T):f&&(f.current=T);},id:v,role:"dialog","data-state":p?"open":"closed","data-side":n,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",N,e),style:{...t,top:b.top,left:b.left},...m,children:d}),document.body)});ot.displayName="PopoverContent";var vu=W__namespace.createContext(null),Gi=()=>{let e=W__namespace.useContext(vu);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},hu=W__namespace.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=W__namespace.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsxRuntime.jsx(vu.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsxRuntime.jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});hu.displayName="Tabs";var Ki={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},xu=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Gi(),l=W__namespace.useRef(null),[c,d]=W__namespace.useState({opacity:0});W__namespace.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let b=g.querySelector('[data-state="active"]');if(b){let w=g.getBoundingClientRect(),y=b.getBoundingClientRect(),R=s==="vertical";o==="underline"?d(R?{width:2,height:y.height,transform:`translateY(${y.top-w.top}px)`,opacity:1}:{width:y.width,height:2,transform:`translateX(${y.left-w.left}px)`,opacity:1}):o==="solid"&&d(R?{width:y.width,height:y.height,transform:`translateY(${y.top-w.top}px)`,opacity:1}:{width:y.width,height:y.height,transform:`translateX(${y.left-w.left}px)`,opacity:1});}};h();let v=new ResizeObserver(h);return v.observe(g),()=>{v.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxRuntime.jsxs("div",{ref:g=>{l.current=g,typeof r=="function"?r(g):r&&(r.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Ki[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsxRuntime.jsx("span",{className:u("absolute transition-all duration-200 ease-out",Ki[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});xu.displayName="TabsList";var yu=W__namespace.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Gi(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsxRuntime.jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Ki[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});yu.displayName="TabsTrigger";var Ru=W__namespace.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Gi(),s=a===t;return s?jsxRuntime.jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r,children:n}):null});Ru.displayName="TabsContent";var wu=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function OR(e,t=wu){return e?t.filter(r=>r.test(e)).length/t.length:0}function BR(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function FR(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Tu=W__namespace.createContext(null),Ya=()=>{let e=W__namespace.useContext(Tu);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},Mu=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=W__namespace.useState(t),s=e!==void 0,i=s?e:o,l=W__namespace.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsxRuntime.jsx(Tu.Provider,{value:{open:i,onOpenChange:l},children:r})};Mu.displayName="Sheet";var Nu=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Ya();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Nu.displayName="SheetTrigger";var ku=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Ya();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});ku.displayName="SheetClose";var Ui=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Ui.displayName="SheetPortal";var Pu=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ya();return r?jsxRuntime.jsx("div",{ref:n,className:u("fixed inset-0 z-50 bg-black/80",r?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Pu.displayName="SheetOverlay";var Eu=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),$R=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],Lu=W__namespace.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Ya(),[d,m]=W__namespace.useState(false),[,f]=W__namespace.useState(false);return W__namespace.useEffect(()=>{if(l)m(true),f(true),ut();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{mt();}},[l]),W__namespace.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxRuntime.jsxs(Ui,{children:[jsxRuntime.jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(Eu({side:e}),$R(e,l),t),...s,children:[!r&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>c(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});Lu.displayName="SheetContent";var Su=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});Su.displayName="SheetHeader";var Du=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Du.displayName="SheetFooter";var Hu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));Hu.displayName="SheetTitle";var Iu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Iu.displayName="SheetDescription";var jR=({theme:e="system",...t})=>jsxRuntime.jsx(sonner.Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var Vu=W__namespace.createContext(null),Yo=()=>{let e=W__namespace.useContext(Vu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Wi=W__namespace.createContext(null),Au=W__namespace.createContext(null),zu=({children:e,onOpenChange:t})=>{let[n,r]=W__namespace.useState(false),[o,a]=W__namespace.useState({x:0,y:0}),s=W__namespace.useId(),i=W__namespace.useCallback(l=>{r(l),t?.(l);},[t]);return jsxRuntime.jsx(Vu.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};zu.displayName="ContextMenu";var Ou=W__namespace.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Yo(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsxRuntime.jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});Ou.displayName="ContextMenuTrigger";var Bu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Bu.displayName="ContextMenuGroup";var Fu=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Fu.displayName="ContextMenuPortal";var Ku=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),s=t!==void 0,i=s?t:o,l=W__namespace.useRef(null),c=W__namespace.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsxRuntime.jsx(Wi.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ku.displayName="ContextMenuSub";var Gu=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Au.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));Gu.displayName="ContextMenuRadioGroup";var $u=W__namespace.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Yo(),[d,m]=W__namespace.useState(false),[f,p]=W__namespace.useState(l),g=W__namespace.useRef(null);return W__namespace.useEffect(()=>{m(true);},[]),W__namespace.useEffect(()=>{if(!s||!g.current){p(l);return}let v=g.current.getBoundingClientRect(),{x:b,y:w}=l;b+v.width>window.innerWidth&&(b=window.innerWidth-v.width-8),w+v.height>window.innerHeight&&(w=window.innerHeight-v.height-8),p({x:b,y:w});},[s,l]),W__namespace.useEffect(()=>{if(!s)return;let h=v=>{let b=v.target;g.current&&!g.current.contains(b)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),W__namespace.useEffect(()=>{if(!s)return;let h=v=>{v.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:r}),document.body)});$u.displayName="ContextMenuContent";var Uu=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=W__namespace.useContext(Wi);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{r?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxRuntime.jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[n,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Uu.displayName="ContextMenuSubTrigger";var Wu=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=W__namespace.useContext(Wi);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=W__namespace.useState({top:0,left:0}),[f,p]=W__namespace.useState(false),g=W__namespace.useRef(null);W__namespace.useEffect(()=>{p(true);},[]),W__namespace.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let w=c.current.getBoundingClientRect(),y=g.current.getBoundingClientRect(),R=w.top,C=w.right+t;C+y.width>window.innerWidth&&(C=w.left-y.width-t),m({top:R,left:C});})();},[i,t,c]);let h=b=>{n?.(b),l(true);},v=b=>{r?.(b),l(false);};return !f||!i?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:b=>{g.current=b,typeof a=="function"?a(b):a&&(a.current=b);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:v,...o}),document.body)});Wu.displayName="ContextMenuSubContent";var ju=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Yo(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});ju.displayName="ContextMenuItem";var Yu=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Yo(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return jsxRuntime.jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});Yu.displayName="ContextMenuCheckboxItem";var _u=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Yo(),l=W__namespace.useContext(Au),c=l?.value===n,d=m=>{if(r){m.preventDefault();return}o?.(m),l?.onValueChange(n),i(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":c,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":c?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:d,...a,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-4 w-4 fill-current"})}),t]})});_u.displayName="ContextMenuRadioItem";var Xu=W__namespace.forwardRef(({className:e,inset:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));Xu.displayName="ContextMenuLabel";var qu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));qu.displayName="ContextMenuSeparator";var Zu=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Zu.displayName="ContextMenuShortcut";var Qu=W__namespace.createContext(null),QR=()=>{let e=W__namespace.useContext(Qu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Ju=W__namespace.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=W__namespace.useState(n),p=t!==void 0,g=p?t:m,h=W__namespace.useId(),v=b=>{p||f(b),r?.(b);};return jsxRuntime.jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsxRuntime.jsx(Qu.Provider,{value:{name:o||h,value:g,onValueChange:v,disabled:a,required:s},children:l})})});Ju.displayName="RadioGroup";var em=W__namespace.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=QR(),s=a.value===t,i=n||a.disabled;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>a.onValueChange(t),...r,children:s&&jsxRuntime.jsx("span",{className:"flex items-center justify-center",children:jsxRuntime.jsx(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsxRuntime.jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});em.displayName="RadioGroupItem";var qa=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),tm=W__namespace.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=W__namespace.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let v=!p;f||m(v),a?.(v);},h=v=>{v.key==="Enter"&&v.preventDefault(),i?.(v);};return jsxRuntime.jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u(qa({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});tm.displayName="Toggle";var nm=W__namespace.createContext(null),rw=()=>{let e=W__namespace.useContext(nm);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},rm=W__namespace.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=W__namespace.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:m,h=v=>{if(r==="single"){let b=g.includes(v)?[]:[v];p||f(b),s?.(b[0]||"");}else {let b=g.includes(v)?g.filter(w=>w!==v):[...g,v];p||f(b),s?.(b);}};return jsxRuntime.jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsxRuntime.jsx(nm.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});rm.displayName="ToggleGroup";var om=W__namespace.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=rw(),c=l.value.includes(o),d=a||l.disabled;return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u(qa({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});om.displayName="ToggleGroupItem";var Qa=W__namespace.forwardRef(({className:e,value:t,defaultValue:n=[0],onValueChange:r,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=W__namespace.useState(n),h=t!==void 0,v=h?t:p,b=W__namespace.useRef(null),[w,y]=W__namespace.useState(false),[R,C]=W__namespace.useState(null),x=(H,L)=>{if(!b.current)return v[0];let S=b.current.getBoundingClientRect(),V;c==="horizontal"?V=(H-S.left)/S.width:V=1-(L-S.top)/S.height,V=Math.max(0,Math.min(1,V));let z=a+V*(s-a),F=Math.round(z/i)*i;return Math.max(a,Math.min(s,F))},N=(H,L)=>{let S=[...v];S[L]=H,L>0&&H<v[L-1]&&(S[L]=v[L-1]),L<v.length-1&&H>v[L+1]&&(S[L]=v[L+1]),h||g(S),r?.(S);},T=(H,L)=>{l||(H.preventDefault(),y(true),C(L),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!w||R===null||l)return;let L=x(H.clientX,H.clientY);N(L,R);},M=()=>{w&&(y(false),C(null),o?.(v));},P=H=>{if(l)return;let L=x(H.clientX,H.clientY),S=0,V=Math.abs(v[0]-L);for(let z=1;z<v.length;z++){let F=Math.abs(v[z]-L);F<V&&(V=F,S=z);}N(L,S),o?.([...v.slice(0,S),L,...v.slice(S+1)]);},E=(H,L)=>{if(l)return;let S=v[L];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,v[L]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,v[L]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}N(S,L),o?.([...v.slice(0,L),S,...v.slice(L+1)]);},D=H=>(H-a)/(s-a)*100;return jsxRuntime.jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsxRuntime.jsx("div",{ref:b,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:P,children:jsxRuntime.jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:v.length>1?`${D(v[0])}%`:0,right:`${100-D(v[v.length-1])}%`,top:0,bottom:0}:{bottom:v.length>1?`${D(v[0])}%`:0,top:`${100-D(v[v.length-1])}%`,left:0,right:0}})}),v.map((H,L)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",w&&R===L&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${D(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${D(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:S=>T(S,L),onPointerMove:k,onPointerUp:M,onPointerCancel:M,onKeyDown:S=>E(S,L)},L)),d&&v.map((H,L)=>jsxRuntime.jsx("input",{type:"hidden",name:v.length>1?`${d}[${L}]`:d,value:H},L))]})});Qa.displayName="Slider";var am=W__namespace.createContext(null),sm=()=>{let e=W__namespace.useContext(am);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},_i=W__namespace.createContext(null),im=()=>{let e=W__namespace.useContext(_i);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},lm=W__namespace.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=W__namespace.useState(()=>t==="single"?r?[r]:[]:r||[]),f=W__namespace.useRef(new Map),p=W__namespace.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,v=R=>{if(t==="single"){let x=h.includes(R)&&a?[]:[R];g||m(x),o?.(x[0]||"");}else {let C=h.includes(R)?h.filter(x=>x!==R):[...h,R];g||m(C),o?.(C);}},b=W__namespace.useCallback((R,C)=>{f.current.set(R,C),p.current.includes(R)||p.current.push(R);},[]),w=W__namespace.useCallback(R=>{f.current.delete(R),p.current=p.current.filter(C=>C!==R);},[]),y=W__namespace.useCallback(R=>{let C=p.current;if(C.length===0)return;let x=document.activeElement,N;f.current.forEach((E,D)=>{E===x&&(N=D);});let T=N?C.indexOf(N):-1,k;switch(R){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=T===-1?0:(T+1)%C.length;break;case "prev":k=T===-1?C.length-1:(T-1+C.length)%C.length;break}let M=C[k];f.current.get(M)?.focus();},[]);return jsxRuntime.jsx(am.Provider,{value:{type:t,value:h,onValueChange:v,collapsible:a,disabled:s,registerTrigger:b,unregisterTrigger:w,focusTrigger:y},children:jsxRuntime.jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});lm.displayName="Accordion";var cm=W__namespace.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=sm(),d=c.value.includes(t),m=n||c.disabled||false,f=W__namespace.useId(),p=W__namespace.useId();return r!==void 0?jsxRuntime.jsx(_i.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxRuntime.jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsxRuntime.jsx(dm,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[a,jsxRuntime.jsxs("div",{className:"flex flex-col items-start",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsxRuntime.jsx(um,{children:s})]})}):jsxRuntime.jsx(_i.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxRuntime.jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});cm.displayName="AccordionItem";var dm=W__namespace.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=sm(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=im(),f=W__namespace.useRef(null);W__namespace.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(r?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsxRuntime.jsx("h3",{className:"flex",children:jsxRuntime.jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{n?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});dm.displayName="AccordionTrigger";var um=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=im();return jsxRuntime.jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:n,...r,children:jsxRuntime.jsx("div",{className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});um.displayName="AccordionContent";var pm=W__namespace.createContext(null),fm=()=>{let e=W__namespace.useContext(pm);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},gm=W__namespace.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=W__namespace.useState(n),m=t!==void 0,f=m?t:c,p=W__namespace.useId(),g=W__namespace.useId(),h=v=>{o||(m||d(v),r?.(v));};return jsxRuntime.jsx(pm.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxRuntime.jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold",children:a}),jsxRuntime.jsx(Xi,{})]}),s]})})});gm.displayName="Collapsible";var Xi=W__namespace.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=fm();return jsxRuntime.jsx(oe,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Xi.displayName="CollapsibleTrigger";var bm=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=fm(),c=W__namespace.useRef(null),[d,m]=W__namespace.useState(void 0),[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(a);W__namespace.useEffect(()=>{a?(h(true),p(true),requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);})):(p(true),m(0));},[a]);let v=()=>{p(false),a||h(false),m(void 0);};return g?jsxRuntime.jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d!==void 0?d:"auto":a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:v,...r,children:jsxRuntime.jsx("div",{ref:c,children:t})}):null});bm.displayName="CollapsibleContent";var ts=W__namespace.forwardRef(({className:e,value:t=0,max:n=100,label:r,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/n*100,0),100);return jsxRuntime.jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxRuntime.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsxRuntime.jsx("span",{className:"text-muted-foreground",children:r}),o&&jsxRuntime.jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),jsxRuntime.jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":typeof r=="string"?r:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsxRuntime.jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});ts.displayName="Progress";var ym=W__namespace.createContext(null),Rm=()=>{let e=W__namespace.useContext(ym);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},wm=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=W__namespace.useState(n),c=t!==void 0,d=c?t:i,m=W__namespace.useRef(null),f=W__namespace.useId(),p=W__namespace.useRef(null),g=W__namespace.useRef(null),h=W__namespace.useCallback(v=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),v?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return W__namespace.useEffect(()=>{if(!s||!d)return;let v=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",v,true),()=>window.removeEventListener("scroll",v,true)},[s,d,c,r]),W__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsxRuntime.jsx(ym.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};wm.displayName="HoverCard";var Cm=W__namespace.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Rm();return jsxRuntime.jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{n?.(p),i(false);},onFocus:p=>{r?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});Cm.displayName="HoverCardTrigger";var Tm=W__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=Rm(),[g,h]=W__namespace.useState({top:0,left:0}),[v,b]=W__namespace.useState(false),w=W__namespace.useRef(null);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{if(!d||!f.current||!w.current)return;(()=>{if(!f.current||!w.current)return;let N=f.current.getBoundingClientRect(),T=w.current.getBoundingClientRect(),k=0,M=0;switch(t){case "top":k=N.top-T.height-n;break;case "bottom":k=N.bottom+n;break;case "left":M=N.left-T.width-n;break;case "right":M=N.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":M=N.left+o;break;case "center":M=N.left+N.width/2-T.width/2;break;case "end":M=N.right-T.width-o;break}else switch(r){case "start":k=N.top+o;break;case "center":k=N.top+N.height/2-T.height/2;break;case "end":k=N.bottom-T.height-o;break}h({top:k,left:M});})();},[d,t,n,r,o,f]);let y=x=>{a?.(x),m(true);},R=x=>{s?.(x),m(false);};if(!v||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return _a__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{w.current=x,typeof c=="function"?c(x):c&&(c.current=x);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:y,onMouseLeave:R,...l,children:i}),document.body)});Tm.displayName="HoverCardContent";var Mm=W__namespace.createContext({size:"md",variant:"default",radius:"md"}),rs=()=>W__namespace.useContext(Mm);classVarianceAuthority.cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var cw=classVarianceAuthority.cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),dw=classVarianceAuthority.cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),uw=classVarianceAuthority.cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),Nm=W__namespace.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsxRuntime.jsx(Mm.Provider,{value:{size:e,variant:t,radius:n},children:jsxRuntime.jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Nm.displayName="Breadcrumb";var km=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=rs();return jsxRuntime.jsx("ol",{ref:n,className:u(cw({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});km.displayName="BreadcrumbList";var Pm=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r}=rs();return jsxRuntime.jsx("li",{ref:n,className:u("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});Pm.displayName="BreadcrumbItem";var Em=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Em.displayName="BreadcrumbLink";var Lm=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));Lm.displayName="BreadcrumbPage";var Sm=({children:e,className:t,...n})=>{let{size:r}=rs();return jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:u(dw({size:r}),"text-muted-foreground/60",t),...n,children:e??jsxRuntime.jsx(lucideReact.ChevronRight,{})})};Sm.displayName="BreadcrumbSeparator";var Dm=({className:e,...t})=>{let{size:n}=rs();return jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:u(uw({size:n}),e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]})};Dm.displayName="BreadcrumbEllipsis";var Vm=W__namespace.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsxRuntime.jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsxRuntime.jsx("div",{className:"absolute inset-0",children:r})}));Vm.displayName="AspectRatio";var Om=W__namespace.createContext(null),Zi=()=>{let e=W__namespace.useContext(Om);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},Bm=W__namespace.createContext(null),Fm=()=>{let e=W__namespace.useContext(Bm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},Km=W__namespace.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(Om.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxRuntime.jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsxRuntime.jsx(Qi,{})]})})});Km.displayName="NavigationMenu";var Gm=W__namespace.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Zi();return jsxRuntime.jsx("ul",{ref:n,className:u("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});Gm.displayName="NavigationMenuList";var $m=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Zi(),s=W__namespace.useId(),i=W__namespace.useRef(null),l=o===s,c=W__namespace.useCallback(d=>{a(d?s:null);},[s,a]);return jsxRuntime.jsx(Bm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsxRuntime.jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});$m.displayName="NavigationMenuItem";var Um=classVarianceAuthority.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),Wm=W__namespace.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=Fm(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return jsxRuntime.jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(Um(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});Wm.displayName="NavigationMenuTrigger";var jm=W__namespace.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=Fm(),l=W__namespace.useRef(null),[c,d]=W__namespace.useState({top:0,left:0});W__namespace.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...r}),document.body):null});jm.displayName="NavigationMenuContent";var Ym=classVarianceAuthority.cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),_m=W__namespace.forwardRef(({className:e,active:t,...n},r)=>jsxRuntime.jsx("a",{ref:r,className:u(Ym(),t&&"bg-accent text-accent-foreground",e),...n}));_m.displayName="NavigationMenuLink";var Qi=W__namespace.forwardRef((e,t)=>null);Qi.displayName="NavigationMenuViewport";var Xm=W__namespace.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Zi();return r?jsxRuntime.jsx("div",{ref:n,className:u("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsxRuntime.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});Xm.displayName="NavigationMenuIndicator";var Jm=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Tt=W__namespace.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsxRuntime.jsx("button",{ref:r,type:"button",className:u(Jm({size:t}),e),"aria-label":"Close",...n,children:jsxRuntime.jsx(lucideReact.X,{style:{width:a,height:a}})})});Tt.displayName="CloseButton";var os=W__namespace.createContext(null);function ww(){let e=W__namespace.useContext(os);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Qn(){return W__namespace.useContext(os)}var Cw="16rem",Tw="18rem",Mw="3rem",Nw="b",kw={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},Pw={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Ji=W__namespace.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:n,placement:r="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",v=h==="overlay",[b,w]=W__namespace.useState(false),[y,R]=W__namespace.useState(false),[C,x]=W__namespace.useState(e),N=t??C,T=W__namespace.useCallback(E=>{let D=typeof E=="function"?E(N):E;n?n(D):x(D);},[n,N]);W__namespace.useEffect(()=>{let E=()=>{w(window.innerWidth<768);};return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);let k=W__namespace.useCallback(()=>v?T(E=>!E):b?R(E=>!E):T(E=>!E),[b,T,R,v]);W__namespace.useEffect(()=>{if(v)return;let E=D=>{D.key===Nw&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),k());};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[k,v]);let M=N?"expanded":"collapsed",P=W__namespace.useMemo(()=>({placement:r,state:M,open:N,setOpen:T,isMobile:b,openMobile:y,setOpenMobile:R,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,M,N,T,b,y,R,k,l,h,o,a,s,i]);return v?jsxRuntime.jsx(os.Provider,{value:P,children:jsxRuntime.jsx(vaul.Drawer.Root,{open:N,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsxRuntime.jsx(os.Provider,{value:P,children:jsxRuntime.jsx(Yn,{delayDuration:0,children:jsxRuntime.jsx("div",{ref:g,style:{"--drawer-width":Cw,"--drawer-width-icon":Mw,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Ji.displayName="Drawer";var tp=W__namespace.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=Qn();if(!s)return jsxRuntime.jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r});if(l==="none")return jsxRuntime.jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",n),...o,children:r});if(c&&!t)return jsxRuntime.jsx(Ew,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",v=l==="icon";return jsxRuntime.jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsxRuntime.jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":v&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",n),...o,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:r})})})}return jsxRuntime.jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsxRuntime.jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsxRuntime.jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",n),...o,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:r})})]})});tp.displayName="DrawerSidebar";var Ew=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=W__namespace.useState(false);return W__namespace.useEffect(()=>{a(true);},[]),W__namespace.useEffect(()=>{if(t)return ut(),()=>mt()},[t]),!o||!t?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),jsxRuntime.jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",r==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",r==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":Tw},children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},np=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Qn();if(o?.mode==="overlay")return jsxRuntime.jsx(vaul.Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return jsxRuntime.jsxs("button",{ref:r,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...n,children:[jsxRuntime.jsx(lucideReact.PanelLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});np.displayName="DrawerTrigger";var rp=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let o=Qn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque",c=o?.hideCloseButton||false;if(a){let d=s==="top"||s==="bottom",m=s==="left"||s==="right",f=m?kw[i]:Pw[i],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},g={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:u("fixed inset-0 z-50",p[l])}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",g[s],e),style:{...m?{width:f,height:"100%"}:{},...d?{maxHeight:f}:{},...n.style},...n,children:[m&&!c&&jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx(Tt,{className:"absolute right-4 top-4 z-10"})}),d&&jsxRuntime.jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsxRuntime.jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});rp.displayName="DrawerContent";var op=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"header",className:u("flex flex-col gap-2 p-4",e),...t}));op.displayName="DrawerHeader";var ap=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));ap.displayName="DrawerBody";var sp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));sp.displayName="DrawerFooter";var ip=W__namespace.forwardRef(({className:e,...t},n)=>Qn()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsxRuntime.jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));ip.displayName="DrawerTitle";var lp=W__namespace.forwardRef(({className:e,...t},n)=>Qn()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsxRuntime.jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));lp.displayName="DrawerDescription";var cp=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Qn();return o?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Close,{ref:r,className:e,onClick:t,...n}):jsxRuntime.jsx(Tt,{ref:r,className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...n})});cp.displayName="DrawerClose";var dp=W__namespace.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=Qn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?lucideReact.PanelLeftOpen:lucideReact.PanelRightOpen,f=d?lucideReact.PanelLeftClose:lucideReact.PanelRightClose;return jsxRuntime.jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...r,children:[c?jsxRuntime.jsx(m,{className:"h-4 w-4 shrink-0"}):jsxRuntime.jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsxRuntime.jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});dp.displayName="DrawerToggle";var up=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));up.displayName="DrawerSeparator";var mp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));mp.displayName="DrawerMenu";var pp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));pp.displayName="DrawerMenuItem";var fp=classVarianceAuthority.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),gp=W__namespace.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=Qn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsxRuntime.jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(fp({variant:t,size:n}),o),...s,children:a});return r?jsxRuntime.jsxs(_n,{children:[jsxRuntime.jsx(Xn,{children:m}),jsxRuntime.jsx(qn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});gp.displayName="DrawerMenuButton";var bp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));bp.displayName="DrawerGroup";var vp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));vp.displayName="DrawerGroupLabel";var hp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("main",{ref:n,className:u("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));hp.displayName="DrawerInset";var Lw=Ji;var yp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));yp.displayName="Table";var Rp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Rp.displayName="TableHeader";var wp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));wp.displayName="TableBody";var Cp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Cp.displayName="TableFooter";var Tp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Tp.displayName="TableRow";var Mp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("th",{ref:n,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Mp.displayName="TableHead";var Np=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Np.displayName="TableCell";var kp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));kp.displayName="TableCaption";function Aw({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(R,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:v=false,hoverable:b=true,...w},y){let[R,C]=W__namespace.useState(new Set),[x,N]=W__namespace.useState({columnId:null,direction:null}),[T,k]=W__namespace.useState({pageIndex:0,pageSize:m[0]||10}),M=o??R,P=l??x,E=f??T,D=G=>{a?a(G):C(G);},H=G=>{c?c(G):N(G);},L=G=>{p?p(G):k(G);},S=W__namespace.useMemo(()=>{if(!P.columnId||!P.direction)return t;let G=n.find(O=>O.id===P.columnId);return G?[...t].sort((O,j)=>{let A=G.accessor(O),Y=G.accessor(j);if(A===Y)return 0;if(A==null)return 1;if(Y==null)return -1;let ie=String(A).localeCompare(String(Y),void 0,{numeric:true});return P.direction==="asc"?ie:-ie}):t},[t,P,n]),V=W__namespace.useMemo(()=>{if(!d)return S;let G=E.pageIndex*E.pageSize;return S.slice(G,G+E.pageSize)},[S,d,E]),z=Math.ceil(S.length/E.pageSize),F=G=>{if(G===true){let O=new Set(V.map((j,A)=>s(j,A)));D(O);}else D(new Set);},I=(G,O)=>{let j=new Set(M);O?j.add(G):j.delete(G),D(j);},K=V.length>0&&V.every((G,O)=>M.has(s(G,O))),B=V.some((G,O)=>M.has(s(G,O))),q=G=>{if(!n.find(A=>A.id===G)?.sortable&&!i)return;let j="asc";P.columnId===G&&(P.direction==="asc"?j="desc":P.direction==="desc"&&(j=null)),H({columnId:j?G:null,direction:j});},ne=G=>P.columnId!==G?jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):P.direction==="asc"?jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"});return jsxRuntime.jsxs("div",{ref:y,className:u("w-full",e),...w,children:[jsxRuntime.jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxRuntime.jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsxRuntime.jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxRuntime.jsxs("tr",{children:[r&&jsxRuntime.jsx("th",{className:"h-12 w-12 px-4",children:jsxRuntime.jsx($o,{checked:K?true:B?"indeterminate":false,onCheckedChange:F,"aria-label":"Select all"})}),n.map(G=>{let O=G.sortable??i;return jsxRuntime.jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:G.width},onClick:()=>O&&q(G.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[G.header,O&&ne(G.id)]})},G.id)})]})}),jsxRuntime.jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):V.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):V.map((G,O)=>{let j=s(G,O),A=M.has(j);return jsxRuntime.jsxs("tr",{className:u("border-b transition-colors",b&&"hover:bg-muted/50",v&&O%2===1&&"bg-muted/30",A&&"bg-muted"),"data-state":A?"selected":void 0,children:[r&&jsxRuntime.jsx("td",{className:"w-12 px-4",children:jsxRuntime.jsx($o,{checked:A,onCheckedChange:Y=>I(j,!!Y),"aria-label":`Select row ${O+1}`})}),n.map(Y=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:Y.cell?Y.cell(G,O):Y.accessor(G)},Y.id))]},j)})})]})}),d&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"Rows per page:"}),jsxRuntime.jsx("select",{value:E.pageSize,onChange:G=>L({pageIndex:0,pageSize:Number(G.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(G=>jsxRuntime.jsx("option",{value:G,children:G},G))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",E.pageIndex+1," of ",z||1]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx(oe,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex-1}),disabled:E.pageIndex===0,"aria-label":"Previous page",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(oe,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex+1}),disabled:E.pageIndex>=z-1,"aria-label":"Next page",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var zw=W__namespace.forwardRef(Aw);var el=["January","February","March","April","May","June","July","August","September","October","November","December"];function Uw({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=dateFns.getMonth(e),a=dateFns.getYear(e),s=c=>{let d=dateFns.setMonth(e,c);t(d);},i=c=>{let d=dateFns.setYear(e,c);t(d);},l=W__namespace.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{children:jsxRuntime.jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-2 py-1.5 rounded-md","text-sm font-medium w-[100px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsxRuntime.jsx("span",{className:"truncate",children:el[o]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),jsxRuntime.jsx(wn,{className:"min-w-[140px] p-0",children:jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:el.map((c,d)=>jsxRuntime.jsx(Wt,{onSelect:()=>s(d),className:u(o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{children:jsxRuntime.jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-2 py-1.5 rounded-md","text-sm font-medium w-[72px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsxRuntime.jsx("span",{children:a}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),jsxRuntime.jsx(wn,{className:"min-w-[100px] p-0",children:jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:l.map(c=>jsxRuntime.jsx(Wt,{onSelect:()=>i(c),className:u(a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function Ww(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=reactDayPicker.useDayPicker();if(e)return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsxRuntime.jsx(Uw,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-7 w-7 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-7 w-7 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]});let l=el[o.date.getMonth()],c=o.date.getFullYear();return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsxRuntime.jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}}function so({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=W__namespace.useMemo(()=>Ww(r,o,a),[r,o,a]);return jsxRuntime.jsx(reactDayPicker.DayPicker,{showOutsideDays:n,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}so.displayName="Calendar";var Sp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});Sp.displayName="Pagination";var Dp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));Dp.displayName="PaginationContent";var Hp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,className:u("",e),...t}));Hp.displayName="PaginationItem";var as=({className:e,isActive:t,size:n="icon",...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:u(hn({variant:t?"solid":"light",size:n}),e),...r});as.displayName="PaginationLink";var Ip=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:"Previous"})]});Ip.displayName="PaginationPrevious";var Vp=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})]});Vp.displayName="PaginationNext";var Ap=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});Ap.displayName="PaginationEllipsis";var ol=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ol.displayName=cmdk.Command.displayName;var qw=({children:e,...t})=>jsxRuntime.jsx(Aa,{...t,children:jsxRuntime.jsx(za,{className:"overflow-hidden p-0 shadow-lg",children:jsxRuntime.jsx(ol,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),zp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:n,className:u("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));zp.displayName=cmdk.Command.Input.displayName;var Op=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.List,{ref:n,className:u("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Op.displayName=cmdk.Command.List.displayName;var Bp=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Bp.displayName=cmdk.Command.Empty.displayName;var Fp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Group,{ref:n,className:u("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Fp.displayName=cmdk.Command.Group.displayName;var Kp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Kp.displayName=cmdk.Command.Separator.displayName;var Gp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Item,{ref:n,className:u("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Gp.displayName=cmdk.Command.Item.displayName;var $p=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});$p.displayName="CommandShortcut";var Up=W__namespace.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,...s},i)=>{let[l,c]=W__namespace.useState(false),[d,m]=W__namespace.useState(false);return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{type:l?"text":"password",className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:n,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{m(true),r?.(f);},onBlur:f=>{m(false),o?.(f);},...s}),t&&jsxRuntime.jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:n,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4"})})]})});Up.displayName="PasswordInput";var Wp=W__namespace.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[m,f]=W__namespace.useState(s),[p,g]=W__namespace.useState(false),h=a!==void 0,v=h?a:m,b=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},w=()=>{b((v??0)+n);},y=()=>{b((v??0)-n);},R=T=>{let k=T.target.value;if(k==="")b(void 0);else {let M=parseFloat(k);isNaN(M)||b(M);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),w()):T.key==="ArrowDown"&&(T.preventDefault(),y());},x=r===void 0||(v??0)>r,N=o===void 0||(v??0)<o;return t?jsxRuntime.jsxs("div",{className:u("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:y,disabled:l||!x,tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}),jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:v??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!N,tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}):jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:v??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Wp.displayName="NumberInput";var Yp=W__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date",dateFormat:o="PPP",disabled:a=false,minDate:s,maxDate:i,className:l},c)=>{let[d,m]=W__namespace.useState(false),[f,p]=W__namespace.useState(t),g=e!==void 0,h=g?e:f,v=b=>{g||p(b),n?.(b),m(false);};return jsxRuntime.jsxs(rt,{open:d,onOpenChange:m,children:[jsxRuntime.jsxs(Dt,{ref:c,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!h&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",l),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),h?dateFns.format(h,o):r]}),jsxRuntime.jsx(ot,{className:"w-auto p-0",align:"start",children:jsxRuntime.jsx(so,{mode:"single",selected:h,onSelect:v,disabled:b=>!!(s&&b<s||i&&b>i),initialFocus:true})})]})});Yp.displayName="DatePicker";var Zp=classVarianceAuthority.cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),_p=classVarianceAuthority.cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{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"}}),Qp=W__namespace.forwardRef(({className:e,items:t,max:n=5,size:r,showTooltips:o=false,...a},s)=>{let i=t.slice(0,n),l=t.length-n,c=(m,f)=>{let p=jsxRuntime.jsxs(Mr,{className:u(_p({size:r})),children:[m.src&&jsxRuntime.jsx(no,{src:m.src,alt:m.alt||""}),jsxRuntime.jsx(Nr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxRuntime.jsxs(_n,{children:[jsxRuntime.jsx(Xn,{children:p}),jsxRuntime.jsx(qn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxRuntime.jsxs("div",{ref:s,className:u(Zp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsxRuntime.jsx(Mr,{className:u(_p({size:r})),children:jsxRuntime.jsxs(Nr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsxRuntime.jsx(Yn,{delayDuration:300,children:d}):d});Qp.displayName="AvatarGroup";var Jp=classVarianceAuthority.cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),ef=W__namespace.forwardRef(({className:e,value:t,defaultValue:n=0,onValueChange:r,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=W__namespace.useState(n),[v,b]=W__namespace.useState(null),w=t!==void 0,y=w?t:g,R=v!==null?v:y,C=D=>{l||c||(w||h(D),r?.(D));},x=(D,H=false)=>{let L=i&&H?D+.5:D+1;C(L);},N=(D,H)=>{if(l||c)return;let L=D.currentTarget.getBoundingClientRect(),S=i&&D.clientX<L.left+L.width/2;b(S?H+.5:H+1);},T=()=>{b(null);},k=s==="heart"?lucideReact.Heart:lucideReact.Star,M=D=>R>=D+1?"full":R>=D+.5?"half":"empty",P=d?{color:d,fill:d}:{},E=m?{color:m}:{};return jsxRuntime.jsx("div",{ref:p,className:u(Jp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(D,H)=>{let L=M(H);return jsxRuntime.jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:S=>{let V=S.currentTarget.getBoundingClientRect(),z=i&&S.clientX<V.left+V.width/2;x(H,z);},onMouseMove:S=>N(S,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":y===H+1,children:[jsxRuntime.jsx(k,{className:u("text-muted-foreground/30",L!=="empty"&&"absolute inset-0"),style:L==="empty"?E:void 0}),L!=="empty"&&jsxRuntime.jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",L==="half"&&"clip-path-half"),style:{...P,clipPath:L==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});ef.displayName="Rating";var nf=classVarianceAuthority.cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),uC={sm:"sm",md:"sm",lg:"sm"},rf=W__namespace.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,v=b=>{b.stopPropagation(),c?.();};return jsxRuntime.jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f?.(b));}:void 0,className:u(nf({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsxRuntime.jsx("span",{className:"shrink-0",children:s}),jsxRuntime.jsx("span",{className:"truncate",children:m}),i&&jsxRuntime.jsx("span",{className:"shrink-0",children:i}),l&&jsxRuntime.jsx(Tt,{size:uC[r??"md"],onClick:v,disabled:d,className:"ml-0.5 h-4 w-4"})]})});rf.displayName="Chip";var of=W.createContext({direction:"horizontal"}),xC=({className:e,direction:t="horizontal",children:n,...r})=>jsxRuntime.jsx(of.Provider,{value:{direction:t},children:jsxRuntime.jsx(reactResizablePanels.Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),yC=reactResizablePanels.Panel,RC=({withHandle:e,className:t,...n})=>{let{direction:r}=W.useContext(of),o=r==="vertical";return jsxRuntime.jsx(reactResizablePanels.Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...n,children:e&&jsxRuntime.jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})})})};var cf=classVarianceAuthority.cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),CC={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},af={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},df=W__namespace.forwardRef(({className:e,size:t="md",color:n="default",value:r,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,r/o*100)),m=CC[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxRuntime.jsxs("div",{ref:c,className:u(cf({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxRuntime.jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsxRuntime.jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsxRuntime.jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:af[n]||af.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsxRuntime.jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});df.displayName="CircularProgress";var uf=W__namespace.createContext(null),NC=()=>{let e=W__namespace.useContext(uf);if(!e)throw new Error("OTP components must be used within InputOTP");return e},mf=classVarianceAuthority.cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),pf=W__namespace.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...m},f)=>{let[p,g]=W__namespace.useState(o),[h,v]=W__namespace.useState(0),[b,w]=W__namespace.useState(false),y=W__namespace.useRef(null),R=r!==void 0?r:p;W__namespace.useImperativeHandle(f,()=>y.current),W__namespace.useEffect(()=>{v(Math.min(R.length,n-1));},[R,n]),W__namespace.useEffect(()=>{R.length===n&&s&&s(R);},[R,n,s]);let C=P=>{let E=P.target.value;if(i&&E){let D=new RegExp(i.replace("^","").replace("$","").replace("+",""));E=E.split("").filter(H=>D.test(H)).join("");}E=E.slice(0,n),r===void 0&&g(E),a?.(E);},x=P=>{P.key==="ArrowLeft"?v(E=>Math.max(0,E-1)):P.key==="ArrowRight"&&v(E=>Math.min(R.length,n-1,E+1));},N=()=>{y.current?.focus();},T=()=>{w(true),v(Math.min(R.length,n-1));},k=()=>{w(false);},M={value:R,activeIndex:b?h:-1,maxLength:n,disabled:l};return jsxRuntime.jsx(uf.Provider,{value:M,children:jsxRuntime.jsxs("div",{className:u(mf({size:c}),t),onClick:N,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:y,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:R,onChange:C,onKeyDown:x,onFocus:T,onBlur:k,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...m}),d]})})});pf.displayName="InputOTP";var ff=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex items-center",e),...t}));ff.displayName="InputOTPGroup";var gf=W__namespace.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=NC(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxRuntime.jsxs("div",{ref:r,"data-otp-slot":true,"data-active":l,"data-filled":!!i,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[i,c&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});gf.displayName="InputOTPSlot";var bf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}));bf.displayName="InputOTPSeparator";var xf=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),yf=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[v,b]=W__namespace.useState(""),w=W__namespace.useRef(null);W__namespace.useImperativeHandle(h,()=>w.current);let y=M=>{let P=M.trim();if(P.length<i||P.length>l||s&&r.length>=s||!d&&r.some(D=>D.text.toLowerCase()===P.toLowerCase()))return;let E={id:crypto.randomUUID(),text:P};o?.([...r,E]),b("");},R=M=>{m||f||o?.(r.filter(P=>P.id!==M));},C=M=>{if(c.includes(M.key)){if(M.key==="Tab"&&!v)return;M.preventDefault(),y(v);}M.key==="Backspace"&&!v&&r.length>0&&R(r[r.length-1].id);},x=M=>{let P=M.target.value;if(P.includes(",")){P.split(",").forEach(D=>{D.trim()&&y(D);});return}b(P);},N=M=>{M.preventDefault(),M.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(D=>{y(D);});},T=()=>{w.current?.focus();},k=s?r.length>=s:false;return jsxRuntime.jsxs("div",{className:u("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",m&&"cursor-not-allowed opacity-50",e),onClick:T,children:[r.map(M=>p?p(M,()=>R(M.id)):jsxRuntime.jsxs("span",{className:u(xf({variant:t,size:n})),children:[M.text,!m&&!f&&jsxRuntime.jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),R(M.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${M.text}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},M.id)),!k&&!f&&jsxRuntime.jsx("input",{ref:w,type:"text",value:v,onChange:x,onKeyDown:C,onPaste:N,placeholder:r.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});yf.displayName="TagInput";var wf=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),Cf=W__namespace.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxRuntime.jsxs("div",{ref:l,className:u(wf({size:t,className:e})),...i,children:[n&&jsxRuntime.jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsxRuntime.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsxRuntime.jsx("div",{className:"mt-2",children:a}),s]}));Cf.displayName="EmptyState";var Mf=classVarianceAuthority.cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),Nf=W__namespace.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?lucideReact.TrendingUp:s==="down"?lucideReact.TrendingDown:lucideReact.Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxRuntime.jsxs("div",{ref:d,className:u(Mf({variant:t,radius:n,className:e})),...c,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsxRuntime.jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxRuntime.jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsxRuntime.jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsxRuntime.jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});Nf.displayName="StatCard";var cl=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),zC=({checked:e,disabled:t,onClick:n})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:r=>{r.stopPropagation(),t||n(r);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})});function OC({className:e,variant:t,size:n,items:r,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:v=[],onCheck:b,children:w,...y},R){let[C,x]=W__namespace.useState(null),[N,T]=W__namespace.useState(null),[k,M]=W__namespace.useState(new Set(f)),P=m!==void 0,E=P?new Set(m):k,[D,H]=W__namespace.useState(new Set(v)),L=h!==void 0,S=L?new Set(h):D,V=(O,j)=>{x(j),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(j));},z=(O,j)=>{O.preventDefault(),!(C===null||C===j)&&T(j);},F=()=>{T(null);},I=(O,j)=>{if(O.preventDefault(),!r||C===null||C===j){x(null),T(null);return}let A=[...r],[Y]=A.splice(C,1);A.splice(j,0,Y),s?.(A),x(null),T(null);},K=()=>{x(null),T(null);},B=W__namespace.useCallback((O,j)=>{if(!r)return;let A=new Set(E),Y=!A.has(O.id);d?Y?A.add(O.id):A.delete(O.id):(A.clear(),Y&&A.add(O.id)),P||M(A);let ie=r.filter(Te=>A.has(Te.id));p?.(Array.from(A),{selected:Y,selectedItems:ie,item:O,event:j});},[r,E,d,P,p]),q=W__namespace.useCallback((O,j)=>{if(!r)return;let A=new Set(S),Y=!A.has(O.id);Y?A.add(O.id):A.delete(O.id),L||H(A);let ie=r.filter(Te=>A.has(Te.id));b?.(Array.from(A),{checked:Y,checkedItems:ie,item:O,event:j});},[r,S,L,b]);return (a||c||g)&&r&&o?jsxRuntime.jsx("div",{ref:R,role:"list",className:u(cl({variant:t,size:n,className:e})),...y,children:r.map((O,j)=>{let A=E.has(O.id),Y=S.has(O.id);return jsxRuntime.jsxs("div",{role:"listitem","aria-selected":c?A:void 0,draggable:a,onDragStart:a?U=>V(U,j):void 0,onDragOver:a?U=>z(U,j):void 0,onDragLeave:a?F:void 0,onDrop:a?U=>I(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>B(O,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",N===j&&"border-primary border-dashed border rounded-md",A&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),g&&jsxRuntime.jsx(zC,{checked:Y,onClick:U=>q(O,U)}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o(O,j)})]},O.id)})}):jsxRuntime.jsx("div",{ref:R,role:"list",className:u(cl({variant:t,size:n,className:e})),...y,children:w})}var BC=W__namespace.forwardRef(OC),Pf=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),Ef=W__namespace.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:u(Pf({interactive:t,className:e})),...a,children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));Ef.displayName="ListItem";var Lf=W__namespace.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxRuntime.jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsxRuntime.jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));Lf.displayName="ListItemText";var Hf=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),If=W__namespace.forwardRef(({className:e,position:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,"data-position":t,className:u(Hf({position:t,className:e})),...n}));If.displayName="Timeline";var Vf=classVarianceAuthority.cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Af=W__namespace.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxRuntime.jsxs("div",{ref:i,className:u(Vf({variant:t,className:e})),...s,children:[!n&&jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:o}),!r&&jsxRuntime.jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));Af.displayName="TimelineItem";var zf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));zf.displayName="TimelineContent";var Of=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Of.displayName="TimelineOpposite";var Ff=classVarianceAuthority.cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),Kf=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),Gf=W__namespace.createContext({}),$f=W__namespace.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=W__namespace.useState(a),f=o!==void 0?o:d,p=W__namespace.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsxRuntime.jsx(Gf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsxRuntime.jsx("div",{ref:c,role:"group",className:u(Ff({size:t,fullWidth:n,className:e})),...l,children:r})})});$f.displayName="SegmentedControl";var Uf=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=W__namespace.useContext(Gf),i=s.value===n,l=r||s.disabled;return jsxRuntime.jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(n);},className:u(Kf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Uf.displayName="SegmentedControlItem";var Wf=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),jf=e=>{let t=e.type;return t.startsWith("image/")?lucideReact.Image:t.startsWith("video/")?lucideReact.FileVideo:t.startsWith("audio/")?lucideReact.FileAudio:t.includes("pdf")||t.includes("document")?lucideReact.FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?lucideReact.FileArchive:lucideReact.File},us=e=>{if(e===0)return "0 Bytes";let t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Yf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${us(t)}`}),n&&n.length>0&&(n.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${n.join(", ")}`})),r},_f=W__namespace.forwardRef(({className:e,variant:t,size:n,onFilesChange:r,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,v]=W__namespace.useState(false),[b,w]=W__namespace.useState(false),[y,R]=W__namespace.useState([]),C=W__namespace.useRef(null),x=W__namespace.useCallback(S=>{if(!S||S.length===0)return;let V=Array.from(S),z=[],F=[];(m?V:[V[0]]).forEach(K=>{let B=Yf(K,c,d);B.length>0?F.push({file:K,errors:B}):z.push(K);}),R(F),z.length>0&&r?.(z),F.length>0&&o?.(F);},[c,d,m,r,o]),N=W__namespace.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!f&&(v(true),S.dataTransfer.items)){let z=Array.from(S.dataTransfer.items).some(F=>{if(F.kind!=="file")return true;if(d&&d.length>0){let I=F.type;return !d.some(K=>K.endsWith("/*")?I.startsWith(K.slice(0,-2)):I===K)}return false});w(z);}},[f,d]),T=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!f&&(S.dataTransfer.dropEffect="copy");},[f]),k=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation();let V=S.currentTarget.getBoundingClientRect(),z=S.clientX,F=S.clientY;(z<V.left||z>V.right||F<V.top||F>V.bottom)&&(v(false),w(false));},[]),M=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation(),v(false),w(false),!f&&x(S.dataTransfer.files);},[f,x]),P=W__namespace.useCallback(()=>{f||C.current?.click();},[f]),E=W__namespace.useCallback(S=>{x(S.target.files),S.target.value="";},[x]),D=W__namespace.useCallback(S=>{f||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C.current?.click());},[f]),H=b?"error":h?"active":t,L=d?.join(",");return jsxRuntime.jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxRuntime.jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:N,onDragOver:T,onDragLeave:k,onDrop:M,onClick:P,onKeyDown:D,className:u(Wf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsxRuntime.jsx("input",{ref:C,type:"file",accept:L,multiple:m,disabled:f,onChange:E,className:"sr-only",tabIndex:-1}),l||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsxRuntime.jsx("div",{className:"rounded-full bg-muted p-3",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${us(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),y.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:y.map(({file:S,errors:V})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"font-medium",children:S.name}),":"," ",V.map(z=>z.message).join(", ")]},S.name))}),i&&s.length>0&&jsxRuntime.jsx("div",{className:"space-y-2",children:s.map(S=>{let V=jf(S.file);return jsxRuntime.jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",S.error&&"border-danger bg-danger/5"),children:[jsxRuntime.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsxRuntime.jsx(V,{className:"h-5 w-5 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"truncate text-sm font-medium",children:S.file.name}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[us(S.file.size),S.error&&jsxRuntime.jsx("span",{className:"ml-2 text-danger",children:S.error})]}),S.progress!==void 0&&S.progress<100&&jsxRuntime.jsx(ts,{value:S.progress,className:"mt-2 h-1"})]}),jsxRuntime.jsxs(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:z=>{z.stopPropagation(),a?.(S.file);},children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Remove"})]})]},S.id)})})]})});_f.displayName="FileUpload";var XC=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,qf=classVarianceAuthority.cva("relative rounded-md border border-input shadow-sm transition-all 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:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),na=W__namespace.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,...d},m)=>jsxRuntime.jsx("button",{ref:m,type:"button",disabled:c,onClick:g=>{l?.(g),r?.(e);},className:u(qf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-ring ring-offset-2",i),style:{backgroundImage:n?XC:void 0,backgroundSize:n?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...d,children:jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));na.displayName="ColorSwatch";var Zf=classVarianceAuthority.cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Qf=W__namespace.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,className:c,style:d,...m},f)=>{let[p,g]=W__namespace.useState(t),h=e??p,v=W__namespace.useCallback(w=>{l||(e===void 0&&g(w),n?.(w));},[e,n,l]),b=w=>w.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:u(Zf({layout:r}),c),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...d},...m,children:a.map(w=>{let y=h?b(h)===b(w):false;return jsxRuntime.jsx(na,{role:"option",color:w,size:s,shape:i,isSelected:y,onSelect:v,disabled:l,"aria-selected":y},w)})})});Qf.displayName="ColorSwatchPicker";var QC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Jf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},eg=W__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=QC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=W__namespace.useState(e??t),f=W__namespace.useId();W__namespace.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=v=>{m(v),n?.(v);},g=v=>{m(v),n?.(v);},h=v=>{let b=v.target.value.toUpperCase();m(b),n?.(b);};return l==="simple"?jsxRuntime.jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",r&&"opacity-50 cursor-not-allowed",Jf[s],i),children:[jsxRuntime.jsx("input",{type:"color",value:d,onChange:h,disabled:r,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxRuntime.jsxs(rt,{children:[jsxRuntime.jsx(Dt,{ref:c,disabled:r,className:u("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",Jf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsxRuntime.jsx(ot,{className:"w-auto p-3",align:"start",children:jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Tr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsxRuntime.jsx(reactColorful.HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Tr,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(v=>jsxRuntime.jsx(na,{color:v,size:"sm",isSelected:d.toLowerCase()===v.toLowerCase(),onSelect:g},v))})]})]})})]})});eg.displayName="ColorPicker";var tg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground 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 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),ml=e=>String(e).padStart(2,"0"),rT=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},oT=(e,t)=>`${ml(e)}:${ml(t)}`,ng=W__namespace.forwardRef(({className:e,size:t,value:n,onChange:r,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=W__namespace.useState(n??""),[g,h]=W__namespace.useState(false);W__namespace.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:v,minutes:b}=rT(f||"00:00"),w=k=>{let M=k.target.value;p(M),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(M)&&r?.(M);},y=(k,M)=>{let P=Math.max(0,Math.min(23,k)),E=Math.max(0,Math.min(59,M)),D=oT(P,E);p(D),r?.(D);},R=()=>y(v+1,b),C=()=>y(v-1,b),x=()=>y(v,b+a),N=()=>y(v,b-a),T=({value:k,onIncrement:M,onDecrement:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:M,disabled:c,children:jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:ml(k)}),jsxRuntime.jsx(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})})]});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[jsxRuntime.jsx("input",{ref:m,type:"time",value:f,onChange:w,disabled:c,className:u(tg({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxRuntime.jsxs(rt,{open:g,onOpenChange:h,children:[jsxRuntime.jsxs(Dt,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxRuntime.jsxs(ot,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{value:v,onIncrement:R,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(T,{value:b,onIncrement:x,onDecrement:N,max:59})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsxRuntime.jsx(oe,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;y(k.getHours(),k.getMinutes());},children:"Now"}),jsxRuntime.jsx(oe,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});ng.displayName="TimeInput";var rg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),sT=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},pl=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},og=(e,t,n)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(n,"."),r=r.replace(/[^0-9.-]/g,"");let o=parseFloat(r);return isNaN(o)?void 0:o},ag=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",disabled:h,placeholder:v,...b},w)=>{let[y,R]=W__namespace.useState(r),[C,x]=W__namespace.useState(""),[N,T]=W__namespace.useState(false),k=n!==void 0?n:y,M=f??sT(a,s);W__namespace.useEffect(()=>{!N&&k!==void 0&&x(pl(k,i,p,g));},[k,i,p,g,N]);let P=S=>{let V=S.target.value;if(!V){x(""),n===void 0&&R(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;x(V);let F=og(V,p,g);if(F!==void 0){let I=F;l!==void 0&&F<l&&(I=l),c!==void 0&&F>c&&(I=c),n===void 0&&R(I),o?.(I);}},E=()=>{T(true),k!==void 0&&x(k.toString().replace(".",g));},D=()=>{T(false),x(k!==void 0?pl(k,i,p,g):"");},H=d&&m==="prefix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:M}),L=d&&m==="suffix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:M});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[H&&jsxRuntime.jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsxRuntime.jsx("input",{ref:w,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:E,onBlur:D,disabled:h,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(rg({size:t}),H&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:N?"var(--color-foreground)":void 0},...b}),L&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});ag.displayName="CurrencyInput";var sg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fl={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},cT=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},rr=e=>["#","A","*"].includes(e),ps=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];cT(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},gl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},ig=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),dT=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},lg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in fl?fl[a].mask:a,[g,h]=W__namespace.useState(r),[v,b]=W__namespace.useState(""),[w,y]=W__namespace.useState(false),R=W__namespace.useRef(null),C=n!==void 0?n:g;W__namespace.useImperativeHandle(f,()=>R.current),W__namespace.useEffect(()=>{let k=ps(C,p,true);b(k);},[C,p]);let x=k=>{let M=k.target.value,P=k.target.selectionStart??0,E=M.replace(/[^\w]/g,""),D=ps(E,p,true),H=gl(D,p);b(D),n===void 0&&h(l?D:H),o?.(H,D),requestAnimationFrame(()=>{if(R.current){let L=dT(D,p,P);R.current.setSelectionRange(L,L);}});},N=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let M=R.current;if(!M)return;let P=M.selectionStart??0;if(k.key==="Backspace"&&P>0){let E=P-1;for(;E>0&&!rr(p[E]);)E--;let D=gl(v,p),H=0;for(let V=0;V<E&&V<p.length;V++)rr(p[V])&&H++;let L=D.slice(0,Math.max(0,H-1))+D.slice(H),S=ps(L,p,true);b(S),n===void 0&&h(l?S:L),o?.(L,S),k.preventDefault(),requestAnimationFrame(()=>{R.current&&R.current.setSelectionRange(E,E);});}},T=i?ig(p,s):d;return jsxRuntime.jsx("input",{ref:R,type:"text",value:v,onChange:x,onKeyDown:N,onFocus:()=>y(true),onBlur:()=>y(false),disabled:c,placeholder:T,className:u(sg({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...m})});lg.displayName="MaskedInput";var cg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground 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 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),bs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},vl={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},bl=(e,t)=>String(e).padStart(t,"0"),gs=(e,t)=>{let n=bl(e.getDate(),2),r=bl(e.getMonth()+1,2),o=bl(e.getFullYear(),4),a=bs[t],s=vl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},dg=(e,t)=>{let n=bs[t],r=e.split(n);if(r.length!==3)return null;let o=vl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},fT=e=>e.toLowerCase(),gT=e=>{let t=bs[e];return vl[e].map(r=>r==="year"?"####":"##").join(t)},ug=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,format:a="DD/MM/YYYY",minDate:s,maxDate:i,showIcon:l=true,disabled:c,placeholder:d,...m},f)=>{let[p,g]=W__namespace.useState(r??null),[h,v]=W__namespace.useState(""),[b,w]=W__namespace.useState(null),y=W__namespace.useRef(null),R=n!==void 0?n:p;W__namespace.useImperativeHandle(f,()=>y.current),W__namespace.useEffect(()=>{R?(v(gs(R,a)),w(null)):v("");},[R,a]);let C=bs[a],x=gT(a),N=M=>{let P=M.target.value;P=P.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let E=P.replace(new RegExp(`\\${C}`,"g"),""),D="",H=0;for(let L=0;L<x.length&&H<E.length;L++)x[L]==="#"?(D+=E[H],H++):D+=x[L];if(v(D),D.length===x.length){let L=dg(D,a);if(L){if(s&&L<s){w(`Date must be after ${gs(s,a)}`);return}if(i&&L>i){w(`Date must be before ${gs(i,a)}`);return}w(null),n===void 0&&g(L),o?.(L);}else w("Invalid date");}else n===void 0&&g(null),o?.(null),w(null);},T=()=>{h&&h.length!==x.length&&(v(""),w(null),n===void 0&&g(null),o?.(null));},k=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{ref:y,type:"text",inputMode:"numeric",value:h,onChange:N,onBlur:T,disabled:c,placeholder:d??fT(a),className:u(cg({size:t}),l&&"pr-10",b&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!b,"aria-describedby":b?"date-error":void 0,...m}),l&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsxRuntime.jsx(lucideReact.Calendar,{className:u(k,"text-muted-foreground")})}),b&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:b})]})});ug.displayName="DateInput";var pg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fg=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],vs=(e,t)=>{let n=e.replace(/\D/g,""),r="",o=0;for(let a=0;a<t.length&&o<n.length;a++)t[a]==="#"?(r+=n[o],o++):r+=t[a];return r},yT=e=>e.replace(/#/g,"_"),gg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=fg,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,...p},g)=>{let[h,v]=W__namespace.useState(r),[b,w]=W__namespace.useState(a??s),[y,R]=W__namespace.useState(false),[C,x]=W__namespace.useState(false),[N,T]=W__namespace.useState(false),[k,M]=W__namespace.useState({top:0,left:0,width:0}),P=W__namespace.useRef(null),E=W__namespace.useRef(null),D=n!==void 0?n:h,H=a??b,L=l.find(I=>I.code===H)??l[0],S=vs(D,L.format);W__namespace.useEffect(()=>{T(true);},[]),W__namespace.useEffect(()=>{if(C&&P.current){let I=P.current.getBoundingClientRect();M({top:I.bottom+4,left:I.left,width:Math.max(I.width,280)});}},[C]),W__namespace.useEffect(()=>{if(!C)return;let I=K=>{P.current&&!P.current.contains(K.target)&&E.current&&!E.current.contains(K.target)&&x(false);};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[C]),W__namespace.useEffect(()=>{if(!C)return;let I=K=>{K.key==="Escape"&&x(false);};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[C]);let V=I=>{let B=I.target.value.replace(/\D/g,"");n===void 0&&v(B);let q=vs(B,L.format),ne=`${L.dialCode} ${q}`;o?.(B,ne,L);},z=I=>{let K=l.find(ne=>ne.code===I);if(!K)return;a===void 0&&w(I),i?.(K);let B=vs(D,K.format),q=`${K.dialCode} ${B}`;o?.(D,q,K),x(false);};return jsxRuntime.jsxs("div",{className:"flex",children:[c&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{ref:P,type:"button",disabled:m,onClick:()=>x(!C),className:u("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("span",{children:L.flag}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),N&&C&&_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:E,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:k.top,left:k.left,minWidth:k.width},children:jsxRuntime.jsx(ze,{style:{maxHeight:300},children:jsxRuntime.jsx("div",{className:"p-1",children:l.map(I=>jsxRuntime.jsxs("div",{role:"option","aria-selected":I.code===H,onClick:()=>z(I.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:I.code===H&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:I.flag}),jsxRuntime.jsx("span",{className:"flex-1",children:I.name}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:I.dialCode})]})]},I.code))})})}),document.body)]}),jsxRuntime.jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsxRuntime.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsxRuntime.jsx("input",{ref:g,type:"tel",inputMode:"tel",value:S,onChange:V,onFocus:()=>R(true),onBlur:()=>R(false),disabled:m,placeholder:f??yT(L.format),className:u(pg({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:y?"var(--color-foreground)":void 0},...p})]})]})});gg.displayName="PhoneInput";var vg=classVarianceAuthority.cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"bordered",size:"md",sticky:false}}),hg=W__namespace.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=W__namespace.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxRuntime.jsxs("nav",{ref:l,className:u(vg({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o}),jsxRuntime.jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsxRuntime.jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"})})]}),c&&jsxRuntime.jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});hg.displayName="Navbar";var xg=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));xg.displayName="NavbarBrand";var yg=W__namespace.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsxRuntime.jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});yg.displayName="NavbarContent";var Rg=W__namespace.forwardRef(({className:e,isActive:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));Rg.displayName="NavbarItem";var wg=W__namespace.forwardRef(({className:e,isActive:t,...n},r)=>jsxRuntime.jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));wg.displayName="NavbarLink";var Tg=classVarianceAuthority.cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",bordered:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"bordered",size:"md",underline:"hover"}}),Mg=W__namespace.forwardRef(({className:e,variant:t,size:n,underline:r,isExternal:o,showExternalIcon:a=true,isDisabled:s,children:i,...l},c)=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxRuntime.jsxs("a",{ref:c,className:u(Tg({variant:t,size:n,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});Mg.displayName="Link";var Ng=classVarianceAuthority.cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),kg=W__namespace.forwardRef(({className:e,position:t,threshold:n=400,icon:r,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=W__namespace.useState(false);W__namespace.useEffect(()=>{let w=c?.current||window,y=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return w.addEventListener("scroll",y,{passive:true}),y(),()=>{w.removeEventListener("scroll",y);}},[n,c,g,d]);let v=w=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(w);},b=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:u(Ng({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsxRuntime.jsx(oe,{ref:p,type:"button",variant:a,color:s,size:"icon",radius:l,onClick:v,"aria-label":"Back to top",className:u("shadow-lg",i==="sm"&&"h-9 w-9",i==="md"&&"h-10 w-10",i==="lg"&&"h-12 w-12"),...f,children:r||jsxRuntime.jsx(lucideReact.ArrowUp,{className:b})})})});kg.displayName="BackTop";var IT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),VT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),Pg=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ys=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),Eg=W__namespace.createContext(null),ar=()=>{let e=W__namespace.useContext(Eg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},Lg=W__namespace.createContext(null),oa=()=>{let e=W__namespace.useContext(Lg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},xl=W__namespace.createContext(null),Sg=W__namespace.createContext(null),Dg=W__namespace.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(Eg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsxRuntime.jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",IT({radius:n}),e),...r,children:t})})});Dg.displayName="Menubar";var Hg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=W__namespace.useId(),o=W__namespace.useRef(null),a=t===r,s=W__namespace.useCallback(i=>{n(i?r:null);},[r,n]);return jsxRuntime.jsx(Lg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};Hg.displayName="MenubarMenu";var Ig=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Ig.displayName="MenubarGroup";var Vg=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Vg.displayName="MenubarPortal";var Ag=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),s=t!==void 0,i=s?t:o,l=W__namespace.useRef(null),c=W__namespace.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsxRuntime.jsx(xl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ag.displayName="MenubarSub";var zg=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Sg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));zg.displayName="MenubarRadioGroup";var Og=W__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=oa(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsxRuntime.jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",VT({radius:i}),e),onClick:f,onMouseEnter:p,...r})});Og.displayName="MenubarTrigger";var Bg=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=W__namespace.useContext(xl);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxRuntime.jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ys({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Bg.displayName="MenubarSubTrigger";var Fg=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=W__namespace.useContext(xl);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=W__namespace.useState({top:0,left:0}),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null);W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let y=d.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=y.top,x=y.right+t;x+R.width>window.innerWidth&&(x=y.left-R.width-t),f({top:C,left:x});})();},[l,t,d]);let v=w=>{n?.(w),c(true);},b=w=>{r?.(w),c(false);};return !p||!l?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:w=>{h.current=w,typeof a=="function"?a(w):a&&(a.current=w);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",Pg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:v,onMouseLeave:b,...o}),document.body)});Fg.displayName="MenubarSubContent";var Kg=W__namespace.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=oa(),[m,f]=W__namespace.useState({top:0,left:0}),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null);return W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!c||!l.current||!h.current)return;let v=()=>{if(!l.current||!h.current)return;let b=l.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),y=b.bottom+r,R=b.left+n;t==="center"?R=b.left+b.width/2-w.width/2:t==="end"&&(R=b.right-w.width-n),f({top:y,left:R});};return v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,true),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,true);}},[c,t,n,r,l]),W__namespace.useEffect(()=>{if(!c)return;let v=b=>{let w=b.target;h.current&&!h.current.contains(w)&&l.current&&!l.current.contains(w)&&d(false);};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c,d,l]),W__namespace.useEffect(()=>{if(!c)return;let v=b=>{b.key==="Escape"&&d(false);};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[c,d]),!p||!c?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:v=>{h.current=v,typeof s=="function"?s(v):s&&(s.current=v);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",Pg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});Kg.displayName="MenubarContent";var Gg=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=oa(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ys({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Gg.displayName="MenubarItem";var $g=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=oa(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return jsxRuntime.jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ys({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});$g.displayName="MenubarCheckboxItem";var Ug=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=oa(),c=W__namespace.useContext(Sg),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ys({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-2 w-2 fill-current"})}),t]})});Ug.displayName="MenubarRadioItem";var Wg=W__namespace.forwardRef(({className:e,inset:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Wg.displayName="MenubarLabel";var jg=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));jg.displayName="MenubarSeparator";var Yg=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Yg.displayName="MenubarShortcut";var _g=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Xg=W__namespace.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=W__namespace.Children.toArray(o);return jsxRuntime.jsx("div",{ref:s,className:u(_g({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>W__namespace.isValidElement(l)?W__namespace.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<r?"completed":c===r?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:n}):l)})});Xg.displayName="Steps";var qg=classVarianceAuthority.cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),zT=classVarianceAuthority.cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),OT=classVarianceAuthority.cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),Zg=W__namespace.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxRuntime.jsxs("div",{ref:d,className:u(qg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsxRuntime.jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:u(zT({status:s,size:n})),children:s==="completed"?jsxRuntime.jsx(lucideReact.Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxRuntime.jsxs("div",{className:"flex flex-col",children:[r&&jsxRuntime.jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsxRuntime.jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsxRuntime.jsx("div",{className:u(OT({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Zg.displayName="Step";var Jg=classVarianceAuthority.cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),eb=classVarianceAuthority.cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),tb=W__namespace.createContext(null),jT=()=>{let e=W__namespace.useContext(tb);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},YT=({checked:e,indeterminate:t,disabled:n,onClick:r})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:n,onClick:o=>{o.stopPropagation(),n||r(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",n&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:t?jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3"}):jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})}),nb=({node:e,level:t,isLast:n=false,parentIsLastPath:r=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:v,dragOverPosition:b,setDragOver:w,handleDrop:y,allowDrop:R,onDragStart:C,onDragOver:x,onDragEnter:N,onDragLeave:T,onDragEnd:k,showLine:M,showIcon:P,showHandle:E,dragIcon:D,icon:H,leafIcon:L,folderIcon:S,folderOpenIcon:V,blockNode:z,disabled:F,size:I,getAllKeys:K}=jT(),B=e.children&&e.children.length>0,q=e.isLeaf??!B,ne=o.has(e.key),G=s.has(e.key),O=c.has(e.key),j=d.has(e.key),A=g?.key===e.key,Y=v===e.key,ie=!!(F||e.disabled),Te=l&&e.selectable!==false,U=f&&e.checkable!==false,dt=W__namespace.useMemo(()=>ie?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,ie]),ee=W__namespace.useMemo(()=>D!==void 0?D:typeof p=="object"&&p.icon!==void 0?p.icon:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4"}),[D,p]),nt=W__namespace.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:ne,isLeaf:q}):H:q?L:ne?V:S,[e.icon,H,ne,q,L,S,V]),Gn=_=>{if(!dt)return;_.stopPropagation(),_.dataTransfer.effectAllowed="move";let Le=_.currentTarget,ce=Le.cloneNode(true),Ge=document.documentElement.classList.contains("dark"),$e=Ge?"#0a0a0a":"#ffffff",Un=Ge?"#27272a":"#e4e4e7";ce.style.cssText=`
|
|
43
|
+
`;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsxRuntime.jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,className:u("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...a,children:r})]})});ze.displayName="ScrollArea";var ru=classVarianceAuthority.cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ou=W__namespace.forwardRef(({options:e,multiple:t=false,value:n,defaultValue:r,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,radius:p,className:g,...h},v)=>{let[b,w]=W__namespace.useState(false),[y,R]=W__namespace.useState(""),[C,x]=W__namespace.useState(r||""),[N,T]=W__namespace.useState(r||[]),[k,M]=W__namespace.useState({top:0,left:0,width:0}),P=W__namespace.useRef(null),E=W__namespace.useRef(null),D=W__namespace.useRef(null),H=W__namespace.useRef(null),L=n!==void 0?n:C,S=n!==void 0?n:N,V=n!==void 0,z=A=>{d&&L===A?(V||x(""),o?.("")):(V||x(A),o?.(A)),w(false),R("");},F=A=>{let Y=S.includes(A)?S.filter(ie=>ie!==A):[...S,A];V||T(Y),o?.(Y);},I=(A,Y)=>{Y.stopPropagation();let ie=S.filter(Te=>Te!==A);V||T(ie),o?.(ie);},K=A=>{A.stopPropagation(),t?(V||T([]),o?.([])):(V||x(""),o?.(""));},B=e.find(A=>A.value===L),q=e.filter(A=>S.includes(A.value)),ne=q.slice(0,m),G=q.length-m,O=s?e.filter(A=>A.label.toLowerCase().includes(y.toLowerCase())):e;W__namespace.useEffect(()=>{if(b&&E.current){let A=E.current.getBoundingClientRect();M({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}b||R("");},[b,s]),W__namespace.useEffect(()=>{let A=Y=>{let ie=Y.target,Te=P.current&&!P.current.contains(ie),U=D.current&&!D.current.contains(ie);Te&&U&&(w(false),R(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),W__namespace.useEffect(()=>{if(!b)return;let A=Y=>{D.current?.contains(Y.target)||(w(false),R(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[b]);let j=t?S.length>0:!!L;return jsxRuntime.jsxs("div",{ref:P,className:u("relative",g),...h,children:[jsxRuntime.jsxs("div",{ref:A=>{E.current=A,typeof v=="function"?v(A):v&&(v.current=A);},role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&w(!b),className:u(ru({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsxRuntime.jsx("span",{className:u(!B&&"text-muted-foreground"),children:B?B.label:a}),t&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:q.length===0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:a}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ne.map(A=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:Y=>I(A.value,Y),onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&I(A.value,Y);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},A.value)),G>0&&jsxRuntime.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",G," more"]})]})}),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&j&&jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:K,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&K(A);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4 opacity-50"})}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",b&&"rotate-180")})]})]}),b&&!c&&typeof document<"u"&&_a__namespace.createPortal(jsxRuntime.jsxs("div",{ref:D,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:k.top,left:k.left,minWidth:k.width},children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsxRuntime.jsx("input",{ref:H,type:"text",value:y,onChange:A=>R(A.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsxRuntime.jsx(ze,{style:{maxHeight:f},onWheel:A=>A.stopPropagation(),children:jsxRuntime.jsx("div",{className:"p-1",children:O.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(A=>{let Y=t?S.includes(A.value):L===A.value;return jsxRuntime.jsxs("div",{role:"option","aria-selected":Y,onClick:()=>{A.disabled||(t?F(A.value):z(A.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Y&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});ou.displayName="Select";var au=W__namespace.createContext(null),Wo=()=>{let e=W__namespace.useContext(au);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},zi=W__namespace.createContext({radius:"md"}),Oi=W__namespace.createContext(null),yn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),[s,i]=W__namespace.useState(-1),l=t!==void 0,c=l?t:o,d=W__namespace.useRef(null),m=W__namespace.useRef(null),f=W__namespace.useId(),p=W__namespace.useRef(new Map),g=W__namespace.useCallback(b=>{l||a(b),r?.(b),b||i(-1);},[l,r]),h=W__namespace.useCallback((b,w)=>{p.current.set(b,w);},[]),v=W__namespace.useCallback(b=>{p.current.delete(b);},[]);return jsxRuntime.jsx(au.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:v},children:e})};yn.displayName="Dropdown";var Rn=W__namespace.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Wo();return jsxRuntime.jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{n?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});Rn.displayName="DropdownTrigger";var VR={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},wn=W__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:v,contentId:b,activeIndex:w,setActiveIndex:y,items:R}=Wo(),[C,x]=W__namespace.useState({top:0,left:0}),[N,T]=W__namespace.useState(t),[k,M]=W__namespace.useState(false),P=W__namespace.useRef(0);if(W__namespace.useEffect(()=>{M(true);},[]),W__namespace.useEffect(()=>{p&&(P.current=R.current.size);},[p,R]),W__namespace.useEffect(()=>{if(!p||!h.current||!v.current)return;let D=()=>{if(!h.current||!v.current)return;let H=h.current.getBoundingClientRect(),L=v.current.getBoundingClientRect(),S=window.innerWidth,V=window.innerHeight,z=0,F=0,I=t;switch(t){case "top":z=H.top-L.height-n,z<a&&(z=H.bottom+n,I="bottom");break;case "bottom":z=H.bottom+n,z+L.height>V-a&&(z=H.top-L.height-n,I="top");break;case "left":F=H.left-L.width-n,F<a&&(F=H.right+n,I="right");break;case "right":F=H.right+n,F+L.width>S-a&&(F=H.left-L.width-n,I="left");break}if(I==="top"||I==="bottom"){switch(r){case "start":F=H.left+o;break;case "center":F=H.left+H.width/2-L.width/2;break;case "end":F=H.right-L.width-o;break}F<a?F=a:F+L.width>S-a&&(F=S-L.width-a);}else {switch(r){case "start":z=H.top+o;break;case "center":z=H.top+H.height/2-L.height/2;break;case "end":z=H.bottom-L.height-o;break}z<a?z=a:z+L.height>V-a&&(z=V-L.height-a);}x({top:z,left:F}),T(I);};return D(),window.addEventListener("resize",D),window.addEventListener("scroll",D,true),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",D,true);}},[p,t,n,r,o,a,h]),W__namespace.useEffect(()=>{if(!p)return;let D=H=>{let L=H.target;v.current&&!v.current.contains(L)&&h.current&&!h.current.contains(L)&&(s?.(),g(false));};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[p,g,s,h,v]),W__namespace.useEffect(()=>{if(!p)return;let D=H=>{let L=Array.from(R.current.entries()).sort(([V],[z])=>V-z).map(([,V])=>V),S=L.length;if(S!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),w===-1||w>=S-1?y(l?0:Math.min(w+1,S-1)):y(w+1);break;case "ArrowUp":H.preventDefault(),w<=0?y(l?S-1:0):y(w-1);break;case "Home":H.preventDefault(),y(0);break;case "End":H.preventDefault(),y(S-1);break;case "Enter":case " ":H.preventDefault(),w>=0&&w<S&&L[w]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,i,w,y,R,l,h]),W__namespace.useEffect(()=>{p&&w>=0&&Array.from(R.current.entries()).sort(([H],[L])=>H-L).map(([,H])=>H)[w]?.focus();},[p,w,R]),!k||!p)return null;let E={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[N];return _a__namespace.createPortal(jsxRuntime.jsx("div",{ref:D=>{v.current=D,typeof f=="function"?f(D):f&&(f.current=D);},id:b,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":N,className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",VR[c],E,e),style:{top:C.top,left:C.left},...m,children:jsxRuntime.jsx(zi.Provider,{value:{radius:c},children:d})}),document.body)});wn.displayName="DropdownContent";var su=0,iu={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},Wt=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Wo(),{radius:v}=W__namespace.useContext(zi),[b]=W__namespace.useState(()=>su++),w=W__namespace.useRef(null);W__namespace.useEffect(()=>(!n&&w.current&&g(b,w.current),()=>{h(b);}),[n,b,g,h]);let y=x=>{if(n){x.preventDefault();return}o?.(x),r?.(),m(false);},R=x=>{a?.(x),n||p(b);};return jsxRuntime.jsxs("div",{ref:x=>{w.current=x,typeof d=="function"?d(x):d&&(d.current=x);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===b?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",iu[v],t&&"pl-8",!n&&"cursor-pointer",e),onClick:y,onMouseEnter:R,...c,children:[s,l&&jsxRuntime.jsx("span",{className:"flex-1",children:l}),i]})});Wt.displayName="DropdownItem";var Bi=W__namespace.forwardRef(({className:e,inset:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Bi.displayName="DropdownSection";var lu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));lu.displayName="DropdownSeparator";var cu=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});cu.displayName="DropdownShortcut";var du=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));du.displayName="DropdownGroup";var uu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),{contentRef:s}=Wo(),i=t!==void 0,l=i?t:o,c=W__namespace.useRef(null),d=W__namespace.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsxRuntime.jsx(Oi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};uu.displayName="DropdownSub";var mu=W__namespace.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=W__namespace.useContext(Oi),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Wo(),{radius:p}=W__namespace.useContext(zi),[g]=W__namespace.useState(()=>su++),h=W__namespace.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:v,onOpenChange:b,triggerRef:w}=c;W__namespace.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let y=x=>{o?.(x),n||(d(g),b(true));},R=x=>{a?.(x);},C=x=>{s?.(x),(x.key==="ArrowRight"||x.key==="Enter"||x.key===" ")&&(x.preventDefault(),b(true));};return jsxRuntime.jsxs("div",{ref:x=>{h.current=x,w.current=x,typeof l=="function"?l(x):l&&(l.current=x);},role:"menuitem","aria-haspopup":"menu","aria-expanded":v,tabIndex:n?-1:0,"aria-disabled":n,"data-state":v?"open":"closed","data-disabled":n?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",iu[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:y,onMouseLeave:R,onKeyDown:C,...i,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});mu.displayName="DropdownSubTrigger";var pu=W__namespace.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=W__namespace.useContext(Oi);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=W__namespace.useState({top:0,left:0}),[h,v]=W__namespace.useState(false),b=W__namespace.useRef(null),w=W__namespace.useRef(null);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{if(!c||!m.current||!b.current)return;(()=>{if(!m.current||!b.current)return;let x=m.current.getBoundingClientRect(),N=b.current.getBoundingClientRect(),T=window.innerWidth,k=window.innerHeight,M=x.top+n,P=x.right+t;P+N.width>T-r&&(P=x.left-N.width-t),M+N.height>k-r&&(M=k-N.height-r),M<r&&(M=r),g({top:M,left:P});})();},[c,t,n,r,m]);let y=C=>{o?.(C),w.current&&(clearTimeout(w.current),w.current=null),d(true);},R=C=>{a?.(C);let x=C.relatedTarget;m.current?.contains(x)||f?.current?.contains(x)||(w.current=setTimeout(()=>{d(false);},100));};return W__namespace.useEffect(()=>()=>{w.current&&clearTimeout(w.current);},[]),!h||!c?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:C=>{b.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:y,onMouseLeave:R,...s}),document.body)});pu.displayName="DropdownSubContent";var AR=Bi;var bu=W__namespace.createContext(null),Fi=()=>{let e=W__namespace.useContext(bu);if(!e)throw new Error("Popover components must be used within a Popover");return e},rt=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),s=t!==void 0,i=s?t:o,l=W__namespace.useRef(null),c=W__namespace.useId(),d=W__namespace.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsxRuntime.jsx(bu.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};rt.displayName="Popover";var Dt=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{open:o,onOpenChange:a,triggerRef:s,contentId:i}=Fi();return jsxRuntime.jsx("button",{ref:c=>{s.current=c,typeof r=="function"?r(c):r&&(r.current=c);},type:"button","aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?i:void 0,onClick:c=>{t?.(c),a(!o);},...n,children:e})});Dt.displayName="PopoverTrigger";var oo=W__namespace.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Fi();return jsxRuntime.jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});oo.displayName="PopoverAnchor";var ot=W__namespace.forwardRef(({className:e,style:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:v}=Fi(),[b,w]=W__namespace.useState({top:0,left:0}),[y,R]=W__namespace.useState(false),[C,x]=W__namespace.useState(null);if(W__namespace.useEffect(()=>{R(true);},[]),W__namespace.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),M=C.getBoundingClientRect(),P=0,E=0;switch(n){case "top":P=k.top-M.height-r;break;case "bottom":P=k.bottom+r;break;case "left":E=k.left-M.width-r;break;case "right":E=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":E=k.left+a;break;case "center":E=k.left+k.width/2-M.width/2;break;case "end":E=k.right-M.width-a;break}else switch(o){case "start":P=k.top+a;break;case "center":P=k.top+k.height/2-M.height/2;break;case "end":P=k.bottom-M.height-a;break}w({top:P,left:E});};return T(),window.addEventListener("resize",T),window.addEventListener("scroll",T,true),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T,true);}},[p,n,r,o,a,h,C]),W__namespace.useEffect(()=>{if(!p)return;let T=k=>{let M=k.target;C&&!C.contains(M)&&h.current&&!h.current.contains(M)&&(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),W__namespace.useEffect(()=>{if(!p)return;let T=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!y||!p)return null;let N={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[n];return _a__namespace.createPortal(jsxRuntime.jsx("div",{ref:T=>{x(k=>k!==T?T:k),typeof f=="function"?f(T):f&&(f.current=T);},id:v,role:"dialog","data-state":p?"open":"closed","data-side":n,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",N,e),style:{...t,top:b.top,left:b.left},...m,children:d}),document.body)});ot.displayName="PopoverContent";var vu=W__namespace.createContext(null),Gi=()=>{let e=W__namespace.useContext(vu);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},hu=W__namespace.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=W__namespace.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsxRuntime.jsx(vu.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsxRuntime.jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});hu.displayName="Tabs";var Ki={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},xu=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Gi(),l=W__namespace.useRef(null),[c,d]=W__namespace.useState({opacity:0});W__namespace.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let b=g.querySelector('[data-state="active"]');if(b){let w=g.getBoundingClientRect(),y=b.getBoundingClientRect(),R=s==="vertical";o==="underline"?d(R?{width:2,height:y.height,transform:`translateY(${y.top-w.top}px)`,opacity:1}:{width:y.width,height:2,transform:`translateX(${y.left-w.left}px)`,opacity:1}):o==="solid"&&d(R?{width:y.width,height:y.height,transform:`translateY(${y.top-w.top}px)`,opacity:1}:{width:y.width,height:y.height,transform:`translateX(${y.left-w.left}px)`,opacity:1});}};h();let v=new ResizeObserver(h);return v.observe(g),()=>{v.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxRuntime.jsxs("div",{ref:g=>{l.current=g,typeof r=="function"?r(g):r&&(r.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Ki[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsxRuntime.jsx("span",{className:u("absolute transition-all duration-200 ease-out",Ki[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});xu.displayName="TabsList";var yu=W__namespace.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Gi(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsxRuntime.jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Ki[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});yu.displayName="TabsTrigger";var Ru=W__namespace.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Gi(),s=a===t;return s?jsxRuntime.jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r,children:n}):null});Ru.displayName="TabsContent";var wu=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function OR(e,t=wu){return e?t.filter(r=>r.test(e)).length/t.length:0}function BR(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function FR(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Tu=W__namespace.createContext(null),Ya=()=>{let e=W__namespace.useContext(Tu);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},Mu=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=W__namespace.useState(t),s=e!==void 0,i=s?e:o,l=W__namespace.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsxRuntime.jsx(Tu.Provider,{value:{open:i,onOpenChange:l},children:r})};Mu.displayName="Sheet";var Nu=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Ya();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Nu.displayName="SheetTrigger";var ku=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Ya();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});ku.displayName="SheetClose";var Ui=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Ui.displayName="SheetPortal";var Pu=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ya();return r?jsxRuntime.jsx("div",{ref:n,className:u("fixed inset-0 z-50 bg-black/80",r?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Pu.displayName="SheetOverlay";var Eu=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),$R=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],Lu=W__namespace.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Ya(),[d,m]=W__namespace.useState(false),[,f]=W__namespace.useState(false);return W__namespace.useEffect(()=>{if(l)m(true),f(true),ut();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{mt();}},[l]),W__namespace.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxRuntime.jsxs(Ui,{children:[jsxRuntime.jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(Eu({side:e}),$R(e,l),t),...s,children:[!r&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>c(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});Lu.displayName="SheetContent";var Su=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});Su.displayName="SheetHeader";var Du=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Du.displayName="SheetFooter";var Hu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));Hu.displayName="SheetTitle";var Iu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Iu.displayName="SheetDescription";var jR=({theme:e="system",...t})=>jsxRuntime.jsx(sonner.Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var Vu=W__namespace.createContext(null),Yo=()=>{let e=W__namespace.useContext(Vu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Wi=W__namespace.createContext(null),Au=W__namespace.createContext(null),zu=({children:e,onOpenChange:t})=>{let[n,r]=W__namespace.useState(false),[o,a]=W__namespace.useState({x:0,y:0}),s=W__namespace.useId(),i=W__namespace.useCallback(l=>{r(l),t?.(l);},[t]);return jsxRuntime.jsx(Vu.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};zu.displayName="ContextMenu";var Ou=W__namespace.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Yo(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsxRuntime.jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});Ou.displayName="ContextMenuTrigger";var Bu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Bu.displayName="ContextMenuGroup";var Fu=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Fu.displayName="ContextMenuPortal";var Ku=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),s=t!==void 0,i=s?t:o,l=W__namespace.useRef(null),c=W__namespace.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsxRuntime.jsx(Wi.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ku.displayName="ContextMenuSub";var Gu=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Au.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));Gu.displayName="ContextMenuRadioGroup";var $u=W__namespace.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Yo(),[d,m]=W__namespace.useState(false),[f,p]=W__namespace.useState(l),g=W__namespace.useRef(null);return W__namespace.useEffect(()=>{m(true);},[]),W__namespace.useEffect(()=>{if(!s||!g.current){p(l);return}let v=g.current.getBoundingClientRect(),{x:b,y:w}=l;b+v.width>window.innerWidth&&(b=window.innerWidth-v.width-8),w+v.height>window.innerHeight&&(w=window.innerHeight-v.height-8),p({x:b,y:w});},[s,l]),W__namespace.useEffect(()=>{if(!s)return;let h=v=>{let b=v.target;g.current&&!g.current.contains(b)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),W__namespace.useEffect(()=>{if(!s)return;let h=v=>{v.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:r}),document.body)});$u.displayName="ContextMenuContent";var Uu=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=W__namespace.useContext(Wi);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{r?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxRuntime.jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[n,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Uu.displayName="ContextMenuSubTrigger";var Wu=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=W__namespace.useContext(Wi);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=W__namespace.useState({top:0,left:0}),[f,p]=W__namespace.useState(false),g=W__namespace.useRef(null);W__namespace.useEffect(()=>{p(true);},[]),W__namespace.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let w=c.current.getBoundingClientRect(),y=g.current.getBoundingClientRect(),R=w.top,C=w.right+t;C+y.width>window.innerWidth&&(C=w.left-y.width-t),m({top:R,left:C});})();},[i,t,c]);let h=b=>{n?.(b),l(true);},v=b=>{r?.(b),l(false);};return !f||!i?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:b=>{g.current=b,typeof a=="function"?a(b):a&&(a.current=b);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:v,...o}),document.body)});Wu.displayName="ContextMenuSubContent";var ju=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Yo(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});ju.displayName="ContextMenuItem";var Yu=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Yo(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return jsxRuntime.jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});Yu.displayName="ContextMenuCheckboxItem";var _u=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Yo(),l=W__namespace.useContext(Au),c=l?.value===n,d=m=>{if(r){m.preventDefault();return}o?.(m),l?.onValueChange(n),i(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":c,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":c?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:d,...a,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-4 w-4 fill-current"})}),t]})});_u.displayName="ContextMenuRadioItem";var Xu=W__namespace.forwardRef(({className:e,inset:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));Xu.displayName="ContextMenuLabel";var qu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));qu.displayName="ContextMenuSeparator";var Zu=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Zu.displayName="ContextMenuShortcut";var Qu=W__namespace.createContext(null),QR=()=>{let e=W__namespace.useContext(Qu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Ju=W__namespace.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=W__namespace.useState(n),p=t!==void 0,g=p?t:m,h=W__namespace.useId(),v=b=>{p||f(b),r?.(b);};return jsxRuntime.jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsxRuntime.jsx(Qu.Provider,{value:{name:o||h,value:g,onValueChange:v,disabled:a,required:s},children:l})})});Ju.displayName="RadioGroup";var em=W__namespace.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=QR(),s=a.value===t,i=n||a.disabled;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>a.onValueChange(t),...r,children:s&&jsxRuntime.jsx("span",{className:"flex items-center justify-center",children:jsxRuntime.jsx(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsxRuntime.jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});em.displayName="RadioGroupItem";var qa=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),tm=W__namespace.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=W__namespace.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let v=!p;f||m(v),a?.(v);},h=v=>{v.key==="Enter"&&v.preventDefault(),i?.(v);};return jsxRuntime.jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u(qa({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});tm.displayName="Toggle";var nm=W__namespace.createContext(null),rw=()=>{let e=W__namespace.useContext(nm);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},rm=W__namespace.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=W__namespace.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:m,h=v=>{if(r==="single"){let b=g.includes(v)?[]:[v];p||f(b),s?.(b[0]||"");}else {let b=g.includes(v)?g.filter(w=>w!==v):[...g,v];p||f(b),s?.(b);}};return jsxRuntime.jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsxRuntime.jsx(nm.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});rm.displayName="ToggleGroup";var om=W__namespace.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=rw(),c=l.value.includes(o),d=a||l.disabled;return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u(qa({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});om.displayName="ToggleGroupItem";var Qa=W__namespace.forwardRef(({className:e,value:t,defaultValue:n=[0],onValueChange:r,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=W__namespace.useState(n),h=t!==void 0,v=h?t:p,b=W__namespace.useRef(null),[w,y]=W__namespace.useState(false),[R,C]=W__namespace.useState(null),x=(H,L)=>{if(!b.current)return v[0];let S=b.current.getBoundingClientRect(),V;c==="horizontal"?V=(H-S.left)/S.width:V=1-(L-S.top)/S.height,V=Math.max(0,Math.min(1,V));let z=a+V*(s-a),F=Math.round(z/i)*i;return Math.max(a,Math.min(s,F))},N=(H,L)=>{let S=[...v];S[L]=H,L>0&&H<v[L-1]&&(S[L]=v[L-1]),L<v.length-1&&H>v[L+1]&&(S[L]=v[L+1]),h||g(S),r?.(S);},T=(H,L)=>{l||(H.preventDefault(),y(true),C(L),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!w||R===null||l)return;let L=x(H.clientX,H.clientY);N(L,R);},M=()=>{w&&(y(false),C(null),o?.(v));},P=H=>{if(l)return;let L=x(H.clientX,H.clientY),S=0,V=Math.abs(v[0]-L);for(let z=1;z<v.length;z++){let F=Math.abs(v[z]-L);F<V&&(V=F,S=z);}N(L,S),o?.([...v.slice(0,S),L,...v.slice(S+1)]);},E=(H,L)=>{if(l)return;let S=v[L];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,v[L]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,v[L]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}N(S,L),o?.([...v.slice(0,L),S,...v.slice(L+1)]);},D=H=>(H-a)/(s-a)*100;return jsxRuntime.jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsxRuntime.jsx("div",{ref:b,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:P,children:jsxRuntime.jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:v.length>1?`${D(v[0])}%`:0,right:`${100-D(v[v.length-1])}%`,top:0,bottom:0}:{bottom:v.length>1?`${D(v[0])}%`:0,top:`${100-D(v[v.length-1])}%`,left:0,right:0}})}),v.map((H,L)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",w&&R===L&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${D(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${D(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:S=>T(S,L),onPointerMove:k,onPointerUp:M,onPointerCancel:M,onKeyDown:S=>E(S,L)},L)),d&&v.map((H,L)=>jsxRuntime.jsx("input",{type:"hidden",name:v.length>1?`${d}[${L}]`:d,value:H},L))]})});Qa.displayName="Slider";var am=W__namespace.createContext(null),sm=()=>{let e=W__namespace.useContext(am);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},_i=W__namespace.createContext(null),im=()=>{let e=W__namespace.useContext(_i);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},lm=W__namespace.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=W__namespace.useState(()=>t==="single"?r?[r]:[]:r||[]),f=W__namespace.useRef(new Map),p=W__namespace.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,v=R=>{if(t==="single"){let x=h.includes(R)&&a?[]:[R];g||m(x),o?.(x[0]||"");}else {let C=h.includes(R)?h.filter(x=>x!==R):[...h,R];g||m(C),o?.(C);}},b=W__namespace.useCallback((R,C)=>{f.current.set(R,C),p.current.includes(R)||p.current.push(R);},[]),w=W__namespace.useCallback(R=>{f.current.delete(R),p.current=p.current.filter(C=>C!==R);},[]),y=W__namespace.useCallback(R=>{let C=p.current;if(C.length===0)return;let x=document.activeElement,N;f.current.forEach((E,D)=>{E===x&&(N=D);});let T=N?C.indexOf(N):-1,k;switch(R){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=T===-1?0:(T+1)%C.length;break;case "prev":k=T===-1?C.length-1:(T-1+C.length)%C.length;break}let M=C[k];f.current.get(M)?.focus();},[]);return jsxRuntime.jsx(am.Provider,{value:{type:t,value:h,onValueChange:v,collapsible:a,disabled:s,registerTrigger:b,unregisterTrigger:w,focusTrigger:y},children:jsxRuntime.jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});lm.displayName="Accordion";var cm=W__namespace.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=sm(),d=c.value.includes(t),m=n||c.disabled||false,f=W__namespace.useId(),p=W__namespace.useId();return r!==void 0?jsxRuntime.jsx(_i.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxRuntime.jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsxRuntime.jsx(dm,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[a,jsxRuntime.jsxs("div",{className:"flex flex-col items-start",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsxRuntime.jsx(um,{children:s})]})}):jsxRuntime.jsx(_i.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxRuntime.jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});cm.displayName="AccordionItem";var dm=W__namespace.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=sm(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=im(),f=W__namespace.useRef(null);W__namespace.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(r?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsxRuntime.jsx("h3",{className:"flex",children:jsxRuntime.jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{n?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});dm.displayName="AccordionTrigger";var um=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=im();return jsxRuntime.jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:n,...r,children:jsxRuntime.jsx("div",{className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});um.displayName="AccordionContent";var pm=W__namespace.createContext(null),fm=()=>{let e=W__namespace.useContext(pm);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},gm=W__namespace.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=W__namespace.useState(n),m=t!==void 0,f=m?t:c,p=W__namespace.useId(),g=W__namespace.useId(),h=v=>{o||(m||d(v),r?.(v));};return jsxRuntime.jsx(pm.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxRuntime.jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold",children:a}),jsxRuntime.jsx(Xi,{})]}),s]})})});gm.displayName="Collapsible";var Xi=W__namespace.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=fm();return jsxRuntime.jsx(oe,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Xi.displayName="CollapsibleTrigger";var bm=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=fm(),c=W__namespace.useRef(null),[d,m]=W__namespace.useState(0),[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(a);W__namespace.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let v=()=>{p(false),a||h(false);};return g?jsxRuntime.jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:v,...r,children:jsxRuntime.jsx("div",{ref:c,className:"space-y-2",children:t})}):null});bm.displayName="CollapsibleContent";var ts=W__namespace.forwardRef(({className:e,value:t=0,max:n=100,label:r,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/n*100,0),100);return jsxRuntime.jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxRuntime.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsxRuntime.jsx("span",{className:"text-muted-foreground",children:r}),o&&jsxRuntime.jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),jsxRuntime.jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":typeof r=="string"?r:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsxRuntime.jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});ts.displayName="Progress";var ym=W__namespace.createContext(null),Rm=()=>{let e=W__namespace.useContext(ym);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},wm=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=W__namespace.useState(n),c=t!==void 0,d=c?t:i,m=W__namespace.useRef(null),f=W__namespace.useId(),p=W__namespace.useRef(null),g=W__namespace.useRef(null),h=W__namespace.useCallback(v=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),v?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return W__namespace.useEffect(()=>{if(!s||!d)return;let v=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",v,true),()=>window.removeEventListener("scroll",v,true)},[s,d,c,r]),W__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsxRuntime.jsx(ym.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};wm.displayName="HoverCard";var Cm=W__namespace.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Rm();return jsxRuntime.jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{n?.(p),i(false);},onFocus:p=>{r?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});Cm.displayName="HoverCardTrigger";var Tm=W__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=Rm(),[g,h]=W__namespace.useState({top:0,left:0}),[v,b]=W__namespace.useState(false),w=W__namespace.useRef(null);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{if(!d||!f.current||!w.current)return;(()=>{if(!f.current||!w.current)return;let N=f.current.getBoundingClientRect(),T=w.current.getBoundingClientRect(),k=0,M=0;switch(t){case "top":k=N.top-T.height-n;break;case "bottom":k=N.bottom+n;break;case "left":M=N.left-T.width-n;break;case "right":M=N.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":M=N.left+o;break;case "center":M=N.left+N.width/2-T.width/2;break;case "end":M=N.right-T.width-o;break}else switch(r){case "start":k=N.top+o;break;case "center":k=N.top+N.height/2-T.height/2;break;case "end":k=N.bottom-T.height-o;break}h({top:k,left:M});})();},[d,t,n,r,o,f]);let y=x=>{a?.(x),m(true);},R=x=>{s?.(x),m(false);};if(!v||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return _a__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{w.current=x,typeof c=="function"?c(x):c&&(c.current=x);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:y,onMouseLeave:R,...l,children:i}),document.body)});Tm.displayName="HoverCardContent";var Mm=W__namespace.createContext({size:"md",variant:"default",radius:"md"}),rs=()=>W__namespace.useContext(Mm);classVarianceAuthority.cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var cw=classVarianceAuthority.cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),dw=classVarianceAuthority.cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),uw=classVarianceAuthority.cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),Nm=W__namespace.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsxRuntime.jsx(Mm.Provider,{value:{size:e,variant:t,radius:n},children:jsxRuntime.jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Nm.displayName="Breadcrumb";var km=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=rs();return jsxRuntime.jsx("ol",{ref:n,className:u(cw({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});km.displayName="BreadcrumbList";var Pm=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r}=rs();return jsxRuntime.jsx("li",{ref:n,className:u("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});Pm.displayName="BreadcrumbItem";var Em=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Em.displayName="BreadcrumbLink";var Lm=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));Lm.displayName="BreadcrumbPage";var Sm=({children:e,className:t,...n})=>{let{size:r}=rs();return jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:u(dw({size:r}),"text-muted-foreground/60",t),...n,children:e??jsxRuntime.jsx(lucideReact.ChevronRight,{})})};Sm.displayName="BreadcrumbSeparator";var Dm=({className:e,...t})=>{let{size:n}=rs();return jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:u(uw({size:n}),e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]})};Dm.displayName="BreadcrumbEllipsis";var Vm=W__namespace.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsxRuntime.jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsxRuntime.jsx("div",{className:"absolute inset-0",children:r})}));Vm.displayName="AspectRatio";var Om=W__namespace.createContext(null),Zi=()=>{let e=W__namespace.useContext(Om);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},Bm=W__namespace.createContext(null),Fm=()=>{let e=W__namespace.useContext(Bm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},Km=W__namespace.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(Om.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxRuntime.jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsxRuntime.jsx(Qi,{})]})})});Km.displayName="NavigationMenu";var Gm=W__namespace.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Zi();return jsxRuntime.jsx("ul",{ref:n,className:u("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});Gm.displayName="NavigationMenuList";var $m=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Zi(),s=W__namespace.useId(),i=W__namespace.useRef(null),l=o===s,c=W__namespace.useCallback(d=>{a(d?s:null);},[s,a]);return jsxRuntime.jsx(Bm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsxRuntime.jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});$m.displayName="NavigationMenuItem";var Um=classVarianceAuthority.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),Wm=W__namespace.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=Fm(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return jsxRuntime.jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(Um(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});Wm.displayName="NavigationMenuTrigger";var jm=W__namespace.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=Fm(),l=W__namespace.useRef(null),[c,d]=W__namespace.useState({top:0,left:0});W__namespace.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...r}),document.body):null});jm.displayName="NavigationMenuContent";var Ym=classVarianceAuthority.cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),_m=W__namespace.forwardRef(({className:e,active:t,...n},r)=>jsxRuntime.jsx("a",{ref:r,className:u(Ym(),t&&"bg-accent text-accent-foreground",e),...n}));_m.displayName="NavigationMenuLink";var Qi=W__namespace.forwardRef((e,t)=>null);Qi.displayName="NavigationMenuViewport";var Xm=W__namespace.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Zi();return r?jsxRuntime.jsx("div",{ref:n,className:u("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsxRuntime.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});Xm.displayName="NavigationMenuIndicator";var Jm=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Tt=W__namespace.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsxRuntime.jsx("button",{ref:r,type:"button",className:u(Jm({size:t}),e),"aria-label":"Close",...n,children:jsxRuntime.jsx(lucideReact.X,{style:{width:a,height:a}})})});Tt.displayName="CloseButton";var os=W__namespace.createContext(null);function ww(){let e=W__namespace.useContext(os);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Qn(){return W__namespace.useContext(os)}var Cw="16rem",Tw="18rem",Mw="3rem",Nw="b",kw={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},Pw={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Ji=W__namespace.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:n,placement:r="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",v=h==="overlay",[b,w]=W__namespace.useState(false),[y,R]=W__namespace.useState(false),[C,x]=W__namespace.useState(e),N=t??C,T=W__namespace.useCallback(E=>{let D=typeof E=="function"?E(N):E;n?n(D):x(D);},[n,N]);W__namespace.useEffect(()=>{let E=()=>{w(window.innerWidth<768);};return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);let k=W__namespace.useCallback(()=>v?T(E=>!E):b?R(E=>!E):T(E=>!E),[b,T,R,v]);W__namespace.useEffect(()=>{if(v)return;let E=D=>{D.key===Nw&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),k());};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[k,v]);let M=N?"expanded":"collapsed",P=W__namespace.useMemo(()=>({placement:r,state:M,open:N,setOpen:T,isMobile:b,openMobile:y,setOpenMobile:R,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,M,N,T,b,y,R,k,l,h,o,a,s,i]);return v?jsxRuntime.jsx(os.Provider,{value:P,children:jsxRuntime.jsx(vaul.Drawer.Root,{open:N,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsxRuntime.jsx(os.Provider,{value:P,children:jsxRuntime.jsx(Yn,{delayDuration:0,children:jsxRuntime.jsx("div",{ref:g,style:{"--drawer-width":Cw,"--drawer-width-icon":Mw,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Ji.displayName="Drawer";var tp=W__namespace.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=Qn();if(!s)return jsxRuntime.jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r});if(l==="none")return jsxRuntime.jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",n),...o,children:r});if(c&&!t)return jsxRuntime.jsx(Ew,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",v=l==="icon";return jsxRuntime.jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsxRuntime.jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":v&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",n),...o,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:r})})})}return jsxRuntime.jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsxRuntime.jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsxRuntime.jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",n),...o,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:r})})]})});tp.displayName="DrawerSidebar";var Ew=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=W__namespace.useState(false);return W__namespace.useEffect(()=>{a(true);},[]),W__namespace.useEffect(()=>{if(t)return ut(),()=>mt()},[t]),!o||!t?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),jsxRuntime.jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",r==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",r==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":Tw},children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},np=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Qn();if(o?.mode==="overlay")return jsxRuntime.jsx(vaul.Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return jsxRuntime.jsxs("button",{ref:r,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...n,children:[jsxRuntime.jsx(lucideReact.PanelLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});np.displayName="DrawerTrigger";var rp=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let o=Qn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque",c=o?.hideCloseButton||false;if(a){let d=s==="top"||s==="bottom",m=s==="left"||s==="right",f=m?kw[i]:Pw[i],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},g={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:u("fixed inset-0 z-50",p[l])}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",g[s],e),style:{...m?{width:f,height:"100%"}:{},...d?{maxHeight:f}:{},...n.style},...n,children:[m&&!c&&jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx(Tt,{className:"absolute right-4 top-4 z-10"})}),d&&jsxRuntime.jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsxRuntime.jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});rp.displayName="DrawerContent";var op=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"header",className:u("flex flex-col gap-2 p-4",e),...t}));op.displayName="DrawerHeader";var ap=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));ap.displayName="DrawerBody";var sp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));sp.displayName="DrawerFooter";var ip=W__namespace.forwardRef(({className:e,...t},n)=>Qn()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsxRuntime.jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));ip.displayName="DrawerTitle";var lp=W__namespace.forwardRef(({className:e,...t},n)=>Qn()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsxRuntime.jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));lp.displayName="DrawerDescription";var cp=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Qn();return o?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Close,{ref:r,className:e,onClick:t,...n}):jsxRuntime.jsx(Tt,{ref:r,className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...n})});cp.displayName="DrawerClose";var dp=W__namespace.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=Qn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?lucideReact.PanelLeftOpen:lucideReact.PanelRightOpen,f=d?lucideReact.PanelLeftClose:lucideReact.PanelRightClose;return jsxRuntime.jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...r,children:[c?jsxRuntime.jsx(m,{className:"h-4 w-4 shrink-0"}):jsxRuntime.jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsxRuntime.jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});dp.displayName="DrawerToggle";var up=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));up.displayName="DrawerSeparator";var mp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));mp.displayName="DrawerMenu";var pp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));pp.displayName="DrawerMenuItem";var fp=classVarianceAuthority.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),gp=W__namespace.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=Qn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsxRuntime.jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(fp({variant:t,size:n}),o),...s,children:a});return r?jsxRuntime.jsxs(_n,{children:[jsxRuntime.jsx(Xn,{children:m}),jsxRuntime.jsx(qn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});gp.displayName="DrawerMenuButton";var bp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));bp.displayName="DrawerGroup";var vp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));vp.displayName="DrawerGroupLabel";var hp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("main",{ref:n,className:u("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));hp.displayName="DrawerInset";var Lw=Ji;var yp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));yp.displayName="Table";var Rp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Rp.displayName="TableHeader";var wp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));wp.displayName="TableBody";var Cp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Cp.displayName="TableFooter";var Tp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Tp.displayName="TableRow";var Mp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("th",{ref:n,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Mp.displayName="TableHead";var Np=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Np.displayName="TableCell";var kp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));kp.displayName="TableCaption";function Aw({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(R,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:v=false,hoverable:b=true,...w},y){let[R,C]=W__namespace.useState(new Set),[x,N]=W__namespace.useState({columnId:null,direction:null}),[T,k]=W__namespace.useState({pageIndex:0,pageSize:m[0]||10}),M=o??R,P=l??x,E=f??T,D=G=>{a?a(G):C(G);},H=G=>{c?c(G):N(G);},L=G=>{p?p(G):k(G);},S=W__namespace.useMemo(()=>{if(!P.columnId||!P.direction)return t;let G=n.find(O=>O.id===P.columnId);return G?[...t].sort((O,j)=>{let A=G.accessor(O),Y=G.accessor(j);if(A===Y)return 0;if(A==null)return 1;if(Y==null)return -1;let ie=String(A).localeCompare(String(Y),void 0,{numeric:true});return P.direction==="asc"?ie:-ie}):t},[t,P,n]),V=W__namespace.useMemo(()=>{if(!d)return S;let G=E.pageIndex*E.pageSize;return S.slice(G,G+E.pageSize)},[S,d,E]),z=Math.ceil(S.length/E.pageSize),F=G=>{if(G===true){let O=new Set(V.map((j,A)=>s(j,A)));D(O);}else D(new Set);},I=(G,O)=>{let j=new Set(M);O?j.add(G):j.delete(G),D(j);},K=V.length>0&&V.every((G,O)=>M.has(s(G,O))),B=V.some((G,O)=>M.has(s(G,O))),q=G=>{if(!n.find(A=>A.id===G)?.sortable&&!i)return;let j="asc";P.columnId===G&&(P.direction==="asc"?j="desc":P.direction==="desc"&&(j=null)),H({columnId:j?G:null,direction:j});},ne=G=>P.columnId!==G?jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):P.direction==="asc"?jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"});return jsxRuntime.jsxs("div",{ref:y,className:u("w-full",e),...w,children:[jsxRuntime.jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxRuntime.jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsxRuntime.jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxRuntime.jsxs("tr",{children:[r&&jsxRuntime.jsx("th",{className:"h-12 w-12 px-4",children:jsxRuntime.jsx($o,{checked:K?true:B?"indeterminate":false,onCheckedChange:F,"aria-label":"Select all"})}),n.map(G=>{let O=G.sortable??i;return jsxRuntime.jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:G.width},onClick:()=>O&&q(G.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[G.header,O&&ne(G.id)]})},G.id)})]})}),jsxRuntime.jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):V.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):V.map((G,O)=>{let j=s(G,O),A=M.has(j);return jsxRuntime.jsxs("tr",{className:u("border-b transition-colors",b&&"hover:bg-muted/50",v&&O%2===1&&"bg-muted/30",A&&"bg-muted"),"data-state":A?"selected":void 0,children:[r&&jsxRuntime.jsx("td",{className:"w-12 px-4",children:jsxRuntime.jsx($o,{checked:A,onCheckedChange:Y=>I(j,!!Y),"aria-label":`Select row ${O+1}`})}),n.map(Y=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:Y.cell?Y.cell(G,O):Y.accessor(G)},Y.id))]},j)})})]})}),d&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"Rows per page:"}),jsxRuntime.jsx("select",{value:E.pageSize,onChange:G=>L({pageIndex:0,pageSize:Number(G.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(G=>jsxRuntime.jsx("option",{value:G,children:G},G))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",E.pageIndex+1," of ",z||1]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx(oe,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex-1}),disabled:E.pageIndex===0,"aria-label":"Previous page",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(oe,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex+1}),disabled:E.pageIndex>=z-1,"aria-label":"Next page",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var zw=W__namespace.forwardRef(Aw);var el=["January","February","March","April","May","June","July","August","September","October","November","December"];function Uw({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=dateFns.getMonth(e),a=dateFns.getYear(e),s=c=>{let d=dateFns.setMonth(e,c);t(d);},i=c=>{let d=dateFns.setYear(e,c);t(d);},l=W__namespace.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{children:jsxRuntime.jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-2 py-1.5 rounded-md","text-sm font-medium w-[100px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsxRuntime.jsx("span",{className:"truncate",children:el[o]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),jsxRuntime.jsx(wn,{className:"min-w-[140px] p-0",children:jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:el.map((c,d)=>jsxRuntime.jsx(Wt,{onSelect:()=>s(d),className:u(o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{children:jsxRuntime.jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-2 py-1.5 rounded-md","text-sm font-medium w-[72px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsxRuntime.jsx("span",{children:a}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),jsxRuntime.jsx(wn,{className:"min-w-[100px] p-0",children:jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:l.map(c=>jsxRuntime.jsx(Wt,{onSelect:()=>i(c),className:u(a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function Ww(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=reactDayPicker.useDayPicker();if(e)return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsxRuntime.jsx(Uw,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-7 w-7 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-7 w-7 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]});let l=el[o.date.getMonth()],c=o.date.getFullYear();return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsxRuntime.jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}}function so({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=W__namespace.useMemo(()=>Ww(r,o,a),[r,o,a]);return jsxRuntime.jsx(reactDayPicker.DayPicker,{showOutsideDays:n,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}so.displayName="Calendar";var Sp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});Sp.displayName="Pagination";var Dp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));Dp.displayName="PaginationContent";var Hp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,className:u("",e),...t}));Hp.displayName="PaginationItem";var as=({className:e,isActive:t,size:n="icon",...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:u(hn({variant:t?"solid":"light",size:n}),e),...r});as.displayName="PaginationLink";var Ip=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:"Previous"})]});Ip.displayName="PaginationPrevious";var Vp=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})]});Vp.displayName="PaginationNext";var Ap=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});Ap.displayName="PaginationEllipsis";var ol=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ol.displayName=cmdk.Command.displayName;var qw=({children:e,...t})=>jsxRuntime.jsx(Aa,{...t,children:jsxRuntime.jsx(za,{className:"overflow-hidden p-0 shadow-lg",children:jsxRuntime.jsx(ol,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),zp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:n,className:u("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));zp.displayName=cmdk.Command.Input.displayName;var Op=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.List,{ref:n,className:u("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Op.displayName=cmdk.Command.List.displayName;var Bp=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Bp.displayName=cmdk.Command.Empty.displayName;var Fp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Group,{ref:n,className:u("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Fp.displayName=cmdk.Command.Group.displayName;var Kp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Kp.displayName=cmdk.Command.Separator.displayName;var Gp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Item,{ref:n,className:u("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Gp.displayName=cmdk.Command.Item.displayName;var $p=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});$p.displayName="CommandShortcut";var Up=W__namespace.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,...s},i)=>{let[l,c]=W__namespace.useState(false),[d,m]=W__namespace.useState(false);return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{type:l?"text":"password",className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:n,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{m(true),r?.(f);},onBlur:f=>{m(false),o?.(f);},...s}),t&&jsxRuntime.jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:n,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4"})})]})});Up.displayName="PasswordInput";var Wp=W__namespace.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[m,f]=W__namespace.useState(s),[p,g]=W__namespace.useState(false),h=a!==void 0,v=h?a:m,b=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},w=()=>{b((v??0)+n);},y=()=>{b((v??0)-n);},R=T=>{let k=T.target.value;if(k==="")b(void 0);else {let M=parseFloat(k);isNaN(M)||b(M);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),w()):T.key==="ArrowDown"&&(T.preventDefault(),y());},x=r===void 0||(v??0)>r,N=o===void 0||(v??0)<o;return t?jsxRuntime.jsxs("div",{className:u("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:y,disabled:l||!x,tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}),jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:v??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!N,tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}):jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:v??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Wp.displayName="NumberInput";var Yp=W__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date",dateFormat:o="PPP",disabled:a=false,minDate:s,maxDate:i,className:l},c)=>{let[d,m]=W__namespace.useState(false),[f,p]=W__namespace.useState(t),g=e!==void 0,h=g?e:f,v=b=>{g||p(b),n?.(b),m(false);};return jsxRuntime.jsxs(rt,{open:d,onOpenChange:m,children:[jsxRuntime.jsxs(Dt,{ref:c,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!h&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",l),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),h?dateFns.format(h,o):r]}),jsxRuntime.jsx(ot,{className:"w-auto p-0",align:"start",children:jsxRuntime.jsx(so,{mode:"single",selected:h,onSelect:v,disabled:b=>!!(s&&b<s||i&&b>i),initialFocus:true})})]})});Yp.displayName="DatePicker";var Zp=classVarianceAuthority.cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),_p=classVarianceAuthority.cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{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"}}),Qp=W__namespace.forwardRef(({className:e,items:t,max:n=5,size:r,showTooltips:o=false,...a},s)=>{let i=t.slice(0,n),l=t.length-n,c=(m,f)=>{let p=jsxRuntime.jsxs(Mr,{className:u(_p({size:r})),children:[m.src&&jsxRuntime.jsx(no,{src:m.src,alt:m.alt||""}),jsxRuntime.jsx(Nr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxRuntime.jsxs(_n,{children:[jsxRuntime.jsx(Xn,{children:p}),jsxRuntime.jsx(qn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxRuntime.jsxs("div",{ref:s,className:u(Zp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsxRuntime.jsx(Mr,{className:u(_p({size:r})),children:jsxRuntime.jsxs(Nr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsxRuntime.jsx(Yn,{delayDuration:300,children:d}):d});Qp.displayName="AvatarGroup";var Jp=classVarianceAuthority.cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),ef=W__namespace.forwardRef(({className:e,value:t,defaultValue:n=0,onValueChange:r,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=W__namespace.useState(n),[v,b]=W__namespace.useState(null),w=t!==void 0,y=w?t:g,R=v!==null?v:y,C=D=>{l||c||(w||h(D),r?.(D));},x=(D,H=false)=>{let L=i&&H?D+.5:D+1;C(L);},N=(D,H)=>{if(l||c)return;let L=D.currentTarget.getBoundingClientRect(),S=i&&D.clientX<L.left+L.width/2;b(S?H+.5:H+1);},T=()=>{b(null);},k=s==="heart"?lucideReact.Heart:lucideReact.Star,M=D=>R>=D+1?"full":R>=D+.5?"half":"empty",P=d?{color:d,fill:d}:{},E=m?{color:m}:{};return jsxRuntime.jsx("div",{ref:p,className:u(Jp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(D,H)=>{let L=M(H);return jsxRuntime.jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:S=>{let V=S.currentTarget.getBoundingClientRect(),z=i&&S.clientX<V.left+V.width/2;x(H,z);},onMouseMove:S=>N(S,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":y===H+1,children:[jsxRuntime.jsx(k,{className:u("text-muted-foreground/30",L!=="empty"&&"absolute inset-0"),style:L==="empty"?E:void 0}),L!=="empty"&&jsxRuntime.jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",L==="half"&&"clip-path-half"),style:{...P,clipPath:L==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});ef.displayName="Rating";var nf=classVarianceAuthority.cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),uC={sm:"sm",md:"sm",lg:"sm"},rf=W__namespace.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,v=b=>{b.stopPropagation(),c?.();};return jsxRuntime.jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f?.(b));}:void 0,className:u(nf({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsxRuntime.jsx("span",{className:"shrink-0",children:s}),jsxRuntime.jsx("span",{className:"truncate",children:m}),i&&jsxRuntime.jsx("span",{className:"shrink-0",children:i}),l&&jsxRuntime.jsx(Tt,{size:uC[r??"md"],onClick:v,disabled:d,className:"ml-0.5 h-4 w-4"})]})});rf.displayName="Chip";var of=W.createContext({direction:"horizontal"}),xC=({className:e,direction:t="horizontal",children:n,...r})=>jsxRuntime.jsx(of.Provider,{value:{direction:t},children:jsxRuntime.jsx(reactResizablePanels.Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),yC=reactResizablePanels.Panel,RC=({withHandle:e,className:t,...n})=>{let{direction:r}=W.useContext(of),o=r==="vertical";return jsxRuntime.jsx(reactResizablePanels.Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...n,children:e&&jsxRuntime.jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})})})};var cf=classVarianceAuthority.cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),CC={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},af={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},df=W__namespace.forwardRef(({className:e,size:t="md",color:n="default",value:r,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,r/o*100)),m=CC[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxRuntime.jsxs("div",{ref:c,className:u(cf({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxRuntime.jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsxRuntime.jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsxRuntime.jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:af[n]||af.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsxRuntime.jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});df.displayName="CircularProgress";var uf=W__namespace.createContext(null),NC=()=>{let e=W__namespace.useContext(uf);if(!e)throw new Error("OTP components must be used within InputOTP");return e},mf=classVarianceAuthority.cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),pf=W__namespace.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...m},f)=>{let[p,g]=W__namespace.useState(o),[h,v]=W__namespace.useState(0),[b,w]=W__namespace.useState(false),y=W__namespace.useRef(null),R=r!==void 0?r:p;W__namespace.useImperativeHandle(f,()=>y.current),W__namespace.useEffect(()=>{v(Math.min(R.length,n-1));},[R,n]),W__namespace.useEffect(()=>{R.length===n&&s&&s(R);},[R,n,s]);let C=P=>{let E=P.target.value;if(i&&E){let D=new RegExp(i.replace("^","").replace("$","").replace("+",""));E=E.split("").filter(H=>D.test(H)).join("");}E=E.slice(0,n),r===void 0&&g(E),a?.(E);},x=P=>{P.key==="ArrowLeft"?v(E=>Math.max(0,E-1)):P.key==="ArrowRight"&&v(E=>Math.min(R.length,n-1,E+1));},N=()=>{y.current?.focus();},T=()=>{w(true),v(Math.min(R.length,n-1));},k=()=>{w(false);},M={value:R,activeIndex:b?h:-1,maxLength:n,disabled:l};return jsxRuntime.jsx(uf.Provider,{value:M,children:jsxRuntime.jsxs("div",{className:u(mf({size:c}),t),onClick:N,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:y,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:R,onChange:C,onKeyDown:x,onFocus:T,onBlur:k,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...m}),d]})})});pf.displayName="InputOTP";var ff=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex items-center",e),...t}));ff.displayName="InputOTPGroup";var gf=W__namespace.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=NC(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxRuntime.jsxs("div",{ref:r,"data-otp-slot":true,"data-active":l,"data-filled":!!i,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[i,c&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});gf.displayName="InputOTPSlot";var bf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}));bf.displayName="InputOTPSeparator";var xf=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),yf=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[v,b]=W__namespace.useState(""),w=W__namespace.useRef(null);W__namespace.useImperativeHandle(h,()=>w.current);let y=M=>{let P=M.trim();if(P.length<i||P.length>l||s&&r.length>=s||!d&&r.some(D=>D.text.toLowerCase()===P.toLowerCase()))return;let E={id:crypto.randomUUID(),text:P};o?.([...r,E]),b("");},R=M=>{m||f||o?.(r.filter(P=>P.id!==M));},C=M=>{if(c.includes(M.key)){if(M.key==="Tab"&&!v)return;M.preventDefault(),y(v);}M.key==="Backspace"&&!v&&r.length>0&&R(r[r.length-1].id);},x=M=>{let P=M.target.value;if(P.includes(",")){P.split(",").forEach(D=>{D.trim()&&y(D);});return}b(P);},N=M=>{M.preventDefault(),M.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(D=>{y(D);});},T=()=>{w.current?.focus();},k=s?r.length>=s:false;return jsxRuntime.jsxs("div",{className:u("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",m&&"cursor-not-allowed opacity-50",e),onClick:T,children:[r.map(M=>p?p(M,()=>R(M.id)):jsxRuntime.jsxs("span",{className:u(xf({variant:t,size:n})),children:[M.text,!m&&!f&&jsxRuntime.jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),R(M.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${M.text}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},M.id)),!k&&!f&&jsxRuntime.jsx("input",{ref:w,type:"text",value:v,onChange:x,onKeyDown:C,onPaste:N,placeholder:r.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});yf.displayName="TagInput";var wf=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),Cf=W__namespace.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxRuntime.jsxs("div",{ref:l,className:u(wf({size:t,className:e})),...i,children:[n&&jsxRuntime.jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsxRuntime.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsxRuntime.jsx("div",{className:"mt-2",children:a}),s]}));Cf.displayName="EmptyState";var Mf=classVarianceAuthority.cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),Nf=W__namespace.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?lucideReact.TrendingUp:s==="down"?lucideReact.TrendingDown:lucideReact.Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxRuntime.jsxs("div",{ref:d,className:u(Mf({variant:t,radius:n,className:e})),...c,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsxRuntime.jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxRuntime.jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsxRuntime.jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsxRuntime.jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});Nf.displayName="StatCard";var cl=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),zC=({checked:e,disabled:t,onClick:n})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:r=>{r.stopPropagation(),t||n(r);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})});function OC({className:e,variant:t,size:n,items:r,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:v=[],onCheck:b,children:w,...y},R){let[C,x]=W__namespace.useState(null),[N,T]=W__namespace.useState(null),[k,M]=W__namespace.useState(new Set(f)),P=m!==void 0,E=P?new Set(m):k,[D,H]=W__namespace.useState(new Set(v)),L=h!==void 0,S=L?new Set(h):D,V=(O,j)=>{x(j),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(j));},z=(O,j)=>{O.preventDefault(),!(C===null||C===j)&&T(j);},F=()=>{T(null);},I=(O,j)=>{if(O.preventDefault(),!r||C===null||C===j){x(null),T(null);return}let A=[...r],[Y]=A.splice(C,1);A.splice(j,0,Y),s?.(A),x(null),T(null);},K=()=>{x(null),T(null);},B=W__namespace.useCallback((O,j)=>{if(!r)return;let A=new Set(E),Y=!A.has(O.id);d?Y?A.add(O.id):A.delete(O.id):(A.clear(),Y&&A.add(O.id)),P||M(A);let ie=r.filter(Te=>A.has(Te.id));p?.(Array.from(A),{selected:Y,selectedItems:ie,item:O,event:j});},[r,E,d,P,p]),q=W__namespace.useCallback((O,j)=>{if(!r)return;let A=new Set(S),Y=!A.has(O.id);Y?A.add(O.id):A.delete(O.id),L||H(A);let ie=r.filter(Te=>A.has(Te.id));b?.(Array.from(A),{checked:Y,checkedItems:ie,item:O,event:j});},[r,S,L,b]);return (a||c||g)&&r&&o?jsxRuntime.jsx("div",{ref:R,role:"list",className:u(cl({variant:t,size:n,className:e})),...y,children:r.map((O,j)=>{let A=E.has(O.id),Y=S.has(O.id);return jsxRuntime.jsxs("div",{role:"listitem","aria-selected":c?A:void 0,draggable:a,onDragStart:a?U=>V(U,j):void 0,onDragOver:a?U=>z(U,j):void 0,onDragLeave:a?F:void 0,onDrop:a?U=>I(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>B(O,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",N===j&&"border-primary border-dashed border rounded-md",A&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),g&&jsxRuntime.jsx(zC,{checked:Y,onClick:U=>q(O,U)}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o(O,j)})]},O.id)})}):jsxRuntime.jsx("div",{ref:R,role:"list",className:u(cl({variant:t,size:n,className:e})),...y,children:w})}var BC=W__namespace.forwardRef(OC),Pf=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),Ef=W__namespace.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:u(Pf({interactive:t,className:e})),...a,children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));Ef.displayName="ListItem";var Lf=W__namespace.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxRuntime.jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsxRuntime.jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));Lf.displayName="ListItemText";var Hf=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),If=W__namespace.forwardRef(({className:e,position:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,"data-position":t,className:u(Hf({position:t,className:e})),...n}));If.displayName="Timeline";var Vf=classVarianceAuthority.cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Af=W__namespace.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxRuntime.jsxs("div",{ref:i,className:u(Vf({variant:t,className:e})),...s,children:[!n&&jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:o}),!r&&jsxRuntime.jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));Af.displayName="TimelineItem";var zf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));zf.displayName="TimelineContent";var Of=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Of.displayName="TimelineOpposite";var Ff=classVarianceAuthority.cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),Kf=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),Gf=W__namespace.createContext({}),$f=W__namespace.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=W__namespace.useState(a),f=o!==void 0?o:d,p=W__namespace.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsxRuntime.jsx(Gf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsxRuntime.jsx("div",{ref:c,role:"group",className:u(Ff({size:t,fullWidth:n,className:e})),...l,children:r})})});$f.displayName="SegmentedControl";var Uf=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=W__namespace.useContext(Gf),i=s.value===n,l=r||s.disabled;return jsxRuntime.jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(n);},className:u(Kf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Uf.displayName="SegmentedControlItem";var Wf=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),jf=e=>{let t=e.type;return t.startsWith("image/")?lucideReact.Image:t.startsWith("video/")?lucideReact.FileVideo:t.startsWith("audio/")?lucideReact.FileAudio:t.includes("pdf")||t.includes("document")?lucideReact.FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?lucideReact.FileArchive:lucideReact.File},us=e=>{if(e===0)return "0 Bytes";let t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Yf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${us(t)}`}),n&&n.length>0&&(n.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${n.join(", ")}`})),r},_f=W__namespace.forwardRef(({className:e,variant:t,size:n,onFilesChange:r,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,v]=W__namespace.useState(false),[b,w]=W__namespace.useState(false),[y,R]=W__namespace.useState([]),C=W__namespace.useRef(null),x=W__namespace.useCallback(S=>{if(!S||S.length===0)return;let V=Array.from(S),z=[],F=[];(m?V:[V[0]]).forEach(K=>{let B=Yf(K,c,d);B.length>0?F.push({file:K,errors:B}):z.push(K);}),R(F),z.length>0&&r?.(z),F.length>0&&o?.(F);},[c,d,m,r,o]),N=W__namespace.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!f&&(v(true),S.dataTransfer.items)){let z=Array.from(S.dataTransfer.items).some(F=>{if(F.kind!=="file")return true;if(d&&d.length>0){let I=F.type;return !d.some(K=>K.endsWith("/*")?I.startsWith(K.slice(0,-2)):I===K)}return false});w(z);}},[f,d]),T=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!f&&(S.dataTransfer.dropEffect="copy");},[f]),k=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation();let V=S.currentTarget.getBoundingClientRect(),z=S.clientX,F=S.clientY;(z<V.left||z>V.right||F<V.top||F>V.bottom)&&(v(false),w(false));},[]),M=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation(),v(false),w(false),!f&&x(S.dataTransfer.files);},[f,x]),P=W__namespace.useCallback(()=>{f||C.current?.click();},[f]),E=W__namespace.useCallback(S=>{x(S.target.files),S.target.value="";},[x]),D=W__namespace.useCallback(S=>{f||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C.current?.click());},[f]),H=b?"error":h?"active":t,L=d?.join(",");return jsxRuntime.jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxRuntime.jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:N,onDragOver:T,onDragLeave:k,onDrop:M,onClick:P,onKeyDown:D,className:u(Wf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsxRuntime.jsx("input",{ref:C,type:"file",accept:L,multiple:m,disabled:f,onChange:E,className:"sr-only",tabIndex:-1}),l||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsxRuntime.jsx("div",{className:"rounded-full bg-muted p-3",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${us(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),y.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:y.map(({file:S,errors:V})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"font-medium",children:S.name}),":"," ",V.map(z=>z.message).join(", ")]},S.name))}),i&&s.length>0&&jsxRuntime.jsx("div",{className:"space-y-2",children:s.map(S=>{let V=jf(S.file);return jsxRuntime.jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",S.error&&"border-danger bg-danger/5"),children:[jsxRuntime.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsxRuntime.jsx(V,{className:"h-5 w-5 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"truncate text-sm font-medium",children:S.file.name}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[us(S.file.size),S.error&&jsxRuntime.jsx("span",{className:"ml-2 text-danger",children:S.error})]}),S.progress!==void 0&&S.progress<100&&jsxRuntime.jsx(ts,{value:S.progress,className:"mt-2 h-1"})]}),jsxRuntime.jsxs(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:z=>{z.stopPropagation(),a?.(S.file);},children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Remove"})]})]},S.id)})})]})});_f.displayName="FileUpload";var XC=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,qf=classVarianceAuthority.cva("relative rounded-md border border-input shadow-sm transition-all 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:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),na=W__namespace.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,...d},m)=>jsxRuntime.jsx("button",{ref:m,type:"button",disabled:c,onClick:g=>{l?.(g),r?.(e);},className:u(qf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-ring ring-offset-2",i),style:{backgroundImage:n?XC:void 0,backgroundSize:n?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...d,children:jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));na.displayName="ColorSwatch";var Zf=classVarianceAuthority.cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Qf=W__namespace.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,className:c,style:d,...m},f)=>{let[p,g]=W__namespace.useState(t),h=e??p,v=W__namespace.useCallback(w=>{l||(e===void 0&&g(w),n?.(w));},[e,n,l]),b=w=>w.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:u(Zf({layout:r}),c),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...d},...m,children:a.map(w=>{let y=h?b(h)===b(w):false;return jsxRuntime.jsx(na,{role:"option",color:w,size:s,shape:i,isSelected:y,onSelect:v,disabled:l,"aria-selected":y},w)})})});Qf.displayName="ColorSwatchPicker";var QC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Jf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},eg=W__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=QC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=W__namespace.useState(e??t),f=W__namespace.useId();W__namespace.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=v=>{m(v),n?.(v);},g=v=>{m(v),n?.(v);},h=v=>{let b=v.target.value.toUpperCase();m(b),n?.(b);};return l==="simple"?jsxRuntime.jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",r&&"opacity-50 cursor-not-allowed",Jf[s],i),children:[jsxRuntime.jsx("input",{type:"color",value:d,onChange:h,disabled:r,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxRuntime.jsxs(rt,{children:[jsxRuntime.jsx(Dt,{ref:c,disabled:r,className:u("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",Jf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsxRuntime.jsx(ot,{className:"w-auto p-3",align:"start",children:jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Tr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsxRuntime.jsx(reactColorful.HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Tr,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(v=>jsxRuntime.jsx(na,{color:v,size:"sm",isSelected:d.toLowerCase()===v.toLowerCase(),onSelect:g},v))})]})]})})]})});eg.displayName="ColorPicker";var tg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground 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 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),ml=e=>String(e).padStart(2,"0"),rT=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},oT=(e,t)=>`${ml(e)}:${ml(t)}`,ng=W__namespace.forwardRef(({className:e,size:t,value:n,onChange:r,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=W__namespace.useState(n??""),[g,h]=W__namespace.useState(false);W__namespace.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:v,minutes:b}=rT(f||"00:00"),w=k=>{let M=k.target.value;p(M),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(M)&&r?.(M);},y=(k,M)=>{let P=Math.max(0,Math.min(23,k)),E=Math.max(0,Math.min(59,M)),D=oT(P,E);p(D),r?.(D);},R=()=>y(v+1,b),C=()=>y(v-1,b),x=()=>y(v,b+a),N=()=>y(v,b-a),T=({value:k,onIncrement:M,onDecrement:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:M,disabled:c,children:jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:ml(k)}),jsxRuntime.jsx(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})})]});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[jsxRuntime.jsx("input",{ref:m,type:"time",value:f,onChange:w,disabled:c,className:u(tg({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxRuntime.jsxs(rt,{open:g,onOpenChange:h,children:[jsxRuntime.jsxs(Dt,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxRuntime.jsxs(ot,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{value:v,onIncrement:R,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(T,{value:b,onIncrement:x,onDecrement:N,max:59})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsxRuntime.jsx(oe,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;y(k.getHours(),k.getMinutes());},children:"Now"}),jsxRuntime.jsx(oe,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});ng.displayName="TimeInput";var rg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),sT=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},pl=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},og=(e,t,n)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(n,"."),r=r.replace(/[^0-9.-]/g,"");let o=parseFloat(r);return isNaN(o)?void 0:o},ag=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",disabled:h,placeholder:v,...b},w)=>{let[y,R]=W__namespace.useState(r),[C,x]=W__namespace.useState(""),[N,T]=W__namespace.useState(false),k=n!==void 0?n:y,M=f??sT(a,s);W__namespace.useEffect(()=>{!N&&k!==void 0&&x(pl(k,i,p,g));},[k,i,p,g,N]);let P=S=>{let V=S.target.value;if(!V){x(""),n===void 0&&R(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;x(V);let F=og(V,p,g);if(F!==void 0){let I=F;l!==void 0&&F<l&&(I=l),c!==void 0&&F>c&&(I=c),n===void 0&&R(I),o?.(I);}},E=()=>{T(true),k!==void 0&&x(k.toString().replace(".",g));},D=()=>{T(false),x(k!==void 0?pl(k,i,p,g):"");},H=d&&m==="prefix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:M}),L=d&&m==="suffix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:M});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[H&&jsxRuntime.jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsxRuntime.jsx("input",{ref:w,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:E,onBlur:D,disabled:h,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(rg({size:t}),H&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:N?"var(--color-foreground)":void 0},...b}),L&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});ag.displayName="CurrencyInput";var sg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fl={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},cT=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},rr=e=>["#","A","*"].includes(e),ps=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];cT(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},gl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},ig=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),dT=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},lg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in fl?fl[a].mask:a,[g,h]=W__namespace.useState(r),[v,b]=W__namespace.useState(""),[w,y]=W__namespace.useState(false),R=W__namespace.useRef(null),C=n!==void 0?n:g;W__namespace.useImperativeHandle(f,()=>R.current),W__namespace.useEffect(()=>{let k=ps(C,p,true);b(k);},[C,p]);let x=k=>{let M=k.target.value,P=k.target.selectionStart??0,E=M.replace(/[^\w]/g,""),D=ps(E,p,true),H=gl(D,p);b(D),n===void 0&&h(l?D:H),o?.(H,D),requestAnimationFrame(()=>{if(R.current){let L=dT(D,p,P);R.current.setSelectionRange(L,L);}});},N=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let M=R.current;if(!M)return;let P=M.selectionStart??0;if(k.key==="Backspace"&&P>0){let E=P-1;for(;E>0&&!rr(p[E]);)E--;let D=gl(v,p),H=0;for(let V=0;V<E&&V<p.length;V++)rr(p[V])&&H++;let L=D.slice(0,Math.max(0,H-1))+D.slice(H),S=ps(L,p,true);b(S),n===void 0&&h(l?S:L),o?.(L,S),k.preventDefault(),requestAnimationFrame(()=>{R.current&&R.current.setSelectionRange(E,E);});}},T=i?ig(p,s):d;return jsxRuntime.jsx("input",{ref:R,type:"text",value:v,onChange:x,onKeyDown:N,onFocus:()=>y(true),onBlur:()=>y(false),disabled:c,placeholder:T,className:u(sg({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...m})});lg.displayName="MaskedInput";var cg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground 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 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),bs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},vl={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},bl=(e,t)=>String(e).padStart(t,"0"),gs=(e,t)=>{let n=bl(e.getDate(),2),r=bl(e.getMonth()+1,2),o=bl(e.getFullYear(),4),a=bs[t],s=vl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},dg=(e,t)=>{let n=bs[t],r=e.split(n);if(r.length!==3)return null;let o=vl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},fT=e=>e.toLowerCase(),gT=e=>{let t=bs[e];return vl[e].map(r=>r==="year"?"####":"##").join(t)},ug=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,format:a="DD/MM/YYYY",minDate:s,maxDate:i,showIcon:l=true,disabled:c,placeholder:d,...m},f)=>{let[p,g]=W__namespace.useState(r??null),[h,v]=W__namespace.useState(""),[b,w]=W__namespace.useState(null),y=W__namespace.useRef(null),R=n!==void 0?n:p;W__namespace.useImperativeHandle(f,()=>y.current),W__namespace.useEffect(()=>{R?(v(gs(R,a)),w(null)):v("");},[R,a]);let C=bs[a],x=gT(a),N=M=>{let P=M.target.value;P=P.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let E=P.replace(new RegExp(`\\${C}`,"g"),""),D="",H=0;for(let L=0;L<x.length&&H<E.length;L++)x[L]==="#"?(D+=E[H],H++):D+=x[L];if(v(D),D.length===x.length){let L=dg(D,a);if(L){if(s&&L<s){w(`Date must be after ${gs(s,a)}`);return}if(i&&L>i){w(`Date must be before ${gs(i,a)}`);return}w(null),n===void 0&&g(L),o?.(L);}else w("Invalid date");}else n===void 0&&g(null),o?.(null),w(null);},T=()=>{h&&h.length!==x.length&&(v(""),w(null),n===void 0&&g(null),o?.(null));},k=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{ref:y,type:"text",inputMode:"numeric",value:h,onChange:N,onBlur:T,disabled:c,placeholder:d??fT(a),className:u(cg({size:t}),l&&"pr-10",b&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!b,"aria-describedby":b?"date-error":void 0,...m}),l&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsxRuntime.jsx(lucideReact.Calendar,{className:u(k,"text-muted-foreground")})}),b&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:b})]})});ug.displayName="DateInput";var pg=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fg=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],vs=(e,t)=>{let n=e.replace(/\D/g,""),r="",o=0;for(let a=0;a<t.length&&o<n.length;a++)t[a]==="#"?(r+=n[o],o++):r+=t[a];return r},yT=e=>e.replace(/#/g,"_"),gg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=fg,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,...p},g)=>{let[h,v]=W__namespace.useState(r),[b,w]=W__namespace.useState(a??s),[y,R]=W__namespace.useState(false),[C,x]=W__namespace.useState(false),[N,T]=W__namespace.useState(false),[k,M]=W__namespace.useState({top:0,left:0,width:0}),P=W__namespace.useRef(null),E=W__namespace.useRef(null),D=n!==void 0?n:h,H=a??b,L=l.find(I=>I.code===H)??l[0],S=vs(D,L.format);W__namespace.useEffect(()=>{T(true);},[]),W__namespace.useEffect(()=>{if(C&&P.current){let I=P.current.getBoundingClientRect();M({top:I.bottom+4,left:I.left,width:Math.max(I.width,280)});}},[C]),W__namespace.useEffect(()=>{if(!C)return;let I=K=>{P.current&&!P.current.contains(K.target)&&E.current&&!E.current.contains(K.target)&&x(false);};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[C]),W__namespace.useEffect(()=>{if(!C)return;let I=K=>{K.key==="Escape"&&x(false);};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[C]);let V=I=>{let B=I.target.value.replace(/\D/g,"");n===void 0&&v(B);let q=vs(B,L.format),ne=`${L.dialCode} ${q}`;o?.(B,ne,L);},z=I=>{let K=l.find(ne=>ne.code===I);if(!K)return;a===void 0&&w(I),i?.(K);let B=vs(D,K.format),q=`${K.dialCode} ${B}`;o?.(D,q,K),x(false);};return jsxRuntime.jsxs("div",{className:"flex",children:[c&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{ref:P,type:"button",disabled:m,onClick:()=>x(!C),className:u("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("span",{children:L.flag}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),N&&C&&_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:E,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:k.top,left:k.left,minWidth:k.width},children:jsxRuntime.jsx(ze,{style:{maxHeight:300},children:jsxRuntime.jsx("div",{className:"p-1",children:l.map(I=>jsxRuntime.jsxs("div",{role:"option","aria-selected":I.code===H,onClick:()=>z(I.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:I.code===H&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:I.flag}),jsxRuntime.jsx("span",{className:"flex-1",children:I.name}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:I.dialCode})]})]},I.code))})})}),document.body)]}),jsxRuntime.jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsxRuntime.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsxRuntime.jsx("input",{ref:g,type:"tel",inputMode:"tel",value:S,onChange:V,onFocus:()=>R(true),onBlur:()=>R(false),disabled:m,placeholder:f??yT(L.format),className:u(pg({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:y?"var(--color-foreground)":void 0},...p})]})]})});gg.displayName="PhoneInput";var vg=classVarianceAuthority.cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"bordered",size:"md",sticky:false}}),hg=W__namespace.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=W__namespace.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxRuntime.jsxs("nav",{ref:l,className:u(vg({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o}),jsxRuntime.jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsxRuntime.jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"})})]}),c&&jsxRuntime.jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});hg.displayName="Navbar";var xg=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));xg.displayName="NavbarBrand";var yg=W__namespace.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsxRuntime.jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});yg.displayName="NavbarContent";var Rg=W__namespace.forwardRef(({className:e,isActive:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));Rg.displayName="NavbarItem";var wg=W__namespace.forwardRef(({className:e,isActive:t,...n},r)=>jsxRuntime.jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));wg.displayName="NavbarLink";var Tg=classVarianceAuthority.cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",bordered:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"bordered",size:"md",underline:"hover"}}),Mg=W__namespace.forwardRef(({className:e,variant:t,size:n,underline:r,isExternal:o,showExternalIcon:a=true,isDisabled:s,children:i,...l},c)=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxRuntime.jsxs("a",{ref:c,className:u(Tg({variant:t,size:n,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});Mg.displayName="Link";var Ng=classVarianceAuthority.cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),kg=W__namespace.forwardRef(({className:e,position:t,threshold:n=400,icon:r,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=W__namespace.useState(false);W__namespace.useEffect(()=>{let w=c?.current||window,y=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return w.addEventListener("scroll",y,{passive:true}),y(),()=>{w.removeEventListener("scroll",y);}},[n,c,g,d]);let v=w=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(w);},b=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:u(Ng({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsxRuntime.jsx(oe,{ref:p,type:"button",variant:a,color:s,size:"icon",radius:l,onClick:v,"aria-label":"Back to top",className:u("shadow-lg",i==="sm"&&"h-9 w-9",i==="md"&&"h-10 w-10",i==="lg"&&"h-12 w-12"),...f,children:r||jsxRuntime.jsx(lucideReact.ArrowUp,{className:b})})})});kg.displayName="BackTop";var IT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),VT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),Pg=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ys=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),Eg=W__namespace.createContext(null),ar=()=>{let e=W__namespace.useContext(Eg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},Lg=W__namespace.createContext(null),oa=()=>{let e=W__namespace.useContext(Lg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},xl=W__namespace.createContext(null),Sg=W__namespace.createContext(null),Dg=W__namespace.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(Eg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsxRuntime.jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",IT({radius:n}),e),...r,children:t})})});Dg.displayName="Menubar";var Hg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=W__namespace.useId(),o=W__namespace.useRef(null),a=t===r,s=W__namespace.useCallback(i=>{n(i?r:null);},[r,n]);return jsxRuntime.jsx(Lg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};Hg.displayName="MenubarMenu";var Ig=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Ig.displayName="MenubarGroup";var Vg=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Vg.displayName="MenubarPortal";var Ag=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),s=t!==void 0,i=s?t:o,l=W__namespace.useRef(null),c=W__namespace.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsxRuntime.jsx(xl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ag.displayName="MenubarSub";var zg=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Sg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));zg.displayName="MenubarRadioGroup";var Og=W__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=oa(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsxRuntime.jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",VT({radius:i}),e),onClick:f,onMouseEnter:p,...r})});Og.displayName="MenubarTrigger";var Bg=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=W__namespace.useContext(xl);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxRuntime.jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ys({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Bg.displayName="MenubarSubTrigger";var Fg=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=W__namespace.useContext(xl);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=W__namespace.useState({top:0,left:0}),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null);W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let y=d.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=y.top,x=y.right+t;x+R.width>window.innerWidth&&(x=y.left-R.width-t),f({top:C,left:x});})();},[l,t,d]);let v=w=>{n?.(w),c(true);},b=w=>{r?.(w),c(false);};return !p||!l?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:w=>{h.current=w,typeof a=="function"?a(w):a&&(a.current=w);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",Pg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:v,onMouseLeave:b,...o}),document.body)});Fg.displayName="MenubarSubContent";var Kg=W__namespace.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=oa(),[m,f]=W__namespace.useState({top:0,left:0}),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null);return W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!c||!l.current||!h.current)return;let v=()=>{if(!l.current||!h.current)return;let b=l.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),y=b.bottom+r,R=b.left+n;t==="center"?R=b.left+b.width/2-w.width/2:t==="end"&&(R=b.right-w.width-n),f({top:y,left:R});};return v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,true),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,true);}},[c,t,n,r,l]),W__namespace.useEffect(()=>{if(!c)return;let v=b=>{let w=b.target;h.current&&!h.current.contains(w)&&l.current&&!l.current.contains(w)&&d(false);};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c,d,l]),W__namespace.useEffect(()=>{if(!c)return;let v=b=>{b.key==="Escape"&&d(false);};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[c,d]),!p||!c?null:_a__namespace.createPortal(jsxRuntime.jsx("div",{ref:v=>{h.current=v,typeof s=="function"?s(v):s&&(s.current=v);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",Pg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});Kg.displayName="MenubarContent";var Gg=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=oa(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ys({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Gg.displayName="MenubarItem";var $g=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=oa(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return jsxRuntime.jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ys({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});$g.displayName="MenubarCheckboxItem";var Ug=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=oa(),c=W__namespace.useContext(Sg),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ys({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-2 w-2 fill-current"})}),t]})});Ug.displayName="MenubarRadioItem";var Wg=W__namespace.forwardRef(({className:e,inset:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Wg.displayName="MenubarLabel";var jg=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));jg.displayName="MenubarSeparator";var Yg=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Yg.displayName="MenubarShortcut";var _g=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Xg=W__namespace.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=W__namespace.Children.toArray(o);return jsxRuntime.jsx("div",{ref:s,className:u(_g({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>W__namespace.isValidElement(l)?W__namespace.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<r?"completed":c===r?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:n}):l)})});Xg.displayName="Steps";var qg=classVarianceAuthority.cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),zT=classVarianceAuthority.cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),OT=classVarianceAuthority.cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),Zg=W__namespace.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxRuntime.jsxs("div",{ref:d,className:u(qg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsxRuntime.jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:u(zT({status:s,size:n})),children:s==="completed"?jsxRuntime.jsx(lucideReact.Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxRuntime.jsxs("div",{className:"flex flex-col",children:[r&&jsxRuntime.jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsxRuntime.jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsxRuntime.jsx("div",{className:u(OT({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Zg.displayName="Step";var Jg=classVarianceAuthority.cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),eb=classVarianceAuthority.cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),tb=W__namespace.createContext(null),jT=()=>{let e=W__namespace.useContext(tb);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},YT=({checked:e,indeterminate:t,disabled:n,onClick:r})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:n,onClick:o=>{o.stopPropagation(),n||r(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",n&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:t?jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3"}):jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})}),nb=({node:e,level:t,isLast:n=false,parentIsLastPath:r=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:v,dragOverPosition:b,setDragOver:w,handleDrop:y,allowDrop:R,onDragStart:C,onDragOver:x,onDragEnter:N,onDragLeave:T,onDragEnd:k,showLine:M,showIcon:P,showHandle:E,dragIcon:D,icon:H,leafIcon:L,folderIcon:S,folderOpenIcon:V,blockNode:z,disabled:F,size:I,getAllKeys:K}=jT(),B=e.children&&e.children.length>0,q=e.isLeaf??!B,ne=o.has(e.key),G=s.has(e.key),O=c.has(e.key),j=d.has(e.key),A=g?.key===e.key,Y=v===e.key,ie=!!(F||e.disabled),Te=l&&e.selectable!==false,U=f&&e.checkable!==false,dt=W__namespace.useMemo(()=>ie?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,ie]),ee=W__namespace.useMemo(()=>D!==void 0?D:typeof p=="object"&&p.icon!==void 0?p.icon:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4"}),[D,p]),nt=W__namespace.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:ne,isLeaf:q}):H:q?L:ne?V:S,[e.icon,H,ne,q,L,S,V]),Gn=_=>{if(!dt)return;_.stopPropagation(),_.dataTransfer.effectAllowed="move";let Le=_.currentTarget,ce=Le.cloneNode(true),Ge=document.documentElement.classList.contains("dark"),$e=Ge?"#0a0a0a":"#ffffff",Un=Ge?"#27272a":"#e4e4e7";ce.style.cssText=`
|
|
44
44
|
position: fixed;
|
|
45
45
|
top: -9999px;
|
|
46
46
|
left: -9999px;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
width: ${Le.offsetWidth}px;
|
|
53
53
|
opacity: 1;
|
|
54
54
|
z-index: 9999;
|
|
55
|
-
`,document.body.appendChild(ce),_.dataTransfer.setDragImage(ce,20,15),setTimeout(()=>{document.body.removeChild(ce);},0),h(e),C?.({event:_,node:e});},vt=_=>{if(_.preventDefault(),_.stopPropagation(),!g||g.key===e.key||ie)return;let Le=_.currentTarget.getBoundingClientRect(),ce=_.clientY-Le.top,Ge=Le.height,$e;ce<Ge*.25?$e=-1:ce>Ge*.75?$e=1:$e=0,!(R&&!R({dropNode:e,dropPosition:$e,dragNode:g}))&&(w(e.key,$e),x?.({event:_,node:e}));},xr=_=>{_.preventDefault(),_.stopPropagation(),!(!g||g.key===e.key)&&N?.({event:_,node:e,expandedKeys:K()});},$n=_=>{_.stopPropagation(),T?.({event:_,node:e});},Ko=_=>{_.preventDefault(),_.stopPropagation(),!(!g||g.key===e.key||ie)&&(b!==null&&y(e,b),h(null),w(null,null));},Gt=_=>{h(null),w(null,null),k?.({event:_,node:e});},La=_=>{ie||Te&&i(e.key,e,_);},yr=_=>{_.stopPropagation(),!ie&&!q&&a(e.key,e);},$=W__namespace.useMemo(()=>{if(!Y||b===null)return "";switch(b){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[Y,b]),re=[...r,n];return jsxRuntime.jsxs("div",{className:"relative",children:[M&&t>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.map((_,Le)=>!_&&jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Le} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Le)),jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsxRuntime.jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":q?void 0:ne,"aria-selected":Te?G:void 0,"aria-disabled":ie,draggable:dt,onDragStart:Gn,onDragOver:vt,onDragEnter:xr,onDragLeave:$n,onDrop:Ko,onDragEnd:Gt,onClick:La,className:u("relative",eb({size:I,isSelected:G,isDragging:A,isDisabled:ie,isHoverable:Te&&!ie}),$,z&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[dt&&E&&ee!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:ee}),jsxRuntime.jsx("button",{type:"button",onClick:yr,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",q&&"invisible"),tabIndex:-1,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",ne&&"rotate-90")})}),U&&jsxRuntime.jsx(YT,{checked:O,indeterminate:j,disabled:ie,onClick:_=>m(e.key,e,_)}),P&&nt&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:nt}),jsxRuntime.jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",z&&"flex-none"),children:e.label})]}),B&&ne&&jsxRuntime.jsx("div",{role:"group",children:e.children.map((_,Le)=>jsxRuntime.jsx(nb,{node:_,level:t+1,isLast:Le===e.children.length-1,parentIsLastPath:re},_.key))})]})},_T=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},XT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},rb=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||rb(n,t))return true;return false},ob=W__namespace.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:v=false,checkedKeys:b,defaultCheckedKeys:w=[],onCheck:y,showLine:R=false,showIcon:C=false,showHandle:x=true,dragIcon:N,icon:T,leafIcon:k=jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),folderIcon:M=jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),folderOpenIcon:P=jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}),onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,onDrop:V,blockNode:z=false,disabled:F=false,...I},K)=>{let B=W__namespace.useCallback(()=>l?new Set(_T(r)):new Set(i),[l,i,r]),[q,ne]=W__namespace.useState(B),G=s!==void 0,O=G?new Set(s):q,j=W__namespace.useCallback((pe,We)=>{let $t=new Set(O),Ie=!$t.has(pe);Ie?$t.add(pe):$t.delete(pe),G||ne($t),c?.(Array.from($t),{expanded:Ie,node:We});},[O,G,c]),[A,Y]=W__namespace.useState(new Set(p)),ie=f!==void 0,Te=ie?new Set(f):A,U=W__namespace.useCallback((pe,We,$t)=>{let Ie=new Set(Te),vn=!Ie.has(pe);m?vn?Ie.add(pe):Ie.delete(pe):(Ie.clear(),vn&&Ie.add(pe)),ie||Y(Ie);let Xr=[],Go=Sa=>{for(let qr of Sa)Ie.has(qr.key)&&Xr.push(qr),qr.children&&Go(qr.children);};Go(r),g?.(Array.from(Ie),{selected:vn,selectedNodes:Xr,node:We,event:$t});},[Te,m,ie,g,r]),[dt,ee]=W__namespace.useState(new Set(w)),[nt,Gn]=W__namespace.useState(new Set),vt=b!==void 0,xr=vt?new Set(Array.isArray(b)?b:b.checked):dt,$n=vt&&!Array.isArray(b)?new Set(b.halfChecked):nt,Ko=W__namespace.useCallback((pe,We,$t)=>{let Ie=new Set(xr),vn=new Set($n),Xr=!Ie.has(pe);if(Xr?(Ie.add(pe),vn.delete(pe)):Ie.delete(pe),!v&&We.children){let Ni=XT(We);for(let Wn of Ni)Xr?(Ie.add(Wn),vn.delete(Wn)):Ie.delete(Wn);}vt||(ee(Ie),Gn(vn));let Go=[],Sa=Ni=>{for(let Wn of Ni)Ie.has(Wn.key)&&Go.push(Wn),Wn.children&&Sa(Wn.children);};Sa(r);let qr=v?{checked:Array.from(Ie),halfChecked:Array.from(vn)}:Array.from(Ie);y?.(qr,{checked:Xr,checkedNodes:Go,node:We,event:$t,halfCheckedKeys:Array.from(vn)});},[xr,$n,v,vt,y,r]),[Gt,La]=W__namespace.useState(null),[yr,$]=W__namespace.useState(null),[re,_]=W__namespace.useState(null),Le=W__namespace.useCallback((pe,We)=>{$(pe),_(We);},[]),ce=W__namespace.useCallback((pe,We)=>{!Gt||!V||We===0&&rb(Gt,pe.key)||V({event:{},node:pe,dragNode:Gt,dropPosition:We,dropToGap:We!==0});},[Gt,V]),Ge=W__namespace.useCallback(()=>Array.from(O),[O]),$e={expandedKeys:O,toggleExpand:j,selectedKeys:Te,handleSelect:U,selectable:d,multiple:m,checkedKeys:xr,halfCheckedKeys:$n,handleCheck:Ko,checkable:h,checkStrictly:v,draggable:o,draggedNode:Gt,setDraggedNode:La,dragOverKey:yr,dragOverPosition:re,setDragOver:Le,handleDrop:ce,allowDrop:a,onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,showLine:R,showIcon:C,showHandle:x,dragIcon:N,icon:T,leafIcon:k,folderIcon:M,folderOpenIcon:P,blockNode:z,disabled:F,size:n,data:r,getAllKeys:Ge},Un=pe=>{let We=pe.relatedTarget,$t=pe.currentTarget;(!We||!$t.contains(We))&&Le(null,null);};return jsxRuntime.jsx(tb.Provider,{value:$e,children:jsxRuntime.jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Jg({variant:t,size:n,className:e})),onDragLeave:Un,...I,children:r.map((pe,We)=>jsxRuntime.jsx(nb,{node:pe,level:0,isLast:We===r.length-1},pe.key))})})});ob.displayName="Tree";var sb=classVarianceAuthority.cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),tM=({text:e,query:t})=>{if(!t)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map((o,a)=>n.test(o)?jsxRuntime.jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsxRuntime.jsx("span",{children:o},a))})},nM=(e,t)=>{let[n,r]=W__namespace.useState(e);return W__namespace.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},ib=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:v=true,fullWidth:b=false,disabled:w,...y},R)=>{let[C,x]=W__namespace.useState(false),[N,T]=W__namespace.useState(r),[k,M]=W__namespace.useState([]),[P,E]=W__namespace.useState(false),[D,H]=W__namespace.useState(false),[L,S]=W__namespace.useState(0),V=W__namespace.useRef(null),z=W__namespace.useRef(null),F=n!==void 0?n:N,I=nM(F,l);W__namespace.useEffect(()=>{let U=z.current;if(!U)return;let dt=()=>{S(U.offsetWidth);};dt();let ee=new ResizeObserver(dt);return ee.observe(U),()=>{ee.disconnect();}},[]),W__namespace.useImperativeHandle(R,()=>V.current);let K=i?k:s,B=W__namespace.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(F.toLowerCase())),[K,F,i]);W__namespace.useEffect(()=>{if(!i)return;if(I.length<c){M([]);return}let U=false;return (async()=>{E(true);try{let ee=await i(I);U||M(ee);}catch{U||M([]);}finally{U||E(false);}})(),()=>{U=true;}},[I,i,c]);let q=U=>{n===void 0&&T(U),o?.(U);},ne=U=>{let dt=U.target.value;q(dt),dt.length>=c&&x(true);},G=U=>{q(U.label),a?.(U),x(false);},O=()=>{q(""),V.current?.focus();},j=()=>{H(true),x(true);},A=()=>{H(false);},Y=U=>{U.key==="Escape"&&x(false),U.key==="ArrowDown"&&!C&&B.length>0&&x(true);},ie=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",Te=p&&F?"pr-8":"pr-3";return jsxRuntime.jsxs(rt,{open:C,onOpenChange:x,children:[jsxRuntime.jsxs(oo,{ref:z,className:u("relative",b?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:V,type:"text",value:F,onChange:ne,onFocus:j,onBlur:A,onKeyDown:Y,disabled:w,placeholder:d,className:u(sb({size:t,fullWidth:b}),Te,e),style:{borderColor:D?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...y}),p&&F&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsxRuntime.jsx(lucideReact.X,{className:ie})})]}),jsxRuntime.jsx(ot,{className:"p-0",align:"start",style:{width:L>0?L:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsxRuntime.jsx(cmdk.Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsxRuntime.jsx(ze,{style:{maxHeight:h},children:jsxRuntime.jsx(cmdk.Command.List,{id:"autocomplete-list",className:"p-1",children:P?jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(ie,"animate-spin")}),f]}):B.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):B.map(U=>jsxRuntime.jsxs(cmdk.Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>G(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsxRuntime.jsx(lucideReact.Check,{className:u("mr-2 h-4 w-4 shrink-0",F===U.label?"opacity-100":"opacity-0")}),jsxRuntime.jsx("span",{className:"flex-1",children:v?jsxRuntime.jsx(tM,{text:U.label,query:F}):U.label})]},U.value))})})})})]})});ib.displayName="Autocomplete";var Tl=W__namespace.createContext(null),Ml=W__namespace.createContext(null),Nl=()=>{let e=W__namespace.useContext(Tl);if(!e)throw new Error("useFormContext must be used within a Form");return e},Cs=()=>{let e=W__namespace.useContext(Ml);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},rM={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},lb=W__namespace.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=W__namespace.useState(e),[m,f]=W__namespace.useState({}),[p,g]=W__namespace.useState({}),[h,v]=W__namespace.useState({}),[b,w]=W__namespace.useState(false),y=W__namespace.useRef(new Map),R=W__namespace.useCallback((L,S)=>{y.current.set(L,S);},[]),C=W__namespace.useCallback(L=>{y.current.delete(L);},[]),x=W__namespace.useCallback(L=>{let S=y.current.get(L)||[],V=c[L];for(let z of S)if(!z.validate(V))return f(F=>({...F,[L]:z.message})),false;return f(z=>({...z,[L]:null})),true},[c]),N=W__namespace.useCallback(()=>{let L=true,S={};return y.current.forEach((V,z)=>{let F=c[z];for(let I of V)if(!I.validate(F)){S[z]=I.message,L=false;break}S[z]||(S[z]=null);}),f(S),L},[c]),T=W__namespace.useCallback((L,S)=>{d(V=>({...V,[L]:S})),v(V=>({...V,[L]:true})),o&&setTimeout(()=>{x(L);},0);},[o,x]),k=W__namespace.useCallback((L,S)=>{f(V=>({...V,[L]:S}));},[]),M=W__namespace.useCallback((L,S)=>{g(V=>({...V,[L]:S})),S&&r&&x(L);},[r,x]),P=W__namespace.useCallback(L=>({value:c[L],error:m[L]??null,touched:p[L]??false,dirty:h[L]??false}),[c,m,p,h]),E=W__namespace.useCallback(()=>{d(e),f({}),g({}),v({});},[e]),D=async L=>{L.preventDefault();let S={};if(y.current.forEach((z,F)=>{S[F]=true;}),g(S),!N()){n?.(m);return}if(t){w(true);try{await t(c);}finally{w(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:b,setValue:T,setError:k,setTouched:M,validateField:x,validateAll:N,registerField:R,unregisterField:C,getFieldState:P,reset:E};return jsxRuntime.jsx(Tl.Provider,{value:H,children:jsxRuntime.jsx("form",{ref:l,onSubmit:D,className:u("space-y-4",s),...i,children:a})})});lb.displayName="Form";var cb=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=Nl(),a=W__namespace.useId();W__namespace.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsxRuntime.jsx(Ml.Provider,{value:i,children:r})};cb.displayName="FormField";var db=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));db.displayName="FormItem";var ub=W__namespace.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=Cs();return jsxRuntime.jsxs(Tr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsxRuntime.jsx("span",{className:"ml-1 text-danger",children:"*"})]})});ub.displayName="FormLabel";var mb=({children:e})=>{let{name:t,id:n,error:r,touched:o}=Cs(),a=Nl(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return W__namespace.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};mb.displayName="FormControl";var pb=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));pb.displayName="FormDescription";var fb=W__namespace.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=Cs(),i=t??(s?a:null);return i?jsxRuntime.jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});fb.displayName="FormMessage";var bb=classVarianceAuthority.cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),vb=W__namespace.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxRuntime.jsxs("div",{ref:l,className:u(bb({size:t,className:e})),...i,children:[jsxRuntime.jsxs(Mr,{"data-user-avatar":true,children:[o&&jsxRuntime.jsx(no,{src:o,alt:n}),jsxRuntime.jsx(Nr,{children:c})]}),jsxRuntime.jsxs("div",{className:"flex flex-col min-w-0",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsxRuntime.jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});vb.displayName="User";var xb=classVarianceAuthority.cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),yb=W__namespace.forwardRef(({className:e,variant:t,size:n,...r},o)=>jsxRuntime.jsx("code",{ref:o,className:u(xb({variant:t,size:n,className:e})),...r}));yb.displayName="Code";function Tb(e){let[t,n]=W.useState(false);return W.useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var Mb=W__namespace.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=W.useState(false),f=Tb(s)?prismReactRenderer.themes.oneDark:prismReactRenderer.themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxRuntime.jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsxRuntime.jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(prismReactRenderer.Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:v})=>jsxRuntime.jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((b,w)=>jsxRuntime.jsxs("div",{...h({line:b}),children:[n&&jsxRuntime.jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:w+1}),b.map((y,R)=>jsxRuntime.jsx("span",{...v({token:y})},R))]},w))})}),!i&&jsxRuntime.jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})})]})]})});Mb.displayName="CodeBlock";var Nb=W__namespace.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=W.useState(0),[s,i]=W.useState(false),c=Tb(n)?prismReactRenderer.themes.oneDark:prismReactRenderer.themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxRuntime.jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsxRuntime.jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(prismReactRenderer.Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsxRuntime.jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((v,b)=>jsxRuntime.jsx("div",{...g({line:v}),children:v.map((w,y)=>jsxRuntime.jsx("span",{...h({token:w})},y))},b))})}),jsxRuntime.jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})})]})]})});Nb.displayName="TabbedCodeBlock";var kb=classVarianceAuthority.cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),Pb=W__namespace.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=W__namespace.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxRuntime.jsxs("div",{ref:d,className:u(kb({variant:t,size:n,className:e})),...c,children:[!l&&jsxRuntime.jsx("span",{className:"text-muted-foreground select-none",children:i}),jsxRuntime.jsx("code",{className:"flex-1 truncate",children:r}),o&&jsxRuntime.jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-green-500"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});Pb.displayName="Snippet";var Ll=classVarianceAuthority.cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Eb=W__namespace.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=W__namespace.useState("loading");W__namespace.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},v=()=>{g("error"),i?.();},b={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsxRuntime.jsx("div",{className:u(Ll({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxRuntime.jsxs("div",{className:u(Ll({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsxRuntime.jsx($a,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:v,className:u("h-full w-full transition-opacity duration-300",b,p==="loading"?"opacity-0":"opacity-100"),...m})]})});Eb.displayName="Image";var Db=classVarianceAuthority.cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),Hb=classVarianceAuthority.cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),Ib=W__namespace.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),Vb=W__namespace.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=W__namespace.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(v=>v!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsxRuntime.jsx(Ib.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsxRuntime.jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(Db({size:t,className:e})),...i,children:s})})});Vb.displayName="Listbox";var Ab=W__namespace.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=W__namespace.useContext(Ib),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxRuntime.jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(Hb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsxRuntime.jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:a}),o&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsxRuntime.jsx(lucideReact.Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});Ab.displayName="ListboxItem";var Ob=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Bb=classVarianceAuthority.cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function vM({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=W__namespace.useState(null),[f,p]=W__namespace.useState(null),g=(y,R)=>{i||(m(R),y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",String(R)));},h=(y,R)=>{y.preventDefault(),!(i||d===null||d===R)&&p(R);},v=()=>{p(null);},b=(y,R)=>{if(y.preventDefault(),i||d===null||d===R){m(null),p(null);return}let C=[...r],[x]=C.splice(d,1);C.splice(R,0,x),o?.(C),m(null),p(null);},w=()=>{m(null),p(null);};return jsxRuntime.jsx("div",{ref:c,className:u(Ob({variant:t,size:n,className:e})),...l,children:r.map((y,R)=>jsxRuntime.jsxs("div",{draggable:!i,onDragStart:C=>g(C,R),onDragOver:C=>h(C,R),onDragLeave:v,onDrop:C=>b(C,R),onDragEnd:w,className:u(Bb({variant:t,size:n,isDragging:d===R,isDragOver:f===R}),!i&&"cursor-move"),children:[s&&jsxRuntime.jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:a(y,R)})]},y.id))})}var hM=W__namespace.forwardRef(vM);var Gb=classVarianceAuthority.cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),wM={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},$b=W__namespace.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxRuntime.jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsxRuntime.jsx("div",{className:u(Gb({variant:t,visible:n})),"aria-hidden":!n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsxRuntime.jsx(lucideReact.Loader2,{className:u(wM[r],"animate-spin text-primary")}),a&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));$b.displayName="LoadingOverlay";var Ub=classVarianceAuthority.cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),Wb=W__namespace.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=W__namespace.useState(0),[c,d]=W__namespace.useState(false),m=W__namespace.useRef(null);return W__namespace.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:s,className:u(Ub({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsxRuntime.jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsxRuntime.jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsxRuntime.jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});Wb.displayName="NProgress";var Xb=classVarianceAuthority.cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),jb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},PM={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},qb=W__namespace.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsxRuntime.jsx("div",{className:u(PM[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsxRuntime.jsx("div",{className:u(jb[n||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxRuntime.jsxs("div",{className:"w-full space-y-2",children:[jsxRuntime.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsxRuntime.jsx(lucideReact.Loader2,{className:u(jb[n||"md"],"animate-spin",l)})}};return jsxRuntime.jsx("div",{ref:i,className:u(Xb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsxRuntime.jsx("span",{className:u("text-sm",l),children:o})]})})});qb.displayName="Loading";var Hl=class extends W__namespace.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,n){this.props.onError?.(t,n);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,o)=>r!==t.resetKeys?.[o])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsx(Il,{error:this.state.error,onReset:this.reset}):this.props.children}},Il=W__namespace.forwardRef(({error:e,onReset:t,className:n},r)=>jsxRuntime.jsxs("div",{ref:r,className:u("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",n),role:"alert",children:[jsxRuntime.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxRuntime.jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));Il.displayName="DefaultErrorFallback";var SM=Hl;var Qb=W__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},m)=>{let[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),v=e!==void 0,b=v?e:g,w=R=>{v||h(R),n?.(R);},y=R=>{if(!R)return r;let{from:C,to:x}=R;return C&&x?`${dateFns.format(C,o)} - ${dateFns.format(x,o)}`:C?dateFns.format(C,o):r};return jsxRuntime.jsxs(rt,{open:f,onOpenChange:p,children:[jsxRuntime.jsxs(Dt,{ref:m,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!b?.from&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",c),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),y(b)]}),jsxRuntime.jsx(ot,{className:"w-auto p-0",align:d,children:jsxRuntime.jsx(so,{mode:"range",defaultMonth:b?.from,selected:b,onSelect:w,numberOfMonths:l,disabled:R=>!!(s&&R<s||i&&R>i),initialFocus:true})})]})});Qb.displayName="DateRangePicker";var bo=e=>String(e).padStart(2,"0"),Jb=W__namespace.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=W__namespace.useState(false),d=r?Array.from({length:24},(y,R)=>R):Array.from({length:12},(y,R)=>R+1),m=Array.from({length:Math.floor(60/o)},(y,R)=>R*o),f=y=>{if(!y)return n;if(r)return `${bo(y.hours)}:${bo(y.minutes)}`;let R=y.hours%12||12,C=y.hours>=12?"PM":"AM";return `${bo(R)}:${bo(y.minutes)} ${C}`},p=y=>{let R=e?.minutes??0,C=y;if(!r&&e){let x=e.hours>=12;x&&y!==12?C=y+12:!x&&y===12&&(C=0);}t?.({hours:C,minutes:R});},g=y=>{let R=e?.hours??0;t?.({hours:R,minutes:y});},h=y=>{if(!e)return;let R=e.hours;y==="AM"&&e.hours>=12?R=e.hours-12:y==="PM"&&e.hours<12&&(R=e.hours+12),t?.({hours:R,minutes:e.minutes});},v=()=>{let y=new Date;t?.({hours:y.getHours(),minutes:y.getMinutes()});},b=e?e.hours>=12?"PM":"AM":void 0,w=e?r?e.hours:e.hours%12||12:void 0;return jsxRuntime.jsxs(rt,{open:l,onOpenChange:c,children:[jsxRuntime.jsxs(Dt,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"}),f(e)]}),jsxRuntime.jsxs(ot,{className:"w-auto p-0",align:"start",children:[jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:d.map(y=>jsxRuntime.jsx(oe,{variant:w===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(y),children:bo(y)},y))})})]}),jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:m.map(y=>jsxRuntime.jsx(oe,{variant:e?.minutes===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(y),children:bo(y)},y))})})]}),!r&&jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsxRuntime.jsx(oe,{variant:b==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsxRuntime.jsx(oe,{variant:b==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxRuntime.jsxs("div",{className:"flex justify-between border-t p-2",children:[jsxRuntime.jsx(oe,{variant:"ghost",size:"sm",onClick:v,children:"Now"}),jsxRuntime.jsx(oe,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Jb.displayName="TimePicker";var ev=classVarianceAuthority.cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function VM({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0);W__namespace.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,v=r+l,b=Math.max(0,Math.floor(p/v)-a),w=Math.ceil(o/v)+2*a,y=Math.min(n.length-1,b+w),R=x=>{let N=x.currentTarget.scrollTop;g(N),c?.(N);},C=W__namespace.useMemo(()=>{let x=[];for(let N=b;N<=y;N++)n[N]!==void 0&&x.push({item:n[N],index:N,style:{position:"absolute",top:N*v,left:0,right:0,height:r}});return x},[n,b,y,v,r]);return jsxRuntime.jsx("div",{ref:f,className:u(ev({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:R,...d,children:jsxRuntime.jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:x,index:N,style:T})=>jsxRuntime.jsx("div",{style:T,children:s(x,N)},i?i(x,N):N))})})}var AM=W__namespace.forwardRef(VM);var nv=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Ol=classVarianceAuthority.cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),rv=W__namespace.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,...f},p)=>{let g=W__namespace.useRef(null),h=W__namespace.useRef(null),v=W__namespace.useRef(false);W__namespace.useImperativeHandle(p,()=>g.current),W__namespace.useEffect(()=>{let w=h.current;if(!w)return;let y=new IntersectionObserver(R=>{let[C]=R;C.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return y.observe(w),()=>{y.disconnect();}},[a,s,o,l,c,d]);let b=jsxRuntime.jsx("div",{className:u(Ol({size:n})),children:jsxRuntime.jsx(lucideReact.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxRuntime.jsxs("div",{ref:g,className:u(nv({variant:t,className:e})),...f,children:[r,jsxRuntime.jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||b),!a&&!s&&m&&jsxRuntime.jsx("div",{className:u(Ol({size:n}),"text-muted-foreground text-sm"),children:m})]})});rv.displayName="InfiniteScroll";var ca=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));ca.displayName="VisuallyHidden";var av={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},FM={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},sv=classVarianceAuthority.cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Bl=classVarianceAuthority.cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Hs=W__namespace.createContext(null),Ar=()=>{let e=W__namespace.useContext(Hs);if(!e)throw new Error("Modal components must be used within a Modal");return e},lv=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=W__namespace.useState(false),v=e!==void 0,b=v?e:g,[w,y]=W__namespace.useState(false),R=W__namespace.useRef(null),C=W__namespace.useId(),x=W__namespace.useId();W__namespace.useEffect(()=>{y(true);},[]);let N=W__namespace.useCallback(P=>{v||h(P),t?.(P);},[v,t]);W__namespace.useEffect(()=>{if(b)return ut(),()=>mt()},[b]),W__namespace.useEffect(()=>{if(!b||i)return;let P=E=>{E.key==="Escape"&&N(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[b,i,N]);let T=P=>{s&&P.target===P.currentTarget&&N(false);},k=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:P=>{n.props.onClick?.(P),N(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>N(true),children:n}):null,M=()=>!w||!b?null:d==="outside"?_a__namespace.createPortal(jsxRuntime.jsx("div",{"data-state":b?"open":"closed",className:u(sv(),av[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxRuntime.jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":x,"data-state":b?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(Tt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})}),document.body):_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":b?"open":"closed",className:u(sv(),av[l]),onClick:T,"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":x,"data-state":b?"open":"closed",className:u(Bl({size:m}),FM[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(Tt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})]}),document.body);return jsxRuntime.jsxs(Hs.Provider,{value:{open:b,onOpenChange:N,scrollBehavior:d,titleId:C,descriptionId:x},children:[k,M()]})});lv.displayName="Modal";var cv=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=W__namespace.useState(n),i=t!==void 0,l=i?t:a,c=W__namespace.useId(),d=W__namespace.useId(),m=W__namespace.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsxRuntime.jsx(Hs.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};cv.displayName="ModalRoot";var dv=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Ar();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});dv.displayName="ModalTrigger";var Fl=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Fl.displayName="ModalPortal";var Kl=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ar();return r?jsxRuntime.jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Kl.displayName="ModalOverlay";var uv=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Ar();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});uv.displayName="ModalClose";var mv=W__namespace.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Ar(),[f,p]=W__namespace.useState(false);return W__namespace.useEffect(()=>{p(true);},[]),W__namespace.useEffect(()=>{if(l)return ut(),()=>mt()},[l]),W__namespace.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxRuntime.jsxs(Fl,{children:[jsxRuntime.jsx(Kl,{}),jsxRuntime.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Bl({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsxRuntime.jsx(Tt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});mv.displayName="ModalContent";var pv=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pv.displayName="ModalHeader";var fv=({className:e,children:t})=>(W__namespace.useContext(Hs)?.scrollBehavior??"inside")==="inside"?jsxRuntime.jsx(ze,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsxRuntime.jsx("div",{className:u(e),children:t});fv.displayName="ModalBody";var gv=({className:e,children:t,...n})=>{let{onOpenChange:r}=Ar();return jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:W__namespace.Children.map(t,o=>W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};gv.displayName="ModalFooter";var bv=W__namespace.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Ar();return jsxRuntime.jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});bv.displayName="ModalTitle";var vv=W__namespace.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Ar();return jsxRuntime.jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});vv.displayName="ModalDescription";var yv=classVarianceAuthority.cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),YM=classVarianceAuthority.cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),_M=W__namespace.createContext(null),XM={default:lucideReact.HelpCircle,danger:lucideReact.XCircle,warning:lucideReact.AlertTriangle,success:lucideReact.CheckCircle,info:lucideReact.Info},Gl=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,confirmText:a="Confirm",cancelText:s="Cancel",onConfirm:i,onCancel:l,showIcon:c=true,icon:d,variant:m="default",loading:f=false,disabled:p=false,className:g},h)=>{let[v,b]=W__namespace.useState(false),[w,y]=W__namespace.useState(false),[R,C]=W__namespace.useState(false),x=e!==void 0,N=x?e:v,T=XM[m||"default"],k=W__namespace.useId(),M=W__namespace.useId();W__namespace.useEffect(()=>{C(true);},[]);let P=W__namespace.useCallback(V=>{x||b(V),t?.(V);},[x,t]);W__namespace.useEffect(()=>{if(N)return ut(),()=>mt()},[N]);let E=async()=>{if(i){let V=i();if(V instanceof Promise){y(true);try{await V;}finally{y(false);}}}P(false);},D=()=>{l?.(),P(false);},H=f||w,L=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:V=>{n.props.onClick?.(V),P(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>P(true),children:n}):null,S=()=>!R||!N?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":N?"open":"closed",className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:h,role:"alertdialog","aria-modal":"true","aria-labelledby":k,"aria-describedby":o?M:void 0,"data-state":N?"open":"closed",className:u("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",g),children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[c&&jsxRuntime.jsx("div",{className:u(yv({variant:m})),children:d||jsxRuntime.jsx(T,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsxRuntime.jsx("h2",{id:k,className:"text-lg font-semibold",children:r}),o&&jsxRuntime.jsx("p",{id:M,className:"text-sm text-muted-foreground",children:o})]})]}),jsxRuntime.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsxRuntime.jsx("button",{type:"button",className:u(hn({variant:"bordered"})),onClick:D,disabled:H,children:s}),jsxRuntime.jsx("button",{type:"button",className:u(hn(),YM({variant:m}),H&&"opacity-50 cursor-not-allowed"),onClick:E,disabled:p||H,children:H?jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):a})]})]})]}),document.body);return jsxRuntime.jsxs(_M.Provider,{value:{open:N,onOpenChange:P,titleId:k,descriptionId:M},children:[L,S()]})});Gl.displayName="ConfirmDialog";function qM(){let[e,t]=W__namespace.useState({open:false,options:null,resolve:null}),n=W__namespace.useCallback(i=>new Promise(l=>{t({open:true,options:i,resolve:l});}),[]),r=W__namespace.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),o=W__namespace.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),a=W__namespace.useCallback(i=>{i||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=W__namespace.useMemo(()=>e.options?jsxRuntime.jsx(Gl,{open:e.open,onOpenChange:a,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:o}):null,[e,r,o,a]);return {confirm:n,ConfirmDialog:s}}var iN=e=>e.map(t=>typeof t=="string"?{src:t}:t),$l=W__namespace.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let v=W__namespace.useMemo(()=>iN(e),[e]),[b,w]=W__namespace.useState(r),[y,R]=W__namespace.useState(1),[C,x]=W__namespace.useState(0),[N,T]=W__namespace.useState(false),[k,M]=W__namespace.useState(false),[P,E]=W__namespace.useState({x:0,y:0}),[D,H]=W__namespace.useState({x:0,y:0}),[L,S]=W__namespace.useState(false),V=W__namespace.useRef(null),z=v[b];W__namespace.useEffect(()=>{S(true);},[]),W__namespace.useEffect(()=>{w(r);},[r]),W__namespace.useEffect(()=>{o?.(b);},[b,o]),W__namespace.useEffect(()=>{R(1),x(0),E({x:0,y:0});},[b]),W__namespace.useEffect(()=>{if(t)return ut(),()=>mt()},[t]);let F=W__namespace.useCallback(()=>{w(ee=>ee>0?ee-1:v.length-1);},[v.length]),I=W__namespace.useCallback(()=>{w(ee=>ee<v.length-1?ee+1:0);},[v.length]),K=()=>{R(ee=>Math.min(ee+.5,4));},B=()=>{R(ee=>{let nt=Math.max(ee-.5,.5);return nt===1&&E({x:0,y:0}),nt});},q=()=>{x(ee=>(ee+90)%360);},ne=async()=>{if(z)try{let nt=await(await fetch(z.src)).blob(),Gn=URL.createObjectURL(nt),vt=document.createElement("a");vt.href=Gn,vt.download=z.alt||`image-${b+1}`,document.body.appendChild(vt),vt.click(),document.body.removeChild(vt),URL.revokeObjectURL(Gn);}catch{window.open(z.src,"_blank");}},G=async()=>{if(V.current)if(N)try{await document.exitFullscreen(),T(!1);}catch{}else try{await V.current.requestFullscreen(),T(!0);}catch{}},O=ee=>{y>1&&(M(true),H({x:ee.clientX-P.x,y:ee.clientY-P.y}));},j=ee=>{k&&y>1&&E({x:ee.clientX-D.x,y:ee.clientY-D.y});},A=()=>{M(false);},Y=()=>{n?.(false);},ie=ee=>{p&&ee.target===ee.currentTarget&&Y();},Te=W__namespace.useCallback(ee=>{switch(ee.key){case "ArrowLeft":F();break;case "ArrowRight":I();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":B();break}},[F,I,n]);if(W__namespace.useEffect(()=>{if(t)return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[t,Te]),W__namespace.useEffect(()=>{let ee=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",ee),()=>document.removeEventListener("fullscreenchange",ee)},[]),v.length===0)return null;let U=a?W__namespace.isValidElement(a)?W__namespace.cloneElement(a,{onClick:ee=>{a.props.onClick?.(ee),n?.(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[U,!L||!t?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:ie}),jsxRuntime.jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[f&&v.length>1&&jsxRuntime.jsxs("span",{className:"text-sm",children:[b+1," / ",v.length]}),z?.title&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium",children:z.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-5 w-5"})}),jsxRuntime.jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(y*100),"%"]}),jsxRuntime.jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-5 w-5"})})]}),l&&jsxRuntime.jsx("button",{onClick:q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-5 w-5"})}),c&&jsxRuntime.jsx("button",{onClick:ne,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-5 w-5"})}),d&&jsxRuntime.jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:N?"Exit fullscreen":"Fullscreen",children:N?jsxRuntime.jsx(lucideReact.Minimize2,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Maximize2,{className:"h-5 w-5"})}),jsxRuntime.jsxs("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxRuntime.jsxs("div",{ref:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:j,onMouseUp:A,onMouseLeave:A,children:[m&&v.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:F,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-6 w-6"})}),jsxRuntime.jsx("button",{onClick:I,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("img",{src:z?.src,alt:z?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":y>1?"cursor-grab":""),style:{transform:`translate(${P.x}px, ${P.y}px) scale(${y}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsxRuntime.jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&v.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:v.map((ee,nt)=>jsxRuntime.jsx("button",{onClick:()=>w(nt),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",b===nt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsxRuntime.jsx("img",{src:ee.src,alt:ee.alt||`Thumbnail ${nt+1}`,className:"h-full w-full object-cover"})},nt))})]})]}),document.body)]})});$l.displayName="ImageViewer";var wv=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=W__namespace.useState(false);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsxRuntime.jsx($l,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};wv.displayName="ImageViewerTrigger";var Cv=classVarianceAuthority.cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),Tv=W__namespace.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let m=a!=null;return jsxRuntime.jsxs("span",{ref:d,className:u(Cv({color:t,size:m?void 0:n,position:r,ping:o}),m&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsxRuntime.jsx("span",{className:u("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});Tv.displayName="Indicator";var Mv=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-flex",e),...n,children:t}));Mv.displayName="IndicatorWrapper";var kv=classVarianceAuthority.cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),Pv=W__namespace.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=W__namespace.useRef(null),[c,d]=W__namespace.useState({top:false,bottom:false,left:false,right:false});W__namespace.useImperativeHandle(i,()=>l.current);let m=W__namespace.useCallback(()=>{let b=l.current;if(!b)return;let{scrollTop:w,scrollLeft:y,scrollHeight:R,scrollWidth:C,clientHeight:x,clientWidth:N}=b;d({top:w>0,bottom:w<R-x-1,left:y>0,right:y<C-N-1});},[]);W__namespace.useEffect(()=>{let b=l.current;if(b)return m(),b.addEventListener("scroll",m),window.addEventListener("resize",m),()=>{b.removeEventListener("scroll",m),window.removeEventListener("resize",m);}},[m]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",v={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsxRuntime.jsx("div",{ref:l,className:u(kv({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:v,...s,children:a})});Pv.displayName="ScrollShadow";var Ev=classVarianceAuthority.cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),pN={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},fN={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},gN=e=>{let t=e.toLowerCase();return pN[t]||e.toUpperCase()},ua=e=>{let t=e.toLowerCase();return fN[t]||t},Is=e=>{let t=ua(e);return ["meta","control","alt","shift"].includes(t)},Lv=W__namespace.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{W__namespace.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(Is).map(ua),p=m.filter(h=>!Is(h)).map(ua),g=h=>{let v=f.includes("meta")===h.metaKey,b=f.includes("control")===h.ctrlKey,w=f.includes("alt")===h.altKey,y=f.includes("shift")===h.shiftKey,R=p.length===0||p.includes(h.key.toLowerCase());v&&b&&w&&y&&R&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[p>0&&jsxRuntime.jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsxRuntime.jsx("span",{children:gN(f)})]},p)):o;return jsxRuntime.jsx("kbd",{ref:c,className:u(Ev({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Lv.displayName="Kbd";function bN(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;W__namespace.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(Is).map(ua),i=a.filter(c=>!Is(c)).map(ua),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Sv=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",bordered:"border border-current hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Dv=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,successDuration:o=2e3,onCopySuccess:a,onCopyError:s,copyIcon:i,successIcon:l,...c},d)=>{let[m,f]=W__namespace.useState(false),p={sm:14,md:16,lg:20}[n??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),f(!0),a?.(),setTimeout(()=>{f(!1);},o);}catch(h){s?.(h);}};return jsxRuntime.jsx("button",{ref:d,type:"button",className:u(Sv({variant:t,size:n}),e),onClick:g,"aria-label":m?"Copied":"Copy to clipboard",...c,children:m?l??jsxRuntime.jsx(lucideReact.Check,{className:"text-success",style:{width:p,height:p}}):i??jsxRuntime.jsx(lucideReact.Copy,{style:{width:p,height:p}})})});Dv.displayName="CopyButton";var Iv=classVarianceAuthority.cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),TN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function NN(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function kN(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function zs(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function As(e){return zs(e,new Date)}function Hv(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return zs(r,t)||zs(o,t)||r<t&&o>t})}var Vv=W__namespace.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:m="en-US",...f},p)=>{let[g,h]=W__namespace.useState(new Date),v=s??g,b=M=>{i?i(M):h(M);},w=d===1?MN:TN,y=()=>{let M=new Date(v);o==="month"?M.setMonth(M.getMonth()-1):o==="week"?M.setDate(M.getDate()-7):M.setDate(M.getDate()-1),b(M);},R=()=>{let M=new Date(v);o==="month"?M.setMonth(M.getMonth()+1):o==="week"?M.setDate(M.getDate()+7):M.setDate(M.getDate()+1),b(M);},C=()=>{b(new Date);},x=()=>o==="day"?v.toLocaleDateString(m,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):v.toLocaleDateString(m,{year:"numeric",month:"long"}),N=()=>{let M=NN(v.getFullYear(),v.getMonth(),d);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col",children:[jsxRuntime.jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(P=>jsxRuntime.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsxRuntime.jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:M.map((P,E)=>{let D=Hv(r,P),H=P.getMonth()===v.getMonth();return jsxRuntime.jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(P),children:[jsxRuntime.jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",As(P)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:P.getDate()}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(L=>jsxRuntime.jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id)),D.length>3&&jsxRuntime.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},E)})})]})},T=()=>{let M=kN(v,d),P=Array.from({length:24},(E,D)=>D);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsxRuntime.jsx("div",{className:"p-2"}),M.map((E,D)=>jsxRuntime.jsxs("div",{className:u("p-2 text-center border-l",As(E)&&"bg-primary/10"),children:[jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsxRuntime.jsx("div",{className:u("text-lg font-semibold",As(E)&&"text-primary"),children:E.getDate()})]},D))]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(E=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),M.map((D,H)=>{let L=new Date(D);L.setHours(E,0,0,0);let S=r.filter(V=>{let z=new Date(V.start);return zs(z,D)&&z.getHours()===E});return jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(L),children:S.map(V=>jsxRuntime.jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),l?.(V);},children:V.title},V.id))},H)})]},E))})})]})},k=()=>{let M=Array.from({length:24},(E,D)=>D),P=Hv(r,v);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsx("div",{className:"p-4 border-b text-center",children:jsxRuntime.jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",As(v)&&"bg-primary text-primary-foreground"),children:v.getDate()})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_1fr]",children:M.map(E=>{let D=new Date(v);D.setHours(E,0,0,0);let H=P.filter(L=>new Date(L.start).getHours()===E);return jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:H.map(L=>jsxRuntime.jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id))})]},E)})})})]})};return jsxRuntime.jsxs("div",{ref:p,className:u(Iv({variant:t,size:n,className:e})),...f,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(oe,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsxRuntime.jsx(oe,{variant:"ghost",size:"icon",onClick:y,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(oe,{variant:"ghost",size:"icon",onClick:R,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),jsxRuntime.jsx("h2",{className:"text-lg font-semibold ml-2",children:x()})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(M=>jsxRuntime.jsx(oe,{variant:o===M?"solid":"ghost",size:"sm",onClick:()=>a?.(M),children:M.charAt(0).toUpperCase()+M.slice(1)},M))})]}),o==="month"&&N(),o==="week"&&T(),o==="day"&&k()]})});Vv.displayName="FullCalendar";var Ks=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxRuntime.jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsxRuntime.jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsxRuntime.jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsxRuntime.jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),pa=classVarianceAuthority.cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),fa=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],Av=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsxRuntime.jsx("div",{ref:m,className:u(pa({size:t,className:e})),...d,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.LineChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),s&&jsxRuntime.jsx(recharts.Legend,{}),r.map((f,p)=>jsxRuntime.jsx(recharts.Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Av.displayName="LineChart";var zv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.BarChart,{data:n,layout:d,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),s&&jsxRuntime.jsx(recharts.Legend,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));zv.displayName="BarChart";var Ov=W__namespace.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=fa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.PieChart,{children:[c&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),l&&jsxRuntime.jsx(recharts.Legend,{}),jsxRuntime.jsx(recharts.Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsxRuntime.jsx(recharts.Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Ov.displayName="PieChart";var Bv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.AreaChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),s&&jsxRuntime.jsx(recharts.Legend,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));Bv.displayName="AreaChart";var Gv=classVarianceAuthority.cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),$v=classVarianceAuthority.cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Zl=classVarianceAuthority.cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function qN({card:e,columnId:t,variant:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=sortable.useSortable({id:e.id,data:{columnId:t}}),m={transform:utilities.CSS.Transform.toString(l),transition:c};return jsxRuntime.jsx("div",{ref:i,style:m,className:u(Zl({variant:n,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:r?r(e,t):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function ZN({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxRuntime.jsxs("div",{className:u($v({variant:t})),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsxRuntime.jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsxRuntime.jsx(oe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(ze,{style:{height:s},children:jsxRuntime.jsxs("div",{className:"p-2 space-y-2",children:[jsxRuntime.jsx(sortable.SortableContext,{items:e.cards.map(i=>i.id),strategy:sortable.verticalListSortingStrategy,children:e.cards.map(i=>jsxRuntime.jsx(qN,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.id))}),e.cards.length===0&&jsxRuntime.jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Uv=W__namespace.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=W__namespace.useState(null),[p,g]=W__namespace.useState(null),h=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),v=R=>n.find(C=>C.cards.some(x=>x.id===R));return jsxRuntime.jsxs(core.DndContext,{sensors:h,collisionDetection:core.closestCorners,onDragStart:R=>{let{active:C}=R,x=v(C.id);if(x){let N=x.cards.find(T=>T.id===C.id);N&&(f(N),g(x.id));}},onDragOver:R=>{let{active:C,over:x}=R;if(!x)return;let N=C.id,T=x.id,k=v(N),M=v(T)||n.find(D=>D.id===T);if(!k||!M||k.id===M.id)return;let P=M.cards.findIndex(D=>D.id===T),E=P===-1?M.cards.length:P;r?.(N,k.id,M.id,E);},onDragEnd:R=>{let{active:C,over:x}=R;if(x&&C.id!==x.id){let N=v(C.id),T=v(x.id)||n.find(k=>k.id===x.id);if(N&&T){let k=T.cards.findIndex(P=>P.id===x.id),M=k===-1?T.cards.length:k;r?.(C.id,N.id,T.id,M);}}f(null),g(null);},children:[jsxRuntime.jsx("div",{ref:d,className:u(Gv({variant:t,className:e})),...c,children:n.map(R=>jsxRuntime.jsx(ZN,{column:R,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},R.id))}),jsxRuntime.jsx(core.DragOverlay,{children:m&&p&&jsxRuntime.jsx("div",{className:u(Zl({variant:t,isDragging:true})),children:s?s(m,p):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:m.title}),m.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});Uv.displayName="KanbanBoard";var Wv=classVarianceAuthority.cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),jv=W__namespace.createContext(null);function $s(){let e=W__namespace.useContext(jv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Yv=W__namespace.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=QN__default.default({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=W__namespace.useState(false),[h,v]=W__namespace.useState(false),[b,w]=W__namespace.useState(0),[y,R]=W__namespace.useState([]),C=W__namespace.useCallback(M=>{M&&(w(M.selectedScrollSnap()),g(M.canScrollPrev()),v(M.canScrollNext()));},[]),x=W__namespace.useCallback(()=>{f?.scrollPrev();},[f]),N=W__namespace.useCallback(()=>{f?.scrollNext();},[f]),T=W__namespace.useCallback(M=>{f?.scrollTo(M);},[f]),k=W__namespace.useCallback(M=>{M.key==="ArrowLeft"?(M.preventDefault(),x()):M.key==="ArrowRight"&&(M.preventDefault(),N());},[x,N]);return W__namespace.useEffect(()=>{!f||!l||l(f);},[f,l]),W__namespace.useEffect(()=>{if(f)return R(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsxRuntime.jsx(jv.Provider,{value:{carouselRef:m,api:f,scrollPrev:x,scrollNext:N,canScrollPrev:p,canScrollNext:h,selectedIndex:b,scrollSnaps:y,scrollTo:T,orientation:a},children:jsxRuntime.jsxs("div",{ref:d,className:u(Wv({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsxRuntime.jsx("div",{ref:m,className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ql,{}),jsxRuntime.jsx(Jl,{})]}),i&&y.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:y.map((M,P)=>jsxRuntime.jsx("button",{className:u("w-2 h-2 rounded-full transition-all",P===b?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(P),"aria-label":`Go to slide ${P+1}`},P))})]})})});Yv.displayName="Carousel";var _v=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex",e),...t}));_v.displayName="CarouselContent";var Xv=W__namespace.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=$s();return jsxRuntime.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});Xv.displayName="CarouselItem";var Ql=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollPrev:a,canScrollPrev:s}=$s();return jsxRuntime.jsxs(oe,{ref:o,variant:t,size:n,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Ql.displayName="CarouselPrevious";var Jl=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollNext:a,canScrollNext:s}=$s();return jsxRuntime.jsxs(oe,{ref:o,variant:t,size:n,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})});Jl.displayName="CarouselNext";var qv=classVarianceAuthority.cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Us={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},tc={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},Zv=W__namespace.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=W__namespace.useState(r.length>0?"recent":o),[m,f]=W__namespace.useState(""),g=m?Object.values(tc).flat().filter(v=>v.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:tc[c]||[],h=v=>{n?.(v);};return jsxRuntime.jsxs("div",{ref:l,className:u(qv({size:t,className:e})),...i,children:[a&&jsxRuntime.jsx("div",{className:"p-2 border-b",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Oa,{placeholder:"Search emojis...",value:m,onChange:v=>f(v.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsxRuntime.jsx("div",{className:"flex border-b px-1",children:Object.entries(Us).map(([v,{icon:b}])=>v==="recent"&&r.length===0?null:jsxRuntime.jsx("button",{className:u("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===v&&"bg-accent"),onClick:()=>d(v),title:Us[v].name,children:b},v))}),!m&&jsxRuntime.jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Us[c].name}),jsxRuntime.jsx(ze,{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((v,b)=>jsxRuntime.jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(v),children:v},`${v}-${b}`)),g.length===0&&jsxRuntime.jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Zv.displayName="EmojiPicker";var Qv=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Lk=classVarianceAuthority.cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),Sk=classVarianceAuthority.cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),je=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxRuntime.jsxs(_n,{children:[jsxRuntime.jsx(Xn,{children:jsxRuntime.jsx(oe,{type:"button",variant:n?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsxRuntime.jsx(qn,{side:"top",className:"text-xs",children:t})]}),Jv=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=react.useEditor({extensions:[ik__default.default.configure({heading:{levels:[1,2,3]}}),lk__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),ck__default.default,dk__default.default.configure({types:["heading","paragraph"]}),uk__default.default.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});W__namespace.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),W__namespace.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,v=window.prompt("URL",h);if(v!==null){if(v===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:v}).run();}};return p?jsxRuntime.jsx(Yn,{children:jsxRuntime.jsxs("div",{ref:f,className:u(Qv({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxRuntime.jsxs("div",{className:u(Lk({size:n})),children:[jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsxRuntime.jsx(react.EditorContent,{editor:p,className:u(Sk({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});Jv.displayName="RichTextEditor";var th=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function Bk(e,t,n){return Dk.centerCrop(Dk.makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function eh(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var nh=W__namespace.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=W__namespace.useRef(null),[h,v]=W__namespace.useState(),[b,w]=W__namespace.useState(),[y,R]=W__namespace.useState(1),[C,x]=W__namespace.useState(0),N=P=>{let{width:E,height:D}=P.currentTarget;if(r){let H=Bk(E,D,r);v(H);}else v(m||{unit:"%",x:10,y:10,width:80,height:80});},T=P=>{v(P),o?.(P);},k=async P=>{if(w(P),a&&g.current&&P.width&&P.height){let E=await eh(g.current,P,C,y);a(E);}},M=()=>{x(P=>(P+90)%360);};return W__namespace.useEffect(()=>{b&&g.current&&a&&eh(g.current,b,C,y).then(P=>{a(P);});},[y,C,b,a]),jsxRuntime.jsxs("div",{ref:p,className:u(th({variant:t,className:e})),...f,children:[jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsxRuntime.jsx(Dk__default.default,{crop:h,onChange:T,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsxRuntime.jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:N,style:{transform:`scale(${y}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Qa,{value:[y],onValueChange:([P])=>R(P),min:l,max:c,step:.1,className:"flex-1"}),jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsxRuntime.jsx(oe,{variant:"bordered",size:"icon",onClick:M,children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-4 w-4"})})]})]})});nh.displayName="ImageCropper";var ac=classVarianceAuthority.cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Gk={sm:96,md:128,lg:192},oh=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let v=o??Gk[n??"md"];return r?jsxRuntime.jsx("div",{ref:h,className:u(ac({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx(Fk__default.default,{value:r,size:v,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsxRuntime.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsxRuntime.jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsxRuntime.jsx("div",{ref:h,className:u(ac({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:v,height:v},children:"No data"})})});oh.displayName="QRCode";var ah=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsxRuntime.jsx(nextThemes.ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});ah.displayName="ThemeProvider";var Xk=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),sh=W__namespace.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=nextThemes.useTheme(),[l,c]=W__namespace.useState(false);W__namespace.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxRuntime.jsxs(oe,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),onClick:d,children:[i==="dark"?jsxRuntime.jsx(lucideReact.Moon,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{children:jsxRuntime.jsxs(oe,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxRuntime.jsxs(wn,{align:"end",children:[jsxRuntime.jsxs(Wt,{onClick:()=>s("light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxRuntime.jsxs(Wt,{onClick:()=>s("dark"),children:[jsxRuntime.jsx(lucideReact.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxRuntime.jsxs(Wt,{onClick:()=>s("system"),children:[jsxRuntime.jsx(lucideReact.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxRuntime.jsxs(oe,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),disabled:true,children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})});sh.displayName="ThemeToggle";var ih=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),lh=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground 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 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),ch=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),dh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let v=W__namespace.useId(),b=p||v,w=`${b}-description`,y=`${b}-error`,R=a&&r;return jsxRuntime.jsxs("div",{className:u(ih({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:b,className:u(ch({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[m&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsxRuntime.jsx("input",{ref:h,id:b,"aria-invalid":a,"aria-describedby":R?y:n?w:void 0,"aria-required":o,className:u(lh({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!R&&jsxRuntime.jsx("p",{id:w,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),R&&jsxRuntime.jsx("p",{id:y,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});dh.displayName="TextField";var ph=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Qk=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),uh=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),mh=classVarianceAuthority.cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Jk=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),fh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:v,showButtons:b=true,formatOptions:w,fullWidth:y=false,disabled:R,id:C,...x},N)=>{let T=W__namespace.useId(),k=C||T,M=`${k}-description`,P=`${k}-error`,[E,D]=W__namespace.useState(h),[H,L]=W__namespace.useState(false),S=g!==void 0?g:E,V=a&&r,z=W__namespace.useCallback(O=>{O!==void 0&&(m!==void 0&&O<m&&(O=m),f!==void 0&&O>f&&(O=f)),g===void 0&&D(O),v?.(O);},[g,m,f,v]),F=()=>{let O=(S??0)+p;z(O);},I=()=>{let O=(S??0)-p;z(O);},K=O=>{let j=O.target.value;if(j==="")z(void 0);else {let A=parseFloat(j);isNaN(A)||z(A);}},B=O=>{O.key==="ArrowUp"?(O.preventDefault(),F()):O.key==="ArrowDown"&&(O.preventDefault(),I());},q=W__namespace.useMemo(()=>S===void 0?"":w?new Intl.NumberFormat(void 0,w).format(S):S.toString(),[S,w]),ne=m!==void 0&&S!==void 0&&S<=m,G=f!==void 0&&S!==void 0&&S>=f;return jsxRuntime.jsxs("div",{className:u(ph({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:k,className:u(Jk({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx("button",{type:"button",onClick:I,disabled:R||ne,className:u(uh({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:u(mh({size:s}))})}),jsxRuntime.jsx("input",{ref:N,id:k,type:"text",inputMode:"decimal",value:q,onChange:K,onKeyDown:B,onFocus:()=>L(true),onBlur:()=>L(false),"aria-invalid":a,"aria-describedby":V?P:n?M:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":S,disabled:R,className:u(Qk({size:s,isInvalid:a,fullWidth:y}),!b&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...x}),b&&jsxRuntime.jsx("button",{type:"button",onClick:F,disabled:R||G,className:u(uh({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:u(mh({size:s}))})})]}),n&&!V&&jsxRuntime.jsx("p",{id:M,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsxRuntime.jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});fh.displayName="NumberField";var bh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),nP=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground 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 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),gh=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),rP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),oP=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),vh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:v=true,showSearchIcon:b=true,disabled:w,placeholder:y="Search...",id:R,...C},x)=>{let N=W__namespace.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,[P,E]=W__namespace.useState(f),D=m!==void 0?m:P,H=a&&r,L=D.length>0,S=F=>{let I=F.target.value;m===void 0&&E(I),p?.(I);},V=()=>{m===void 0&&E(""),p?.(""),g?.();},z=F=>{F.key==="Enter"?(F.preventDefault(),h?.(D)):F.key==="Escape"&&L&&(F.preventDefault(),V());};return jsxRuntime.jsxs("div",{className:u(bh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(rP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx(lucideReact.Search,{className:u(gh({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsxRuntime.jsx("input",{ref:x,id:T,type:"search",value:D,onChange:S,onKeyDown:z,placeholder:y,"aria-invalid":a,"aria-describedby":H?M:n?k:void 0,"aria-required":o,disabled:w,className:u(nP({size:s,isInvalid:a}),!b&&"pl-3",!v&&"pr-3",l),...C}),v&&L&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:V,className:u(oP({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsxRuntime.jsx(lucideReact.X,{className:u(gh({size:s}))})})]}),n&&!H&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});vh.displayName="SearchField";var hh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),sP=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),iP=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),lP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),uc=(e,t="yyyy-MM-dd")=>{if(!e)return "";let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(n)).replace("MM",r).replace("dd",o)},cP=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},xh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:v="yyyy-MM-dd",showIcon:b=true,fullWidth:w=false,disabled:y,id:R,...C},x)=>{let N=W__namespace.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,P=W__namespace.useRef(null),E=x||P,[D,H]=W__namespace.useState(f??null),[L,S]=W__namespace.useState(false),V=()=>{!y&&E.current&&E.current.showPicker?.();},z=m!==void 0?m:D,F=a&&r,I=ne=>{let G=cP(ne.target.value);m===void 0&&H(G),p?.(G);},K=z?uc(z,"yyyy-MM-dd"):"",B=g?uc(g,"yyyy-MM-dd"):void 0,q=h?uc(h,"yyyy-MM-dd"):void 0;return jsxRuntime.jsxs("div",{className:u(hh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(lP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u("relative",w?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:E,id:T,type:"date",value:K,onChange:I,onFocus:()=>S(true),onBlur:()=>S(false),min:B,max:q,"aria-invalid":a,"aria-describedby":F?M:n?k:void 0,"aria-required":o,disabled:y,className:u(sP({size:s,isInvalid:a,fullWidth:w}),!b&&"pr-3",l),style:{borderColor:L?"var(--color-foreground)":void 0},...C}),b&&jsxRuntime.jsx("button",{type:"button",onClick:V,disabled:y,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:u(iP({size:s}))})})]}),n&&!F&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),F&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});xh.displayName="DateField";var yh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),dP=classVarianceAuthority.cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),uP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Rh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:v=false,hourCycle:b=24,disabled:w,fullWidth:y=false,id:R,...C},x)=>{let N=W__namespace.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,P=W__namespace.useRef(null),E=W__namespace.useRef(null),D=W__namespace.useRef(null),H=W__namespace.useRef(null),[L,S]=W__namespace.useState(f??null),V=m!==void 0?m:L,z=a&&r,F=$=>b===24?$:$===0?12:$>12?$-12:$,I=$=>$>=12?"PM":"AM",K=($,re)=>re==="AM"?$===12?0:$:$===12?12:$+12,[B,q]=W__namespace.useState(V?String(F(V.hour)).padStart(2,"0"):""),[ne,G]=W__namespace.useState(V?String(V.minute).padStart(2,"0"):""),[O,j]=W__namespace.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[A,Y]=W__namespace.useState(V?I(V.hour):"AM"),[ie,Te]=W__namespace.useState(false);W__namespace.useEffect(()=>{m!==void 0&&(m?(q(String(F(m.hour)).padStart(2,"0")),G(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),Y(I(m.hour))):(q(""),G(""),j("")));},[m,b]);let U=($,re,_,Le)=>{let ce=parseInt($,10),Ge=parseInt(re,10),$e=v?parseInt(_,10):void 0;if(isNaN(ce)||isNaN(Ge)||v&&isNaN($e)){m===void 0&&S(null),p?.(null);return}let pe={hour:b===12?K(ce,Le):ce,minute:Ge,...v&&$e!==void 0&&{second:$e}};m===void 0&&S(pe),p?.(pe);},dt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);q(re);let _=b===24?23:12,Le=b===24?0:1;if(re.length===2){let ce=parseInt(re,10);ce>=Le&&ce<=_&&(E.current?.focus(),E.current?.select());}},ee=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);if(G(re),re.length===2){let _=parseInt(re,10);_>=0&&_<=59&&(v?(D.current?.focus(),D.current?.select()):b===12&&H.current?.focus());}},nt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);j(re),re.length===2&&b===12&&H.current?.focus();},Gn=()=>{if(B){let $=parseInt(B,10),re=b===24?23:12,Le=Math.min(Math.max($,b===24?0:1),re),ce=String(Le).padStart(2,"0");q(ce),U(ce,ne,O,A);}},vt=()=>{if(ne){let $=parseInt(ne,10),re=Math.min(Math.max($,0),59),_=String(re).padStart(2,"0");G(_),U(B,_,O,A);}},xr=()=>{if(O){let $=parseInt(O,10),re=Math.min(Math.max($,0),59),_=String(re).padStart(2,"0");j(_),U(B,ne,_,A);}},$n=()=>{let $=A==="AM"?"PM":"AM";Y($),U(B,ne,O,$);},Ko=$=>{let re=$.key.toLowerCase();re==="a"?($.preventDefault(),A!=="AM"&&(Y("AM"),U(B,ne,O,"AM"))):re==="p"?($.preventDefault(),A!=="PM"&&(Y("PM"),U(B,ne,O,"PM"))):re==="arrowup"||re==="arrowdown"?($.preventDefault(),$n()):re==="arrowleft"&&($.preventDefault(),v?(D.current?.focus(),D.current?.select()):(E.current?.focus(),E.current?.select()));},Gt=($,re)=>{if($.key==="ArrowUp"||$.key==="ArrowDown"){$.preventDefault();let _=$.key==="ArrowUp"?1:-1;if(re==="hour"){let Le=parseInt(B,10)||0,ce=b===24?23:12,Ge=b===24?0:1,$e=Le+_;$e>ce&&($e=Ge),$e<Ge&&($e=ce);let Un=String($e).padStart(2,"0");q(Un),U(Un,ne,O,A);}else if(re==="minute"){let ce=(parseInt(ne,10)||0)+_;ce>59&&(ce=0),ce<0&&(ce=59);let Ge=String(ce).padStart(2,"0");G(Ge),U(B,Ge,O,A);}else if(re==="second"){let ce=(parseInt(O,10)||0)+_;ce>59&&(ce=0),ce<0&&(ce=59);let Ge=String(ce).padStart(2,"0");j(Ge),U(B,ne,Ge,A);}}$.key==="ArrowRight"&&($.preventDefault(),re==="hour"?(E.current?.focus(),E.current?.select()):re==="minute"&&v?(D.current?.focus(),D.current?.select()):(re==="minute"&&!v&&b===12||re==="second"&&b===12)&&H.current?.focus()),$.key==="ArrowLeft"&&($.preventDefault(),re==="minute"?(P.current?.focus(),P.current?.select()):re==="second"&&(E.current?.focus(),E.current?.select())),$.key==="Backspace"&&$.currentTarget.value===""&&(re==="minute"?P.current?.focus():re==="second"&&E.current?.focus());},yr=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",w&&"cursor-not-allowed");return jsxRuntime.jsxs("div",{ref:x,className:u(yh({size:s}),e),...C,children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(uP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u(dP({size:s,isInvalid:a,disabled:w,fullWidth:y}),l),style:{borderColor:ie?"var(--color-foreground)":void 0},onFocus:()=>Te(true),onBlur:$=>{$.currentTarget.contains($.relatedTarget)||Te(false);},children:[jsxRuntime.jsx("input",{ref:P,id:T,type:"text",inputMode:"numeric",placeholder:b===24?"HH":"hh",value:B,onChange:dt,onBlur:Gn,onKeyDown:$=>Gt($,"hour"),onFocus:$=>$.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":z?M:n?k:void 0,"aria-required":o,disabled:w,className:yr}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:E,type:"text",inputMode:"numeric",placeholder:"mm",value:ne,onChange:ee,onBlur:vt,onKeyDown:$=>Gt($,"minute"),onFocus:$=>$.target.select(),"aria-label":"Minute",disabled:w,className:yr}),v&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:D,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:nt,onBlur:xr,onKeyDown:$=>Gt($,"second"),onFocus:$=>$.target.select(),"aria-label":"Second",disabled:w,className:yr})]}),b===12&&jsxRuntime.jsx("button",{ref:H,type:"button",onClick:$n,onKeyDown:Ko,disabled:w,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:A})]}),n&&!z&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),z&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Rh.displayName="TimeField";var Ch=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),pP=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),fP=classVarianceAuthority.cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),gP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),wh=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),bP=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),Th=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="#000000",onChange:p,showSwatch:g=true,showPicker:h=true,allowAlpha:v=false,fullWidth:b=false,disabled:w,id:y,...R},C)=>{let x=W__namespace.useId(),N=y||x,T=`${N}-picker`,k=`${N}-description`,M=`${N}-error`,[P,E]=W__namespace.useState(f),[D,H]=W__namespace.useState(false),L=m!==void 0?m:P,S=a&&r,V=K=>{let B=K.target.value;B&&!B.startsWith("#")&&(B="#"+B),m===void 0&&E(B),p?.(B);},z=K=>{let B=K.target.value.toUpperCase();m===void 0&&E(B),p?.(B);},F=()=>{if(L&&wh(L)){let K=bP(L);K!==L&&(m===void 0&&E(K),p?.(K));}},I=wh(L)?L:"#000000";return jsxRuntime.jsxs("div",{className:u(Ch({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:N,className:u(gP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[g&&jsxRuntime.jsx("div",{className:u(fP({size:s})),children:h?jsxRuntime.jsxs("label",{htmlFor:T,className:"block h-full w-full cursor-pointer",children:[jsxRuntime.jsx("input",{id:T,type:"color",value:I,onChange:z,disabled:w,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})]}):jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})}),jsxRuntime.jsx("input",{ref:C,id:N,type:"text",value:L,onChange:V,onFocus:()=>H(true),onBlur:()=>{H(false),F();},placeholder:"#000000",maxLength:v?9:7,"aria-invalid":a,"aria-describedby":S?M:n?k:void 0,"aria-required":o,disabled:w,className:u(pP({size:s,isInvalid:a,fullWidth:b}),!g&&"pl-3",l),style:{borderColor:D?"var(--color-foreground)":void 0},...R})]}),n&&!S&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),S&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Th.displayName="ColorField";var Nh=classVarianceAuthority.cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),kh=W__namespace.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],v={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],b={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],w=(R,C)=>{C&&C(),l&&l(R);},y=R=>jsxRuntime.jsxs("button",{type:"button",disabled:i||R.isDisabled,onClick:()=>w(R.key,R.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:v),"aria-label":R.label,children:[R.icon&&jsxRuntime.jsx("span",{className:b,children:R.icon}),c&&jsxRuntime.jsx("span",{children:R.label})]},R.key);return jsxRuntime.jsxs("div",{ref:f,role:"group",className:u(Nh({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(R=>d?d(R):y(R)),g.length>0&&jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",v),children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:b})}),jsxRuntime.jsx(wn,{align:"end",children:g.map(R=>jsxRuntime.jsxs(Wt,{disabled:R.isDisabled,onClick:()=>w(R.key,R.onPress),children:[R.icon&&jsxRuntime.jsx("span",{className:u(b,"mr-2"),children:R.icon}),R.label]},R.key))})]})]})});kh.displayName="ActionGroup";var Sh=classVarianceAuthority.cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),xP=classVarianceAuthority.cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Dh=W__namespace.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxRuntime.jsxs("span",{ref:i,role:"status",className:u(Sh({variant:t,size:n,className:e})),...s,children:[jsxRuntime.jsx("span",{className:u(xP({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsxRuntime.jsx("span",{className:"text-foreground",children:a})]}));Dh.displayName="StatusLight";var Ih=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),RP=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),wP=classVarianceAuthority.cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),CP=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Vh=W__namespace.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxRuntime.jsxs("div",{ref:i,className:u(Ih({size:t,className:e})),...s,children:[n&&jsxRuntime.jsx("div",{className:u(RP({size:t})),"aria-hidden":"true",children:n}),r&&jsxRuntime.jsx("h3",{className:u(wP({size:t})),children:r}),o&&jsxRuntime.jsx("p",{className:u(CP({size:t})),children:o}),a&&jsxRuntime.jsx("div",{className:"mt-2",children:a})]}));Vh.displayName="IllustratedMessage";var Oh=classVarianceAuthority.cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),LP={info:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle,neutral:lucideReact.Info},Bh=W__namespace.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[m,f]=W__namespace.useState(true);if(!m)return null;let p=LP[t??"info"],g=()=>{f(false),s?.();};return jsxRuntime.jsxs("div",{ref:d,role:"alert",className:u(Oh({variant:t,className:e})),...c,children:[!o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r||jsxRuntime.jsx(p,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsxRuntime.jsx("div",{className:"font-medium",children:n}),l&&jsxRuntime.jsx("div",{className:"opacity-90",children:l}),i&&jsxRuntime.jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsxRuntime.jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Bh.displayName="InlineAlert";var Fh=classVarianceAuthority.cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),Kh=W__namespace.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxRuntime.jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Fh({position:t,size:n,className:e})),...c,children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx(Tt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});Kh.displayName="ActionBar";var Gh=W__namespace.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxRuntime.jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));Gh.displayName="ActionBarButton";var Wh=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),jh=classVarianceAuthority.cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Yh({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),[h,v]=W__namespace.useState(null),[b,w]=W__namespace.useState(null),y=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),R=T=>{if(a==="none")return;let k;a==="single"?k=y.has(T)?new Set:new Set([T]):(k=new Set(y),k.has(T)?k.delete(T):k.add(T)),o||g(k),s?.(k);},C=(T,k)=>{v(k),T.dataTransfer.effectAllowed="move";},x=(T,k)=>{T.preventDefault(),h!==k&&w(k);},N=()=>{if(h&&b&&h!==b){let T=r.findIndex(E=>E.key===h),k=r.findIndex(E=>E.key===b),M=[...r],[P]=M.splice(T,1);M.splice(k,0,P),l?.(M);}v(null),w(null);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Wh({variant:t,size:n,className:e})),...f,children:r.map(T=>{let k=y.has(T.key),M=h===T.key,P=b===T.key;return d?jsxRuntime.jsx("div",{role:"option","aria-selected":k,onClick:()=>R(T.key),children:d(T,k)},T.key):jsxRuntime.jsxs("div",{role:"option","aria-selected":k,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:E=>C(E,T.key),onDragOver:E=>x(E,T.key),onDragEnd:N,onClick:()=>!T.isDisabled&&R(T.key),className:u(jh({variant:t,size:n,isSelected:k,isDisabled:T.isDisabled}),M&&"opacity-50",P&&"border-t-2 border-t-primary"),children:[i&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsxRuntime.jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),T.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:T.label}),T.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}Yh.displayName="ListView";var _h=classVarianceAuthority.cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),VP=classVarianceAuthority.cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),AP=classVarianceAuthority.cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Xh=W__namespace.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=b=>String(b),trackColor:p="primary",name:g,...h},v)=>{let[b,w]=W__namespace.useState(o),y=r!==void 0,R=y?r:b,C=W__namespace.useRef(null),[x,N]=W__namespace.useState(false),[T,k]=W__namespace.useState(null),M=(I,K)=>{if(!C.current)return R[0];let B=C.current.getBoundingClientRect(),q;t==="horizontal"?q=(I-B.left)/B.width:q=1-(K-B.top)/B.height,q=Math.max(0,Math.min(1,q));let ne=i+q*(l-i),G=Math.round(ne/c)*c;return Math.max(i,Math.min(l,G))},P=(I,K)=>{let B=[...R];B[K]=I,K===0&&I>R[1]&&(B[0]=R[1]),K===1&&I<R[0]&&(B[1]=R[0]),y||w(B),a?.(B);},E=(I,K)=>{d||(I.preventDefault(),N(true),k(K),I.target.setPointerCapture(I.pointerId));},D=I=>{if(!x||T===null||d)return;let K=M(I.clientX,I.clientY);P(K,T);},H=()=>{x&&(N(false),k(null),s?.(R));},L=I=>{if(d)return;let K=M(I.clientX,I.clientY),B=Math.abs(R[0]-K),q=Math.abs(R[1]-K),ne=B<=q?0:1;P(K,ne);let G=[...R];G[ne]=K,s?.(G);},S=(I,K)=>{if(d)return;let B=R[K];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),B=Math.min(l,R[K]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),B=Math.max(i,R[K]-c);break;case "Home":I.preventDefault(),B=i;break;case "End":I.preventDefault(),B=l;break;default:return}P(B,K);let q=[...R];q[K]=B,s?.(q);},V=I=>(I-i)/(l-i)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],F={sm:14,md:20,lg:24}[n||"md"];return jsxRuntime.jsxs("div",{className:"relative w-full",children:[m&&jsxRuntime.jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:f(R[0])}),jsxRuntime.jsx("span",{children:f(R[1])})]}),jsxRuntime.jsxs("div",{ref:v,className:u(_h({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsxRuntime.jsx("div",{ref:C,className:u(VP({orientation:t,size:n})),onClick:L,children:jsxRuntime.jsx("div",{className:u("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(R[0])}%`,right:`${100-V(R[1])}%`,top:0,bottom:0}:{bottom:`${V(R[0])}%`,top:`${100-V(R[1])}%`,left:0,right:0}})}),R.map((I,K)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:u(AP({size:n}),x&&T===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${F/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${F/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:B=>E(B,K),onPointerMove:D,onPointerUp:H,onPointerCancel:H,onKeyDown:B=>S(B,K)},K)),g&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:`${g}[0]`,value:R[0]}),jsxRuntime.jsx("input",{type:"hidden",name:`${g}[1]`,value:R[1]})]})]})]})});Xh.displayName="RangeSlider";var hc=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),KP=classVarianceAuthority.cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),GP={help:lucideReact.HelpCircle,info:lucideReact.Info,warning:lucideReact.AlertCircle},Qh=W__namespace.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=W__namespace.useState(false),[v,b]=W__namespace.useState(false),[w,y]=W__namespace.useState({top:0,left:0}),R=W__namespace.useRef(null),C=W__namespace.useRef(null),x=i!==void 0?i:g,N=W__namespace.useCallback(P=>{i===void 0&&h(P),l?.(P);},[i,l]);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{if(!x||!R.current)return;let P=()=>{let E=R.current.getBoundingClientRect(),D=288,H=8,L=0,S=0;switch(a){case "top":L=E.top-H,S=E.left+E.width/2;break;case "bottom":L=E.bottom+H,S=E.left+E.width/2;break;case "left":L=E.top+E.height/2,S=E.left-H;break;case "right":L=E.top+E.height/2,S=E.right+H;break}if(a==="top"||a==="bottom")switch(s){case "start":S=E.left;break;case "center":S=E.left+E.width/2-D/2;break;case "end":S=E.right-D;break}S=Math.max(8,Math.min(S,window.innerWidth-D-8)),y({top:L,left:S});};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[x,a,s]),W__namespace.useEffect(()=>{if(!x)return;let P=E=>{C.current&&!C.current.contains(E.target)&&R.current&&!R.current.contains(E.target)&&N(false);};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[x,N]),W__namespace.useEffect(()=>{if(!x)return;let P=E=>{E.key==="Escape"&&N(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[x,N]);let T=GP[e??"help"],k=()=>{N(!x);},M=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o?W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{ref:R,onClick:P=>{o.props.onClick?.(P),k();}}):jsxRuntime.jsx("button",{ref:R,type:"button",onClick:k,className:u(hc({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsxRuntime.jsx("button",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},type:"button",onClick:k,className:u(hc({variant:e,size:t}),m),"aria-label":"Help",children:jsxRuntime.jsx(T,{className:"h-full w-full"})}),v&&x&&_a__namespace.createPortal(jsxRuntime.jsxs("div",{ref:C,className:u(KP({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:M()},role:"tooltip",children:[n&&jsxRuntime.jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsxRuntime.jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxRuntime.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsxRuntime.jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Qh.displayName="ContextualHelp";var ex=classVarianceAuthority.cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),xc=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function tx({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,v]=W__namespace.useState(new Set),b=W__namespace.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),w=x=>{if(s==="none")return;let N;s==="single"?N=b.has(x)?new Set:new Set([x]):(N=new Set(b),N.has(x)?N.delete(x):N.add(x)),a||v(N),i?.(N);},y=(x,N)=>{N.stopPropagation(),c?.(x);},R=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxRuntime.jsxs("div",{role:"group","aria-label":d,className:u(ex({spacing:t}),e),...g,children:[R.map(x=>{let N=b.has(x.key),T=s!=="none";return jsxRuntime.jsxs("span",{role:T?"button":void 0,tabIndex:T&&!x.isDisabled?0:void 0,"aria-pressed":T?N:void 0,onClick:()=>!x.isDisabled&&w(x.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!x.isDisabled&&(k.preventDefault(),w(x.key));},style:x.color?{backgroundColor:x.color}:void 0,className:u(xc({variant:x.color?void 0:n,size:r,isSelected:N,isDisabled:x.isDisabled}),T&&!x.isDisabled&&"cursor-pointer hover:opacity-80",x.color&&"text-white"),children:[x.icon&&jsxRuntime.jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:x.icon}),x.label,l&&!x.isDisabled&&jsxRuntime.jsx("button",{type:"button",onClick:k=>y(x.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${x.label}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},x.key)}),C>0&&jsxRuntime.jsxs("span",{className:u(xc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsxRuntime.jsx("span",{className:"text-sm text-danger",children:f})]})}tx.displayName="TagGroup";var ox=classVarianceAuthority.cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),ax=classVarianceAuthority.cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function sx({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),h=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),v=b=>{if(a==="none")return;let w;a==="single"?w=h.has(b)?new Set:new Set([b]):(w=new Set(h),w.has(b)?w.delete(b):w.add(b)),o||g(w),s?.(w);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(ox({columns:t,gap:n,className:e})),...f,children:r.map(b=>{let w=h.has(b.key);return d?jsxRuntime.jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>v(b.key),children:d(b,w)},b.key):jsxRuntime.jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":b.isDisabled,onClick:()=>!b.isDisabled&&v(b.key),className:u(ax({variant:l,size:c,isSelected:w,isDisabled:b.isDisabled})),children:[i&&a!=="none"&&w&&jsxRuntime.jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),b.thumbnail&&jsxRuntime.jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:b.thumbnail}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:b.label}),b.description&&jsxRuntime.jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:b.description})]})]},b.key)})})}sx.displayName="GridList";var lx=classVarianceAuthority.cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),jP=classVarianceAuthority.cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),YP=classVarianceAuthority.cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),si=W__namespace.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),v=()=>{if(m!=="auto")return "";let w=(n-r)/(o-r),y=s!==void 0?(s-r)/(o-r):.25,R=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?w<=y?"bg-red-500":w<=R?"bg-yellow-500":"bg-green-500":w>=R?"bg-red-500":w>=y?"bg-yellow-500":"bg-green-500"},b=d?d(n,h):`${Math.round(h)}%`;return jsxRuntime.jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:b})]}),jsxRuntime.jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(lx({size:t})),children:jsxRuntime.jsx("div",{className:u(jP({variant:f})),children:jsxRuntime.jsx("div",{className:u(YP({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&v()),style:{width:`${h}%`}})})})]})});si.displayName="Meter";var cx=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(si,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));cx.displayName="DiskUsageMeter";var dx=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(si,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));dx.displayName="BatteryMeter";var ux=classVarianceAuthority.cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),li=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},mx=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},px=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},fx=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),gx=W__namespace.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),v=W__namespace.useCallback(I=>{let K=px(I);return K?mx(...K):[0,1,1]},[]),[b,w]=W__namespace.useState(()=>v(r||o)),y=e??b[0],R=t??b[1],C=n??b[2];W__namespace.useEffect(()=>{if(r){let I=v(r);w(I);}},[r,v]);let x=W__namespace.useCallback((I,K)=>{if(l||!p.current)return;let B=p.current.getBoundingClientRect(),q=Math.max(0,Math.min(1,(I-B.left)/B.width)),ne=Math.max(0,Math.min(1,(K-B.top)/B.height)),G=q,O=1-ne;t===void 0&&n===void 0&&w([y,G,O]),a?.({hue:y,saturation:G,brightness:O});let j=li(y,G,O);s?.(fx(...j));},[l,y,t,n,a,s]),N=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),x(I.clientX,I.clientY));},T=I=>{g&&x(I.clientX,I.clientY);},k=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[M,P,E]=li(y,1,1),D=`rgb(${M}, ${P}, ${E})`,H=R*100,L=(1-C)*100,[S,V,z]=li(y,R,C),F=`rgb(${S}, ${V}, ${z})`;return jsxRuntime.jsx("div",{ref:f,className:u(ux({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:D},onPointerDown:N,onPointerMove:T,onPointerUp:k,onPointerLeave:k,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${L}% - ${c/2}px)`,backgroundColor:F,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});gx.displayName="ColorArea";var vx=classVarianceAuthority.cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),ZP=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,bx="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",hx=W__namespace.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),v=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[b,w]=W__namespace.useState(t??v()),y=e??b,R=r==="hue"?y/360:y,C=W__namespace.useCallback((D,H)=>{if(i||!p.current)return;let L=p.current.getBoundingClientRect(),S=a!=="vertical",V;S?V=Math.max(0,Math.min(1,(D-L.left)/L.width)):V=Math.max(0,Math.min(1,1-(H-L.top)/L.height));let z=r==="hue"?V*360:V;e===void 0&&w(z),n?.(z);},[i,a,r,e,n]),x=D=>{i||(D.preventDefault(),h(true),D.target.setPointerCapture(D.pointerId),C(D.clientX,D.clientY));},N=D=>{g&&C(D.clientX,D.clientY);},T=D=>{h(false),D.target.releasePointerCapture(D.pointerId);},k=()=>{let D=a!=="vertical",H=D?"to right":"to top";switch(r){case "hue":return D?bx:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return bx}},M=()=>r==="hue"?`hsl(${y}, 100%, 50%)`:o,P=a!=="vertical",E=R*100;return jsxRuntime.jsx("div",{ref:f,className:u(vx({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?ZP:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:x,onPointerMove:N,onPointerUp:T,onPointerLeave:T,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...P?{left:`calc(${E}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${E}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:M(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});hx.displayName="ColorSlider";var xx=classVarianceAuthority.cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),eE=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},yx=W__namespace.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=W__namespace.useRef(null),[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),v=e??g,b=W__namespace.useCallback((x,N)=>{if(o||!m.current)return;let T=m.current.getBoundingClientRect(),k=T.width/2,M=x-T.left,P=N-T.top,E=eE(M,P,k);e===void 0&&h(E),n?.(E);},[o,e,n]),w=x=>{o||(x.preventDefault(),p(true),x.target.setPointerCapture(x.pointerId),b(x.clientX,x.clientY));},y=x=>{f&&b(x.clientX,x.clientY);},R=x=>{p(false),x.target.releasePointerCapture(x.pointerId);},C=()=>{let x=[];for(let N=0;N<=360;N+=30)x.push(`hsl(${N}, 100%, 50%) ${N}deg`);return `conic-gradient(from 270deg, ${x.join(", ")})`};return jsxRuntime.jsx("div",{ref:d,className:u(xx({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxRuntime.jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:w,onPointerMove:y,onPointerUp:R,onPointerLeave:R,children:[a<1&&jsxRuntime.jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsxRuntime.jsx(tE,{hue:v,innerRadius:a,thumbSize:s})]})})});yx.displayName="ColorWheel";var tE=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var wx=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),rE=classVarianceAuthority.cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),oE=classVarianceAuthority.cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),Cx=W__namespace.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let v=async()=>{if(!(!f||a===null||a===void 0))try{let b=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(b),p?.();}catch{}};return jsxRuntime.jsxs("div",{ref:h,className:u(wx({orientation:t,size:n,align:r,className:e})),...g,children:[jsxRuntime.jsxs("span",{className:u(rE({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsxRuntime.jsx("span",{className:u(oE({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?v:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),v());}:void 0,children:a})]})});Cx.displayName="LabeledValue";var Tx=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),Mx=W__namespace.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(Tx({orientation:t,gap:n,className:e})),...r}));Mx.displayName="LabeledValueGroup";var Ex=classVarianceAuthority.cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Eo=classVarianceAuthority.cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Lx=W__namespace.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:v,placeholder:b="Search...",disabled:w,...y},R)=>{let[C,x]=W__namespace.useState(false),[N,T]=W__namespace.useState(t),k=e!==void 0?e:N,M=W__namespace.useRef(null);W__namespace.useImperativeHandle(R,()=>M.current);let P=k.length>0,E=C&&(a.length>0||s.length>0||l.length>0||P),D=I=>{e===void 0&&T(I),n?.(I);},H=()=>{D(""),M.current?.focus();},L=I=>{I?.preventDefault(),k.trim()&&(r?.(k.trim()),x(false));},S=I=>{D(I.label),o?.(I),x(false);},V=I=>{D(I),r?.(I),x(false);},z=I=>{D(I),r?.(I),x(false);},F=W__namespace.useMemo(()=>{let I={};return a.forEach(K=>{let B=K.category||"Results";I[B]||(I[B]=[]),I[B].push(K);}),I},[a]);return jsxRuntime.jsxs(rt,{open:E,onOpenChange:x,children:[jsxRuntime.jsx(oo,{children:jsxRuntime.jsxs("form",{onSubmit:L,className:u(Ex({size:g,variant:h}),v),children:[m&&jsxRuntime.jsx(lucideReact.Search,{className:u(Eo({size:g}),"ml-3")}),jsxRuntime.jsx("input",{ref:M,type:"text",value:k,onChange:I=>D(I.target.value),onFocus:()=>x(true),placeholder:b,disabled:w,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...y}),d&&P&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Eo({size:g})),children:jsxRuntime.jsx(lucideReact.X,{className:"h-full w-full"})})]})}),jsxRuntime.jsx(ot,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxRuntime.jsxs(cmdk.Command,{className:"rounded-lg border-0",children:[s.length>0&&!P&&jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsxRuntime.jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((I,K)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>V(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.Clock,{className:u(Eo({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:u(Eo({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!P&&jsxRuntime.jsxs("div",{className:"border-t p-2",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((I,K)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>z(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.TrendingUp,{className:u(Eo({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I})]},K))]}),P&&jsxRuntime.jsx("div",{className:"p-2",children:c?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-6",children:jsxRuntime.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(F).map(([I,K])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:I})}),K.map(B=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>S(B),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[B.icon||jsxRuntime.jsx(lucideReact.Search,{className:u(Eo({size:g}))}),jsxRuntime.jsxs("div",{className:"flex-1 text-left",children:[jsxRuntime.jsx("div",{className:"truncate",children:B.label}),B.description&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:B.description})]})]},B.id))]},I)):jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Lx.displayName="SearchBar";var Sx={Pages:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),Files:jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),Settings:jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4"}),Users:jsxRuntime.jsx(lucideReact.User,{className:"h-4 w-4"}),Tags:jsxRuntime.jsx(lucideReact.Hash,{className:"h-4 w-4"})},Ix=W__namespace.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=W__namespace.useState(""),g=W__namespace.useRef(null),[h,v]=W__namespace.useState(false);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{e||p("");},[e]),W__namespace.useEffect(()=>{if(!e)return;let x=N=>{N.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,t]),W__namespace.useEffect(()=>{if(e)return ut(),()=>mt()},[e]);let b=W__namespace.useMemo(()=>{let x={};return n.forEach(N=>{let T=N.category||"Results";x[T]||(x[T]=[]),x[T].push(N);}),x},[n]),w=x=>{x.onSelect?.(),c?.(x),t?.(false);},y=()=>{t?.(false);},R=f.length>0,C=!R&&r.length>0;return !h||!e?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:y}),jsxRuntime.jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxRuntime.jsxs(cmdk.Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxRuntime.jsxs("div",{className:"flex items-center border-b px-4",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsxRuntime.jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(cmdk.Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-10",children:jsxRuntime.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[C&&jsxRuntime.jsxs(cmdk.Command.Group,{heading:"Recent",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(x=>jsxRuntime.jsxs(cmdk.Command.Item,{value:x.label,onSelect:()=>w(x),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:x.icon||Sx[x.category||""]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:x.label}),x.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:x.description})]}),x.shortcut&&jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:x.shortcut.map((N,T)=>jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:N},T))})]},x.id))]}),R&&Object.entries(b).map(([x,N])=>jsxRuntime.jsxs(cmdk.Command.Group,{heading:x,children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:x}),N.map(T=>jsxRuntime.jsxs(cmdk.Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>w(T),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:T.icon||Sx[x]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},x)),jsxRuntime.jsx(cmdk.Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsxRuntime.jsx("div",{className:"border-t px-4 py-3",children:d}):jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});Ix.displayName="SpotlightSearch";function vE(e="k"){let[t,n]=W__namespace.useState(false);return W__namespace.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var zx=W__namespace.createContext(null),di=()=>{let e=W__namespace.useContext(zx);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},ME=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=W__namespace.useState([]),[a,s]=W__namespace.useState(false),i=W__namespace.useRef(null),l=t!==void 0,c=l?t:r,d=W__namespace.useCallback(v=>{l?n?.(v):o(v);},[l,n]),m=c.filter(v=>!v.read).length,f=W__namespace.useCallback(v=>{d(c.map(b=>b.id===v?{...b,read:true}:b));},[c,d]),p=W__namespace.useCallback(()=>{d(c.map(v=>({...v,read:true})));},[c,d]),g=W__namespace.useCallback(v=>{d(c.filter(b=>b.id!==v));},[c,d]),h=W__namespace.useCallback(()=>{d([]);},[d]);return jsxRuntime.jsx(zx.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Ox=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Ox.displayName="NotificationCenter";var Bx=W__namespace.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=di(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxRuntime.jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),t&&s>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Bx.displayName="NotificationCenterTrigger";var Fx=W__namespace.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=di(),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null),[v,b]=W__namespace.useState({top:0,left:0});return W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!i||!f.current||!h.current)return;let w=()=>{if(!f.current||!h.current)return;let y=f.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=y.bottom+n,x=y.left;t==="center"?x=y.left+y.width/2-R.width/2:t==="end"&&(x=y.right-R.width),x+R.width>window.innerWidth-16&&(x=window.innerWidth-R.width-16),x<16&&(x=16),b({top:C,left:x});};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,true),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,true);}},[i,f,t,n]),W__namespace.useEffect(()=>{if(!i)return;let w=R=>{h.current&&!h.current.contains(R.target)&&f.current&&!f.current.contains(R.target)&&l(false);},y=R=>{R.key==="Escape"&&l(false);};return document.addEventListener("mousedown",w),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",y);}},[i,l,f]),!p||!i?null:_a__namespace.createPortal(jsxRuntime.jsxs("div",{ref:w=>{h.current=w,typeof s=="function"?s(w):s&&(s.current=w);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:v.top,left:v.left},...a,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsxRuntime.jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsxRuntime.jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]}):c.map(w=>jsxRuntime.jsx(Tc,{notification:w},w.id)))})]}),document.body)});Fx.displayName="NotificationCenterContent";var NE={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},kE={info:lucideReact.Info,success:lucideReact.CheckCircle,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Tc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=di(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=kE[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},v=b=>{if(!b)return null;let w=typeof b=="string"?new Date(b):b,R=new Date().getTime()-w.getTime(),C=Math.floor(R/6e4),x=Math.floor(R/36e5),N=Math.floor(R/864e5);return C<1?"Just now":C<60?C+"m ago":x<24?x+"h ago":N<7?N+"d ago":w.toLocaleDateString()};return jsxRuntime.jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",NE[l],!d&&"bg-accent/20"),children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:m||jsxRuntime.jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsxRuntime.jsx(p,{className:"h-4 w-4"})})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsxRuntime.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:v(c)}),f&&jsxRuntime.jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[!d&&jsxRuntime.jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]})};Tc.displayName="NotificationItem";var Kx=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Kx.displayName="NotificationList";var Gx=classVarianceAuthority.cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),VE={default:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},$x=W__namespace.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,v]=W__namespace.useState(true),[b,w]=W__namespace.useState(false);W__namespace.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&v(false);},[m]),W__namespace.useEffect(()=>{if(d&&h){let x=setTimeout(()=>{y();},d);return ()=>clearTimeout(x)}},[d,h]);let y=()=>{w(true),setTimeout(()=>{v(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let R=VE[t],C=r?o!==void 0?o:R?jsxRuntime.jsx(R,{className:"h-4 w-4"}):null:null;return jsxRuntime.jsxs("div",{ref:g,className:u(Gx({variant:n,type:t,position:l}),c&&"animate-pulse",b&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsxRuntime.jsx("span",{className:"shrink-0",children:C}),jsxRuntime.jsx("span",{className:"text-center font-medium",children:e}),i&&jsxRuntime.jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsxRuntime.jsx("button",{type:"button",onClick:y,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});$x.displayName="Banner";var Ra=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-current bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-current bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),OE=classVarianceAuthority.cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),Nc=W__namespace.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},v)=>{let[b,w]=W__namespace.useState(false),y=o&&o.length>0,R=k=>{y&&w(!b),p?.(k);},C=k=>{k.onClick?.(),w(false);},x={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},N=l==="rotate"&&b?"rotate-45":"",T=l==="scale"&&b?"scale-0":"scale-100";return jsxRuntime.jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&Ra({position:m})),children:[y&&b&&jsxRuntime.jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",x[a].container),children:o.map((k,M)=>jsxRuntime.jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${M*50}ms`},children:[s&&(a==="up"||a==="down")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsxRuntime.jsx("a",{href:k.href,className:u(Ra({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsxRuntime.jsx("button",{type:"button",onClick:()=>C(k),className:u(Ra({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(a==="left"||a==="right")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxRuntime.jsxs("button",{ref:v,type:"button",onClick:R,disabled:g,className:u(Ra({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":y?b:void 0,...h,children:[b&&i?i:jsxRuntime.jsx("span",{className:u(OE({size:d}),N,T,"transition-all duration-200"),children:e||jsxRuntime.jsx(lucideReact.Plus,{})}),n&&r&&jsxRuntime.jsx("span",{className:"font-medium",children:r})]}),y&&b&&jsxRuntime.jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});Nc.displayName="FloatingActionButton";var BE=Nc;var _x=classVarianceAuthority.cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),Wx=classVarianceAuthority.cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Xx=W__namespace.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=W__namespace.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=y=>{y.disabled||(p||f(y.key),s?.(y.key));},v=y=>t==="filled"?y?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":y?"text-primary":"text-muted-foreground hover:text-foreground",b=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsxRuntime.jsx("nav",{ref:d,className:u(_x({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(y=>{let R=g===y.key,C=i==="all"||i==="active"&&R,x=R&&y.activeIcon?y.activeIcon:y.icon;if(l)return jsxRuntime.jsx("div",{onClick:()=>h(y),className:u(Wx({variant:t}),y.disabled&&"opacity-50 cursor-not-allowed"),children:l(y,R)},y.key);let N=jsxRuntime.jsxs("div",{onClick:()=>!y.href&&h(y),className:u(Wx({variant:t}),v(R),y.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":R?"page":void 0,"aria-disabled":y.disabled,tabIndex:y.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(y));},children:[jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("span",{className:u(b(),"[&>svg]:h-full [&>svg]:w-full"),children:x}),y.badge!==void 0&&y.badge>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:y.badge>99?"99+":y.badge}),y.showDot&&jsxRuntime.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&y.label&&jsxRuntime.jsx("span",{className:u(w(),"font-medium truncate max-w-full px-1"),children:y.label})]},y.key);return y.href&&!y.disabled?jsxRuntime.jsx("a",{href:y.href,onClick:()=>h(y),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(R)),children:N},y.key):N})})});Xx.displayName="BottomNavigation";var KE="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",Zx=classVarianceAuthority.cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Qx=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxRuntime.jsxs(vaul.Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsxRuntime.jsx(vaul.Drawer.Trigger,{asChild:true,children:n}),jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:f,className:KE,children:[jsxRuntime.jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxRuntime.jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsxRuntime.jsx(vaul.Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsxRuntime.jsx(vaul.Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsxRuntime.jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxRuntime.jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Zx({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"font-medium",children:g.label}),g.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsxRuntime.jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Qx.displayName="ActionSheet";var ey=classVarianceAuthority.cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Pc=classVarianceAuthority.cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),ty=W__namespace.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0),[h,v]=W__namespace.useState(false),b=W__namespace.useRef(0),w=W__namespace.useRef(0),y=n.length*(o==="sm"?64:o==="lg"?96:80),R=r.length*(o==="sm"?64:o==="lg"?96:80),C=M=>{i||(v(true),b.current=M.touches[0].clientX,w.current=p);},x=M=>{if(!h||i)return;let E=M.touches[0].clientX-b.current,D=w.current+E;(D>0&&n.length===0||D<0&&r.length===0)&&(D=0),D>y?D=y+(D-y)*.3:D<-R&&(D=-R+(D+R)*.3),g(D);},N=()=>{if(!h)return;v(false);let M=f.current?.offsetWidth||0,P=Math.abs(p)/M;if(l&&P>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>y*a&&n.length>0?(g(y),s?.("right")):p<-R*a&&r.length>0?(g(-R),s?.("left")):g(0);},T=(M,P)=>{M.onAction?.(),s?.(P,M.key),g(0);},k=()=>{g(0);};return jsxRuntime.jsxs("div",{ref:m,className:u(ey({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsxRuntime.jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:y},children:n.map(M=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>T(M,"right"),className:u(Pc({variant:M.variant,size:o})),style:{opacity:Math.min(1,p/y)},children:[M.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),r.length>0&&p<0&&jsxRuntime.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:R},children:r.map(M=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>T(M,"left"),className:u(Pc({variant:M.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/R)},children:[M.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),jsxRuntime.jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:x,onTouchEnd:N,onClick:p!==0?k:void 0,children:c})]})});ty.displayName="SwipeActions";var ry=classVarianceAuthority.cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),UE=classVarianceAuthority.cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),oy=W__namespace.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=W__namespace.useRef(null),[v,b]=W__namespace.useState(0),[w,y]=W__namespace.useState("idle"),R=W__namespace.useRef(0),C=W__namespace.useRef(false),x=()=>l||w==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,N=E=>{x()&&(R.current=E.touches[0].clientY,C.current=true);},T=E=>{if(!C.current||!x())return;let H=E.touches[0].clientY-R.current;if(H<0){b(0),y("idle");return}let S=Math.min(H*.5,o);b(S),y(S>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,w==="ready"){y("refreshing"),b(r*.6);try{await n();}finally{y("idle"),b(0);}}else y("idle"),b(0);},M={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],P=()=>{if(w==="refreshing")return a||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(M,"animate-spin text-primary")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let E=Math.min(v/r*180,180);return s||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.ArrowDown,{className:u(M,"text-muted-foreground transition-transform"),style:{transform:`rotate(${E}deg)`}}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?d:c})]})};return jsxRuntime.jsxs("div",{ref:g,className:u(ry({variant:t,className:e})),...p,children:[jsxRuntime.jsx("div",{className:u(UE({size:i}),"z-10",w==="idle"&&v===0&&"opacity-0"),style:{top:Math.max(v-60,-60),opacity:Math.min(v/(r*.5),1)},children:P()}),jsxRuntime.jsx("div",{ref:h,className:u("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${v}px)`,transition:C.current?"none":void 0},onTouchStart:N,onTouchMove:T,onTouchEnd:k,children:f})]})});oy.displayName="PullToRefresh";var jr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),WE={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},ay=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsxRuntime.jsx(framerMotion.motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:WE,custom:i,transition:jr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&m}):m});ay.displayName="Fade";var jE=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},sy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=W__namespace.useMemo(()=>jE(i,l),[i,l]),p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:jr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});sy.displayName="Slide";var YE={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},_E={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},iy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:_E,custom:i,transition:jr(n,r,o),className:u(a),style:{transformOrigin:YE[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&f}):f});iy.displayName="Scale";var ly=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:jr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});ly.displayName="Collapse";var cy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:jr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});cy.displayName="Expand";var dy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:jr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});dy.displayName="Rotate";var uy=W__namespace.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsxRuntime.jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxRuntime.jsxs(framerMotion.motion.div,{animate:{[m]:r?180:0},transition:jr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});uy.displayName="Flip";var my=W__namespace.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=W__namespace.useState([]),l=W__namespace.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,v=Math.max(p.width,p.height)*2,b={id:Date.now(),x:g,y:h,size:v};i(w=>[...w,b]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxRuntime.jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsxRuntime.jsx("div",{ref:l,className:"relative z-0",children:n}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:s.map(m=>jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});my.displayName="Ripple";var py=W__namespace.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});py.displayName="Bounce";var ZE={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},fy=W__namespace.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:ZE[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});fy.displayName="Shake";var QE={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},gy=W__namespace.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(t&&QE[n],r),children:e}));gy.displayName="Pulse";var by=W__namespace.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});by.displayName="Wiggle";var vy=W__namespace.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});vy.displayName="Pop";var oL=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},hy=W__namespace.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:true}),[h,v]=W__namespace.useState(!l);W__namespace.useEffect(()=>{if(l&&g){let y=setTimeout(()=>v(true),c*1e3);return ()=>clearTimeout(y)}},[l,g,c]);let b=framerMotion.useMotionValue(t),w=framerMotion.useTransform(b,y=>oL(y,r,s,i));return W__namespace.useEffect(()=>{if(h){let y=framerMotion.animate(b,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>y.stop()}},[h,e,n,b,m]),jsxRuntime.jsx("span",{ref:p,className:u(d),children:jsxRuntime.jsxs("span",{ref:f,children:[o,jsxRuntime.jsx(framerMotion.motion.span,{children:w}),a]})})});hy.displayName="Counter";var xy=W__namespace.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=W__namespace.useState(""),[v,b]=W__namespace.useState(0),[w,y]=W__namespace.useState(false),[R,C]=W__namespace.useState(false),x=W__namespace.useRef(null),N=framerMotion.useInView(x,{once:true}),[T,k]=W__namespace.useState(!l);return W__namespace.useEffect(()=>{if(l&&N){let M=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(M)}},[l,N,n]),W__namespace.useEffect(()=>{if(!T||R)return;let M=p[v],P;return w?g.length>0?P=setTimeout(()=>{h(g.slice(0,-1));},i):(y(false),b(E=>(E+1)%p.length)):g.length<M.length?P=setTimeout(()=>{h(M.slice(0,g.length+1));},t):v<p.length-1||s?P=setTimeout(()=>{y(true);},r):(C(true),m?.()),()=>clearTimeout(P)},[T,g,v,w,R,p,t,i,r,s,m]),jsxRuntime.jsxs("span",{ref:x,className:u(c),children:[jsxRuntime.jsx("span",{ref:f,children:g}),o&&jsxRuntime.jsx(framerMotion.motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});xy.displayName="Typewriter";var yy=W__namespace.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=W__namespace.useRef(null),d=framerMotion.useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},v={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsxRuntime.jsx("span",{ref:c,children:p.map((b,w)=>jsxRuntime.jsxs(framerMotion.motion.span,{variants:v,className:"inline-block",children:[b,a==="word"&&w<p.length-1&&"\xA0"]},w))})})});yy.displayName="TextReveal";var Ry=W__namespace.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=W__namespace.useState(0);W__namespace.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsxRuntime.jsx("span",{ref:s,className:u("relative inline-block",o),children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});Ry.displayName="WordRotate";var My=W__namespace.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:a,amount:s}),v={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],b={hidden:{opacity:0,x:v.x,y:v.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsxRuntime.jsx("div",{ref:p,children:jsxRuntime.jsx(framerMotion.motion.div,{ref:f,variants:b,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});My.displayName="ScrollReveal";var Ny=W__namespace.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=framerMotion.useScroll({container:s}),m=framerMotion.useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",v=p?"left":"top";return jsxRuntime.jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:v,backgroundColor:n}}),i&&jsxRuntime.jsx(sL,{progress:f,position:e})]})});Ny.displayName="ScrollProgress";var sL=({progress:e,position:t})=>{let n=framerMotion.useTransform(e,s=>Math.round(s*100)),[r,o]=W__namespace.useState(0);return W__namespace.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxRuntime.jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},ky=W__namespace.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=W__namespace.useRef(null),{scrollYProgress:i}=framerMotion.useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=framerMotion.useTransform(i,[0,1],l),d=framerMotion.useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsxRuntime.jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsxRuntime.jsx(framerMotion.motion.div,{ref:a,style:{x:m,y:f},children:e})})});ky.displayName="Parallax";var Ly=W__namespace.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxRuntime.jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsxRuntime.jsx("style",{children:`
|
|
55
|
+
`,document.body.appendChild(ce),_.dataTransfer.setDragImage(ce,20,15),setTimeout(()=>{document.body.removeChild(ce);},0),h(e),C?.({event:_,node:e});},vt=_=>{if(_.preventDefault(),_.stopPropagation(),!g||g.key===e.key||ie)return;let Le=_.currentTarget.getBoundingClientRect(),ce=_.clientY-Le.top,Ge=Le.height,$e;ce<Ge*.25?$e=-1:ce>Ge*.75?$e=1:$e=0,!(R&&!R({dropNode:e,dropPosition:$e,dragNode:g}))&&(w(e.key,$e),x?.({event:_,node:e}));},xr=_=>{_.preventDefault(),_.stopPropagation(),!(!g||g.key===e.key)&&N?.({event:_,node:e,expandedKeys:K()});},$n=_=>{_.stopPropagation(),T?.({event:_,node:e});},Ko=_=>{_.preventDefault(),_.stopPropagation(),!(!g||g.key===e.key||ie)&&(b!==null&&y(e,b),h(null),w(null,null));},Gt=_=>{h(null),w(null,null),k?.({event:_,node:e});},La=_=>{ie||Te&&i(e.key,e,_);},yr=_=>{_.stopPropagation(),!ie&&!q&&a(e.key,e);},$=W__namespace.useMemo(()=>{if(!Y||b===null)return "";switch(b){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[Y,b]),re=[...r,n];return jsxRuntime.jsxs("div",{className:"relative",children:[M&&t>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.map((_,Le)=>!_&&jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Le} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Le)),jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsxRuntime.jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":q?void 0:ne,"aria-selected":Te?G:void 0,"aria-disabled":ie,draggable:dt,onDragStart:Gn,onDragOver:vt,onDragEnter:xr,onDragLeave:$n,onDrop:Ko,onDragEnd:Gt,onClick:La,className:u("relative",eb({size:I,isSelected:G,isDragging:A,isDisabled:ie,isHoverable:Te&&!ie}),$,z&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[dt&&E&&ee!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:ee}),jsxRuntime.jsx("button",{type:"button",onClick:yr,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",q&&"invisible"),tabIndex:-1,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",ne&&"rotate-90")})}),U&&jsxRuntime.jsx(YT,{checked:O,indeterminate:j,disabled:ie,onClick:_=>m(e.key,e,_)}),P&&nt&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:nt}),jsxRuntime.jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",z&&"flex-none"),children:e.label})]}),B&&ne&&jsxRuntime.jsx("div",{role:"group",children:e.children.map((_,Le)=>jsxRuntime.jsx(nb,{node:_,level:t+1,isLast:Le===e.children.length-1,parentIsLastPath:re},_.key))})]})},_T=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},XT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},rb=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||rb(n,t))return true;return false},ob=W__namespace.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:v=false,checkedKeys:b,defaultCheckedKeys:w=[],onCheck:y,showLine:R=false,showIcon:C=false,showHandle:x=true,dragIcon:N,icon:T,leafIcon:k=jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),folderIcon:M=jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),folderOpenIcon:P=jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}),onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,onDrop:V,blockNode:z=false,disabled:F=false,...I},K)=>{let B=W__namespace.useCallback(()=>l?new Set(_T(r)):new Set(i),[l,i,r]),[q,ne]=W__namespace.useState(B),G=s!==void 0,O=G?new Set(s):q,j=W__namespace.useCallback((pe,We)=>{let $t=new Set(O),Ie=!$t.has(pe);Ie?$t.add(pe):$t.delete(pe),G||ne($t),c?.(Array.from($t),{expanded:Ie,node:We});},[O,G,c]),[A,Y]=W__namespace.useState(new Set(p)),ie=f!==void 0,Te=ie?new Set(f):A,U=W__namespace.useCallback((pe,We,$t)=>{let Ie=new Set(Te),vn=!Ie.has(pe);m?vn?Ie.add(pe):Ie.delete(pe):(Ie.clear(),vn&&Ie.add(pe)),ie||Y(Ie);let Xr=[],Go=Sa=>{for(let qr of Sa)Ie.has(qr.key)&&Xr.push(qr),qr.children&&Go(qr.children);};Go(r),g?.(Array.from(Ie),{selected:vn,selectedNodes:Xr,node:We,event:$t});},[Te,m,ie,g,r]),[dt,ee]=W__namespace.useState(new Set(w)),[nt,Gn]=W__namespace.useState(new Set),vt=b!==void 0,xr=vt?new Set(Array.isArray(b)?b:b.checked):dt,$n=vt&&!Array.isArray(b)?new Set(b.halfChecked):nt,Ko=W__namespace.useCallback((pe,We,$t)=>{let Ie=new Set(xr),vn=new Set($n),Xr=!Ie.has(pe);if(Xr?(Ie.add(pe),vn.delete(pe)):Ie.delete(pe),!v&&We.children){let Ni=XT(We);for(let Wn of Ni)Xr?(Ie.add(Wn),vn.delete(Wn)):Ie.delete(Wn);}vt||(ee(Ie),Gn(vn));let Go=[],Sa=Ni=>{for(let Wn of Ni)Ie.has(Wn.key)&&Go.push(Wn),Wn.children&&Sa(Wn.children);};Sa(r);let qr=v?{checked:Array.from(Ie),halfChecked:Array.from(vn)}:Array.from(Ie);y?.(qr,{checked:Xr,checkedNodes:Go,node:We,event:$t,halfCheckedKeys:Array.from(vn)});},[xr,$n,v,vt,y,r]),[Gt,La]=W__namespace.useState(null),[yr,$]=W__namespace.useState(null),[re,_]=W__namespace.useState(null),Le=W__namespace.useCallback((pe,We)=>{$(pe),_(We);},[]),ce=W__namespace.useCallback((pe,We)=>{!Gt||!V||We===0&&rb(Gt,pe.key)||V({event:{},node:pe,dragNode:Gt,dropPosition:We,dropToGap:We!==0});},[Gt,V]),Ge=W__namespace.useCallback(()=>Array.from(O),[O]),$e={expandedKeys:O,toggleExpand:j,selectedKeys:Te,handleSelect:U,selectable:d,multiple:m,checkedKeys:xr,halfCheckedKeys:$n,handleCheck:Ko,checkable:h,checkStrictly:v,draggable:o,draggedNode:Gt,setDraggedNode:La,dragOverKey:yr,dragOverPosition:re,setDragOver:Le,handleDrop:ce,allowDrop:a,onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,showLine:R,showIcon:C,showHandle:x,dragIcon:N,icon:T,leafIcon:k,folderIcon:M,folderOpenIcon:P,blockNode:z,disabled:F,size:n,data:r,getAllKeys:Ge},Un=pe=>{let We=pe.relatedTarget,$t=pe.currentTarget;(!We||!$t.contains(We))&&Le(null,null);};return jsxRuntime.jsx(tb.Provider,{value:$e,children:jsxRuntime.jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Jg({variant:t,size:n,className:e})),onDragLeave:Un,...I,children:r.map((pe,We)=>jsxRuntime.jsx(nb,{node:pe,level:0,isLast:We===r.length-1},pe.key))})})});ob.displayName="Tree";var sb=classVarianceAuthority.cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),tM=({text:e,query:t})=>{if(!t)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map((o,a)=>n.test(o)?jsxRuntime.jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsxRuntime.jsx("span",{children:o},a))})},nM=(e,t)=>{let[n,r]=W__namespace.useState(e);return W__namespace.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},ib=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:v=true,fullWidth:b=false,disabled:w,...y},R)=>{let[C,x]=W__namespace.useState(false),[N,T]=W__namespace.useState(r),[k,M]=W__namespace.useState([]),[P,E]=W__namespace.useState(false),[D,H]=W__namespace.useState(false),[L,S]=W__namespace.useState(0),V=W__namespace.useRef(null),z=W__namespace.useRef(null),F=n!==void 0?n:N,I=nM(F,l);W__namespace.useEffect(()=>{let U=z.current;if(!U)return;let dt=()=>{S(U.offsetWidth);};dt();let ee=new ResizeObserver(dt);return ee.observe(U),()=>{ee.disconnect();}},[]),W__namespace.useImperativeHandle(R,()=>V.current);let K=i?k:s,B=W__namespace.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(F.toLowerCase())),[K,F,i]);W__namespace.useEffect(()=>{if(!i)return;if(I.length<c){M([]);return}let U=false;return (async()=>{E(true);try{let ee=await i(I);U||M(ee);}catch{U||M([]);}finally{U||E(false);}})(),()=>{U=true;}},[I,i,c]);let q=U=>{n===void 0&&T(U),o?.(U);},ne=U=>{let dt=U.target.value;q(dt),dt.length>=c&&x(true);},G=U=>{q(U.label),a?.(U),x(false);},O=()=>{q(""),V.current?.focus();},j=()=>{H(true),x(true);},A=()=>{H(false);},Y=U=>{U.key==="Escape"&&x(false),U.key==="ArrowDown"&&!C&&B.length>0&&x(true);},ie=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",Te=p&&F?"pr-8":"pr-3";return jsxRuntime.jsxs(rt,{open:C,onOpenChange:x,children:[jsxRuntime.jsxs(oo,{ref:z,className:u("relative",b?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:V,type:"text",value:F,onChange:ne,onFocus:j,onBlur:A,onKeyDown:Y,disabled:w,placeholder:d,className:u(sb({size:t,fullWidth:b}),Te,e),style:{borderColor:D?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...y}),p&&F&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsxRuntime.jsx(lucideReact.X,{className:ie})})]}),jsxRuntime.jsx(ot,{className:"p-0",align:"start",style:{width:L>0?L:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsxRuntime.jsx(cmdk.Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsxRuntime.jsx(ze,{style:{maxHeight:h},children:jsxRuntime.jsx(cmdk.Command.List,{id:"autocomplete-list",className:"p-1",children:P?jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(ie,"animate-spin")}),f]}):B.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):B.map(U=>jsxRuntime.jsxs(cmdk.Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>G(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsxRuntime.jsx(lucideReact.Check,{className:u("mr-2 h-4 w-4 shrink-0",F===U.label?"opacity-100":"opacity-0")}),jsxRuntime.jsx("span",{className:"flex-1",children:v?jsxRuntime.jsx(tM,{text:U.label,query:F}):U.label})]},U.value))})})})})]})});ib.displayName="Autocomplete";var Tl=W__namespace.createContext(null),Ml=W__namespace.createContext(null),Nl=()=>{let e=W__namespace.useContext(Tl);if(!e)throw new Error("useFormContext must be used within a Form");return e},Cs=()=>{let e=W__namespace.useContext(Ml);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},rM={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},lb=W__namespace.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=W__namespace.useState(e),[m,f]=W__namespace.useState({}),[p,g]=W__namespace.useState({}),[h,v]=W__namespace.useState({}),[b,w]=W__namespace.useState(false),y=W__namespace.useRef(new Map),R=W__namespace.useCallback((L,S)=>{y.current.set(L,S);},[]),C=W__namespace.useCallback(L=>{y.current.delete(L);},[]),x=W__namespace.useCallback(L=>{let S=y.current.get(L)||[],V=c[L];for(let z of S)if(!z.validate(V))return f(F=>({...F,[L]:z.message})),false;return f(z=>({...z,[L]:null})),true},[c]),N=W__namespace.useCallback(()=>{let L=true,S={};return y.current.forEach((V,z)=>{let F=c[z];for(let I of V)if(!I.validate(F)){S[z]=I.message,L=false;break}S[z]||(S[z]=null);}),f(S),L},[c]),T=W__namespace.useCallback((L,S)=>{d(V=>({...V,[L]:S})),v(V=>({...V,[L]:true})),o&&setTimeout(()=>{x(L);},0);},[o,x]),k=W__namespace.useCallback((L,S)=>{f(V=>({...V,[L]:S}));},[]),M=W__namespace.useCallback((L,S)=>{g(V=>({...V,[L]:S})),S&&r&&x(L);},[r,x]),P=W__namespace.useCallback(L=>({value:c[L],error:m[L]??null,touched:p[L]??false,dirty:h[L]??false}),[c,m,p,h]),E=W__namespace.useCallback(()=>{d(e),f({}),g({}),v({});},[e]),D=async L=>{L.preventDefault();let S={};if(y.current.forEach((z,F)=>{S[F]=true;}),g(S),!N()){n?.(m);return}if(t){w(true);try{await t(c);}finally{w(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:b,setValue:T,setError:k,setTouched:M,validateField:x,validateAll:N,registerField:R,unregisterField:C,getFieldState:P,reset:E};return jsxRuntime.jsx(Tl.Provider,{value:H,children:jsxRuntime.jsx("form",{ref:l,onSubmit:D,className:u("space-y-4",s),...i,children:a})})});lb.displayName="Form";var cb=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=Nl(),a=W__namespace.useId();W__namespace.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsxRuntime.jsx(Ml.Provider,{value:i,children:r})};cb.displayName="FormField";var db=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));db.displayName="FormItem";var ub=W__namespace.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=Cs();return jsxRuntime.jsxs(Tr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsxRuntime.jsx("span",{className:"ml-1 text-danger",children:"*"})]})});ub.displayName="FormLabel";var mb=({children:e})=>{let{name:t,id:n,error:r,touched:o}=Cs(),a=Nl(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return W__namespace.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};mb.displayName="FormControl";var pb=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));pb.displayName="FormDescription";var fb=W__namespace.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=Cs(),i=t??(s?a:null);return i?jsxRuntime.jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});fb.displayName="FormMessage";var bb=classVarianceAuthority.cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),vb=W__namespace.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxRuntime.jsxs("div",{ref:l,className:u(bb({size:t,className:e})),...i,children:[jsxRuntime.jsxs(Mr,{"data-user-avatar":true,children:[o&&jsxRuntime.jsx(no,{src:o,alt:n}),jsxRuntime.jsx(Nr,{children:c})]}),jsxRuntime.jsxs("div",{className:"flex flex-col min-w-0",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsxRuntime.jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});vb.displayName="User";var xb=classVarianceAuthority.cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"flat",size:"md"}}),yb=W__namespace.forwardRef(({className:e,variant:t,size:n,...r},o)=>jsxRuntime.jsx("code",{ref:o,className:u(xb({variant:t,size:n,className:e})),...r}));yb.displayName="Code";function Tb(e){let[t,n]=W.useState(false);return W.useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var Mb=W__namespace.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=W.useState(false),f=Tb(s)?prismReactRenderer.themes.oneDark:prismReactRenderer.themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxRuntime.jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsxRuntime.jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(prismReactRenderer.Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:v})=>jsxRuntime.jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((b,w)=>jsxRuntime.jsxs("div",{...h({line:b}),children:[n&&jsxRuntime.jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:w+1}),b.map((y,R)=>jsxRuntime.jsx("span",{...v({token:y})},R))]},w))})}),!i&&jsxRuntime.jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})})]})]})});Mb.displayName="CodeBlock";var Nb=W__namespace.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=W.useState(0),[s,i]=W.useState(false),c=Tb(n)?prismReactRenderer.themes.oneDark:prismReactRenderer.themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxRuntime.jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsxRuntime.jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(prismReactRenderer.Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsxRuntime.jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((v,b)=>jsxRuntime.jsx("div",{...g({line:v}),children:v.map((w,y)=>jsxRuntime.jsx("span",{...h({token:w})},y))},b))})}),jsxRuntime.jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})})]})]})});Nb.displayName="TabbedCodeBlock";var kb=classVarianceAuthority.cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),Pb=W__namespace.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=W__namespace.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxRuntime.jsxs("div",{ref:d,className:u(kb({variant:t,size:n,className:e})),...c,children:[!l&&jsxRuntime.jsx("span",{className:"text-muted-foreground select-none",children:i}),jsxRuntime.jsx("code",{className:"flex-1 truncate",children:r}),o&&jsxRuntime.jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-green-500"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});Pb.displayName="Snippet";var Ll=classVarianceAuthority.cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Eb=W__namespace.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=W__namespace.useState("loading");W__namespace.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},v=()=>{g("error"),i?.();},b={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsxRuntime.jsx("div",{className:u(Ll({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxRuntime.jsxs("div",{className:u(Ll({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsxRuntime.jsx($a,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:v,className:u("h-full w-full transition-opacity duration-300",b,p==="loading"?"opacity-0":"opacity-100"),...m})]})});Eb.displayName="Image";var Db=classVarianceAuthority.cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),Hb=classVarianceAuthority.cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),Ib=W__namespace.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),Vb=W__namespace.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=W__namespace.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(v=>v!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsxRuntime.jsx(Ib.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsxRuntime.jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(Db({size:t,className:e})),...i,children:s})})});Vb.displayName="Listbox";var Ab=W__namespace.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=W__namespace.useContext(Ib),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxRuntime.jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(Hb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsxRuntime.jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:a}),o&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsxRuntime.jsx(lucideReact.Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});Ab.displayName="ListboxItem";var Ob=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Bb=classVarianceAuthority.cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function vM({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=W__namespace.useState(null),[f,p]=W__namespace.useState(null),g=(y,R)=>{i||(m(R),y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",String(R)));},h=(y,R)=>{y.preventDefault(),!(i||d===null||d===R)&&p(R);},v=()=>{p(null);},b=(y,R)=>{if(y.preventDefault(),i||d===null||d===R){m(null),p(null);return}let C=[...r],[x]=C.splice(d,1);C.splice(R,0,x),o?.(C),m(null),p(null);},w=()=>{m(null),p(null);};return jsxRuntime.jsx("div",{ref:c,className:u(Ob({variant:t,size:n,className:e})),...l,children:r.map((y,R)=>jsxRuntime.jsxs("div",{draggable:!i,onDragStart:C=>g(C,R),onDragOver:C=>h(C,R),onDragLeave:v,onDrop:C=>b(C,R),onDragEnd:w,className:u(Bb({variant:t,size:n,isDragging:d===R,isDragOver:f===R}),!i&&"cursor-move"),children:[s&&jsxRuntime.jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:a(y,R)})]},y.id))})}var hM=W__namespace.forwardRef(vM);var Gb=classVarianceAuthority.cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),wM={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},$b=W__namespace.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxRuntime.jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsxRuntime.jsx("div",{className:u(Gb({variant:t,visible:n})),"aria-hidden":!n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsxRuntime.jsx(lucideReact.Loader2,{className:u(wM[r],"animate-spin text-primary")}),a&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));$b.displayName="LoadingOverlay";var Ub=classVarianceAuthority.cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),Wb=W__namespace.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=W__namespace.useState(0),[c,d]=W__namespace.useState(false),m=W__namespace.useRef(null);return W__namespace.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:s,className:u(Ub({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsxRuntime.jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsxRuntime.jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsxRuntime.jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});Wb.displayName="NProgress";var Xb=classVarianceAuthority.cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),jb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},PM={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},qb=W__namespace.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsxRuntime.jsx("div",{className:u(PM[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsxRuntime.jsx("div",{className:u(jb[n||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxRuntime.jsxs("div",{className:"w-full space-y-2",children:[jsxRuntime.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsxRuntime.jsx(lucideReact.Loader2,{className:u(jb[n||"md"],"animate-spin",l)})}};return jsxRuntime.jsx("div",{ref:i,className:u(Xb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsxRuntime.jsx("span",{className:u("text-sm",l),children:o})]})})});qb.displayName="Loading";var Hl=class extends W__namespace.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,n){this.props.onError?.(t,n);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,o)=>r!==t.resetKeys?.[o])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsx(Il,{error:this.state.error,onReset:this.reset}):this.props.children}},Il=W__namespace.forwardRef(({error:e,onReset:t,className:n},r)=>jsxRuntime.jsxs("div",{ref:r,className:u("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",n),role:"alert",children:[jsxRuntime.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxRuntime.jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));Il.displayName="DefaultErrorFallback";var SM=Hl;var Qb=W__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},m)=>{let[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),v=e!==void 0,b=v?e:g,w=R=>{v||h(R),n?.(R);},y=R=>{if(!R)return r;let{from:C,to:x}=R;return C&&x?`${dateFns.format(C,o)} - ${dateFns.format(x,o)}`:C?dateFns.format(C,o):r};return jsxRuntime.jsxs(rt,{open:f,onOpenChange:p,children:[jsxRuntime.jsxs(Dt,{ref:m,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!b?.from&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",c),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),y(b)]}),jsxRuntime.jsx(ot,{className:"w-auto p-0",align:d,children:jsxRuntime.jsx(so,{mode:"range",defaultMonth:b?.from,selected:b,onSelect:w,numberOfMonths:l,disabled:R=>!!(s&&R<s||i&&R>i),initialFocus:true})})]})});Qb.displayName="DateRangePicker";var bo=e=>String(e).padStart(2,"0"),Jb=W__namespace.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=W__namespace.useState(false),d=r?Array.from({length:24},(y,R)=>R):Array.from({length:12},(y,R)=>R+1),m=Array.from({length:Math.floor(60/o)},(y,R)=>R*o),f=y=>{if(!y)return n;if(r)return `${bo(y.hours)}:${bo(y.minutes)}`;let R=y.hours%12||12,C=y.hours>=12?"PM":"AM";return `${bo(R)}:${bo(y.minutes)} ${C}`},p=y=>{let R=e?.minutes??0,C=y;if(!r&&e){let x=e.hours>=12;x&&y!==12?C=y+12:!x&&y===12&&(C=0);}t?.({hours:C,minutes:R});},g=y=>{let R=e?.hours??0;t?.({hours:R,minutes:y});},h=y=>{if(!e)return;let R=e.hours;y==="AM"&&e.hours>=12?R=e.hours-12:y==="PM"&&e.hours<12&&(R=e.hours+12),t?.({hours:R,minutes:e.minutes});},v=()=>{let y=new Date;t?.({hours:y.getHours(),minutes:y.getMinutes()});},b=e?e.hours>=12?"PM":"AM":void 0,w=e?r?e.hours:e.hours%12||12:void 0;return jsxRuntime.jsxs(rt,{open:l,onOpenChange:c,children:[jsxRuntime.jsxs(Dt,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"}),f(e)]}),jsxRuntime.jsxs(ot,{className:"w-auto p-0",align:"start",children:[jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:d.map(y=>jsxRuntime.jsx(oe,{variant:w===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(y),children:bo(y)},y))})})]}),jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:m.map(y=>jsxRuntime.jsx(oe,{variant:e?.minutes===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(y),children:bo(y)},y))})})]}),!r&&jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsxRuntime.jsx(oe,{variant:b==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsxRuntime.jsx(oe,{variant:b==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxRuntime.jsxs("div",{className:"flex justify-between border-t p-2",children:[jsxRuntime.jsx(oe,{variant:"ghost",size:"sm",onClick:v,children:"Now"}),jsxRuntime.jsx(oe,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Jb.displayName="TimePicker";var ev=classVarianceAuthority.cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function VM({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0);W__namespace.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,v=r+l,b=Math.max(0,Math.floor(p/v)-a),w=Math.ceil(o/v)+2*a,y=Math.min(n.length-1,b+w),R=x=>{let N=x.currentTarget.scrollTop;g(N),c?.(N);},C=W__namespace.useMemo(()=>{let x=[];for(let N=b;N<=y;N++)n[N]!==void 0&&x.push({item:n[N],index:N,style:{position:"absolute",top:N*v,left:0,right:0,height:r}});return x},[n,b,y,v,r]);return jsxRuntime.jsx("div",{ref:f,className:u(ev({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:R,...d,children:jsxRuntime.jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:x,index:N,style:T})=>jsxRuntime.jsx("div",{style:T,children:s(x,N)},i?i(x,N):N))})})}var AM=W__namespace.forwardRef(VM);var nv=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Ol=classVarianceAuthority.cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),rv=W__namespace.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,...f},p)=>{let g=W__namespace.useRef(null),h=W__namespace.useRef(null),v=W__namespace.useRef(false);W__namespace.useImperativeHandle(p,()=>g.current),W__namespace.useEffect(()=>{let w=h.current;if(!w)return;let y=new IntersectionObserver(R=>{let[C]=R;C.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return y.observe(w),()=>{y.disconnect();}},[a,s,o,l,c,d]);let b=jsxRuntime.jsx("div",{className:u(Ol({size:n})),children:jsxRuntime.jsx(lucideReact.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxRuntime.jsxs("div",{ref:g,className:u(nv({variant:t,className:e})),...f,children:[r,jsxRuntime.jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||b),!a&&!s&&m&&jsxRuntime.jsx("div",{className:u(Ol({size:n}),"text-muted-foreground text-sm"),children:m})]})});rv.displayName="InfiniteScroll";var ca=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));ca.displayName="VisuallyHidden";var av={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},FM={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},sv=classVarianceAuthority.cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Bl=classVarianceAuthority.cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Hs=W__namespace.createContext(null),Ar=()=>{let e=W__namespace.useContext(Hs);if(!e)throw new Error("Modal components must be used within a Modal");return e},lv=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=W__namespace.useState(false),v=e!==void 0,b=v?e:g,[w,y]=W__namespace.useState(false),R=W__namespace.useRef(null),C=W__namespace.useId(),x=W__namespace.useId();W__namespace.useEffect(()=>{y(true);},[]);let N=W__namespace.useCallback(P=>{v||h(P),t?.(P);},[v,t]);W__namespace.useEffect(()=>{if(b)return ut(),()=>mt()},[b]),W__namespace.useEffect(()=>{if(!b||i)return;let P=E=>{E.key==="Escape"&&N(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[b,i,N]);let T=P=>{s&&P.target===P.currentTarget&&N(false);},k=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:P=>{n.props.onClick?.(P),N(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>N(true),children:n}):null,M=()=>!w||!b?null:d==="outside"?_a__namespace.createPortal(jsxRuntime.jsx("div",{"data-state":b?"open":"closed",className:u(sv(),av[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxRuntime.jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":x,"data-state":b?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(Tt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})}),document.body):_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":b?"open":"closed",className:u(sv(),av[l]),onClick:T,"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":x,"data-state":b?"open":"closed",className:u(Bl({size:m}),FM[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(Tt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})]}),document.body);return jsxRuntime.jsxs(Hs.Provider,{value:{open:b,onOpenChange:N,scrollBehavior:d,titleId:C,descriptionId:x},children:[k,M()]})});lv.displayName="Modal";var cv=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=W__namespace.useState(n),i=t!==void 0,l=i?t:a,c=W__namespace.useId(),d=W__namespace.useId(),m=W__namespace.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsxRuntime.jsx(Hs.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};cv.displayName="ModalRoot";var dv=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Ar();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});dv.displayName="ModalTrigger";var Fl=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?_a__namespace.createPortal(e,t||document.body):null};Fl.displayName="ModalPortal";var Kl=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ar();return r?jsxRuntime.jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Kl.displayName="ModalOverlay";var uv=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Ar();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});uv.displayName="ModalClose";var mv=W__namespace.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Ar(),[f,p]=W__namespace.useState(false);return W__namespace.useEffect(()=>{p(true);},[]),W__namespace.useEffect(()=>{if(l)return ut(),()=>mt()},[l]),W__namespace.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxRuntime.jsxs(Fl,{children:[jsxRuntime.jsx(Kl,{}),jsxRuntime.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Bl({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsxRuntime.jsx(Tt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});mv.displayName="ModalContent";var pv=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pv.displayName="ModalHeader";var fv=({className:e,children:t})=>(W__namespace.useContext(Hs)?.scrollBehavior??"inside")==="inside"?jsxRuntime.jsx(ze,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsxRuntime.jsx("div",{className:u(e),children:t});fv.displayName="ModalBody";var gv=({className:e,children:t,...n})=>{let{onOpenChange:r}=Ar();return jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:W__namespace.Children.map(t,o=>W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};gv.displayName="ModalFooter";var bv=W__namespace.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Ar();return jsxRuntime.jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});bv.displayName="ModalTitle";var vv=W__namespace.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Ar();return jsxRuntime.jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});vv.displayName="ModalDescription";var yv=classVarianceAuthority.cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),YM=classVarianceAuthority.cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),_M=W__namespace.createContext(null),XM={default:lucideReact.HelpCircle,danger:lucideReact.XCircle,warning:lucideReact.AlertTriangle,success:lucideReact.CheckCircle,info:lucideReact.Info},Gl=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,confirmText:a="Confirm",cancelText:s="Cancel",onConfirm:i,onCancel:l,showIcon:c=true,icon:d,variant:m="default",loading:f=false,disabled:p=false,className:g},h)=>{let[v,b]=W__namespace.useState(false),[w,y]=W__namespace.useState(false),[R,C]=W__namespace.useState(false),x=e!==void 0,N=x?e:v,T=XM[m||"default"],k=W__namespace.useId(),M=W__namespace.useId();W__namespace.useEffect(()=>{C(true);},[]);let P=W__namespace.useCallback(V=>{x||b(V),t?.(V);},[x,t]);W__namespace.useEffect(()=>{if(N)return ut(),()=>mt()},[N]);let E=async()=>{if(i){let V=i();if(V instanceof Promise){y(true);try{await V;}finally{y(false);}}}P(false);},D=()=>{l?.(),P(false);},H=f||w,L=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:V=>{n.props.onClick?.(V),P(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>P(true),children:n}):null,S=()=>!R||!N?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":N?"open":"closed",className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:h,role:"alertdialog","aria-modal":"true","aria-labelledby":k,"aria-describedby":o?M:void 0,"data-state":N?"open":"closed",className:u("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",g),children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[c&&jsxRuntime.jsx("div",{className:u(yv({variant:m})),children:d||jsxRuntime.jsx(T,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsxRuntime.jsx("h2",{id:k,className:"text-lg font-semibold",children:r}),o&&jsxRuntime.jsx("p",{id:M,className:"text-sm text-muted-foreground",children:o})]})]}),jsxRuntime.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsxRuntime.jsx("button",{type:"button",className:u(hn({variant:"bordered"})),onClick:D,disabled:H,children:s}),jsxRuntime.jsx("button",{type:"button",className:u(hn(),YM({variant:m}),H&&"opacity-50 cursor-not-allowed"),onClick:E,disabled:p||H,children:H?jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):a})]})]})]}),document.body);return jsxRuntime.jsxs(_M.Provider,{value:{open:N,onOpenChange:P,titleId:k,descriptionId:M},children:[L,S()]})});Gl.displayName="ConfirmDialog";function qM(){let[e,t]=W__namespace.useState({open:false,options:null,resolve:null}),n=W__namespace.useCallback(i=>new Promise(l=>{t({open:true,options:i,resolve:l});}),[]),r=W__namespace.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),o=W__namespace.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),a=W__namespace.useCallback(i=>{i||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=W__namespace.useMemo(()=>e.options?jsxRuntime.jsx(Gl,{open:e.open,onOpenChange:a,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:o}):null,[e,r,o,a]);return {confirm:n,ConfirmDialog:s}}var iN=e=>e.map(t=>typeof t=="string"?{src:t}:t),$l=W__namespace.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let v=W__namespace.useMemo(()=>iN(e),[e]),[b,w]=W__namespace.useState(r),[y,R]=W__namespace.useState(1),[C,x]=W__namespace.useState(0),[N,T]=W__namespace.useState(false),[k,M]=W__namespace.useState(false),[P,E]=W__namespace.useState({x:0,y:0}),[D,H]=W__namespace.useState({x:0,y:0}),[L,S]=W__namespace.useState(false),V=W__namespace.useRef(null),z=v[b];W__namespace.useEffect(()=>{S(true);},[]),W__namespace.useEffect(()=>{w(r);},[r]),W__namespace.useEffect(()=>{o?.(b);},[b,o]),W__namespace.useEffect(()=>{R(1),x(0),E({x:0,y:0});},[b]),W__namespace.useEffect(()=>{if(t)return ut(),()=>mt()},[t]);let F=W__namespace.useCallback(()=>{w(ee=>ee>0?ee-1:v.length-1);},[v.length]),I=W__namespace.useCallback(()=>{w(ee=>ee<v.length-1?ee+1:0);},[v.length]),K=()=>{R(ee=>Math.min(ee+.5,4));},B=()=>{R(ee=>{let nt=Math.max(ee-.5,.5);return nt===1&&E({x:0,y:0}),nt});},q=()=>{x(ee=>(ee+90)%360);},ne=async()=>{if(z)try{let nt=await(await fetch(z.src)).blob(),Gn=URL.createObjectURL(nt),vt=document.createElement("a");vt.href=Gn,vt.download=z.alt||`image-${b+1}`,document.body.appendChild(vt),vt.click(),document.body.removeChild(vt),URL.revokeObjectURL(Gn);}catch{window.open(z.src,"_blank");}},G=async()=>{if(V.current)if(N)try{await document.exitFullscreen(),T(!1);}catch{}else try{await V.current.requestFullscreen(),T(!0);}catch{}},O=ee=>{y>1&&(M(true),H({x:ee.clientX-P.x,y:ee.clientY-P.y}));},j=ee=>{k&&y>1&&E({x:ee.clientX-D.x,y:ee.clientY-D.y});},A=()=>{M(false);},Y=()=>{n?.(false);},ie=ee=>{p&&ee.target===ee.currentTarget&&Y();},Te=W__namespace.useCallback(ee=>{switch(ee.key){case "ArrowLeft":F();break;case "ArrowRight":I();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":B();break}},[F,I,n]);if(W__namespace.useEffect(()=>{if(t)return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[t,Te]),W__namespace.useEffect(()=>{let ee=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",ee),()=>document.removeEventListener("fullscreenchange",ee)},[]),v.length===0)return null;let U=a?W__namespace.isValidElement(a)?W__namespace.cloneElement(a,{onClick:ee=>{a.props.onClick?.(ee),n?.(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[U,!L||!t?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:ie}),jsxRuntime.jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[f&&v.length>1&&jsxRuntime.jsxs("span",{className:"text-sm",children:[b+1," / ",v.length]}),z?.title&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium",children:z.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-5 w-5"})}),jsxRuntime.jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(y*100),"%"]}),jsxRuntime.jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-5 w-5"})})]}),l&&jsxRuntime.jsx("button",{onClick:q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-5 w-5"})}),c&&jsxRuntime.jsx("button",{onClick:ne,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-5 w-5"})}),d&&jsxRuntime.jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:N?"Exit fullscreen":"Fullscreen",children:N?jsxRuntime.jsx(lucideReact.Minimize2,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Maximize2,{className:"h-5 w-5"})}),jsxRuntime.jsxs("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxRuntime.jsxs("div",{ref:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:j,onMouseUp:A,onMouseLeave:A,children:[m&&v.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:F,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-6 w-6"})}),jsxRuntime.jsx("button",{onClick:I,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("img",{src:z?.src,alt:z?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":y>1?"cursor-grab":""),style:{transform:`translate(${P.x}px, ${P.y}px) scale(${y}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsxRuntime.jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&v.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:v.map((ee,nt)=>jsxRuntime.jsx("button",{onClick:()=>w(nt),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",b===nt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsxRuntime.jsx("img",{src:ee.src,alt:ee.alt||`Thumbnail ${nt+1}`,className:"h-full w-full object-cover"})},nt))})]})]}),document.body)]})});$l.displayName="ImageViewer";var wv=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=W__namespace.useState(false);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsxRuntime.jsx($l,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};wv.displayName="ImageViewerTrigger";var Cv=classVarianceAuthority.cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),Tv=W__namespace.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let m=a!=null;return jsxRuntime.jsxs("span",{ref:d,className:u(Cv({color:t,size:m?void 0:n,position:r,ping:o}),m&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsxRuntime.jsx("span",{className:u("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});Tv.displayName="Indicator";var Mv=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-flex",e),...n,children:t}));Mv.displayName="IndicatorWrapper";var kv=classVarianceAuthority.cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),Pv=W__namespace.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=W__namespace.useRef(null),[c,d]=W__namespace.useState({top:false,bottom:false,left:false,right:false});W__namespace.useImperativeHandle(i,()=>l.current);let m=W__namespace.useCallback(()=>{let b=l.current;if(!b)return;let{scrollTop:w,scrollLeft:y,scrollHeight:R,scrollWidth:C,clientHeight:x,clientWidth:N}=b;d({top:w>0,bottom:w<R-x-1,left:y>0,right:y<C-N-1});},[]);W__namespace.useEffect(()=>{let b=l.current;if(b)return m(),b.addEventListener("scroll",m),window.addEventListener("resize",m),()=>{b.removeEventListener("scroll",m),window.removeEventListener("resize",m);}},[m]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",v={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsxRuntime.jsx("div",{ref:l,className:u(kv({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:v,...s,children:a})});Pv.displayName="ScrollShadow";var Ev=classVarianceAuthority.cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),pN={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},fN={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},gN=e=>{let t=e.toLowerCase();return pN[t]||e.toUpperCase()},ua=e=>{let t=e.toLowerCase();return fN[t]||t},Is=e=>{let t=ua(e);return ["meta","control","alt","shift"].includes(t)},Lv=W__namespace.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{W__namespace.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(Is).map(ua),p=m.filter(h=>!Is(h)).map(ua),g=h=>{let v=f.includes("meta")===h.metaKey,b=f.includes("control")===h.ctrlKey,w=f.includes("alt")===h.altKey,y=f.includes("shift")===h.shiftKey,R=p.length===0||p.includes(h.key.toLowerCase());v&&b&&w&&y&&R&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[p>0&&jsxRuntime.jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsxRuntime.jsx("span",{children:gN(f)})]},p)):o;return jsxRuntime.jsx("kbd",{ref:c,className:u(Ev({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Lv.displayName="Kbd";function bN(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;W__namespace.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(Is).map(ua),i=a.filter(c=>!Is(c)).map(ua),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Sv=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",bordered:"border border-current hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Dv=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,successDuration:o=2e3,onCopySuccess:a,onCopyError:s,copyIcon:i,successIcon:l,...c},d)=>{let[m,f]=W__namespace.useState(false),p={sm:14,md:16,lg:20}[n??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),f(!0),a?.(),setTimeout(()=>{f(!1);},o);}catch(h){s?.(h);}};return jsxRuntime.jsx("button",{ref:d,type:"button",className:u(Sv({variant:t,size:n}),e),onClick:g,"aria-label":m?"Copied":"Copy to clipboard",...c,children:m?l??jsxRuntime.jsx(lucideReact.Check,{className:"text-success",style:{width:p,height:p}}):i??jsxRuntime.jsx(lucideReact.Copy,{style:{width:p,height:p}})})});Dv.displayName="CopyButton";var Iv=classVarianceAuthority.cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),TN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function NN(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function kN(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function zs(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function As(e){return zs(e,new Date)}function Hv(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return zs(r,t)||zs(o,t)||r<t&&o>t})}var Vv=W__namespace.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:m="en-US",...f},p)=>{let[g,h]=W__namespace.useState(new Date),v=s??g,b=M=>{i?i(M):h(M);},w=d===1?MN:TN,y=()=>{let M=new Date(v);o==="month"?M.setMonth(M.getMonth()-1):o==="week"?M.setDate(M.getDate()-7):M.setDate(M.getDate()-1),b(M);},R=()=>{let M=new Date(v);o==="month"?M.setMonth(M.getMonth()+1):o==="week"?M.setDate(M.getDate()+7):M.setDate(M.getDate()+1),b(M);},C=()=>{b(new Date);},x=()=>o==="day"?v.toLocaleDateString(m,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):v.toLocaleDateString(m,{year:"numeric",month:"long"}),N=()=>{let M=NN(v.getFullYear(),v.getMonth(),d);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col",children:[jsxRuntime.jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(P=>jsxRuntime.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsxRuntime.jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:M.map((P,E)=>{let D=Hv(r,P),H=P.getMonth()===v.getMonth();return jsxRuntime.jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(P),children:[jsxRuntime.jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",As(P)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:P.getDate()}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(L=>jsxRuntime.jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id)),D.length>3&&jsxRuntime.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},E)})})]})},T=()=>{let M=kN(v,d),P=Array.from({length:24},(E,D)=>D);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsxRuntime.jsx("div",{className:"p-2"}),M.map((E,D)=>jsxRuntime.jsxs("div",{className:u("p-2 text-center border-l",As(E)&&"bg-primary/10"),children:[jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsxRuntime.jsx("div",{className:u("text-lg font-semibold",As(E)&&"text-primary"),children:E.getDate()})]},D))]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(E=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),M.map((D,H)=>{let L=new Date(D);L.setHours(E,0,0,0);let S=r.filter(V=>{let z=new Date(V.start);return zs(z,D)&&z.getHours()===E});return jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(L),children:S.map(V=>jsxRuntime.jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),l?.(V);},children:V.title},V.id))},H)})]},E))})})]})},k=()=>{let M=Array.from({length:24},(E,D)=>D),P=Hv(r,v);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsx("div",{className:"p-4 border-b text-center",children:jsxRuntime.jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",As(v)&&"bg-primary text-primary-foreground"),children:v.getDate()})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_1fr]",children:M.map(E=>{let D=new Date(v);D.setHours(E,0,0,0);let H=P.filter(L=>new Date(L.start).getHours()===E);return jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:H.map(L=>jsxRuntime.jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id))})]},E)})})})]})};return jsxRuntime.jsxs("div",{ref:p,className:u(Iv({variant:t,size:n,className:e})),...f,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(oe,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsxRuntime.jsx(oe,{variant:"ghost",size:"icon",onClick:y,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(oe,{variant:"ghost",size:"icon",onClick:R,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),jsxRuntime.jsx("h2",{className:"text-lg font-semibold ml-2",children:x()})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(M=>jsxRuntime.jsx(oe,{variant:o===M?"solid":"ghost",size:"sm",onClick:()=>a?.(M),children:M.charAt(0).toUpperCase()+M.slice(1)},M))})]}),o==="month"&&N(),o==="week"&&T(),o==="day"&&k()]})});Vv.displayName="FullCalendar";var Ks=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxRuntime.jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsxRuntime.jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsxRuntime.jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsxRuntime.jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),pa=classVarianceAuthority.cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),fa=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],Av=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsxRuntime.jsx("div",{ref:m,className:u(pa({size:t,className:e})),...d,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.LineChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),s&&jsxRuntime.jsx(recharts.Legend,{}),r.map((f,p)=>jsxRuntime.jsx(recharts.Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Av.displayName="LineChart";var zv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.BarChart,{data:n,layout:d,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),s&&jsxRuntime.jsx(recharts.Legend,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));zv.displayName="BarChart";var Ov=W__namespace.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=fa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.PieChart,{children:[c&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),l&&jsxRuntime.jsx(recharts.Legend,{}),jsxRuntime.jsx(recharts.Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsxRuntime.jsx(recharts.Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Ov.displayName="PieChart";var Bv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.AreaChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsxRuntime.jsx(recharts.Tooltip,{content:jsxRuntime.jsx(Ks,{})}),s&&jsxRuntime.jsx(recharts.Legend,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));Bv.displayName="AreaChart";var Gv=classVarianceAuthority.cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),$v=classVarianceAuthority.cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Zl=classVarianceAuthority.cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function qN({card:e,columnId:t,variant:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=sortable.useSortable({id:e.id,data:{columnId:t}}),m={transform:utilities.CSS.Transform.toString(l),transition:c};return jsxRuntime.jsx("div",{ref:i,style:m,className:u(Zl({variant:n,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:r?r(e,t):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function ZN({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxRuntime.jsxs("div",{className:u($v({variant:t})),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsxRuntime.jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsxRuntime.jsx(oe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(ze,{style:{height:s},children:jsxRuntime.jsxs("div",{className:"p-2 space-y-2",children:[jsxRuntime.jsx(sortable.SortableContext,{items:e.cards.map(i=>i.id),strategy:sortable.verticalListSortingStrategy,children:e.cards.map(i=>jsxRuntime.jsx(qN,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.id))}),e.cards.length===0&&jsxRuntime.jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Uv=W__namespace.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=W__namespace.useState(null),[p,g]=W__namespace.useState(null),h=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),v=R=>n.find(C=>C.cards.some(x=>x.id===R));return jsxRuntime.jsxs(core.DndContext,{sensors:h,collisionDetection:core.closestCorners,onDragStart:R=>{let{active:C}=R,x=v(C.id);if(x){let N=x.cards.find(T=>T.id===C.id);N&&(f(N),g(x.id));}},onDragOver:R=>{let{active:C,over:x}=R;if(!x)return;let N=C.id,T=x.id,k=v(N),M=v(T)||n.find(D=>D.id===T);if(!k||!M||k.id===M.id)return;let P=M.cards.findIndex(D=>D.id===T),E=P===-1?M.cards.length:P;r?.(N,k.id,M.id,E);},onDragEnd:R=>{let{active:C,over:x}=R;if(x&&C.id!==x.id){let N=v(C.id),T=v(x.id)||n.find(k=>k.id===x.id);if(N&&T){let k=T.cards.findIndex(P=>P.id===x.id),M=k===-1?T.cards.length:k;r?.(C.id,N.id,T.id,M);}}f(null),g(null);},children:[jsxRuntime.jsx("div",{ref:d,className:u(Gv({variant:t,className:e})),...c,children:n.map(R=>jsxRuntime.jsx(ZN,{column:R,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},R.id))}),jsxRuntime.jsx(core.DragOverlay,{children:m&&p&&jsxRuntime.jsx("div",{className:u(Zl({variant:t,isDragging:true})),children:s?s(m,p):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:m.title}),m.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});Uv.displayName="KanbanBoard";var Wv=classVarianceAuthority.cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),jv=W__namespace.createContext(null);function $s(){let e=W__namespace.useContext(jv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Yv=W__namespace.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=QN__default.default({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=W__namespace.useState(false),[h,v]=W__namespace.useState(false),[b,w]=W__namespace.useState(0),[y,R]=W__namespace.useState([]),C=W__namespace.useCallback(M=>{M&&(w(M.selectedScrollSnap()),g(M.canScrollPrev()),v(M.canScrollNext()));},[]),x=W__namespace.useCallback(()=>{f?.scrollPrev();},[f]),N=W__namespace.useCallback(()=>{f?.scrollNext();},[f]),T=W__namespace.useCallback(M=>{f?.scrollTo(M);},[f]),k=W__namespace.useCallback(M=>{M.key==="ArrowLeft"?(M.preventDefault(),x()):M.key==="ArrowRight"&&(M.preventDefault(),N());},[x,N]);return W__namespace.useEffect(()=>{!f||!l||l(f);},[f,l]),W__namespace.useEffect(()=>{if(f)return R(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsxRuntime.jsx(jv.Provider,{value:{carouselRef:m,api:f,scrollPrev:x,scrollNext:N,canScrollPrev:p,canScrollNext:h,selectedIndex:b,scrollSnaps:y,scrollTo:T,orientation:a},children:jsxRuntime.jsxs("div",{ref:d,className:u(Wv({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsxRuntime.jsx("div",{ref:m,className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ql,{}),jsxRuntime.jsx(Jl,{})]}),i&&y.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:y.map((M,P)=>jsxRuntime.jsx("button",{className:u("w-2 h-2 rounded-full transition-all",P===b?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(P),"aria-label":`Go to slide ${P+1}`},P))})]})})});Yv.displayName="Carousel";var _v=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex",e),...t}));_v.displayName="CarouselContent";var Xv=W__namespace.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=$s();return jsxRuntime.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});Xv.displayName="CarouselItem";var Ql=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollPrev:a,canScrollPrev:s}=$s();return jsxRuntime.jsxs(oe,{ref:o,variant:t,size:n,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Ql.displayName="CarouselPrevious";var Jl=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollNext:a,canScrollNext:s}=$s();return jsxRuntime.jsxs(oe,{ref:o,variant:t,size:n,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})});Jl.displayName="CarouselNext";var qv=classVarianceAuthority.cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Us={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},tc={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},Zv=W__namespace.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=W__namespace.useState(r.length>0?"recent":o),[m,f]=W__namespace.useState(""),g=m?Object.values(tc).flat().filter(v=>v.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:tc[c]||[],h=v=>{n?.(v);};return jsxRuntime.jsxs("div",{ref:l,className:u(qv({size:t,className:e})),...i,children:[a&&jsxRuntime.jsx("div",{className:"p-2 border-b",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Oa,{placeholder:"Search emojis...",value:m,onChange:v=>f(v.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsxRuntime.jsx("div",{className:"flex border-b px-1",children:Object.entries(Us).map(([v,{icon:b}])=>v==="recent"&&r.length===0?null:jsxRuntime.jsx("button",{className:u("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===v&&"bg-accent"),onClick:()=>d(v),title:Us[v].name,children:b},v))}),!m&&jsxRuntime.jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Us[c].name}),jsxRuntime.jsx(ze,{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((v,b)=>jsxRuntime.jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(v),children:v},`${v}-${b}`)),g.length===0&&jsxRuntime.jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Zv.displayName="EmojiPicker";var Qv=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Lk=classVarianceAuthority.cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),Sk=classVarianceAuthority.cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),je=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxRuntime.jsxs(_n,{children:[jsxRuntime.jsx(Xn,{children:jsxRuntime.jsx(oe,{type:"button",variant:n?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsxRuntime.jsx(qn,{side:"top",className:"text-xs",children:t})]}),Jv=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=react.useEditor({extensions:[ik__default.default.configure({heading:{levels:[1,2,3]}}),lk__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),ck__default.default,dk__default.default.configure({types:["heading","paragraph"]}),uk__default.default.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});W__namespace.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),W__namespace.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,v=window.prompt("URL",h);if(v!==null){if(v===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:v}).run();}};return p?jsxRuntime.jsx(Yn,{children:jsxRuntime.jsxs("div",{ref:f,className:u(Qv({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxRuntime.jsxs("div",{className:u(Lk({size:n})),children:[jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsxRuntime.jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsxRuntime.jsx(react.EditorContent,{editor:p,className:u(Sk({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});Jv.displayName="RichTextEditor";var th=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function Bk(e,t,n){return Dk.centerCrop(Dk.makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function eh(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var nh=W__namespace.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=W__namespace.useRef(null),[h,v]=W__namespace.useState(),[b,w]=W__namespace.useState(),[y,R]=W__namespace.useState(1),[C,x]=W__namespace.useState(0),N=P=>{let{width:E,height:D}=P.currentTarget;if(r){let H=Bk(E,D,r);v(H);}else v(m||{unit:"%",x:10,y:10,width:80,height:80});},T=P=>{v(P),o?.(P);},k=async P=>{if(w(P),a&&g.current&&P.width&&P.height){let E=await eh(g.current,P,C,y);a(E);}},M=()=>{x(P=>(P+90)%360);};return W__namespace.useEffect(()=>{b&&g.current&&a&&eh(g.current,b,C,y).then(P=>{a(P);});},[y,C,b,a]),jsxRuntime.jsxs("div",{ref:p,className:u(th({variant:t,className:e})),...f,children:[jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsxRuntime.jsx(Dk__default.default,{crop:h,onChange:T,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsxRuntime.jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:N,style:{transform:`scale(${y}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Qa,{value:[y],onValueChange:([P])=>R(P),min:l,max:c,step:.1,className:"flex-1"}),jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsxRuntime.jsx(oe,{variant:"bordered",size:"icon",onClick:M,children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-4 w-4"})})]})]})});nh.displayName="ImageCropper";var ac=classVarianceAuthority.cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Gk={sm:96,md:128,lg:192},oh=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let v=o??Gk[n??"md"];return r?jsxRuntime.jsx("div",{ref:h,className:u(ac({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx(Fk__default.default,{value:r,size:v,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsxRuntime.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsxRuntime.jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsxRuntime.jsx("div",{ref:h,className:u(ac({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:v,height:v},children:"No data"})})});oh.displayName="QRCode";var ah=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsxRuntime.jsx(nextThemes.ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});ah.displayName="ThemeProvider";var Xk=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),sh=W__namespace.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=nextThemes.useTheme(),[l,c]=W__namespace.useState(false);W__namespace.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxRuntime.jsxs(oe,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),onClick:d,children:[i==="dark"?jsxRuntime.jsx(lucideReact.Moon,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{children:jsxRuntime.jsxs(oe,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxRuntime.jsxs(wn,{align:"end",children:[jsxRuntime.jsxs(Wt,{onClick:()=>s("light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxRuntime.jsxs(Wt,{onClick:()=>s("dark"),children:[jsxRuntime.jsx(lucideReact.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxRuntime.jsxs(Wt,{onClick:()=>s("system"),children:[jsxRuntime.jsx(lucideReact.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxRuntime.jsxs(oe,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),disabled:true,children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})});sh.displayName="ThemeToggle";var ih=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),lh=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground 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 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),ch=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),dh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let v=W__namespace.useId(),b=p||v,w=`${b}-description`,y=`${b}-error`,R=a&&r;return jsxRuntime.jsxs("div",{className:u(ih({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:b,className:u(ch({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[m&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsxRuntime.jsx("input",{ref:h,id:b,"aria-invalid":a,"aria-describedby":R?y:n?w:void 0,"aria-required":o,className:u(lh({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!R&&jsxRuntime.jsx("p",{id:w,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),R&&jsxRuntime.jsx("p",{id:y,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});dh.displayName="TextField";var ph=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Qk=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),uh=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),mh=classVarianceAuthority.cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Jk=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),fh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:v,showButtons:b=true,formatOptions:w,fullWidth:y=false,disabled:R,id:C,...x},N)=>{let T=W__namespace.useId(),k=C||T,M=`${k}-description`,P=`${k}-error`,[E,D]=W__namespace.useState(h),[H,L]=W__namespace.useState(false),S=g!==void 0?g:E,V=a&&r,z=W__namespace.useCallback(O=>{O!==void 0&&(m!==void 0&&O<m&&(O=m),f!==void 0&&O>f&&(O=f)),g===void 0&&D(O),v?.(O);},[g,m,f,v]),F=()=>{let O=(S??0)+p;z(O);},I=()=>{let O=(S??0)-p;z(O);},K=O=>{let j=O.target.value;if(j==="")z(void 0);else {let A=parseFloat(j);isNaN(A)||z(A);}},B=O=>{O.key==="ArrowUp"?(O.preventDefault(),F()):O.key==="ArrowDown"&&(O.preventDefault(),I());},q=W__namespace.useMemo(()=>S===void 0?"":w?new Intl.NumberFormat(void 0,w).format(S):S.toString(),[S,w]),ne=m!==void 0&&S!==void 0&&S<=m,G=f!==void 0&&S!==void 0&&S>=f;return jsxRuntime.jsxs("div",{className:u(ph({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:k,className:u(Jk({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx("button",{type:"button",onClick:I,disabled:R||ne,className:u(uh({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:u(mh({size:s}))})}),jsxRuntime.jsx("input",{ref:N,id:k,type:"text",inputMode:"decimal",value:q,onChange:K,onKeyDown:B,onFocus:()=>L(true),onBlur:()=>L(false),"aria-invalid":a,"aria-describedby":V?P:n?M:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":S,disabled:R,className:u(Qk({size:s,isInvalid:a,fullWidth:y}),!b&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...x}),b&&jsxRuntime.jsx("button",{type:"button",onClick:F,disabled:R||G,className:u(uh({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:u(mh({size:s}))})})]}),n&&!V&&jsxRuntime.jsx("p",{id:M,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsxRuntime.jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});fh.displayName="NumberField";var bh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),nP=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground 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 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),gh=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),rP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),oP=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),vh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:v=true,showSearchIcon:b=true,disabled:w,placeholder:y="Search...",id:R,...C},x)=>{let N=W__namespace.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,[P,E]=W__namespace.useState(f),D=m!==void 0?m:P,H=a&&r,L=D.length>0,S=F=>{let I=F.target.value;m===void 0&&E(I),p?.(I);},V=()=>{m===void 0&&E(""),p?.(""),g?.();},z=F=>{F.key==="Enter"?(F.preventDefault(),h?.(D)):F.key==="Escape"&&L&&(F.preventDefault(),V());};return jsxRuntime.jsxs("div",{className:u(bh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(rP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx(lucideReact.Search,{className:u(gh({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsxRuntime.jsx("input",{ref:x,id:T,type:"search",value:D,onChange:S,onKeyDown:z,placeholder:y,"aria-invalid":a,"aria-describedby":H?M:n?k:void 0,"aria-required":o,disabled:w,className:u(nP({size:s,isInvalid:a}),!b&&"pl-3",!v&&"pr-3",l),...C}),v&&L&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:V,className:u(oP({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsxRuntime.jsx(lucideReact.X,{className:u(gh({size:s}))})})]}),n&&!H&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});vh.displayName="SearchField";var hh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),sP=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),iP=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),lP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),uc=(e,t="yyyy-MM-dd")=>{if(!e)return "";let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(n)).replace("MM",r).replace("dd",o)},cP=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},xh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:v="yyyy-MM-dd",showIcon:b=true,fullWidth:w=false,disabled:y,id:R,...C},x)=>{let N=W__namespace.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,P=W__namespace.useRef(null),E=x||P,[D,H]=W__namespace.useState(f??null),[L,S]=W__namespace.useState(false),V=()=>{!y&&E.current&&E.current.showPicker?.();},z=m!==void 0?m:D,F=a&&r,I=ne=>{let G=cP(ne.target.value);m===void 0&&H(G),p?.(G);},K=z?uc(z,"yyyy-MM-dd"):"",B=g?uc(g,"yyyy-MM-dd"):void 0,q=h?uc(h,"yyyy-MM-dd"):void 0;return jsxRuntime.jsxs("div",{className:u(hh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(lP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u("relative",w?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:E,id:T,type:"date",value:K,onChange:I,onFocus:()=>S(true),onBlur:()=>S(false),min:B,max:q,"aria-invalid":a,"aria-describedby":F?M:n?k:void 0,"aria-required":o,disabled:y,className:u(sP({size:s,isInvalid:a,fullWidth:w}),!b&&"pr-3",l),style:{borderColor:L?"var(--color-foreground)":void 0},...C}),b&&jsxRuntime.jsx("button",{type:"button",onClick:V,disabled:y,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:u(iP({size:s}))})})]}),n&&!F&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),F&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});xh.displayName="DateField";var yh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),dP=classVarianceAuthority.cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),uP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Rh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:v=false,hourCycle:b=24,disabled:w,fullWidth:y=false,id:R,...C},x)=>{let N=W__namespace.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,P=W__namespace.useRef(null),E=W__namespace.useRef(null),D=W__namespace.useRef(null),H=W__namespace.useRef(null),[L,S]=W__namespace.useState(f??null),V=m!==void 0?m:L,z=a&&r,F=$=>b===24?$:$===0?12:$>12?$-12:$,I=$=>$>=12?"PM":"AM",K=($,re)=>re==="AM"?$===12?0:$:$===12?12:$+12,[B,q]=W__namespace.useState(V?String(F(V.hour)).padStart(2,"0"):""),[ne,G]=W__namespace.useState(V?String(V.minute).padStart(2,"0"):""),[O,j]=W__namespace.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[A,Y]=W__namespace.useState(V?I(V.hour):"AM"),[ie,Te]=W__namespace.useState(false);W__namespace.useEffect(()=>{m!==void 0&&(m?(q(String(F(m.hour)).padStart(2,"0")),G(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),Y(I(m.hour))):(q(""),G(""),j("")));},[m,b]);let U=($,re,_,Le)=>{let ce=parseInt($,10),Ge=parseInt(re,10),$e=v?parseInt(_,10):void 0;if(isNaN(ce)||isNaN(Ge)||v&&isNaN($e)){m===void 0&&S(null),p?.(null);return}let pe={hour:b===12?K(ce,Le):ce,minute:Ge,...v&&$e!==void 0&&{second:$e}};m===void 0&&S(pe),p?.(pe);},dt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);q(re);let _=b===24?23:12,Le=b===24?0:1;if(re.length===2){let ce=parseInt(re,10);ce>=Le&&ce<=_&&(E.current?.focus(),E.current?.select());}},ee=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);if(G(re),re.length===2){let _=parseInt(re,10);_>=0&&_<=59&&(v?(D.current?.focus(),D.current?.select()):b===12&&H.current?.focus());}},nt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);j(re),re.length===2&&b===12&&H.current?.focus();},Gn=()=>{if(B){let $=parseInt(B,10),re=b===24?23:12,Le=Math.min(Math.max($,b===24?0:1),re),ce=String(Le).padStart(2,"0");q(ce),U(ce,ne,O,A);}},vt=()=>{if(ne){let $=parseInt(ne,10),re=Math.min(Math.max($,0),59),_=String(re).padStart(2,"0");G(_),U(B,_,O,A);}},xr=()=>{if(O){let $=parseInt(O,10),re=Math.min(Math.max($,0),59),_=String(re).padStart(2,"0");j(_),U(B,ne,_,A);}},$n=()=>{let $=A==="AM"?"PM":"AM";Y($),U(B,ne,O,$);},Ko=$=>{let re=$.key.toLowerCase();re==="a"?($.preventDefault(),A!=="AM"&&(Y("AM"),U(B,ne,O,"AM"))):re==="p"?($.preventDefault(),A!=="PM"&&(Y("PM"),U(B,ne,O,"PM"))):re==="arrowup"||re==="arrowdown"?($.preventDefault(),$n()):re==="arrowleft"&&($.preventDefault(),v?(D.current?.focus(),D.current?.select()):(E.current?.focus(),E.current?.select()));},Gt=($,re)=>{if($.key==="ArrowUp"||$.key==="ArrowDown"){$.preventDefault();let _=$.key==="ArrowUp"?1:-1;if(re==="hour"){let Le=parseInt(B,10)||0,ce=b===24?23:12,Ge=b===24?0:1,$e=Le+_;$e>ce&&($e=Ge),$e<Ge&&($e=ce);let Un=String($e).padStart(2,"0");q(Un),U(Un,ne,O,A);}else if(re==="minute"){let ce=(parseInt(ne,10)||0)+_;ce>59&&(ce=0),ce<0&&(ce=59);let Ge=String(ce).padStart(2,"0");G(Ge),U(B,Ge,O,A);}else if(re==="second"){let ce=(parseInt(O,10)||0)+_;ce>59&&(ce=0),ce<0&&(ce=59);let Ge=String(ce).padStart(2,"0");j(Ge),U(B,ne,Ge,A);}}$.key==="ArrowRight"&&($.preventDefault(),re==="hour"?(E.current?.focus(),E.current?.select()):re==="minute"&&v?(D.current?.focus(),D.current?.select()):(re==="minute"&&!v&&b===12||re==="second"&&b===12)&&H.current?.focus()),$.key==="ArrowLeft"&&($.preventDefault(),re==="minute"?(P.current?.focus(),P.current?.select()):re==="second"&&(E.current?.focus(),E.current?.select())),$.key==="Backspace"&&$.currentTarget.value===""&&(re==="minute"?P.current?.focus():re==="second"&&E.current?.focus());},yr=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",w&&"cursor-not-allowed");return jsxRuntime.jsxs("div",{ref:x,className:u(yh({size:s}),e),...C,children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(uP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u(dP({size:s,isInvalid:a,disabled:w,fullWidth:y}),l),style:{borderColor:ie?"var(--color-foreground)":void 0},onFocus:()=>Te(true),onBlur:$=>{$.currentTarget.contains($.relatedTarget)||Te(false);},children:[jsxRuntime.jsx("input",{ref:P,id:T,type:"text",inputMode:"numeric",placeholder:b===24?"HH":"hh",value:B,onChange:dt,onBlur:Gn,onKeyDown:$=>Gt($,"hour"),onFocus:$=>$.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":z?M:n?k:void 0,"aria-required":o,disabled:w,className:yr}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:E,type:"text",inputMode:"numeric",placeholder:"mm",value:ne,onChange:ee,onBlur:vt,onKeyDown:$=>Gt($,"minute"),onFocus:$=>$.target.select(),"aria-label":"Minute",disabled:w,className:yr}),v&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:D,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:nt,onBlur:xr,onKeyDown:$=>Gt($,"second"),onFocus:$=>$.target.select(),"aria-label":"Second",disabled:w,className:yr})]}),b===12&&jsxRuntime.jsx("button",{ref:H,type:"button",onClick:$n,onKeyDown:Ko,disabled:w,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:A})]}),n&&!z&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),z&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Rh.displayName="TimeField";var Ch=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),pP=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),fP=classVarianceAuthority.cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),gP=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),wh=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),bP=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),Th=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="#000000",onChange:p,showSwatch:g=true,showPicker:h=true,allowAlpha:v=false,fullWidth:b=false,disabled:w,id:y,...R},C)=>{let x=W__namespace.useId(),N=y||x,T=`${N}-picker`,k=`${N}-description`,M=`${N}-error`,[P,E]=W__namespace.useState(f),[D,H]=W__namespace.useState(false),L=m!==void 0?m:P,S=a&&r,V=K=>{let B=K.target.value;B&&!B.startsWith("#")&&(B="#"+B),m===void 0&&E(B),p?.(B);},z=K=>{let B=K.target.value.toUpperCase();m===void 0&&E(B),p?.(B);},F=()=>{if(L&&wh(L)){let K=bP(L);K!==L&&(m===void 0&&E(K),p?.(K));}},I=wh(L)?L:"#000000";return jsxRuntime.jsxs("div",{className:u(Ch({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:N,className:u(gP({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[g&&jsxRuntime.jsx("div",{className:u(fP({size:s})),children:h?jsxRuntime.jsxs("label",{htmlFor:T,className:"block h-full w-full cursor-pointer",children:[jsxRuntime.jsx("input",{id:T,type:"color",value:I,onChange:z,disabled:w,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})]}):jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})}),jsxRuntime.jsx("input",{ref:C,id:N,type:"text",value:L,onChange:V,onFocus:()=>H(true),onBlur:()=>{H(false),F();},placeholder:"#000000",maxLength:v?9:7,"aria-invalid":a,"aria-describedby":S?M:n?k:void 0,"aria-required":o,disabled:w,className:u(pP({size:s,isInvalid:a,fullWidth:b}),!g&&"pl-3",l),style:{borderColor:D?"var(--color-foreground)":void 0},...R})]}),n&&!S&&jsxRuntime.jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),S&&jsxRuntime.jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Th.displayName="ColorField";var Nh=classVarianceAuthority.cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),kh=W__namespace.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],v={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],b={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],w=(R,C)=>{C&&C(),l&&l(R);},y=R=>jsxRuntime.jsxs("button",{type:"button",disabled:i||R.isDisabled,onClick:()=>w(R.key,R.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:v),"aria-label":R.label,children:[R.icon&&jsxRuntime.jsx("span",{className:b,children:R.icon}),c&&jsxRuntime.jsx("span",{children:R.label})]},R.key);return jsxRuntime.jsxs("div",{ref:f,role:"group",className:u(Nh({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(R=>d?d(R):y(R)),g.length>0&&jsxRuntime.jsxs(yn,{children:[jsxRuntime.jsx(Rn,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",v),children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:b})}),jsxRuntime.jsx(wn,{align:"end",children:g.map(R=>jsxRuntime.jsxs(Wt,{disabled:R.isDisabled,onClick:()=>w(R.key,R.onPress),children:[R.icon&&jsxRuntime.jsx("span",{className:u(b,"mr-2"),children:R.icon}),R.label]},R.key))})]})]})});kh.displayName="ActionGroup";var Sh=classVarianceAuthority.cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),xP=classVarianceAuthority.cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Dh=W__namespace.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxRuntime.jsxs("span",{ref:i,role:"status",className:u(Sh({variant:t,size:n,className:e})),...s,children:[jsxRuntime.jsx("span",{className:u(xP({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsxRuntime.jsx("span",{className:"text-foreground",children:a})]}));Dh.displayName="StatusLight";var Ih=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),RP=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),wP=classVarianceAuthority.cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),CP=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Vh=W__namespace.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxRuntime.jsxs("div",{ref:i,className:u(Ih({size:t,className:e})),...s,children:[n&&jsxRuntime.jsx("div",{className:u(RP({size:t})),"aria-hidden":"true",children:n}),r&&jsxRuntime.jsx("h3",{className:u(wP({size:t})),children:r}),o&&jsxRuntime.jsx("p",{className:u(CP({size:t})),children:o}),a&&jsxRuntime.jsx("div",{className:"mt-2",children:a})]}));Vh.displayName="IllustratedMessage";var Oh=classVarianceAuthority.cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),LP={info:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle,neutral:lucideReact.Info},Bh=W__namespace.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[m,f]=W__namespace.useState(true);if(!m)return null;let p=LP[t??"info"],g=()=>{f(false),s?.();};return jsxRuntime.jsxs("div",{ref:d,role:"alert",className:u(Oh({variant:t,className:e})),...c,children:[!o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r||jsxRuntime.jsx(p,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsxRuntime.jsx("div",{className:"font-medium",children:n}),l&&jsxRuntime.jsx("div",{className:"opacity-90",children:l}),i&&jsxRuntime.jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsxRuntime.jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Bh.displayName="InlineAlert";var Fh=classVarianceAuthority.cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),Kh=W__namespace.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxRuntime.jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Fh({position:t,size:n,className:e})),...c,children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx(Tt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});Kh.displayName="ActionBar";var Gh=W__namespace.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxRuntime.jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));Gh.displayName="ActionBarButton";var Wh=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),jh=classVarianceAuthority.cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Yh({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),[h,v]=W__namespace.useState(null),[b,w]=W__namespace.useState(null),y=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),R=T=>{if(a==="none")return;let k;a==="single"?k=y.has(T)?new Set:new Set([T]):(k=new Set(y),k.has(T)?k.delete(T):k.add(T)),o||g(k),s?.(k);},C=(T,k)=>{v(k),T.dataTransfer.effectAllowed="move";},x=(T,k)=>{T.preventDefault(),h!==k&&w(k);},N=()=>{if(h&&b&&h!==b){let T=r.findIndex(E=>E.key===h),k=r.findIndex(E=>E.key===b),M=[...r],[P]=M.splice(T,1);M.splice(k,0,P),l?.(M);}v(null),w(null);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Wh({variant:t,size:n,className:e})),...f,children:r.map(T=>{let k=y.has(T.key),M=h===T.key,P=b===T.key;return d?jsxRuntime.jsx("div",{role:"option","aria-selected":k,onClick:()=>R(T.key),children:d(T,k)},T.key):jsxRuntime.jsxs("div",{role:"option","aria-selected":k,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:E=>C(E,T.key),onDragOver:E=>x(E,T.key),onDragEnd:N,onClick:()=>!T.isDisabled&&R(T.key),className:u(jh({variant:t,size:n,isSelected:k,isDisabled:T.isDisabled}),M&&"opacity-50",P&&"border-t-2 border-t-primary"),children:[i&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsxRuntime.jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),T.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:T.label}),T.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}Yh.displayName="ListView";var _h=classVarianceAuthority.cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),VP=classVarianceAuthority.cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),AP=classVarianceAuthority.cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Xh=W__namespace.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=b=>String(b),trackColor:p="primary",name:g,...h},v)=>{let[b,w]=W__namespace.useState(o),y=r!==void 0,R=y?r:b,C=W__namespace.useRef(null),[x,N]=W__namespace.useState(false),[T,k]=W__namespace.useState(null),M=(I,K)=>{if(!C.current)return R[0];let B=C.current.getBoundingClientRect(),q;t==="horizontal"?q=(I-B.left)/B.width:q=1-(K-B.top)/B.height,q=Math.max(0,Math.min(1,q));let ne=i+q*(l-i),G=Math.round(ne/c)*c;return Math.max(i,Math.min(l,G))},P=(I,K)=>{let B=[...R];B[K]=I,K===0&&I>R[1]&&(B[0]=R[1]),K===1&&I<R[0]&&(B[1]=R[0]),y||w(B),a?.(B);},E=(I,K)=>{d||(I.preventDefault(),N(true),k(K),I.target.setPointerCapture(I.pointerId));},D=I=>{if(!x||T===null||d)return;let K=M(I.clientX,I.clientY);P(K,T);},H=()=>{x&&(N(false),k(null),s?.(R));},L=I=>{if(d)return;let K=M(I.clientX,I.clientY),B=Math.abs(R[0]-K),q=Math.abs(R[1]-K),ne=B<=q?0:1;P(K,ne);let G=[...R];G[ne]=K,s?.(G);},S=(I,K)=>{if(d)return;let B=R[K];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),B=Math.min(l,R[K]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),B=Math.max(i,R[K]-c);break;case "Home":I.preventDefault(),B=i;break;case "End":I.preventDefault(),B=l;break;default:return}P(B,K);let q=[...R];q[K]=B,s?.(q);},V=I=>(I-i)/(l-i)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],F={sm:14,md:20,lg:24}[n||"md"];return jsxRuntime.jsxs("div",{className:"relative w-full",children:[m&&jsxRuntime.jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:f(R[0])}),jsxRuntime.jsx("span",{children:f(R[1])})]}),jsxRuntime.jsxs("div",{ref:v,className:u(_h({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsxRuntime.jsx("div",{ref:C,className:u(VP({orientation:t,size:n})),onClick:L,children:jsxRuntime.jsx("div",{className:u("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(R[0])}%`,right:`${100-V(R[1])}%`,top:0,bottom:0}:{bottom:`${V(R[0])}%`,top:`${100-V(R[1])}%`,left:0,right:0}})}),R.map((I,K)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:u(AP({size:n}),x&&T===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${F/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${F/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:B=>E(B,K),onPointerMove:D,onPointerUp:H,onPointerCancel:H,onKeyDown:B=>S(B,K)},K)),g&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:`${g}[0]`,value:R[0]}),jsxRuntime.jsx("input",{type:"hidden",name:`${g}[1]`,value:R[1]})]})]})]})});Xh.displayName="RangeSlider";var hc=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),KP=classVarianceAuthority.cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),GP={help:lucideReact.HelpCircle,info:lucideReact.Info,warning:lucideReact.AlertCircle},Qh=W__namespace.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=W__namespace.useState(false),[v,b]=W__namespace.useState(false),[w,y]=W__namespace.useState({top:0,left:0}),R=W__namespace.useRef(null),C=W__namespace.useRef(null),x=i!==void 0?i:g,N=W__namespace.useCallback(P=>{i===void 0&&h(P),l?.(P);},[i,l]);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{if(!x||!R.current)return;let P=()=>{let E=R.current.getBoundingClientRect(),D=288,H=8,L=0,S=0;switch(a){case "top":L=E.top-H,S=E.left+E.width/2;break;case "bottom":L=E.bottom+H,S=E.left+E.width/2;break;case "left":L=E.top+E.height/2,S=E.left-H;break;case "right":L=E.top+E.height/2,S=E.right+H;break}if(a==="top"||a==="bottom")switch(s){case "start":S=E.left;break;case "center":S=E.left+E.width/2-D/2;break;case "end":S=E.right-D;break}S=Math.max(8,Math.min(S,window.innerWidth-D-8)),y({top:L,left:S});};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[x,a,s]),W__namespace.useEffect(()=>{if(!x)return;let P=E=>{C.current&&!C.current.contains(E.target)&&R.current&&!R.current.contains(E.target)&&N(false);};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[x,N]),W__namespace.useEffect(()=>{if(!x)return;let P=E=>{E.key==="Escape"&&N(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[x,N]);let T=GP[e??"help"],k=()=>{N(!x);},M=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o?W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{ref:R,onClick:P=>{o.props.onClick?.(P),k();}}):jsxRuntime.jsx("button",{ref:R,type:"button",onClick:k,className:u(hc({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsxRuntime.jsx("button",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},type:"button",onClick:k,className:u(hc({variant:e,size:t}),m),"aria-label":"Help",children:jsxRuntime.jsx(T,{className:"h-full w-full"})}),v&&x&&_a__namespace.createPortal(jsxRuntime.jsxs("div",{ref:C,className:u(KP({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:M()},role:"tooltip",children:[n&&jsxRuntime.jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsxRuntime.jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxRuntime.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsxRuntime.jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Qh.displayName="ContextualHelp";var ex=classVarianceAuthority.cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),xc=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function tx({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,v]=W__namespace.useState(new Set),b=W__namespace.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),w=x=>{if(s==="none")return;let N;s==="single"?N=b.has(x)?new Set:new Set([x]):(N=new Set(b),N.has(x)?N.delete(x):N.add(x)),a||v(N),i?.(N);},y=(x,N)=>{N.stopPropagation(),c?.(x);},R=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxRuntime.jsxs("div",{role:"group","aria-label":d,className:u(ex({spacing:t}),e),...g,children:[R.map(x=>{let N=b.has(x.key),T=s!=="none";return jsxRuntime.jsxs("span",{role:T?"button":void 0,tabIndex:T&&!x.isDisabled?0:void 0,"aria-pressed":T?N:void 0,onClick:()=>!x.isDisabled&&w(x.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!x.isDisabled&&(k.preventDefault(),w(x.key));},style:x.color?{backgroundColor:x.color}:void 0,className:u(xc({variant:x.color?void 0:n,size:r,isSelected:N,isDisabled:x.isDisabled}),T&&!x.isDisabled&&"cursor-pointer hover:opacity-80",x.color&&"text-white"),children:[x.icon&&jsxRuntime.jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:x.icon}),x.label,l&&!x.isDisabled&&jsxRuntime.jsx("button",{type:"button",onClick:k=>y(x.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${x.label}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},x.key)}),C>0&&jsxRuntime.jsxs("span",{className:u(xc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsxRuntime.jsx("span",{className:"text-sm text-danger",children:f})]})}tx.displayName="TagGroup";var ox=classVarianceAuthority.cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),ax=classVarianceAuthority.cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function sx({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),h=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),v=b=>{if(a==="none")return;let w;a==="single"?w=h.has(b)?new Set:new Set([b]):(w=new Set(h),w.has(b)?w.delete(b):w.add(b)),o||g(w),s?.(w);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(ox({columns:t,gap:n,className:e})),...f,children:r.map(b=>{let w=h.has(b.key);return d?jsxRuntime.jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>v(b.key),children:d(b,w)},b.key):jsxRuntime.jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":b.isDisabled,onClick:()=>!b.isDisabled&&v(b.key),className:u(ax({variant:l,size:c,isSelected:w,isDisabled:b.isDisabled})),children:[i&&a!=="none"&&w&&jsxRuntime.jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),b.thumbnail&&jsxRuntime.jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:b.thumbnail}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:b.label}),b.description&&jsxRuntime.jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:b.description})]})]},b.key)})})}sx.displayName="GridList";var lx=classVarianceAuthority.cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),jP=classVarianceAuthority.cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),YP=classVarianceAuthority.cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),si=W__namespace.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),v=()=>{if(m!=="auto")return "";let w=(n-r)/(o-r),y=s!==void 0?(s-r)/(o-r):.25,R=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?w<=y?"bg-red-500":w<=R?"bg-yellow-500":"bg-green-500":w>=R?"bg-red-500":w>=y?"bg-yellow-500":"bg-green-500"},b=d?d(n,h):`${Math.round(h)}%`;return jsxRuntime.jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:b})]}),jsxRuntime.jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(lx({size:t})),children:jsxRuntime.jsx("div",{className:u(jP({variant:f})),children:jsxRuntime.jsx("div",{className:u(YP({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&v()),style:{width:`${h}%`}})})})]})});si.displayName="Meter";var cx=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(si,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));cx.displayName="DiskUsageMeter";var dx=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(si,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));dx.displayName="BatteryMeter";var ux=classVarianceAuthority.cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),li=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},mx=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},px=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},fx=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),gx=W__namespace.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),v=W__namespace.useCallback(I=>{let K=px(I);return K?mx(...K):[0,1,1]},[]),[b,w]=W__namespace.useState(()=>v(r||o)),y=e??b[0],R=t??b[1],C=n??b[2];W__namespace.useEffect(()=>{if(r){let I=v(r);w(I);}},[r,v]);let x=W__namespace.useCallback((I,K)=>{if(l||!p.current)return;let B=p.current.getBoundingClientRect(),q=Math.max(0,Math.min(1,(I-B.left)/B.width)),ne=Math.max(0,Math.min(1,(K-B.top)/B.height)),G=q,O=1-ne;t===void 0&&n===void 0&&w([y,G,O]),a?.({hue:y,saturation:G,brightness:O});let j=li(y,G,O);s?.(fx(...j));},[l,y,t,n,a,s]),N=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),x(I.clientX,I.clientY));},T=I=>{g&&x(I.clientX,I.clientY);},k=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[M,P,E]=li(y,1,1),D=`rgb(${M}, ${P}, ${E})`,H=R*100,L=(1-C)*100,[S,V,z]=li(y,R,C),F=`rgb(${S}, ${V}, ${z})`;return jsxRuntime.jsx("div",{ref:f,className:u(ux({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:D},onPointerDown:N,onPointerMove:T,onPointerUp:k,onPointerLeave:k,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${L}% - ${c/2}px)`,backgroundColor:F,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});gx.displayName="ColorArea";var vx=classVarianceAuthority.cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),ZP=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,bx="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",hx=W__namespace.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),v=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[b,w]=W__namespace.useState(t??v()),y=e??b,R=r==="hue"?y/360:y,C=W__namespace.useCallback((D,H)=>{if(i||!p.current)return;let L=p.current.getBoundingClientRect(),S=a!=="vertical",V;S?V=Math.max(0,Math.min(1,(D-L.left)/L.width)):V=Math.max(0,Math.min(1,1-(H-L.top)/L.height));let z=r==="hue"?V*360:V;e===void 0&&w(z),n?.(z);},[i,a,r,e,n]),x=D=>{i||(D.preventDefault(),h(true),D.target.setPointerCapture(D.pointerId),C(D.clientX,D.clientY));},N=D=>{g&&C(D.clientX,D.clientY);},T=D=>{h(false),D.target.releasePointerCapture(D.pointerId);},k=()=>{let D=a!=="vertical",H=D?"to right":"to top";switch(r){case "hue":return D?bx:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return bx}},M=()=>r==="hue"?`hsl(${y}, 100%, 50%)`:o,P=a!=="vertical",E=R*100;return jsxRuntime.jsx("div",{ref:f,className:u(vx({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?ZP:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:x,onPointerMove:N,onPointerUp:T,onPointerLeave:T,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...P?{left:`calc(${E}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${E}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:M(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});hx.displayName="ColorSlider";var xx=classVarianceAuthority.cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),eE=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},yx=W__namespace.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=W__namespace.useRef(null),[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),v=e??g,b=W__namespace.useCallback((x,N)=>{if(o||!m.current)return;let T=m.current.getBoundingClientRect(),k=T.width/2,M=x-T.left,P=N-T.top,E=eE(M,P,k);e===void 0&&h(E),n?.(E);},[o,e,n]),w=x=>{o||(x.preventDefault(),p(true),x.target.setPointerCapture(x.pointerId),b(x.clientX,x.clientY));},y=x=>{f&&b(x.clientX,x.clientY);},R=x=>{p(false),x.target.releasePointerCapture(x.pointerId);},C=()=>{let x=[];for(let N=0;N<=360;N+=30)x.push(`hsl(${N}, 100%, 50%) ${N}deg`);return `conic-gradient(from 270deg, ${x.join(", ")})`};return jsxRuntime.jsx("div",{ref:d,className:u(xx({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxRuntime.jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:w,onPointerMove:y,onPointerUp:R,onPointerLeave:R,children:[a<1&&jsxRuntime.jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsxRuntime.jsx(tE,{hue:v,innerRadius:a,thumbSize:s})]})})});yx.displayName="ColorWheel";var tE=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var wx=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),rE=classVarianceAuthority.cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),oE=classVarianceAuthority.cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),Cx=W__namespace.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let v=async()=>{if(!(!f||a===null||a===void 0))try{let b=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(b),p?.();}catch{}};return jsxRuntime.jsxs("div",{ref:h,className:u(wx({orientation:t,size:n,align:r,className:e})),...g,children:[jsxRuntime.jsxs("span",{className:u(rE({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsxRuntime.jsx("span",{className:u(oE({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?v:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),v());}:void 0,children:a})]})});Cx.displayName="LabeledValue";var Tx=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),Mx=W__namespace.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(Tx({orientation:t,gap:n,className:e})),...r}));Mx.displayName="LabeledValueGroup";var Ex=classVarianceAuthority.cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Eo=classVarianceAuthority.cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Lx=W__namespace.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:v,placeholder:b="Search...",disabled:w,...y},R)=>{let[C,x]=W__namespace.useState(false),[N,T]=W__namespace.useState(t),k=e!==void 0?e:N,M=W__namespace.useRef(null);W__namespace.useImperativeHandle(R,()=>M.current);let P=k.length>0,E=C&&(a.length>0||s.length>0||l.length>0||P),D=I=>{e===void 0&&T(I),n?.(I);},H=()=>{D(""),M.current?.focus();},L=I=>{I?.preventDefault(),k.trim()&&(r?.(k.trim()),x(false));},S=I=>{D(I.label),o?.(I),x(false);},V=I=>{D(I),r?.(I),x(false);},z=I=>{D(I),r?.(I),x(false);},F=W__namespace.useMemo(()=>{let I={};return a.forEach(K=>{let B=K.category||"Results";I[B]||(I[B]=[]),I[B].push(K);}),I},[a]);return jsxRuntime.jsxs(rt,{open:E,onOpenChange:x,children:[jsxRuntime.jsx(oo,{children:jsxRuntime.jsxs("form",{onSubmit:L,className:u(Ex({size:g,variant:h}),v),children:[m&&jsxRuntime.jsx(lucideReact.Search,{className:u(Eo({size:g}),"ml-3")}),jsxRuntime.jsx("input",{ref:M,type:"text",value:k,onChange:I=>D(I.target.value),onFocus:()=>x(true),placeholder:b,disabled:w,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...y}),d&&P&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Eo({size:g})),children:jsxRuntime.jsx(lucideReact.X,{className:"h-full w-full"})})]})}),jsxRuntime.jsx(ot,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxRuntime.jsxs(cmdk.Command,{className:"rounded-lg border-0",children:[s.length>0&&!P&&jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsxRuntime.jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((I,K)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>V(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.Clock,{className:u(Eo({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:u(Eo({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!P&&jsxRuntime.jsxs("div",{className:"border-t p-2",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((I,K)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>z(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.TrendingUp,{className:u(Eo({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I})]},K))]}),P&&jsxRuntime.jsx("div",{className:"p-2",children:c?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-6",children:jsxRuntime.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(F).map(([I,K])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:I})}),K.map(B=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>S(B),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[B.icon||jsxRuntime.jsx(lucideReact.Search,{className:u(Eo({size:g}))}),jsxRuntime.jsxs("div",{className:"flex-1 text-left",children:[jsxRuntime.jsx("div",{className:"truncate",children:B.label}),B.description&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:B.description})]})]},B.id))]},I)):jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Lx.displayName="SearchBar";var Sx={Pages:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),Files:jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),Settings:jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4"}),Users:jsxRuntime.jsx(lucideReact.User,{className:"h-4 w-4"}),Tags:jsxRuntime.jsx(lucideReact.Hash,{className:"h-4 w-4"})},Ix=W__namespace.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=W__namespace.useState(""),g=W__namespace.useRef(null),[h,v]=W__namespace.useState(false);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{e||p("");},[e]),W__namespace.useEffect(()=>{if(!e)return;let x=N=>{N.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,t]),W__namespace.useEffect(()=>{if(e)return ut(),()=>mt()},[e]);let b=W__namespace.useMemo(()=>{let x={};return n.forEach(N=>{let T=N.category||"Results";x[T]||(x[T]=[]),x[T].push(N);}),x},[n]),w=x=>{x.onSelect?.(),c?.(x),t?.(false);},y=()=>{t?.(false);},R=f.length>0,C=!R&&r.length>0;return !h||!e?null:_a__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:y}),jsxRuntime.jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxRuntime.jsxs(cmdk.Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxRuntime.jsxs("div",{className:"flex items-center border-b px-4",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsxRuntime.jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(cmdk.Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-10",children:jsxRuntime.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[C&&jsxRuntime.jsxs(cmdk.Command.Group,{heading:"Recent",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(x=>jsxRuntime.jsxs(cmdk.Command.Item,{value:x.label,onSelect:()=>w(x),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:x.icon||Sx[x.category||""]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:x.label}),x.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:x.description})]}),x.shortcut&&jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:x.shortcut.map((N,T)=>jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:N},T))})]},x.id))]}),R&&Object.entries(b).map(([x,N])=>jsxRuntime.jsxs(cmdk.Command.Group,{heading:x,children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:x}),N.map(T=>jsxRuntime.jsxs(cmdk.Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>w(T),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:T.icon||Sx[x]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},x)),jsxRuntime.jsx(cmdk.Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsxRuntime.jsx("div",{className:"border-t px-4 py-3",children:d}):jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});Ix.displayName="SpotlightSearch";function vE(e="k"){let[t,n]=W__namespace.useState(false);return W__namespace.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var zx=W__namespace.createContext(null),di=()=>{let e=W__namespace.useContext(zx);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},ME=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=W__namespace.useState([]),[a,s]=W__namespace.useState(false),i=W__namespace.useRef(null),l=t!==void 0,c=l?t:r,d=W__namespace.useCallback(v=>{l?n?.(v):o(v);},[l,n]),m=c.filter(v=>!v.read).length,f=W__namespace.useCallback(v=>{d(c.map(b=>b.id===v?{...b,read:true}:b));},[c,d]),p=W__namespace.useCallback(()=>{d(c.map(v=>({...v,read:true})));},[c,d]),g=W__namespace.useCallback(v=>{d(c.filter(b=>b.id!==v));},[c,d]),h=W__namespace.useCallback(()=>{d([]);},[d]);return jsxRuntime.jsx(zx.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Ox=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Ox.displayName="NotificationCenter";var Bx=W__namespace.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=di(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxRuntime.jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),t&&s>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Bx.displayName="NotificationCenterTrigger";var Fx=W__namespace.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=di(),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null),[v,b]=W__namespace.useState({top:0,left:0});return W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!i||!f.current||!h.current)return;let w=()=>{if(!f.current||!h.current)return;let y=f.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=y.bottom+n,x=y.left;t==="center"?x=y.left+y.width/2-R.width/2:t==="end"&&(x=y.right-R.width),x+R.width>window.innerWidth-16&&(x=window.innerWidth-R.width-16),x<16&&(x=16),b({top:C,left:x});};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,true),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,true);}},[i,f,t,n]),W__namespace.useEffect(()=>{if(!i)return;let w=R=>{h.current&&!h.current.contains(R.target)&&f.current&&!f.current.contains(R.target)&&l(false);},y=R=>{R.key==="Escape"&&l(false);};return document.addEventListener("mousedown",w),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",y);}},[i,l,f]),!p||!i?null:_a__namespace.createPortal(jsxRuntime.jsxs("div",{ref:w=>{h.current=w,typeof s=="function"?s(w):s&&(s.current=w);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:v.top,left:v.left},...a,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsxRuntime.jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsxRuntime.jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]}):c.map(w=>jsxRuntime.jsx(Tc,{notification:w},w.id)))})]}),document.body)});Fx.displayName="NotificationCenterContent";var NE={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},kE={info:lucideReact.Info,success:lucideReact.CheckCircle,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Tc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=di(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=kE[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},v=b=>{if(!b)return null;let w=typeof b=="string"?new Date(b):b,R=new Date().getTime()-w.getTime(),C=Math.floor(R/6e4),x=Math.floor(R/36e5),N=Math.floor(R/864e5);return C<1?"Just now":C<60?C+"m ago":x<24?x+"h ago":N<7?N+"d ago":w.toLocaleDateString()};return jsxRuntime.jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",NE[l],!d&&"bg-accent/20"),children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:m||jsxRuntime.jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsxRuntime.jsx(p,{className:"h-4 w-4"})})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsxRuntime.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:v(c)}),f&&jsxRuntime.jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[!d&&jsxRuntime.jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]})};Tc.displayName="NotificationItem";var Kx=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Kx.displayName="NotificationList";var Gx=classVarianceAuthority.cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),VE={default:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},$x=W__namespace.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,v]=W__namespace.useState(true),[b,w]=W__namespace.useState(false);W__namespace.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&v(false);},[m]),W__namespace.useEffect(()=>{if(d&&h){let x=setTimeout(()=>{y();},d);return ()=>clearTimeout(x)}},[d,h]);let y=()=>{w(true),setTimeout(()=>{v(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let R=VE[t],C=r?o!==void 0?o:R?jsxRuntime.jsx(R,{className:"h-4 w-4"}):null:null;return jsxRuntime.jsxs("div",{ref:g,className:u(Gx({variant:n,type:t,position:l}),c&&"animate-pulse",b&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsxRuntime.jsx("span",{className:"shrink-0",children:C}),jsxRuntime.jsx("span",{className:"text-center font-medium",children:e}),i&&jsxRuntime.jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsxRuntime.jsx("button",{type:"button",onClick:y,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});$x.displayName="Banner";var Ra=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-current bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-current bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),OE=classVarianceAuthority.cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),Nc=W__namespace.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},v)=>{let[b,w]=W__namespace.useState(false),y=o&&o.length>0,R=k=>{y&&w(!b),p?.(k);},C=k=>{k.onClick?.(),w(false);},x={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},N=l==="rotate"&&b?"rotate-45":"",T=l==="scale"&&b?"scale-0":"scale-100";return jsxRuntime.jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&Ra({position:m})),children:[y&&b&&jsxRuntime.jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",x[a].container),children:o.map((k,M)=>jsxRuntime.jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${M*50}ms`},children:[s&&(a==="up"||a==="down")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsxRuntime.jsx("a",{href:k.href,className:u(Ra({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsxRuntime.jsx("button",{type:"button",onClick:()=>C(k),className:u(Ra({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(a==="left"||a==="right")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxRuntime.jsxs("button",{ref:v,type:"button",onClick:R,disabled:g,className:u(Ra({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":y?b:void 0,...h,children:[b&&i?i:jsxRuntime.jsx("span",{className:u(OE({size:d}),N,T,"transition-all duration-200"),children:e||jsxRuntime.jsx(lucideReact.Plus,{})}),n&&r&&jsxRuntime.jsx("span",{className:"font-medium",children:r})]}),y&&b&&jsxRuntime.jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});Nc.displayName="FloatingActionButton";var BE=Nc;var _x=classVarianceAuthority.cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),Wx=classVarianceAuthority.cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Xx=W__namespace.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=W__namespace.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=y=>{y.disabled||(p||f(y.key),s?.(y.key));},v=y=>t==="filled"?y?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":y?"text-primary":"text-muted-foreground hover:text-foreground",b=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsxRuntime.jsx("nav",{ref:d,className:u(_x({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(y=>{let R=g===y.key,C=i==="all"||i==="active"&&R,x=R&&y.activeIcon?y.activeIcon:y.icon;if(l)return jsxRuntime.jsx("div",{onClick:()=>h(y),className:u(Wx({variant:t}),y.disabled&&"opacity-50 cursor-not-allowed"),children:l(y,R)},y.key);let N=jsxRuntime.jsxs("div",{onClick:()=>!y.href&&h(y),className:u(Wx({variant:t}),v(R),y.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":R?"page":void 0,"aria-disabled":y.disabled,tabIndex:y.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(y));},children:[jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("span",{className:u(b(),"[&>svg]:h-full [&>svg]:w-full"),children:x}),y.badge!==void 0&&y.badge>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:y.badge>99?"99+":y.badge}),y.showDot&&jsxRuntime.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&y.label&&jsxRuntime.jsx("span",{className:u(w(),"font-medium truncate max-w-full px-1"),children:y.label})]},y.key);return y.href&&!y.disabled?jsxRuntime.jsx("a",{href:y.href,onClick:()=>h(y),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(R)),children:N},y.key):N})})});Xx.displayName="BottomNavigation";var KE="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",Zx=classVarianceAuthority.cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Qx=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxRuntime.jsxs(vaul.Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsxRuntime.jsx(vaul.Drawer.Trigger,{asChild:true,children:n}),jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:f,className:KE,children:[jsxRuntime.jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxRuntime.jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsxRuntime.jsx(vaul.Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsxRuntime.jsx(vaul.Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsxRuntime.jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxRuntime.jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Zx({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"font-medium",children:g.label}),g.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsxRuntime.jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Qx.displayName="ActionSheet";var ey=classVarianceAuthority.cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Pc=classVarianceAuthority.cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),ty=W__namespace.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0),[h,v]=W__namespace.useState(false),b=W__namespace.useRef(0),w=W__namespace.useRef(0),y=n.length*(o==="sm"?64:o==="lg"?96:80),R=r.length*(o==="sm"?64:o==="lg"?96:80),C=M=>{i||(v(true),b.current=M.touches[0].clientX,w.current=p);},x=M=>{if(!h||i)return;let E=M.touches[0].clientX-b.current,D=w.current+E;(D>0&&n.length===0||D<0&&r.length===0)&&(D=0),D>y?D=y+(D-y)*.3:D<-R&&(D=-R+(D+R)*.3),g(D);},N=()=>{if(!h)return;v(false);let M=f.current?.offsetWidth||0,P=Math.abs(p)/M;if(l&&P>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>y*a&&n.length>0?(g(y),s?.("right")):p<-R*a&&r.length>0?(g(-R),s?.("left")):g(0);},T=(M,P)=>{M.onAction?.(),s?.(P,M.key),g(0);},k=()=>{g(0);};return jsxRuntime.jsxs("div",{ref:m,className:u(ey({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsxRuntime.jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:y},children:n.map(M=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>T(M,"right"),className:u(Pc({variant:M.variant,size:o})),style:{opacity:Math.min(1,p/y)},children:[M.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),r.length>0&&p<0&&jsxRuntime.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:R},children:r.map(M=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>T(M,"left"),className:u(Pc({variant:M.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/R)},children:[M.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),jsxRuntime.jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:x,onTouchEnd:N,onClick:p!==0?k:void 0,children:c})]})});ty.displayName="SwipeActions";var ry=classVarianceAuthority.cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),UE=classVarianceAuthority.cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),oy=W__namespace.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=W__namespace.useRef(null),[v,b]=W__namespace.useState(0),[w,y]=W__namespace.useState("idle"),R=W__namespace.useRef(0),C=W__namespace.useRef(false),x=()=>l||w==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,N=E=>{x()&&(R.current=E.touches[0].clientY,C.current=true);},T=E=>{if(!C.current||!x())return;let H=E.touches[0].clientY-R.current;if(H<0){b(0),y("idle");return}let S=Math.min(H*.5,o);b(S),y(S>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,w==="ready"){y("refreshing"),b(r*.6);try{await n();}finally{y("idle"),b(0);}}else y("idle"),b(0);},M={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],P=()=>{if(w==="refreshing")return a||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(M,"animate-spin text-primary")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let E=Math.min(v/r*180,180);return s||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.ArrowDown,{className:u(M,"text-muted-foreground transition-transform"),style:{transform:`rotate(${E}deg)`}}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?d:c})]})};return jsxRuntime.jsxs("div",{ref:g,className:u(ry({variant:t,className:e})),...p,children:[jsxRuntime.jsx("div",{className:u(UE({size:i}),"z-10",w==="idle"&&v===0&&"opacity-0"),style:{top:Math.max(v-60,-60),opacity:Math.min(v/(r*.5),1)},children:P()}),jsxRuntime.jsx("div",{ref:h,className:u("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${v}px)`,transition:C.current?"none":void 0},onTouchStart:N,onTouchMove:T,onTouchEnd:k,children:f})]})});oy.displayName="PullToRefresh";var jr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),WE={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},ay=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsxRuntime.jsx(framerMotion.motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:WE,custom:i,transition:jr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&m}):m});ay.displayName="Fade";var jE=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},sy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=W__namespace.useMemo(()=>jE(i,l),[i,l]),p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:jr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});sy.displayName="Slide";var YE={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},_E={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},iy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:_E,custom:i,transition:jr(n,r,o),className:u(a),style:{transformOrigin:YE[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&f}):f});iy.displayName="Scale";var ly=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:jr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});ly.displayName="Collapse";var cy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:jr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});cy.displayName="Expand";var dy=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:jr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});dy.displayName="Rotate";var uy=W__namespace.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsxRuntime.jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxRuntime.jsxs(framerMotion.motion.div,{animate:{[m]:r?180:0},transition:jr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});uy.displayName="Flip";var my=W__namespace.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=W__namespace.useState([]),l=W__namespace.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,v=Math.max(p.width,p.height)*2,b={id:Date.now(),x:g,y:h,size:v};i(w=>[...w,b]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxRuntime.jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsxRuntime.jsx("div",{ref:l,className:"relative z-0",children:n}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:s.map(m=>jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});my.displayName="Ripple";var py=W__namespace.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});py.displayName="Bounce";var ZE={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},fy=W__namespace.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:ZE[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});fy.displayName="Shake";var QE={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},gy=W__namespace.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(t&&QE[n],r),children:e}));gy.displayName="Pulse";var by=W__namespace.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});by.displayName="Wiggle";var vy=W__namespace.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});vy.displayName="Pop";var oL=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},hy=W__namespace.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:true}),[h,v]=W__namespace.useState(!l);W__namespace.useEffect(()=>{if(l&&g){let y=setTimeout(()=>v(true),c*1e3);return ()=>clearTimeout(y)}},[l,g,c]);let b=framerMotion.useMotionValue(t),w=framerMotion.useTransform(b,y=>oL(y,r,s,i));return W__namespace.useEffect(()=>{if(h){let y=framerMotion.animate(b,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>y.stop()}},[h,e,n,b,m]),jsxRuntime.jsx("span",{ref:p,className:u(d),children:jsxRuntime.jsxs("span",{ref:f,children:[o,jsxRuntime.jsx(framerMotion.motion.span,{children:w}),a]})})});hy.displayName="Counter";var xy=W__namespace.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=W__namespace.useState(""),[v,b]=W__namespace.useState(0),[w,y]=W__namespace.useState(false),[R,C]=W__namespace.useState(false),x=W__namespace.useRef(null),N=framerMotion.useInView(x,{once:true}),[T,k]=W__namespace.useState(!l);return W__namespace.useEffect(()=>{if(l&&N){let M=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(M)}},[l,N,n]),W__namespace.useEffect(()=>{if(!T||R)return;let M=p[v],P;return w?g.length>0?P=setTimeout(()=>{h(g.slice(0,-1));},i):(y(false),b(E=>(E+1)%p.length)):g.length<M.length?P=setTimeout(()=>{h(M.slice(0,g.length+1));},t):v<p.length-1||s?P=setTimeout(()=>{y(true);},r):(C(true),m?.()),()=>clearTimeout(P)},[T,g,v,w,R,p,t,i,r,s,m]),jsxRuntime.jsxs("span",{ref:x,className:u(c),children:[jsxRuntime.jsx("span",{ref:f,children:g}),o&&jsxRuntime.jsx(framerMotion.motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});xy.displayName="Typewriter";var yy=W__namespace.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=W__namespace.useRef(null),d=framerMotion.useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},v={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsxRuntime.jsx("span",{ref:c,children:p.map((b,w)=>jsxRuntime.jsxs(framerMotion.motion.span,{variants:v,className:"inline-block",children:[b,a==="word"&&w<p.length-1&&"\xA0"]},w))})})});yy.displayName="TextReveal";var Ry=W__namespace.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=W__namespace.useState(0);W__namespace.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsxRuntime.jsx("span",{ref:s,className:u("relative inline-block",o),children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});Ry.displayName="WordRotate";var My=W__namespace.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:a,amount:s}),v={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],b={hidden:{opacity:0,x:v.x,y:v.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsxRuntime.jsx("div",{ref:p,children:jsxRuntime.jsx(framerMotion.motion.div,{ref:f,variants:b,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});My.displayName="ScrollReveal";var Ny=W__namespace.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=framerMotion.useScroll({container:s}),m=framerMotion.useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",v=p?"left":"top";return jsxRuntime.jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:v,backgroundColor:n}}),i&&jsxRuntime.jsx(sL,{progress:f,position:e})]})});Ny.displayName="ScrollProgress";var sL=({progress:e,position:t})=>{let n=framerMotion.useTransform(e,s=>Math.round(s*100)),[r,o]=W__namespace.useState(0);return W__namespace.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxRuntime.jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},ky=W__namespace.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=W__namespace.useRef(null),{scrollYProgress:i}=framerMotion.useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=framerMotion.useTransform(i,[0,1],l),d=framerMotion.useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsxRuntime.jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsxRuntime.jsx(framerMotion.motion.div,{ref:a,style:{x:m,y:f},children:e})})});ky.displayName="Parallax";var Ly=W__namespace.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxRuntime.jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsxRuntime.jsx("style",{children:`
|
|
56
56
|
@keyframes shimmer-right {
|
|
57
57
|
0% { transform: translateX(-100%); }
|
|
58
58
|
100% { transform: translateX(100%); }
|