@reeverdev/ui 0.2.128 → 0.2.130
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +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 eu=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"}}),tu=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},b)=>{let[v,y]=W__namespace.useState(false),[R,w]=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)),y(false),w("");},F=A=>{let j=S.includes(A)?S.filter(ie=>ie!==A):[...S,A];V||T(j),o?.(j);},I=(A,j)=>{j.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(R.toLowerCase())):e;W__namespace.useEffect(()=>{if(v&&E.current){let A=E.current.getBoundingClientRect();M({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||w("");},[v,s]),W__namespace.useEffect(()=>{let A=j=>{let ie=j.target,Te=P.current&&!P.current.contains(ie),U=D.current&&!D.current.contains(ie);Te&&U&&(y(false),w(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),W__namespace.useEffect(()=>{if(!v)return;let A=j=>{D.current?.contains(j.target)||(y(false),w(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[v]);let _=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 b=="function"?b(A):b&&(b.current=A);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&y(!v),className:u(eu({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:j=>I(A.value,j),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&I(A.value,j);},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&&_&&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",v&&"rotate-180")})]})]}),v&&!c&&typeof document<"u"&&ja__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:R,onChange:A=>w(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 j=t?S.includes(A.value):L===A.value;return jsxRuntime.jsxs("div",{role:"option","aria-selected":j,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:j&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});tu.displayName="Select";var nu=W__namespace.createContext(null),$o=()=>{let e=W__namespace.useContext(nu);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Hi=W__namespace.createContext({radius:"md"}),Ii=W__namespace.createContext(null),hn=({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(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=W__namespace.useCallback((v,y)=>{p.current.set(v,y);},[]),b=W__namespace.useCallback(v=>{p.current.delete(v);},[]);return jsxRuntime.jsx(nu.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};hn.displayName="Dropdown";var xn=W__namespace.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=$o();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})});xn.displayName="DropdownTrigger";var N0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},yn=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:b,contentId:v,activeIndex:y,setActiveIndex:R,items:w}=$o(),[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=w.current.size);},[p,w]),W__namespace.useEffect(()=>{if(!p||!h.current||!b.current)return;let D=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),L=b.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;b.current&&!b.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,b]),W__namespace.useEffect(()=>{if(!p)return;let D=H=>{let L=Array.from(w.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(),y===-1||y>=S-1?R(l?0:Math.min(y+1,S-1)):R(y+1);break;case "ArrowUp":H.preventDefault(),y<=0?R(l?S-1:0):R(y-1);break;case "Home":H.preventDefault(),R(0);break;case "End":H.preventDefault(),R(S-1);break;case "Enter":case " ":H.preventDefault(),y>=0&&y<S&&L[y]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,i,y,R,w,l,h]),W__namespace.useEffect(()=>{p&&y>=0&&Array.from(w.current.entries()).sort(([H],[L])=>H-L).map(([,H])=>H)[y]?.focus();},[p,y,w]),!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 ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:D=>{b.current=D,typeof f=="function"?f(D):f&&(f.current=D);},id:v,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",N0[c],E,e),style:{top:C.top,left:C.left},...m,children:jsxRuntime.jsx(Hi.Provider,{value:{radius:c},children:d})}),document.body)});yn.displayName="DropdownContent";var ru=0,ou={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=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}=$o(),{radius:b}=W__namespace.useContext(Hi),[v]=W__namespace.useState(()=>ru++),y=W__namespace.useRef(null);W__namespace.useEffect(()=>(!n&&y.current&&g(v,y.current),()=>{h(v);}),[n,v,g,h]);let R=x=>{if(n){x.preventDefault();return}o?.(x),r?.(),m(false);},w=x=>{a?.(x),n||p(v);};return jsxRuntime.jsxs("div",{ref:x=>{y.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===v?"":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",ou[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:R,onMouseEnter:w,...c,children:[s,l&&jsxRuntime.jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Vi=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}));Vi.displayName="DropdownSection";var au=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}));au.displayName="DropdownSeparator";var su=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});su.displayName="DropdownShortcut";var iu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));iu.displayName="DropdownGroup";var lu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),{contentRef:s}=$o(),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(Ii.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};lu.displayName="DropdownSub";var cu=W__namespace.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=W__namespace.useContext(Ii),{setActiveIndex:d,registerItem:m,unregisterItem:f}=$o(),{radius:p}=W__namespace.useContext(Hi),[g]=W__namespace.useState(()=>ru++),h=W__namespace.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:y}=c;W__namespace.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let R=x=>{o?.(x),n||(d(g),v(true));},w=x=>{a?.(x);},C=x=>{s?.(x),(x.key==="ArrowRight"||x.key==="Enter"||x.key===" ")&&(x.preventDefault(),v(true));};return jsxRuntime.jsxs("div",{ref:x=>{h.current=x,y.current=x,typeof l=="function"?l(x):l&&(l.current=x);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:n?-1:0,"aria-disabled":n,"data-state":b?"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",ou[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:R,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});cu.displayName="DropdownSubTrigger";var du=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(Ii);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,b]=W__namespace.useState(false),v=W__namespace.useRef(null),y=W__namespace.useRef(null);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let x=m.current.getBoundingClientRect(),N=v.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 R=C=>{o?.(C),y.current&&(clearTimeout(y.current),y.current=null),d(true);},w=C=>{a?.(C);let x=C.relatedTarget;m.current?.contains(x)||f?.current?.contains(x)||(y.current=setTimeout(()=>{d(false);},100));};return W__namespace.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),!h||!c?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:C=>{v.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:R,onMouseLeave:w,...s}),document.body)});du.displayName="DropdownSubContent";var k0=Vi;var pu=W__namespace.createContext(null),Ai=()=>{let e=W__namespace.useContext(pu);if(!e)throw new Error("Popover components must be used within a Popover");return e},nt=({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(pu.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};nt.displayName="Popover";var Lt=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{open:o,onOpenChange:a,triggerRef:s,contentId:i}=Ai();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})});Lt.displayName="PopoverTrigger";var oo=W__namespace.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Ai();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 rt=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:b}=Ai(),[v,y]=W__namespace.useState({top:0,left:0}),[R,w]=W__namespace.useState(false),[C,x]=W__namespace.useState(null);if(W__namespace.useEffect(()=>{w(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}y({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]),!R||!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 ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:T=>{x(k=>k!==T?T:k),typeof f=="function"?f(T):f&&(f.current=T);},id:b,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:v.top,left:v.left},...m,children:d}),document.body)});rt.displayName="PopoverContent";var fu=W__namespace.createContext(null),Oi=()=>{let e=W__namespace.useContext(fu);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},gu=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(fu.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})})});gu.displayName="Tabs";var zi={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"}},bu=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Oi(),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 v=g.querySelector('[data-state="active"]');if(v){let y=g.getBoundingClientRect(),R=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:R.height,transform:`translateY(${R.top-y.top}px)`,opacity:1}:{width:R.width,height:2,transform:`translateX(${R.left-y.left}px)`,opacity:1}):o==="solid"&&d(w?{width:R.width,height:R.height,transform:`translateY(${R.top-y.top}px)`,opacity:1}:{width:R.width,height:R.height,transform:`translateX(${R.left-y.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.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",zi[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsxRuntime.jsx("span",{className:u("absolute transition-all duration-200 ease-out",zi[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});bu.displayName="TabsList";var vu=W__namespace.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Oi(),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",zi[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});vu.displayName="TabsTrigger";var hu=W__namespace.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Oi(),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});hu.displayName="TabsContent";var xu=[{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 E0(e,t=xu){return e?t.filter(r=>r.test(e)).length/t.length:0}function L0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function S0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Ru=W__namespace.createContext(null),_a=()=>{let e=W__namespace.useContext(Ru);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},wu=({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(Ru.Provider,{value:{open:i,onOpenChange:l},children:r})};wu.displayName="Sheet";var Cu=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=_a();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Cu.displayName="SheetTrigger";var Tu=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=_a();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});Tu.displayName="SheetClose";var Fi=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?ja__namespace.createPortal(e,t||document.body):null};Fi.displayName="SheetPortal";var Mu=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=_a();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});Mu.displayName="SheetOverlay";var Nu=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"}}),I0=(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],ku=W__namespace.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=_a(),[d,m]=W__namespace.useState(false),[,f]=W__namespace.useState(false);return W__namespace.useEffect(()=>{if(l)m(true),f(true),dt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{ut();}},[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(Fi,{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(Nu({side:e}),I0(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]})]})});ku.displayName="SheetContent";var Pu=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});Pu.displayName="SheetHeader";var Eu=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Eu.displayName="SheetFooter";var Lu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));Lu.displayName="SheetTitle";var Su=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Su.displayName="SheetDescription";var z0=({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 Du=W__namespace.createContext(null),Wo=()=>{let e=W__namespace.useContext(Du);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Ki=W__namespace.createContext(null),Hu=W__namespace.createContext(null),Iu=({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(Du.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};Iu.displayName="ContextMenu";var Vu=W__namespace.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Wo(),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})});Vu.displayName="ContextMenuTrigger";var Au=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Au.displayName="ContextMenuGroup";var zu=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?ja__namespace.createPortal(e,t||document.body):null};zu.displayName="ContextMenuPortal";var Ou=({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(Ki.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ou.displayName="ContextMenuSub";var Bu=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Hu.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));Bu.displayName="ContextMenuRadioGroup";var Fu=W__namespace.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Wo(),[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 b=g.current.getBoundingClientRect(),{x:v,y}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),y+b.height>window.innerHeight&&(y=window.innerHeight-b.height-8),p({x:v,y});},[s,l]),W__namespace.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),W__namespace.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:ja__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)});Fu.displayName="ContextMenuContent";var Ku=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=W__namespace.useContext(Ki);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"})]})});Ku.displayName="ContextMenuSubTrigger";var Gu=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=W__namespace.useContext(Ki);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 y=c.current.getBoundingClientRect(),R=g.current.getBoundingClientRect(),w=y.top,C=y.right+t;C+R.width>window.innerWidth&&(C=y.left-R.width-t),m({top:w,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},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:b,...o}),document.body)});Gu.displayName="ContextMenuSubContent";var $u=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Wo(),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})});$u.displayName="ContextMenuItem";var Uu=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Wo(),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]})});Uu.displayName="ContextMenuCheckboxItem";var Wu=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Wo(),l=W__namespace.useContext(Hu),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]})});Wu.displayName="ContextMenuRadioItem";var _u=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}));_u.displayName="ContextMenuLabel";var ju=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}));ju.displayName="ContextMenuSeparator";var Yu=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Yu.displayName="ContextMenuShortcut";var Xu=W__namespace.createContext(null),$0=()=>{let e=W__namespace.useContext(Xu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},qu=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(),b=v=>{p||f(v),r?.(v);};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(Xu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});qu.displayName="RadioGroup";var Zu=W__namespace.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=$0(),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}})]})});Zu.displayName="RadioGroupItem";var Xa=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"}}),Qu=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 b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsxRuntime.jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u(Xa({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Qu.displayName="Toggle";var Ju=W__namespace.createContext(null),Y0=()=>{let e=W__namespace.useContext(Ju);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},em=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=b=>{if(r==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(y=>y!==b):[...g,b];p||f(v),s?.(v);}};return jsxRuntime.jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsxRuntime.jsx(Ju.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});em.displayName="ToggleGroup";var tm=W__namespace.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=Y0(),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(Xa({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});tm.displayName="ToggleGroupItem";var Za=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,b=h?t:p,v=W__namespace.useRef(null),[y,R]=W__namespace.useState(false),[w,C]=W__namespace.useState(null),x=(H,L)=>{if(!v.current)return b[0];let S=v.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=[...b];S[L]=H,L>0&&H<b[L-1]&&(S[L]=b[L-1]),L<b.length-1&&H>b[L+1]&&(S[L]=b[L+1]),h||g(S),r?.(S);},T=(H,L)=>{l||(H.preventDefault(),R(true),C(L),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!y||w===null||l)return;let L=x(H.clientX,H.clientY);N(L,w);},M=()=>{y&&(R(false),C(null),o?.(b));},P=H=>{if(l)return;let L=x(H.clientX,H.clientY),S=0,V=Math.abs(b[0]-L);for(let z=1;z<b.length;z++){let F=Math.abs(b[z]-L);F<V&&(V=F,S=z);}N(L,S),o?.([...b.slice(0,S),L,...b.slice(S+1)]);},E=(H,L)=>{if(l)return;let S=b[L];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,b[L]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,b[L]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}N(S,L),o?.([...b.slice(0,L),S,...b.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:v,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:b.length>1?`${D(b[0])}%`:0,right:`${100-D(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${D(b[0])}%`:0,top:`${100-D(b[b.length-1])}%`,left:0,right:0}})}),b.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",y&&w===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&&b.map((H,L)=>jsxRuntime.jsx("input",{type:"hidden",name:b.length>1?`${d}[${L}]`:d,value:H},L))]})});Za.displayName="Slider";var nm=W__namespace.createContext(null),rm=()=>{let e=W__namespace.useContext(nm);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Ui=W__namespace.createContext(null),om=()=>{let e=W__namespace.useContext(Ui);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},am=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,b=w=>{if(t==="single"){let x=h.includes(w)&&a?[]:[w];g||m(x),o?.(x[0]||"");}else {let C=h.includes(w)?h.filter(x=>x!==w):[...h,w];g||m(C),o?.(C);}},v=W__namespace.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),y=W__namespace.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),R=W__namespace.useCallback(w=>{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(w){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(nm.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:y,focusTrigger:R},children:jsxRuntime.jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});am.displayName="Accordion";var sm=W__namespace.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=rm(),d=c.value.includes(t),m=n||c.disabled||false,f=W__namespace.useId(),p=W__namespace.useId();return r!==void 0?jsxRuntime.jsx(Ui.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(im,{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(lm,{children:s})]})}):jsxRuntime.jsx(Ui.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})})});sm.displayName="AccordionItem";var im=W__namespace.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=rm(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=om(),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"})]})})});im.displayName="AccordionTrigger";var lm=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=om();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})})})});lm.displayName="AccordionContent";var dm=W__namespace.createContext(null),um=()=>{let e=W__namespace.useContext(dm);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},mm=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=b=>{o||(m||d(b),r?.(b));};return jsxRuntime.jsx(dm.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(Wi,{})]}),s]})})});mm.displayName="Collapsible";var Wi=W__namespace.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=um();return jsxRuntime.jsx("button",{ref:o,type:"button",id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e),onClick:d=>{n?.(d),s(!a);},...r,children:t??jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4"})})});Wi.displayName="CollapsibleTrigger";var pm=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=um(),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 b=()=>{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:b,...r,children:jsxRuntime.jsx("div",{ref:c,children:t})}):null});pm.displayName="CollapsibleContent";var es=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}%)`}})})]})});es.displayName="Progress";var vm=W__namespace.createContext(null),hm=()=>{let e=W__namespace.useContext(vm);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},xm=({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(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?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 b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,r]),W__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsxRuntime.jsx(vm.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};xm.displayName="HoverCard";var ym=W__namespace.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=hm();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})});ym.displayName="HoverCardTrigger";var Rm=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}=hm(),[g,h]=W__namespace.useState({top:0,left:0}),[b,v]=W__namespace.useState(false),y=W__namespace.useRef(null);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{if(!d||!f.current||!y.current)return;(()=>{if(!f.current||!y.current)return;let N=f.current.getBoundingClientRect(),T=y.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 R=x=>{a?.(x),m(true);},w=x=>{s?.(x),m(false);};if(!b||!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 ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{y.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:R,onMouseLeave:w,...l,children:i}),document.body)});Rm.displayName="HoverCardContent";var wm=W__namespace.createContext({size:"md",variant:"default",radius:"md"}),ns=()=>W__namespace.useContext(wm);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 ew=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"}}),tw=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"}}),nw=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"}}),Cm=W__namespace.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsxRuntime.jsx(wm.Provider,{value:{size:e,variant:t,radius:n},children:jsxRuntime.jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Cm.displayName="Breadcrumb";var Tm=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=ns();return jsxRuntime.jsx("ol",{ref:n,className:u(ew({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});Tm.displayName="BreadcrumbList";var Mm=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r}=ns();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})});Mm.displayName="BreadcrumbItem";var Nm=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Nm.displayName="BreadcrumbLink";var km=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}));km.displayName="BreadcrumbPage";var Pm=({children:e,className:t,...n})=>{let{size:r}=ns();return jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:u(tw({size:r}),"text-muted-foreground/60",t),...n,children:e??jsxRuntime.jsx(lucideReact.ChevronRight,{})})};Pm.displayName="BreadcrumbSeparator";var Em=({className:e,...t})=>{let{size:n}=ns();return jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:u(nw({size:n}),e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]})};Em.displayName="BreadcrumbEllipsis";var Dm=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})}));Dm.displayName="AspectRatio";var Vm=W__namespace.createContext(null),ji=()=>{let e=W__namespace.useContext(Vm);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},Am=W__namespace.createContext(null),zm=()=>{let e=W__namespace.useContext(Am);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},Om=W__namespace.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(Vm.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(Yi,{})]})})});Om.displayName="NavigationMenu";var Bm=W__namespace.forwardRef(({className:e,...t},n)=>{let{orientation:r}=ji();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})});Bm.displayName="NavigationMenuList";var Fm=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=ji(),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(Am.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsxRuntime.jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});Fm.displayName="NavigationMenuItem";var Km=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"),Gm=W__namespace.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=zm(),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(Km(),"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"})]})});Gm.displayName="NavigationMenuTrigger";var $m=W__namespace.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=zm(),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?ja__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});$m.displayName="NavigationMenuContent";var Um=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"),Wm=W__namespace.forwardRef(({className:e,active:t,...n},r)=>jsxRuntime.jsx("a",{ref:r,className:u(Um(),t&&"bg-accent text-accent-foreground",e),...n}));Wm.displayName="NavigationMenuLink";var Yi=W__namespace.forwardRef((e,t)=>null);Yi.displayName="NavigationMenuViewport";var _m=W__namespace.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=ji();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});_m.displayName="NavigationMenuIndicator";var qm=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full 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:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",light:"hover:bg-muted/50",bordered:"border border-current hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),_o=W__namespace.forwardRef(({className:e,variant:t,size:n,iconSize:r,...o},a)=>{let i=r??{sm:14,md:16,lg:20}[n??"md"];return jsxRuntime.jsx("button",{ref:a,type:"button",className:u(qm({variant:t,size:n}),e),"aria-label":"Close",...o,children:jsxRuntime.jsx(lucideReact.X,{style:{width:i,height:i}})})});_o.displayName="CloseButton";var rs=W__namespace.createContext(null);function pw(){let e=W__namespace.useContext(rs);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Zn(){return W__namespace.useContext(rs)}var fw="16rem",gw="18rem",bw="3rem",vw="b",hw={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},xw={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Xi=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",b=h==="overlay",[v,y]=W__namespace.useState(false),[R,w]=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=()=>{y(window.innerWidth<768);};return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);let k=W__namespace.useCallback(()=>b?T(E=>!E):v?w(E=>!E):T(E=>!E),[v,T,w,b]);W__namespace.useEffect(()=>{if(b)return;let E=D=>{D.key===vw&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),k());};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[k,b]);let M=N?"expanded":"collapsed",P=W__namespace.useMemo(()=>({placement:r,state:M,open:N,setOpen:T,isMobile:v,openMobile:R,setOpenMobile:w,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,M,N,T,v,R,w,k,l,h,o,a,s,i]);return b?jsxRuntime.jsx(rs.Provider,{value:P,children:jsxRuntime.jsx(vaul.Drawer.Root,{open:N,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsxRuntime.jsx(rs.Provider,{value:P,children:jsxRuntime.jsx(_n,{delayDuration:0,children:jsxRuntime.jsx("div",{ref:g,style:{"--drawer-width":fw,"--drawer-width-icon":bw,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Xi.displayName="Drawer";var Qm=W__namespace.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=Zn();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(yw,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=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":b&&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})})]})});Qm.displayName="DrawerSidebar";var yw=({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 dt(),()=>ut()},[t]),!o||!t?null:ja__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":gw},children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Jm=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Zn();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"})]})});Jm.displayName="DrawerTrigger";var ep=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let o=Zn(),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?hw[i]:xw[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(_o,{variant:"light",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})});ep.displayName="DrawerContent";var tp=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}));tp.displayName="DrawerHeader";var np=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}));np.displayName="DrawerBody";var rp=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}));rp.displayName="DrawerFooter";var op=W__namespace.forwardRef(({className:e,...t},n)=>Zn()?.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}));op.displayName="DrawerTitle";var ap=W__namespace.forwardRef(({className:e,...t},n)=>Zn()?.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}));ap.displayName="DrawerDescription";var sp=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Zn();return o?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Close,{ref:r,className:e,onClick:t,...n}):jsxRuntime.jsx(_o,{ref:r,variant:"light",className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...n})});sp.displayName="DrawerClose";var ip=W__namespace.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=Zn();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"})]})});ip.displayName="DrawerToggle";var lp=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}));lp.displayName="DrawerSeparator";var cp=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}));cp.displayName="DrawerMenu";var dp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));dp.displayName="DrawerMenuItem";var up=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"}}),mp=W__namespace.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=Zn(),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(up({variant:t,size:n}),o),...s,children:a});return r?jsxRuntime.jsxs(jn,{children:[jsxRuntime.jsx(Yn,{children:m}),jsxRuntime.jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});mp.displayName="DrawerMenuButton";var pp=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}));pp.displayName="DrawerGroup";var fp=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}));fp.displayName="DrawerGroupLabel";var gp=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}));gp.displayName="DrawerInset";var Rw=Xi;var vp=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})}));vp.displayName="Table";var hp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));hp.displayName="TableHeader";var xp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));xp.displayName="TableBody";var yp=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}));yp.displayName="TableFooter";var Rp=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}));Rp.displayName="TableRow";var wp=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}));wp.displayName="TableHead";var Cp=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}));Cp.displayName="TableCell";var Tp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));Tp.displayName="TableCaption";function kw({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(w,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:b=false,hoverable:v=true,...y},R){let[w,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??w,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,_)=>{let A=G.accessor(O),j=G.accessor(_);if(A===j)return 0;if(A==null)return 1;if(j==null)return -1;let ie=String(A).localeCompare(String(j),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((_,A)=>s(_,A)));D(O);}else D(new Set);},I=(G,O)=>{let _=new Set(M);O?_.add(G):_.delete(G),D(_);},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 _="asc";P.columnId===G&&(P.direction==="asc"?_="desc":P.direction==="desc"&&(_=null)),H({columnId:_?G:null,direction:_});},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:R,className:u("w-full",e),...y,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(Ko,{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 _=s(G,O),A=M.has(_);return jsxRuntime.jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&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(Ko,{checked:A,onCheckedChange:j=>I(_,!!j),"aria-label":`Select row ${O+1}`})}),n.map(j=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:j.cell?j.cell(G,O):j.accessor(G)},j.id))]},_)})})]})}),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 Pw=W__namespace.forwardRef(kw);var qi=["January","February","March","April","May","June","July","August","September","October","November","December"];function Vw({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(hn,{children:[jsxRuntime.jsx(xn,{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:qi[o]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),jsxRuntime.jsx(yn,{className:"min-w-[140px] p-0",children:jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:qi.map((c,d)=>jsxRuntime.jsx($t,{onSelect:()=>s(d),className:u(o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxRuntime.jsxs(hn,{children:[jsxRuntime.jsx(xn,{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(yn,{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($t,{onSelect:()=>i(c),className:u(a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function Aw(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(Vw,{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=qi[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(()=>Aw(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 Pp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});Pp.displayName="Pagination";var Ep=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));Ep.displayName="PaginationContent";var Lp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,className:u("",e),...t}));Lp.displayName="PaginationItem";var os=({className:e,isActive:t,size:n="icon",...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:u(bn({variant:t?"solid":"light",size:n}),e),...r});os.displayName="PaginationLink";var Sp=({className:e,...t})=>jsxRuntime.jsxs(os,{"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"})]});Sp.displayName="PaginationPrevious";var Dp=({className:e,...t})=>jsxRuntime.jsxs(os,{"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"})]});Dp.displayName="PaginationNext";var Hp=({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"})]});Hp.displayName="PaginationEllipsis";var el=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}));el.displayName=cmdk.Command.displayName;var Kw=({children:e,...t})=>jsxRuntime.jsx(Va,{...t,children:jsxRuntime.jsx(Aa,{className:"overflow-hidden p-0 shadow-lg",children:jsxRuntime.jsx(el,{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})})}),Ip=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})]}));Ip.displayName=cmdk.Command.Input.displayName;var Vp=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}));Vp.displayName=cmdk.Command.List.displayName;var Ap=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ap.displayName=cmdk.Command.Empty.displayName;var zp=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}));zp.displayName=cmdk.Command.Group.displayName;var Op=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Op.displayName=cmdk.Command.Separator.displayName;var Bp=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}));Bp.displayName=cmdk.Command.Item.displayName;var Fp=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Fp.displayName="CommandShortcut";var Kp=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"})})]})});Kp.displayName="PasswordInput";var Gp=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,b=h?a:m,v=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},y=()=>{v((b??0)+n);},R=()=>{v((b??0)-n);},w=T=>{let k=T.target.value;if(k==="")v(void 0);else {let M=parseFloat(k);isNaN(M)||v(M);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),y()):T.key==="ArrowDown"&&(T.preventDefault(),R());},x=r===void 0||(b??0)>r,N=o===void 0||(b??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:R,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:b??"",onChange:w,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:y,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:b??"",onChange:w,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Gp.displayName="NumberInput";var Up=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,b=v=>{g||p(v),n?.(v),m(false);};return jsxRuntime.jsxs(nt,{open:d,onOpenChange:m,children:[jsxRuntime.jsxs(Lt,{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(rt,{className:"w-auto p-0",align:"start",children:jsxRuntime.jsx(so,{mode:"single",selected:h,onSelect:b,disabled:v=>!!(s&&v<s||i&&v>i),initialFocus:true})})]})});Up.displayName="DatePicker";var Yp=classVarianceAuthority.cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Wp=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"}}),Xp=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(Tr,{className:u(Wp({size:r})),children:[m.src&&jsxRuntime.jsx(no,{src:m.src,alt:m.alt||""}),jsxRuntime.jsx(Mr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxRuntime.jsxs(jn,{children:[jsxRuntime.jsx(Yn,{children:p}),jsxRuntime.jsx(Xn,{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(Yp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsxRuntime.jsx(Tr,{className:u(Wp({size:r})),children:jsxRuntime.jsxs(Mr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsxRuntime.jsx(_n,{delayDuration:300,children:d}):d});Xp.displayName="AvatarGroup";var qp=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"}}),Zp=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),[b,v]=W__namespace.useState(null),y=t!==void 0,R=y?t:g,w=b!==null?b:R,C=D=>{l||c||(y||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;v(S?H+.5:H+1);},T=()=>{v(null);},k=s==="heart"?lucideReact.Heart:lucideReact.Star,M=D=>w>=D+1?"full":w>=D+.5?"half":"empty",P=d?{color:d,fill:d}:{},E=m?{color:m}:{};return jsxRuntime.jsx("div",{ref:p,className:u(qp({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":R===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)})})});Zp.displayName="Rating";var ef=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 border-current 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-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"bordered",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-success hover:bg-success/10"},{variant:"bordered",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"bordered",color:"danger",className:"text-danger hover:bg-danger/10"},{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-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/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-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),nC=classVarianceAuthority.cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10 cursor-pointer",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),tf=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,avatar:m,children:f,onClick:p,...g},h)=>{let b=a||!!p,v=y=>{y.stopPropagation(),c?.();};return jsxRuntime.jsxs("div",{ref:h,role:b?"button":void 0,tabIndex:b&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:p,onKeyDown:b&&!d?y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p?.(y));}:void 0,className:u(ef({variant:t,color:n,size:r,radius:o,clickable:b}),d&&"opacity-50 cursor-not-allowed",e),...g,children:[m&&jsxRuntime.jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:m}),s&&jsxRuntime.jsx("span",{className:"shrink-0",children:s}),jsxRuntime.jsx("span",{className:"truncate",children:f}),i&&jsxRuntime.jsx("span",{className:"shrink-0",children:i}),l&&jsxRuntime.jsx("button",{type:"button","aria-label":"Remove",onClick:v,disabled:d,className:u(nC({size:r})),children:jsxRuntime.jsx(lucideReact.X,{})})]})});tf.displayName="Chip";var nf=W.createContext({direction:"horizontal"}),dC=({className:e,direction:t="horizontal",children:n,...r})=>jsxRuntime.jsx(nf.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})}),uC=reactResizablePanels.Panel,mC=({withHandle:e,className:t,...n})=>{let{direction:r}=W.useContext(nf),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 sf=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"}}),fC={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"}},rf={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)"},lf=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=fC[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(sf({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:rf[n]||rf.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)})]})});lf.displayName="CircularProgress";var cf=W__namespace.createContext(null),vC=()=>{let e=W__namespace.useContext(cf);if(!e)throw new Error("OTP components must be used within InputOTP");return e},df=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"}}),uf=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,b]=W__namespace.useState(0),[v,y]=W__namespace.useState(false),R=W__namespace.useRef(null),w=r!==void 0?r:p;W__namespace.useImperativeHandle(f,()=>R.current),W__namespace.useEffect(()=>{b(Math.min(w.length,n-1));},[w,n]),W__namespace.useEffect(()=>{w.length===n&&s&&s(w);},[w,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"?b(E=>Math.max(0,E-1)):P.key==="ArrowRight"&&b(E=>Math.min(w.length,n-1,E+1));},N=()=>{R.current?.focus();},T=()=>{y(true),b(Math.min(w.length,n-1));},k=()=>{y(false);},M={value:w,activeIndex:v?h:-1,maxLength:n,disabled:l};return jsxRuntime.jsx(cf.Provider,{value:M,children:jsxRuntime.jsxs("div",{className:u(df({size:c}),t),onClick:N,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:R,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:w,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]})})});uf.displayName="InputOTP";var mf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex items-center",e),...t}));mf.displayName="InputOTPGroup";var pf=W__namespace.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=vC(),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"})})]})});pf.displayName="InputOTPSlot";var ff=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"})}));ff.displayName="InputOTPSeparator";var vf=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"}}),hf=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[b,v]=W__namespace.useState(""),y=W__namespace.useRef(null);W__namespace.useImperativeHandle(h,()=>y.current);let R=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]),v("");},w=M=>{m||f||o?.(r.filter(P=>P.id!==M));},C=M=>{if(c.includes(M.key)){if(M.key==="Tab"&&!b)return;M.preventDefault(),R(b);}M.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},x=M=>{let P=M.target.value;if(P.includes(",")){P.split(",").forEach(D=>{D.trim()&&R(D);});return}v(P);},N=M=>{M.preventDefault(),M.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(D=>{R(D);});},T=()=>{y.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,()=>w(M.id)):jsxRuntime.jsxs("span",{className:u(vf({variant:t,size:n})),children:[M.text,!m&&!f&&jsxRuntime.jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),w(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:y,type:"text",value:b,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})]})});hf.displayName="TagInput";var yf=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"}}),Rf=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(yf({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]}));Rf.displayName="EmptyState";var Cf=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"}}),Tf=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(Cf({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})]})});Tf.displayName="StatCard";var al=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"}}),PC=({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 EC({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:b=[],onCheck:v,children:y,...R},w){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(b)),L=h!==void 0,S=L?new Set(h):D,V=(O,_)=>{x(_),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(_));},z=(O,_)=>{O.preventDefault(),!(C===null||C===_)&&T(_);},F=()=>{T(null);},I=(O,_)=>{if(O.preventDefault(),!r||C===null||C===_){x(null),T(null);return}let A=[...r],[j]=A.splice(C,1);A.splice(_,0,j),s?.(A),x(null),T(null);},K=()=>{x(null),T(null);},B=W__namespace.useCallback((O,_)=>{if(!r)return;let A=new Set(E),j=!A.has(O.id);d?j?A.add(O.id):A.delete(O.id):(A.clear(),j&&A.add(O.id)),P||M(A);let ie=r.filter(Te=>A.has(Te.id));p?.(Array.from(A),{selected:j,selectedItems:ie,item:O,event:_});},[r,E,d,P,p]),q=W__namespace.useCallback((O,_)=>{if(!r)return;let A=new Set(S),j=!A.has(O.id);j?A.add(O.id):A.delete(O.id),L||H(A);let ie=r.filter(Te=>A.has(Te.id));v?.(Array.from(A),{checked:j,checkedItems:ie,item:O,event:_});},[r,S,L,v]);return (a||c||g)&&r&&o?jsxRuntime.jsx("div",{ref:w,role:"list",className:u(al({variant:t,size:n,className:e})),...R,children:r.map((O,_)=>{let A=E.has(O.id),j=S.has(O.id);return jsxRuntime.jsxs("div",{role:"listitem","aria-selected":c?A:void 0,draggable:a,onDragStart:a?U=>V(U,_):void 0,onDragOver:a?U=>z(U,_):void 0,onDragLeave:a?F:void 0,onDrop:a?U=>I(U,_):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===_&&"opacity-50 scale-[1.02] z-10",N===_&&"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(PC,{checked:j,onClick:U=>q(O,U)}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o(O,_)})]},O.id)})}):jsxRuntime.jsx("div",{ref:w,role:"list",className:u(al({variant:t,size:n,className:e})),...R,children:y})}var LC=W__namespace.forwardRef(EC),Nf=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),kf=W__namespace.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:u(Nf({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})]}));kf.displayName="ListItem";var Pf=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]}));Pf.displayName="ListItemText";var Sf=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Df=W__namespace.forwardRef(({className:e,position:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,"data-position":t,className:u(Sf({position:t,className:e})),...n}));Df.displayName="Timeline";var Hf=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"}}),If=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(Hf({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]}));If.displayName="TimelineItem";var Vf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));Vf.displayName="TimelineContent";var Af=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}));Af.displayName="TimelineOpposite";var Of=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}}),Bf=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}}),Ff=W__namespace.createContext({}),Kf=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(Ff.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsxRuntime.jsx("div",{ref:c,role:"group",className:u(Of({size:t,fullWidth:n,className:e})),...l,children:r})})});Kf.displayName="SegmentedControl";var Gf=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=W__namespace.useContext(Ff),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(Bf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Gf.displayName="SegmentedControlItem";var $f=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"}}),Uf=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},cs=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]},Wf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${cs(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,b]=W__namespace.useState(false),[v,y]=W__namespace.useState(false),[R,w]=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=Wf(K,c,d);B.length>0?F.push({file:K,errors:B}):z.push(K);}),w(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&&(b(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});y(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)&&(b(false),y(false));},[]),M=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation(),b(false),y(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=v?"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($f({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 ${cs(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),R.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:R.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=Uf(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:[cs(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(es,{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 FC=`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")`,Yf=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}}),ta=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(Yf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-ring ring-offset-2",i),style:{backgroundImage:n?FC: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}})}));ta.displayName="ColorSwatch";var Xf=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,b=W__namespace.useCallback(y=>{l||(e===void 0&&g(y),n?.(y));},[e,n,l]),v=y=>y.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:u(Xf({layout:r}),c),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...d},...m,children:a.map(y=>{let R=h?v(h)===v(y):false;return jsxRuntime.jsx(ta,{role:"option",color:y,size:s,shape:i,isSelected:R,onSelect:b,disabled:l,"aria-selected":R},y)})})});qf.displayName="ColorSwatchPicker";var $C=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Zf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Qf=W__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=$C,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=b=>{m(b),n?.(b);},g=b=>{m(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),n?.(v);};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",Zf[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(nt,{children:[jsxRuntime.jsx(Lt,{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",Zf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsxRuntime.jsx(rt,{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(Cr,{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(Cr,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsxRuntime.jsx(ta,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Qf.displayName="ColorPicker";var Jf=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"}}),ll=e=>String(e).padStart(2,"0"),YC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},XC=(e,t)=>`${ll(e)}:${ll(t)}`,eg=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:b,minutes:v}=YC(f||"00:00"),y=k=>{let M=k.target.value;p(M),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(M)&&r?.(M);},R=(k,M)=>{let P=Math.max(0,Math.min(23,k)),E=Math.max(0,Math.min(59,M)),D=XC(P,E);p(D),r?.(D);},w=()=>R(b+1,v),C=()=>R(b-1,v),x=()=>R(b,v+a),N=()=>R(b,v-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:ll(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:y,disabled:c,className:u(Jf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxRuntime.jsxs(nt,{open:g,onOpenChange:h,children:[jsxRuntime.jsxs(Lt,{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(rt,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{value:b,onIncrement:w,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(T,{value:v,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;R(k.getHours(),k.getMinutes());},children:"Now"}),jsxRuntime.jsx(oe,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});eg.displayName="TimeInput";var tg=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"}}),ZC=(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}},cl=(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},ng=(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},rg=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:b,...v},y)=>{let[R,w]=W__namespace.useState(r),[C,x]=W__namespace.useState(""),[N,T]=W__namespace.useState(false),k=n!==void 0?n:R,M=f??ZC(a,s);W__namespace.useEffect(()=>{!N&&k!==void 0&&x(cl(k,i,p,g));},[k,i,p,g,N]);let P=S=>{let V=S.target.value;if(!V){x(""),n===void 0&&w(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;x(V);let F=ng(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&&w(I),o?.(I);}},E=()=>{T(true),k!==void 0&&x(k.toString().replace(".",g));},D=()=>{T(false),x(k!==void 0?cl(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:y,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:E,onBlur:D,disabled:h,placeholder:b??`0${g}${"0".repeat(i)}`,className:u(tg({size:t}),H&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:N?"var(--color-foreground)":void 0},...v}),L&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});rg.displayName="CurrencyInput";var og=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"}}),dl={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:"#####-####"}},eT=(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}},nr=e=>["#","A","*"].includes(e),us=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(nr(s)){if(o<e.length){let i=e[o];eT(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},ul=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];nr(o)&&(n+=e[r]);}return n},ag=(e,t)=>e.split("").map(n=>nr(n)?t:n).join(""),tT=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)nr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,nr(t[i])&&s++;for(;a<t.length&&!nr(t[a]);)a++;return Math.min(a,e.length)},sg=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 dl?dl[a].mask:a,[g,h]=W__namespace.useState(r),[b,v]=W__namespace.useState(""),[y,R]=W__namespace.useState(false),w=W__namespace.useRef(null),C=n!==void 0?n:g;W__namespace.useImperativeHandle(f,()=>w.current),W__namespace.useEffect(()=>{let k=us(C,p,true);v(k);},[C,p]);let x=k=>{let M=k.target.value,P=k.target.selectionStart??0,E=M.replace(/[^\w]/g,""),D=us(E,p,true),H=ul(D,p);v(D),n===void 0&&h(l?D:H),o?.(H,D),requestAnimationFrame(()=>{if(w.current){let L=tT(D,p,P);w.current.setSelectionRange(L,L);}});},N=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let M=w.current;if(!M)return;let P=M.selectionStart??0;if(k.key==="Backspace"&&P>0){let E=P-1;for(;E>0&&!nr(p[E]);)E--;let D=ul(b,p),H=0;for(let V=0;V<E&&V<p.length;V++)nr(p[V])&&H++;let L=D.slice(0,Math.max(0,H-1))+D.slice(H),S=us(L,p,true);v(S),n===void 0&&h(l?S:L),o?.(L,S),k.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(E,E);});}},T=i?ag(p,s):d;return jsxRuntime.jsx("input",{ref:w,type:"text",value:b,onChange:x,onKeyDown:N,onFocus:()=>R(true),onBlur:()=>R(false),disabled:c,placeholder:T,className:u(og({size:t}),e),style:{borderColor:y?"var(--color-foreground)":void 0},...m})});sg.displayName="MaskedInput";var ig=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"}}),fs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},pl={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},ml=(e,t)=>String(e).padStart(t,"0"),ps=(e,t)=>{let n=ml(e.getDate(),2),r=ml(e.getMonth()+1,2),o=ml(e.getFullYear(),4),a=fs[t],s=pl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},lg=(e,t)=>{let n=fs[t],r=e.split(n);if(r.length!==3)return null;let o=pl[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},aT=e=>e.toLowerCase(),sT=e=>{let t=fs[e];return pl[e].map(r=>r==="year"?"####":"##").join(t)},cg=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,b]=W__namespace.useState(""),[v,y]=W__namespace.useState(null),R=W__namespace.useRef(null),w=n!==void 0?n:p;W__namespace.useImperativeHandle(f,()=>R.current),W__namespace.useEffect(()=>{w?(b(ps(w,a)),y(null)):b("");},[w,a]);let C=fs[a],x=sT(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(b(D),D.length===x.length){let L=lg(D,a);if(L){if(s&&L<s){y(`Date must be after ${ps(s,a)}`);return}if(i&&L>i){y(`Date must be before ${ps(i,a)}`);return}y(null),n===void 0&&g(L),o?.(L);}else y("Invalid date");}else n===void 0&&g(null),o?.(null),y(null);},T=()=>{h&&h.length!==x.length&&(b(""),y(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:R,type:"text",inputMode:"numeric",value:h,onChange:N,onBlur:T,disabled:c,placeholder:d??aT(a),className:u(ig({size:t}),l&&"pr-10",v&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!v,"aria-describedby":v?"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")})}),v&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});cg.displayName="DateInput";var ug=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"}}),mg=[{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:"(###) ###-####"}],gs=(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},uT=e=>e.replace(/#/g,"_"),pg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=mg,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,...p},g)=>{let[h,b]=W__namespace.useState(r),[v,y]=W__namespace.useState(a??s),[R,w]=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??v,L=l.find(I=>I.code===H)??l[0],S=gs(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&&b(B);let q=gs(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&&y(I),i?.(K);let B=gs(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&&ja__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:()=>w(true),onBlur:()=>w(false),disabled:m,placeholder:f??uT(L.format),className:u(ug({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:R?"var(--color-foreground)":void 0},...p})]})]})});pg.displayName="PhoneInput";var gg=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}}),bg=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(gg({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})]})});bg.displayName="Navbar";var vg=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}));vg.displayName="NavbarBrand";var hg=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})});hg.displayName="NavbarContent";var xg=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}));xg.displayName="NavbarItem";var yg=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}));yg.displayName="NavbarLink";var wg=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"}}),Cg=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(wg({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"})]})});Cg.displayName="Link";var Tg=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"}}),Mg=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 y=c?.current||window,R=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return y.addEventListener("scroll",R,{passive:true}),R(),()=>{y.removeEventListener("scroll",R);}},[n,c,g,d]);let b=y=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(y);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:u(Tg({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:b,"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:v})})})});Mg.displayName="BackTop";var MT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),NT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),Ng=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),hs=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),kg=W__namespace.createContext(null),or=()=>{let e=W__namespace.useContext(kg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},Pg=W__namespace.createContext(null),ra=()=>{let e=W__namespace.useContext(Pg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},gl=W__namespace.createContext(null),Eg=W__namespace.createContext(null),Lg=W__namespace.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(kg.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",MT({radius:n}),e),...r,children:t})})});Lg.displayName="Menubar";var Sg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=or(),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(Pg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};Sg.displayName="MenubarMenu";var Dg=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Dg.displayName="MenubarGroup";var Hg=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?ja__namespace.createPortal(e,t||document.body):null};Hg.displayName="MenubarPortal";var Ig=({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(gl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ig.displayName="MenubarSub";var Vg=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Eg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));Vg.displayName="MenubarRadioGroup";var Ag=W__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=or(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=ra(),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",NT({radius:i}),e),onClick:f,onMouseEnter:p,...r})});Ag.displayName="MenubarTrigger";var zg=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=or(),l=W__namespace.useContext(gl);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",hs({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});zg.displayName="MenubarSubTrigger";var Og=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=or(),i=W__namespace.useContext(gl);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 R=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=R.top,x=R.right+t;x+w.width>window.innerWidth&&(x=R.left-w.width-t),f({top:C,left:x});})();},[l,t,d]);let b=y=>{n?.(y),c(true);},v=y=>{r?.(y),c(false);};return !p||!l?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:y=>{h.current=y,typeof a=="function"?a(y):a&&(a.current=y);},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",Ng({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});Og.displayName="MenubarSubContent";var Bg=W__namespace.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=or(),{triggerRef:l,open:c,onOpenChange:d}=ra(),[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 b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),R=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-y.width/2:t==="end"&&(w=v.right-y.width-n),f({top:R,left:w});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,n,r,l]),W__namespace.useEffect(()=>{if(!c)return;let b=v=>{let y=v.target;h.current&&!h.current.contains(y)&&l.current&&!l.current.contains(y)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),W__namespace.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},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",Ng({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});Bg.displayName="MenubarContent";var Fg=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=or(),{onOpenChange:l}=ra(),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",hs({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Fg.displayName="MenubarItem";var Kg=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=or(),{onOpenChange:c}=ra(),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",hs({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]})});Kg.displayName="MenubarCheckboxItem";var Gg=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=or(),{onOpenChange:l}=ra(),c=W__namespace.useContext(Eg),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",hs({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]})});Gg.displayName="MenubarRadioItem";var $g=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}));$g.displayName="MenubarLabel";var Ug=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}));Ug.displayName="MenubarSeparator";var Wg=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Wg.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"}}),jg=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)})});jg.displayName="Steps";var Yg=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"}}),PT=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"}}),ET=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"}}),Xg=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(Yg({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(PT({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(ET({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Xg.displayName="Step";var Zg=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"}}),Qg=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}}),Jg=W__namespace.createContext(null),zT=()=>{let e=W__namespace.useContext(Jg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},OT=({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"})})}),eb=({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:b,dragOverPosition:v,setDragOver:y,handleDrop:R,allowDrop:w,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}=zT(),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),_=d.has(e.key),A=g?.key===e.key,j=b===e.key,ie=!!(F||e.disabled),Te=l&&e.selectable!==false,U=f&&e.checkable!==false,ct=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]),tt=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]),Kn=Y=>{if(!ct)return;Y.stopPropagation(),Y.dataTransfer.effectAllowed="move";let Se=Y.currentTarget,ce=Se.cloneNode(true),Ge=document.documentElement.classList.contains("dark"),$e=Ge?"#0a0a0a":"#ffffff",$n=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 eu=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"}}),tu=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},b)=>{let[v,y]=W__namespace.useState(false),[R,w]=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)),y(false),w("");},F=A=>{let j=S.includes(A)?S.filter(ie=>ie!==A):[...S,A];V||T(j),o?.(j);},I=(A,j)=>{j.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(R.toLowerCase())):e;W__namespace.useEffect(()=>{if(v&&E.current){let A=E.current.getBoundingClientRect();M({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||w("");},[v,s]),W__namespace.useEffect(()=>{let A=j=>{let ie=j.target,Te=P.current&&!P.current.contains(ie),U=D.current&&!D.current.contains(ie);Te&&U&&(y(false),w(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),W__namespace.useEffect(()=>{if(!v)return;let A=j=>{D.current?.contains(j.target)||(y(false),w(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[v]);let _=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 b=="function"?b(A):b&&(b.current=A);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&y(!v),className:u(eu({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:j=>I(A.value,j),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&I(A.value,j);},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&&_&&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",v&&"rotate-180")})]})]}),v&&!c&&typeof document<"u"&&ja__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:R,onChange:A=>w(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 j=t?S.includes(A.value):L===A.value;return jsxRuntime.jsxs("div",{role:"option","aria-selected":j,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:j&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});tu.displayName="Select";var nu=W__namespace.createContext(null),$o=()=>{let e=W__namespace.useContext(nu);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Hi=W__namespace.createContext({radius:"md"}),Ii=W__namespace.createContext(null),hn=({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(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=W__namespace.useCallback((v,y)=>{p.current.set(v,y);},[]),b=W__namespace.useCallback(v=>{p.current.delete(v);},[]);return jsxRuntime.jsx(nu.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};hn.displayName="Dropdown";var xn=W__namespace.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=$o();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})});xn.displayName="DropdownTrigger";var N0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},yn=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:b,contentId:v,activeIndex:y,setActiveIndex:R,items:w}=$o(),[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=w.current.size);},[p,w]),W__namespace.useEffect(()=>{if(!p||!h.current||!b.current)return;let D=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),L=b.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;b.current&&!b.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,b]),W__namespace.useEffect(()=>{if(!p)return;let D=H=>{let L=Array.from(w.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(),y===-1||y>=S-1?R(l?0:Math.min(y+1,S-1)):R(y+1);break;case "ArrowUp":H.preventDefault(),y<=0?R(l?S-1:0):R(y-1);break;case "Home":H.preventDefault(),R(0);break;case "End":H.preventDefault(),R(S-1);break;case "Enter":case " ":H.preventDefault(),y>=0&&y<S&&L[y]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,i,y,R,w,l,h]),W__namespace.useEffect(()=>{p&&y>=0&&Array.from(w.current.entries()).sort(([H],[L])=>H-L).map(([,H])=>H)[y]?.focus();},[p,y,w]),!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 ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:D=>{b.current=D,typeof f=="function"?f(D):f&&(f.current=D);},id:v,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",N0[c],E,e),style:{top:C.top,left:C.left},...m,children:jsxRuntime.jsx(Hi.Provider,{value:{radius:c},children:d})}),document.body)});yn.displayName="DropdownContent";var ru=0,ou={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=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}=$o(),{radius:b}=W__namespace.useContext(Hi),[v]=W__namespace.useState(()=>ru++),y=W__namespace.useRef(null);W__namespace.useEffect(()=>(!n&&y.current&&g(v,y.current),()=>{h(v);}),[n,v,g,h]);let R=x=>{if(n){x.preventDefault();return}o?.(x),r?.(),m(false);},w=x=>{a?.(x),n||p(v);};return jsxRuntime.jsxs("div",{ref:x=>{y.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===v?"":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",ou[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:R,onMouseEnter:w,...c,children:[s,l&&jsxRuntime.jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Vi=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}));Vi.displayName="DropdownSection";var au=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}));au.displayName="DropdownSeparator";var su=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});su.displayName="DropdownShortcut";var iu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));iu.displayName="DropdownGroup";var lu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W__namespace.useState(n),{contentRef:s}=$o(),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(Ii.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};lu.displayName="DropdownSub";var cu=W__namespace.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=W__namespace.useContext(Ii),{setActiveIndex:d,registerItem:m,unregisterItem:f}=$o(),{radius:p}=W__namespace.useContext(Hi),[g]=W__namespace.useState(()=>ru++),h=W__namespace.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:y}=c;W__namespace.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let R=x=>{o?.(x),n||(d(g),v(true));},w=x=>{a?.(x);},C=x=>{s?.(x),(x.key==="ArrowRight"||x.key==="Enter"||x.key===" ")&&(x.preventDefault(),v(true));};return jsxRuntime.jsxs("div",{ref:x=>{h.current=x,y.current=x,typeof l=="function"?l(x):l&&(l.current=x);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:n?-1:0,"aria-disabled":n,"data-state":b?"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",ou[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:R,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});cu.displayName="DropdownSubTrigger";var du=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(Ii);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,b]=W__namespace.useState(false),v=W__namespace.useRef(null),y=W__namespace.useRef(null);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let x=m.current.getBoundingClientRect(),N=v.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 R=C=>{o?.(C),y.current&&(clearTimeout(y.current),y.current=null),d(true);},w=C=>{a?.(C);let x=C.relatedTarget;m.current?.contains(x)||f?.current?.contains(x)||(y.current=setTimeout(()=>{d(false);},100));};return W__namespace.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),!h||!c?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:C=>{v.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:R,onMouseLeave:w,...s}),document.body)});du.displayName="DropdownSubContent";var k0=Vi;var pu=W__namespace.createContext(null),Ai=()=>{let e=W__namespace.useContext(pu);if(!e)throw new Error("Popover components must be used within a Popover");return e},nt=({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(pu.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};nt.displayName="Popover";var Lt=W__namespace.forwardRef(({children:e,onClick:t,...n},r)=>{let{open:o,onOpenChange:a,triggerRef:s,contentId:i}=Ai();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})});Lt.displayName="PopoverTrigger";var oo=W__namespace.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Ai();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 rt=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:b}=Ai(),[v,y]=W__namespace.useState({top:0,left:0}),[R,w]=W__namespace.useState(false),[C,x]=W__namespace.useState(null);if(W__namespace.useEffect(()=>{w(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}y({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]),!R||!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 ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:T=>{x(k=>k!==T?T:k),typeof f=="function"?f(T):f&&(f.current=T);},id:b,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:v.top,left:v.left},...m,children:d}),document.body)});rt.displayName="PopoverContent";var fu=W__namespace.createContext(null),Oi=()=>{let e=W__namespace.useContext(fu);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},gu=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(fu.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})})});gu.displayName="Tabs";var zi={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"}},bu=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Oi(),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 v=g.querySelector('[data-state="active"]');if(v){let y=g.getBoundingClientRect(),R=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:R.height,transform:`translateY(${R.top-y.top}px)`,opacity:1}:{width:R.width,height:2,transform:`translateX(${R.left-y.left}px)`,opacity:1}):o==="solid"&&d(w?{width:R.width,height:R.height,transform:`translateY(${R.top-y.top}px)`,opacity:1}:{width:R.width,height:R.height,transform:`translateX(${R.left-y.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.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",zi[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsxRuntime.jsx("span",{className:u("absolute transition-all duration-200 ease-out",zi[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});bu.displayName="TabsList";var vu=W__namespace.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Oi(),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",zi[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});vu.displayName="TabsTrigger";var hu=W__namespace.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Oi(),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});hu.displayName="TabsContent";var xu=[{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 E0(e,t=xu){return e?t.filter(r=>r.test(e)).length/t.length:0}function L0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function S0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Ru=W__namespace.createContext(null),_a=()=>{let e=W__namespace.useContext(Ru);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},wu=({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(Ru.Provider,{value:{open:i,onOpenChange:l},children:r})};wu.displayName="Sheet";var Cu=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=_a();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Cu.displayName="SheetTrigger";var Tu=W__namespace.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=_a();return jsxRuntime.jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});Tu.displayName="SheetClose";var Fi=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?ja__namespace.createPortal(e,t||document.body):null};Fi.displayName="SheetPortal";var Mu=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=_a();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});Mu.displayName="SheetOverlay";var Nu=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"}}),I0=(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],ku=W__namespace.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=_a(),[d,m]=W__namespace.useState(false),[,f]=W__namespace.useState(false);return W__namespace.useEffect(()=>{if(l)m(true),f(true),dt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{ut();}},[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(Fi,{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(Nu({side:e}),I0(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]})]})});ku.displayName="SheetContent";var Pu=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});Pu.displayName="SheetHeader";var Eu=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Eu.displayName="SheetFooter";var Lu=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));Lu.displayName="SheetTitle";var Su=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Su.displayName="SheetDescription";var z0=({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 Du=W__namespace.createContext(null),Wo=()=>{let e=W__namespace.useContext(Du);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Ki=W__namespace.createContext(null),Hu=W__namespace.createContext(null),Iu=({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(Du.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};Iu.displayName="ContextMenu";var Vu=W__namespace.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Wo(),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})});Vu.displayName="ContextMenuTrigger";var Au=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Au.displayName="ContextMenuGroup";var zu=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?ja__namespace.createPortal(e,t||document.body):null};zu.displayName="ContextMenuPortal";var Ou=({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(Ki.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ou.displayName="ContextMenuSub";var Bu=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Hu.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));Bu.displayName="ContextMenuRadioGroup";var Fu=W__namespace.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Wo(),[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 b=g.current.getBoundingClientRect(),{x:v,y}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),y+b.height>window.innerHeight&&(y=window.innerHeight-b.height-8),p({x:v,y});},[s,l]),W__namespace.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),W__namespace.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:ja__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)});Fu.displayName="ContextMenuContent";var Ku=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=W__namespace.useContext(Ki);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"})]})});Ku.displayName="ContextMenuSubTrigger";var Gu=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=W__namespace.useContext(Ki);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 y=c.current.getBoundingClientRect(),R=g.current.getBoundingClientRect(),w=y.top,C=y.right+t;C+R.width>window.innerWidth&&(C=y.left-R.width-t),m({top:w,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},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:b,...o}),document.body)});Gu.displayName="ContextMenuSubContent";var $u=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Wo(),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})});$u.displayName="ContextMenuItem";var Uu=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Wo(),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]})});Uu.displayName="ContextMenuCheckboxItem";var Wu=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Wo(),l=W__namespace.useContext(Hu),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]})});Wu.displayName="ContextMenuRadioItem";var _u=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}));_u.displayName="ContextMenuLabel";var ju=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}));ju.displayName="ContextMenuSeparator";var Yu=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Yu.displayName="ContextMenuShortcut";var Xu=W__namespace.createContext(null),$0=()=>{let e=W__namespace.useContext(Xu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},qu=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(),b=v=>{p||f(v),r?.(v);};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(Xu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});qu.displayName="RadioGroup";var Zu=W__namespace.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=$0(),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}})]})});Zu.displayName="RadioGroupItem";var Xa=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"}}),Qu=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 b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsxRuntime.jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u(Xa({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Qu.displayName="Toggle";var Ju=W__namespace.createContext(null),Y0=()=>{let e=W__namespace.useContext(Ju);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},em=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=b=>{if(r==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(y=>y!==b):[...g,b];p||f(v),s?.(v);}};return jsxRuntime.jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsxRuntime.jsx(Ju.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});em.displayName="ToggleGroup";var tm=W__namespace.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=Y0(),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(Xa({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});tm.displayName="ToggleGroupItem";var Za=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,b=h?t:p,v=W__namespace.useRef(null),[y,R]=W__namespace.useState(false),[w,C]=W__namespace.useState(null),x=(H,L)=>{if(!v.current)return b[0];let S=v.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=[...b];S[L]=H,L>0&&H<b[L-1]&&(S[L]=b[L-1]),L<b.length-1&&H>b[L+1]&&(S[L]=b[L+1]),h||g(S),r?.(S);},T=(H,L)=>{l||(H.preventDefault(),R(true),C(L),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!y||w===null||l)return;let L=x(H.clientX,H.clientY);N(L,w);},M=()=>{y&&(R(false),C(null),o?.(b));},P=H=>{if(l)return;let L=x(H.clientX,H.clientY),S=0,V=Math.abs(b[0]-L);for(let z=1;z<b.length;z++){let F=Math.abs(b[z]-L);F<V&&(V=F,S=z);}N(L,S),o?.([...b.slice(0,S),L,...b.slice(S+1)]);},E=(H,L)=>{if(l)return;let S=b[L];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,b[L]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,b[L]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}N(S,L),o?.([...b.slice(0,L),S,...b.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:v,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:b.length>1?`${D(b[0])}%`:0,right:`${100-D(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${D(b[0])}%`:0,top:`${100-D(b[b.length-1])}%`,left:0,right:0}})}),b.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",y&&w===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&&b.map((H,L)=>jsxRuntime.jsx("input",{type:"hidden",name:b.length>1?`${d}[${L}]`:d,value:H},L))]})});Za.displayName="Slider";var nm=W__namespace.createContext(null),rm=()=>{let e=W__namespace.useContext(nm);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Ui=W__namespace.createContext(null),om=()=>{let e=W__namespace.useContext(Ui);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},am=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,b=w=>{if(t==="single"){let x=h.includes(w)&&a?[]:[w];g||m(x),o?.(x[0]||"");}else {let C=h.includes(w)?h.filter(x=>x!==w):[...h,w];g||m(C),o?.(C);}},v=W__namespace.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),y=W__namespace.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),R=W__namespace.useCallback(w=>{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(w){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(nm.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:y,focusTrigger:R},children:jsxRuntime.jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});am.displayName="Accordion";var sm=W__namespace.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=rm(),d=c.value.includes(t),m=n||c.disabled||false,f=W__namespace.useId(),p=W__namespace.useId();return r!==void 0?jsxRuntime.jsx(Ui.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(im,{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(lm,{children:s})]})}):jsxRuntime.jsx(Ui.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})})});sm.displayName="AccordionItem";var im=W__namespace.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=rm(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=om(),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"})]})})});im.displayName="AccordionTrigger";var lm=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=om();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})})})});lm.displayName="AccordionContent";var dm=W__namespace.createContext(null),um=()=>{let e=W__namespace.useContext(dm);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},mm=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=b=>{o||(m||d(b),r?.(b));};return jsxRuntime.jsx(dm.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(Wi,{})]}),s]})})});mm.displayName="Collapsible";var Wi=W__namespace.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=um();return jsxRuntime.jsx("button",{ref:o,type:"button",id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e),onClick:d=>{n?.(d),s(!a);},...r,children:t??jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4"})})});Wi.displayName="CollapsibleTrigger";var pm=W__namespace.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=um(),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 b=()=>{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:b,...r,children:jsxRuntime.jsx("div",{ref:c,children:t})}):null});pm.displayName="CollapsibleContent";var es=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}%)`}})})]})});es.displayName="Progress";var vm=W__namespace.createContext(null),hm=()=>{let e=W__namespace.useContext(vm);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},xm=({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(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?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 b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,r]),W__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsxRuntime.jsx(vm.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};xm.displayName="HoverCard";var ym=W__namespace.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=hm();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})});ym.displayName="HoverCardTrigger";var Rm=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}=hm(),[g,h]=W__namespace.useState({top:0,left:0}),[b,v]=W__namespace.useState(false),y=W__namespace.useRef(null);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{if(!d||!f.current||!y.current)return;(()=>{if(!f.current||!y.current)return;let N=f.current.getBoundingClientRect(),T=y.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 R=x=>{a?.(x),m(true);},w=x=>{s?.(x),m(false);};if(!b||!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 ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{y.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:R,onMouseLeave:w,...l,children:i}),document.body)});Rm.displayName="HoverCardContent";var wm=W__namespace.createContext({size:"md",variant:"default",radius:"md"}),ns=()=>W__namespace.useContext(wm);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 ew=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"}}),tw=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"}}),nw=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"}}),Cm=W__namespace.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsxRuntime.jsx(wm.Provider,{value:{size:e,variant:t,radius:n},children:jsxRuntime.jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Cm.displayName="Breadcrumb";var Tm=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=ns();return jsxRuntime.jsx("ol",{ref:n,className:u(ew({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});Tm.displayName="BreadcrumbList";var Mm=W__namespace.forwardRef(({className:e,...t},n)=>{let{size:r}=ns();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})});Mm.displayName="BreadcrumbItem";var Nm=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Nm.displayName="BreadcrumbLink";var km=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}));km.displayName="BreadcrumbPage";var Pm=({children:e,className:t,...n})=>{let{size:r}=ns();return jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:u(tw({size:r}),"text-muted-foreground/60",t),...n,children:e??jsxRuntime.jsx(lucideReact.ChevronRight,{})})};Pm.displayName="BreadcrumbSeparator";var Em=({className:e,...t})=>{let{size:n}=ns();return jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:u(nw({size:n}),e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]})};Em.displayName="BreadcrumbEllipsis";var Dm=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})}));Dm.displayName="AspectRatio";var Vm=W__namespace.createContext(null),ji=()=>{let e=W__namespace.useContext(Vm);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},Am=W__namespace.createContext(null),zm=()=>{let e=W__namespace.useContext(Am);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},Om=W__namespace.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(Vm.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(Yi,{})]})})});Om.displayName="NavigationMenu";var Bm=W__namespace.forwardRef(({className:e,...t},n)=>{let{orientation:r}=ji();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})});Bm.displayName="NavigationMenuList";var Fm=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=ji(),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(Am.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsxRuntime.jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});Fm.displayName="NavigationMenuItem";var Km=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"),Gm=W__namespace.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=zm(),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(Km(),"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"})]})});Gm.displayName="NavigationMenuTrigger";var $m=W__namespace.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=zm(),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?ja__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});$m.displayName="NavigationMenuContent";var Um=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"),Wm=W__namespace.forwardRef(({className:e,active:t,...n},r)=>jsxRuntime.jsx("a",{ref:r,className:u(Um(),t&&"bg-accent text-accent-foreground",e),...n}));Wm.displayName="NavigationMenuLink";var Yi=W__namespace.forwardRef((e,t)=>null);Yi.displayName="NavigationMenuViewport";var _m=W__namespace.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=ji();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});_m.displayName="NavigationMenuIndicator";var qm=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full 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:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",light:"hover:bg-muted/50",bordered:"border border-current hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),_o=W__namespace.forwardRef(({className:e,variant:t,size:n,iconSize:r,...o},a)=>{let i=r??{sm:14,md:16,lg:20}[n??"md"];return jsxRuntime.jsx("button",{ref:a,type:"button",className:u(qm({variant:t,size:n}),e),"aria-label":"Close",...o,children:jsxRuntime.jsx(lucideReact.X,{style:{width:i,height:i}})})});_o.displayName="CloseButton";var rs=W__namespace.createContext(null);function pw(){let e=W__namespace.useContext(rs);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Zn(){return W__namespace.useContext(rs)}var fw="16rem",gw="18rem",bw="3rem",vw="b",hw={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},xw={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Xi=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",b=h==="overlay",[v,y]=W__namespace.useState(false),[R,w]=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=()=>{y(window.innerWidth<768);};return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);let k=W__namespace.useCallback(()=>b?T(E=>!E):v?w(E=>!E):T(E=>!E),[v,T,w,b]);W__namespace.useEffect(()=>{if(b)return;let E=D=>{D.key===vw&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),k());};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[k,b]);let M=N?"expanded":"collapsed",P=W__namespace.useMemo(()=>({placement:r,state:M,open:N,setOpen:T,isMobile:v,openMobile:R,setOpenMobile:w,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,M,N,T,v,R,w,k,l,h,o,a,s,i]);return b?jsxRuntime.jsx(rs.Provider,{value:P,children:jsxRuntime.jsx(vaul.Drawer.Root,{open:N,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsxRuntime.jsx(rs.Provider,{value:P,children:jsxRuntime.jsx(_n,{delayDuration:0,children:jsxRuntime.jsx("div",{ref:g,style:{"--drawer-width":fw,"--drawer-width-icon":bw,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Xi.displayName="Drawer";var Qm=W__namespace.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=Zn();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(yw,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=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":b&&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})})]})});Qm.displayName="DrawerSidebar";var yw=({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 dt(),()=>ut()},[t]),!o||!t?null:ja__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":gw},children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Jm=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Zn();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"})]})});Jm.displayName="DrawerTrigger";var ep=W__namespace.forwardRef(({className:e,children:t,...n},r)=>{let o=Zn(),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?hw[i]:xw[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(_o,{variant:"light",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})});ep.displayName="DrawerContent";var tp=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}));tp.displayName="DrawerHeader";var np=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}));np.displayName="DrawerBody";var rp=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}));rp.displayName="DrawerFooter";var op=W__namespace.forwardRef(({className:e,...t},n)=>Zn()?.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}));op.displayName="DrawerTitle";var ap=W__namespace.forwardRef(({className:e,...t},n)=>Zn()?.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}));ap.displayName="DrawerDescription";var sp=W__namespace.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Zn();return o?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Close,{ref:r,className:e,onClick:t,...n}):jsxRuntime.jsx(_o,{ref:r,variant:"light",className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...n})});sp.displayName="DrawerClose";var ip=W__namespace.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=Zn();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"})]})});ip.displayName="DrawerToggle";var lp=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}));lp.displayName="DrawerSeparator";var cp=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}));cp.displayName="DrawerMenu";var dp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));dp.displayName="DrawerMenuItem";var up=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"}}),mp=W__namespace.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=Zn(),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(up({variant:t,size:n}),o),...s,children:a});return r?jsxRuntime.jsxs(jn,{children:[jsxRuntime.jsx(Yn,{children:m}),jsxRuntime.jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});mp.displayName="DrawerMenuButton";var pp=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}));pp.displayName="DrawerGroup";var fp=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}));fp.displayName="DrawerGroupLabel";var gp=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}));gp.displayName="DrawerInset";var Rw=Xi;var vp=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})}));vp.displayName="Table";var hp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));hp.displayName="TableHeader";var xp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));xp.displayName="TableBody";var yp=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}));yp.displayName="TableFooter";var Rp=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}));Rp.displayName="TableRow";var wp=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}));wp.displayName="TableHead";var Cp=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}));Cp.displayName="TableCell";var Tp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));Tp.displayName="TableCaption";function kw({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(w,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:b=false,hoverable:v=true,...y},R){let[w,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??w,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,_)=>{let A=G.accessor(O),j=G.accessor(_);if(A===j)return 0;if(A==null)return 1;if(j==null)return -1;let ie=String(A).localeCompare(String(j),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((_,A)=>s(_,A)));D(O);}else D(new Set);},I=(G,O)=>{let _=new Set(M);O?_.add(G):_.delete(G),D(_);},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 _="asc";P.columnId===G&&(P.direction==="asc"?_="desc":P.direction==="desc"&&(_=null)),H({columnId:_?G:null,direction:_});},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:R,className:u("w-full",e),...y,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(Ko,{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 _=s(G,O),A=M.has(_);return jsxRuntime.jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&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(Ko,{checked:A,onCheckedChange:j=>I(_,!!j),"aria-label":`Select row ${O+1}`})}),n.map(j=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:j.cell?j.cell(G,O):j.accessor(G)},j.id))]},_)})})]})}),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 Pw=W__namespace.forwardRef(kw);var qi=["January","February","March","April","May","June","July","August","September","October","November","December"];function Vw({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(hn,{children:[jsxRuntime.jsx(xn,{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:qi[o]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),jsxRuntime.jsx(yn,{className:"min-w-[140px] p-0",children:jsxRuntime.jsx(ze,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:qi.map((c,d)=>jsxRuntime.jsx($t,{onSelect:()=>s(d),className:u(o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxRuntime.jsxs(hn,{children:[jsxRuntime.jsx(xn,{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(yn,{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($t,{onSelect:()=>i(c),className:u(a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function Aw(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(Vw,{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=qi[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(()=>Aw(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 Pp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});Pp.displayName="Pagination";var Ep=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));Ep.displayName="PaginationContent";var Lp=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,className:u("",e),...t}));Lp.displayName="PaginationItem";var os=({className:e,isActive:t,size:n="icon",...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:u(bn({variant:t?"solid":"light",size:n}),e),...r});os.displayName="PaginationLink";var Sp=({className:e,...t})=>jsxRuntime.jsxs(os,{"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"})]});Sp.displayName="PaginationPrevious";var Dp=({className:e,...t})=>jsxRuntime.jsxs(os,{"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"})]});Dp.displayName="PaginationNext";var Hp=({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"})]});Hp.displayName="PaginationEllipsis";var el=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}));el.displayName=cmdk.Command.displayName;var Kw=({children:e,...t})=>jsxRuntime.jsx(Va,{...t,children:jsxRuntime.jsx(Aa,{className:"overflow-hidden p-0 shadow-lg",children:jsxRuntime.jsx(el,{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})})}),Ip=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})]}));Ip.displayName=cmdk.Command.Input.displayName;var Vp=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}));Vp.displayName=cmdk.Command.List.displayName;var Ap=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ap.displayName=cmdk.Command.Empty.displayName;var zp=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}));zp.displayName=cmdk.Command.Group.displayName;var Op=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Op.displayName=cmdk.Command.Separator.displayName;var Bp=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}));Bp.displayName=cmdk.Command.Item.displayName;var Fp=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Fp.displayName="CommandShortcut";var Kp=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"})})]})});Kp.displayName="PasswordInput";var Gp=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,b=h?a:m,v=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},y=()=>{v((b??0)+n);},R=()=>{v((b??0)-n);},w=T=>{let k=T.target.value;if(k==="")v(void 0);else {let M=parseFloat(k);isNaN(M)||v(M);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),y()):T.key==="ArrowDown"&&(T.preventDefault(),R());},x=r===void 0||(b??0)>r,N=o===void 0||(b??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:R,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:b??"",onChange:w,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:y,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:b??"",onChange:w,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Gp.displayName="NumberInput";var Up=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,b=v=>{g||p(v),n?.(v),m(false);};return jsxRuntime.jsxs(nt,{open:d,onOpenChange:m,children:[jsxRuntime.jsxs(Lt,{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(rt,{className:"w-auto p-0",align:"start",children:jsxRuntime.jsx(so,{mode:"single",selected:h,onSelect:b,disabled:v=>!!(s&&v<s||i&&v>i),initialFocus:true})})]})});Up.displayName="DatePicker";var Yp=classVarianceAuthority.cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Wp=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"}}),Xp=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(Tr,{className:u(Wp({size:r})),children:[m.src&&jsxRuntime.jsx(no,{src:m.src,alt:m.alt||""}),jsxRuntime.jsx(Mr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxRuntime.jsxs(jn,{children:[jsxRuntime.jsx(Yn,{children:p}),jsxRuntime.jsx(Xn,{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(Yp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsxRuntime.jsx(Tr,{className:u(Wp({size:r})),children:jsxRuntime.jsxs(Mr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsxRuntime.jsx(_n,{delayDuration:300,children:d}):d});Xp.displayName="AvatarGroup";var qp=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"}}),Zp=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),[b,v]=W__namespace.useState(null),y=t!==void 0,R=y?t:g,w=b!==null?b:R,C=D=>{l||c||(y||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;v(S?H+.5:H+1);},T=()=>{v(null);},k=s==="heart"?lucideReact.Heart:lucideReact.Star,M=D=>w>=D+1?"full":w>=D+.5?"half":"empty",P=d?{color:d,fill:d}:{},E=m?{color:m}:{};return jsxRuntime.jsx("div",{ref:p,className:u(qp({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":R===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)})})});Zp.displayName="Rating";var ef=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}}),nC=classVarianceAuthority.cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10 cursor-pointer",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),tf=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,avatar:m,children:f,onClick:p,...g},h)=>{let b=a||!!p,v=y=>{y.stopPropagation(),c?.();};return jsxRuntime.jsxs("div",{ref:h,role:b?"button":void 0,tabIndex:b&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:p,onKeyDown:b&&!d?y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p?.(y));}:void 0,className:u(ef({variant:t,color:n,size:r,radius:o,clickable:b}),d&&"opacity-50 cursor-not-allowed",e),...g,children:[m&&jsxRuntime.jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:m}),s&&jsxRuntime.jsx("span",{className:"shrink-0",children:s}),jsxRuntime.jsx("span",{className:"truncate",children:f}),i&&jsxRuntime.jsx("span",{className:"shrink-0",children:i}),l&&jsxRuntime.jsx("button",{type:"button","aria-label":"Remove",onClick:v,disabled:d,className:u(nC({size:r})),children:jsxRuntime.jsx(lucideReact.X,{})})]})});tf.displayName="Chip";var nf=W.createContext({direction:"horizontal"}),dC=({className:e,direction:t="horizontal",children:n,...r})=>jsxRuntime.jsx(nf.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})}),uC=reactResizablePanels.Panel,mC=({withHandle:e,className:t,...n})=>{let{direction:r}=W.useContext(nf),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 sf=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"}}),fC={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"}},rf={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)"},lf=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=fC[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(sf({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:rf[n]||rf.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)})]})});lf.displayName="CircularProgress";var cf=W__namespace.createContext(null),vC=()=>{let e=W__namespace.useContext(cf);if(!e)throw new Error("OTP components must be used within InputOTP");return e},df=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"}}),uf=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,b]=W__namespace.useState(0),[v,y]=W__namespace.useState(false),R=W__namespace.useRef(null),w=r!==void 0?r:p;W__namespace.useImperativeHandle(f,()=>R.current),W__namespace.useEffect(()=>{b(Math.min(w.length,n-1));},[w,n]),W__namespace.useEffect(()=>{w.length===n&&s&&s(w);},[w,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"?b(E=>Math.max(0,E-1)):P.key==="ArrowRight"&&b(E=>Math.min(w.length,n-1,E+1));},N=()=>{R.current?.focus();},T=()=>{y(true),b(Math.min(w.length,n-1));},k=()=>{y(false);},M={value:w,activeIndex:v?h:-1,maxLength:n,disabled:l};return jsxRuntime.jsx(cf.Provider,{value:M,children:jsxRuntime.jsxs("div",{className:u(df({size:c}),t),onClick:N,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:R,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:w,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]})})});uf.displayName="InputOTP";var mf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex items-center",e),...t}));mf.displayName="InputOTPGroup";var pf=W__namespace.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=vC(),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"})})]})});pf.displayName="InputOTPSlot";var ff=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"})}));ff.displayName="InputOTPSeparator";var vf=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"}}),hf=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[b,v]=W__namespace.useState(""),y=W__namespace.useRef(null);W__namespace.useImperativeHandle(h,()=>y.current);let R=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]),v("");},w=M=>{m||f||o?.(r.filter(P=>P.id!==M));},C=M=>{if(c.includes(M.key)){if(M.key==="Tab"&&!b)return;M.preventDefault(),R(b);}M.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},x=M=>{let P=M.target.value;if(P.includes(",")){P.split(",").forEach(D=>{D.trim()&&R(D);});return}v(P);},N=M=>{M.preventDefault(),M.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(D=>{R(D);});},T=()=>{y.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,()=>w(M.id)):jsxRuntime.jsxs("span",{className:u(vf({variant:t,size:n})),children:[M.text,!m&&!f&&jsxRuntime.jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),w(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:y,type:"text",value:b,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})]})});hf.displayName="TagInput";var yf=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"}}),Rf=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(yf({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]}));Rf.displayName="EmptyState";var Cf=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"}}),Tf=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(Cf({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})]})});Tf.displayName="StatCard";var al=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"}}),PC=({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 EC({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:b=[],onCheck:v,children:y,...R},w){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(b)),L=h!==void 0,S=L?new Set(h):D,V=(O,_)=>{x(_),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(_));},z=(O,_)=>{O.preventDefault(),!(C===null||C===_)&&T(_);},F=()=>{T(null);},I=(O,_)=>{if(O.preventDefault(),!r||C===null||C===_){x(null),T(null);return}let A=[...r],[j]=A.splice(C,1);A.splice(_,0,j),s?.(A),x(null),T(null);},K=()=>{x(null),T(null);},B=W__namespace.useCallback((O,_)=>{if(!r)return;let A=new Set(E),j=!A.has(O.id);d?j?A.add(O.id):A.delete(O.id):(A.clear(),j&&A.add(O.id)),P||M(A);let ie=r.filter(Te=>A.has(Te.id));p?.(Array.from(A),{selected:j,selectedItems:ie,item:O,event:_});},[r,E,d,P,p]),q=W__namespace.useCallback((O,_)=>{if(!r)return;let A=new Set(S),j=!A.has(O.id);j?A.add(O.id):A.delete(O.id),L||H(A);let ie=r.filter(Te=>A.has(Te.id));v?.(Array.from(A),{checked:j,checkedItems:ie,item:O,event:_});},[r,S,L,v]);return (a||c||g)&&r&&o?jsxRuntime.jsx("div",{ref:w,role:"list",className:u(al({variant:t,size:n,className:e})),...R,children:r.map((O,_)=>{let A=E.has(O.id),j=S.has(O.id);return jsxRuntime.jsxs("div",{role:"listitem","aria-selected":c?A:void 0,draggable:a,onDragStart:a?U=>V(U,_):void 0,onDragOver:a?U=>z(U,_):void 0,onDragLeave:a?F:void 0,onDrop:a?U=>I(U,_):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===_&&"opacity-50 scale-[1.02] z-10",N===_&&"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(PC,{checked:j,onClick:U=>q(O,U)}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o(O,_)})]},O.id)})}):jsxRuntime.jsx("div",{ref:w,role:"list",className:u(al({variant:t,size:n,className:e})),...R,children:y})}var LC=W__namespace.forwardRef(EC),Nf=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),kf=W__namespace.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:u(Nf({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})]}));kf.displayName="ListItem";var Pf=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]}));Pf.displayName="ListItemText";var Sf=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Df=W__namespace.forwardRef(({className:e,position:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,"data-position":t,className:u(Sf({position:t,className:e})),...n}));Df.displayName="Timeline";var Hf=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"}}),If=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(Hf({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]}));If.displayName="TimelineItem";var Vf=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));Vf.displayName="TimelineContent";var Af=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}));Af.displayName="TimelineOpposite";var Of=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}}),Bf=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}}),Ff=W__namespace.createContext({}),Kf=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(Ff.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsxRuntime.jsx("div",{ref:c,role:"group",className:u(Of({size:t,fullWidth:n,className:e})),...l,children:r})})});Kf.displayName="SegmentedControl";var Gf=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=W__namespace.useContext(Ff),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(Bf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Gf.displayName="SegmentedControlItem";var $f=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"}}),Uf=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},cs=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]},Wf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${cs(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,b]=W__namespace.useState(false),[v,y]=W__namespace.useState(false),[R,w]=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=Wf(K,c,d);B.length>0?F.push({file:K,errors:B}):z.push(K);}),w(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&&(b(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});y(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)&&(b(false),y(false));},[]),M=W__namespace.useCallback(S=>{S.preventDefault(),S.stopPropagation(),b(false),y(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=v?"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($f({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 ${cs(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),R.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:R.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=Uf(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:[cs(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(es,{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 FC=`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")`,Yf=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}}),ta=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(Yf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-ring ring-offset-2",i),style:{backgroundImage:n?FC: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}})}));ta.displayName="ColorSwatch";var Xf=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,b=W__namespace.useCallback(y=>{l||(e===void 0&&g(y),n?.(y));},[e,n,l]),v=y=>y.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:u(Xf({layout:r}),c),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...d},...m,children:a.map(y=>{let R=h?v(h)===v(y):false;return jsxRuntime.jsx(ta,{role:"option",color:y,size:s,shape:i,isSelected:R,onSelect:b,disabled:l,"aria-selected":R},y)})})});qf.displayName="ColorSwatchPicker";var $C=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Zf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Qf=W__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=$C,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=b=>{m(b),n?.(b);},g=b=>{m(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),n?.(v);};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",Zf[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(nt,{children:[jsxRuntime.jsx(Lt,{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",Zf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsxRuntime.jsx(rt,{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(Cr,{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(Cr,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsxRuntime.jsx(ta,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Qf.displayName="ColorPicker";var Jf=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"}}),ll=e=>String(e).padStart(2,"0"),YC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},XC=(e,t)=>`${ll(e)}:${ll(t)}`,eg=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:b,minutes:v}=YC(f||"00:00"),y=k=>{let M=k.target.value;p(M),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(M)&&r?.(M);},R=(k,M)=>{let P=Math.max(0,Math.min(23,k)),E=Math.max(0,Math.min(59,M)),D=XC(P,E);p(D),r?.(D);},w=()=>R(b+1,v),C=()=>R(b-1,v),x=()=>R(b,v+a),N=()=>R(b,v-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:ll(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:y,disabled:c,className:u(Jf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxRuntime.jsxs(nt,{open:g,onOpenChange:h,children:[jsxRuntime.jsxs(Lt,{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(rt,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{value:b,onIncrement:w,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(T,{value:v,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;R(k.getHours(),k.getMinutes());},children:"Now"}),jsxRuntime.jsx(oe,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});eg.displayName="TimeInput";var tg=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"}}),ZC=(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}},cl=(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},ng=(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},rg=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:b,...v},y)=>{let[R,w]=W__namespace.useState(r),[C,x]=W__namespace.useState(""),[N,T]=W__namespace.useState(false),k=n!==void 0?n:R,M=f??ZC(a,s);W__namespace.useEffect(()=>{!N&&k!==void 0&&x(cl(k,i,p,g));},[k,i,p,g,N]);let P=S=>{let V=S.target.value;if(!V){x(""),n===void 0&&w(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;x(V);let F=ng(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&&w(I),o?.(I);}},E=()=>{T(true),k!==void 0&&x(k.toString().replace(".",g));},D=()=>{T(false),x(k!==void 0?cl(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:y,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:E,onBlur:D,disabled:h,placeholder:b??`0${g}${"0".repeat(i)}`,className:u(tg({size:t}),H&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:N?"var(--color-foreground)":void 0},...v}),L&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});rg.displayName="CurrencyInput";var og=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"}}),dl={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:"#####-####"}},eT=(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}},nr=e=>["#","A","*"].includes(e),us=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(nr(s)){if(o<e.length){let i=e[o];eT(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},ul=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];nr(o)&&(n+=e[r]);}return n},ag=(e,t)=>e.split("").map(n=>nr(n)?t:n).join(""),tT=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)nr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,nr(t[i])&&s++;for(;a<t.length&&!nr(t[a]);)a++;return Math.min(a,e.length)},sg=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 dl?dl[a].mask:a,[g,h]=W__namespace.useState(r),[b,v]=W__namespace.useState(""),[y,R]=W__namespace.useState(false),w=W__namespace.useRef(null),C=n!==void 0?n:g;W__namespace.useImperativeHandle(f,()=>w.current),W__namespace.useEffect(()=>{let k=us(C,p,true);v(k);},[C,p]);let x=k=>{let M=k.target.value,P=k.target.selectionStart??0,E=M.replace(/[^\w]/g,""),D=us(E,p,true),H=ul(D,p);v(D),n===void 0&&h(l?D:H),o?.(H,D),requestAnimationFrame(()=>{if(w.current){let L=tT(D,p,P);w.current.setSelectionRange(L,L);}});},N=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let M=w.current;if(!M)return;let P=M.selectionStart??0;if(k.key==="Backspace"&&P>0){let E=P-1;for(;E>0&&!nr(p[E]);)E--;let D=ul(b,p),H=0;for(let V=0;V<E&&V<p.length;V++)nr(p[V])&&H++;let L=D.slice(0,Math.max(0,H-1))+D.slice(H),S=us(L,p,true);v(S),n===void 0&&h(l?S:L),o?.(L,S),k.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(E,E);});}},T=i?ag(p,s):d;return jsxRuntime.jsx("input",{ref:w,type:"text",value:b,onChange:x,onKeyDown:N,onFocus:()=>R(true),onBlur:()=>R(false),disabled:c,placeholder:T,className:u(og({size:t}),e),style:{borderColor:y?"var(--color-foreground)":void 0},...m})});sg.displayName="MaskedInput";var ig=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"}}),fs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},pl={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},ml=(e,t)=>String(e).padStart(t,"0"),ps=(e,t)=>{let n=ml(e.getDate(),2),r=ml(e.getMonth()+1,2),o=ml(e.getFullYear(),4),a=fs[t],s=pl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},lg=(e,t)=>{let n=fs[t],r=e.split(n);if(r.length!==3)return null;let o=pl[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},aT=e=>e.toLowerCase(),sT=e=>{let t=fs[e];return pl[e].map(r=>r==="year"?"####":"##").join(t)},cg=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,b]=W__namespace.useState(""),[v,y]=W__namespace.useState(null),R=W__namespace.useRef(null),w=n!==void 0?n:p;W__namespace.useImperativeHandle(f,()=>R.current),W__namespace.useEffect(()=>{w?(b(ps(w,a)),y(null)):b("");},[w,a]);let C=fs[a],x=sT(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(b(D),D.length===x.length){let L=lg(D,a);if(L){if(s&&L<s){y(`Date must be after ${ps(s,a)}`);return}if(i&&L>i){y(`Date must be before ${ps(i,a)}`);return}y(null),n===void 0&&g(L),o?.(L);}else y("Invalid date");}else n===void 0&&g(null),o?.(null),y(null);},T=()=>{h&&h.length!==x.length&&(b(""),y(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:R,type:"text",inputMode:"numeric",value:h,onChange:N,onBlur:T,disabled:c,placeholder:d??aT(a),className:u(ig({size:t}),l&&"pr-10",v&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!v,"aria-describedby":v?"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")})}),v&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});cg.displayName="DateInput";var ug=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"}}),mg=[{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:"(###) ###-####"}],gs=(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},uT=e=>e.replace(/#/g,"_"),pg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=mg,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,...p},g)=>{let[h,b]=W__namespace.useState(r),[v,y]=W__namespace.useState(a??s),[R,w]=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??v,L=l.find(I=>I.code===H)??l[0],S=gs(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&&b(B);let q=gs(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&&y(I),i?.(K);let B=gs(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&&ja__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:()=>w(true),onBlur:()=>w(false),disabled:m,placeholder:f??uT(L.format),className:u(ug({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:R?"var(--color-foreground)":void 0},...p})]})]})});pg.displayName="PhoneInput";var gg=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}}),bg=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(gg({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})]})});bg.displayName="Navbar";var vg=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}));vg.displayName="NavbarBrand";var hg=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})});hg.displayName="NavbarContent";var xg=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}));xg.displayName="NavbarItem";var yg=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}));yg.displayName="NavbarLink";var wg=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"}}),Cg=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(wg({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"})]})});Cg.displayName="Link";var Tg=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"}}),Mg=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 y=c?.current||window,R=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return y.addEventListener("scroll",R,{passive:true}),R(),()=>{y.removeEventListener("scroll",R);}},[n,c,g,d]);let b=y=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(y);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:u(Tg({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:b,"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:v})})})});Mg.displayName="BackTop";var MT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),NT=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),Ng=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),hs=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),kg=W__namespace.createContext(null),or=()=>{let e=W__namespace.useContext(kg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},Pg=W__namespace.createContext(null),ra=()=>{let e=W__namespace.useContext(Pg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},gl=W__namespace.createContext(null),Eg=W__namespace.createContext(null),Lg=W__namespace.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=W__namespace.useState(null);return jsxRuntime.jsx(kg.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",MT({radius:n}),e),...r,children:t})})});Lg.displayName="Menubar";var Sg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=or(),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(Pg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};Sg.displayName="MenubarMenu";var Dg=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,role:"group",className:e,...t}));Dg.displayName="MenubarGroup";var Hg=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?ja__namespace.createPortal(e,t||document.body):null};Hg.displayName="MenubarPortal";var Ig=({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(gl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ig.displayName="MenubarSub";var Vg=W__namespace.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsxRuntime.jsx(Eg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:o,role:"group",className:n,...r})}));Vg.displayName="MenubarRadioGroup";var Ag=W__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=or(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=ra(),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",NT({radius:i}),e),onClick:f,onMouseEnter:p,...r})});Ag.displayName="MenubarTrigger";var zg=W__namespace.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=or(),l=W__namespace.useContext(gl);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",hs({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});zg.displayName="MenubarSubTrigger";var Og=W__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=or(),i=W__namespace.useContext(gl);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 R=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=R.top,x=R.right+t;x+w.width>window.innerWidth&&(x=R.left-w.width-t),f({top:C,left:x});})();},[l,t,d]);let b=y=>{n?.(y),c(true);},v=y=>{r?.(y),c(false);};return !p||!l?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:y=>{h.current=y,typeof a=="function"?a(y):a&&(a.current=y);},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",Ng({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});Og.displayName="MenubarSubContent";var Bg=W__namespace.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=or(),{triggerRef:l,open:c,onOpenChange:d}=ra(),[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 b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),R=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-y.width/2:t==="end"&&(w=v.right-y.width-n),f({top:R,left:w});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,n,r,l]),W__namespace.useEffect(()=>{if(!c)return;let b=v=>{let y=v.target;h.current&&!h.current.contains(y)&&l.current&&!l.current.contains(y)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),W__namespace.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:ja__namespace.createPortal(jsxRuntime.jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},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",Ng({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});Bg.displayName="MenubarContent";var Fg=W__namespace.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=or(),{onOpenChange:l}=ra(),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",hs({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Fg.displayName="MenubarItem";var Kg=W__namespace.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=or(),{onOpenChange:c}=ra(),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",hs({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]})});Kg.displayName="MenubarCheckboxItem";var Gg=W__namespace.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=or(),{onOpenChange:l}=ra(),c=W__namespace.useContext(Eg),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",hs({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]})});Gg.displayName="MenubarRadioItem";var $g=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}));$g.displayName="MenubarLabel";var Ug=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}));Ug.displayName="MenubarSeparator";var Wg=({className:e,...t})=>jsxRuntime.jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Wg.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"}}),jg=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)})});jg.displayName="Steps";var Yg=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"}}),PT=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"}}),ET=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"}}),Xg=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(Yg({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(PT({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(ET({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Xg.displayName="Step";var Zg=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"}}),Qg=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}}),Jg=W__namespace.createContext(null),zT=()=>{let e=W__namespace.useContext(Jg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},OT=({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"})})}),eb=({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:b,dragOverPosition:v,setDragOver:y,handleDrop:R,allowDrop:w,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}=zT(),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),_=d.has(e.key),A=g?.key===e.key,j=b===e.key,ie=!!(F||e.disabled),Te=l&&e.selectable!==false,U=f&&e.checkable!==false,ct=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]),tt=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]),Kn=Y=>{if(!ct)return;Y.stopPropagation(),Y.dataTransfer.effectAllowed="move";let Se=Y.currentTarget,ce=Se.cloneNode(true),Ge=document.documentElement.classList.contains("dark"),$e=Ge?"#0a0a0a":"#ffffff",$n=Ge?"#27272a":"#e4e4e7";ce.style.cssText=`
|
|
44
44
|
position: fixed;
|
|
45
45
|
top: -9999px;
|
|
46
46
|
left: -9999px;
|