@reeverdev/ui 0.2.186 → 0.2.187
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 +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as X from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,Calendar,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Ba from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import AM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import jM from'@tiptap/starter-kit';import WM from'@tiptap/extension-link';import _M from'@tiptap/extension-underline';import YM from'@tiptap/extension-text-align';import XM from'@tiptap/extension-placeholder';import bN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import TN from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import Lo from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var Ky=cva("relative w-full p-4",{variants:{variant:{solid:"border",bordered:"border bg-transparent",flat:""},type:{default:"",success:"",warning:"",error:""},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",type:"default",className:"!border-primary bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"bordered",type:"default",className:"!border-primary text-primary [&>svg]:text-primary"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"!border-green-600 bg-green-600 text-white dark:!border-green-500 dark:bg-green-500 [&>svg]:text-white"},{variant:"bordered",type:"success",className:"!border-green-600 text-green-600 dark:!border-green-500 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"!border-amber-600 bg-amber-600 text-white dark:!border-amber-500 dark:bg-amber-500 [&>svg]:text-white"},{variant:"bordered",type:"warning",className:"!border-amber-600 text-amber-600 dark:!border-amber-500 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"!border-red-600 bg-red-600 text-white dark:!border-red-500 dark:bg-red-500 [&>svg]:text-white"},{variant:"bordered",type:"error",className:"!border-red-600 text-red-600 dark:!border-red-500 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",radius:"md"}}),$y={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Gy=X.forwardRef(({className:e,variant:t="solid",type:n="default",radius:r="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=$y[n],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u(Ky({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});Gy.displayName="Alert";var Uy=X.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));Uy.displayName="AlertTitle";var jy=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("text-sm [&_p]:leading-relaxed",e),...t}));jy.displayName="AlertDescription";var Wy=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),_y={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},Yy={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},Xy=X.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,showPing:l=false,...c},d)=>jsxs("div",{ref:d,className:u("relative inline-flex",e),...c,children:[t,jsxs("span",{className:u(Wy({variant:r,color:o,size:i?void 0:a,placement:s}),i&&_y[a||"md"],i&&"min-w-0 p-0"),children:[l&&jsx("span",{className:u("absolute inset-0 rounded-full animate-ping opacity-75",Yy[o||"default"])}),!i&&n]})]}));Xy.displayName="Badge";var qy=cva("inline-flex items-center gap-1 font-medium rounded-full",{variants:{color:{default:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white",success:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500",warning:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500",danger:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500",info:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},size:{sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-0.5 text-xs",lg:"px-3 py-1 text-sm"}},defaultVariants:{color:"default",size:"md"}}),Zy=X.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:u(qy({color:t,size:n}),e),...r}));Zy.displayName="TextBadge";var qc=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),Jy={sm:"text-xs",md:"text-sm",lg:"text-base"},Na=X.forwardRef(({className:e,size:t="md",color:n,label:r="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(qc({size:t,color:s?void 0:n})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":r,children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",Jy[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Na.displayName="Spinner";var Qc=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),Jc=X.createContext({});function vi(){return X.useContext(Jc)}var ed=X.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(Jc.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(Qc({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));ed.displayName="ButtonGroup";var Xr=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out 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 active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"border-zinc-300 dark:border-zinc-700 text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"border-green-600 dark:border-green-500 text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white hover:border-green-600 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white dark:hover:border-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"border-amber-600 dark:border-amber-500 text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white hover:border-amber-600 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white dark:hover:border-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"border-red-600 dark:border-red-500 text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white hover:border-red-600 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white dark:hover:border-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"border-blue-600 dark:border-blue-500 text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white hover:border-blue-600 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:hover:border-blue-500"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=vi(),b=d||h.disabled||s,v=m,x=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",w=s?jsxs(Fragment,{children:[jsx(Na,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(Xr({variant:t,color:n,size:r,radius:o,className:e}),x,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:a,className:u(Xr({variant:t,color:n,size:r,radius:o,className:e}),x),style:v,...p,children:w}):jsx("button",{type:"button",className:u(Xr({variant:t,color:n,size:r,radius:o,className:e}),x),ref:g,disabled:b,style:v,...p,children:w})});ae.displayName="Button";var od=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"lg"}}),ad=X.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:u(od({radius:t,className:e})),...n}));ad.displayName="Card";var sd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex flex-col space-y-1.5 p-6",e),...t}));sd.displayName="CardHeader";var id=X.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));id.displayName="CardTitle";var ld=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));ld.displayName="CardDescription";var cd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("p-6 pt-0",e),...t}));cd.displayName="CardContent";var dd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center p-6 pt-0",e),...t}));dd.displayName="CardFooter";var zo=X.forwardRef(({className:e,checked:t,defaultChecked:n=false,onCheckedChange:r,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,[v,x]=X.useState(false),y=X.useId(),w=()=>{if(o)return;let k=b==="indeterminate"?true:!b;h||g(k),r?.(k);},C=k=>{k.key==="Enter"&&k.preventDefault(),d?.(k);},R=b===true,M=b==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?y:void 0,"aria-checked":M?"mixed":R,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",R&&"bg-primary text-primary-foreground",M&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:w,onKeyDown:C,onFocus:()=>x(true),onBlur:()=>x(false),...m,children:(R||M)&&jsx("span",{className:"flex items-center justify-center text-current",children:M?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:R,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[T,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:y,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):T});zo.displayName="Checkbox";var i0=cva("flex w-full border border-input bg-background px-3 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",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Pa=X.forwardRef(({className:e,type:t,size:n,radius:r,label:o,isRequired:a,description:s,errorMessage:i,isInvalid:l,onFocus:c,onBlur:d,style:m,...f},p)=>{let[g,h]=X.useState(false),b=X.useId(),v=f.id||b,x=l||!!i,y=jsx("input",{id:v,type:t,className:u(i0({size:n,radius:r}),x&&"border-danger focus:border-danger",!o&&e),ref:p,required:a,"aria-invalid":x,"aria-describedby":s||i?`${v}-description`:void 0,style:{...m,borderColor:x?void 0:g?"var(--color-foreground)":void 0},onFocus:w=>{h(true),c?.(w);},onBlur:w=>{h(false),d?.(w);},...f});return !o&&!s&&!i?y:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[o&&jsxs("label",{htmlFor:v,className:"text-sm font-medium leading-none",children:[o,a&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),y,(s||i)&&jsx("p",{id:`${v}-description`,className:u("text-xs",x?"text-danger":"text-muted-foreground"),children:i||s})]})});Pa.displayName="Input";var c0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wr=X.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:u(c0(),e),...t}));wr.displayName="Label";var jn=X.forwardRef(({className:e,orientation:t="horizontal",decorative:n=true,text:r,...o},a)=>{let s=n?{role:"none"}:{role:"separator","aria-orientation":t};return r&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:r}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});jn.displayName="Separator";var m0="peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",La={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},fd={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},gd=X.forwardRef(({className:e,color:t,size:n="md",customColor:r,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=X.useState(a),v=o!==void 0,x=v?o:h,y=()=>{if(i)return;let M=!x;v||b(M),s?.(M);},w=M=>{M.key==="Enter"&&M.preventDefault(),m?.(M);},C=t&&La[t]?La[t]:La.default,R=fd[n]||fd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":x,"aria-required":l,"data-state":x?"checked":"unchecked",disabled:i,ref:g,className:u(m0,R.track,x?r?"":C:"bg-input",e),style:r&&x?{backgroundColor:r,...f}:f,onClick:y,onKeyDown:w,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",R.thumb,x?R.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:x,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});gd.displayName="Switch";var b0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"md"}}),bd=X.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=X.useState(false);return jsx("textarea",{className:u(b0({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),n?.(c);},onBlur:c=>{l(false),r?.(c);},...a})});bd.displayName="Textarea";var hd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Ha=X.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:u(hd({variant:t,className:e})),...n}));Ha.displayName="Skeleton";var R0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),xd=X.createContext(null),yd=()=>{let e=X.useContext(xd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Cr=X.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=X.useState("idle");return jsx(xd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(R0({size:t,radius:n,className:e})),...r})})});Cr.displayName="Avatar";var Qr=X.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=yd();return X.useEffect(()=>{if(!t){i("error");return}i("loading"),r?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),r?.("loaded");},l.onerror=()=>{i("error"),r?.("error");};},[t,i,r]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:n,className:u("aspect-square h-full w-full object-cover",e),...o})});Qr.displayName="AvatarImage";var Tr=X.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=yd(),[s,i]=X.useState(t===0);return X.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Tr.displayName="AvatarFallback";var wd=X.createContext({delayDuration:700,skipDelayDuration:300}),Wn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(wd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});Wn.displayName="TooltipProvider";var Cd=X.createContext(null),Td=()=>{let e=X.useContext(Cd);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},_n=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=X.useContext(wd),[s,i]=X.useState(n),l=t!==void 0,c=l?t:s,d=X.useRef(null),m=X.useId(),f=X.useRef(null),p=o??a.delayDuration,g=X.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),r?.(true);},p):(l||i(false),r?.(false));},[l,r,p]);return X.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(Cd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};_n.displayName="Tooltip";var Yn=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Td();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{n?.(h),i(false);},onFocus:h=>{r?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});Yn.displayName="TooltipTrigger";var Xn=X.forwardRef(({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Td(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);if(X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),y=0,w=0;switch(t){case "top":y=v.top-x.height-n;break;case "bottom":y=v.bottom+n;break;case "left":w=v.left-x.width-n;break;case "right":w=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":w=v.left+o;break;case "center":w=v.left+v.width/2-x.width/2;break;case "end":w=v.right-x.width-o;break}else switch(r){case "start":y=v.top+o;break;case "center":y=v.top+v.height/2-x.height/2;break;case "end":y=v.bottom-x.height-o;break}f({top:y,left:w});},[l,t,n,r,o,c]),!p||!l)return null;let b={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 Ba.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Xn.displayName="TooltipContent";var w0={sm:"20px",md:"40px",lg:"60px"},ke=X.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",showShadow:r=false,shadowSize:o="md",children:a,style:s,...i},l)=>{let c=X.useRef(null),[d,m]=X.useState(false),[f,p]=X.useState({top:false,bottom:false,left:false,right:false}),g=X.useId().replace(/:/g,"");X.useImperativeHandle(l,()=>c.current);let h=X.useCallback(()=>{let C=c.current;if(!C||!r)return;let{scrollTop:R,scrollLeft:M,scrollHeight:T,scrollWidth:k,clientHeight:P,clientWidth:E}=C;p({top:R>0,bottom:R<T-P-1,left:M>0,right:M<k-E-1});},[r]);X.useEffect(()=>{if(!r)return;let C=c.current;if(C)return h(),C.addEventListener("scroll",h),window.addEventListener("resize",h),()=>{C.removeEventListener("scroll",h),window.removeEventListener("resize",h);}},[r,h]);let b=n==="visible"||n==="hover"&&d,v=b?"rgba(0,0,0,0.3)":"transparent",x=b?"rgba(255,255,255,0.3)":"transparent",y=`
|
|
1
|
+
import*as X from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,Calendar,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Ba from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import zM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import WM from'@tiptap/starter-kit';import _M from'@tiptap/extension-link';import YM from'@tiptap/extension-underline';import XM from'@tiptap/extension-text-align';import qM from'@tiptap/extension-placeholder';import vN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import MN from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import Lo from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var $y=cva("relative w-full p-4",{variants:{variant:{solid:"border",bordered:"border bg-transparent",flat:""},type:{default:"",success:"",warning:"",error:""},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",type:"default",className:"!border-primary bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"bordered",type:"default",className:"!border-primary text-primary [&>svg]:text-primary"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"!border-green-600 bg-green-600 text-white dark:!border-green-500 dark:bg-green-500 [&>svg]:text-white"},{variant:"bordered",type:"success",className:"!border-green-600 text-green-600 dark:!border-green-500 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"!border-amber-600 bg-amber-600 text-white dark:!border-amber-500 dark:bg-amber-500 [&>svg]:text-white"},{variant:"bordered",type:"warning",className:"!border-amber-600 text-amber-600 dark:!border-amber-500 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"!border-red-600 bg-red-600 text-white dark:!border-red-500 dark:bg-red-500 [&>svg]:text-white"},{variant:"bordered",type:"error",className:"!border-red-600 text-red-600 dark:!border-red-500 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",radius:"md"}}),Gy={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Uy=X.forwardRef(({className:e,variant:t="solid",type:n="default",radius:r="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=Gy[n],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u($y({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});Uy.displayName="Alert";var jy=X.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));jy.displayName="AlertTitle";var Wy=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("text-sm [&_p]:leading-relaxed",e),...t}));Wy.displayName="AlertDescription";var _y=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),Yy={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},Xy={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},qy=X.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,showPing:l=false,...c},d)=>jsxs("div",{ref:d,className:u("relative inline-flex",e),...c,children:[t,jsxs("span",{className:u(_y({variant:r,color:o,size:i?void 0:a,placement:s}),i&&Yy[a||"md"],i&&"min-w-0 p-0"),children:[l&&jsx("span",{className:u("absolute inset-0 rounded-full animate-ping opacity-75",Xy[o||"default"])}),!i&&n]})]}));qy.displayName="Badge";var Zy=cva("inline-flex items-center gap-1 font-medium rounded-full",{variants:{color:{default:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white",success:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500",warning:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500",danger:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500",info:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},size:{sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-0.5 text-xs",lg:"px-3 py-1 text-sm"}},defaultVariants:{color:"default",size:"md"}}),Qy=X.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:u(Zy({color:t,size:n}),e),...r}));Qy.displayName="TextBadge";var Zc=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),e0={sm:"text-xs",md:"text-sm",lg:"text-base"},Na=X.forwardRef(({className:e,size:t="md",color:n,label:r="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(Zc({size:t,color:s?void 0:n})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":r,children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",e0[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Na.displayName="Spinner";var Jc=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),ed=X.createContext({});function vi(){return X.useContext(ed)}var td=X.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(ed.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(Jc({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));td.displayName="ButtonGroup";var Xr=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out 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 active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"border-zinc-300 dark:border-zinc-700 text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"border-green-600 dark:border-green-500 text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white hover:border-green-600 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white dark:hover:border-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"border-amber-600 dark:border-amber-500 text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white hover:border-amber-600 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white dark:hover:border-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"border-red-600 dark:border-red-500 text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white hover:border-red-600 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white dark:hover:border-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"border-blue-600 dark:border-blue-500 text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white hover:border-blue-600 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:hover:border-blue-500"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=vi(),b=d||h.disabled||s,v=m,x=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",w=s?jsxs(Fragment,{children:[jsx(Na,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(Xr({variant:t,color:n,size:r,radius:o,className:e}),x,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:a,className:u(Xr({variant:t,color:n,size:r,radius:o,className:e}),x),style:v,...p,children:w}):jsx("button",{type:"button",className:u(Xr({variant:t,color:n,size:r,radius:o,className:e}),x),ref:g,disabled:b,style:v,...p,children:w})});ae.displayName="Button";var ad=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"lg"}}),sd=X.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:u(ad({radius:t,className:e})),...n}));sd.displayName="Card";var id=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex flex-col space-y-1.5 p-6",e),...t}));id.displayName="CardHeader";var ld=X.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));ld.displayName="CardTitle";var cd=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));cd.displayName="CardDescription";var dd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("p-6 pt-0",e),...t}));dd.displayName="CardContent";var ud=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center p-6 pt-0",e),...t}));ud.displayName="CardFooter";var zo=X.forwardRef(({className:e,checked:t,defaultChecked:n=false,onCheckedChange:r,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,[v,x]=X.useState(false),y=X.useId(),w=()=>{if(o)return;let k=b==="indeterminate"?true:!b;h||g(k),r?.(k);},C=k=>{k.key==="Enter"&&k.preventDefault(),d?.(k);},R=b===true,T=b==="indeterminate",M=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?y:void 0,"aria-checked":T?"mixed":R,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",R&&"bg-primary text-primary-foreground",T&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:w,onKeyDown:C,onFocus:()=>x(true),onBlur:()=>x(false),...m,children:(R||T)&&jsx("span",{className:"flex items-center justify-center text-current",children:T?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:R,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[M,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:y,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):M});zo.displayName="Checkbox";var l0=cva("flex w-full border border-input bg-background px-3 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",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Pa=X.forwardRef(({className:e,type:t,size:n,radius:r,label:o,isRequired:a,description:s,errorMessage:i,isInvalid:l,onFocus:c,onBlur:d,style:m,...f},p)=>{let[g,h]=X.useState(false),b=X.useId(),v=f.id||b,x=l||!!i,y=jsx("input",{id:v,type:t,className:u(l0({size:n,radius:r}),x&&"border-danger focus:border-danger",!o&&e),ref:p,required:a,"aria-invalid":x,"aria-describedby":s||i?`${v}-description`:void 0,style:{...m,borderColor:x?void 0:g?"var(--color-foreground)":void 0},onFocus:w=>{h(true),c?.(w);},onBlur:w=>{h(false),d?.(w);},...f});return !o&&!s&&!i?y:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[o&&jsxs("label",{htmlFor:v,className:"text-sm font-medium leading-none",children:[o,a&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),y,(s||i)&&jsx("p",{id:`${v}-description`,className:u("text-xs",x?"text-danger":"text-muted-foreground"),children:i||s})]})});Pa.displayName="Input";var d0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wr=X.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:u(d0(),e),...t}));wr.displayName="Label";var jn=X.forwardRef(({className:e,orientation:t="horizontal",decorative:n=true,text:r,...o},a)=>{let s=n?{role:"none"}:{role:"separator","aria-orientation":t};return r&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:r}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});jn.displayName="Separator";var p0="peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",La={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},gd={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},bd=X.forwardRef(({className:e,color:t,size:n="md",customColor:r,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=X.useState(a),v=o!==void 0,x=v?o:h,y=()=>{if(i)return;let T=!x;v||b(T),s?.(T);},w=T=>{T.key==="Enter"&&T.preventDefault(),m?.(T);},C=t&&La[t]?La[t]:La.default,R=gd[n]||gd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":x,"aria-required":l,"data-state":x?"checked":"unchecked",disabled:i,ref:g,className:u(p0,R.track,x?r?"":C:"bg-input",e),style:r&&x?{backgroundColor:r,...f}:f,onClick:y,onKeyDown:w,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",R.thumb,x?R.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:x,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});bd.displayName="Switch";var v0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"md"}}),vd=X.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=X.useState(false);return jsx("textarea",{className:u(v0({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),n?.(c);},onBlur:c=>{l(false),r?.(c);},...a})});vd.displayName="Textarea";var xd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Ha=X.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:u(xd({variant:t,className:e})),...n}));Ha.displayName="Skeleton";var w0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),yd=X.createContext(null),Rd=()=>{let e=X.useContext(yd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Cr=X.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=X.useState("idle");return jsx(yd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(w0({size:t,radius:n,className:e})),...r})})});Cr.displayName="Avatar";var Qr=X.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=Rd();return X.useEffect(()=>{if(!t){i("error");return}i("loading"),r?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),r?.("loaded");},l.onerror=()=>{i("error"),r?.("error");};},[t,i,r]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:n,className:u("aspect-square h-full w-full object-cover",e),...o})});Qr.displayName="AvatarImage";var Tr=X.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=Rd(),[s,i]=X.useState(t===0);return X.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Tr.displayName="AvatarFallback";var Cd=X.createContext({delayDuration:700,skipDelayDuration:300}),Wn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(Cd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});Wn.displayName="TooltipProvider";var Td=X.createContext(null),Md=()=>{let e=X.useContext(Td);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},_n=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=X.useContext(Cd),[s,i]=X.useState(n),l=t!==void 0,c=l?t:s,d=X.useRef(null),m=X.useId(),f=X.useRef(null),p=o??a.delayDuration,g=X.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),r?.(true);},p):(l||i(false),r?.(false));},[l,r,p]);return X.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(Td.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};_n.displayName="Tooltip";var Yn=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Md();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{n?.(h),i(false);},onFocus:h=>{r?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});Yn.displayName="TooltipTrigger";var Xn=X.forwardRef(({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Md(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);if(X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),y=0,w=0;switch(t){case "top":y=v.top-x.height-n;break;case "bottom":y=v.bottom+n;break;case "left":w=v.left-x.width-n;break;case "right":w=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":w=v.left+o;break;case "center":w=v.left+v.width/2-x.width/2;break;case "end":w=v.right-x.width-o;break}else switch(r){case "start":y=v.top+o;break;case "center":y=v.top+v.height/2-x.height/2;break;case "end":y=v.bottom-x.height-o;break}f({top:y,left:w});},[l,t,n,r,o,c]),!p||!l)return null;let b={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 Ba.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Xn.displayName="TooltipContent";var C0={sm:"20px",md:"40px",lg:"60px"},ke=X.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",showShadow:r=false,shadowSize:o="md",children:a,style:s,...i},l)=>{let c=X.useRef(null),[d,m]=X.useState(false),[f,p]=X.useState({top:false,bottom:false,left:false,right:false}),g=X.useId().replace(/:/g,"");X.useImperativeHandle(l,()=>c.current);let h=X.useCallback(()=>{let C=c.current;if(!C||!r)return;let{scrollTop:R,scrollLeft:T,scrollHeight:M,scrollWidth:k,clientHeight:P,clientWidth:E}=C;p({top:R>0,bottom:R<M-P-1,left:T>0,right:T<k-E-1});},[r]);X.useEffect(()=>{if(!r)return;let C=c.current;if(C)return h(),C.addEventListener("scroll",h),window.addEventListener("resize",h),()=>{C.removeEventListener("scroll",h),window.removeEventListener("resize",h);}},[r,h]);let b=n==="visible"||n==="hover"&&d,v=b?"rgba(0,0,0,0.3)":"transparent",x=b?"rgba(255,255,255,0.3)":"transparent",y=`
|
|
2
2
|
#${g} {
|
|
3
3
|
scrollbar-width: thin;
|
|
4
4
|
scrollbar-color: ${v} transparent;
|
|
@@ -40,7 +40,7 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
40
40
|
scrollbar-width: none;
|
|
41
41
|
}
|
|
42
42
|
`:""}
|
|
43
|
-
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:y}}),jsx("div",{ref:c,id:g,onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),style:{...s,...(()=>{if(!r)return {};let C=w0[o],R=t==="vertical"||t==="both",M=t==="horizontal"||t==="both",T=[R&&f.top&&`linear-gradient(to bottom, transparent, black ${C})`,R&&f.bottom&&`linear-gradient(to top, transparent, black ${C})`,M&&f.left&&`linear-gradient(to right, transparent, black ${C})`,M&&f.right&&`linear-gradient(to left, transparent, black ${C})`].filter(Boolean);return T.length===0?{}:{maskImage:T.join(", "),WebkitMaskImage:T.join(", "),maskComposite:"intersect",WebkitMaskComposite:"source-in"}})()},className:u(t==="vertical"&&"h-full w-full overflow-y-auto overflow-x-hidden",t==="horizontal"&&"w-full overflow-x-auto overflow-y-hidden",t==="both"&&"h-full w-full overflow-auto",e),...i,children:a})]})});ke.displayName="ScrollArea";var Ed=cva("flex w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"min-h-9 py-1.5 text-xs",md:"min-h-10 py-2",lg:"min-h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Aa=X.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,size:p,radius:g,className:h,...b},v)=>{let[x,y]=X.useState(false),[w,C]=X.useState(""),[R,M]=X.useState(r||""),[T,k]=X.useState(r||[]),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),D=X.useRef(null),L=n!==void 0?n:R,I=n!==void 0?n:T,V=n!==void 0,O=B=>{d&&L===B?(V||M(""),o?.("")):(V||M(B),o?.(B)),y(false),C("");},A=B=>{let Z=I.includes(B)?I.filter(ue=>ue!==B):[...I,B];V||k(Z),o?.(Z);},K=(B,Z)=>{Z.stopPropagation();let ue=I.filter(U=>U!==B);V||k(ue),o?.(ue);},$=B=>{B.stopPropagation(),t?(V||k([]),o?.([])):(V||M(""),o?.(""));},G=e.find(B=>B.value===L),Y=e.filter(B=>I.includes(B.value)),F=Y.slice(0,m),z=Y.length-m,j=s?e.filter(B=>B.label.toLowerCase().includes(w.toLowerCase())):e;X.useEffect(()=>{if(x&&S.current){let B=S.current.getBoundingClientRect();E({top:B.bottom+4,left:B.left,width:B.width}),s&&setTimeout(()=>D.current?.focus(),0);}x||C("");},[x,s]),X.useEffect(()=>{let B=Z=>{let ue=Z.target,U=N.current&&!N.current.contains(ue),Ce=H.current&&!H.current.contains(ue);U&&Ce&&(y(false),C(""));};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]),X.useEffect(()=>{if(!x)return;let B=Z=>{H.current?.contains(Z.target)||(y(false),C(""));};return window.addEventListener("scroll",B,true),()=>window.removeEventListener("scroll",B,true)},[x]);let W=t?I.length>0:!!L;return jsxs("div",{ref:N,className:u("relative",h),...b,children:[jsxs("div",{ref:B=>{S.current=B,typeof v=="function"?v(B):v&&(v.current=B);},role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&y(!x),className:u(Ed({size:p,radius:g}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!G&&"text-muted-foreground"),children:G?G.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[F.map(B=>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:[B.label,jsx("span",{role:"button",tabIndex:0,onClick:Z=>K(B.value,Z),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&K(B.value,Z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},B.value)),z>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",z," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:$,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&$(B);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X$1,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",x&&"rotate-180")})]})]}),x&&!c&&typeof document<"u"&&Ba.createPortal(jsxs("div",{ref:H,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:P.top,left:P.left,minWidth:P.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:D,type:"text",value:w,onChange:B=>C(B.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(ke,{style:{maxHeight:f},onWheel:B=>B.stopPropagation(),children:jsx("div",{className:"p-1",children:j.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):j.map(B=>{let Z=t?I.includes(B.value):L===B.value;return jsxs("div",{role:"option","aria-selected":Z,onClick:()=>{B.disabled||(t?A(B.value):O(B.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",B.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Z&&jsx(Check,{className:"h-4 w-4"})}),B.label]},B.value)})})})]}),document.body)]})});Aa.displayName="Select";var Ld=X.createContext(null),Oo=()=>{let e=X.useContext(Ld);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},wi=X.createContext({radius:"md"}),Ci=X.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),[s,i]=X.useState(-1),l=t!==void 0,c=l?t:o,d=X.useRef(null),m=X.useRef(null),f=X.useId(),p=X.useRef(new Map),g=X.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=X.useCallback((v,x)=>{p.current.set(v,x);},[]),b=X.useCallback(v=>{p.current.delete(v);},[]);return jsx(Ld.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};Cn.displayName="Dropdown";var Tn=X.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Oo();return 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})});Tn.displayName="DropdownTrigger";var L0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},Mn=X.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:x,setActiveIndex:y,items:w}=Oo(),[C,R]=X.useState({top:0,left:0}),[M,T]=X.useState(t),[k,P]=X.useState(false),E=X.useRef(0);if(X.useEffect(()=>{P(true);},[]),X.useEffect(()=>{p&&(E.current=w.current.size);},[p,w]),X.useEffect(()=>{if(!p||!h.current||!b.current)return;let S=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),D=b.current.getBoundingClientRect(),L=window.innerWidth,I=window.innerHeight,V=0,O=0,A=t;switch(t){case "top":V=H.top-D.height-n,V<a&&(V=H.bottom+n,A="bottom");break;case "bottom":V=H.bottom+n,V+D.height>I-a&&(V=H.top-D.height-n,A="top");break;case "left":O=H.left-D.width-n,O<a&&(O=H.right+n,A="right");break;case "right":O=H.right+n,O+D.width>L-a&&(O=H.left-D.width-n,A="left");break}if(A==="top"||A==="bottom"){switch(r){case "start":O=H.left+o;break;case "center":O=H.left+H.width/2-D.width/2;break;case "end":O=H.right-D.width-o;break}O<a?O=a:O+D.width>L-a&&(O=L-D.width-a);}else {switch(r){case "start":V=H.top+o;break;case "center":V=H.top+H.height/2-D.height/2;break;case "end":V=H.bottom-D.height-o;break}V<a?V=a:V+D.height>I-a&&(V=I-D.height-a);}R({top:V,left:O}),T(A);};return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S,true),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S,true);}},[p,t,n,r,o,a,h]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=H.target;b.current&&!b.current.contains(D)&&h.current&&!h.current.contains(D)&&(s?.(),g(false));};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[p,g,s,h,b]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=Array.from(w.current.entries()).sort(([I],[V])=>I-V).map(([,I])=>I),L=D.length;if(L!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),x===-1||x>=L-1?y(l?0:Math.min(x+1,L-1)):y(x+1);break;case "ArrowUp":H.preventDefault(),x<=0?y(l?L-1:0):y(x-1);break;case "Home":H.preventDefault(),y(0);break;case "End":H.preventDefault(),y(L-1);break;case "Enter":case " ":H.preventDefault(),x>=0&&x<L&&D[x]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p,g,i,x,y,w,l,h]),X.useEffect(()=>{p&&x>=0&&Array.from(w.current.entries()).sort(([H],[D])=>H-D).map(([,H])=>H)[x]?.focus();},[p,x,w]),!k||!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"}[M];return Ba.createPortal(jsx("div",{ref:S=>{b.current=S,typeof f=="function"?f(S):f&&(f.current=S);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":M,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",L0[c],N,e),style:{top:C.top,left:C.left},...m,children:jsx(wi.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Sd=0,Dd={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=X.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}=Oo(),{radius:b}=X.useContext(wi),[v]=X.useState(()=>Sd++),x=X.useRef(null);X.useEffect(()=>(!n&&x.current&&g(v,x.current),()=>{h(v);}),[n,v,g,h]);let y=R=>{if(n){R.preventDefault();return}o?.(R),r?.(),m(false);},w=R=>{a?.(R),n||p(v);};return jsxs("div",{ref:R=>{x.current=R,typeof d=="function"?d(R):d&&(d.current=R);},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",Dd[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:y,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Ti=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ti.displayName="DropdownSection";var Hd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Hd.displayName="DropdownSeparator";var Id=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Id.displayName="DropdownShortcut";var Vd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Vd.displayName="DropdownGroup";var Ad=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),{contentRef:s}=Oo(),i=t!==void 0,l=i?t:o,c=X.useRef(null),d=X.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsx(Ci.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Ad.displayName="DropdownSub";var zd=X.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=X.useContext(Ci),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Oo(),{radius:p}=X.useContext(wi),[g]=X.useState(()=>Sd++),h=X.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:x}=c;X.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let y=R=>{o?.(R),n||(d(g),v(true));},w=R=>{a?.(R);},C=R=>{s?.(R),(R.key==="ArrowRight"||R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(true));};return jsxs("div",{ref:R=>{h.current=R,x.current=R,typeof l=="function"?l(R):l&&(l.current=R);},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",Dd[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:y,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});zd.displayName="DropdownSubTrigger";var Od=X.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=X.useContext(Ci);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=X.useState({top:0,left:0}),[h,b]=X.useState(false),v=X.useRef(null),x=X.useRef(null);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let R=m.current.getBoundingClientRect(),M=v.current.getBoundingClientRect(),T=window.innerWidth,k=window.innerHeight,P=R.top+n,E=R.right+t;E+M.width>T-r&&(E=R.left-M.width-t),P+M.height>k-r&&(P=k-M.height-r),P<r&&(P=r),g({top:P,left:E});})();},[c,t,n,r,m]);let y=C=>{o?.(C),x.current&&(clearTimeout(x.current),x.current=null),d(true);},w=C=>{a?.(C);let R=C.relatedTarget;m.current?.contains(R)||f?.current?.contains(R)||(x.current=setTimeout(()=>{d(false);},100));};return X.useEffect(()=>()=>{x.current&&clearTimeout(x.current);},[]),!h||!c?null:Ba.createPortal(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:y,onMouseLeave:w,...s}),document.body)});Od.displayName="DropdownSubContent";var S0=Ti;var Kd=X.createContext(null),Mi=()=>{let e=X.useContext(Kd);if(!e)throw new Error("Popover components must be used within a Popover");return e},ot=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useId(),d=X.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsx(Kd.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=X.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Mi(),c=f=>{t?.(f),s(!a);},d=f=>{i.current=f,typeof o=="function"?o(f):o&&(o.current=f);},m={"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r};return n&&X.isValidElement(e)?X.cloneElement(e,{...m,ref:d,onClick:f=>{e.props.onClick?.(f),c(f);}}):jsx("button",{ref:d,type:"button",...m,children:e})});qn.displayName="PopoverTrigger";var an=X.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Mi();return jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});an.displayName="PopoverAnchor";var at=X.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}=Mi(),[v,x]=X.useState({top:0,left:0}),[y,w]=X.useState(false),[C,R]=X.useState(null);if(X.useEffect(()=>{w(true);},[]),X.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),P=C.getBoundingClientRect(),E=0,N=0;switch(n){case "top":E=k.top-P.height-r;break;case "bottom":E=k.bottom+r;break;case "left":N=k.left-P.width-r;break;case "right":N=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":N=k.left+a;break;case "center":N=k.left+k.width/2-P.width/2;break;case "end":N=k.right-P.width-a;break}else switch(o){case "start":E=k.top+a;break;case "center":E=k.top+k.height/2-P.height/2;break;case "end":E=k.bottom-P.height-a;break}x({top:E,left:N});};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]),X.useEffect(()=>{if(!p)return;let T=k=>{let P=k.target;C&&C.contains(P)||h.current&&h.current.contains(P)||P.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),X.useEffect(()=>{if(!p)return;let T=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!y||!p)return null;let M={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 Ba.createPortal(jsx("div",{ref:T=>{R(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",M,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});at.displayName="PopoverContent";var $d=X.createContext(null),ki=()=>{let e=X.useContext($d);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},Gd=X.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]=X.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsx($d.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});Gd.displayName="Tabs";var Ni={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"}},Ud=X.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=ki(),l=X.useRef(null),[c,d]=X.useState({opacity:0});X.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let x=g.getBoundingClientRect(),y=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:y.height,transform:`translateY(${y.top-x.top}px)`,opacity:1}:{width:y.width,height:2,transform:`translateX(${y.left-x.left}px)`,opacity:1}):o==="solid"&&d(w?{width:y.width,height:y.height,transform:`translateY(${y.top-x.top}px)`,opacity:1}:{width:y.width,height:y.height,transform:`translateX(${y.left-x.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 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",Ni[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Ni[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Ud.displayName="TabsList";var jd=X.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=ki(),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 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",Ni[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});jd.displayName="TabsTrigger";var Wd=X.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=ki(),s=a===t;return s?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});Wd.displayName="TabsContent";var _d=[{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 H0(e,t=_d){return e?t.filter(r=>r.test(e)).length/t.length:0}function I0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function V0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Fo=0,Pi=null;function Gt(){Fo===0&&(Pi=document.body.style.overflow,document.body.style.overflow="hidden"),Fo++;}function Ut(){Fo--,Fo<=0&&(Fo=0,document.body.style.overflow=Pi??"",Pi=null);}var Xd=X.createContext(null),Oa=()=>{let e=X.useContext(Xd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},qd=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=X.useState(t),s=e!==void 0,i=s?e:o,l=X.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(Xd.Provider,{value:{open:i,onOpenChange:l},children:r})};qd.displayName="Sheet";var Zd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Zd.displayName="SheetTrigger";var Qd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});Qd.displayName="SheetClose";var Li=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Li.displayName="SheetPortal";var Jd=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Oa();return r?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});Jd.displayName="SheetOverlay";var eu=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"}}),O0=(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],tu=X.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Oa(),[d,m]=X.useState(false),[,f]=X.useState(false);return X.useEffect(()=>{if(l)m(true),f(true),Gt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Ut();}},[l]),X.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:jsxs(Li,{children:[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"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(eu({side:e}),O0(e,l),t),...s,children:[!r&&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:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});tu.displayName="SheetContent";var nu=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});nu.displayName="SheetHeader";var ru=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ru.displayName="SheetFooter";var ou=X.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));ou.displayName="SheetTitle";var au=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));au.displayName="SheetDescription";var K0=({theme:e="system",...t})=>jsx(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 su=X.createContext(null),Fa=()=>{let e=X.useContext(su);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Si=X.createContext(null),iu=({children:e,onOpenChange:t})=>{let[n,r]=X.useState(false),[o,a]=X.useState({x:0,y:0}),s=X.useId(),i=X.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(su.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};iu.displayName="ContextMenu";var lu=X.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Fa(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});lu.displayName="ContextMenuTrigger";var cu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));cu.displayName="ContextMenuGroup";var du=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};du.displayName="ContextMenuPortal";var uu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Si.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};uu.displayName="ContextMenuSub";var mu=X.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Fa(),[d,m]=X.useState(false),[f,p]=X.useState(l),g=X.useRef(null);return X.useEffect(()=>{m(true);},[]),X.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:x}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),x+b.height>window.innerHeight&&(x=window.innerHeight-b.height-8),p({x:v,y:x});},[s,l]),X.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]),X.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:Ba.createPortal(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)});mu.displayName="ContextMenuContent";var pu=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=X.useContext(Si);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 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,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});pu.displayName="ContextMenuSubTrigger";var fu=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=X.useContext(Si);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=X.useState({top:0,left:0}),[f,p]=X.useState(false),g=X.useRef(null);X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let x=c.current.getBoundingClientRect(),y=g.current.getBoundingClientRect(),w=x.top,C=x.right+t;C+y.width>window.innerWidth&&(C=x.left-y.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:Ba.createPortal(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)});fu.displayName="ContextMenuSubContent";var gu=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Fa(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return 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})});gu.displayName="ContextMenuItem";var bu=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Fa(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return 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:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});bu.displayName="ContextMenuCheckboxItem";var vu=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));vu.displayName="ContextMenuSection";var hu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));hu.displayName="ContextMenuSeparator";var xu=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});xu.displayName="ContextMenuShortcut";var Ru=X.createContext(null),W0=()=>{let e=X.useContext(Ru);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},wu=X.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]=X.useState(n),p=t!==void 0,g=p?t:m,h=X.useId(),b=v=>{p||f(v),r?.(v);};return 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:jsx(Ru.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});wu.displayName="RadioGroup";var Cu=X.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=W0(),s=a.value===t,i=n||a.disabled;return jsxs(Fragment,{children:[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&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),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}})]})});Cu.displayName="RadioGroupItem";var $a=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"}}),Tu=X.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=X.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 jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u($a({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Tu.displayName="Toggle";var Mu=X.createContext(null),Z0=()=>{let e=X.useContext(Mu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Nu=X.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=X.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(x=>x!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(Mu.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Nu.displayName="ToggleGroup";var ku=X.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=Z0(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u($a({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});ku.displayName="ToggleGroupItem";var Ua=X.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]=X.useState(n),h=t!==void 0,b=h?t:p,v=X.useRef(null),[x,y]=X.useState(false),[w,C]=X.useState(null),R=(H,D)=>{if(!v.current)return b[0];let L=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-L.left)/L.width:I=1-(D-L.top)/L.height,I=Math.max(0,Math.min(1,I));let V=a+I*(s-a),O=Math.round(V/i)*i;return Math.max(a,Math.min(s,O))},M=(H,D)=>{let L=[...b];L[D]=H,D>0&&H<b[D-1]&&(L[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(L[D]=b[D+1]),h||g(L),r?.(L);},T=(H,D)=>{l||(H.preventDefault(),y(true),C(D),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!x||w===null||l)return;let D=R(H.clientX,H.clientY);M(D,w);},P=()=>{x&&(y(false),C(null),o?.(b));},E=H=>{if(l)return;let D=R(H.clientX,H.clientY),L=0,I=Math.abs(b[0]-D);for(let V=1;V<b.length;V++){let O=Math.abs(b[V]-D);O<I&&(I=O,L=V);}M(D,L),o?.([...b.slice(0,L),D,...b.slice(L+1)]);},N=(H,D)=>{if(l)return;let L=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),L=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),L=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),L=a;break;case "End":H.preventDefault(),L=s;break;default:return}M(L,D),o?.([...b.slice(0,D),L,...b.slice(D+1)]);},S=H=>(H-a)/(s-a)*100;return 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:[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:E,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${S(b[0])}%`:0,right:`${100-S(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${S(b[0])}%`:0,top:`${100-S(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,D)=>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",x&&w===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${S(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:L=>T(L,D),onPointerMove:k,onPointerUp:P,onPointerCancel:P,onKeyDown:L=>N(L,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ua.displayName="Slider";var Pu=X.createContext(null),Eu=()=>{let e=X.useContext(Pu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Hi=X.createContext(null),Lu=()=>{let e=X.useContext(Hi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Su=X.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=X.useState(()=>t==="single"?r?[r]:[]:r||[]),f=X.useRef(new Map),p=X.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=w=>{if(t==="single"){let R=h.includes(w)&&a?[]:[w];g||m(R),o?.(R[0]||"");}else {let C=h.includes(w)?h.filter(R=>R!==w):[...h,w];g||m(C),o?.(C);}},v=X.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),x=X.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),y=X.useCallback(w=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,M;f.current.forEach((N,S)=>{N===R&&(M=S);});let T=M?C.indexOf(M):-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 P=C[k];f.current.get(P)?.focus();},[]);return jsx(Pu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:x,focusTrigger:y},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Su.displayName="Accordion";var Du=X.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Eu(),d=c.value.includes(t),m=n||c.disabled||false,f=X.useId(),p=X.useId();return r!==void 0?jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(Hu,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:r}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(Iu,{children:s})]})}):jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children: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})})});Du.displayName="AccordionItem";var Hu=X.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Eu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=Lu(),f=X.useRef(null);X.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 jsx("h3",{className:"flex",children: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,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});Hu.displayName="AccordionTrigger";var Iu=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Lu();return 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:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});Iu.displayName="AccordionContent";var Au=X.createContext(null),zu=()=>{let e=X.useContext(Au);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},Ou=X.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=X.useState(n),m=t!==void 0,f=m?t:c,p=X.useId(),g=X.useId(),h=b=>{o||(m||d(b),r?.(b));};return jsx(Au.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Ii,{})]}),s]})})});Ou.displayName="Collapsible";var Ii=X.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=zu();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Ii.displayName="CollapsibleTrigger";var Bu=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=zu(),c=X.useRef(null),[d,m]=X.useState(0),[f,p]=X.useState(false),[g,h]=X.useState(a);X.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Bu.displayName="CollapsibleContent";var _a=X.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 jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsx("span",{className:"text-muted-foreground",children:r}),o&&jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),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:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});_a.displayName="Progress";var Gu=X.createContext(null),Uu=()=>{let e=X.useContext(Gu);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},ju=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=X.useState(n),c=t!==void 0,d=c?t:i,m=X.useRef(null),f=X.useId(),p=X.useRef(null),g=X.useRef(null),h=X.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 X.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]),X.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(Gu.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};ju.displayName="HoverCard";var Wu=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Uu();return 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})});Wu.displayName="HoverCardTrigger";var _u=X.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}=Uu(),[g,h]=X.useState({top:0,left:0}),[b,v]=X.useState(false),x=X.useRef(null);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!d||!f.current||!x.current)return;(()=>{if(!f.current||!x.current)return;let M=f.current.getBoundingClientRect(),T=x.current.getBoundingClientRect(),k=0,P=0;switch(t){case "top":k=M.top-T.height-n;break;case "bottom":k=M.bottom+n;break;case "left":P=M.left-T.width-n;break;case "right":P=M.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":P=M.left+o;break;case "center":P=M.left+M.width/2-T.width/2;break;case "end":P=M.right-T.width-o;break}else switch(r){case "start":k=M.top+o;break;case "center":k=M.top+M.height/2-T.height/2;break;case "end":k=M.bottom-T.height-o;break}h({top:k,left:P});})();},[d,t,n,r,o,f]);let y=R=>{a?.(R),m(true);},w=R=>{s?.(R),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 Ba.createPortal(jsx("div",{ref:R=>{x.current=R,typeof c=="function"?c(R):c&&(c.current=R);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:y,onMouseLeave:w,...l,children:i}),document.body)});_u.displayName="HoverCardContent";var Yu=X.createContext({size:"md",variant:"default",radius:"md"}),Xa=()=>X.useContext(Yu);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var rR=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-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),oR=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"}}),aR=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"}}),Xu=X.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(Yu.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Xu.displayName="Breadcrumb";var qu=X.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=Xa();return jsx("ol",{ref:n,className:u(rR({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});qu.displayName="BreadcrumbList";var Zu=X.forwardRef(({className:e,...t},n)=>{let{size:r}=Xa();return 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})});Zu.displayName="BreadcrumbItem";var Qu=X.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Qu.displayName="BreadcrumbLink";var Ju=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));Ju.displayName="BreadcrumbPage";var em=({children:e,className:t,...n})=>{let{size:r}=Xa();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(oR({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};em.displayName="BreadcrumbSeparator";var tm=({className:e,...t})=>{let{size:n}=Xa();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(aR({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};tm.displayName="BreadcrumbEllipsis";var om=X.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));om.displayName="AspectRatio";var im=X.createContext(null),Ai=()=>{let e=X.useContext(im);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},lm=X.createContext(null),cm=()=>{let e=X.useContext(lm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},dm=X.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=X.useState(null);return jsx(im.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(zi,{})]})})});dm.displayName="NavigationMenu";var um=X.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Ai();return 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})});um.displayName="NavigationMenuList";var mm=X.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Ai(),s=X.useId(),i=X.useRef(null),l=o===s,c=X.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(lm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});mm.displayName="NavigationMenuItem";var pm=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"),fm=X.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=cm(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return 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(pm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});fm.displayName="NavigationMenuTrigger";var gm=X.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=cm(),l=X.useRef(null),[c,d]=X.useState({top:0,left:0});X.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?Ba.createPortal(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});gm.displayName="NavigationMenuContent";var bm=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"),vm=X.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:u(bm(),t&&"bg-accent text-accent-foreground",e),...n}));vm.displayName="NavigationMenuLink";var zi=X.forwardRef((e,t)=>null);zi.displayName="NavigationMenuViewport";var hm=X.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Ai();return r?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:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});hm.displayName="NavigationMenuIndicator";var wm=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Nt=X.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:r,type:"button",className:u(wm({size:t}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:a,height:a}})})});Nt.displayName="CloseButton";var qa=X.createContext(null);function bR(){let e=X.useContext(qa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return X.useContext(qa)}var vR="16rem",hR="18rem",xR="3rem",yR="b",RR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},wR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Oi=X.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,x]=X.useState(false),[y,w]=X.useState(false),[C,R]=X.useState(e),M=t??C,T=X.useCallback(N=>{let S=typeof N=="function"?N(M):N;n?n(S):R(S);},[n,M]);X.useEffect(()=>{let N=()=>{x(window.innerWidth<768);};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);let k=X.useCallback(()=>b?T(N=>!N):v?w(N=>!N):T(N=>!N),[v,T,w,b]);X.useEffect(()=>{if(b)return;let N=S=>{S.key===yR&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),k());};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[k,b]);let P=M?"expanded":"collapsed",E=X.useMemo(()=>({placement:r,state:P,open:M,setOpen:T,isMobile:v,openMobile:y,setOpenMobile:w,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,P,M,T,v,y,w,k,l,h,o,a,s,i]);return b?jsx(qa.Provider,{value:E,children:jsx(Drawer.Root,{open:M,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsx(qa.Provider,{value:E,children:jsx(Wn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":vR,"--drawer-width-icon":xR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Oi.displayName="Drawer";var Tm=X.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=kn();if(!s)return 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 jsx(Fragment,{children:r});if(l==="none")return 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 jsx(CR,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return 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: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: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 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:[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]")}),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: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})})]})});Tm.displayName="DrawerSidebar";var CR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=X.useState(false);return X.useEffect(()=>{a(true);},[]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),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":hR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Mm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return 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:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});Mm.displayName="DrawerTrigger";var Nm=X.forwardRef(({className:e,children:t,...n},r)=>{let o=kn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque";if(a){let c=s==="top"||s==="bottom",d=s==="left"||s==="right",m=d?RR[i]:wR[i],f={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},p={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 jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",f[l])}),jsxs(Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",p[s],e),style:{...d?{width:m,height:"100%"}:{},...c?{maxHeight:m}:{},...n.style},...n,children:[c&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});Nm.displayName="DrawerContent";var km=X.forwardRef(({className:e,hideCloseButton:t,children:n,...r},o)=>{let a=kn(),s=a?.hideCloseButton??false,i=!t&&!s;return jsxs("div",{ref:o,"data-drawer":"header",className:u("flex flex-col gap-2 p-4 relative",e),...r,children:[n,i&&jsx(Nt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});km.displayName="DrawerHeader";var Pm=X.forwardRef(({className:e,...t},n)=>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}));Pm.displayName="DrawerBody";var Em=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Em.displayName="DrawerFooter";var Lm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Lm.displayName="DrawerTitle";var Sm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Sm.displayName="DrawerDescription";var Dm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Nt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Dm.displayName="DrawerClose";var Hm=X.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=kn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return 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?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Hm.displayName="DrawerToggle";var Im=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Im.displayName="DrawerSeparator";var Vm=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));Vm.displayName="DrawerMenu";var Am=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));Am.displayName="DrawerMenuItem";var zm=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"}}),Om=X.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=kn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(zm({variant:t,size:n}),o),...s,children:a});return r?jsxs(_n,{children:[jsx(Yn,{children:m}),jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});Om.displayName="DrawerMenuButton";var Bm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));Bm.displayName="DrawerGroup";var Fm=X.forwardRef(({className:e,...t},n)=>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}));Fm.displayName="DrawerGroupLabel";var Km=X.forwardRef(({className:e,...t},n)=>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}));Km.displayName="DrawerInset";var TR=Oi;var Gm=X.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));Gm.displayName="Table";var Um=X.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Um.displayName="TableHeader";var jm=X.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));jm.displayName="TableBody";var Wm=X.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Wm.displayName="TableFooter";var _m=X.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));_m.displayName="TableRow";var Ym=X.forwardRef(({className:e,...t},n)=>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}));Ym.displayName="TableHead";var Xm=X.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Xm.displayName="TableCell";var qm=X.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));qm.displayName="TableCaption";function LR({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,...x},y){let[w,C]=X.useState(new Set),[R,M]=X.useState({columnId:null,direction:null}),[T,k]=X.useState({pageIndex:0,pageSize:m[0]||10}),P=o??w,E=l??R,N=f??T,S=F=>{a?a(F):C(F);},H=F=>{c?c(F):M(F);},D=F=>{p?p(F):k(F);},L=X.useMemo(()=>{if(!E.columnId||!E.direction)return t;let F=n.find(z=>z.id===E.columnId);return F?[...t].sort((z,j)=>{let W=F.accessor(z),B=F.accessor(j);if(W===B)return 0;if(W==null)return 1;if(B==null)return -1;let Z=String(W).localeCompare(String(B),void 0,{numeric:true});return E.direction==="asc"?Z:-Z}):t},[t,E,n]),I=X.useMemo(()=>{if(!d)return L;let F=N.pageIndex*N.pageSize;return L.slice(F,F+N.pageSize)},[L,d,N]),V=Math.ceil(L.length/N.pageSize),O=F=>{if(F===true){let z=new Set(I.map((j,W)=>s(j,W)));S(z);}else S(new Set);},A=(F,z)=>{let j=new Set(P);z?j.add(F):j.delete(F),S(j);},K=I.length>0&&I.every((F,z)=>P.has(s(F,z))),$=I.some((F,z)=>P.has(s(F,z))),G=F=>{if(!n.find(W=>W.id===F)?.sortable&&!i)return;let j="asc";E.columnId===F&&(E.direction==="asc"?j="desc":E.direction==="desc"&&(j=null)),H({columnId:j?F:null,direction:j});},Y=F=>E.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):E.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:y,className:u("w-full",e),...x,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(zo,{checked:K?true:$?"indeterminate":false,onCheckedChange:O,"aria-label":"Select all"})}),n.map(F=>{let z=F.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",z&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>z&&G(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,z&&Y(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):I.map((F,z)=>{let j=s(F,z),W=P.has(j);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&z%2===1&&"bg-muted/30",W&&"bg-muted"),"data-state":W?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(zo,{checked:W,onCheckedChange:B=>A(j,!!B),"aria-label":`Select row ${z+1}`})}),n.map(B=>jsx("td",{className:"p-4 align-middle",children:B.cell?B.cell(F,z):B.accessor(F)},B.id))]},j)})})]})}),d&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:N.pageSize,onChange:F=>D({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(F=>jsx("option",{value:F,children:F},F))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",N.pageIndex+1," of ",V||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex-1}),disabled:N.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex+1}),disabled:N.pageIndex>=V-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var SR=X.forwardRef(LR);var Bi=["January","February","March","April","May","June","July","August","September","October","November","December"];function OR({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=X.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Bi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Bi.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[80px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function BR(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(OR,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 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:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 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:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Bi[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[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:jsx(ChevronLeft,{className:"h-4 w-4"})}),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:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function eo({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=X.useMemo(()=>BR(r,o,a),[r,o,a]);return jsx(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})}eo.displayName="Calendar";var ep=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});ep.displayName="Pagination";var tp=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));tp.displayName="PaginationContent";var np=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:u("",e),...t}));np.displayName="PaginationItem";var Za=({className:e,isActive:t,size:n="sm",isIconOnly:r=true,...o})=>jsx("a",{"aria-current":t?"page":void 0,className:u(Xr({variant:t?"solid":"light",size:n}),r&&"!px-0 !w-9",e),...o});Za.displayName="PaginationLink";var rp=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});rp.displayName="PaginationPrevious";var op=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});op.displayName="PaginationNext";var ap=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});ap.displayName="PaginationEllipsis";var Ko=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));Ko.displayName="VisuallyHidden";var ip={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},UR={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},lp=cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Gi=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Ja=X.createContext(null),kr=()=>{let e=X.useContext(Ja);if(!e)throw new Error("Modal components must be used within a Modal");return e},dp=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=X.useState(false),b=e!==void 0,v=b?e:g,[x,y]=X.useState(false),w=X.useRef(null),C=X.useId(),R=X.useId();X.useEffect(()=>{y(true);},[]);let M=X.useCallback(E=>{b||h(E),t?.(E);},[b,t]);X.useEffect(()=>{if(v)return Gt(),()=>Ut()},[v]),X.useEffect(()=>{if(!v||i)return;let E=N=>{N.key==="Escape"&&M(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[v,i,M]);let T=E=>{s&&E.target===E.currentTarget&&M(false);},k=n?X.isValidElement(n)?X.cloneElement(n,{onClick:E=>{n.props.onClick?.(E),M(true);}}):jsx("button",{type:"button",onClick:()=>M(true),children:n}):null,P=()=>!x||!v?null:d==="outside"?Ba.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(lp(),ip[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx(Ko,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>M(false)})]})}),document.body):Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(lp(),ip[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u(Gi({size:m}),UR[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(Ko,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>M(false)})]})]}),document.body);return jsxs(Ja.Provider,{value:{open:v,onOpenChange:M,scrollBehavior:d,titleId:C,descriptionId:R},children:[k,P()]})});dp.displayName="Modal";var es=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=X.useState(n),i=t!==void 0,l=i?t:a,c=X.useId(),d=X.useId(),m=X.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Ja.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};es.displayName="ModalRoot";var up=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});up.displayName="ModalTrigger";var Ui=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Ui.displayName="ModalPortal";var ji=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=kr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});ji.displayName="ModalOverlay";var mp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});mp.displayName="ModalClose";var ts=X.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=kr(),[f,p]=X.useState(false);return X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),X.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Ui,{children:[jsx(ji,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Gi({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});ts.displayName="ModalContent";var pp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pp.displayName="ModalHeader";var fp=({className:e,children:t})=>(X.useContext(Ja)?.scrollBehavior??"inside")==="inside"?jsx(ke,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});fp.displayName="ModalBody";var gp=({className:e,children:t,...n})=>{let{onOpenChange:r}=kr();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:X.Children.map(t,o=>X.isValidElement(o)?X.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};gp.displayName="ModalFooter";var bp=X.forwardRef(({className:e,...t},n)=>{let{titleId:r}=kr();return jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});bp.displayName="ModalTitle";var vp=X.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=kr();return jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});vp.displayName="ModalDescription";var Wi=X.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Wi.displayName=Command.displayName;var _R=({children:e,...t})=>jsx(es,{...t,children:jsx(ts,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(Wi,{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})})}),hp=X.forwardRef(({className:e,...t},n)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(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})]}));hp.displayName=Command.Input.displayName;var xp=X.forwardRef(({className:e,children:t,...n},r)=>jsx(ke,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:u("overflow-hidden",e),...n,children:t})}));xp.displayName=Command.List.displayName;var yp=X.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));yp.displayName=Command.Empty.displayName;var Rp=X.forwardRef(({className:e,...t},n)=>jsx(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}));Rp.displayName=Command.Group.displayName;var wp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));wp.displayName=Command.Separator.displayName;var Cp=X.forwardRef(({className:e,children:t,startContent:n,endContent:r,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 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),...o,children:[n,t&&jsx("span",{className:"flex-1",children:t}),r]}));Cp.displayName=Command.Item.displayName;var Tp=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Tp.displayName="CommandShortcut";var qR={sm:{input:"h-9 px-2 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{input:"h-10 px-3 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{input:"h-11 px-4 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},ZR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Np=X.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,size:s="md",radius:i="md",...l},c)=>{let[d,m]=X.useState(false),[f,p]=X.useState(false),g=qR[s],h=ZR[i];return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:u("flex w-full border border-input bg-background py-2 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",g.input,h,t&&"pr-10",e),ref:c,disabled:n,style:{...a,borderColor:f?"var(--color-foreground)":void 0},onFocus:b=>{p(true),r?.(b);},onBlur:b=>{p(false),o?.(b);},...l}),t&&jsx("button",{type:"button",className:u("absolute right-0 top-0 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",g.button),onClick:()=>m(!d),disabled:n,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:g.icon}):jsx(Eye,{className:g.icon})})]})});Np.displayName="PasswordInput";var tw={sm:{wrapper:"h-9",input:"h-9 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{wrapper:"h-10",input:"h-10 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{wrapper:"h-11",input:"h-11 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},nw={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},kp=X.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,size:c="md",radius:d="md",...m},f)=>{let[p,g]=X.useState(s),[h,b]=X.useState(false),v=a!==void 0,x=v?a:p,y=tw[c],w=nw[d],C=N=>{N!==void 0&&(r!==void 0&&N<r&&(N=r),o!==void 0&&N>o&&(N=o)),v||g(N),i?.(N);},R=()=>{C((x??0)+n);},M=()=>{C((x??0)-n);},T=N=>{let S=N.target.value;if(S==="")C(void 0);else {let H=parseFloat(S);isNaN(H)||C(H);}},k=N=>{N.key==="ArrowUp"?(N.preventDefault(),R()):N.key==="ArrowDown"&&(N.preventDefault(),M());},P=r===void 0||(x??0)>r,E=o===void 0||(x??0)<o;return t?jsxs("div",{className:u("relative flex items-center border transition-colors",y.wrapper,w,h?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",y.button),onClick:M,disabled:l||!P,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:y.icon})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("min-w-0 flex-1 bg-background text-center focus:outline-none disabled:cursor-not-allowed",y.input),ref:f,value:x??"",onChange:T,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m}),jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",y.button),onClick:R,disabled:l||!E,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:y.icon})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex w-full bg-background px-3 py-2 text-center border placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",y.input,w,h?"border-foreground":"border-input",e),ref:f,value:x??"",onChange:T,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m})});kp.displayName="NumberInput";var Sp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Pp=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"}}),Dp=X.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=jsxs(Cr,{className:u(Pp({size:r})),children:[m.src&&jsx(Qr,{src:m.src,alt:m.alt||""}),jsx(Tr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(_n,{children:[jsx(Yn,{children:p}),jsx(Xn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Sp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(Cr,{className:u(Pp({size:r})),children:jsxs(Tr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(Wn,{delayDuration:300,children:d}):d});Dp.displayName="AvatarGroup";var Hp=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"}}),Ip=X.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]=X.useState(n),[b,v]=X.useState(null),x=t!==void 0,y=x?t:g,w=b!==null?b:y,C=S=>{l||c||(x||h(S),r?.(S));},R=(S,H=false)=>{let D=i&&H?S+.5:S+1;C(D);},M=(S,H)=>{if(l||c)return;let D=S.currentTarget.getBoundingClientRect(),L=i&&S.clientX<D.left+D.width/2;v(L?H+.5:H+1);},T=()=>{v(null);},k=s==="heart"?Heart:Star,P=S=>w>=S+1?"full":w>=S+.5?"half":"empty",E=d?{color:d,fill:d}:{},N=m?{color:m}:{};return jsx("div",{ref:p,className:u(Hp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(S,H)=>{let D=P(H);return 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:L=>{let I=L.currentTarget.getBoundingClientRect(),V=i&&L.clientX<I.left+I.width/2;R(H,V);},onMouseMove:L=>M(L,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":y===H+1,children:[jsx(k,{className:u("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?N:void 0}),D!=="empty"&&jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...E,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Ip.displayName="Rating";var Ap=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-md",md:"rounded-lg",lg:"rounded-xl",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}}),cw={sm:"sm",md:"sm",lg:"sm"},zp=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(Ap({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(Nt,{size:cw[r??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});zp.displayName="Chip";var Op=createContext({direction:"horizontal"}),vw=({className:e,direction:t="horizontal",children:n,...r})=>jsx(Op.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),hw=Panel,xw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(Op),o=r==="vertical";return jsx(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&&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:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var $p=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"}}),Rw={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"}},Bp={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)"},Gp=X.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=Rw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u($p({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Bp[n]||Bp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});Gp.displayName="CircularProgress";var Up=X.createContext(null),Tw=()=>{let e=X.useContext(Up);if(!e)throw new Error("OTP components must be used within InputOTP");return e},jp=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"}}),Wp=X.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,radius:d="md",children:m,...f},p)=>{let[g,h]=X.useState(o),[b,v]=X.useState(0),[x,y]=X.useState(false),w=X.useRef(null),C=r!==void 0?r:g;X.useImperativeHandle(p,()=>w.current),X.useEffect(()=>{v(Math.min(C.length,n-1));},[C,n]),X.useEffect(()=>{C.length===n&&s&&s(C);},[C,n,s]);let R=N=>{let S=N.target.value;if(i&&S){let H=new RegExp(i.replace("^","").replace("$","").replace("+",""));S=S.split("").filter(D=>H.test(D)).join("");}S=S.slice(0,n),r===void 0&&h(S),a?.(S);},M=N=>{N.key==="ArrowLeft"?v(S=>Math.max(0,S-1)):N.key==="ArrowRight"&&v(S=>Math.min(C.length,n-1,S+1));},T=()=>{w.current?.focus();},k=()=>{y(true),v(Math.min(C.length,n-1));},P=()=>{y(false);},E={value:C,activeIndex:x?b:-1,maxLength:n,disabled:l,radius:d};return jsx(Up.Provider,{value:E,children:jsxs("div",{className:u(jp({size:c}),t),onClick:T,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:C,onChange:R,onKeyDown:M,onFocus:k,onBlur:P,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...f}),m]})})});Wp.displayName="InputOTP";var _p=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center",e),...t}));_p.displayName="InputOTPGroup";var Mw={none:"first:rounded-l-none",sm:"first:rounded-l-md",md:"first:rounded-l-lg",lg:"first:rounded-l-xl",full:"first:rounded-l-full"},Nw={none:"last:rounded-r-none",sm:"last:rounded-r-md",md:"last:rounded-r-lg",lg:"last:rounded-r-xl",full:"last:rounded-r-full"},Yp=X.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s,radius:i}=Tw(),l=o[e]||"",c=a===e,d=c&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":c,"data-filled":!!l,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:border-l",Mw[i],Nw[i],c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[l,d&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});Yp.displayName="InputOTPSlot";var Xp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Xp.displayName="InputOTPSeparator";var Qp=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 border-zinc-300 bg-transparent dark:border-zinc-700",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 border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover: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"}}),Jp=X.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]=X.useState(""),x=X.useRef(null);X.useImperativeHandle(h,()=>x.current);let y=P=>{let E=P.trim();if(E.length<i||E.length>l||s&&r.length>=s||!d&&r.some(S=>S.text.toLowerCase()===E.toLowerCase()))return;let N={id:crypto.randomUUID(),text:E};o?.([...r,N]),v("");},w=P=>{m||f||o?.(r.filter(E=>E.id!==P));},C=P=>{if(c.includes(P.key)){if(P.key==="Tab"&&!b)return;P.preventDefault(),y(b);}P.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},R=P=>{let E=P.target.value;if(E.includes(",")){E.split(",").forEach(S=>{S.trim()&&y(S);});return}v(E);},M=P=>{P.preventDefault(),P.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(S=>{y(S);});},T=()=>{x.current?.focus();},k=s?r.length>=s:false;return 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(P=>p?p(P,()=>w(P.id)):jsxs("span",{className:u(Qp({variant:t,size:n})),children:[P.text,!m&&!f&&jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),w(P.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${P.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},P.id)),!k&&!f&&jsx("input",{ref:x,type:"text",value:b,onChange:R,onKeyDown:C,onPaste:M,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})]})});Jp.displayName="TagInput";var tf=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"}}),nf=X.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(tf({size:t,className:e})),...i,children:[n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));nf.displayName="EmptyState";var of=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 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 border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),af=X.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"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(of({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});af.displayName="StatCard";var qi=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"}}),zw=({checked:e,disabled:t,onClick:n})=>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&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function Ow({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:x,...y},w){let[C,R]=X.useState(null),[M,T]=X.useState(null),[k,P]=X.useState(new Set(f)),E=m!==void 0,N=E?new Set(m):k,[S,H]=X.useState(new Set(b)),D=h!==void 0,L=D?new Set(h):S,I=(z,j)=>{R(j),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/plain",String(j));},V=(z,j)=>{z.preventDefault(),!(C===null||C===j)&&T(j);},O=()=>{T(null);},A=(z,j)=>{if(z.preventDefault(),!r||C===null||C===j){R(null),T(null);return}let W=[...r],[B]=W.splice(C,1);W.splice(j,0,B),s?.(W),R(null),T(null);},K=()=>{R(null),T(null);},$=X.useCallback((z,j)=>{if(!r)return;let W=new Set(N),B=!W.has(z.id);d?B?W.add(z.id):W.delete(z.id):(W.clear(),B&&W.add(z.id)),E||P(W);let Z=r.filter(ue=>W.has(ue.id));p?.(Array.from(W),{selected:B,selectedItems:Z,item:z,event:j});},[r,N,d,E,p]),G=X.useCallback((z,j)=>{if(!r)return;let W=new Set(L),B=!W.has(z.id);B?W.add(z.id):W.delete(z.id),D||H(W);let Z=r.filter(ue=>W.has(ue.id));v?.(Array.from(W),{checked:B,checkedItems:Z,item:z,event:j});},[r,L,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...y,children:r.map((z,j)=>{let W=N.has(z.id),B=L.has(z.id);return jsxs("div",{role:"listitem","aria-selected":c?W:void 0,draggable:a,onDragStart:a?U=>I(U,j):void 0,onDragOver:a?U=>V(U,j):void 0,onDragLeave:a?O:void 0,onDrop:a?U=>A(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>$(z,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",M===j&&"border-primary border-dashed border rounded-md",W&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(zw,{checked:B,onClick:U=>G(z,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(z,j)})]},z.id)})}):jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...y,children:x})}var Bw=X.forwardRef(Ow),lf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),cf=X.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(lf({interactive:t,className:e})),...a,children:[n&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));cf.displayName="ListItem";var df=X.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));df.displayName="ListItemText";var pf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),ff=X.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:u(pf({position:t,className:e})),...n}));ff.displayName="Timeline";var gf=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"}}),bf=X.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(gf({variant:t,className:e})),...s,children:[!n&&jsxs("div",{className:"flex flex-col items-center",children:[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&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));bf.displayName="TimelineItem";var vf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));vf.displayName="TimelineContent";var hf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));hf.displayName="TimelineOpposite";var yf=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}}),Rf=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}}),wf=X.createContext({}),Cf=X.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=X.useState(a),f=o!==void 0?o:d,p=X.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(wf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(yf({size:t,fullWidth:n,className:e})),...l,children:r})})});Cf.displayName="SegmentedControl";var Tf=X.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=X.useContext(wf),i=s.value===n,l=r||s.disabled;return 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(Rf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Tf.displayName="SegmentedControlItem";var Mf=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"}}),Nf=e=>{let t=e.type;return t.startsWith("image/")?Image$1:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},is=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]},kf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${is(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},Pf=X.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]=X.useState(false),[v,x]=X.useState(false),[y,w]=X.useState([]),C=X.useRef(null),R=X.useCallback(L=>{if(!L||L.length===0)return;let I=Array.from(L),V=[],O=[];(m?I:[I[0]]).forEach(K=>{let $=kf(K,c,d);$.length>0?O.push({file:K,errors:$}):V.push(K);}),w(O),V.length>0&&r?.(V),O.length>0&&o?.(O);},[c,d,m,r,o]),M=X.useCallback(L=>{if(L.preventDefault(),L.stopPropagation(),!f&&(b(true),L.dataTransfer.items)){let V=Array.from(L.dataTransfer.items).some(O=>{if(O.kind!=="file")return true;if(d&&d.length>0){let A=O.type;return !d.some(K=>K.endsWith("/*")?A.startsWith(K.slice(0,-2)):A===K)}return false});x(V);}},[f,d]),T=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!f&&(L.dataTransfer.dropEffect="copy");},[f]),k=X.useCallback(L=>{L.preventDefault(),L.stopPropagation();let I=L.currentTarget.getBoundingClientRect(),V=L.clientX,O=L.clientY;(V<I.left||V>I.right||O<I.top||O>I.bottom)&&(b(false),x(false));},[]),P=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),b(false),x(false),!f&&R(L.dataTransfer.files);},[f,R]),E=X.useCallback(()=>{f||C.current?.click();},[f]),N=X.useCallback(L=>{R(L.target.files),L.target.value="";},[R]),S=X.useCallback(L=>{f||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:M,onDragOver:T,onDragLeave:k,onDrop:P,onClick:E,onKeyDown:S,className:u(Mf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:D,multiple:m,disabled:f,onChange:N,className:"sr-only",tabIndex:-1}),l||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${is(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),y.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:y.map(({file:L,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:L.name}),":"," ",I.map(V=>V.message).join(", ")]},L.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(L=>{let I=Nf(L.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",L.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(I,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:L.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[is(L.file.size),L.error&&jsx("span",{className:"ml-2 text-danger",children:L.error})]}),L.progress!==void 0&&L.progress<100&&jsx(_a,{value:L.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:V=>{V.stopPropagation(),a?.(L.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},L.id)})})]})});Pf.displayName="FileUpload";var Xw=`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")`,Lf=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}}),Xo=X.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),r?.(e);},className:u(Lf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?Xw:void 0,backgroundSize:n?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Xo.displayName="ColorSwatch";var Sf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Df=X.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=X.useState(t),b=e??g,v=X.useCallback(y=>{l||(e===void 0&&h(y),n?.(y));},[e,n,l]),x=y=>y.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Sf({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(y=>{let w=b?x(b)===x(y):false;return jsx(Xo,{role:"option",color:y,size:s,shape:i,isSelected:w,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":w},y)})})});Df.displayName="ColorSwatchPicker";var Qw=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Hf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},If=X.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=Qw,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=X.useState(e??t),f=X.useId();X.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"?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",Hf[s],i),children:[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}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(ot,{children:[jsx(qn,{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",Hf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(at,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(Xo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});If.displayName="ColorPicker";var Vf=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"}}),Ji=e=>String(e).padStart(2,"0"),rC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},oC=(e,t)=>`${Ji(e)}:${Ji(t)}`,Af=X.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]=X.useState(n??""),[g,h]=X.useState(false);X.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=rC(f||"00:00"),x=k=>{let P=k.target.value;p(P),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(P)&&r?.(P);},y=(k,P)=>{let E=Math.max(0,Math.min(23,k)),N=Math.max(0,Math.min(59,P)),S=oC(E,N);p(S),r?.(S);},w=()=>y(b+1,v),C=()=>y(b-1,v),R=()=>y(b,v+a),M=()=>y(b,v-a),T=({value:k,onIncrement:P,onDecrement:E})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:Ji(k)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:E,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:x,disabled:c,className:u(Vf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(ot,{open:g,onOpenChange:h,children:[jsxs(qn,{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:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(at,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(T,{value:b,onIncrement:w,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:v,onIncrement:R,onDecrement:M,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;y(k.getHours(),k.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Af.displayName="TimeInput";var zf=cva("flex h-10 w-full 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"}}),sC={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},iC=(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}},el=(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},Of=(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},Bf=X.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=".",radius:h="md",disabled:b,placeholder:v,...x},y)=>{let[w,C]=X.useState(r),[R,M]=X.useState(""),[T,k]=X.useState(false),P=n!==void 0?n:w,E=f??iC(a,s);X.useEffect(()=>{!T&&P!==void 0&&M(el(P,i,p,g));},[P,i,p,g,T]);let N=I=>{let V=I.target.value;if(!V){M(""),n===void 0&&C(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;M(V);let A=Of(V,p,g);if(A!==void 0){let K=A;l!==void 0&&A<l&&(K=l),c!==void 0&&A>c&&(K=c),n===void 0&&C(K),o?.(K);}},S=()=>{k(true),P!==void 0&&M(P.toString().replace(".",g));},H=()=>{k(false),M(P!==void 0?el(P,i,p,g):"");},D=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:E}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:E});return jsxs("div",{className:"relative flex items-center",children:[D&&jsx("div",{className:"absolute left-3 pointer-events-none",children:D}),jsx("input",{ref:y,type:"text",inputMode:"decimal",value:R,onChange:N,onFocus:S,onBlur:H,disabled:b,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(zf({size:t}),sC[h],D&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:T?"var(--color-foreground)":void 0},...x}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Bf.displayName="CurrencyInput";var Ff=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"}}),tl={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:"#####-####"}},dC=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},rr=e=>["#","A","*"].includes(e),cs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];dC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},nl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},Kf=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),uC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},$f=X.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 tl?tl[a].mask:a,[g,h]=X.useState(r),[b,v]=X.useState(""),[x,y]=X.useState(false),w=X.useRef(null),C=n!==void 0?n:g;X.useImperativeHandle(f,()=>w.current),X.useEffect(()=>{let k=cs(C,p,true);v(k);},[C,p]);let R=k=>{let P=k.target.value,E=k.target.selectionStart??0,N=P.replace(/[^\w]/g,""),S=cs(N,p,true),H=nl(S,p);v(S),n===void 0&&h(l?S:H),o?.(H,S),requestAnimationFrame(()=>{if(w.current){let D=uC(S,p,E);w.current.setSelectionRange(D,D);}});},M=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let P=w.current;if(!P)return;let E=P.selectionStart??0;if(k.key==="Backspace"&&E>0){let N=E-1;for(;N>0&&!rr(p[N]);)N--;let S=nl(b,p),H=0;for(let I=0;I<N&&I<p.length;I++)rr(p[I])&&H++;let D=S.slice(0,Math.max(0,H-1))+S.slice(H),L=cs(D,p,true);v(L),n===void 0&&h(l?L:D),o?.(D,L),k.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(N,N);});}},T=i?Kf(p,s):d;return jsx("input",{ref:w,type:"text",value:b,onChange:R,onKeyDown:M,onFocus:()=>y(true),onBlur:()=>y(false),disabled:c,placeholder:T,className:u(Ff({size:t}),e),style:{borderColor:x?"var(--color-foreground)":void 0},...m})});$f.displayName="MaskedInput";var bC=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"}}),Uf=[{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:"(###) ###-####"}],ds=(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},vC=e=>e.replace(/#/g,"_"),jf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Uf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,radius:p="md",...g},h)=>{let[b,v]=X.useState(r),[x,y]=X.useState(a??s),[w,C]=X.useState(false),[R,M]=X.useState(false),[T,k]=X.useState(false),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=n!==void 0?n:b,D=a??x,L=l.find(G=>G.code===D)??l[0],I=ds(H,L.format);X.useEffect(()=>{k(true);},[]),X.useEffect(()=>{if(R&&N.current){let G=N.current.getBoundingClientRect();E({top:G.bottom+4,left:G.left,width:Math.max(G.width,280)});}},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{N.current&&!N.current.contains(Y.target)&&S.current&&!S.current.contains(Y.target)&&M(false);};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{Y.key==="Escape"&&M(false);};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[R]);let V=G=>{let F=G.target.value.replace(/\D/g,"");n===void 0&&v(F);let z=ds(F,L.format),j=`${L.dialCode} ${z}`;o?.(F,j,L);},O=G=>{let Y=l.find(j=>j.code===G);if(!Y)return;a===void 0&&y(G),i?.(Y);let F=ds(H,Y.format),z=`${Y.dialCode} ${F}`;o?.(H,z,Y),M(false);},A=t==="sm"?"h-9":t==="lg"?"h-11":"h-10",K=w||R;return jsxs("div",{className:u("flex border bg-background transition-colors",{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}[p],m&&"cursor-not-allowed opacity-50"),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:N,type:"button",disabled:m,onClick:()=>M(!R),className:u("flex items-center justify-between bg-transparent px-3 py-2 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50","w-[100px] shrink-0 border-r",A),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",R&&"rotate-180")})]}),T&&R&&Ba.createPortal(jsx("div",{ref:S,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:P.top,left:P.left,minWidth:P.width},children:jsx(ke,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(G=>jsxs("div",{role:"option","aria-selected":G.code===D,onClick:()=>O(G.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:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.code===D&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:G.flag}),jsx("span",{className:"flex-1",children:G.name}),jsx("span",{className:"text-xs text-muted-foreground",children:G.dialCode})]})]},G.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:h,type:"tel",inputMode:"tel",value:I,onChange:V,onFocus:()=>C(true),onBlur:()=>C(false),disabled:m,placeholder:f??vC(L.format),className:u("flex h-10 w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",t==="sm"&&"h-8 px-2 text-xs",t==="lg"&&"h-12 px-4 text-base",d&&!c&&"pl-12",e),...g})]})]})});jf.displayName="PhoneInput";var _f=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}}),Yf=X.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=X.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 jsxs("nav",{ref:l,className:u(_f({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),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?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&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})]})});Yf.displayName="Navbar";var Xf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));Xf.displayName="NavbarBrand";var qf=X.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});qf.displayName="NavbarContent";var Zf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));Zf.displayName="NavbarItem";var Qf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));Qf.displayName="NavbarLink";var eg=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"}}),tg=X.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 jsxs("a",{ref:c,className:u(eg({variant:t,size:n,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});tg.displayName="Link";var ng=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"}}),rg=X.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]=X.useState(false);X.useEffect(()=>{let x=c?.current||window,y=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return x.addEventListener("scroll",y,{passive:true}),y(),()=>{x.removeEventListener("scroll",y);}},[n,c,g,d]);let b=x=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(x);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(ng({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:i,isIconOnly:true,radius:l,onClick:b,"aria-label":"Back to top",className:"shadow-lg",...f,children:r||jsx(ArrowUp,{className:v})})})});rg.displayName="BackTop";var SC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),DC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),og=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ps=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),ag=X.createContext(null),ar=()=>{let e=X.useContext(ag);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},sg=X.createContext(null),Zo=()=>{let e=X.useContext(sg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},ol=X.createContext(null),ig=X.createContext(null),lg=X.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=X.useState(null);return jsx(ag.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",SC({radius:n}),e),...r,children:t})})});lg.displayName="Menubar";var cg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=X.useId(),o=X.useRef(null),a=t===r,s=X.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(sg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};cg.displayName="MenubarMenu";var dg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));dg.displayName="MenubarGroup";var ug=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};ug.displayName="MenubarPortal";var mg=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(ol.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};mg.displayName="MenubarSub";var pg=X.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(ig.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));pg.displayName="MenubarRadioGroup";var fg=X.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Zo(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return 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",DC({radius:i}),e),onClick:f,onMouseEnter:p,...r})});fg.displayName="MenubarTrigger";var gg=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=X.useContext(ol);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 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",ps({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});gg.displayName="MenubarSubTrigger";var bg=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=X.useContext(ol);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let y=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=y.top,R=y.right+t;R+w.width>window.innerWidth&&(R=y.left-w.width-t),f({top:C,left:R});})();},[l,t,d]);let b=x=>{n?.(x),c(true);},v=x=>{r?.(x),c(false);};return !p||!l?null:Ba.createPortal(jsx("div",{ref:x=>{h.current=x,typeof a=="function"?a(x):a&&(a.current=x);},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",og({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});bg.displayName="MenubarSubContent";var vg=X.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=Zo(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),y=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-x.width/2:t==="end"&&(w=v.right-x.width-n),f({top:y,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]),X.useEffect(()=>{if(!c)return;let b=v=>{let x=v.target;h.current&&!h.current.contains(x)&&l.current&&!l.current.contains(x)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),X.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:Ba.createPortal(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",og({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});vg.displayName="MenubarContent";var hg=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Zo(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return 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",ps({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});hg.displayName="MenubarItem";var xg=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=Zo(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return 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",ps({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});xg.displayName="MenubarCheckboxItem";var yg=X.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Zo(),c=X.useContext(ig),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return 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",ps({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});yg.displayName="MenubarRadioItem";var Rg=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Rg.displayName="MenubarLabel";var wg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));wg.displayName="MenubarSeparator";var Cg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Cg.displayName="MenubarShortcut";var Tg=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"}}),Mg=X.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=X.Children.toArray(o);return jsx("div",{ref:s,className:u(Tg({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>X.isValidElement(l)?X.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)})});Mg.displayName="Steps";var Ng=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"}}),IC=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"}}),VC=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"}}),kg=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(Ng({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(IC({status:s,size:n})),children:s==="completed"?jsx(Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(VC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));kg.displayName="Step";var Eg=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"}}),Lg=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}}),Sg=X.createContext(null),GC=()=>{let e=X.useContext(Sg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},UC=({checked:e,indeterminate:t,disabled:n,onClick:r})=>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)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),Dg=({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:x,handleDrop:y,allowDrop:w,onDragStart:C,onDragOver:R,onDragEnter:M,onDragLeave:T,onDragEnd:k,showLine:P,showIcon:E,showHandle:N,dragIcon:S,icon:H,leafIcon:D,folderIcon:L,folderOpenIcon:I,blockNode:V,disabled:O,size:A,getAllKeys:K}=GC(),$=e.children&&e.children.length>0,G=e.isLeaf??!$,Y=o.has(e.key),F=s.has(e.key),z=c.has(e.key),j=d.has(e.key),W=g?.key===e.key,B=b===e.key,Z=!!(O||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ce=X.useMemo(()=>Z?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Z]),Q=X.useMemo(()=>S!==void 0?S:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[S,p]),le=X.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:Y,isLeaf:G}):H:G?D:Y?I:L,[e.icon,H,Y,G,D,L,I]),Be=q=>{if(!Ce)return;q.stopPropagation(),q.dataTransfer.effectAllowed="move";let De=q.currentTarget,de=De.cloneNode(true),je=document.documentElement.classList.contains("dark"),We=je?"#0a0a0a":"#ffffff",Gn=je?"#27272a":"#e4e4e7";de.style.cssText=`
|
|
43
|
+
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:y}}),jsx("div",{ref:c,id:g,onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),style:{...s,...(()=>{if(!r)return {};let C=C0[o],R=t==="vertical"||t==="both",T=t==="horizontal"||t==="both",M=[R&&f.top&&`linear-gradient(to bottom, transparent, black ${C})`,R&&f.bottom&&`linear-gradient(to top, transparent, black ${C})`,T&&f.left&&`linear-gradient(to right, transparent, black ${C})`,T&&f.right&&`linear-gradient(to left, transparent, black ${C})`].filter(Boolean);return M.length===0?{}:{maskImage:M.join(", "),WebkitMaskImage:M.join(", "),maskComposite:"intersect",WebkitMaskComposite:"source-in"}})()},className:u(t==="vertical"&&"h-full w-full overflow-y-auto overflow-x-hidden",t==="horizontal"&&"w-full overflow-x-auto overflow-y-hidden",t==="both"&&"h-full w-full overflow-auto",e),...i,children:a})]})});ke.displayName="ScrollArea";var Ld=cva("flex w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"min-h-9 py-1.5 text-xs",md:"min-h-10 py-2",lg:"min-h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Aa=X.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,size:p,radius:g,className:h,...b},v)=>{let[x,y]=X.useState(false),[w,C]=X.useState(""),[R,T]=X.useState(r||""),[M,k]=X.useState(r||[]),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),D=X.useRef(null),L=n!==void 0?n:R,I=n!==void 0?n:M,V=n!==void 0,O=B=>{d&&L===B?(V||T(""),o?.("")):(V||T(B),o?.(B)),y(false),C("");},A=B=>{let Z=I.includes(B)?I.filter(ue=>ue!==B):[...I,B];V||k(Z),o?.(Z);},K=(B,Z)=>{Z.stopPropagation();let ue=I.filter(U=>U!==B);V||k(ue),o?.(ue);},$=B=>{B.stopPropagation(),t?(V||k([]),o?.([])):(V||T(""),o?.(""));},G=e.find(B=>B.value===L),Y=e.filter(B=>I.includes(B.value)),F=Y.slice(0,m),z=Y.length-m,j=s?e.filter(B=>B.label.toLowerCase().includes(w.toLowerCase())):e;X.useEffect(()=>{if(x&&S.current){let B=S.current.getBoundingClientRect();E({top:B.bottom+4,left:B.left,width:B.width}),s&&setTimeout(()=>D.current?.focus(),0);}x||C("");},[x,s]),X.useEffect(()=>{let B=Z=>{let ue=Z.target,U=N.current&&!N.current.contains(ue),Ce=H.current&&!H.current.contains(ue);U&&Ce&&(y(false),C(""));};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]),X.useEffect(()=>{if(!x)return;let B=Z=>{H.current?.contains(Z.target)||(y(false),C(""));};return window.addEventListener("scroll",B,true),()=>window.removeEventListener("scroll",B,true)},[x]);let W=t?I.length>0:!!L;return jsxs("div",{ref:N,className:u("relative",h),...b,children:[jsxs("div",{ref:B=>{S.current=B,typeof v=="function"?v(B):v&&(v.current=B);},role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&y(!x),className:u(Ld({size:p,radius:g}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!G&&"text-muted-foreground"),children:G?G.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[F.map(B=>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:[B.label,jsx("span",{role:"button",tabIndex:0,onClick:Z=>K(B.value,Z),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&K(B.value,Z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},B.value)),z>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",z," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:$,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&$(B);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X$1,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",x&&"rotate-180")})]})]}),x&&!c&&typeof document<"u"&&Ba.createPortal(jsxs("div",{ref:H,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:P.top,left:P.left,minWidth:P.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:D,type:"text",value:w,onChange:B=>C(B.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(ke,{style:{maxHeight:f},onWheel:B=>B.stopPropagation(),children:jsx("div",{className:"p-1",children:j.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):j.map(B=>{let Z=t?I.includes(B.value):L===B.value;return jsxs("div",{role:"option","aria-selected":Z,onClick:()=>{B.disabled||(t?A(B.value):O(B.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",B.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Z&&jsx(Check,{className:"h-4 w-4"})}),B.label]},B.value)})})})]}),document.body)]})});Aa.displayName="Select";var Sd=X.createContext(null),Oo=()=>{let e=X.useContext(Sd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},wi=X.createContext({radius:"md"}),Ci=X.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),[s,i]=X.useState(-1),l=t!==void 0,c=l?t:o,d=X.useRef(null),m=X.useRef(null),f=X.useId(),p=X.useRef(new Map),g=X.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=X.useCallback((v,x)=>{p.current.set(v,x);},[]),b=X.useCallback(v=>{p.current.delete(v);},[]);return jsx(Sd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};Cn.displayName="Dropdown";var Tn=X.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Oo();return 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})});Tn.displayName="DropdownTrigger";var S0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},Mn=X.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:x,setActiveIndex:y,items:w}=Oo(),[C,R]=X.useState({top:0,left:0}),[T,M]=X.useState(t),[k,P]=X.useState(false),E=X.useRef(0);if(X.useEffect(()=>{P(true);},[]),X.useEffect(()=>{p&&(E.current=w.current.size);},[p,w]),X.useEffect(()=>{if(!p||!h.current||!b.current)return;let S=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),D=b.current.getBoundingClientRect(),L=window.innerWidth,I=window.innerHeight,V=0,O=0,A=t;switch(t){case "top":V=H.top-D.height-n,V<a&&(V=H.bottom+n,A="bottom");break;case "bottom":V=H.bottom+n,V+D.height>I-a&&(V=H.top-D.height-n,A="top");break;case "left":O=H.left-D.width-n,O<a&&(O=H.right+n,A="right");break;case "right":O=H.right+n,O+D.width>L-a&&(O=H.left-D.width-n,A="left");break}if(A==="top"||A==="bottom"){switch(r){case "start":O=H.left+o;break;case "center":O=H.left+H.width/2-D.width/2;break;case "end":O=H.right-D.width-o;break}O<a?O=a:O+D.width>L-a&&(O=L-D.width-a);}else {switch(r){case "start":V=H.top+o;break;case "center":V=H.top+H.height/2-D.height/2;break;case "end":V=H.bottom-D.height-o;break}V<a?V=a:V+D.height>I-a&&(V=I-D.height-a);}R({top:V,left:O}),M(A);};return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S,true),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S,true);}},[p,t,n,r,o,a,h]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=H.target;b.current&&!b.current.contains(D)&&h.current&&!h.current.contains(D)&&(s?.(),g(false));};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[p,g,s,h,b]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=Array.from(w.current.entries()).sort(([I],[V])=>I-V).map(([,I])=>I),L=D.length;if(L!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),x===-1||x>=L-1?y(l?0:Math.min(x+1,L-1)):y(x+1);break;case "ArrowUp":H.preventDefault(),x<=0?y(l?L-1:0):y(x-1);break;case "Home":H.preventDefault(),y(0);break;case "End":H.preventDefault(),y(L-1);break;case "Enter":case " ":H.preventDefault(),x>=0&&x<L&&D[x]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p,g,i,x,y,w,l,h]),X.useEffect(()=>{p&&x>=0&&Array.from(w.current.entries()).sort(([H],[D])=>H-D).map(([,H])=>H)[x]?.focus();},[p,x,w]),!k||!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"}[T];return Ba.createPortal(jsx("div",{ref:S=>{b.current=S,typeof f=="function"?f(S):f&&(f.current=S);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":T,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",S0[c],N,e),style:{top:C.top,left:C.left},...m,children:jsx(wi.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Dd=0,Hd={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=X.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}=Oo(),{radius:b}=X.useContext(wi),[v]=X.useState(()=>Dd++),x=X.useRef(null);X.useEffect(()=>(!n&&x.current&&g(v,x.current),()=>{h(v);}),[n,v,g,h]);let y=R=>{if(n){R.preventDefault();return}o?.(R),r?.(),m(false);},w=R=>{a?.(R),n||p(v);};return jsxs("div",{ref:R=>{x.current=R,typeof d=="function"?d(R):d&&(d.current=R);},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",Hd[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:y,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Ti=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ti.displayName="DropdownSection";var Id=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Id.displayName="DropdownSeparator";var Vd=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Vd.displayName="DropdownShortcut";var Ad=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Ad.displayName="DropdownGroup";var zd=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),{contentRef:s}=Oo(),i=t!==void 0,l=i?t:o,c=X.useRef(null),d=X.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsx(Ci.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};zd.displayName="DropdownSub";var Od=X.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=X.useContext(Ci),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Oo(),{radius:p}=X.useContext(wi),[g]=X.useState(()=>Dd++),h=X.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:x}=c;X.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let y=R=>{o?.(R),n||(d(g),v(true));},w=R=>{a?.(R);},C=R=>{s?.(R),(R.key==="ArrowRight"||R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(true));};return jsxs("div",{ref:R=>{h.current=R,x.current=R,typeof l=="function"?l(R):l&&(l.current=R);},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",Hd[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:y,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Od.displayName="DropdownSubTrigger";var Bd=X.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=X.useContext(Ci);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=X.useState({top:0,left:0}),[h,b]=X.useState(false),v=X.useRef(null),x=X.useRef(null);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let R=m.current.getBoundingClientRect(),T=v.current.getBoundingClientRect(),M=window.innerWidth,k=window.innerHeight,P=R.top+n,E=R.right+t;E+T.width>M-r&&(E=R.left-T.width-t),P+T.height>k-r&&(P=k-T.height-r),P<r&&(P=r),g({top:P,left:E});})();},[c,t,n,r,m]);let y=C=>{o?.(C),x.current&&(clearTimeout(x.current),x.current=null),d(true);},w=C=>{a?.(C);let R=C.relatedTarget;m.current?.contains(R)||f?.current?.contains(R)||(x.current=setTimeout(()=>{d(false);},100));};return X.useEffect(()=>()=>{x.current&&clearTimeout(x.current);},[]),!h||!c?null:Ba.createPortal(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:y,onMouseLeave:w,...s}),document.body)});Bd.displayName="DropdownSubContent";var D0=Ti;var $d=X.createContext(null),Mi=()=>{let e=X.useContext($d);if(!e)throw new Error("Popover components must be used within a Popover");return e},ot=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useId(),d=X.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsx($d.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=X.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Mi(),c=f=>{t?.(f),s(!a);},d=f=>{i.current=f,typeof o=="function"?o(f):o&&(o.current=f);},m={"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r};return n&&X.isValidElement(e)?X.cloneElement(e,{...m,ref:d,onClick:f=>{e.props.onClick?.(f),c(f);}}):jsx("button",{ref:d,type:"button",...m,children:e})});qn.displayName="PopoverTrigger";var an=X.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Mi();return jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});an.displayName="PopoverAnchor";var at=X.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}=Mi(),[v,x]=X.useState({top:0,left:0}),[y,w]=X.useState(false),[C,R]=X.useState(null);if(X.useEffect(()=>{w(true);},[]),X.useEffect(()=>{if(!p||!h.current||!C)return;let M=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),P=C.getBoundingClientRect(),E=0,N=0;switch(n){case "top":E=k.top-P.height-r;break;case "bottom":E=k.bottom+r;break;case "left":N=k.left-P.width-r;break;case "right":N=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":N=k.left+a;break;case "center":N=k.left+k.width/2-P.width/2;break;case "end":N=k.right-P.width-a;break}else switch(o){case "start":E=k.top+a;break;case "center":E=k.top+k.height/2-P.height/2;break;case "end":E=k.bottom-P.height-a;break}x({top:E,left:N});};return M(),window.addEventListener("resize",M),window.addEventListener("scroll",M,true),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true);}},[p,n,r,o,a,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{let P=k.target;C&&C.contains(P)||h.current&&h.current.contains(P)||P.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",M),()=>document.removeEventListener("mouseup",M)},[p,g,s,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[p,g,i]),!y||!p)return null;let T={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 Ba.createPortal(jsx("div",{ref:M=>{R(k=>k!==M?M:k),typeof f=="function"?f(M):f&&(f.current=M);},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",T,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});at.displayName="PopoverContent";var Gd=X.createContext(null),ki=()=>{let e=X.useContext(Gd);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},Ud=X.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]=X.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsx(Gd.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});Ud.displayName="Tabs";var Ni={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"}},jd=X.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=ki(),l=X.useRef(null),[c,d]=X.useState({opacity:0});X.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let x=g.getBoundingClientRect(),y=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:y.height,transform:`translateY(${y.top-x.top}px)`,opacity:1}:{width:y.width,height:2,transform:`translateX(${y.left-x.left}px)`,opacity:1}):o==="solid"&&d(w?{width:y.width,height:y.height,transform:`translateY(${y.top-x.top}px)`,opacity:1}:{width:y.width,height:y.height,transform:`translateX(${y.left-x.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 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",Ni[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Ni[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});jd.displayName="TabsList";var Wd=X.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=ki(),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 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",Ni[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});Wd.displayName="TabsTrigger";var _d=X.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=ki(),s=a===t;return s?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});_d.displayName="TabsContent";var Yd=[{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 I0(e,t=Yd){return e?t.filter(r=>r.test(e)).length/t.length:0}function V0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function A0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Fo=0,Pi=null;function Gt(){Fo===0&&(Pi=document.body.style.overflow,document.body.style.overflow="hidden"),Fo++;}function Ut(){Fo--,Fo<=0&&(Fo=0,document.body.style.overflow=Pi??"",Pi=null);}var qd=X.createContext(null),Oa=()=>{let e=X.useContext(qd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},Zd=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=X.useState(t),s=e!==void 0,i=s?e:o,l=X.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(qd.Provider,{value:{open:i,onOpenChange:l},children:r})};Zd.displayName="Sheet";var Qd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Qd.displayName="SheetTrigger";var Jd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});Jd.displayName="SheetClose";var Li=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Li.displayName="SheetPortal";var eu=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Oa();return r?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});eu.displayName="SheetOverlay";var tu=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"}}),B0=(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],nu=X.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Oa(),[d,m]=X.useState(false),[,f]=X.useState(false);return X.useEffect(()=>{if(l)m(true),f(true),Gt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Ut();}},[l]),X.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:jsxs(Li,{children:[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"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(tu({side:e}),B0(e,l),t),...s,children:[!r&&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:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});nu.displayName="SheetContent";var ru=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});ru.displayName="SheetHeader";var ou=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ou.displayName="SheetFooter";var au=X.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));au.displayName="SheetTitle";var su=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));su.displayName="SheetDescription";var $0=({theme:e="system",...t})=>jsx(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 iu=X.createContext(null),Fa=()=>{let e=X.useContext(iu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Si=X.createContext(null),lu=({children:e,onOpenChange:t})=>{let[n,r]=X.useState(false),[o,a]=X.useState({x:0,y:0}),s=X.useId(),i=X.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(iu.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};lu.displayName="ContextMenu";var cu=X.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Fa(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});cu.displayName="ContextMenuTrigger";var du=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));du.displayName="ContextMenuGroup";var uu=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};uu.displayName="ContextMenuPortal";var mu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Si.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};mu.displayName="ContextMenuSub";var pu=X.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Fa(),[d,m]=X.useState(false),[f,p]=X.useState(l),g=X.useRef(null);return X.useEffect(()=>{m(true);},[]),X.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:x}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),x+b.height>window.innerHeight&&(x=window.innerHeight-b.height-8),p({x:v,y:x});},[s,l]),X.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]),X.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:Ba.createPortal(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)});pu.displayName="ContextMenuContent";var fu=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=X.useContext(Si);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 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,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});fu.displayName="ContextMenuSubTrigger";var gu=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=X.useContext(Si);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=X.useState({top:0,left:0}),[f,p]=X.useState(false),g=X.useRef(null);X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let x=c.current.getBoundingClientRect(),y=g.current.getBoundingClientRect(),w=x.top,C=x.right+t;C+y.width>window.innerWidth&&(C=x.left-y.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:Ba.createPortal(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 bu=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Fa(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return 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})});bu.displayName="ContextMenuItem";var vu=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Fa(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return 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:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});vu.displayName="ContextMenuCheckboxItem";var hu=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));hu.displayName="ContextMenuSection";var xu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));xu.displayName="ContextMenuSeparator";var yu=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});yu.displayName="ContextMenuShortcut";var wu=X.createContext(null),_0=()=>{let e=X.useContext(wu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Cu=X.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]=X.useState(n),p=t!==void 0,g=p?t:m,h=X.useId(),b=v=>{p||f(v),r?.(v);};return 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:jsx(wu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});Cu.displayName="RadioGroup";var Tu=X.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=_0(),s=a.value===t,i=n||a.disabled;return jsxs(Fragment,{children:[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&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),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}})]})});Tu.displayName="RadioGroupItem";var $a=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"}}),Mu=X.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=X.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 jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u($a({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Mu.displayName="Toggle";var Nu=X.createContext(null),Q0=()=>{let e=X.useContext(Nu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},ku=X.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=X.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(x=>x!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(Nu.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});ku.displayName="ToggleGroup";var Pu=X.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=Q0(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u($a({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Pu.displayName="ToggleGroupItem";var Ua=X.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]=X.useState(n),h=t!==void 0,b=h?t:p,v=X.useRef(null),[x,y]=X.useState(false),[w,C]=X.useState(null),R=(H,D)=>{if(!v.current)return b[0];let L=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-L.left)/L.width:I=1-(D-L.top)/L.height,I=Math.max(0,Math.min(1,I));let V=a+I*(s-a),O=Math.round(V/i)*i;return Math.max(a,Math.min(s,O))},T=(H,D)=>{let L=[...b];L[D]=H,D>0&&H<b[D-1]&&(L[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(L[D]=b[D+1]),h||g(L),r?.(L);},M=(H,D)=>{l||(H.preventDefault(),y(true),C(D),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!x||w===null||l)return;let D=R(H.clientX,H.clientY);T(D,w);},P=()=>{x&&(y(false),C(null),o?.(b));},E=H=>{if(l)return;let D=R(H.clientX,H.clientY),L=0,I=Math.abs(b[0]-D);for(let V=1;V<b.length;V++){let O=Math.abs(b[V]-D);O<I&&(I=O,L=V);}T(D,L),o?.([...b.slice(0,L),D,...b.slice(L+1)]);},N=(H,D)=>{if(l)return;let L=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),L=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),L=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),L=a;break;case "End":H.preventDefault(),L=s;break;default:return}T(L,D),o?.([...b.slice(0,D),L,...b.slice(D+1)]);},S=H=>(H-a)/(s-a)*100;return 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:[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:E,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${S(b[0])}%`:0,right:`${100-S(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${S(b[0])}%`:0,top:`${100-S(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,D)=>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",x&&w===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${S(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:L=>M(L,D),onPointerMove:k,onPointerUp:P,onPointerCancel:P,onKeyDown:L=>N(L,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ua.displayName="Slider";var Eu=X.createContext(null),Lu=()=>{let e=X.useContext(Eu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Hi=X.createContext(null),Su=()=>{let e=X.useContext(Hi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Du=X.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=X.useState(()=>t==="single"?r?[r]:[]:r||[]),f=X.useRef(new Map),p=X.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=w=>{if(t==="single"){let R=h.includes(w)&&a?[]:[w];g||m(R),o?.(R[0]||"");}else {let C=h.includes(w)?h.filter(R=>R!==w):[...h,w];g||m(C),o?.(C);}},v=X.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),x=X.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),y=X.useCallback(w=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,T;f.current.forEach((N,S)=>{N===R&&(T=S);});let M=T?C.indexOf(T):-1,k;switch(w){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=M===-1?0:(M+1)%C.length;break;case "prev":k=M===-1?C.length-1:(M-1+C.length)%C.length;break}let P=C[k];f.current.get(P)?.focus();},[]);return jsx(Eu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:x,focusTrigger:y},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Du.displayName="Accordion";var Hu=X.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Lu(),d=c.value.includes(t),m=n||c.disabled||false,f=X.useId(),p=X.useId();return r!==void 0?jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(Iu,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:r}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(Vu,{children:s})]})}):jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children: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})})});Hu.displayName="AccordionItem";var Iu=X.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Lu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=Su(),f=X.useRef(null);X.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 jsx("h3",{className:"flex",children: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,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});Iu.displayName="AccordionTrigger";var Vu=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Su();return 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:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});Vu.displayName="AccordionContent";var zu=X.createContext(null),Ou=()=>{let e=X.useContext(zu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},Bu=X.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=X.useState(n),m=t!==void 0,f=m?t:c,p=X.useId(),g=X.useId(),h=b=>{o||(m||d(b),r?.(b));};return jsx(zu.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Ii,{})]}),s]})})});Bu.displayName="Collapsible";var Ii=X.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=Ou();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Ii.displayName="CollapsibleTrigger";var Fu=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=Ou(),c=X.useRef(null),[d,m]=X.useState(0),[f,p]=X.useState(false),[g,h]=X.useState(a);X.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Fu.displayName="CollapsibleContent";var _a=X.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 jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsx("span",{className:"text-muted-foreground",children:r}),o&&jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),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:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});_a.displayName="Progress";var Uu=X.createContext(null),ju=()=>{let e=X.useContext(Uu);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},Wu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=X.useState(n),c=t!==void 0,d=c?t:i,m=X.useRef(null),f=X.useId(),p=X.useRef(null),g=X.useRef(null),h=X.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 X.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]),X.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(Uu.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};Wu.displayName="HoverCard";var _u=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=ju();return 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})});_u.displayName="HoverCardTrigger";var Yu=X.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}=ju(),[g,h]=X.useState({top:0,left:0}),[b,v]=X.useState(false),x=X.useRef(null);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!d||!f.current||!x.current)return;(()=>{if(!f.current||!x.current)return;let T=f.current.getBoundingClientRect(),M=x.current.getBoundingClientRect(),k=0,P=0;switch(t){case "top":k=T.top-M.height-n;break;case "bottom":k=T.bottom+n;break;case "left":P=T.left-M.width-n;break;case "right":P=T.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":P=T.left+o;break;case "center":P=T.left+T.width/2-M.width/2;break;case "end":P=T.right-M.width-o;break}else switch(r){case "start":k=T.top+o;break;case "center":k=T.top+T.height/2-M.height/2;break;case "end":k=T.bottom-M.height-o;break}h({top:k,left:P});})();},[d,t,n,r,o,f]);let y=R=>{a?.(R),m(true);},w=R=>{s?.(R),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 Ba.createPortal(jsx("div",{ref:R=>{x.current=R,typeof c=="function"?c(R):c&&(c.current=R);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:y,onMouseLeave:w,...l,children:i}),document.body)});Yu.displayName="HoverCardContent";var Xu=X.createContext({size:"md",variant:"default",radius:"md"}),Xa=()=>X.useContext(Xu);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var oR=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-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),aR=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"}}),sR=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"}}),qu=X.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(Xu.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));qu.displayName="Breadcrumb";var Zu=X.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=Xa();return jsx("ol",{ref:n,className:u(oR({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});Zu.displayName="BreadcrumbList";var Qu=X.forwardRef(({className:e,...t},n)=>{let{size:r}=Xa();return 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})});Qu.displayName="BreadcrumbItem";var Ju=X.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Ju.displayName="BreadcrumbLink";var em=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));em.displayName="BreadcrumbPage";var tm=({children:e,className:t,...n})=>{let{size:r}=Xa();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(aR({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};tm.displayName="BreadcrumbSeparator";var nm=({className:e,...t})=>{let{size:n}=Xa();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(sR({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};nm.displayName="BreadcrumbEllipsis";var am=X.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));am.displayName="AspectRatio";var lm=X.createContext(null),Ai=()=>{let e=X.useContext(lm);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},cm=X.createContext(null),dm=()=>{let e=X.useContext(cm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},um=X.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=X.useState(null);return jsx(lm.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(zi,{})]})})});um.displayName="NavigationMenu";var mm=X.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Ai();return 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})});mm.displayName="NavigationMenuList";var pm=X.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Ai(),s=X.useId(),i=X.useRef(null),l=o===s,c=X.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(cm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});pm.displayName="NavigationMenuItem";var fm=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=X.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=dm(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return 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(fm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(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 bm=X.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=dm(),l=X.useRef(null),[c,d]=X.useState({top:0,left:0});X.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?Ba.createPortal(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});bm.displayName="NavigationMenuContent";var vm=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"),hm=X.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:u(vm(),t&&"bg-accent text-accent-foreground",e),...n}));hm.displayName="NavigationMenuLink";var zi=X.forwardRef((e,t)=>null);zi.displayName="NavigationMenuViewport";var xm=X.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Ai();return r?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:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});xm.displayName="NavigationMenuIndicator";var Cm=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Nt=X.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:r,type:"button",className:u(Cm({size:t}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:a,height:a}})})});Nt.displayName="CloseButton";var qa=X.createContext(null);function vR(){let e=X.useContext(qa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return X.useContext(qa)}var hR="16rem",xR="18rem",yR="3rem",RR="b",wR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},CR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Oi=X.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,x]=X.useState(false),[y,w]=X.useState(false),[C,R]=X.useState(e),T=t??C,M=X.useCallback(N=>{let S=typeof N=="function"?N(T):N;n?n(S):R(S);},[n,T]);X.useEffect(()=>{let N=()=>{x(window.innerWidth<768);};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);let k=X.useCallback(()=>b?M(N=>!N):v?w(N=>!N):M(N=>!N),[v,M,w,b]);X.useEffect(()=>{if(b)return;let N=S=>{S.key===RR&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),k());};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[k,b]);let P=T?"expanded":"collapsed",E=X.useMemo(()=>({placement:r,state:P,open:T,setOpen:M,isMobile:v,openMobile:y,setOpenMobile:w,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,P,T,M,v,y,w,k,l,h,o,a,s,i]);return b?jsx(qa.Provider,{value:E,children:jsx(Drawer.Root,{open:T,onOpenChange:M,direction:r,dismissible:s,children:f})}):jsx(qa.Provider,{value:E,children:jsx(Wn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":hR,"--drawer-width-icon":yR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Oi.displayName="Drawer";var Mm=X.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=kn();if(!s)return 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 jsx(Fragment,{children:r});if(l==="none")return 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 jsx(TR,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return 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: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: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 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:[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]")}),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: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})})]})});Mm.displayName="DrawerSidebar";var TR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=X.useState(false);return X.useEffect(()=>{a(true);},[]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),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":xR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Nm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return 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:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});Nm.displayName="DrawerTrigger";var km=X.forwardRef(({className:e,children:t,...n},r)=>{let o=kn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque";if(a){let c=s==="top"||s==="bottom",d=s==="left"||s==="right",m=d?wR[i]:CR[i],f={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},p={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 jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",f[l])}),jsxs(Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",p[s],e),style:{...d?{width:m,height:"100%"}:{},...c?{maxHeight:m}:{},...n.style},...n,children:[c&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});km.displayName="DrawerContent";var Pm=X.forwardRef(({className:e,hideCloseButton:t,children:n,...r},o)=>{let a=kn(),s=a?.hideCloseButton??false,i=!t&&!s;return jsxs("div",{ref:o,"data-drawer":"header",className:u("flex flex-col gap-2 p-4 relative",e),...r,children:[n,i&&jsx(Nt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});Pm.displayName="DrawerHeader";var Em=X.forwardRef(({className:e,...t},n)=>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}));Em.displayName="DrawerBody";var Lm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Lm.displayName="DrawerFooter";var Sm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Sm.displayName="DrawerTitle";var Dm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Dm.displayName="DrawerDescription";var Hm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Nt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Hm.displayName="DrawerClose";var Im=X.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=kn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return 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?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Im.displayName="DrawerToggle";var Vm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Vm.displayName="DrawerSeparator";var Am=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));Am.displayName="DrawerMenu";var zm=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));zm.displayName="DrawerMenuItem";var Om=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"}}),Bm=X.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=kn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(Om({variant:t,size:n}),o),...s,children:a});return r?jsxs(_n,{children:[jsx(Yn,{children:m}),jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});Bm.displayName="DrawerMenuButton";var Fm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));Fm.displayName="DrawerGroup";var Km=X.forwardRef(({className:e,...t},n)=>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}));Km.displayName="DrawerGroupLabel";var $m=X.forwardRef(({className:e,...t},n)=>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}));$m.displayName="DrawerInset";var MR=Oi;var Um=X.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));Um.displayName="Table";var jm=X.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));jm.displayName="TableHeader";var Wm=X.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));Wm.displayName="TableBody";var _m=X.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));_m.displayName="TableFooter";var Ym=X.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ym.displayName="TableRow";var Xm=X.forwardRef(({className:e,...t},n)=>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}));Xm.displayName="TableHead";var qm=X.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));qm.displayName="TableCell";var Zm=X.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));Zm.displayName="TableCaption";function SR({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,...x},y){let[w,C]=X.useState(new Set),[R,T]=X.useState({columnId:null,direction:null}),[M,k]=X.useState({pageIndex:0,pageSize:m[0]||10}),P=o??w,E=l??R,N=f??M,S=F=>{a?a(F):C(F);},H=F=>{c?c(F):T(F);},D=F=>{p?p(F):k(F);},L=X.useMemo(()=>{if(!E.columnId||!E.direction)return t;let F=n.find(z=>z.id===E.columnId);return F?[...t].sort((z,j)=>{let W=F.accessor(z),B=F.accessor(j);if(W===B)return 0;if(W==null)return 1;if(B==null)return -1;let Z=String(W).localeCompare(String(B),void 0,{numeric:true});return E.direction==="asc"?Z:-Z}):t},[t,E,n]),I=X.useMemo(()=>{if(!d)return L;let F=N.pageIndex*N.pageSize;return L.slice(F,F+N.pageSize)},[L,d,N]),V=Math.ceil(L.length/N.pageSize),O=F=>{if(F===true){let z=new Set(I.map((j,W)=>s(j,W)));S(z);}else S(new Set);},A=(F,z)=>{let j=new Set(P);z?j.add(F):j.delete(F),S(j);},K=I.length>0&&I.every((F,z)=>P.has(s(F,z))),$=I.some((F,z)=>P.has(s(F,z))),G=F=>{if(!n.find(W=>W.id===F)?.sortable&&!i)return;let j="asc";E.columnId===F&&(E.direction==="asc"?j="desc":E.direction==="desc"&&(j=null)),H({columnId:j?F:null,direction:j});},Y=F=>E.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):E.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:y,className:u("w-full",e),...x,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(zo,{checked:K?true:$?"indeterminate":false,onCheckedChange:O,"aria-label":"Select all"})}),n.map(F=>{let z=F.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",z&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>z&&G(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,z&&Y(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):I.map((F,z)=>{let j=s(F,z),W=P.has(j);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&z%2===1&&"bg-muted/30",W&&"bg-muted"),"data-state":W?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(zo,{checked:W,onCheckedChange:B=>A(j,!!B),"aria-label":`Select row ${z+1}`})}),n.map(B=>jsx("td",{className:"p-4 align-middle",children:B.cell?B.cell(F,z):B.accessor(F)},B.id))]},j)})})]})}),d&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:N.pageSize,onChange:F=>D({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(F=>jsx("option",{value:F,children:F},F))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",N.pageIndex+1," of ",V||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex-1}),disabled:N.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex+1}),disabled:N.pageIndex>=V-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var DR=X.forwardRef(SR);var Bi=["January","February","March","April","May","June","July","August","September","October","November","December"];function BR({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=X.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Bi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Bi.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[80px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function FR(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(BR,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 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:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 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:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Bi[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[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:jsx(ChevronLeft,{className:"h-4 w-4"})}),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:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function eo({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=X.useMemo(()=>FR(r,o,a),[r,o,a]);return jsx(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})}eo.displayName="Calendar";var tp=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});tp.displayName="Pagination";var np=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));np.displayName="PaginationContent";var rp=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:u("",e),...t}));rp.displayName="PaginationItem";var Za=({className:e,isActive:t,size:n="sm",isIconOnly:r=true,...o})=>jsx("a",{"aria-current":t?"page":void 0,className:u(Xr({variant:t?"solid":"light",size:n}),r&&"!px-0 !w-9",e),...o});Za.displayName="PaginationLink";var op=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});op.displayName="PaginationPrevious";var ap=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});ap.displayName="PaginationNext";var sp=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});sp.displayName="PaginationEllipsis";var Ko=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));Ko.displayName="VisuallyHidden";var lp={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},jR={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},cp=cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Gi=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Ja=X.createContext(null),kr=()=>{let e=X.useContext(Ja);if(!e)throw new Error("Modal components must be used within a Modal");return e},up=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=X.useState(false),b=e!==void 0,v=b?e:g,[x,y]=X.useState(false),w=X.useRef(null),C=X.useId(),R=X.useId();X.useEffect(()=>{y(true);},[]);let T=X.useCallback(E=>{b||h(E),t?.(E);},[b,t]);X.useEffect(()=>{if(v)return Gt(),()=>Ut()},[v]),X.useEffect(()=>{if(!v||i)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[v,i,T]);let M=E=>{s&&E.target===E.currentTarget&&T(false);},k=n?X.isValidElement(n)?X.cloneElement(n,{onClick:E=>{n.props.onClick?.(E),T(true);}}):jsx("button",{type:"button",onClick:()=>T(true),children:n}):null,P=()=>!x||!v?null:d==="outside"?Ba.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(cp(),lp[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx(Ko,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(cp(),lp[l]),onClick:M,"aria-hidden":"true"}),jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u(Gi({size:m}),jR[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(Ko,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxs(Ja.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:d,titleId:C,descriptionId:R},children:[k,P()]})});up.displayName="Modal";var es=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=X.useState(n),i=t!==void 0,l=i?t:a,c=X.useId(),d=X.useId(),m=X.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Ja.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};es.displayName="ModalRoot";var mp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});mp.displayName="ModalTrigger";var Ui=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Ui.displayName="ModalPortal";var ji=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=kr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});ji.displayName="ModalOverlay";var pp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});pp.displayName="ModalClose";var ts=X.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=kr(),[f,p]=X.useState(false);return X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),X.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Ui,{children:[jsx(ji,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Gi({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});ts.displayName="ModalContent";var fp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});fp.displayName="ModalHeader";var gp=({className:e,children:t})=>(X.useContext(Ja)?.scrollBehavior??"inside")==="inside"?jsx(ke,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});gp.displayName="ModalBody";var bp=({className:e,children:t,...n})=>{let{onOpenChange:r}=kr();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:X.Children.map(t,o=>X.isValidElement(o)?X.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};bp.displayName="ModalFooter";var vp=X.forwardRef(({className:e,...t},n)=>{let{titleId:r}=kr();return jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});vp.displayName="ModalTitle";var hp=X.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=kr();return jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});hp.displayName="ModalDescription";var Wi=X.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Wi.displayName=Command.displayName;var YR=({children:e,...t})=>jsx(es,{...t,children:jsx(ts,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(Wi,{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})})}),xp=X.forwardRef(({className:e,...t},n)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(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})]}));xp.displayName=Command.Input.displayName;var yp=X.forwardRef(({className:e,children:t,...n},r)=>jsx(ke,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:u("overflow-hidden",e),...n,children:t})}));yp.displayName=Command.List.displayName;var Rp=X.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Rp.displayName=Command.Empty.displayName;var wp=X.forwardRef(({className:e,...t},n)=>jsx(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}));wp.displayName=Command.Group.displayName;var Cp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Cp.displayName=Command.Separator.displayName;var Tp=X.forwardRef(({className:e,children:t,startContent:n,endContent:r,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 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),...o,children:[n,t&&jsx("span",{className:"flex-1",children:t}),r]}));Tp.displayName=Command.Item.displayName;var Mp=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Mp.displayName="CommandShortcut";var ZR={sm:{input:"h-9 px-2 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{input:"h-10 px-3 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{input:"h-11 px-4 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},QR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},kp=X.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,size:s="md",radius:i="md",...l},c)=>{let[d,m]=X.useState(false),[f,p]=X.useState(false),g=ZR[s],h=QR[i];return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:u("flex w-full border border-input bg-background py-2 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",g.input,h,t&&"pr-10",e),ref:c,disabled:n,style:{...a,borderColor:f?"var(--color-foreground)":void 0},onFocus:b=>{p(true),r?.(b);},onBlur:b=>{p(false),o?.(b);},...l}),t&&jsx("button",{type:"button",className:u("absolute right-0 top-0 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",g.button),onClick:()=>m(!d),disabled:n,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:g.icon}):jsx(Eye,{className:g.icon})})]})});kp.displayName="PasswordInput";var nw={sm:{wrapper:"h-9",input:"h-9 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{wrapper:"h-10",input:"h-10 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{wrapper:"h-11",input:"h-11 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},rw={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Pp=X.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,size:c="md",radius:d="md",...m},f)=>{let[p,g]=X.useState(s),[h,b]=X.useState(false),v=a!==void 0,x=v?a:p,y=nw[c],w=rw[d],C=N=>{N!==void 0&&(r!==void 0&&N<r&&(N=r),o!==void 0&&N>o&&(N=o)),v||g(N),i?.(N);},R=()=>{C((x??0)+n);},T=()=>{C((x??0)-n);},M=N=>{let S=N.target.value;if(S==="")C(void 0);else {let H=parseFloat(S);isNaN(H)||C(H);}},k=N=>{N.key==="ArrowUp"?(N.preventDefault(),R()):N.key==="ArrowDown"&&(N.preventDefault(),T());},P=r===void 0||(x??0)>r,E=o===void 0||(x??0)<o;return t?jsxs("div",{className:u("relative flex items-center border transition-colors",y.wrapper,w,h?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",y.button),onClick:T,disabled:l||!P,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:y.icon})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("min-w-0 flex-1 bg-background text-center focus:outline-none disabled:cursor-not-allowed",y.input),ref:f,value:x??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m}),jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",y.button),onClick:R,disabled:l||!E,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:y.icon})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex w-full bg-background px-3 py-2 text-center border placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",y.input,w,h?"border-foreground":"border-input",e),ref:f,value:x??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m})});Pp.displayName="NumberInput";var Dp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Ep=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"}}),Hp=X.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=jsxs(Cr,{className:u(Ep({size:r})),children:[m.src&&jsx(Qr,{src:m.src,alt:m.alt||""}),jsx(Tr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(_n,{children:[jsx(Yn,{children:p}),jsx(Xn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Dp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(Cr,{className:u(Ep({size:r})),children:jsxs(Tr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(Wn,{delayDuration:300,children:d}):d});Hp.displayName="AvatarGroup";var Ip=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"}}),Vp=X.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]=X.useState(n),[b,v]=X.useState(null),x=t!==void 0,y=x?t:g,w=b!==null?b:y,C=S=>{l||c||(x||h(S),r?.(S));},R=(S,H=false)=>{let D=i&&H?S+.5:S+1;C(D);},T=(S,H)=>{if(l||c)return;let D=S.currentTarget.getBoundingClientRect(),L=i&&S.clientX<D.left+D.width/2;v(L?H+.5:H+1);},M=()=>{v(null);},k=s==="heart"?Heart:Star,P=S=>w>=S+1?"full":w>=S+.5?"half":"empty",E=d?{color:d,fill:d}:{},N=m?{color:m}:{};return jsx("div",{ref:p,className:u(Ip({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:M,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(S,H)=>{let D=P(H);return 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:L=>{let I=L.currentTarget.getBoundingClientRect(),V=i&&L.clientX<I.left+I.width/2;R(H,V);},onMouseMove:L=>T(L,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":y===H+1,children:[jsx(k,{className:u("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?N:void 0}),D!=="empty"&&jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...E,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Vp.displayName="Rating";var zp=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-md",md:"rounded-lg",lg:"rounded-xl",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}}),dw={sm:"sm",md:"sm",lg:"sm"},Op=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(zp({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(Nt,{size:dw[r??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Op.displayName="Chip";var Bp=createContext({direction:"horizontal"}),hw=({className:e,direction:t="horizontal",children:n,...r})=>jsx(Bp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),xw=Panel,yw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(Bp),o=r==="vertical";return jsx(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&&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:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var Gp=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"}}),ww={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"}},Fp={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)"},Up=X.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=ww[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(Gp({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Fp[n]||Fp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});Up.displayName="CircularProgress";var jp=X.createContext(null),Mw=()=>{let e=X.useContext(jp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Wp=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"}}),_p=X.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,radius:d="md",children:m,...f},p)=>{let[g,h]=X.useState(o),[b,v]=X.useState(0),[x,y]=X.useState(false),w=X.useRef(null),C=r!==void 0?r:g;X.useImperativeHandle(p,()=>w.current),X.useEffect(()=>{v(Math.min(C.length,n-1));},[C,n]),X.useEffect(()=>{C.length===n&&s&&s(C);},[C,n,s]);let R=N=>{let S=N.target.value;if(i&&S){let H=new RegExp(i.replace("^","").replace("$","").replace("+",""));S=S.split("").filter(D=>H.test(D)).join("");}S=S.slice(0,n),r===void 0&&h(S),a?.(S);},T=N=>{N.key==="ArrowLeft"?v(S=>Math.max(0,S-1)):N.key==="ArrowRight"&&v(S=>Math.min(C.length,n-1,S+1));},M=()=>{w.current?.focus();},k=()=>{y(true),v(Math.min(C.length,n-1));},P=()=>{y(false);},E={value:C,activeIndex:x?b:-1,maxLength:n,disabled:l,radius:d};return jsx(jp.Provider,{value:E,children:jsxs("div",{className:u(Wp({size:c}),t),onClick:M,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:C,onChange:R,onKeyDown:T,onFocus:k,onBlur:P,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...f}),m]})})});_p.displayName="InputOTP";var Yp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center",e),...t}));Yp.displayName="InputOTPGroup";var Nw={none:"first:rounded-l-none",sm:"first:rounded-l-md",md:"first:rounded-l-lg",lg:"first:rounded-l-xl",full:"first:rounded-l-full"},kw={none:"last:rounded-r-none",sm:"last:rounded-r-md",md:"last:rounded-r-lg",lg:"last:rounded-r-xl",full:"last:rounded-r-full"},Xp=X.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s,radius:i}=Mw(),l=o[e]||"",c=a===e,d=c&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":c,"data-filled":!!l,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:border-l",Nw[i],kw[i],c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[l,d&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});Xp.displayName="InputOTPSlot";var qp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));qp.displayName="InputOTPSeparator";var Jp=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 border-zinc-300 bg-transparent dark:border-zinc-700",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 border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover: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"}}),ef=X.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]=X.useState(""),x=X.useRef(null);X.useImperativeHandle(h,()=>x.current);let y=P=>{let E=P.trim();if(E.length<i||E.length>l||s&&r.length>=s||!d&&r.some(S=>S.text.toLowerCase()===E.toLowerCase()))return;let N={id:crypto.randomUUID(),text:E};o?.([...r,N]),v("");},w=P=>{m||f||o?.(r.filter(E=>E.id!==P));},C=P=>{if(c.includes(P.key)){if(P.key==="Tab"&&!b)return;P.preventDefault(),y(b);}P.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},R=P=>{let E=P.target.value;if(E.includes(",")){E.split(",").forEach(S=>{S.trim()&&y(S);});return}v(E);},T=P=>{P.preventDefault(),P.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(S=>{y(S);});},M=()=>{x.current?.focus();},k=s?r.length>=s:false;return 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:M,children:[r.map(P=>p?p(P,()=>w(P.id)):jsxs("span",{className:u(Jp({variant:t,size:n})),children:[P.text,!m&&!f&&jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),w(P.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${P.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},P.id)),!k&&!f&&jsx("input",{ref:x,type:"text",value:b,onChange:R,onKeyDown:C,onPaste:T,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})]})});ef.displayName="TagInput";var nf=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=X.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(nf({size:t,className:e})),...i,children:[n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));rf.displayName="EmptyState";var af=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 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 border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),sf=X.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"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(af({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});sf.displayName="StatCard";var qi=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"}}),Ow=({checked:e,disabled:t,onClick:n})=>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&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function Bw({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:x,...y},w){let[C,R]=X.useState(null),[T,M]=X.useState(null),[k,P]=X.useState(new Set(f)),E=m!==void 0,N=E?new Set(m):k,[S,H]=X.useState(new Set(b)),D=h!==void 0,L=D?new Set(h):S,I=(z,j)=>{R(j),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/plain",String(j));},V=(z,j)=>{z.preventDefault(),!(C===null||C===j)&&M(j);},O=()=>{M(null);},A=(z,j)=>{if(z.preventDefault(),!r||C===null||C===j){R(null),M(null);return}let W=[...r],[B]=W.splice(C,1);W.splice(j,0,B),s?.(W),R(null),M(null);},K=()=>{R(null),M(null);},$=X.useCallback((z,j)=>{if(!r)return;let W=new Set(N),B=!W.has(z.id);d?B?W.add(z.id):W.delete(z.id):(W.clear(),B&&W.add(z.id)),E||P(W);let Z=r.filter(ue=>W.has(ue.id));p?.(Array.from(W),{selected:B,selectedItems:Z,item:z,event:j});},[r,N,d,E,p]),G=X.useCallback((z,j)=>{if(!r)return;let W=new Set(L),B=!W.has(z.id);B?W.add(z.id):W.delete(z.id),D||H(W);let Z=r.filter(ue=>W.has(ue.id));v?.(Array.from(W),{checked:B,checkedItems:Z,item:z,event:j});},[r,L,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...y,children:r.map((z,j)=>{let W=N.has(z.id),B=L.has(z.id);return jsxs("div",{role:"listitem","aria-selected":c?W:void 0,draggable:a,onDragStart:a?U=>I(U,j):void 0,onDragOver:a?U=>V(U,j):void 0,onDragLeave:a?O:void 0,onDrop:a?U=>A(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>$(z,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",T===j&&"border-primary border-dashed border rounded-md",W&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(Ow,{checked:B,onClick:U=>G(z,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(z,j)})]},z.id)})}):jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...y,children:x})}var Fw=X.forwardRef(Bw),cf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),df=X.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(cf({interactive:t,className:e})),...a,children:[n&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));df.displayName="ListItem";var uf=X.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));uf.displayName="ListItemText";var ff=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),gf=X.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:u(ff({position:t,className:e})),...n}));gf.displayName="Timeline";var bf=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"}}),vf=X.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(bf({variant:t,className:e})),...s,children:[!n&&jsxs("div",{className:"flex flex-col items-center",children:[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&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));vf.displayName="TimelineItem";var hf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));hf.displayName="TimelineContent";var xf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));xf.displayName="TimelineOpposite";var Rf=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}}),wf=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}}),Cf=X.createContext({}),Tf=X.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=X.useState(a),f=o!==void 0?o:d,p=X.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(Cf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(Rf({size:t,fullWidth:n,className:e})),...l,children:r})})});Tf.displayName="SegmentedControl";var Mf=X.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=X.useContext(Cf),i=s.value===n,l=r||s.disabled;return 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(wf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Mf.displayName="SegmentedControlItem";var Nf=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"}}),kf=e=>{let t=e.type;return t.startsWith("image/")?Image$1:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},is=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]},Pf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${is(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},Ef=X.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]=X.useState(false),[v,x]=X.useState(false),[y,w]=X.useState([]),C=X.useRef(null),R=X.useCallback(L=>{if(!L||L.length===0)return;let I=Array.from(L),V=[],O=[];(m?I:[I[0]]).forEach(K=>{let $=Pf(K,c,d);$.length>0?O.push({file:K,errors:$}):V.push(K);}),w(O),V.length>0&&r?.(V),O.length>0&&o?.(O);},[c,d,m,r,o]),T=X.useCallback(L=>{if(L.preventDefault(),L.stopPropagation(),!f&&(b(true),L.dataTransfer.items)){let V=Array.from(L.dataTransfer.items).some(O=>{if(O.kind!=="file")return true;if(d&&d.length>0){let A=O.type;return !d.some(K=>K.endsWith("/*")?A.startsWith(K.slice(0,-2)):A===K)}return false});x(V);}},[f,d]),M=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!f&&(L.dataTransfer.dropEffect="copy");},[f]),k=X.useCallback(L=>{L.preventDefault(),L.stopPropagation();let I=L.currentTarget.getBoundingClientRect(),V=L.clientX,O=L.clientY;(V<I.left||V>I.right||O<I.top||O>I.bottom)&&(b(false),x(false));},[]),P=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),b(false),x(false),!f&&R(L.dataTransfer.files);},[f,R]),E=X.useCallback(()=>{f||C.current?.click();},[f]),N=X.useCallback(L=>{R(L.target.files),L.target.value="";},[R]),S=X.useCallback(L=>{f||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:T,onDragOver:M,onDragLeave:k,onDrop:P,onClick:E,onKeyDown:S,className:u(Nf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:D,multiple:m,disabled:f,onChange:N,className:"sr-only",tabIndex:-1}),l||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${is(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),y.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:y.map(({file:L,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:L.name}),":"," ",I.map(V=>V.message).join(", ")]},L.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(L=>{let I=kf(L.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",L.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(I,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:L.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[is(L.file.size),L.error&&jsx("span",{className:"ml-2 text-danger",children:L.error})]}),L.progress!==void 0&&L.progress<100&&jsx(_a,{value:L.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:V=>{V.stopPropagation(),a?.(L.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},L.id)})})]})});Ef.displayName="FileUpload";var qw=`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")`,Sf=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}}),Xo=X.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),r?.(e);},className:u(Sf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?qw:void 0,backgroundSize:n?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Xo.displayName="ColorSwatch";var Df=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Hf=X.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=X.useState(t),b=e??g,v=X.useCallback(y=>{l||(e===void 0&&h(y),n?.(y));},[e,n,l]),x=y=>y.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Df({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(y=>{let w=b?x(b)===x(y):false;return jsx(Xo,{role:"option",color:y,size:s,shape:i,isSelected:w,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":w},y)})})});Hf.displayName="ColorSwatchPicker";var Jw=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],If={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Vf=X.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=Jw,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=X.useState(e??t),f=X.useId();X.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"?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",If[s],i),children:[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}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(ot,{children:[jsx(qn,{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",If[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(at,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(Xo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Vf.displayName="ColorPicker";var Af=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"}}),Ji=e=>String(e).padStart(2,"0"),oC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},aC=(e,t)=>`${Ji(e)}:${Ji(t)}`,zf=X.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]=X.useState(n??""),[g,h]=X.useState(false);X.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=oC(f||"00:00"),x=k=>{let P=k.target.value;p(P),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(P)&&r?.(P);},y=(k,P)=>{let E=Math.max(0,Math.min(23,k)),N=Math.max(0,Math.min(59,P)),S=aC(E,N);p(S),r?.(S);},w=()=>y(b+1,v),C=()=>y(b-1,v),R=()=>y(b,v+a),T=()=>y(b,v-a),M=({value:k,onIncrement:P,onDecrement:E})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:Ji(k)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:E,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:x,disabled:c,className:u(Af({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(ot,{open:g,onOpenChange:h,children:[jsxs(qn,{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:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(at,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(M,{value:b,onIncrement:w,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(M,{value:v,onIncrement:R,onDecrement:T,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;y(k.getHours(),k.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});zf.displayName="TimeInput";var Of=cva("flex h-10 w-full 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"}}),iC={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},lC=(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}},el=(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},Bf=(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},Ff=X.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=".",radius:h="md",disabled:b,placeholder:v,...x},y)=>{let[w,C]=X.useState(r),[R,T]=X.useState(""),[M,k]=X.useState(false),P=n!==void 0?n:w,E=f??lC(a,s);X.useEffect(()=>{!M&&P!==void 0&&T(el(P,i,p,g));},[P,i,p,g,M]);let N=I=>{let V=I.target.value;if(!V){T(""),n===void 0&&C(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;T(V);let A=Bf(V,p,g);if(A!==void 0){let K=A;l!==void 0&&A<l&&(K=l),c!==void 0&&A>c&&(K=c),n===void 0&&C(K),o?.(K);}},S=()=>{k(true),P!==void 0&&T(P.toString().replace(".",g));},H=()=>{k(false),T(P!==void 0?el(P,i,p,g):"");},D=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:E}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:E});return jsxs("div",{className:"relative flex items-center",children:[D&&jsx("div",{className:"absolute left-3 pointer-events-none",children:D}),jsx("input",{ref:y,type:"text",inputMode:"decimal",value:R,onChange:N,onFocus:S,onBlur:H,disabled:b,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(Of({size:t}),iC[h],D&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...x}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Ff.displayName="CurrencyInput";var Kf=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"}}),tl={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:"#####-####"}},uC=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},rr=e=>["#","A","*"].includes(e),cs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];uC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},nl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},$f=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),mC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},Gf=X.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 tl?tl[a].mask:a,[g,h]=X.useState(r),[b,v]=X.useState(""),[x,y]=X.useState(false),w=X.useRef(null),C=n!==void 0?n:g;X.useImperativeHandle(f,()=>w.current),X.useEffect(()=>{let k=cs(C,p,true);v(k);},[C,p]);let R=k=>{let P=k.target.value,E=k.target.selectionStart??0,N=P.replace(/[^\w]/g,""),S=cs(N,p,true),H=nl(S,p);v(S),n===void 0&&h(l?S:H),o?.(H,S),requestAnimationFrame(()=>{if(w.current){let D=mC(S,p,E);w.current.setSelectionRange(D,D);}});},T=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let P=w.current;if(!P)return;let E=P.selectionStart??0;if(k.key==="Backspace"&&E>0){let N=E-1;for(;N>0&&!rr(p[N]);)N--;let S=nl(b,p),H=0;for(let I=0;I<N&&I<p.length;I++)rr(p[I])&&H++;let D=S.slice(0,Math.max(0,H-1))+S.slice(H),L=cs(D,p,true);v(L),n===void 0&&h(l?L:D),o?.(D,L),k.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(N,N);});}},M=i?$f(p,s):d;return jsx("input",{ref:w,type:"text",value:b,onChange:R,onKeyDown:T,onFocus:()=>y(true),onBlur:()=>y(false),disabled:c,placeholder:M,className:u(Kf({size:t}),e),style:{borderColor:x?"var(--color-foreground)":void 0},...m})});Gf.displayName="MaskedInput";var vC=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"}}),jf=[{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:"(###) ###-####"}],ds=(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},hC=e=>e.replace(/#/g,"_"),Wf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=jf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,radius:p="md",...g},h)=>{let[b,v]=X.useState(r),[x,y]=X.useState(a??s),[w,C]=X.useState(false),[R,T]=X.useState(false),[M,k]=X.useState(false),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=n!==void 0?n:b,D=a??x,L=l.find(G=>G.code===D)??l[0],I=ds(H,L.format);X.useEffect(()=>{k(true);},[]),X.useEffect(()=>{if(R&&N.current){let G=N.current.getBoundingClientRect();E({top:G.bottom+4,left:G.left,width:Math.max(G.width,280)});}},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{N.current&&!N.current.contains(Y.target)&&S.current&&!S.current.contains(Y.target)&&T(false);};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{Y.key==="Escape"&&T(false);};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[R]);let V=G=>{let F=G.target.value.replace(/\D/g,"");n===void 0&&v(F);let z=ds(F,L.format),j=`${L.dialCode} ${z}`;o?.(F,j,L);},O=G=>{let Y=l.find(j=>j.code===G);if(!Y)return;a===void 0&&y(G),i?.(Y);let F=ds(H,Y.format),z=`${Y.dialCode} ${F}`;o?.(H,z,Y),T(false);},A=t==="sm"?"h-9":t==="lg"?"h-11":"h-10",K=w||R;return jsxs("div",{className:u("flex border bg-background transition-colors",{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}[p],m&&"cursor-not-allowed opacity-50"),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:N,type:"button",disabled:m,onClick:()=>T(!R),className:u("flex items-center justify-between bg-transparent px-3 py-2 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50","w-[100px] shrink-0 border-r",A),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",R&&"rotate-180")})]}),M&&R&&Ba.createPortal(jsx("div",{ref:S,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:P.top,left:P.left,minWidth:P.width},children:jsx(ke,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(G=>jsxs("div",{role:"option","aria-selected":G.code===D,onClick:()=>O(G.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:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.code===D&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:G.flag}),jsx("span",{className:"flex-1",children:G.name}),jsx("span",{className:"text-xs text-muted-foreground",children:G.dialCode})]})]},G.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:h,type:"tel",inputMode:"tel",value:I,onChange:V,onFocus:()=>C(true),onBlur:()=>C(false),disabled:m,placeholder:f??hC(L.format),className:u("flex h-10 w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",t==="sm"&&"h-8 px-2 text-xs",t==="lg"&&"h-12 px-4 text-base",d&&!c&&"pl-12",e),...g})]})]})});Wf.displayName="PhoneInput";var Yf=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}}),Xf=X.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=X.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 jsxs("nav",{ref:l,className:u(Yf({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),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?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&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})]})});Xf.displayName="Navbar";var qf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));qf.displayName="NavbarBrand";var Zf=X.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});Zf.displayName="NavbarContent";var Qf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));Qf.displayName="NavbarItem";var Jf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));Jf.displayName="NavbarLink";var tg=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"}}),ng=X.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 jsxs("a",{ref:c,className:u(tg({variant:t,size:n,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});ng.displayName="Link";var rg=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"}}),og=X.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]=X.useState(false);X.useEffect(()=>{let x=c?.current||window,y=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return x.addEventListener("scroll",y,{passive:true}),y(),()=>{x.removeEventListener("scroll",y);}},[n,c,g,d]);let b=x=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(x);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(rg({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:i,isIconOnly:true,radius:l,onClick:b,"aria-label":"Back to top",className:"shadow-lg",...f,children:r||jsx(ArrowUp,{className:v})})})});og.displayName="BackTop";var DC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),HC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),ag=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ps=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),sg=X.createContext(null),ar=()=>{let e=X.useContext(sg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},ig=X.createContext(null),Zo=()=>{let e=X.useContext(ig);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},ol=X.createContext(null),lg=X.createContext(null),cg=X.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=X.useState(null);return jsx(sg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",DC({radius:n}),e),...r,children:t})})});cg.displayName="Menubar";var dg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=X.useId(),o=X.useRef(null),a=t===r,s=X.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(ig.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};dg.displayName="MenubarMenu";var ug=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));ug.displayName="MenubarGroup";var mg=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};mg.displayName="MenubarPortal";var pg=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(ol.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};pg.displayName="MenubarSub";var fg=X.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(lg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));fg.displayName="MenubarRadioGroup";var gg=X.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Zo(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return 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",HC({radius:i}),e),onClick:f,onMouseEnter:p,...r})});gg.displayName="MenubarTrigger";var bg=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=X.useContext(ol);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 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",ps({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});bg.displayName="MenubarSubTrigger";var vg=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=X.useContext(ol);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let y=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=y.top,R=y.right+t;R+w.width>window.innerWidth&&(R=y.left-w.width-t),f({top:C,left:R});})();},[l,t,d]);let b=x=>{n?.(x),c(true);},v=x=>{r?.(x),c(false);};return !p||!l?null:Ba.createPortal(jsx("div",{ref:x=>{h.current=x,typeof a=="function"?a(x):a&&(a.current=x);},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",ag({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});vg.displayName="MenubarSubContent";var hg=X.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=Zo(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),y=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-x.width/2:t==="end"&&(w=v.right-x.width-n),f({top:y,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]),X.useEffect(()=>{if(!c)return;let b=v=>{let x=v.target;h.current&&!h.current.contains(x)&&l.current&&!l.current.contains(x)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),X.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:Ba.createPortal(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",ag({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});hg.displayName="MenubarContent";var xg=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Zo(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return 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",ps({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});xg.displayName="MenubarItem";var yg=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=Zo(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return 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",ps({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});yg.displayName="MenubarCheckboxItem";var Rg=X.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Zo(),c=X.useContext(lg),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return 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",ps({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});Rg.displayName="MenubarRadioItem";var wg=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));wg.displayName="MenubarLabel";var Cg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Cg.displayName="MenubarSeparator";var Tg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Tg.displayName="MenubarShortcut";var Mg=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"}}),Ng=X.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=X.Children.toArray(o);return jsx("div",{ref:s,className:u(Mg({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>X.isValidElement(l)?X.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)})});Ng.displayName="Steps";var kg=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"}}),VC=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"}}),AC=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"}}),Pg=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(kg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(VC({status:s,size:n})),children:s==="completed"?jsx(Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(AC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Pg.displayName="Step";var Lg=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"}}),Sg=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}}),Dg=X.createContext(null),UC=()=>{let e=X.useContext(Dg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},jC=({checked:e,indeterminate:t,disabled:n,onClick:r})=>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)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),Hg=({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:x,handleDrop:y,allowDrop:w,onDragStart:C,onDragOver:R,onDragEnter:T,onDragLeave:M,onDragEnd:k,showLine:P,showIcon:E,showHandle:N,dragIcon:S,icon:H,leafIcon:D,folderIcon:L,folderOpenIcon:I,blockNode:V,disabled:O,size:A,getAllKeys:K}=UC(),$=e.children&&e.children.length>0,G=e.isLeaf??!$,Y=o.has(e.key),F=s.has(e.key),z=c.has(e.key),j=d.has(e.key),W=g?.key===e.key,B=b===e.key,Z=!!(O||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ce=X.useMemo(()=>Z?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Z]),Q=X.useMemo(()=>S!==void 0?S:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[S,p]),le=X.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:Y,isLeaf:G}):H:G?D:Y?I:L,[e.icon,H,Y,G,D,L,I]),Be=q=>{if(!Ce)return;q.stopPropagation(),q.dataTransfer.effectAllowed="move";let De=q.currentTarget,de=De.cloneNode(true),je=document.documentElement.classList.contains("dark"),We=je?"#0a0a0a":"#ffffff",Gn=je?"#27272a":"#e4e4e7";de.style.cssText=`
|
|
44
44
|
position: fixed;
|
|
45
45
|
top: -9999px;
|
|
46
46
|
left: -9999px;
|
|
@@ -52,7 +52,7 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
52
52
|
width: ${De.offsetWidth}px;
|
|
53
53
|
opacity: 1;
|
|
54
54
|
z-index: 9999;
|
|
55
|
-
`,document.body.appendChild(de),q.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:q,node:e});},pe=q=>{if(q.preventDefault(),q.stopPropagation(),!g||g.key===e.key||Z)return;let De=q.currentTarget.getBoundingClientRect(),de=q.clientY-De.top,je=De.height,We;de<je*.25?We=-1:de>je*.75?We=1:We=0,!(w&&!w({dropNode:e,dropPosition:We,dragNode:g}))&&(x(e.key,We),R?.({event:q,node:e}));},Ct=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key)&&M?.({event:q,node:e,expandedKeys:K()});},bt=q=>{q.stopPropagation(),T?.({event:q,node:e});},yn=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key||Z)&&(v!==null&&y(e,v),h(null),x(null,null));},Fe=q=>{h(null),x(null,null),k?.({event:q,node:e});},on=q=>{Z||ue&&i(e.key,e,q);},Tt=q=>{q.stopPropagation(),!Z&&!G&&a(e.key,e);},_=X.useMemo(()=>{if(!B||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[B,v]),oe=[...r,n];return jsxs("div",{className:"relative",children:[P&&t>0&&jsxs(Fragment,{children:[r.map((q,De)=>!q&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${De} * var(--tree-indent) + 12px)`,top:0,bottom:0}},De)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":G?void 0:Y,"aria-selected":ue?F:void 0,"aria-disabled":Z,draggable:Ce,onDragStart:Be,onDragOver:pe,onDragEnter:Ct,onDragLeave:bt,onDrop:yn,onDragEnd:Fe,onClick:on,className:u("relative",Lg({size:A,isSelected:F,isDragging:W,isDisabled:Z,isHoverable:ue&&!Z}),_,V&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ce&&N&&Q!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Q}),jsx("button",{type:"button",onClick:Tt,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",G&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",Y&&"rotate-90")})}),U&&jsx(UC,{checked:z,indeterminate:j,disabled:Z,onClick:q=>m(e.key,e,q)}),E&&le&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:le}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",V&&"flex-none"),children:e.label})]}),$&&Y&&jsx("div",{role:"group",children:e.children.map((q,De)=>jsx(Dg,{node:q,level:t+1,isLast:De===e.children.length-1,parentIsLastPath:oe},q.key))})]})},jC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},WC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Hg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Hg(n,t))return true;return false},Ig=X.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:x=[],onCheck:y,showLine:w=false,showIcon:C=false,showHandle:R=true,dragIcon:M,icon:T,leafIcon:k=jsx(File,{className:"h-4 w-4"}),folderIcon:P=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:E=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,onDrop:I,blockNode:V=false,disabled:O=false,...A},K)=>{let $=X.useCallback(()=>l?new Set(jC(r)):new Set(i),[l,i,r]),[G,Y]=X.useState($),F=s!==void 0,z=F?new Set(s):G,j=X.useCallback((ve,Ye)=>{let Kt=new Set(z),Ae=!Kt.has(ve);Ae?Kt.add(ve):Kt.delete(ve),F||Y(Kt),c?.(Array.from(Kt),{expanded:Ae,node:Ye});},[z,F,c]),[W,B]=X.useState(new Set(p)),Z=f!==void 0,ue=Z?new Set(f):W,U=X.useCallback((ve,Ye,Kt)=>{let Ae=new Set(ue),Rn=!Ae.has(ve);m?Rn?Ae.add(ve):Ae.delete(ve):(Ae.clear(),Rn&&Ae.add(ve)),Z||B(Ae);let jr=[],Ao=Ca=>{for(let Wr of Ca)Ae.has(Wr.key)&&jr.push(Wr),Wr.children&&Ao(Wr.children);};Ao(r),g?.(Array.from(Ae),{selected:Rn,selectedNodes:jr,node:Ye,event:Kt});},[ue,m,Z,g,r]),[Ce,Q]=X.useState(new Set(x)),[le,Be]=X.useState(new Set),pe=v!==void 0,Ct=pe?new Set(Array.isArray(v)?v:v.checked):Ce,bt=pe&&!Array.isArray(v)?new Set(v.halfChecked):le,yn=X.useCallback((ve,Ye,Kt)=>{let Ae=new Set(Ct),Rn=new Set(bt),jr=!Ae.has(ve);if(jr?(Ae.add(ve),Rn.delete(ve)):Ae.delete(ve),!b&&Ye.children){let gi=WC(Ye);for(let Un of gi)jr?(Ae.add(Un),Rn.delete(Un)):Ae.delete(Un);}pe||(Q(Ae),Be(Rn));let Ao=[],Ca=gi=>{for(let Un of gi)Ae.has(Un.key)&&Ao.push(Un),Un.children&&Ca(Un.children);};Ca(r);let Wr=b?{checked:Array.from(Ae),halfChecked:Array.from(Rn)}:Array.from(Ae);y?.(Wr,{checked:jr,checkedNodes:Ao,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[Ct,bt,b,pe,y,r]),[Fe,on]=X.useState(null),[Tt,_]=X.useState(null),[oe,q]=X.useState(null),De=X.useCallback((ve,Ye)=>{_(ve),q(Ye);},[]),de=X.useCallback((ve,Ye)=>{!Fe||!I||Ye===0&&Hg(Fe,ve.key)||I({event:{},node:ve,dragNode:Fe,dropPosition:Ye,dropToGap:Ye!==0});},[Fe,I]),je=X.useCallback(()=>Array.from(z),[z]),We={expandedKeys:z,toggleExpand:j,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:Ct,halfCheckedKeys:bt,handleCheck:yn,checkable:h,checkStrictly:b,draggable:o,draggedNode:Fe,setDraggedNode:on,dragOverKey:Tt,dragOverPosition:oe,setDragOver:De,handleDrop:de,allowDrop:a,onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,showLine:w,showIcon:C,showHandle:R,dragIcon:M,icon:T,leafIcon:k,folderIcon:P,folderOpenIcon:E,blockNode:V,disabled:O,size:n,data:r,getAllKeys:je},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&De(null,null);};return jsx(Sg.Provider,{value:We,children:jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Eg({variant:t,size:n,className:e})),onDragLeave:Gn,...A,children:r.map((ve,Ye)=>jsx(Dg,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Ig.displayName="Tree";var Ag=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),QC=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsx(Fragment,{children:r.map((o,a)=>n.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},JC=(e,t)=>{let[n,r]=X.useState(e);return X.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},zg=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:x,...y},w)=>{let[C,R]=X.useState(false),[M,T]=X.useState(r),[k,P]=X.useState([]),[E,N]=X.useState(false),[S,H]=X.useState(false),[D,L]=X.useState(0),I=X.useRef(null),V=X.useRef(null),O=n!==void 0?n:M,A=JC(O,l);X.useEffect(()=>{let U=V.current;if(!U)return;let Ce=()=>{L(U.offsetWidth);};Ce();let Q=new ResizeObserver(Ce);return Q.observe(U),()=>{Q.disconnect();}},[]),X.useImperativeHandle(w,()=>I.current);let K=i?k:s,$=X.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(O.toLowerCase())),[K,O,i]);X.useEffect(()=>{if(!i)return;if(A.length<c){P([]);return}let U=false;return (async()=>{N(true);try{let Q=await i(A);U||P(Q);}catch{U||P([]);}finally{U||N(false);}})(),()=>{U=true;}},[A,i,c]);let G=U=>{n===void 0&&T(U),o?.(U);},Y=U=>{let Ce=U.target.value;G(Ce),Ce.length>=c&&R(true);},F=U=>{G(U.label),a?.(U),R(false);},z=()=>{G(""),I.current?.focus();},j=()=>{H(true),R(true);},W=()=>{H(false);},B=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&$.length>0&&R(true);},Z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&O?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:R,children:[jsxs(an,{ref:V,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:I,type:"text",value:O,onChange:Y,onFocus:j,onBlur:W,onKeyDown:B,disabled:x,placeholder:d,className:u(Ag({size:t,fullWidth:v}),ue,e),style:{borderColor:S?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...y}),p&&O&&!x&&jsx("button",{type:"button",onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X$1,{className:Z})})]}),jsx(at,{className:"p-0",align:"start",style:{width:D>0?D:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(ke,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:E?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Z,"animate-spin")}),f]}):$.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):$.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>F(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:u("mr-2 h-4 w-4 shrink-0",O===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(QC,{text:U.label,query:O}):U.label})]},U.value))})})})})]})});zg.displayName="Autocomplete";var cl=X.createContext(null),dl=X.createContext(null),ul=()=>{let e=X.useContext(cl);if(!e)throw new Error("useFormContext must be used within a Form");return e},bs=()=>{let e=X.useContext(dl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},eT={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},Og=X.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=X.useState(e),[m,f]=X.useState({}),[p,g]=X.useState({}),[h,b]=X.useState({}),[v,x]=X.useState(false),y=X.useRef(new Map),w=X.useCallback((D,L)=>{y.current.set(D,L);},[]),C=X.useCallback(D=>{y.current.delete(D);},[]),R=X.useCallback(D=>{let L=y.current.get(D)||[],I=c[D];for(let V of L)if(!V.validate(I))return f(O=>({...O,[D]:V.message})),false;return f(V=>({...V,[D]:null})),true},[c]),M=X.useCallback(()=>{let D=true,L={};return y.current.forEach((I,V)=>{let O=c[V];for(let A of I)if(!A.validate(O)){L[V]=A.message,D=false;break}L[V]||(L[V]=null);}),f(L),D},[c]),T=X.useCallback((D,L)=>{d(I=>({...I,[D]:L})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{R(D);},0);},[o,R]),k=X.useCallback((D,L)=>{f(I=>({...I,[D]:L}));},[]),P=X.useCallback((D,L)=>{g(I=>({...I,[D]:L})),L&&r&&R(D);},[r,R]),E=X.useCallback(D=>({value:c[D],error:m[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,m,p,h]),N=X.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),S=async D=>{D.preventDefault();let L={};if(y.current.forEach((V,O)=>{L[O]=true;}),g(L),!M()){n?.(m);return}if(t){x(true);try{await t(c);}finally{x(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:T,setError:k,setTouched:P,validateField:R,validateAll:M,registerField:w,unregisterField:C,getFieldState:E,reset:N};return jsx(cl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:S,className:u("space-y-4",s),...i,children:a})})});Og.displayName="Form";var Bg=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=ul(),a=X.useId();X.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(dl.Provider,{value:i,children:r})};Bg.displayName="FormField";var Fg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));Fg.displayName="FormItem";var Kg=X.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=bs();return jsxs(wr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Kg.displayName="FormLabel";var $g=({children:e})=>{let{name:t,id:n,error:r,touched:o}=bs(),a=ul(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return X.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};$g.displayName="FormControl";var Gg=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));Gg.displayName="FormDescription";var Ug=X.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=bs(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});Ug.displayName="FormMessage";var Wg=cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),_g=X.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u(Wg({size:t,className:e})),...i,children:[jsxs(Cr,{"data-user-avatar":true,children:[o&&jsx(Qr,{src:o,alt:n}),jsx(Tr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});_g.displayName="User";var Xg=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),qg=X.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:u(Xg({variant:t,size:n,radius:r,className:e})),...o}));qg.displayName="Code";function eb(e){let[t,n]=useState(false);return useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var tb=X.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=eb(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,x)=>jsxs("div",{...h({line:v}),children:[n&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:x+1}),v.map((y,w)=>jsx("span",{...b({token:y})},w))]},x))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});tb.displayName="CodeBlock";var nb=X.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=eb(n)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((x,y)=>jsx("span",{...h({token:x})},y))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});nb.displayName="TabbedCodeBlock";var rb=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),ob=X.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=X.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(rb({variant:t,size:n,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:r}),o&&jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});ob.displayName="Snippet";var gl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ab=X.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=X.useState("loading");X.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(gl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(gl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Ha,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});ab.displayName="Image";var lb=cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),cb=cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),db=X.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),ub=X.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=X.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(db.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(lb({size:t,className:e})),...i,children:s})})});ub.displayName="Listbox";var mb=X.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=X.useContext(db),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(cb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});mb.displayName="ListboxItem";var fb=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),gb=cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function fT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=X.useState(null),[f,p]=X.useState(null),g=(y,w)=>{i||(m(w),y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",String(w)));},h=(y,w)=>{y.preventDefault(),!(i||d===null||d===w)&&p(w);},b=()=>{p(null);},v=(y,w)=>{if(y.preventDefault(),i||d===null||d===w){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(w,0,R),o?.(C),m(null),p(null);},x=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(fb({variant:t,size:n,className:e})),...l,children:r.map((y,w)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,w),onDragOver:C=>h(C,w),onDragLeave:b,onDrop:C=>v(C,w),onDragEnd:x,className:u(gb({variant:t,size:n,isDragging:d===w,isDragOver:f===w}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(y,w)})]},y.id))})}var gT=X.forwardRef(fT);var hb=cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),xT={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},xb=X.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(hb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(xT[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));xb.displayName="LoadingOverlay";var yb=cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),Rb=X.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=X.useState(0),[c,d]=X.useState(false),m=X.useRef(null);return X.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(yb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});Rb.displayName="NProgress";var Mb=cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),wb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},MT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Nb=X.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(MT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(wb[n||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:u(wb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(Mb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});Nb.displayName="Loading";var kT=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),PT=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),ET=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),LT=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Ms={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},hl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},vl=(e,t)=>String(e).padStart(t,"0"),kb=(e,t)=>{if(!e)return "";let n=vl(e.getDate(),2),r=vl(e.getMonth()+1,2),o=vl(e.getFullYear(),4),a=Ms[t],s=hl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},ws=(e,t)=>{let n=Ms[t],r=e.split(n);if(r.length!==3)return null;let o=hl[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},ST=e=>{let t=Ms[e];return hl[e].map(r=>r==="year"?"####":"##").join(t)},ta=(e,t)=>{if(!e?.from)return "";let n=kb(e.from,t),r=e.to?kb(e.to,t):"";return n&&r?`${n} - ${r}`:n},Pb=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:x="text",fullWidth:y=false,numberOfMonths:w=2,align:C="start",disabled:R,placeholder:M,id:T,...k},P)=>{let E=X.useId(),N=T||E,S=`${N}-description`,H=`${N}-error`,[D,L]=X.useState(f),[I,V]=X.useState(""),[O,A]=X.useState(false),[K,$]=X.useState(false),G=m!==void 0?m:D,Y=a&&r,F=ST(b),z=Ms[b],j=" - ";X.useEffect(()=>{K||V(ta(G,b));},[G,b,K]);let W=le=>{m===void 0&&L(le),p?.(le);},B=le=>{W(le),V(ta(le,b)),le?.from&&le?.to&&A(false);},Z=le=>{let Be=le.target.value;Be=Be.replace(new RegExp(`[^0-9\\${z}\\s-]`,"g"),"");let pe=`${F}${j}${F}`,Ct=Be.replace(new RegExp(`[\\${z}\\s-]`,"g"),""),bt="",yn=0;for(let Fe=0;Fe<pe.length&&yn<Ct.length;Fe++)pe[Fe]==="#"?(bt+=Ct[yn],yn++):bt+=pe[Fe];if(V(bt),bt.length===pe.length){let Fe=bt.split(j);if(Fe.length===2){let on=ws(Fe[0].trim(),b),Tt=ws(Fe[1].trim(),b);if(on&&Tt){if(g&&(on<g||Tt<g)||h&&(on>h||Tt>h))return;on<=Tt&&W({from:on,to:Tt});}}}},ue=()=>{$(true);},U=()=>{$(false);let le=`${F}${j}${F}`;if(I.length!==le.length)V(ta(G,b));else {let Be=I.split(j);if(Be.length!==2)V(ta(G,b));else {let pe=ws(Be[0].trim(),b),Ct=ws(Be[1].trim(),b);(!pe||!Ct||pe>Ct)&&V(ta(G,b));}}},Ce=()=>{R||A(true);},Q=()=>{!R&&x==="picker"&&v&&A(true);};return jsxs("div",{className:u(kT({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(LT({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&O,onOpenChange:A,children:[jsxs(an,{className:u("relative",y?"w-full":"w-fit"),children:[jsx("input",{ref:P,id:N,type:"text",inputMode:x==="text"?"numeric":void 0,value:I,onChange:x==="text"?Z:void 0,onClick:Q,onFocus:ue,onBlur:U,readOnly:x==="picker","aria-invalid":a,"aria-describedby":Y?H:n?S:void 0,"aria-required":o,disabled:R,placeholder:M||`${b.toLowerCase()} - ${b.toLowerCase()}`,className:u(PT({size:s,isInvalid:a,fullWidth:y,showPickerIcon:v}),x==="picker"&&v&&"cursor-pointer",l),style:{borderColor:K||v&&O?"var(--color-foreground)":void 0},...k}),v&&jsx("button",{type:"button",onClick:Ce,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(ET({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(eo,{mode:"range",selected:G,onSelect:B,numberOfMonths:w,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:G?.from,showMonthAndYearPickers:true})})]}),n&&!Y&&jsx("p",{id:S,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),Y&&jsx("p",{id:H,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Pb.displayName="DateRangePicker";var co=e=>String(e).padStart(2,"0"),Eb=X.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=X.useState(false),d=r?Array.from({length:24},(y,w)=>w):Array.from({length:12},(y,w)=>w+1),m=Array.from({length:Math.floor(60/o)},(y,w)=>w*o),f=y=>{if(!y)return n;if(r)return `${co(y.hours)}:${co(y.minutes)}`;let w=y.hours%12||12,C=y.hours>=12?"PM":"AM";return `${co(w)}:${co(y.minutes)} ${C}`},p=y=>{let w=e?.minutes??0,C=y;if(!r&&e){let R=e.hours>=12;R&&y!==12?C=y+12:!R&&y===12&&(C=0);}t?.({hours:C,minutes:w});},g=y=>{let w=e?.hours??0;t?.({hours:w,minutes:y});},h=y=>{if(!e)return;let w=e.hours;y==="AM"&&e.hours>=12?w=e.hours-12:y==="PM"&&e.hours<12&&(w=e.hours+12),t?.({hours:w,minutes:e.minutes});},b=()=>{let y=new Date;t?.({hours:y.getHours(),minutes:y.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,x=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ot,{open:l,onOpenChange:c,children:[jsxs(qn,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(at,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(y=>jsx(ae,{variant:x===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(y),children:co(y)},y))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(y=>jsx(ae,{variant:e?.minutes===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(y),children:co(y)},y))})})]}),!r&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Eb.displayName="TimePicker";var Lb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function IT({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=X.useRef(null),[p,g]=X.useState(0);X.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),x=Math.ceil(o/b)+2*a,y=Math.min(n.length-1,v+x),w=R=>{let M=R.currentTarget.scrollTop;g(M),c?.(M);},C=X.useMemo(()=>{let R=[];for(let M=v;M<=y;M++)n[M]!==void 0&&R.push({item:n[M],index:M,style:{position:"absolute",top:M*b,left:0,right:0,height:r}});return R},[n,v,y,b,r]);return jsx("div",{ref:f,className:u(Lb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:w,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:M,style:T})=>jsx("div",{style:T,children:s(R,M)},i?i(R,M):M))})})}var VT=X.forwardRef(IT);var yl=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Rl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Db=X.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,scrollbarVisibility:f="visible",...p},g)=>{let h=X.useRef(null),b=X.useRef(null),v=X.useRef(false);X.useImperativeHandle(g,()=>h.current),X.useEffect(()=>{let w=b.current;if(!w)return;let C=new IntersectionObserver(R=>{let[M]=R;M.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:h.current,rootMargin:c||`${l}px`,threshold:0});return C.observe(w),()=>{C.disconnect();}},[a,s,o,l,c,d]);let x=jsx("div",{className:u(Rl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),y=jsxs(Fragment,{children:[r,jsx("div",{ref:b,className:"h-px w-full"}),s&&(i||x),!a&&!s&&m&&jsx("div",{className:u(Rl({size:n}),"text-muted-foreground text-sm"),children:m})]});return d?jsx("div",{ref:h,className:u(yl({variant:t,className:e})),...p,children:y}):jsx(ke,{ref:h,visibility:f,className:u(yl({variant:t,className:e})),...p,children:y})});Db.displayName="InfiniteScroll";var YT=e=>e.map(t=>typeof t=="string"?{src:t}:t),wl=X.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=X.useMemo(()=>YT(e),[e]),[v,x]=X.useState(r),[y,w]=X.useState(1),[C,R]=X.useState(0),[M,T]=X.useState(false),[k,P]=X.useState(false),[E,N]=X.useState({x:0,y:0}),[S,H]=X.useState({x:0,y:0}),[D,L]=X.useState(false),I=X.useRef(null),V=b[v];X.useEffect(()=>{L(true);},[]),X.useEffect(()=>{x(r);},[r]),X.useEffect(()=>{o?.(v);},[v,o]),X.useEffect(()=>{w(1),R(0),N({x:0,y:0});},[v]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let O=X.useCallback(()=>{x(Q=>Q>0?Q-1:b.length-1);},[b.length]),A=X.useCallback(()=>{x(Q=>Q<b.length-1?Q+1:0);},[b.length]),K=()=>{w(Q=>Math.min(Q+.5,4));},$=()=>{w(Q=>{let le=Math.max(Q-.5,.5);return le===1&&N({x:0,y:0}),le});},G=()=>{R(Q=>(Q+90)%360);},Y=async()=>{if(V)try{let le=await(await fetch(V.src)).blob(),Be=URL.createObjectURL(le),pe=document.createElement("a");pe.href=Be,pe.download=V.alt||`image-${v+1}`,document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),URL.revokeObjectURL(Be);}catch{window.open(V.src,"_blank");}},F=async()=>{if(I.current)if(M)try{await document.exitFullscreen(),T(!1);}catch{}else try{await I.current.requestFullscreen(),T(!0);}catch{}},z=Q=>{y>1&&(P(true),H({x:Q.clientX-E.x,y:Q.clientY-E.y}));},j=Q=>{k&&y>1&&N({x:Q.clientX-S.x,y:Q.clientY-S.y});},W=()=>{P(false);},B=()=>{n?.(false);},Z=Q=>{p&&Q.target===Q.currentTarget&&B();},ue=X.useCallback(Q=>{switch(Q.key){case "ArrowLeft":O();break;case "ArrowRight":A();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":$();break}},[O,A,n]);if(X.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),X.useEffect(()=>{let Q=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Q),()=>document.removeEventListener("fullscreenchange",Q)},[]),b.length===0)return null;let U=a?X.isValidElement(a)?X.cloneElement(a,{onClick:Q=>{a.props.onClick?.(Q),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!D||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Z}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+1," / ",b.length]}),V?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:V.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(y*100),"%"]}),jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:M?"Exit fullscreen":"Fullscreen",children:M?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X$1,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:z,onMouseMove:j,onMouseUp:W,onMouseLeave:W,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:O,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:A,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:V?.src,alt:V?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":y>1?"cursor-grab":""),style:{transform:`translate(${E.x}px, ${E.y}px) scale(${y}) rotate(${C}deg)`},draggable:false})]}),V?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:V.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((Q,le)=>jsx("button",{onClick:()=>x(le),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===le?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Q.src,alt:Q.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});wl.displayName="ImageViewer";var Ib=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=X.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsx(wl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Ib.displayName="ImageViewerTrigger";var Vb=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),qT={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},ZT={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},QT=e=>{let t=e.toLowerCase();return qT[t]||e.toUpperCase()},ra=e=>{let t=e.toLowerCase();return ZT[t]||t},ks=e=>{let t=ra(e);return ["meta","control","alt","shift"].includes(t)},Ab=X.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{X.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(ks).map(ra),p=m.filter(h=>!ks(h)).map(ra),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,x=f.includes("alt")===h.altKey,y=f.includes("shift")===h.shiftKey,w=p.length===0||p.includes(h.key.toLowerCase());b&&v&&x&&y&&w&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxs(X.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:QT(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(Vb({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Ab.displayName="Kbd";function JT(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;X.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(ks).map(ra),i=a.filter(c=>!ks(c)).map(ra),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var zb=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Ob=X.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=X.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(n),m(!0),o?.(),setTimeout(()=>{m(!1);},r);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(zb({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});Ob.displayName="CopyButton";var Fb=cva("flex flex-col bg-background",{variants:{variant:{default:"border",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"md"}}),iM=[{value:"month",label:"Month"},{value:"week",label:"Week"},{value:"day",label:"Day"}],lM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],cM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function dM(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function uM(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function po(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function mo(e){return po(e,new Date)}function Bb(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return po(r,t)||po(o,t)||r<t&&o>t})}var Kb=X.forwardRef(({className:e,variant:t,size:n,radius:r,events:o=[],view:a="month",onViewChange:s,viewOptions:i=iM,date:l,onDateChange:c,onEventClick:d,onSlotClick:m,weekStartsOn:f=0,locale:p="en-US",...g},h)=>{let[b,v]=X.useState(new Date),x=l??b,y=N=>{c?c(N):v(N);},w=f===1?cM:lM,C=()=>{let N=new Date(x);a==="month"?N.setMonth(N.getMonth()-1):a==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),y(N);},R=()=>{let N=new Date(x);a==="month"?N.setMonth(N.getMonth()+1):a==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),y(N);},M=()=>{y(new Date);},T=()=>a==="day"?x.toLocaleDateString(p,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):x.toLocaleDateString(p,{year:"numeric",month:"long"}),k=()=>{let N=dM(x.getFullYear(),x.getMonth(),f);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(S=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:S},S))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((S,H)=>{let D=Bb(o,S),L=S.getMonth()===x.getMonth(),I=po(S,x);return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!L&&"bg-muted/30",I&&"bg-accent"),onClick:()=>m?.(S),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",mo(S)&&"bg-primary text-primary-foreground",!L&&"text-muted-foreground"),children:S.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(V=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:O=>{O.stopPropagation(),d?.(V);},children:V.title},V.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},H)})})]})},P=()=>{let N=uM(x,f),S=Array.from({length:24},(H,D)=>D);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),N.map((H,D)=>{let L=po(H,x);return jsxs("div",{className:u("p-2 text-center border-l cursor-pointer hover:bg-accent/50",mo(H)&&"bg-primary/10",L&&!mo(H)&&"bg-accent"),onClick:()=>m?.(H),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",mo(H)&&"text-primary",L&&!mo(H)&&"text-primary"),children:H.getDate()})]},D)})]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:S.map(H=>jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),N.map((D,L)=>{let I=new Date(D);I.setHours(H,0,0,0);let V=o.filter(O=>{let A=new Date(O.start);return po(A,D)&&A.getHours()===H});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(I),children:V.map(O=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:O.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(O);},children:O.title},O.id))},L)})]},H))})})]})},E=()=>{let N=Array.from({length:24},(H,D)=>D),S=Bb(o,x);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",mo(x)&&"bg-primary text-primary-foreground"),children:x.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(H=>{let D=new Date(x);D.setHours(H,0,0,0);let L=S.filter(I=>new Date(I.start).getHours()===H);return jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(D),children:L.map(I=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(I);},children:I.title},I.id))})]},H)})})})]})};return jsxs("div",{ref:h,className:u(Fb({variant:t,size:n,radius:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsx("h2",{className:"text-lg font-semibold",children:T()}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",radius:"md",onClick:M,children:"Today"}),jsx(Aa,{options:i,value:a,onValueChange:N=>s?.(N),size:"sm",radius:"md",className:"w-[120px]"}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:C,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),a==="month"&&k(),a==="week"&&P(),a==="day"&&E()]})});Kb.displayName="FullCalendar";var Ds=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),aa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),sa=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],$b=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=sa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(aa({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));$b.displayName="LineChart";var Gb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=sa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(aa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:n,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Gb.displayName="BarChart";var Ub=X.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=sa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(aa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Ds,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Ub.displayName="PieChart";var jb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=sa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(aa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));jb.displayName="AreaChart";var Yb=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),Xb=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),El=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border border-zinc-300 dark:border-zinc-700 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function IM({card:e,columnId:t,variant:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),m={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:m,className:u(El({variant:n,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:r?r(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function VM({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxs("div",{className:u(Xb({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsx(ae,{variant:"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(ke,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(i=>i.id),strategy:verticalListSortingStrategy,children:e.cards.map(i=>jsx(IM,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var qb=X.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=X.useState(null),[p,g]=X.useState(null),h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=w=>n.find(C=>C.cards.some(R=>R.id===w));return jsxs(DndContext,{sensors:h,collisionDetection:closestCorners,onDragStart:w=>{let{active:C}=w,R=b(C.id);if(R){let M=R.cards.find(T=>T.id===C.id);M&&(f(M),g(R.id));}},onDragOver:w=>{let{active:C,over:R}=w;if(!R)return;let M=C.id,T=R.id,k=b(M),P=b(T)||n.find(S=>S.id===T);if(!k||!P||k.id===P.id)return;let E=P.cards.findIndex(S=>S.id===T),N=E===-1?P.cards.length:E;r?.(M,k.id,P.id,N);},onDragEnd:w=>{let{active:C,over:R}=w;if(R&&C.id!==R.id){let M=b(C.id),T=b(R.id)||n.find(k=>k.id===R.id);if(M&&T){let k=T.cards.findIndex(E=>E.id===R.id),P=k===-1?T.cards.length:k;r?.(C.id,M.id,T.id,P);}}f(null),g(null);},children:[jsx("div",{ref:d,className:u(Yb({variant:t,className:e})),...c,children:n.map(w=>jsx(VM,{column:w,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},w.id))}),jsx(DragOverlay,{children:m&&p&&jsx("div",{className:u(El({variant:t,isDragging:true})),children:s?s(m,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:m.title}),m.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});qb.displayName="KanbanBoard";var Zb=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Qb=X.createContext(null);function Is(){let e=X.useContext(Qb);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Jb=X.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=AM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=X.useState(false),[h,b]=X.useState(false),[v,x]=X.useState(0),[y,w]=X.useState([]),C=X.useCallback(P=>{P&&(x(P.selectedScrollSnap()),g(P.canScrollPrev()),b(P.canScrollNext()));},[]),R=X.useCallback(()=>{f?.scrollPrev();},[f]),M=X.useCallback(()=>{f?.scrollNext();},[f]),T=X.useCallback(P=>{f?.scrollTo(P);},[f]),k=X.useCallback(P=>{P.key==="ArrowLeft"?(P.preventDefault(),R()):P.key==="ArrowRight"&&(P.preventDefault(),M());},[R,M]);return X.useEffect(()=>{!f||!l||l(f);},[f,l]),X.useEffect(()=>{if(f)return w(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(Qb.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:M,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:y,scrollTo:T,orientation:a},children:jsxs("div",{ref:d,className:u(Zb({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(Ll,{}),jsx(Sl,{})]}),i&&y.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:y.map((P,E)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",E===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(E),"aria-label":`Go to slide ${E+1}`},E))})]})})});Jb.displayName="Carousel";var ev=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex",e),...t}));ev.displayName="CarouselContent";var tv=X.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=Is();return jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});tv.displayName="CarouselItem";var Ll=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollPrev:s,canScrollPrev:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Ll.displayName="CarouselPrevious";var Sl=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollNext:s,canScrollNext:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Sl.displayName="CarouselNext";var nv=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Vs={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},Hl={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},rv=X.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=X.useState(r.length>0?"recent":o),[m,f]=X.useState(""),g=m?Object.values(Hl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Hl[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:u(nv({size:t,className:e})),...i,children:[a&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Pa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx(ke,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(Vs).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:u("shrink-0 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:Vs[b].name,children:v},b))})}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Vs[c].name}),jsx(ke,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});rv.displayName="EmojiPicker";var ov=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),fN=cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),gN=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Xe=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(_n,{children:[jsx(Yn,{children:jsx(ae,{type:"button",variant:n?"solid":"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Xn,{side:"top",className:"text-xs",children:t})]}),av=X.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[jM.configure({heading:{levels:[1,2,3]}}),WM.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),_M,YM.configure({types:["heading","paragraph"]}),XM.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});X.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),X.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx(Wn,{children:jsxs("div",{ref:f,className:u(ov({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(fN({size:n})),children:[jsx(Xe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Xe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Xe,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Xe,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Xe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Xe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Xe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Xe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Xe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Xe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Xe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Xe,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:u(gN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});av.displayName="RichTextEditor";var iv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function CN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function sv(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var lv=X.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=X.useRef(null),[h,b]=X.useState(),[v,x]=X.useState(),[y,w]=X.useState(1),[C,R]=X.useState(0),M=E=>{let{width:N,height:S}=E.currentTarget;if(r){let H=CN(N,S,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},T=E=>{b(E),o?.(E);},k=async E=>{if(x(E),a&&g.current&&E.width&&E.height){let N=await sv(g.current,E,C,y);a(N);}},P=()=>{R(E=>(E+90)%360);};return X.useEffect(()=>{v&&g.current&&a&&sv(g.current,v,C,y).then(E=>{a(E);});},[y,C,v,a]),jsxs("div",{ref:p,className:u(iv({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(bN,{crop:h,onChange:T,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",crossOrigin:"anonymous",onLoad:M,style:{transform:`scale(${y}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx(Ua,{value:[y],onValueChange:([E])=>w(E),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"sm",isIconOnly:true,onClick:P,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});lv.displayName="ImageCropper";var zl=cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),NN={sm:96,md:128,lg:192},dv=X.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??NN[n??"md"];return r?jsx("div",{ref:h,className:u(zl({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(TN,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(zl({variant:t,size:n,className:e})),...g,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});dv.displayName="QRCode";var uv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});uv.displayName="ThemeProvider";var HN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),mv=X.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=X.useState(false);X.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(Cn,{children:[jsx(Tn,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(Mn,{align:"end",children:[jsxs($t,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs($t,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs($t,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});mv.displayName="ThemeToggle";var pv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),fv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-11 px-4 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),gv=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),bv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=X.useId(),v=p||b,x=`${v}-description`,y=`${v}-error`,w=a&&r;return jsxs("div",{className:u(pv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(gv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":w?y:n?x:void 0,"aria-required":o,className:u(fv({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!w&&jsx("p",{id:x,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),w&&jsx("p",{id:y,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});bv.displayName="TextField";var xv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),AN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),vv=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),hv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),zN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),yv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:x,fullWidth:y=false,disabled:w,id:C,...R},M)=>{let T=X.useId(),k=C||T,P=`${k}-description`,E=`${k}-error`,[N,S]=X.useState(h),[H,D]=X.useState(false),L=g!==void 0?g:N,I=a&&r,V=X.useCallback(z=>{z!==void 0&&(m!==void 0&&z<m&&(z=m),f!==void 0&&z>f&&(z=f)),g===void 0&&S(z),b?.(z);},[g,m,f,b]),O=()=>{let z=(L??0)+p;V(z);},A=()=>{let z=(L??0)-p;V(z);},K=z=>{let j=z.target.value;if(j==="")V(void 0);else {let W=parseFloat(j);isNaN(W)||V(W);}},$=z=>{z.key==="ArrowUp"?(z.preventDefault(),O()):z.key==="ArrowDown"&&(z.preventDefault(),A());},G=X.useMemo(()=>L===void 0?"":x?new Intl.NumberFormat(void 0,x).format(L):L.toString(),[L,x]),Y=m!==void 0&&L!==void 0&&L<=m,F=f!==void 0&&L!==void 0&&L>=f;return jsxs("div",{className:u(xv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:u(zN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:A,disabled:w||Y,className:u(vv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(hv({size:s}))})}),jsx("input",{ref:M,id:k,type:"text",inputMode:"decimal",value:G,onChange:K,onKeyDown:$,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?E:n?P:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:w,className:u(AN({size:s,isInvalid:a,fullWidth:y}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsx("button",{type:"button",onClick:O,disabled:w||F,className:u(vv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(hv({size:s}))})})]}),n&&!I&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:E,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});yv.displayName="NumberField";var wv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),FN=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-11 pl-12 pr-12 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Rv=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),KN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),$N=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),Cv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:x,placeholder:y="Search...",id:w,...C},R)=>{let M=X.useId(),T=w||M,k=`${T}-description`,P=`${T}-error`,[E,N]=X.useState(f),S=m!==void 0?m:E,H=a&&r,D=S.length>0,L=O=>{let A=O.target.value;m===void 0&&N(A),p?.(A);},I=()=>{m===void 0&&N(""),p?.(""),g?.();},V=O=>{O.key==="Enter"?(O.preventDefault(),h?.(S)):O.key==="Escape"&&D&&(O.preventDefault(),I());};return jsxs("div",{className:u(wv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:u(KN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(Rv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:R,id:T,type:"search",value:S,onChange:L,onKeyDown:V,placeholder:y,"aria-invalid":a,"aria-describedby":H?P:n?k:void 0,"aria-required":o,disabled:x,className:u(FN({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!x&&jsx("button",{type:"button",onClick:I,className:u($N({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:u(Rv({size:s}))})})]}),n&&!H&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Cv.displayName="SearchField";var Tv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),UN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),jN=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),WN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Fs={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},jl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},Gl=(e,t)=>String(e).padStart(t,"0"),ma=(e,t)=>{if(!e)return "";let n=Gl(e.getDate(),2),r=Gl(e.getMonth()+1,2),o=Gl(e.getFullYear(),4),a=Fs[t],s=jl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},Ul=(e,t)=>{let n=Fs[t],r=e.split(n);if(r.length!==3)return null;let o=jl[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},_N=e=>{let t=Fs[e];return jl[e].map(r=>r==="year"?"####":"##").join(t)},Ks=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:x="text",fullWidth:y=false,disabled:w,placeholder:C,id:R,...M},T)=>{let k=X.useId(),P=R||k,E=`${P}-description`,N=`${P}-error`,[S,H]=X.useState(f??null),[D,L]=X.useState(""),[I,V]=X.useState(false),[O,A]=X.useState(false),K=m!==void 0?m:S,$=a&&r,G=Fs[b],Y=_N(b);X.useEffect(()=>{O||L(ma(K,b));},[K,b,O]);let F=U=>{m===void 0&&H(U),p?.(U);},z=U=>{let Ce=U??null;F(Ce),L(ma(Ce,b)),V(false);},j=U=>{let Ce=U.target.value;Ce=Ce.replace(new RegExp(`[^0-9\\${G}]`,"g"),"");let Q=Ce.replace(new RegExp(`\\${G}`,"g"),""),le="",Be=0;for(let pe=0;pe<Y.length&&Be<Q.length;pe++)Y[pe]==="#"?(le+=Q[Be],Be++):le+=Y[pe];if(L(le),le.length===Y.length){let pe=Ul(le,b);if(pe){if(g&&pe<g||h&&pe>h)return;F(pe);}}},W=()=>{A(true);},B=()=>{A(false),D.length!==Y.length?L(ma(K,b)):Ul(D,b)||L(ma(K,b));},Z=()=>{w||V(true);},ue=()=>{!w&&x==="picker"&&v&&V(true);};return jsxs("div",{className:u(Tv({size:s}),e),children:[t&&jsxs("label",{htmlFor:P,className:u(WN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&I,onOpenChange:V,children:[jsxs(an,{className:u("relative",y?"w-full":"w-fit"),children:[jsx("input",{ref:T,id:P,type:"text",inputMode:x==="text"?"numeric":void 0,value:D,onChange:x==="text"?j:void 0,onClick:ue,onFocus:W,onBlur:B,readOnly:x==="picker","aria-invalid":a,"aria-describedby":$?N:n?E:void 0,"aria-required":o,disabled:w,placeholder:C||b.toLowerCase(),className:u(UN({size:s,isInvalid:a,fullWidth:y,showPickerIcon:v}),x==="picker"&&v&&"cursor-pointer",l),style:{borderColor:O||v&&I?"var(--color-foreground)":void 0},...M}),v&&jsx("button",{type:"button",onClick:Z,disabled:w,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(jN({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(eo,{mode:"single",selected:K??void 0,onSelect:z,disabled:U=>!!(g&&U<g||h&&U>h),defaultMonth:K??void 0,showMonthAndYearPickers:true})})]}),n&&!$&&jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),$&&jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ks.displayName="DatePicker";var YN=Ks,XN=Ks;var Mv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),qN=cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),ZN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Nv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:x,fullWidth:y=false,id:w,...C},R)=>{let M=X.useId(),T=w||M,k=`${T}-description`,P=`${T}-error`,E=X.useRef(null),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),[D,L]=X.useState(f??null),I=m!==void 0?m:D,V=a&&r,O=_=>v===24?_:_===0?12:_>12?_-12:_,A=_=>_>=12?"PM":"AM",K=(_,oe)=>oe==="AM"?_===12?0:_:_===12?12:_+12,[$,G]=X.useState(I?String(O(I.hour)).padStart(2,"0"):""),[Y,F]=X.useState(I?String(I.minute).padStart(2,"0"):""),[z,j]=X.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[W,B]=X.useState(I?A(I.hour):"AM"),[Z,ue]=X.useState(false);X.useEffect(()=>{m!==void 0&&(m?(G(String(O(m.hour)).padStart(2,"0")),F(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),B(A(m.hour))):(G(""),F(""),j("")));},[m,v]);let U=(_,oe,q,De)=>{let de=parseInt(_,10),je=parseInt(oe,10),We=b?parseInt(q,10):void 0;if(isNaN(de)||isNaN(je)||b&&isNaN(We)){m===void 0&&L(null),p?.(null);return}let ve={hour:v===12?K(de,De):de,minute:je,...b&&We!==void 0&&{second:We}};m===void 0&&L(ve),p?.(ve);},Ce=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);G(oe);let q=v===24?23:12,De=v===24?0:1;if(oe.length===2){let de=parseInt(oe,10);de>=De&&de<=q&&(N.current?.focus(),N.current?.select());}},Q=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);if(F(oe),oe.length===2){let q=parseInt(oe,10);q>=0&&q<=59&&(b?(S.current?.focus(),S.current?.select()):v===12&&H.current?.focus());}},le=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);j(oe),oe.length===2&&v===12&&H.current?.focus();},Be=()=>{if($){let _=parseInt($,10),oe=v===24?23:12,De=Math.min(Math.max(_,v===24?0:1),oe),de=String(De).padStart(2,"0");G(de),U(de,Y,z,W);}},pe=()=>{if(Y){let _=parseInt(Y,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");F(q),U($,q,z,W);}},Ct=()=>{if(z){let _=parseInt(z,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");j(q),U($,Y,q,W);}},bt=()=>{let _=W==="AM"?"PM":"AM";B(_),U($,Y,z,_);},yn=_=>{let oe=_.key.toLowerCase();oe==="a"?(_.preventDefault(),W!=="AM"&&(B("AM"),U($,Y,z,"AM"))):oe==="p"?(_.preventDefault(),W!=="PM"&&(B("PM"),U($,Y,z,"PM"))):oe==="arrowup"||oe==="arrowdown"?(_.preventDefault(),bt()):oe==="arrowleft"&&(_.preventDefault(),b?(S.current?.focus(),S.current?.select()):(N.current?.focus(),N.current?.select()));},Fe=(_,oe)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let q=_.key==="ArrowUp"?1:-1;if(oe==="hour"){let De=parseInt($,10)||0,de=v===24?23:12,je=v===24?0:1,We=De+q;We>de&&(We=je),We<je&&(We=de);let Gn=String(We).padStart(2,"0");G(Gn),U(Gn,Y,z,W);}else if(oe==="minute"){let de=(parseInt(Y,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");F(je),U($,je,z,W);}else if(oe==="second"){let de=(parseInt(z,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");j(je),U($,Y,je,W);}}_.key==="ArrowRight"&&(_.preventDefault(),oe==="hour"?(N.current?.focus(),N.current?.select()):oe==="minute"&&b?(S.current?.focus(),S.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),oe==="minute"?(E.current?.focus(),E.current?.select()):oe==="second"&&(N.current?.focus(),N.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(oe==="minute"?E.current?.focus():oe==="second"&&N.current?.focus());},Tt=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",x&&"cursor-not-allowed");return jsxs("div",{ref:R,className:u(Mv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:u(ZN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(qN({size:s,isInvalid:a,disabled:x,fullWidth:y}),l),style:{borderColor:Z?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||ue(false);},children:[jsx("input",{ref:E,id:T,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:$,onChange:Ce,onBlur:Be,onKeyDown:_=>Fe(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":V?P:n?k:void 0,"aria-required":o,disabled:x,className:Tt}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:N,type:"text",inputMode:"numeric",placeholder:"mm",value:Y,onChange:Q,onBlur:pe,onKeyDown:_=>Fe(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:x,className:Tt}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"ss",value:z,onChange:le,onBlur:Ct,onKeyDown:_=>Fe(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:x,className:Tt})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:bt,onKeyDown:yn,disabled:x,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",x&&"cursor-not-allowed"),"aria-label":"AM/PM",children:W})]}),n&&!V&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Nv.displayName="TimeField";var Pv=cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),Ev=X.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],x=(w,C)=>{C&&C(),l&&l(w);},y=w=>jsxs("button",{type:"button",disabled:i||w.isDisabled,onClick:()=>x(w.key,w.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:b),"aria-label":w.label,children:[w.icon&&jsx("span",{className:v,children:w.icon}),c&&jsx("span",{children:w.label})]},w.key);return jsxs("div",{ref:f,role:"group",className:u(Pv({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(w=>d?d(w):y(w)),g.length>0&&jsxs(Cn,{children:[jsx(Tn,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(Mn,{align:"end",children:g.map(w=>jsxs($t,{disabled:w.isDisabled,onClick:()=>x(w.key,w.onPress),children:[w.icon&&jsx("span",{className:u(v,"mr-2"),children:w.icon}),w.label]},w.key))})]})]})});Ev.displayName="ActionGroup";var Hv=cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),tk=cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Iv=X.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(Hv({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:u(tk({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));Iv.displayName="StatusLight";var Vv=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),Av=X.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Vv({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(Nt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});Av.displayName="ActionBar";var zv=X.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));zv.displayName="ActionBarButton";var Fv=cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Kv=cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function $v({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),[h,b]=X.useState(null),[v,x]=X.useState(null),y=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),w=T=>{if(a==="none")return;let k;a==="single"?k=y.has(T)?new Set:new Set([T]):(k=new Set(y),k.has(T)?k.delete(T):k.add(T)),o||g(k),s?.(k);},C=(T,k)=>{b(k),T.dataTransfer.effectAllowed="move";},R=(T,k)=>{T.preventDefault(),h!==k&&x(k);},M=()=>{if(h&&v&&h!==v){let T=r.findIndex(N=>N.key===h),k=r.findIndex(N=>N.key===v),P=[...r],[E]=P.splice(T,1);P.splice(k,0,E),l?.(P);}b(null),x(null);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Fv({variant:t,size:n,className:e})),...f,children:r.map(T=>{let k=y.has(T.key),P=h===T.key,E=v===T.key;return d?jsx("div",{role:"option","aria-selected":k,onClick:()=>w(T.key),children:d(T,k)},T.key):jsxs("div",{role:"option","aria-selected":k,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:N=>C(N,T.key),onDragOver:N=>R(N,T.key),onDragEnd:M,onClick:()=>!T.isDisabled&&w(T.key),className:u(Kv({variant:t,size:n,isSelected:k,isDisabled:T.isDisabled}),P&&"opacity-50",E&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsx(Check,{className:"h-3 w-3"})}),T.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:T.label}),T.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}$v.displayName="ListView";var Gv=cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),ik=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),lk=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Uv=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,x]=X.useState(o),y=r!==void 0,w=y?r:v,C=X.useRef(null),[R,M]=X.useState(false),[T,k]=X.useState(null),P=(A,K)=>{if(!C.current)return w[0];let $=C.current.getBoundingClientRect(),G;t==="horizontal"?G=(A-$.left)/$.width:G=1-(K-$.top)/$.height,G=Math.max(0,Math.min(1,G));let Y=i+G*(l-i),F=Math.round(Y/c)*c;return Math.max(i,Math.min(l,F))},E=(A,K)=>{let $=[...w];$[K]=A,K===0&&A>w[1]&&($[0]=w[1]),K===1&&A<w[0]&&($[1]=w[0]),y||x($),a?.($);},N=(A,K)=>{d||(A.preventDefault(),M(true),k(K),A.target.setPointerCapture(A.pointerId));},S=A=>{if(!R||T===null||d)return;let K=P(A.clientX,A.clientY);E(K,T);},H=()=>{R&&(M(false),k(null),s?.(w));},D=A=>{if(d)return;let K=P(A.clientX,A.clientY),$=Math.abs(w[0]-K),G=Math.abs(w[1]-K),Y=$<=G?0:1;E(K,Y);let F=[...w];F[Y]=K,s?.(F);},L=(A,K)=>{if(d)return;let $=w[K];switch(A.key){case "ArrowRight":case "ArrowUp":A.preventDefault(),$=Math.min(l,w[K]+c);break;case "ArrowLeft":case "ArrowDown":A.preventDefault(),$=Math.max(i,w[K]-c);break;case "Home":A.preventDefault(),$=i;break;case "End":A.preventDefault(),$=l;break;default:return}E($,K);let G=[...w];G[K]=$,s?.(G);},I=A=>(A-i)/(l-i)*100,V={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],O={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(w[0])}),jsx("span",{children:f(w[1])})]}),jsxs("div",{ref:b,className:u(Gv({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(ik({orientation:t,size:n})),onClick:D,children:jsx("div",{className:u("absolute rounded-full",V,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(w[0])}%`,right:`${100-I(w[1])}%`,top:0,bottom:0}:{bottom:`${I(w[0])}%`,top:`${100-I(w[1])}%`,left:0,right:0}})}),w.map((A,K)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":A,"aria-orientation":t||void 0,"aria-disabled":d,className:u(lk({size:n}),R&&T===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(A)}% - ${O/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(A)}% - ${O/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:$=>N($,K),onPointerMove:S,onPointerUp:H,onPointerCancel:H,onKeyDown:$=>L($,K)},K)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:w[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:w[1]})]})]})]})});Uv.displayName="RangeSlider";var Zl=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),pk=cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),fk={help:HelpCircle,info:Info,warning:AlertCircle},_v=X.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=X.useState(false),[b,v]=X.useState(false),[x,y]=X.useState({top:0,left:0}),w=X.useRef(null),C=X.useRef(null),R=i!==void 0?i:g,M=X.useCallback(E=>{i===void 0&&h(E),l?.(E);},[i,l]);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!R||!w.current)return;let E=()=>{let N=w.current.getBoundingClientRect(),S=C.current?.getBoundingClientRect(),H=S?.width||288,D=S?.height||100,L=8,I=0,V=0;switch(a){case "top":I=N.top-D-L,V=N.left+N.width/2-H/2;break;case "bottom":I=N.bottom+L,V=N.left+N.width/2-H/2;break;case "left":I=N.top+N.height/2-D/2,V=N.left-H-L;break;case "right":I=N.top+N.height/2-D/2,V=N.right+L;break}if(a==="top"||a==="bottom")switch(s){case "start":V=N.left;break;case "center":V=N.left+N.width/2-H/2;break;case "end":V=N.right-H;break}if(a==="left"||a==="right")switch(s){case "start":I=N.top;break;case "center":I=N.top+N.height/2-D/2;break;case "end":I=N.bottom-D;break}V=Math.max(8,Math.min(V,window.innerWidth-H-8)),I=Math.max(8,Math.min(I,window.innerHeight-D-8)),y({top:I,left:V});};return E(),requestAnimationFrame(E),window.addEventListener("resize",E),window.addEventListener("scroll",E,true),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true);}},[R,a,s]),X.useEffect(()=>{if(!R)return;let E=N=>{C.current&&!C.current.contains(N.target)&&w.current&&!w.current.contains(N.target)&&M(false);};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[R,M]),X.useEffect(()=>{if(!R)return;let E=N=>{N.key==="Escape"&&M(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[R,M]);let T=fk[e??"help"],k=()=>{M(!R);},P=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?X.isValidElement(o)?X.cloneElement(o,{ref:w,onClick:E=>{o.props.onClick?.(E),k();}}):jsx("button",{ref:w,type:"button",onClick:k,className:u(Zl({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},type:"button",onClick:k,className:u(Zl({variant:e,size:t}),m),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),b&&R&&Ba.createPortal(jsxs("div",{ref:C,className:u(pk({size:t}),f),style:{position:"fixed",top:x.top,left:x.left,transformOrigin:P()},role:"tooltip",children:[n&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});_v.displayName="ContextualHelp";var Xv=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),Ql=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function qv({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=X.useState(new Set),v=X.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),x=R=>{if(s==="none")return;let M;s==="single"?M=v.has(R)?new Set:new Set([R]):(M=new Set(v),M.has(R)?M.delete(R):M.add(R)),a||b(M),i?.(M);},y=(R,M)=>{M.stopPropagation(),c?.(R);},w=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxs("div",{role:"group","aria-label":d,className:u(Xv({spacing:t}),e),...g,children:[w.map(R=>{let M=v.has(R.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!R.isDisabled?0:void 0,"aria-pressed":T?M:void 0,onClick:()=>!R.isDisabled&&x(R.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!R.isDisabled&&(k.preventDefault(),x(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(Ql({variant:R.color?void 0:n,size:r,isSelected:M,isDisabled:R.isDisabled}),T&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsx("button",{type:"button",onClick:k=>y(R.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxs("span",{className:u(Ql({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}qv.displayName="TagGroup";var Jv=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),eh=cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function th({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),h=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let x;a==="single"?x=h.has(v)?new Set:new Set([v]):(x=new Set(h),x.has(v)?x.delete(v):x.add(v)),o||g(x),s?.(x);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(Jv({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let x=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":x,onClick:()=>b(v.key),children:d(v,x)},v.key):jsxs("div",{role:"gridcell","aria-selected":x,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(eh({variant:l,size:c,isSelected:x,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&x&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}th.displayName="GridList";var rh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),hk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),xk=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),Xs=X.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let x=(n-r)/(o-r),y=s!==void 0?(s-r)/(o-r):.25,w=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?x<=y?"bg-red-500":x<=w?"bg-yellow-500":"bg-green-500":x>=w?"bg-red-500":x>=y?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(rh({size:t})),children:jsx("div",{className:u(hk({variant:f})),children:jsx("div",{className:u(xk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Xs.displayName="Meter";var oh=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));oh.displayName="DiskUsageMeter";var ah=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));ah.displayName="BatteryMeter";var sh=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Zs=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},ih=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},lh=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},ch=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),dh=X.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=X.useCallback(A=>{let K=lh(A);return K?ih(...K):[0,1,1]},[]),[v,x]=X.useState(()=>b(r||o)),y=e??v[0],w=t??v[1],C=n??v[2];X.useEffect(()=>{if(r){let A=b(r);x(A);}},[r,b]);let R=X.useCallback((A,K)=>{if(l||!p.current)return;let $=p.current.getBoundingClientRect(),G=Math.max(0,Math.min(1,(A-$.left)/$.width)),Y=Math.max(0,Math.min(1,(K-$.top)/$.height)),F=G,z=1-Y;t===void 0&&n===void 0&&x([y,F,z]),a?.({hue:y,saturation:F,brightness:z});let j=Zs(y,F,z);s?.(ch(...j));},[l,y,t,n,a,s]),M=A=>{l||(A.preventDefault(),h(true),A.target.setPointerCapture(A.pointerId),R(A.clientX,A.clientY));},T=A=>{g&&R(A.clientX,A.clientY);},k=A=>{h(false),A.target.releasePointerCapture(A.pointerId);},[P,E,N]=Zs(y,1,1),S=`rgb(${P}, ${E}, ${N})`,H=w*100,D=(1-C)*100,[L,I,V]=Zs(y,w,C),O=`rgb(${L}, ${I}, ${V})`;return jsx("div",{ref:f,className:u(sh({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:S},onPointerDown:M,onPointerMove:T,onPointerUp:k,onPointerLeave:k,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${D}% - ${c/2}px)`,backgroundColor:O,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});dh.displayName="ColorArea";var mh=cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Ck=`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")`,uh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",ph=X.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,x]=X.useState(t??b()),y=e??v,w=r==="hue"?y/360:y,C=X.useCallback((S,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),L=a!=="vertical",I;L?I=Math.max(0,Math.min(1,(S-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let V=r==="hue"?I*360:I;e===void 0&&x(V),n?.(V);},[i,a,r,e,n]),R=S=>{i||(S.preventDefault(),h(true),S.target.setPointerCapture(S.pointerId),C(S.clientX,S.clientY));},M=S=>{g&&C(S.clientX,S.clientY);},T=S=>{h(false),S.target.releasePointerCapture(S.pointerId);},k=()=>{let S=a!=="vertical",H=S?"to right":"to top";switch(r){case "hue":return S?uh:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return uh}},P=()=>r==="hue"?`hsl(${y}, 100%, 50%)`:o,E=a!=="vertical",N=w*100;return jsx("div",{ref:f,className:u(mh({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?Ck:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:M,onPointerUp:T,onPointerLeave:T,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...E?{left:`calc(${N}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${N}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:P(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});ph.displayName="ColorSlider";var fh=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),Nk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},gh=X.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=X.useRef(null),[f,p]=X.useState(false),[g,h]=X.useState(t),b=e??g,v=X.useCallback((R,M)=>{if(o||!m.current)return;let T=m.current.getBoundingClientRect(),k=T.width/2,P=R-T.left,E=M-T.top,N=Nk(P,E,k);e===void 0&&h(N),n?.(N);},[o,e,n]),x=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},y=R=>{f&&v(R.clientX,R.clientY);},w=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let M=0;M<=360;M+=30)R.push(`hsl(${M}, 100%, 50%) ${M}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsx("div",{ref:d,className:u(fh({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:x,onPointerMove:y,onPointerUp:w,onPointerLeave:w,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(kk,{hue:b,innerRadius:a,thumbSize:s})]})})});gh.displayName="ColorWheel";var kk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var vh=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),Ek=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Lk=cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),hh=X.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxs("div",{ref:h,className:u(vh({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:u(Ek({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsx("span",{className:u(Lk({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});hh.displayName="LabeledValue";var xh=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),yh=X.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:u(xh({orientation:t,gap:n,className:e})),...r}));yh.displayName="LabeledValueGroup";var Th=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),To=cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Mh=X.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:x,...y},w)=>{let[C,R]=X.useState(false),[M,T]=X.useState(t),k=e!==void 0?e:M,P=X.useRef(null);X.useImperativeHandle(w,()=>P.current);let E=k.length>0,N=C&&(a.length>0||s.length>0||l.length>0||E),S=A=>{e===void 0&&T(A),n?.(A);},H=()=>{S(""),P.current?.focus();},D=A=>{A?.preventDefault(),k.trim()&&(r?.(k.trim()),R(false));},L=A=>{S(A.label),o?.(A),R(false);},I=A=>{S(A),r?.(A),R(false);},V=A=>{S(A),r?.(A),R(false);},O=X.useMemo(()=>{let A={};return a.forEach(K=>{let $=K.category||"Results";A[$]||(A[$]=[]),A[$].push(K);}),A},[a]);return jsxs(ot,{open:N,onOpenChange:R,children:[jsx(an,{children:jsxs("form",{onSubmit:D,className:u(Th({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(To({size:g}),"ml-3")}),jsx("input",{ref:P,type:"text",value:k,onChange:A=>S(A.target.value),onFocus:()=>R(true),placeholder:v,disabled:x,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...y}),d&&E&&!x&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",To({size:g})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:A=>A.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!E&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((A,K)=>jsxs("button",{type:"button",onClick:()=>I(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(To({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A}),jsx(ArrowRight,{className:u(To({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!E&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((A,K)=>jsxs("button",{type:"button",onClick:()=>V(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(To({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A})]},K))]}),E&&jsx("div",{className:"p-2",children:c?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(O).map(([A,K])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A})}),K.map($=>jsxs("button",{type:"button",onClick:()=>L($),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[$.icon||jsx(Search,{className:u(To({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:$.label}),$.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:$.description})]})]},$.id))]},A)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Mh.displayName="SearchBar";var Nh={Pages:jsx(File,{className:"h-4 w-4"}),Files:jsx(Folder,{className:"h-4 w-4"}),Settings:jsx(Settings,{className:"h-4 w-4"}),Users:jsx(User,{className:"h-4 w-4"}),Tags:jsx(Hash,{className:"h-4 w-4"})},Eh=X.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=X.useState(""),g=X.useRef(null),[h,b]=X.useState(false);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{e||p("");},[e]),X.useEffect(()=>{if(!e)return;let R=M=>{M.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),X.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let v=X.useMemo(()=>{let R={};return n.forEach(M=>{let T=M.category||"Results";R[T]||(R[T]=[]),R[T].push(M);}),R},[n]),x=R=>{R.onSelect?.(),c?.(R),t?.(false);},y=()=>{t?.(false);},w=f.length>0,C=!w&&r.length>0;return !h||!e?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:y}),jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X$1,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[C&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(R=>jsxs(Command.Item,{value:R.label,onSelect:()=>x(R),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:R.icon||Nh[R.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:R.label}),R.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((M,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:M},T))})]},R.id))]}),w&&Object.entries(v).map(([R,M])=>jsxs(Command.Group,{heading:R,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),M.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>x(T),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:T.icon||Nh[R]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},R)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});Eh.displayName="SpotlightSearch";function Gk(e="k"){let[t,n]=X.useState(false);return X.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var Dh=X.createContext(null),Js=()=>{let e=X.useContext(Dh);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},Zk=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=X.useState([]),[a,s]=X.useState(false),i=X.useRef(null),l=t!==void 0,c=l?t:r,d=X.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=X.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=X.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=X.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=X.useCallback(()=>{d([]);},[d]);return jsx(Dh.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Hh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Hh.displayName="NotificationCenter";var Ih=X.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=Js(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Ih.displayName="NotificationCenterTrigger";var Vh=X.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=Js(),[p,g]=X.useState(false),h=X.useRef(null),[b,v]=X.useState({top:0,left:0});return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!i||!f.current||!h.current)return;let x=()=>{if(!f.current||!h.current)return;let y=f.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=y.bottom+n,R=y.left;t==="center"?R=y.left+y.width/2-w.width/2:t==="end"&&(R=y.right-w.width),R+w.width>window.innerWidth-16&&(R=window.innerWidth-w.width-16),R<16&&(R=16),v({top:C,left:R});};return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,true),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,true);}},[i,f,t,n]),X.useEffect(()=>{if(!i)return;let x=w=>{h.current&&!h.current.contains(w.target)&&f.current&&!f.current.contains(w.target)&&l(false);},y=w=>{w.key==="Escape"&&l(false);};return document.addEventListener("mousedown",x),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",y);}},[i,l,f]),!p||!i?null:Ba.createPortal(jsxs("div",{ref:x=>{h.current=x,typeof s=="function"?s(x):s&&(s.current=x);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X$1,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:r})]}):c.map(x=>jsx(rc,{notification:x},x.id)))})]}),document.body)});Vh.displayName="NotificationCenterContent";var Qk={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},Jk={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},rc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=Js(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=Jk[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let x=typeof v=="string"?new Date(v):v,w=new Date().getTime()-x.getTime(),C=Math.floor(w/6e4),R=Math.floor(w/36e5),M=Math.floor(w/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":M<7?M+"d ago":x.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",Qk[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};rc.displayName="NotificationItem";var Ah=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Ah.displayName="NotificationList";var zh=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),iP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Oh=X.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=X.useState(true),[v,x]=X.useState(false);X.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),X.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{y();},d);return ()=>clearTimeout(R)}},[d,h]);let y=()=>{x(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let w=iP[t],C=r?o!==void 0?o:w?jsx(w,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(zh({variant:n,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:y,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});Oh.displayName="Banner";var fa=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:bg-primary hover:text-primary-foreground hover:border-primary"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),dP=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),ac=X.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,x]=X.useState(false),y=o&&o.length>0,w=k=>{y&&x(!v),p?.(k);},C=k=>{k.onClick?.(),x(false);},R={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},M=l==="rotate"&&v?"rotate-45":"",T=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&fa({position:m})),children:[y&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((k,P)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${P*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsx("a",{href:k.href,className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsx("button",{type:"button",onClick:()=>C(k),className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxs("button",{ref:b,type:"button",onClick:w,disabled:g,className:u(fa({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":y?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(dP({size:d}),M,T,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),y&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>x(false)})]})});ac.displayName="FloatingActionButton";var uP=ac;var Gh=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),Fh=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Uh=X.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=X.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=y=>{y.disabled||(p||f(y.key),s?.(y.key));},b=y=>t==="filled"?y?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":y?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},x=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(Gh({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(y=>{let w=g===y.key,C=i==="all"||i==="active"&&w,R=w&&y.activeIcon?y.activeIcon:y.icon;if(l)return jsx("div",{onClick:()=>h(y),className:u(Fh({variant:t}),y.disabled&&"opacity-50 cursor-not-allowed"),children:l(y,w)},y.key);let M=jsxs("div",{onClick:()=>!y.href&&h(y),className:u(Fh({variant:t}),b(w),y.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":w?"page":void 0,"aria-disabled":y.disabled,tabIndex:y.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(y));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:R}),y.badge!==void 0&&y.badge>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:y.badge>99?"99+":y.badge}),y.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&y.label&&jsx("span",{className:u(x(),"font-medium truncate max-w-full px-1"),children:y.label})]},y.key);return y.href&&!y.disabled?jsx("a",{href:y.href,onClick:()=>h(y),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(w)),children:M},y.key):M})})});Uh.displayName="BottomNavigation";var pP="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",Wh=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),_h=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsx(Drawer.Trigger,{asChild:true,children:n}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:pP,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Wh({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});_h.displayName="ActionSheet";var Xh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),ic=cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),qh=X.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=X.useRef(null),[p,g]=X.useState(0),[h,b]=X.useState(false),v=X.useRef(0),x=X.useRef(0),y=n.length*(o==="sm"?64:o==="lg"?96:80),w=r.length*(o==="sm"?64:o==="lg"?96:80),C=P=>{i||(b(true),v.current=P.touches[0].clientX,x.current=p);},R=P=>{if(!h||i)return;let N=P.touches[0].clientX-v.current,S=x.current+N;(S>0&&n.length===0||S<0&&r.length===0)&&(S=0),S>y?S=y+(S-y)*.3:S<-w&&(S=-w+(S+w)*.3),g(S);},M=()=>{if(!h)return;b(false);let P=f.current?.offsetWidth||0,E=Math.abs(p)/P;if(l&&E>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>y*a&&n.length>0?(g(y),s?.("right")):p<-w*a&&r.length>0?(g(-w),s?.("left")):g(0);},T=(P,E)=>{P.onAction?.(),s?.(E,P.key),g(0);},k=()=>{g(0);};return jsxs("div",{ref:m,className:u(Xh({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:y},children:n.map(P=>jsxs("button",{type:"button",onClick:()=>T(P,"right"),className:u(ic({variant:P.variant,size:o})),style:{opacity:Math.min(1,p/y)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:w},children:r.map(P=>jsxs("button",{type:"button",onClick:()=>T(P,"left"),className:u(ic({variant:P.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/w)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:M,onClick:p!==0?k:void 0,children:c})]})});qh.displayName="SwipeActions";var Qh=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),bP=cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),Jh=X.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=X.useRef(null),[b,v]=X.useState(0),[x,y]=X.useState("idle"),w=X.useRef(0),C=X.useRef(false),R=()=>l||x==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,M=N=>{R()&&(w.current=N.touches[0].clientY,C.current=true);},T=N=>{if(!C.current||!R())return;let H=N.touches[0].clientY-w.current;if(H<0){v(0),y("idle");return}let L=Math.min(H*.5,o);v(L),y(L>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,x==="ready"){y("refreshing"),v(r*.6);try{await n();}finally{y("idle"),v(0);}}else y("idle"),v(0);},P={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],E=()=>{if(x==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(P,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let N=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(P,"text-muted-foreground transition-transform"),style:{transform:`rotate(${N}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:x==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(Qh({variant:t,className:e})),...p,children:[jsx("div",{className:u(bP({size:i}),"z-10",x==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:E()}),jsx("div",{ref:h,className:u("transition-transform duration-200",x==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:M,onTouchMove:T,onTouchEnd:k,children:f})]})});Jh.displayName="PullToRefresh";var $r=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),vP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},ex=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:vP,custom:i,transition:$r(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});ex.displayName="Fade";var hP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},tx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=X.useMemo(()=>hP(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:$r(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});tx.displayName="Slide";var xP={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},yP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},nx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:yP,custom:i,transition:$r(n,r,o),className:u(a),style:{transformOrigin:xP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});nx.displayName="Scale";var rx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:$r(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});rx.displayName="Collapse";var ox=X.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:$r(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});ox.displayName="Expand";var ax=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:$r(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});ax.displayName="Rotate";var sx=X.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:r?180:0},transition:$r(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});sx.displayName="Flip";var ix=X.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=X.useState([]),l=X.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(x=>[...x,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});ix.displayName="Ripple";var lx=X.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});lx.displayName="Bounce";var CP={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},cx=X.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:CP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});cx.displayName="Shake";var TP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},dx=X.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:u(t&&TP[n],r),children:e}));dx.displayName="Pulse";var ux=X.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ux.displayName="Wiggle";var mx=X.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=X.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});mx.displayName="Pop";var LP=(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},px=X.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=X.useRef(null),g=useInView(p,{once:true}),[h,b]=X.useState(!l);X.useEffect(()=>{if(l&&g){let y=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(y)}},[l,g,c]);let v=useMotionValue(t),x=useTransform(v,y=>LP(y,r,s,i));return X.useEffect(()=>{if(h){let y=animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>y.stop()}},[h,e,n,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:x}),a]})})});px.displayName="Counter";var fx=X.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=X.useState(""),[b,v]=X.useState(0),[x,y]=X.useState(false),[w,C]=X.useState(false),R=X.useRef(null),M=useInView(R,{once:true}),[T,k]=X.useState(!l);return X.useEffect(()=>{if(l&&M){let P=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(P)}},[l,M,n]),X.useEffect(()=>{if(!T||w)return;let P=p[b],E;return x?g.length>0?E=setTimeout(()=>{h(g.slice(0,-1));},i):(y(false),v(N=>(N+1)%p.length)):g.length<P.length?E=setTimeout(()=>{h(P.slice(0,g.length+1));},t):b<p.length-1||s?E=setTimeout(()=>{y(true);},r):(C(true),m?.()),()=>clearTimeout(E)},[T,g,b,x,w,p,t,i,r,s,m]),jsxs("span",{ref:R,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});fx.displayName="Typewriter";var gx=X.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=X.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,x)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&x<p.length-1&&"\xA0"]},x))})})});gx.displayName="TextReveal";var bx=X.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=X.useState(0);X.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});bx.displayName="WordRotate";var yx=X.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=X.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});yx.displayName="ScrollReveal";var Rx=X.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsx(DP,{progress:f,position:e})]})});Rx.displayName="ScrollProgress";var DP=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=X.useState(0);return X.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},wx=X.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=X.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});wx.displayName="Parallax";var Mx=X.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsx("style",{children:`
|
|
55
|
+
`,document.body.appendChild(de),q.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:q,node:e});},pe=q=>{if(q.preventDefault(),q.stopPropagation(),!g||g.key===e.key||Z)return;let De=q.currentTarget.getBoundingClientRect(),de=q.clientY-De.top,je=De.height,We;de<je*.25?We=-1:de>je*.75?We=1:We=0,!(w&&!w({dropNode:e,dropPosition:We,dragNode:g}))&&(x(e.key,We),R?.({event:q,node:e}));},Ct=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key)&&T?.({event:q,node:e,expandedKeys:K()});},bt=q=>{q.stopPropagation(),M?.({event:q,node:e});},yn=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key||Z)&&(v!==null&&y(e,v),h(null),x(null,null));},Fe=q=>{h(null),x(null,null),k?.({event:q,node:e});},on=q=>{Z||ue&&i(e.key,e,q);},Tt=q=>{q.stopPropagation(),!Z&&!G&&a(e.key,e);},_=X.useMemo(()=>{if(!B||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[B,v]),oe=[...r,n];return jsxs("div",{className:"relative",children:[P&&t>0&&jsxs(Fragment,{children:[r.map((q,De)=>!q&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${De} * var(--tree-indent) + 12px)`,top:0,bottom:0}},De)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":G?void 0:Y,"aria-selected":ue?F:void 0,"aria-disabled":Z,draggable:Ce,onDragStart:Be,onDragOver:pe,onDragEnter:Ct,onDragLeave:bt,onDrop:yn,onDragEnd:Fe,onClick:on,className:u("relative",Sg({size:A,isSelected:F,isDragging:W,isDisabled:Z,isHoverable:ue&&!Z}),_,V&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ce&&N&&Q!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Q}),jsx("button",{type:"button",onClick:Tt,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",G&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",Y&&"rotate-90")})}),U&&jsx(jC,{checked:z,indeterminate:j,disabled:Z,onClick:q=>m(e.key,e,q)}),E&&le&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:le}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",V&&"flex-none"),children:e.label})]}),$&&Y&&jsx("div",{role:"group",children:e.children.map((q,De)=>jsx(Hg,{node:q,level:t+1,isLast:De===e.children.length-1,parentIsLastPath:oe},q.key))})]})},WC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},_C=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Ig=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Ig(n,t))return true;return false},Vg=X.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:x=[],onCheck:y,showLine:w=false,showIcon:C=false,showHandle:R=true,dragIcon:T,icon:M,leafIcon:k=jsx(File,{className:"h-4 w-4"}),folderIcon:P=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:E=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,onDrop:I,blockNode:V=false,disabled:O=false,...A},K)=>{let $=X.useCallback(()=>l?new Set(WC(r)):new Set(i),[l,i,r]),[G,Y]=X.useState($),F=s!==void 0,z=F?new Set(s):G,j=X.useCallback((ve,Ye)=>{let Kt=new Set(z),Ae=!Kt.has(ve);Ae?Kt.add(ve):Kt.delete(ve),F||Y(Kt),c?.(Array.from(Kt),{expanded:Ae,node:Ye});},[z,F,c]),[W,B]=X.useState(new Set(p)),Z=f!==void 0,ue=Z?new Set(f):W,U=X.useCallback((ve,Ye,Kt)=>{let Ae=new Set(ue),Rn=!Ae.has(ve);m?Rn?Ae.add(ve):Ae.delete(ve):(Ae.clear(),Rn&&Ae.add(ve)),Z||B(Ae);let jr=[],Ao=Ca=>{for(let Wr of Ca)Ae.has(Wr.key)&&jr.push(Wr),Wr.children&&Ao(Wr.children);};Ao(r),g?.(Array.from(Ae),{selected:Rn,selectedNodes:jr,node:Ye,event:Kt});},[ue,m,Z,g,r]),[Ce,Q]=X.useState(new Set(x)),[le,Be]=X.useState(new Set),pe=v!==void 0,Ct=pe?new Set(Array.isArray(v)?v:v.checked):Ce,bt=pe&&!Array.isArray(v)?new Set(v.halfChecked):le,yn=X.useCallback((ve,Ye,Kt)=>{let Ae=new Set(Ct),Rn=new Set(bt),jr=!Ae.has(ve);if(jr?(Ae.add(ve),Rn.delete(ve)):Ae.delete(ve),!b&&Ye.children){let gi=_C(Ye);for(let Un of gi)jr?(Ae.add(Un),Rn.delete(Un)):Ae.delete(Un);}pe||(Q(Ae),Be(Rn));let Ao=[],Ca=gi=>{for(let Un of gi)Ae.has(Un.key)&&Ao.push(Un),Un.children&&Ca(Un.children);};Ca(r);let Wr=b?{checked:Array.from(Ae),halfChecked:Array.from(Rn)}:Array.from(Ae);y?.(Wr,{checked:jr,checkedNodes:Ao,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[Ct,bt,b,pe,y,r]),[Fe,on]=X.useState(null),[Tt,_]=X.useState(null),[oe,q]=X.useState(null),De=X.useCallback((ve,Ye)=>{_(ve),q(Ye);},[]),de=X.useCallback((ve,Ye)=>{!Fe||!I||Ye===0&&Ig(Fe,ve.key)||I({event:{},node:ve,dragNode:Fe,dropPosition:Ye,dropToGap:Ye!==0});},[Fe,I]),je=X.useCallback(()=>Array.from(z),[z]),We={expandedKeys:z,toggleExpand:j,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:Ct,halfCheckedKeys:bt,handleCheck:yn,checkable:h,checkStrictly:b,draggable:o,draggedNode:Fe,setDraggedNode:on,dragOverKey:Tt,dragOverPosition:oe,setDragOver:De,handleDrop:de,allowDrop:a,onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,showLine:w,showIcon:C,showHandle:R,dragIcon:T,icon:M,leafIcon:k,folderIcon:P,folderOpenIcon:E,blockNode:V,disabled:O,size:n,data:r,getAllKeys:je},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&De(null,null);};return jsx(Dg.Provider,{value:We,children:jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Lg({variant:t,size:n,className:e})),onDragLeave:Gn,...A,children:r.map((ve,Ye)=>jsx(Hg,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Vg.displayName="Tree";var zg=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),JC=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsx(Fragment,{children:r.map((o,a)=>n.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},eT=(e,t)=>{let[n,r]=X.useState(e);return X.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Og=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:x,...y},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(r),[k,P]=X.useState([]),[E,N]=X.useState(false),[S,H]=X.useState(false),[D,L]=X.useState(0),I=X.useRef(null),V=X.useRef(null),O=n!==void 0?n:T,A=eT(O,l);X.useEffect(()=>{let U=V.current;if(!U)return;let Ce=()=>{L(U.offsetWidth);};Ce();let Q=new ResizeObserver(Ce);return Q.observe(U),()=>{Q.disconnect();}},[]),X.useImperativeHandle(w,()=>I.current);let K=i?k:s,$=X.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(O.toLowerCase())),[K,O,i]);X.useEffect(()=>{if(!i)return;if(A.length<c){P([]);return}let U=false;return (async()=>{N(true);try{let Q=await i(A);U||P(Q);}catch{U||P([]);}finally{U||N(false);}})(),()=>{U=true;}},[A,i,c]);let G=U=>{n===void 0&&M(U),o?.(U);},Y=U=>{let Ce=U.target.value;G(Ce),Ce.length>=c&&R(true);},F=U=>{G(U.label),a?.(U),R(false);},z=()=>{G(""),I.current?.focus();},j=()=>{H(true),R(true);},W=()=>{H(false);},B=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&$.length>0&&R(true);},Z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&O?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:R,children:[jsxs(an,{ref:V,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:I,type:"text",value:O,onChange:Y,onFocus:j,onBlur:W,onKeyDown:B,disabled:x,placeholder:d,className:u(zg({size:t,fullWidth:v}),ue,e),style:{borderColor:S?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...y}),p&&O&&!x&&jsx("button",{type:"button",onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X$1,{className:Z})})]}),jsx(at,{className:"p-0",align:"start",style:{width:D>0?D:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(ke,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:E?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Z,"animate-spin")}),f]}):$.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):$.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>F(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:u("mr-2 h-4 w-4 shrink-0",O===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(JC,{text:U.label,query:O}):U.label})]},U.value))})})})})]})});Og.displayName="Autocomplete";var cl=X.createContext(null),dl=X.createContext(null),ul=()=>{let e=X.useContext(cl);if(!e)throw new Error("useFormContext must be used within a Form");return e},bs=()=>{let e=X.useContext(dl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},tT={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},Bg=X.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=X.useState(e),[m,f]=X.useState({}),[p,g]=X.useState({}),[h,b]=X.useState({}),[v,x]=X.useState(false),y=X.useRef(new Map),w=X.useCallback((D,L)=>{y.current.set(D,L);},[]),C=X.useCallback(D=>{y.current.delete(D);},[]),R=X.useCallback(D=>{let L=y.current.get(D)||[],I=c[D];for(let V of L)if(!V.validate(I))return f(O=>({...O,[D]:V.message})),false;return f(V=>({...V,[D]:null})),true},[c]),T=X.useCallback(()=>{let D=true,L={};return y.current.forEach((I,V)=>{let O=c[V];for(let A of I)if(!A.validate(O)){L[V]=A.message,D=false;break}L[V]||(L[V]=null);}),f(L),D},[c]),M=X.useCallback((D,L)=>{d(I=>({...I,[D]:L})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{R(D);},0);},[o,R]),k=X.useCallback((D,L)=>{f(I=>({...I,[D]:L}));},[]),P=X.useCallback((D,L)=>{g(I=>({...I,[D]:L})),L&&r&&R(D);},[r,R]),E=X.useCallback(D=>({value:c[D],error:m[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,m,p,h]),N=X.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),S=async D=>{D.preventDefault();let L={};if(y.current.forEach((V,O)=>{L[O]=true;}),g(L),!T()){n?.(m);return}if(t){x(true);try{await t(c);}finally{x(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:M,setError:k,setTouched:P,validateField:R,validateAll:T,registerField:w,unregisterField:C,getFieldState:E,reset:N};return jsx(cl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:S,className:u("space-y-4",s),...i,children:a})})});Bg.displayName="Form";var Fg=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=ul(),a=X.useId();X.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(dl.Provider,{value:i,children:r})};Fg.displayName="FormField";var Kg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));Kg.displayName="FormItem";var $g=X.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=bs();return jsxs(wr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});$g.displayName="FormLabel";var Gg=({children:e})=>{let{name:t,id:n,error:r,touched:o}=bs(),a=ul(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return X.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};Gg.displayName="FormControl";var Ug=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));Ug.displayName="FormDescription";var jg=X.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=bs(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});jg.displayName="FormMessage";var _g=cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),Yg=X.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u(_g({size:t,className:e})),...i,children:[jsxs(Cr,{"data-user-avatar":true,children:[o&&jsx(Qr,{src:o,alt:n}),jsx(Tr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});Yg.displayName="User";var qg=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),Zg=X.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:u(qg({variant:t,size:n,radius:r,className:e})),...o}));Zg.displayName="Code";function tb(e){let[t,n]=useState(false);return useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var nb=X.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=tb(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,x)=>jsxs("div",{...h({line:v}),children:[n&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:x+1}),v.map((y,w)=>jsx("span",{...b({token:y})},w))]},x))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});nb.displayName="CodeBlock";var rb=X.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=tb(n)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((x,y)=>jsx("span",{...h({token:x})},y))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});rb.displayName="TabbedCodeBlock";var ob=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),ab=X.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=X.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(ob({variant:t,size:n,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:r}),o&&jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});ab.displayName="Snippet";var gl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"md"}}),sb=X.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=X.useState("loading");X.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(gl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(gl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Ha,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});sb.displayName="Image";var cb=cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),db=cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),ub=X.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),mb=X.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=X.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(ub.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(cb({size:t,className:e})),...i,children:s})})});mb.displayName="Listbox";var pb=X.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=X.useContext(ub),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(db({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});pb.displayName="ListboxItem";var gb=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),bb=cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function gT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=X.useState(null),[f,p]=X.useState(null),g=(y,w)=>{i||(m(w),y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",String(w)));},h=(y,w)=>{y.preventDefault(),!(i||d===null||d===w)&&p(w);},b=()=>{p(null);},v=(y,w)=>{if(y.preventDefault(),i||d===null||d===w){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(w,0,R),o?.(C),m(null),p(null);},x=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(gb({variant:t,size:n,className:e})),...l,children:r.map((y,w)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,w),onDragOver:C=>h(C,w),onDragLeave:b,onDrop:C=>v(C,w),onDragEnd:x,className:u(bb({variant:t,size:n,isDragging:d===w,isDragOver:f===w}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(y,w)})]},y.id))})}var bT=X.forwardRef(gT);var xb=cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),yT={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},yb=X.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(xb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(yT[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));yb.displayName="LoadingOverlay";var Rb=cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),wb=X.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=X.useState(0),[c,d]=X.useState(false),m=X.useRef(null);return X.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(Rb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});wb.displayName="NProgress";var Nb=cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),Cb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},NT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},kb=X.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(NT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(Cb[n||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:u(Cb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(Nb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});kb.displayName="Loading";var PT=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ET=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),LT=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),ST=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Ms={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},hl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},vl=(e,t)=>String(e).padStart(t,"0"),Pb=(e,t)=>{if(!e)return "";let n=vl(e.getDate(),2),r=vl(e.getMonth()+1,2),o=vl(e.getFullYear(),4),a=Ms[t],s=hl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},ws=(e,t)=>{let n=Ms[t],r=e.split(n);if(r.length!==3)return null;let o=hl[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},DT=e=>{let t=Ms[e];return hl[e].map(r=>r==="year"?"####":"##").join(t)},ta=(e,t)=>{if(!e?.from)return "";let n=Pb(e.from,t),r=e.to?Pb(e.to,t):"";return n&&r?`${n} - ${r}`:n},Eb=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:x="text",fullWidth:y=false,numberOfMonths:w=2,align:C="start",disabled:R,placeholder:T,id:M,...k},P)=>{let E=X.useId(),N=M||E,S=`${N}-description`,H=`${N}-error`,[D,L]=X.useState(f),[I,V]=X.useState(""),[O,A]=X.useState(false),[K,$]=X.useState(false),G=m!==void 0?m:D,Y=a&&r,F=DT(b),z=Ms[b],j=" - ";X.useEffect(()=>{K||V(ta(G,b));},[G,b,K]);let W=le=>{m===void 0&&L(le),p?.(le);},B=le=>{W(le),V(ta(le,b)),le?.from&&le?.to&&A(false);},Z=le=>{let Be=le.target.value;Be=Be.replace(new RegExp(`[^0-9\\${z}\\s-]`,"g"),"");let pe=`${F}${j}${F}`,Ct=Be.replace(new RegExp(`[\\${z}\\s-]`,"g"),""),bt="",yn=0;for(let Fe=0;Fe<pe.length&&yn<Ct.length;Fe++)pe[Fe]==="#"?(bt+=Ct[yn],yn++):bt+=pe[Fe];if(V(bt),bt.length===pe.length){let Fe=bt.split(j);if(Fe.length===2){let on=ws(Fe[0].trim(),b),Tt=ws(Fe[1].trim(),b);if(on&&Tt){if(g&&(on<g||Tt<g)||h&&(on>h||Tt>h))return;on<=Tt&&W({from:on,to:Tt});}}}},ue=()=>{$(true);},U=()=>{$(false);let le=`${F}${j}${F}`;if(I.length!==le.length)V(ta(G,b));else {let Be=I.split(j);if(Be.length!==2)V(ta(G,b));else {let pe=ws(Be[0].trim(),b),Ct=ws(Be[1].trim(),b);(!pe||!Ct||pe>Ct)&&V(ta(G,b));}}},Ce=()=>{R||A(true);},Q=()=>{!R&&x==="picker"&&v&&A(true);};return jsxs("div",{className:u(PT({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(ST({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&O,onOpenChange:A,children:[jsxs(an,{className:u("relative",y?"w-full":"w-fit"),children:[jsx("input",{ref:P,id:N,type:"text",inputMode:x==="text"?"numeric":void 0,value:I,onChange:x==="text"?Z:void 0,onClick:Q,onFocus:ue,onBlur:U,readOnly:x==="picker","aria-invalid":a,"aria-describedby":Y?H:n?S:void 0,"aria-required":o,disabled:R,placeholder:T||`${b.toLowerCase()} - ${b.toLowerCase()}`,className:u(ET({size:s,isInvalid:a,fullWidth:y,showPickerIcon:v}),x==="picker"&&v&&"cursor-pointer",l),style:{borderColor:K||v&&O?"var(--color-foreground)":void 0},...k}),v&&jsx("button",{type:"button",onClick:Ce,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(LT({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(eo,{mode:"range",selected:G,onSelect:B,numberOfMonths:w,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:G?.from,showMonthAndYearPickers:true})})]}),n&&!Y&&jsx("p",{id:S,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),Y&&jsx("p",{id:H,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Eb.displayName="DateRangePicker";var co=e=>String(e).padStart(2,"0"),Lb=X.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=X.useState(false),d=r?Array.from({length:24},(y,w)=>w):Array.from({length:12},(y,w)=>w+1),m=Array.from({length:Math.floor(60/o)},(y,w)=>w*o),f=y=>{if(!y)return n;if(r)return `${co(y.hours)}:${co(y.minutes)}`;let w=y.hours%12||12,C=y.hours>=12?"PM":"AM";return `${co(w)}:${co(y.minutes)} ${C}`},p=y=>{let w=e?.minutes??0,C=y;if(!r&&e){let R=e.hours>=12;R&&y!==12?C=y+12:!R&&y===12&&(C=0);}t?.({hours:C,minutes:w});},g=y=>{let w=e?.hours??0;t?.({hours:w,minutes:y});},h=y=>{if(!e)return;let w=e.hours;y==="AM"&&e.hours>=12?w=e.hours-12:y==="PM"&&e.hours<12&&(w=e.hours+12),t?.({hours:w,minutes:e.minutes});},b=()=>{let y=new Date;t?.({hours:y.getHours(),minutes:y.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,x=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ot,{open:l,onOpenChange:c,children:[jsxs(qn,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(at,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(y=>jsx(ae,{variant:x===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(y),children:co(y)},y))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(y=>jsx(ae,{variant:e?.minutes===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(y),children:co(y)},y))})})]}),!r&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Lb.displayName="TimePicker";var Sb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function VT({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=X.useRef(null),[p,g]=X.useState(0);X.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),x=Math.ceil(o/b)+2*a,y=Math.min(n.length-1,v+x),w=R=>{let T=R.currentTarget.scrollTop;g(T),c?.(T);},C=X.useMemo(()=>{let R=[];for(let T=v;T<=y;T++)n[T]!==void 0&&R.push({item:n[T],index:T,style:{position:"absolute",top:T*b,left:0,right:0,height:r}});return R},[n,v,y,b,r]);return jsx("div",{ref:f,className:u(Sb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:w,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:T,style:M})=>jsx("div",{style:M,children:s(R,T)},i?i(R,T):T))})})}var AT=X.forwardRef(VT);var yl=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Rl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Hb=X.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,scrollbarVisibility:f="visible",...p},g)=>{let h=X.useRef(null),b=X.useRef(null),v=X.useRef(false);X.useImperativeHandle(g,()=>h.current),X.useEffect(()=>{let w=b.current;if(!w)return;let C=new IntersectionObserver(R=>{let[T]=R;T.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:h.current,rootMargin:c||`${l}px`,threshold:0});return C.observe(w),()=>{C.disconnect();}},[a,s,o,l,c,d]);let x=jsx("div",{className:u(Rl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),y=jsxs(Fragment,{children:[r,jsx("div",{ref:b,className:"h-px w-full"}),s&&(i||x),!a&&!s&&m&&jsx("div",{className:u(Rl({size:n}),"text-muted-foreground text-sm"),children:m})]});return d?jsx("div",{ref:h,className:u(yl({variant:t,className:e})),...p,children:y}):jsx(ke,{ref:h,visibility:f,className:u(yl({variant:t,className:e})),...p,children:y})});Hb.displayName="InfiniteScroll";var XT=e=>e.map(t=>typeof t=="string"?{src:t}:t),wl=X.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=X.useMemo(()=>XT(e),[e]),[v,x]=X.useState(r),[y,w]=X.useState(1),[C,R]=X.useState(0),[T,M]=X.useState(false),[k,P]=X.useState(false),[E,N]=X.useState({x:0,y:0}),[S,H]=X.useState({x:0,y:0}),[D,L]=X.useState(false),I=X.useRef(null),V=b[v];X.useEffect(()=>{L(true);},[]),X.useEffect(()=>{x(r);},[r]),X.useEffect(()=>{o?.(v);},[v,o]),X.useEffect(()=>{w(1),R(0),N({x:0,y:0});},[v]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let O=X.useCallback(()=>{x(Q=>Q>0?Q-1:b.length-1);},[b.length]),A=X.useCallback(()=>{x(Q=>Q<b.length-1?Q+1:0);},[b.length]),K=()=>{w(Q=>Math.min(Q+.5,4));},$=()=>{w(Q=>{let le=Math.max(Q-.5,.5);return le===1&&N({x:0,y:0}),le});},G=()=>{R(Q=>(Q+90)%360);},Y=async()=>{if(V)try{let le=await(await fetch(V.src)).blob(),Be=URL.createObjectURL(le),pe=document.createElement("a");pe.href=Be,pe.download=V.alt||`image-${v+1}`,document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),URL.revokeObjectURL(Be);}catch{window.open(V.src,"_blank");}},F=async()=>{if(I.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await I.current.requestFullscreen(),M(!0);}catch{}},z=Q=>{y>1&&(P(true),H({x:Q.clientX-E.x,y:Q.clientY-E.y}));},j=Q=>{k&&y>1&&N({x:Q.clientX-S.x,y:Q.clientY-S.y});},W=()=>{P(false);},B=()=>{n?.(false);},Z=Q=>{p&&Q.target===Q.currentTarget&&B();},ue=X.useCallback(Q=>{switch(Q.key){case "ArrowLeft":O();break;case "ArrowRight":A();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":$();break}},[O,A,n]);if(X.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),X.useEffect(()=>{let Q=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Q),()=>document.removeEventListener("fullscreenchange",Q)},[]),b.length===0)return null;let U=a?X.isValidElement(a)?X.cloneElement(a,{onClick:Q=>{a.props.onClick?.(Q),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!D||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Z}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+1," / ",b.length]}),V?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:V.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(y*100),"%"]}),jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:T?"Exit fullscreen":"Fullscreen",children:T?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X$1,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:z,onMouseMove:j,onMouseUp:W,onMouseLeave:W,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:O,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:A,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:V?.src,alt:V?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":y>1?"cursor-grab":""),style:{transform:`translate(${E.x}px, ${E.y}px) scale(${y}) rotate(${C}deg)`},draggable:false})]}),V?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:V.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((Q,le)=>jsx("button",{onClick:()=>x(le),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===le?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Q.src,alt:Q.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});wl.displayName="ImageViewer";var Vb=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=X.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsx(wl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Vb.displayName="ImageViewerTrigger";var Ab=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),ZT={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},QT={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},JT=e=>{let t=e.toLowerCase();return ZT[t]||e.toUpperCase()},ra=e=>{let t=e.toLowerCase();return QT[t]||t},ks=e=>{let t=ra(e);return ["meta","control","alt","shift"].includes(t)},zb=X.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{X.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(ks).map(ra),p=m.filter(h=>!ks(h)).map(ra),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,x=f.includes("alt")===h.altKey,y=f.includes("shift")===h.shiftKey,w=p.length===0||p.includes(h.key.toLowerCase());b&&v&&x&&y&&w&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxs(X.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:JT(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(Ab({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});zb.displayName="Kbd";function eM(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;X.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(ks).map(ra),i=a.filter(c=>!ks(c)).map(ra),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Ob=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Bb=X.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=X.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(n),m(!0),o?.(),setTimeout(()=>{m(!1);},r);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(Ob({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});Bb.displayName="CopyButton";var Kb=cva("flex flex-col bg-background",{variants:{variant:{default:"border",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"md"}}),lM=[{value:"month",label:"Month"},{value:"week",label:"Week"},{value:"day",label:"Day"}],cM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function uM(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function mM(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function po(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function mo(e){return po(e,new Date)}function Fb(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return po(r,t)||po(o,t)||r<t&&o>t})}var $b=X.forwardRef(({className:e,variant:t,size:n,radius:r,events:o=[],view:a="month",onViewChange:s,viewOptions:i=lM,date:l,onDateChange:c,onEventClick:d,onSlotClick:m,weekStartsOn:f=0,locale:p="en-US",...g},h)=>{let[b,v]=X.useState(new Date),x=l??b,y=N=>{c?c(N):v(N);},w=f===1?dM:cM,C=()=>{let N=new Date(x);a==="month"?N.setMonth(N.getMonth()-1):a==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),y(N);},R=()=>{let N=new Date(x);a==="month"?N.setMonth(N.getMonth()+1):a==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),y(N);},T=()=>{y(new Date);},M=()=>a==="day"?x.toLocaleDateString(p,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):x.toLocaleDateString(p,{year:"numeric",month:"long"}),k=()=>{let N=uM(x.getFullYear(),x.getMonth(),f);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(S=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:S},S))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((S,H)=>{let D=Fb(o,S),L=S.getMonth()===x.getMonth(),I=po(S,x);return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!L&&"bg-muted/30",I&&"bg-accent"),onClick:()=>m?.(S),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",mo(S)&&"bg-primary text-primary-foreground",!L&&"text-muted-foreground"),children:S.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(V=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:O=>{O.stopPropagation(),d?.(V);},children:V.title},V.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},H)})})]})},P=()=>{let N=mM(x,f),S=Array.from({length:24},(H,D)=>D);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),N.map((H,D)=>{let L=po(H,x);return jsxs("div",{className:u("p-2 text-center border-l cursor-pointer hover:bg-accent/50",mo(H)&&"bg-primary/10",L&&!mo(H)&&"bg-accent"),onClick:()=>m?.(H),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",mo(H)&&"text-primary",L&&!mo(H)&&"text-primary"),children:H.getDate()})]},D)})]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:S.map(H=>jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),N.map((D,L)=>{let I=new Date(D);I.setHours(H,0,0,0);let V=o.filter(O=>{let A=new Date(O.start);return po(A,D)&&A.getHours()===H});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(I),children:V.map(O=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:O.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(O);},children:O.title},O.id))},L)})]},H))})})]})},E=()=>{let N=Array.from({length:24},(H,D)=>D),S=Fb(o,x);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",mo(x)&&"bg-primary text-primary-foreground"),children:x.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(H=>{let D=new Date(x);D.setHours(H,0,0,0);let L=S.filter(I=>new Date(I.start).getHours()===H);return jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(D),children:L.map(I=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(I);},children:I.title},I.id))})]},H)})})})]})};return jsxs("div",{ref:h,className:u(Kb({variant:t,size:n,radius:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsx("h2",{className:"text-lg font-semibold",children:M()}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",radius:"md",onClick:T,children:"Today"}),jsx(Aa,{options:i,value:a,onValueChange:N=>s?.(N),size:"sm",radius:"md",className:"w-[120px]"}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:C,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),a==="month"&&k(),a==="week"&&P(),a==="day"&&E()]})});$b.displayName="FullCalendar";var Ds=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),aa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),sa=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],Gb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=sa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(aa({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Gb.displayName="LineChart";var Ub=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=sa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(aa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:n,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Ub.displayName="BarChart";var jb=X.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=sa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(aa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Ds,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));jb.displayName="PieChart";var Wb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=sa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(aa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));Wb.displayName="AreaChart";var Xb=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border bg-background",ghost:""}},defaultVariants:{variant:"default"}}),qb=cva("flex flex-col min-w-[280px] w-[280px]",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),El=cva("p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border border-zinc-300 dark:border-zinc-700 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}}),Ll={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"};function VM({card:e,columnId:t,variant:n,radius:r,renderCard:o,onCardClick:a}){let{attributes:s,listeners:i,setNodeRef:l,transform:c,transition:d,isDragging:m}=useSortable({id:e.id,data:{columnId:t}}),f={transform:CSS.Transform.toString(c),transition:d};return jsx("div",{ref:l,style:f,className:u(El({variant:n,isDragging:m}),Ll[r]),onClick:()=>a?.(e,t),...s,...i,children:o?o(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function AM({column:e,variant:t,radius:n,renderCard:r,onCardClick:o,onAddCard:a,showAddCard:s,columnHeight:i}){return jsxs("div",{className:u(qb({variant:t}),Ll[n]),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),s&&jsx(ae,{variant:"light",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:()=>a?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(ke,{style:{height:i},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(l=>l.id),strategy:verticalListSortingStrategy,children:e.cards.map(l=>jsx(VM,{card:l,columnId:e.id,variant:t,radius:n,renderCard:r,onCardClick:o},l.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Zb=X.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,radius:c="md",...d},m)=>{let[f,p]=X.useState(null),[g,h]=X.useState(null),b=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),v=C=>n.find(R=>R.cards.some(T=>T.id===C));return jsxs(DndContext,{sensors:b,collisionDetection:closestCorners,onDragStart:C=>{let{active:R}=C,T=v(R.id);if(T){let M=T.cards.find(k=>k.id===R.id);M&&(p(M),h(T.id));}},onDragOver:C=>{let{active:R,over:T}=C;if(!T)return;let M=R.id,k=T.id,P=v(M),E=v(k)||n.find(H=>H.id===k);if(!P||!E||P.id===E.id)return;let N=E.cards.findIndex(H=>H.id===k),S=N===-1?E.cards.length:N;r?.(M,P.id,E.id,S);},onDragEnd:C=>{let{active:R,over:T}=C;if(T&&R.id!==T.id){let M=v(R.id),k=v(T.id)||n.find(P=>P.id===T.id);if(M&&k){let P=k.cards.findIndex(N=>N.id===T.id),E=P===-1?k.cards.length:P;r?.(R.id,M.id,k.id,E);}}p(null),h(null);},children:[jsx("div",{ref:m,className:u(Xb({variant:t,className:e})),...d,children:n.map(C=>jsx(AM,{column:C,variant:t,radius:c,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},C.id))}),jsx(DragOverlay,{children:f&&g&&jsx("div",{className:u(El({variant:t,isDragging:true}),Ll[c]),children:s?s(f,g):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:f.title}),f.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:f.description})]})]})})})]})});Zb.displayName="KanbanBoard";var Qb=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Jb=X.createContext(null);function Is(){let e=X.useContext(Jb);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var ev=X.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=zM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=X.useState(false),[h,b]=X.useState(false),[v,x]=X.useState(0),[y,w]=X.useState([]),C=X.useCallback(P=>{P&&(x(P.selectedScrollSnap()),g(P.canScrollPrev()),b(P.canScrollNext()));},[]),R=X.useCallback(()=>{f?.scrollPrev();},[f]),T=X.useCallback(()=>{f?.scrollNext();},[f]),M=X.useCallback(P=>{f?.scrollTo(P);},[f]),k=X.useCallback(P=>{P.key==="ArrowLeft"?(P.preventDefault(),R()):P.key==="ArrowRight"&&(P.preventDefault(),T());},[R,T]);return X.useEffect(()=>{!f||!l||l(f);},[f,l]),X.useEffect(()=>{if(f)return w(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(Jb.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:T,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:y,scrollTo:M,orientation:a},children:jsxs("div",{ref:d,className:u(Qb({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(Sl,{}),jsx(Dl,{})]}),i&&y.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:y.map((P,E)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",E===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(E),"aria-label":`Go to slide ${E+1}`},E))})]})})});ev.displayName="Carousel";var tv=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex",e),...t}));tv.displayName="CarouselContent";var nv=X.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=Is();return jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});nv.displayName="CarouselItem";var Sl=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollPrev:s,canScrollPrev:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Sl.displayName="CarouselPrevious";var Dl=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollNext:s,canScrollNext:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Dl.displayName="CarouselNext";var rv=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Vs={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},Il={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},ov=X.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=X.useState(r.length>0?"recent":o),[m,f]=X.useState(""),g=m?Object.values(Il).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Il[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:u(rv({size:t,className:e})),...i,children:[a&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Pa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx(ke,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(Vs).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:u("shrink-0 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:Vs[b].name,children:v},b))})}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Vs[c].name}),jsx(ke,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});ov.displayName="EmojiPicker";var av=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),gN=cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),bN=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Xe=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(_n,{children:[jsx(Yn,{children:jsx(ae,{type:"button",variant:n?"solid":"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Xn,{side:"top",className:"text-xs",children:t})]}),sv=X.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[WM.configure({heading:{levels:[1,2,3]}}),_M.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),YM,XM.configure({types:["heading","paragraph"]}),qM.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});X.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),X.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx(Wn,{children:jsxs("div",{ref:f,className:u(av({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(gN({size:n})),children:[jsx(Xe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Xe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Xe,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Xe,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Xe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Xe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Xe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Xe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Xe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Xe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Xe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Xe,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:u(bN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});sv.displayName="RichTextEditor";var lv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function TN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function iv(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var cv=X.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=X.useRef(null),[h,b]=X.useState(),[v,x]=X.useState(),[y,w]=X.useState(1),[C,R]=X.useState(0),T=E=>{let{width:N,height:S}=E.currentTarget;if(r){let H=TN(N,S,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},M=E=>{b(E),o?.(E);},k=async E=>{if(x(E),a&&g.current&&E.width&&E.height){let N=await iv(g.current,E,C,y);a(N);}},P=()=>{R(E=>(E+90)%360);};return X.useEffect(()=>{v&&g.current&&a&&iv(g.current,v,C,y).then(E=>{a(E);});},[y,C,v,a]),jsxs("div",{ref:p,className:u(lv({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(vN,{crop:h,onChange:M,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",crossOrigin:"anonymous",onLoad:T,style:{transform:`scale(${y}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx(Ua,{value:[y],onValueChange:([E])=>w(E),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"sm",isIconOnly:true,onClick:P,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});cv.displayName="ImageCropper";var Ol=cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),kN={sm:96,md:128,lg:192},uv=X.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??kN[n??"md"];return r?jsx("div",{ref:h,className:u(Ol({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(MN,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(Ol({variant:t,size:n,className:e})),...g,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});uv.displayName="QRCode";var mv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});mv.displayName="ThemeProvider";var IN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),pv=X.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=X.useState(false);X.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(Cn,{children:[jsx(Tn,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(Mn,{align:"end",children:[jsxs($t,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs($t,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs($t,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});pv.displayName="ThemeToggle";var fv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),gv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-11 px-4 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),bv=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),vv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=X.useId(),v=p||b,x=`${v}-description`,y=`${v}-error`,w=a&&r;return jsxs("div",{className:u(fv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(bv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":w?y:n?x:void 0,"aria-required":o,className:u(gv({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!w&&jsx("p",{id:x,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),w&&jsx("p",{id:y,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});vv.displayName="TextField";var yv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),zN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),hv=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),xv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),ON=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Rv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:x,fullWidth:y=false,disabled:w,id:C,...R},T)=>{let M=X.useId(),k=C||M,P=`${k}-description`,E=`${k}-error`,[N,S]=X.useState(h),[H,D]=X.useState(false),L=g!==void 0?g:N,I=a&&r,V=X.useCallback(z=>{z!==void 0&&(m!==void 0&&z<m&&(z=m),f!==void 0&&z>f&&(z=f)),g===void 0&&S(z),b?.(z);},[g,m,f,b]),O=()=>{let z=(L??0)+p;V(z);},A=()=>{let z=(L??0)-p;V(z);},K=z=>{let j=z.target.value;if(j==="")V(void 0);else {let W=parseFloat(j);isNaN(W)||V(W);}},$=z=>{z.key==="ArrowUp"?(z.preventDefault(),O()):z.key==="ArrowDown"&&(z.preventDefault(),A());},G=X.useMemo(()=>L===void 0?"":x?new Intl.NumberFormat(void 0,x).format(L):L.toString(),[L,x]),Y=m!==void 0&&L!==void 0&&L<=m,F=f!==void 0&&L!==void 0&&L>=f;return jsxs("div",{className:u(yv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:u(ON({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:A,disabled:w||Y,className:u(hv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(xv({size:s}))})}),jsx("input",{ref:T,id:k,type:"text",inputMode:"decimal",value:G,onChange:K,onKeyDown:$,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?E:n?P:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:w,className:u(zN({size:s,isInvalid:a,fullWidth:y}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsx("button",{type:"button",onClick:O,disabled:w||F,className:u(hv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(xv({size:s}))})})]}),n&&!I&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:E,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Rv.displayName="NumberField";var Cv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),KN=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-11 pl-12 pr-12 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),wv=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),$N=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),GN=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),Tv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:x,placeholder:y="Search...",id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,[E,N]=X.useState(f),S=m!==void 0?m:E,H=a&&r,D=S.length>0,L=O=>{let A=O.target.value;m===void 0&&N(A),p?.(A);},I=()=>{m===void 0&&N(""),p?.(""),g?.();},V=O=>{O.key==="Enter"?(O.preventDefault(),h?.(S)):O.key==="Escape"&&D&&(O.preventDefault(),I());};return jsxs("div",{className:u(Cv({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:u($N({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(wv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:R,id:M,type:"search",value:S,onChange:L,onKeyDown:V,placeholder:y,"aria-invalid":a,"aria-describedby":H?P:n?k:void 0,"aria-required":o,disabled:x,className:u(KN({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!x&&jsx("button",{type:"button",onClick:I,className:u(GN({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:u(wv({size:s}))})})]}),n&&!H&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Tv.displayName="SearchField";var Mv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),jN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),WN=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),_N=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Fs={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},Wl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},Ul=(e,t)=>String(e).padStart(t,"0"),ma=(e,t)=>{if(!e)return "";let n=Ul(e.getDate(),2),r=Ul(e.getMonth()+1,2),o=Ul(e.getFullYear(),4),a=Fs[t],s=Wl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},jl=(e,t)=>{let n=Fs[t],r=e.split(n);if(r.length!==3)return null;let o=Wl[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},YN=e=>{let t=Fs[e];return Wl[e].map(r=>r==="year"?"####":"##").join(t)},Ks=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:x="text",fullWidth:y=false,disabled:w,placeholder:C,id:R,...T},M)=>{let k=X.useId(),P=R||k,E=`${P}-description`,N=`${P}-error`,[S,H]=X.useState(f??null),[D,L]=X.useState(""),[I,V]=X.useState(false),[O,A]=X.useState(false),K=m!==void 0?m:S,$=a&&r,G=Fs[b],Y=YN(b);X.useEffect(()=>{O||L(ma(K,b));},[K,b,O]);let F=U=>{m===void 0&&H(U),p?.(U);},z=U=>{let Ce=U??null;F(Ce),L(ma(Ce,b)),V(false);},j=U=>{let Ce=U.target.value;Ce=Ce.replace(new RegExp(`[^0-9\\${G}]`,"g"),"");let Q=Ce.replace(new RegExp(`\\${G}`,"g"),""),le="",Be=0;for(let pe=0;pe<Y.length&&Be<Q.length;pe++)Y[pe]==="#"?(le+=Q[Be],Be++):le+=Y[pe];if(L(le),le.length===Y.length){let pe=jl(le,b);if(pe){if(g&&pe<g||h&&pe>h)return;F(pe);}}},W=()=>{A(true);},B=()=>{A(false),D.length!==Y.length?L(ma(K,b)):jl(D,b)||L(ma(K,b));},Z=()=>{w||V(true);},ue=()=>{!w&&x==="picker"&&v&&V(true);};return jsxs("div",{className:u(Mv({size:s}),e),children:[t&&jsxs("label",{htmlFor:P,className:u(_N({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&I,onOpenChange:V,children:[jsxs(an,{className:u("relative",y?"w-full":"w-fit"),children:[jsx("input",{ref:M,id:P,type:"text",inputMode:x==="text"?"numeric":void 0,value:D,onChange:x==="text"?j:void 0,onClick:ue,onFocus:W,onBlur:B,readOnly:x==="picker","aria-invalid":a,"aria-describedby":$?N:n?E:void 0,"aria-required":o,disabled:w,placeholder:C||b.toLowerCase(),className:u(jN({size:s,isInvalid:a,fullWidth:y,showPickerIcon:v}),x==="picker"&&v&&"cursor-pointer",l),style:{borderColor:O||v&&I?"var(--color-foreground)":void 0},...T}),v&&jsx("button",{type:"button",onClick:Z,disabled:w,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(WN({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(eo,{mode:"single",selected:K??void 0,onSelect:z,disabled:U=>!!(g&&U<g||h&&U>h),defaultMonth:K??void 0,showMonthAndYearPickers:true})})]}),n&&!$&&jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),$&&jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ks.displayName="DatePicker";var XN=Ks,qN=Ks;var Nv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZN=cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),QN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),kv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:x,fullWidth:y=false,id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,E=X.useRef(null),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),[D,L]=X.useState(f??null),I=m!==void 0?m:D,V=a&&r,O=_=>v===24?_:_===0?12:_>12?_-12:_,A=_=>_>=12?"PM":"AM",K=(_,oe)=>oe==="AM"?_===12?0:_:_===12?12:_+12,[$,G]=X.useState(I?String(O(I.hour)).padStart(2,"0"):""),[Y,F]=X.useState(I?String(I.minute).padStart(2,"0"):""),[z,j]=X.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[W,B]=X.useState(I?A(I.hour):"AM"),[Z,ue]=X.useState(false);X.useEffect(()=>{m!==void 0&&(m?(G(String(O(m.hour)).padStart(2,"0")),F(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),B(A(m.hour))):(G(""),F(""),j("")));},[m,v]);let U=(_,oe,q,De)=>{let de=parseInt(_,10),je=parseInt(oe,10),We=b?parseInt(q,10):void 0;if(isNaN(de)||isNaN(je)||b&&isNaN(We)){m===void 0&&L(null),p?.(null);return}let ve={hour:v===12?K(de,De):de,minute:je,...b&&We!==void 0&&{second:We}};m===void 0&&L(ve),p?.(ve);},Ce=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);G(oe);let q=v===24?23:12,De=v===24?0:1;if(oe.length===2){let de=parseInt(oe,10);de>=De&&de<=q&&(N.current?.focus(),N.current?.select());}},Q=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);if(F(oe),oe.length===2){let q=parseInt(oe,10);q>=0&&q<=59&&(b?(S.current?.focus(),S.current?.select()):v===12&&H.current?.focus());}},le=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);j(oe),oe.length===2&&v===12&&H.current?.focus();},Be=()=>{if($){let _=parseInt($,10),oe=v===24?23:12,De=Math.min(Math.max(_,v===24?0:1),oe),de=String(De).padStart(2,"0");G(de),U(de,Y,z,W);}},pe=()=>{if(Y){let _=parseInt(Y,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");F(q),U($,q,z,W);}},Ct=()=>{if(z){let _=parseInt(z,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");j(q),U($,Y,q,W);}},bt=()=>{let _=W==="AM"?"PM":"AM";B(_),U($,Y,z,_);},yn=_=>{let oe=_.key.toLowerCase();oe==="a"?(_.preventDefault(),W!=="AM"&&(B("AM"),U($,Y,z,"AM"))):oe==="p"?(_.preventDefault(),W!=="PM"&&(B("PM"),U($,Y,z,"PM"))):oe==="arrowup"||oe==="arrowdown"?(_.preventDefault(),bt()):oe==="arrowleft"&&(_.preventDefault(),b?(S.current?.focus(),S.current?.select()):(N.current?.focus(),N.current?.select()));},Fe=(_,oe)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let q=_.key==="ArrowUp"?1:-1;if(oe==="hour"){let De=parseInt($,10)||0,de=v===24?23:12,je=v===24?0:1,We=De+q;We>de&&(We=je),We<je&&(We=de);let Gn=String(We).padStart(2,"0");G(Gn),U(Gn,Y,z,W);}else if(oe==="minute"){let de=(parseInt(Y,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");F(je),U($,je,z,W);}else if(oe==="second"){let de=(parseInt(z,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");j(je),U($,Y,je,W);}}_.key==="ArrowRight"&&(_.preventDefault(),oe==="hour"?(N.current?.focus(),N.current?.select()):oe==="minute"&&b?(S.current?.focus(),S.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),oe==="minute"?(E.current?.focus(),E.current?.select()):oe==="second"&&(N.current?.focus(),N.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(oe==="minute"?E.current?.focus():oe==="second"&&N.current?.focus());},Tt=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",x&&"cursor-not-allowed");return jsxs("div",{ref:R,className:u(Nv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:M,className:u(QN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(ZN({size:s,isInvalid:a,disabled:x,fullWidth:y}),l),style:{borderColor:Z?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||ue(false);},children:[jsx("input",{ref:E,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:$,onChange:Ce,onBlur:Be,onKeyDown:_=>Fe(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":V?P:n?k:void 0,"aria-required":o,disabled:x,className:Tt}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:N,type:"text",inputMode:"numeric",placeholder:"mm",value:Y,onChange:Q,onBlur:pe,onKeyDown:_=>Fe(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:x,className:Tt}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"ss",value:z,onChange:le,onBlur:Ct,onKeyDown:_=>Fe(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:x,className:Tt})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:bt,onKeyDown:yn,disabled:x,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",x&&"cursor-not-allowed"),"aria-label":"AM/PM",children:W})]}),n&&!V&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});kv.displayName="TimeField";var Ev=cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),Lv=X.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],x=(w,C)=>{C&&C(),l&&l(w);},y=w=>jsxs("button",{type:"button",disabled:i||w.isDisabled,onClick:()=>x(w.key,w.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:b),"aria-label":w.label,children:[w.icon&&jsx("span",{className:v,children:w.icon}),c&&jsx("span",{children:w.label})]},w.key);return jsxs("div",{ref:f,role:"group",className:u(Ev({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(w=>d?d(w):y(w)),g.length>0&&jsxs(Cn,{children:[jsx(Tn,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(Mn,{align:"end",children:g.map(w=>jsxs($t,{disabled:w.isDisabled,onClick:()=>x(w.key,w.onPress),children:[w.icon&&jsx("span",{className:u(v,"mr-2"),children:w.icon}),w.label]},w.key))})]})]})});Lv.displayName="ActionGroup";var Iv=cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),nk=cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Vv=X.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(Iv({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:u(nk({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));Vv.displayName="StatusLight";var Av=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),zv=X.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Av({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(Nt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});zv.displayName="ActionBar";var Ov=X.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));Ov.displayName="ActionBarButton";var Kv=cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),$v=cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Gv({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),[h,b]=X.useState(null),[v,x]=X.useState(null),y=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),w=M=>{if(a==="none")return;let k;a==="single"?k=y.has(M)?new Set:new Set([M]):(k=new Set(y),k.has(M)?k.delete(M):k.add(M)),o||g(k),s?.(k);},C=(M,k)=>{b(k),M.dataTransfer.effectAllowed="move";},R=(M,k)=>{M.preventDefault(),h!==k&&x(k);},T=()=>{if(h&&v&&h!==v){let M=r.findIndex(N=>N.key===h),k=r.findIndex(N=>N.key===v),P=[...r],[E]=P.splice(M,1);P.splice(k,0,E),l?.(P);}b(null),x(null);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Kv({variant:t,size:n,className:e})),...f,children:r.map(M=>{let k=y.has(M.key),P=h===M.key,E=v===M.key;return d?jsx("div",{role:"option","aria-selected":k,onClick:()=>w(M.key),children:d(M,k)},M.key):jsxs("div",{role:"option","aria-selected":k,"aria-disabled":M.isDisabled,draggable:i&&!M.isDisabled,onDragStart:N=>C(N,M.key),onDragOver:N=>R(N,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&w(M.key),className:u($v({variant:t,size:n,isSelected:k,isDisabled:M.isDisabled}),P&&"opacity-50",E&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsx(Check,{className:"h-3 w-3"})}),M.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:M.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:M.label}),M.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:M.description})]})]},M.key)})})}Gv.displayName="ListView";var Uv=cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),lk=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),ck=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),jv=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,x]=X.useState(o),y=r!==void 0,w=y?r:v,C=X.useRef(null),[R,T]=X.useState(false),[M,k]=X.useState(null),P=(A,K)=>{if(!C.current)return w[0];let $=C.current.getBoundingClientRect(),G;t==="horizontal"?G=(A-$.left)/$.width:G=1-(K-$.top)/$.height,G=Math.max(0,Math.min(1,G));let Y=i+G*(l-i),F=Math.round(Y/c)*c;return Math.max(i,Math.min(l,F))},E=(A,K)=>{let $=[...w];$[K]=A,K===0&&A>w[1]&&($[0]=w[1]),K===1&&A<w[0]&&($[1]=w[0]),y||x($),a?.($);},N=(A,K)=>{d||(A.preventDefault(),T(true),k(K),A.target.setPointerCapture(A.pointerId));},S=A=>{if(!R||M===null||d)return;let K=P(A.clientX,A.clientY);E(K,M);},H=()=>{R&&(T(false),k(null),s?.(w));},D=A=>{if(d)return;let K=P(A.clientX,A.clientY),$=Math.abs(w[0]-K),G=Math.abs(w[1]-K),Y=$<=G?0:1;E(K,Y);let F=[...w];F[Y]=K,s?.(F);},L=(A,K)=>{if(d)return;let $=w[K];switch(A.key){case "ArrowRight":case "ArrowUp":A.preventDefault(),$=Math.min(l,w[K]+c);break;case "ArrowLeft":case "ArrowDown":A.preventDefault(),$=Math.max(i,w[K]-c);break;case "Home":A.preventDefault(),$=i;break;case "End":A.preventDefault(),$=l;break;default:return}E($,K);let G=[...w];G[K]=$,s?.(G);},I=A=>(A-i)/(l-i)*100,V={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],O={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(w[0])}),jsx("span",{children:f(w[1])})]}),jsxs("div",{ref:b,className:u(Uv({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(lk({orientation:t,size:n})),onClick:D,children:jsx("div",{className:u("absolute rounded-full",V,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(w[0])}%`,right:`${100-I(w[1])}%`,top:0,bottom:0}:{bottom:`${I(w[0])}%`,top:`${100-I(w[1])}%`,left:0,right:0}})}),w.map((A,K)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":A,"aria-orientation":t||void 0,"aria-disabled":d,className:u(ck({size:n}),R&&M===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(A)}% - ${O/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(A)}% - ${O/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:$=>N($,K),onPointerMove:S,onPointerUp:H,onPointerCancel:H,onKeyDown:$=>L($,K)},K)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:w[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:w[1]})]})]})]})});jv.displayName="RangeSlider";var Ql=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),fk=cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),gk={help:HelpCircle,info:Info,warning:AlertCircle},Yv=X.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=X.useState(false),[b,v]=X.useState(false),[x,y]=X.useState({top:0,left:0}),w=X.useRef(null),C=X.useRef(null),R=i!==void 0?i:g,T=X.useCallback(E=>{i===void 0&&h(E),l?.(E);},[i,l]);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!R||!w.current)return;let E=()=>{let N=w.current.getBoundingClientRect(),S=C.current?.getBoundingClientRect(),H=S?.width||288,D=S?.height||100,L=8,I=0,V=0;switch(a){case "top":I=N.top-D-L,V=N.left+N.width/2-H/2;break;case "bottom":I=N.bottom+L,V=N.left+N.width/2-H/2;break;case "left":I=N.top+N.height/2-D/2,V=N.left-H-L;break;case "right":I=N.top+N.height/2-D/2,V=N.right+L;break}if(a==="top"||a==="bottom")switch(s){case "start":V=N.left;break;case "center":V=N.left+N.width/2-H/2;break;case "end":V=N.right-H;break}if(a==="left"||a==="right")switch(s){case "start":I=N.top;break;case "center":I=N.top+N.height/2-D/2;break;case "end":I=N.bottom-D;break}V=Math.max(8,Math.min(V,window.innerWidth-H-8)),I=Math.max(8,Math.min(I,window.innerHeight-D-8)),y({top:I,left:V});};return E(),requestAnimationFrame(E),window.addEventListener("resize",E),window.addEventListener("scroll",E,true),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true);}},[R,a,s]),X.useEffect(()=>{if(!R)return;let E=N=>{C.current&&!C.current.contains(N.target)&&w.current&&!w.current.contains(N.target)&&T(false);};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[R,T]),X.useEffect(()=>{if(!R)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[R,T]);let M=gk[e??"help"],k=()=>{T(!R);},P=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?X.isValidElement(o)?X.cloneElement(o,{ref:w,onClick:E=>{o.props.onClick?.(E),k();}}):jsx("button",{ref:w,type:"button",onClick:k,className:u(Ql({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},type:"button",onClick:k,className:u(Ql({variant:e,size:t}),m),"aria-label":"Help",children:jsx(M,{className:"h-full w-full"})}),b&&R&&Ba.createPortal(jsxs("div",{ref:C,className:u(fk({size:t}),f),style:{position:"fixed",top:x.top,left:x.left,transformOrigin:P()},role:"tooltip",children:[n&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Yv.displayName="ContextualHelp";var qv=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),Jl=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function Zv({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=X.useState(new Set),v=X.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),x=R=>{if(s==="none")return;let T;s==="single"?T=v.has(R)?new Set:new Set([R]):(T=new Set(v),T.has(R)?T.delete(R):T.add(R)),a||b(T),i?.(T);},y=(R,T)=>{T.stopPropagation(),c?.(R);},w=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxs("div",{role:"group","aria-label":d,className:u(qv({spacing:t}),e),...g,children:[w.map(R=>{let T=v.has(R.key),M=s!=="none";return jsxs("span",{role:M?"button":void 0,tabIndex:M&&!R.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!R.isDisabled&&x(R.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!R.isDisabled&&(k.preventDefault(),x(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(Jl({variant:R.color?void 0:n,size:r,isSelected:T,isDisabled:R.isDisabled}),M&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsx("button",{type:"button",onClick:k=>y(R.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxs("span",{className:u(Jl({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}Zv.displayName="TagGroup";var eh=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),th=cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function nh({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),h=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let x;a==="single"?x=h.has(v)?new Set:new Set([v]):(x=new Set(h),x.has(v)?x.delete(v):x.add(v)),o||g(x),s?.(x);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(eh({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let x=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":x,onClick:()=>b(v.key),children:d(v,x)},v.key):jsxs("div",{role:"gridcell","aria-selected":x,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(th({variant:l,size:c,isSelected:x,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&x&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}nh.displayName="GridList";var oh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),xk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),yk=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),Xs=X.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let x=(n-r)/(o-r),y=s!==void 0?(s-r)/(o-r):.25,w=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?x<=y?"bg-red-500":x<=w?"bg-yellow-500":"bg-green-500":x>=w?"bg-red-500":x>=y?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(oh({size:t})),children:jsx("div",{className:u(xk({variant:f})),children:jsx("div",{className:u(yk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Xs.displayName="Meter";var ah=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));ah.displayName="DiskUsageMeter";var sh=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));sh.displayName="BatteryMeter";var ih=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Zs=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},lh=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},ch=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},dh=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),uh=X.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=X.useCallback(A=>{let K=ch(A);return K?lh(...K):[0,1,1]},[]),[v,x]=X.useState(()=>b(r||o)),y=e??v[0],w=t??v[1],C=n??v[2];X.useEffect(()=>{if(r){let A=b(r);x(A);}},[r,b]);let R=X.useCallback((A,K)=>{if(l||!p.current)return;let $=p.current.getBoundingClientRect(),G=Math.max(0,Math.min(1,(A-$.left)/$.width)),Y=Math.max(0,Math.min(1,(K-$.top)/$.height)),F=G,z=1-Y;t===void 0&&n===void 0&&x([y,F,z]),a?.({hue:y,saturation:F,brightness:z});let j=Zs(y,F,z);s?.(dh(...j));},[l,y,t,n,a,s]),T=A=>{l||(A.preventDefault(),h(true),A.target.setPointerCapture(A.pointerId),R(A.clientX,A.clientY));},M=A=>{g&&R(A.clientX,A.clientY);},k=A=>{h(false),A.target.releasePointerCapture(A.pointerId);},[P,E,N]=Zs(y,1,1),S=`rgb(${P}, ${E}, ${N})`,H=w*100,D=(1-C)*100,[L,I,V]=Zs(y,w,C),O=`rgb(${L}, ${I}, ${V})`;return jsx("div",{ref:f,className:u(ih({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:S},onPointerDown:T,onPointerMove:M,onPointerUp:k,onPointerLeave:k,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${D}% - ${c/2}px)`,backgroundColor:O,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});uh.displayName="ColorArea";var ph=cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Tk=`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")`,mh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",fh=X.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,x]=X.useState(t??b()),y=e??v,w=r==="hue"?y/360:y,C=X.useCallback((S,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),L=a!=="vertical",I;L?I=Math.max(0,Math.min(1,(S-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let V=r==="hue"?I*360:I;e===void 0&&x(V),n?.(V);},[i,a,r,e,n]),R=S=>{i||(S.preventDefault(),h(true),S.target.setPointerCapture(S.pointerId),C(S.clientX,S.clientY));},T=S=>{g&&C(S.clientX,S.clientY);},M=S=>{h(false),S.target.releasePointerCapture(S.pointerId);},k=()=>{let S=a!=="vertical",H=S?"to right":"to top";switch(r){case "hue":return S?mh:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return mh}},P=()=>r==="hue"?`hsl(${y}, 100%, 50%)`:o,E=a!=="vertical",N=w*100;return jsx("div",{ref:f,className:u(ph({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?Tk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...E?{left:`calc(${N}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${N}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:P(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});fh.displayName="ColorSlider";var gh=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),kk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},bh=X.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=X.useRef(null),[f,p]=X.useState(false),[g,h]=X.useState(t),b=e??g,v=X.useCallback((R,T)=>{if(o||!m.current)return;let M=m.current.getBoundingClientRect(),k=M.width/2,P=R-M.left,E=T-M.top,N=kk(P,E,k);e===void 0&&h(N),n?.(N);},[o,e,n]),x=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},y=R=>{f&&v(R.clientX,R.clientY);},w=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let T=0;T<=360;T+=30)R.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsx("div",{ref:d,className:u(gh({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:x,onPointerMove:y,onPointerUp:w,onPointerLeave:w,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(Pk,{hue:b,innerRadius:a,thumbSize:s})]})})});bh.displayName="ColorWheel";var Pk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var hh=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),Lk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Sk=cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),xh=X.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxs("div",{ref:h,className:u(hh({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:u(Lk({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsx("span",{className:u(Sk({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});xh.displayName="LabeledValue";var yh=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),Rh=X.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:u(yh({orientation:t,gap:n,className:e})),...r}));Rh.displayName="LabeledValueGroup";var Mh=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),To=cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Nh=X.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:x,...y},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(t),k=e!==void 0?e:T,P=X.useRef(null);X.useImperativeHandle(w,()=>P.current);let E=k.length>0,N=C&&(a.length>0||s.length>0||l.length>0||E),S=A=>{e===void 0&&M(A),n?.(A);},H=()=>{S(""),P.current?.focus();},D=A=>{A?.preventDefault(),k.trim()&&(r?.(k.trim()),R(false));},L=A=>{S(A.label),o?.(A),R(false);},I=A=>{S(A),r?.(A),R(false);},V=A=>{S(A),r?.(A),R(false);},O=X.useMemo(()=>{let A={};return a.forEach(K=>{let $=K.category||"Results";A[$]||(A[$]=[]),A[$].push(K);}),A},[a]);return jsxs(ot,{open:N,onOpenChange:R,children:[jsx(an,{children:jsxs("form",{onSubmit:D,className:u(Mh({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(To({size:g}),"ml-3")}),jsx("input",{ref:P,type:"text",value:k,onChange:A=>S(A.target.value),onFocus:()=>R(true),placeholder:v,disabled:x,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...y}),d&&E&&!x&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",To({size:g})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:A=>A.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!E&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((A,K)=>jsxs("button",{type:"button",onClick:()=>I(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(To({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A}),jsx(ArrowRight,{className:u(To({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!E&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((A,K)=>jsxs("button",{type:"button",onClick:()=>V(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(To({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A})]},K))]}),E&&jsx("div",{className:"p-2",children:c?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(O).map(([A,K])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A})}),K.map($=>jsxs("button",{type:"button",onClick:()=>L($),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[$.icon||jsx(Search,{className:u(To({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:$.label}),$.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:$.description})]})]},$.id))]},A)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Nh.displayName="SearchBar";var kh={Pages:jsx(File,{className:"h-4 w-4"}),Files:jsx(Folder,{className:"h-4 w-4"}),Settings:jsx(Settings,{className:"h-4 w-4"}),Users:jsx(User,{className:"h-4 w-4"}),Tags:jsx(Hash,{className:"h-4 w-4"})},Lh=X.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=X.useState(""),g=X.useRef(null),[h,b]=X.useState(false);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{e||p("");},[e]),X.useEffect(()=>{if(!e)return;let R=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),X.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let v=X.useMemo(()=>{let R={};return n.forEach(T=>{let M=T.category||"Results";R[M]||(R[M]=[]),R[M].push(T);}),R},[n]),x=R=>{R.onSelect?.(),c?.(R),t?.(false);},y=()=>{t?.(false);},w=f.length>0,C=!w&&r.length>0;return !h||!e?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:y}),jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X$1,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[C&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(R=>jsxs(Command.Item,{value:R.label,onSelect:()=>x(R),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:R.icon||kh[R.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:R.label}),R.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((T,M)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},R.id))]}),w&&Object.entries(v).map(([R,T])=>jsxs(Command.Group,{heading:R,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),T.map(M=>jsxs(Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>x(M),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:M.icon||kh[R]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:M.label}),M.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:M.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},M.id))]},R)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});Lh.displayName="SpotlightSearch";function Uk(e="k"){let[t,n]=X.useState(false);return X.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var Hh=X.createContext(null),Js=()=>{let e=X.useContext(Hh);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},Qk=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=X.useState([]),[a,s]=X.useState(false),i=X.useRef(null),l=t!==void 0,c=l?t:r,d=X.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=X.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=X.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=X.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=X.useCallback(()=>{d([]);},[d]);return jsx(Hh.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Ih=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Ih.displayName="NotificationCenter";var Vh=X.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=Js(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Vh.displayName="NotificationCenterTrigger";var Ah=X.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=Js(),[p,g]=X.useState(false),h=X.useRef(null),[b,v]=X.useState({top:0,left:0});return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!i||!f.current||!h.current)return;let x=()=>{if(!f.current||!h.current)return;let y=f.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=y.bottom+n,R=y.left;t==="center"?R=y.left+y.width/2-w.width/2:t==="end"&&(R=y.right-w.width),R+w.width>window.innerWidth-16&&(R=window.innerWidth-w.width-16),R<16&&(R=16),v({top:C,left:R});};return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,true),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,true);}},[i,f,t,n]),X.useEffect(()=>{if(!i)return;let x=w=>{h.current&&!h.current.contains(w.target)&&f.current&&!f.current.contains(w.target)&&l(false);},y=w=>{w.key==="Escape"&&l(false);};return document.addEventListener("mousedown",x),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",y);}},[i,l,f]),!p||!i?null:Ba.createPortal(jsxs("div",{ref:x=>{h.current=x,typeof s=="function"?s(x):s&&(s.current=x);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X$1,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:r})]}):c.map(x=>jsx(oc,{notification:x},x.id)))})]}),document.body)});Ah.displayName="NotificationCenterContent";var Jk={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},eP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},oc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=Js(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=eP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let x=typeof v=="string"?new Date(v):v,w=new Date().getTime()-x.getTime(),C=Math.floor(w/6e4),R=Math.floor(w/36e5),T=Math.floor(w/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":T<7?T+"d ago":x.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",Jk[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};oc.displayName="NotificationItem";var zh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));zh.displayName="NotificationList";var Oh=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),lP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Bh=X.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=X.useState(true),[v,x]=X.useState(false);X.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),X.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{y();},d);return ()=>clearTimeout(R)}},[d,h]);let y=()=>{x(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let w=lP[t],C=r?o!==void 0?o:w?jsx(w,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(Oh({variant:n,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:y,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});Bh.displayName="Banner";var fa=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:bg-primary hover:text-primary-foreground hover:border-primary"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),uP=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),sc=X.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,x]=X.useState(false),y=o&&o.length>0,w=k=>{y&&x(!v),p?.(k);},C=k=>{k.onClick?.(),x(false);},R={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},T=l==="rotate"&&v?"rotate-45":"",M=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&fa({position:m})),children:[y&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((k,P)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${P*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsx("a",{href:k.href,className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsx("button",{type:"button",onClick:()=>C(k),className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxs("button",{ref:b,type:"button",onClick:w,disabled:g,className:u(fa({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":y?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(uP({size:d}),T,M,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),y&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>x(false)})]})});sc.displayName="FloatingActionButton";var mP=sc;var Uh=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),Kh=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),jh=X.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=X.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=y=>{y.disabled||(p||f(y.key),s?.(y.key));},b=y=>t==="filled"?y?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":y?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},x=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(Uh({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(y=>{let w=g===y.key,C=i==="all"||i==="active"&&w,R=w&&y.activeIcon?y.activeIcon:y.icon;if(l)return jsx("div",{onClick:()=>h(y),className:u(Kh({variant:t}),y.disabled&&"opacity-50 cursor-not-allowed"),children:l(y,w)},y.key);let T=jsxs("div",{onClick:()=>!y.href&&h(y),className:u(Kh({variant:t}),b(w),y.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":w?"page":void 0,"aria-disabled":y.disabled,tabIndex:y.disabled?-1:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),h(y));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:R}),y.badge!==void 0&&y.badge>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:y.badge>99?"99+":y.badge}),y.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&y.label&&jsx("span",{className:u(x(),"font-medium truncate max-w-full px-1"),children:y.label})]},y.key);return y.href&&!y.disabled?jsx("a",{href:y.href,onClick:()=>h(y),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(w)),children:T},y.key):T})})});jh.displayName="BottomNavigation";var fP="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",_h=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Yh=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsx(Drawer.Trigger,{asChild:true,children:n}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:fP,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(_h({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Yh.displayName="ActionSheet";var qh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),lc=cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),Zh=X.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=X.useRef(null),[p,g]=X.useState(0),[h,b]=X.useState(false),v=X.useRef(0),x=X.useRef(0),y=n.length*(o==="sm"?64:o==="lg"?96:80),w=r.length*(o==="sm"?64:o==="lg"?96:80),C=P=>{i||(b(true),v.current=P.touches[0].clientX,x.current=p);},R=P=>{if(!h||i)return;let N=P.touches[0].clientX-v.current,S=x.current+N;(S>0&&n.length===0||S<0&&r.length===0)&&(S=0),S>y?S=y+(S-y)*.3:S<-w&&(S=-w+(S+w)*.3),g(S);},T=()=>{if(!h)return;b(false);let P=f.current?.offsetWidth||0,E=Math.abs(p)/P;if(l&&E>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>y*a&&n.length>0?(g(y),s?.("right")):p<-w*a&&r.length>0?(g(-w),s?.("left")):g(0);},M=(P,E)=>{P.onAction?.(),s?.(E,P.key),g(0);},k=()=>{g(0);};return jsxs("div",{ref:m,className:u(qh({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:y},children:n.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"right"),className:u(lc({variant:P.variant,size:o})),style:{opacity:Math.min(1,p/y)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:w},children:r.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"left"),className:u(lc({variant:P.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/w)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:T,onClick:p!==0?k:void 0,children:c})]})});Zh.displayName="SwipeActions";var Jh=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),vP=cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),ex=X.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=X.useRef(null),[b,v]=X.useState(0),[x,y]=X.useState("idle"),w=X.useRef(0),C=X.useRef(false),R=()=>l||x==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,T=N=>{R()&&(w.current=N.touches[0].clientY,C.current=true);},M=N=>{if(!C.current||!R())return;let H=N.touches[0].clientY-w.current;if(H<0){v(0),y("idle");return}let L=Math.min(H*.5,o);v(L),y(L>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,x==="ready"){y("refreshing"),v(r*.6);try{await n();}finally{y("idle"),v(0);}}else y("idle"),v(0);},P={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],E=()=>{if(x==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(P,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let N=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(P,"text-muted-foreground transition-transform"),style:{transform:`rotate(${N}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:x==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(Jh({variant:t,className:e})),...p,children:[jsx("div",{className:u(vP({size:i}),"z-10",x==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:E()}),jsx("div",{ref:h,className:u("transition-transform duration-200",x==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:k,children:f})]})});ex.displayName="PullToRefresh";var $r=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),hP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},tx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:hP,custom:i,transition:$r(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});tx.displayName="Fade";var xP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},nx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=X.useMemo(()=>xP(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:$r(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});nx.displayName="Slide";var yP={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},RP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},rx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:RP,custom:i,transition:$r(n,r,o),className:u(a),style:{transformOrigin:yP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});rx.displayName="Scale";var ox=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:$r(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});ox.displayName="Collapse";var ax=X.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:$r(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});ax.displayName="Expand";var sx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:$r(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});sx.displayName="Rotate";var ix=X.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:r?180:0},transition:$r(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});ix.displayName="Flip";var lx=X.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=X.useState([]),l=X.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(x=>[...x,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});lx.displayName="Ripple";var cx=X.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});cx.displayName="Bounce";var TP={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},dx=X.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:TP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});dx.displayName="Shake";var MP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},ux=X.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:u(t&&MP[n],r),children:e}));ux.displayName="Pulse";var mx=X.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});mx.displayName="Wiggle";var px=X.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=X.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});px.displayName="Pop";var SP=(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},fx=X.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=X.useRef(null),g=useInView(p,{once:true}),[h,b]=X.useState(!l);X.useEffect(()=>{if(l&&g){let y=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(y)}},[l,g,c]);let v=useMotionValue(t),x=useTransform(v,y=>SP(y,r,s,i));return X.useEffect(()=>{if(h){let y=animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>y.stop()}},[h,e,n,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:x}),a]})})});fx.displayName="Counter";var gx=X.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=X.useState(""),[b,v]=X.useState(0),[x,y]=X.useState(false),[w,C]=X.useState(false),R=X.useRef(null),T=useInView(R,{once:true}),[M,k]=X.useState(!l);return X.useEffect(()=>{if(l&&T){let P=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(P)}},[l,T,n]),X.useEffect(()=>{if(!M||w)return;let P=p[b],E;return x?g.length>0?E=setTimeout(()=>{h(g.slice(0,-1));},i):(y(false),v(N=>(N+1)%p.length)):g.length<P.length?E=setTimeout(()=>{h(P.slice(0,g.length+1));},t):b<p.length-1||s?E=setTimeout(()=>{y(true);},r):(C(true),m?.()),()=>clearTimeout(E)},[M,g,b,x,w,p,t,i,r,s,m]),jsxs("span",{ref:R,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});gx.displayName="Typewriter";var bx=X.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=X.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,x)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&x<p.length-1&&"\xA0"]},x))})})});bx.displayName="TextReveal";var vx=X.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=X.useState(0);X.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});vx.displayName="WordRotate";var Rx=X.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=X.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});Rx.displayName="ScrollReveal";var wx=X.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsx(HP,{progress:f,position:e})]})});wx.displayName="ScrollProgress";var HP=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=X.useState(0);return X.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},Cx=X.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=X.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});Cx.displayName="Parallax";var Nx=X.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsx("style",{children:`
|
|
56
56
|
@keyframes shimmer-right {
|
|
57
57
|
0% { transform: translateX(-100%); }
|
|
58
58
|
100% { transform: translateX(100%); }
|
|
@@ -69,5 +69,5 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
69
69
|
0% { transform: translateY(-100%); }
|
|
70
70
|
100% { transform: translateY(100%); }
|
|
71
71
|
}
|
|
72
|
-
`})]})});Mx.displayName="Shimmer";var HP={sm:24,md:40,lg:56,xl:80},IP={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},Nx=X.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=HP[t],d=IP[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});Nx.displayName="Checkmark";var So={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},kx=X.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=X.useCallback(()=>{let i={...So,...n};Lo(i),o?.();},[n,o]);return X.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});kx.displayName="Confetti";var VP=()=>{let e=X.useCallback(r=>{let o={...So,...r};Lo(o);},[]),t=X.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Lo({...So,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Lo({...So,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=X.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Lo({...So,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Lo({...So,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},Px=X.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});Px.displayName="Glow";var Tx=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),Ex=X.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=X.useState([]);return X.useEffect(()=>{let d=Array.from({length:t},()=>Tx(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=Tx(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});Ex.displayName="Sparkles";var Lx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));Lx.displayName="H1";var Sx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));Sx.displayName="H2";var Dx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Dx.displayName="H3";var Hx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));Hx.displayName="H4";var Ix=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Ix.displayName="Paragraph";var Vx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Vx.displayName="Blockquote";var Ax=X.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));Ax.displayName="InlineCode";var zx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));zx.displayName="Lead";var Ox=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));Ox.displayName="Large";var Bx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));Bx.displayName="Small";var Fx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));Fx.displayName="Muted";var Kx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));Kx.displayName="UL";function Do(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function BP(){return Do("(max-width: 767px)")}function FP(){return Do("(min-width: 768px) and (max-width: 1023px)")}function KP(){return Do("(min-width: 1024px)")}function $P(){return Do("(prefers-color-scheme: dark)")?"dark":"light"}function GP(){return Do("(prefers-reduced-motion: reduce)")}function ha(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function YP(){let{width:e}=ha();return e}function XP(){let{height:e}=ha();return e}function qP(e){let{width:t}=ha();return t>=e}function ZP(){let{width:e}=ha();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function eE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function nE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function aE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function sE(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function iE(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function dE(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function uE(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function pE(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function fE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function gE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function bE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function Gx(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function Ux(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function vE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=Gx(e);useEffect(()=>{if(!r)return;let c=m=>{Ux(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function hE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:Gx(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(Ux(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function xE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function yE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function RE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function wE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function CE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function TE(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function ME(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function NE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function kE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function EE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function LE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function SE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var _x=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function DE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(_x)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function HE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(_x)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function IE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function VE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function Jx(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function AE(e=true){let{lock:t,unlock:n}=Jx();useEffect(()=>{e?t():n();},[e,t,n]);}function ny(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function OE(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function BE(e="200px"){let{ref:t,isIntersecting:n}=ny({rootMargin:e,once:true});return {ref:t,isVisible:n}}function FE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function KE(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function $E(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function GE(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function UE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function sy(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function _E(e){return sy({...e,defaultOpen:true})}function YE(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function XE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function qE(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function QE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function JE(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function eL(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function tL(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function nL(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function aL(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(M=>{let T=[...M];return T.splice(C,0,R),T});},[]),i=useCallback((C,R)=>{n(M=>{let T=[...M];return T[C]=R,T});},[]),l=useCallback(C=>{n(R=>R.filter((M,T)=>T!==C));},[]),c=useCallback(C=>{n(R=>{let M=R.indexOf(C);return M===-1?R:R.filter((T,k)=>k!==M)});},[]),d=useCallback(C=>{n(R=>R.filter(M=>!C(M)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(M=>{let T=[...M],[k]=T.splice(C,1);return T.splice(R,0,k),T});},[]),v=useCallback((C,R)=>{n(M=>{let T=[...M];return [T[C],T[R]]=[T[R],T[C]],T});},[]),x=useCallback(C=>t.filter(C),[t]),y=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:x,find:y,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,x,y,w])}function sL(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function iL(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function my(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function cL(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=my(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function dL(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function uL(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function by(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function pL(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...by(s,false),retryCount:r}}var xy=new Map,fL=300*1e3;function gL(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=xy.get(h);if(b&&Date.now()-b.timestamp<fL){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let x=await v.json(),y=o?o(x):x;xy.set(h,{data:y,timestamp:Date.now()}),f.current&&d({data:y,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let x=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:x,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function bL(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function pi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function hL(e,t){let[n,r]=useState(false);pi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function xL(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;pi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function yL(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);pi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function wy(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function RL(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function wL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function CL(e,t=true){let[n,r]=useState(false);return wy(()=>{r(true);},t?e:null),n}function TL(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let x=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(x,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function ML(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function NL(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var Ny=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function kL(e,t={}){let{events:n=Ny,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function PL(e,t,n,r={}){let{events:o=Ny,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function Py(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function SL(){return Py()==="visible"}function DL(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function HL(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function IL(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function Dy(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function OL(){let e=useRef(null),t=Dy(e);return {ref:e,...t}}function KL(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function $L(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function GL(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function UL(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function jL(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function _L(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let x=new SpeechSynthesisUtterance(v);x.voice=t,x.rate=n,x.pitch=r,x.volume=o,x.lang=a,x.onstart=()=>i(true),x.onend=()=>{i(false),c(false);},x.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(x);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function YL(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let y=new p;return y.lang=t,y.continuous=n,y.interimResults=r,y.onstart=()=>{a(true),m(null);},y.onend=()=>{a(false);},y.onerror=w=>{m(new Error(w.error)),a(false);},y.onresult=w=>{let C="",R="";for(let M=w.resultIndex;M<w.results.length;M++){let T=w.results[M];T.isFinal?R+=T[0].transcript:C+=T[0].transcript;}R&&i(M=>M+R),c(C);},f.current=y,()=>{y.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),x=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:x}}export{Su as Accordion,Du as AccordionItem,Av as ActionBar,zv as ActionBarButton,Ev as ActionGroup,_h as ActionSheet,Gy as Alert,jy as AlertDescription,Uy as AlertTitle,jb as AreaChart,om as AspectRatio,zg as Autocomplete,Cr as Avatar,Tr as AvatarFallback,Dp as AvatarGroup,Qr as AvatarImage,rg as BackTop,Xy as Badge,Oh as Banner,Gb as BarChart,ah as BatteryMeter,Vx as Blockquote,Uh as BottomNavigation,lx as Bounce,Xu as Breadcrumb,tm as BreadcrumbEllipsis,Zu as BreadcrumbItem,Qu as BreadcrumbLink,qu as BreadcrumbList,Ju as BreadcrumbPage,em as BreadcrumbSeparator,ae as Button,ed as ButtonGroup,Uf as COUNTRIES,eo as Calendar,ad as Card,cd as CardContent,ld as CardDescription,dd as CardFooter,sd as CardHeader,id as CardTitle,Jb as Carousel,ev as CarouselContent,tv as CarouselItem,Sl as CarouselNext,Ll as CarouselPrevious,zo as Checkbox,Nx as Checkmark,zp as Chip,Gp as CircularProgress,Nt as CloseButton,qg as Code,tb as CodeBlock,rx as Collapse,Ou as Collapsible,Bu as CollapsibleContent,Ii as CollapsibleTrigger,dh as ColorArea,If as ColorPicker,ph as ColorSlider,Xo as ColorSwatch,Df as ColorSwatchPicker,gh as ColorWheel,Wi as Command,_R as CommandDialog,yp as CommandEmpty,Rp as CommandGroup,hp as CommandInput,Cp as CommandItem,xp as CommandList,wp as CommandSeparator,Tp as CommandShortcut,kx as Confetti,iu as ContextMenu,bu as ContextMenuCheckboxItem,mu as ContextMenuContent,cu as ContextMenuGroup,gu as ContextMenuItem,du as ContextMenuPortal,vu as ContextMenuSection,hu as ContextMenuSeparator,xu as ContextMenuShortcut,uu as ContextMenuSub,fu as ContextMenuSubContent,pu as ContextMenuSubTrigger,lu as ContextMenuTrigger,_v as ContextualHelp,Ob as CopyButton,px as Counter,Bf as CurrencyInput,sa as DEFAULT_COLORS,SR as DataTable,XN as DateField,YN as DateInput,Ks as DatePicker,Pb as DateRangePicker,oh as DiskUsageMeter,Oi as Drawer,Pm as DrawerBody,Dm as DrawerClose,Nm as DrawerContent,Sm as DrawerDescription,Em as DrawerFooter,Bm as DrawerGroup,Fm as DrawerGroupLabel,km as DrawerHeader,Km as DrawerInset,Vm as DrawerMenu,Om as DrawerMenuButton,Am as DrawerMenuItem,TR as DrawerProvider,Im as DrawerSeparator,Tm as DrawerSidebar,Lm as DrawerTitle,Hm as DrawerToggle,Mm as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,Vd as DropdownGroup,$t as DropdownItem,S0 as DropdownLabel,Ti as DropdownSection,Hd as DropdownSeparator,Id as DropdownShortcut,Ad as DropdownSub,Od as DropdownSubContent,zd as DropdownSubTrigger,Tn as DropdownTrigger,Hl as EMOJIS,Vs as EMOJI_CATEGORIES,rv as EmojiPicker,nf as EmptyState,ox as Expand,uP as FAB,ex as Fade,dl as FieldContext,Pf as FileUpload,sx as Flip,ac as FloatingActionButton,Og as Form,cl as FormContext,$g as FormControl,Gg as FormDescription,Bg as FormField,Fg as FormItem,Kg as FormLabel,Ug as FormMessage,Kb as FullCalendar,Px as Glow,th as GridList,Lx as H1,Sx as H2,Dx as H3,Hx as H4,ju as HoverCard,_u as HoverCardContent,Wu as HoverCardTrigger,ab as Image,lv as ImageCropper,wl as ImageViewer,Ib as ImageViewerTrigger,Db as InfiniteScroll,Ax as InlineCode,Pa as Input,Wp as InputOTP,_p as InputOTPGroup,Xp as InputOTPSeparator,Yp as InputOTPSlot,qb as KanbanBoard,Ab as Kbd,wr as Label,hh as LabeledValue,yh as LabeledValueGroup,Ox as Large,zx as Lead,$b as LineChart,tg as Link,Bw as List,cf as ListItem,df as ListItemText,$v as ListView,ub as Listbox,mb as ListboxItem,Nb as Loading,xb as LoadingOverlay,tl as MASK_PRESETS,$f as MaskedInput,lg as Menubar,xg as MenubarCheckboxItem,vg as MenubarContent,dg as MenubarGroup,hg as MenubarItem,Rg as MenubarLabel,cg as MenubarMenu,ug as MenubarPortal,pg as MenubarRadioGroup,yg as MenubarRadioItem,wg as MenubarSeparator,Cg as MenubarShortcut,mg as MenubarSub,bg as MenubarSubContent,gg as MenubarSubTrigger,fg as MenubarTrigger,Xs as Meter,dp as Modal,fp as ModalBody,mp as ModalClose,ts as ModalContent,vp as ModalDescription,gp as ModalFooter,pp as ModalHeader,ji as ModalOverlay,Ui as ModalPortal,es as ModalRoot,bp as ModalTitle,up as ModalTrigger,Fx as Muted,Rb as NProgress,Yf as Navbar,Xf as NavbarBrand,qf as NavbarContent,Zf as NavbarItem,Qf as NavbarLink,dm as NavigationMenu,gm as NavigationMenuContent,hm as NavigationMenuIndicator,mm as NavigationMenuItem,vm as NavigationMenuLink,um as NavigationMenuList,fm as NavigationMenuTrigger,zi as NavigationMenuViewport,Hh as NotificationCenter,Vh as NotificationCenterContent,Zk as NotificationCenterProvider,Ih as NotificationCenterTrigger,rc as NotificationItem,Ah as NotificationList,yv as NumberField,kp as NumberInput,ep as Pagination,tp as PaginationContent,ap as PaginationEllipsis,np as PaginationItem,Za as PaginationLink,op as PaginationNext,rp as PaginationPrevious,Ix as Paragraph,wx as Parallax,Np as PasswordInput,jf as PhoneInput,Ub as PieChart,mx as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,_a as Progress,Jh as PullToRefresh,dx as Pulse,dv as QRCode,wu as RadioGroup,Cu as RadioGroupItem,Uv as RangeSlider,Ip as Rating,xw as ResizableHandle,hw as ResizablePanel,vw as ResizablePanelGroup,av as RichTextEditor,ix as Ripple,ax as Rotate,nx as Scale,ke as ScrollArea,Rx as ScrollProgress,yx as ScrollReveal,Mh as SearchBar,Cv as SearchField,Cf as SegmentedControl,Tf as SegmentedControlItem,Aa as Select,jn as Separator,cx as Shake,qd as Sheet,Qd as SheetClose,tu as SheetContent,au as SheetDescription,ru as SheetFooter,nu as SheetHeader,Jd as SheetOverlay,Li as SheetPortal,ou as SheetTitle,Zd as SheetTrigger,Mx as Shimmer,Ha as Skeleton,tx as Slide,Ua as Slider,Bx as Small,ob as Snippet,gT as SortableList,Ex as Sparkles,Na as Spinner,Eh as SpotlightSearch,af as StatCard,Iv as StatusLight,kg as Step,Mg as Steps,qh as SwipeActions,gd as Switch,nb as TabbedCodeBlock,Gm as Table,jm as TableBody,qm as TableCaption,Xm as TableCell,Wm as TableFooter,Ym as TableHead,Um as TableHeader,_m as TableRow,Gd as Tabs,Wd as TabsContent,Ud as TabsList,jd as TabsTrigger,qv as TagGroup,Jp as TagInput,Zy as TextBadge,bv as TextField,gx as TextReveal,bd as Textarea,uv as ThemeProvider,mv as ThemeToggle,Nv as TimeField,Af as TimeInput,Eb as TimePicker,ff as Timeline,vf as TimelineContent,bf as TimelineItem,hf as TimelineOpposite,K0 as Toaster,Tu as Toggle,Nu as ToggleGroup,ku as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,Wn as TooltipProvider,Yn as TooltipTrigger,Ig as Tree,fx as Typewriter,Kx as UL,_g as User,VT as VirtualList,ux as Wiggle,bx as WordRotate,Vv as actionBarVariants,Pv as actionGroupVariants,Wh as actionSheetItemVariants,Ky as alertVariants,cs as applyMask,Ag as autocompleteInputVariants,Sp as avatarGroupVariants,ng as backTopVariants,Wy as badgeIndicatorVariants,zh as bannerVariants,Gh as bottomNavigationVariants,Qc as buttonGroupVariants,Xr as buttonVariants,H0 as calculatePasswordStrength,od as cardVariants,Zb as carouselVariants,aa as chartContainerVariants,Ap as chipVariants,$p as circularProgressVariants,wm as closeButtonVariants,u as cn,Xg as codeVariants,sh as colorAreaVariants,mh as colorSliderVariants,Sf as colorSwatchPickerVariants,Lf as colorSwatchVariants,fh as colorWheelVariants,Zl as contextualHelpTriggerVariants,zb as copyButtonVariants,zf as currencyInputVariants,Tv as datePickerVariants,_d as defaultPasswordRequirements,zm as drawerMenuButtonVariants,nv as emojiPickerVariants,tf as emptyStateVariants,fa as fabVariants,Mf as fileUploadVariants,el as formatCurrency,ma as formatDate,is as formatFileSize,ds as formatPhoneNumber,Fb as fullCalendarVariants,Nf as getFileIcon,Kf as getMaskPlaceholder,I0 as getPasswordStrengthColor,V0 as getPasswordStrengthLabel,eh as gridListItemVariants,Jv as gridListVariants,lh as hexToRgb,Zs as hsvToRgb,iv as imageCropperVariants,gl as imageVariants,Rl as infiniteScrollLoaderVariants,yl as infiniteScrollVariants,jp as inputOTPVariants,fv as inputSizeVariants,Yb as kanbanBoardVariants,El as kanbanCardVariants,Xb as kanbanColumnVariants,Vb as kbdVariants,gv as labelSizeVariants,xh as labeledValueGroupVariants,vh as labeledValueVariants,eg as linkVariants,lf as listItemVariants,qi as listVariants,Kv as listViewItemVariants,Fv as listViewVariants,cb as listboxItemVariants,lb as listboxVariants,hb as loadingOverlayVariants,Mb as loadingVariants,Ff as maskedInputVariants,rh as meterVariants,Gi as modalContentVariants,_f as navbarVariants,bm as navigationMenuLinkStyle,pm as navigationMenuTriggerStyle,yb as nprogressVariants,xv as numberFieldVariants,Ul as parseDate,Of as parseFormattedValue,bC as phoneInputVariants,Qh as pullToRefreshVariants,zl as qrCodeVariants,Gv as rangeSliderVariants,Hp as ratingVariants,ch as rgbToHex,ih as rgbToHsv,ov as richTextEditorVariants,Th as searchBarVariants,wv as searchFieldVariants,Rf as segmentedControlItemVariants,yf as segmentedControlVariants,Ed as selectVariants,eu as sheetVariants,hd as skeletonVariants,rb as snippetVariants,gb as sortableItemVariants,fb as sortableListVariants,qc as spinnerVariants,of as statCardVariants,Hv as statusLightVariants,Ng as stepVariants,Tg as stepsVariants,ic as swipeActionVariants,Xh as swipeActionsVariants,La as switchColors,Ql as tagGroupItemVariants,Xv as tagGroupVariants,Qp as tagVariants,qy as textBadgeVariants,pv as textFieldVariants,HN as themeToggleVariants,Mv as timeFieldVariants,Vf as timeInputVariants,gf as timelineItemVariants,pf as timelineVariants,$a as toggleVariants,Lg as treeItemVariants,Eg as treeVariants,nl as unmask,ML as useAnimatedValue,by as useAsync,pL as useAsyncRetry,AE as useBodyScrollLock,qE as useBooleanToggle,qP as useBreakpoint,ZP as useBreakpoints,vi as useButtonGroup,Is as useCarousel,pE as useClickOutside,fE as useClickOutsideMultiple,VP as useConfetti,bE as useCopy,gE as useCopyToClipboard,xL as useCountdown,QE as useCounter,XE as useCycle,aE as useDebounce,sE as useDebouncedCallback,iE as useDebouncedCallbackWithControls,wL as useDelayedValue,sy as useDisclosure,_E as useDisclosureOpen,$L as useDistance,SL as useDocumentIsVisible,Py as useDocumentVisibility,DL as useDocumentVisibilityCallback,bR as useDrawer,UE as useElementSize,yE as useEventListener,RE as useEventListenerRef,gL as useFetch,bs as useFieldContext,DE as useFocusTrap,HE as useFocusTrapRef,ul as useFormContext,Dy as useFullscreen,OL as useFullscreenRef,KL as useGeolocation,vE as useHotkeys,hE as useHotkeysMap,TE as useHover,kE as useHoverDelay,NE as useHoverProps,ME as useHoverRef,kL as useIdle,PL as useIdleCallback,JE as useIncrementCounter,ny as useIntersectionObserver,OE as useIntersectionObserverRef,pi as useInterval,hL as useIntervalControls,KP as useIsDesktop,BP as useIsMobile,FP as useIsTablet,wE as useKeyPress,xE as useKeyPressed,JT as useKeyboardShortcut,BE as useLazyLoad,aL as useList,eE as useLocalStorage,CE as useLongPress,sL as useMap,jL as useMediaPermission,Do as useMediaQuery,EE as useMouse,LE as useMouseElement,SE as useMouseElementRef,bL as useMutation,FE as useMutationObserver,KE as useMutationObserverRef,Js as useNotificationCenter,UL as useNotificationPermission,HL as useOnlineStatus,IL as useOnlineStatusCallback,GL as usePermission,$P as usePrefersColorScheme,GP as usePrefersReducedMotion,eL as usePrevious,nL as usePreviousDistinct,tL as usePreviousWithInitial,dL as useQueue,TL as useRafLoop,iL as useRecord,$E as useResizeObserver,GE as useResizeObserverRef,Jx as useScrollLock,IE as useScrollPosition,cL as useSelection,nE as useSessionStorage,my as useSet,YL as useSpeechRecognition,_L as useSpeechSynthesis,Gk as useSpotlight,NL as useSpringValue,uL as useStack,dE as useThrottle,uE as useThrottledCallback,wy as useTimeout,RL as useTimeoutControls,CL as useTimeoutFlag,yL as useTimer,YE as useToggle,XP as useWindowHeight,VE as useWindowScroll,ha as useWindowSize,YP as useWindowWidth,Wg as userVariants,kf as validateFile,eT as validators,Lb as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
72
|
+
`})]})});Nx.displayName="Shimmer";var IP={sm:24,md:40,lg:56,xl:80},VP={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},kx=X.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=IP[t],d=VP[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});kx.displayName="Checkmark";var So={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},Px=X.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=X.useCallback(()=>{let i={...So,...n};Lo(i),o?.();},[n,o]);return X.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});Px.displayName="Confetti";var AP=()=>{let e=X.useCallback(r=>{let o={...So,...r};Lo(o);},[]),t=X.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Lo({...So,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Lo({...So,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=X.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Lo({...So,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Lo({...So,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},Ex=X.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});Ex.displayName="Glow";var Mx=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),Lx=X.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=X.useState([]);return X.useEffect(()=>{let d=Array.from({length:t},()=>Mx(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=Mx(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});Lx.displayName="Sparkles";var Sx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));Sx.displayName="H1";var Dx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));Dx.displayName="H2";var Hx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Hx.displayName="H3";var Ix=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));Ix.displayName="H4";var Vx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Vx.displayName="Paragraph";var Ax=X.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Ax.displayName="Blockquote";var zx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));zx.displayName="InlineCode";var Ox=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));Ox.displayName="Lead";var Bx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));Bx.displayName="Large";var Fx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));Fx.displayName="Small";var Kx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));Kx.displayName="Muted";var $x=X.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));$x.displayName="UL";function Do(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function FP(){return Do("(max-width: 767px)")}function KP(){return Do("(min-width: 768px) and (max-width: 1023px)")}function $P(){return Do("(min-width: 1024px)")}function GP(){return Do("(prefers-color-scheme: dark)")?"dark":"light"}function UP(){return Do("(prefers-reduced-motion: reduce)")}function ha(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function XP(){let{width:e}=ha();return e}function qP(){let{height:e}=ha();return e}function ZP(e){let{width:t}=ha();return t>=e}function QP(){let{width:e}=ha();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function tE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function rE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function sE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function iE(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function lE(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function uE(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function mE(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function fE(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function gE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function bE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function vE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function Ux(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function jx(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function hE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=Ux(e);useEffect(()=>{if(!r)return;let c=m=>{jx(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function xE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:Ux(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(jx(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function yE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function RE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function wE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function CE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function TE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function ME(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function NE(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function kE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function PE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function LE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function SE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function DE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var Yx=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function HE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(Yx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function IE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(Yx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function VE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function AE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function ey(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function zE(e=true){let{lock:t,unlock:n}=ey();useEffect(()=>{e?t():n();},[e,t,n]);}function ry(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function BE(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function FE(e="200px"){let{ref:t,isIntersecting:n}=ry({rootMargin:e,once:true});return {ref:t,isVisible:n}}function KE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function $E(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function GE(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function UE(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function jE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function iy(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function YE(e){return iy({...e,defaultOpen:true})}function XE(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function qE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function ZE(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function JE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function eL(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function tL(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function nL(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function rL(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function sL(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(T=>{let M=[...T];return M.splice(C,0,R),M});},[]),i=useCallback((C,R)=>{n(T=>{let M=[...T];return M[C]=R,M});},[]),l=useCallback(C=>{n(R=>R.filter((T,M)=>M!==C));},[]),c=useCallback(C=>{n(R=>{let T=R.indexOf(C);return T===-1?R:R.filter((M,k)=>k!==T)});},[]),d=useCallback(C=>{n(R=>R.filter(T=>!C(T)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(T=>{let M=[...T],[k]=M.splice(C,1);return M.splice(R,0,k),M});},[]),v=useCallback((C,R)=>{n(T=>{let M=[...T];return [M[C],M[R]]=[M[R],M[C]],M});},[]),x=useCallback(C=>t.filter(C),[t]),y=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:x,find:y,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,x,y,w])}function iL(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function lL(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function py(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function dL(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=py(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function uL(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function mL(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function vy(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function fL(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...vy(s,false),retryCount:r}}var yy=new Map,gL=300*1e3;function bL(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=yy.get(h);if(b&&Date.now()-b.timestamp<gL){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let x=await v.json(),y=o?o(x):x;yy.set(h,{data:y,timestamp:Date.now()}),f.current&&d({data:y,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let x=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:x,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function vL(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function pi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function xL(e,t){let[n,r]=useState(false);pi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function yL(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;pi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function RL(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);pi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function Cy(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function wL(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function CL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function TL(e,t=true){let[n,r]=useState(false);return Cy(()=>{r(true);},t?e:null),n}function ML(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let x=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(x,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function NL(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function kL(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var ky=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function PL(e,t={}){let{events:n=ky,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function EL(e,t,n,r={}){let{events:o=ky,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function Ey(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function DL(){return Ey()==="visible"}function HL(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function IL(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function VL(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function Hy(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function BL(){let e=useRef(null),t=Hy(e);return {ref:e,...t}}function $L(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function GL(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function UL(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function jL(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function WL(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function YL(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let x=new SpeechSynthesisUtterance(v);x.voice=t,x.rate=n,x.pitch=r,x.volume=o,x.lang=a,x.onstart=()=>i(true),x.onend=()=>{i(false),c(false);},x.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(x);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function XL(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let y=new p;return y.lang=t,y.continuous=n,y.interimResults=r,y.onstart=()=>{a(true),m(null);},y.onend=()=>{a(false);},y.onerror=w=>{m(new Error(w.error)),a(false);},y.onresult=w=>{let C="",R="";for(let T=w.resultIndex;T<w.results.length;T++){let M=w.results[T];M.isFinal?R+=M[0].transcript:C+=M[0].transcript;}R&&i(T=>T+R),c(C);},f.current=y,()=>{y.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),x=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:x}}export{Du as Accordion,Hu as AccordionItem,zv as ActionBar,Ov as ActionBarButton,Lv as ActionGroup,Yh as ActionSheet,Uy as Alert,Wy as AlertDescription,jy as AlertTitle,Wb as AreaChart,am as AspectRatio,Og as Autocomplete,Cr as Avatar,Tr as AvatarFallback,Hp as AvatarGroup,Qr as AvatarImage,og as BackTop,qy as Badge,Bh as Banner,Ub as BarChart,sh as BatteryMeter,Ax as Blockquote,jh as BottomNavigation,cx as Bounce,qu as Breadcrumb,nm as BreadcrumbEllipsis,Qu as BreadcrumbItem,Ju as BreadcrumbLink,Zu as BreadcrumbList,em as BreadcrumbPage,tm as BreadcrumbSeparator,ae as Button,td as ButtonGroup,jf as COUNTRIES,eo as Calendar,sd as Card,dd as CardContent,cd as CardDescription,ud as CardFooter,id as CardHeader,ld as CardTitle,ev as Carousel,tv as CarouselContent,nv as CarouselItem,Dl as CarouselNext,Sl as CarouselPrevious,zo as Checkbox,kx as Checkmark,Op as Chip,Up as CircularProgress,Nt as CloseButton,Zg as Code,nb as CodeBlock,ox as Collapse,Bu as Collapsible,Fu as CollapsibleContent,Ii as CollapsibleTrigger,uh as ColorArea,Vf as ColorPicker,fh as ColorSlider,Xo as ColorSwatch,Hf as ColorSwatchPicker,bh as ColorWheel,Wi as Command,YR as CommandDialog,Rp as CommandEmpty,wp as CommandGroup,xp as CommandInput,Tp as CommandItem,yp as CommandList,Cp as CommandSeparator,Mp as CommandShortcut,Px as Confetti,lu as ContextMenu,vu as ContextMenuCheckboxItem,pu as ContextMenuContent,du as ContextMenuGroup,bu as ContextMenuItem,uu as ContextMenuPortal,hu as ContextMenuSection,xu as ContextMenuSeparator,yu as ContextMenuShortcut,mu as ContextMenuSub,gu as ContextMenuSubContent,fu as ContextMenuSubTrigger,cu as ContextMenuTrigger,Yv as ContextualHelp,Bb as CopyButton,fx as Counter,Ff as CurrencyInput,sa as DEFAULT_COLORS,DR as DataTable,qN as DateField,XN as DateInput,Ks as DatePicker,Eb as DateRangePicker,ah as DiskUsageMeter,Oi as Drawer,Em as DrawerBody,Hm as DrawerClose,km as DrawerContent,Dm as DrawerDescription,Lm as DrawerFooter,Fm as DrawerGroup,Km as DrawerGroupLabel,Pm as DrawerHeader,$m as DrawerInset,Am as DrawerMenu,Bm as DrawerMenuButton,zm as DrawerMenuItem,MR as DrawerProvider,Vm as DrawerSeparator,Mm as DrawerSidebar,Sm as DrawerTitle,Im as DrawerToggle,Nm as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,Ad as DropdownGroup,$t as DropdownItem,D0 as DropdownLabel,Ti as DropdownSection,Id as DropdownSeparator,Vd as DropdownShortcut,zd as DropdownSub,Bd as DropdownSubContent,Od as DropdownSubTrigger,Tn as DropdownTrigger,Il as EMOJIS,Vs as EMOJI_CATEGORIES,ov as EmojiPicker,rf as EmptyState,ax as Expand,mP as FAB,tx as Fade,dl as FieldContext,Ef as FileUpload,ix as Flip,sc as FloatingActionButton,Bg as Form,cl as FormContext,Gg as FormControl,Ug as FormDescription,Fg as FormField,Kg as FormItem,$g as FormLabel,jg as FormMessage,$b as FullCalendar,Ex as Glow,nh as GridList,Sx as H1,Dx as H2,Hx as H3,Ix as H4,Wu as HoverCard,Yu as HoverCardContent,_u as HoverCardTrigger,sb as Image,cv as ImageCropper,wl as ImageViewer,Vb as ImageViewerTrigger,Hb as InfiniteScroll,zx as InlineCode,Pa as Input,_p as InputOTP,Yp as InputOTPGroup,qp as InputOTPSeparator,Xp as InputOTPSlot,Zb as KanbanBoard,zb as Kbd,wr as Label,xh as LabeledValue,Rh as LabeledValueGroup,Bx as Large,Ox as Lead,Gb as LineChart,ng as Link,Fw as List,df as ListItem,uf as ListItemText,Gv as ListView,mb as Listbox,pb as ListboxItem,kb as Loading,yb as LoadingOverlay,tl as MASK_PRESETS,Gf as MaskedInput,cg as Menubar,yg as MenubarCheckboxItem,hg as MenubarContent,ug as MenubarGroup,xg as MenubarItem,wg as MenubarLabel,dg as MenubarMenu,mg as MenubarPortal,fg as MenubarRadioGroup,Rg as MenubarRadioItem,Cg as MenubarSeparator,Tg as MenubarShortcut,pg as MenubarSub,vg as MenubarSubContent,bg as MenubarSubTrigger,gg as MenubarTrigger,Xs as Meter,up as Modal,gp as ModalBody,pp as ModalClose,ts as ModalContent,hp as ModalDescription,bp as ModalFooter,fp as ModalHeader,ji as ModalOverlay,Ui as ModalPortal,es as ModalRoot,vp as ModalTitle,mp as ModalTrigger,Kx as Muted,wb as NProgress,Xf as Navbar,qf as NavbarBrand,Zf as NavbarContent,Qf as NavbarItem,Jf as NavbarLink,um as NavigationMenu,bm as NavigationMenuContent,xm as NavigationMenuIndicator,pm as NavigationMenuItem,hm as NavigationMenuLink,mm as NavigationMenuList,gm as NavigationMenuTrigger,zi as NavigationMenuViewport,Ih as NotificationCenter,Ah as NotificationCenterContent,Qk as NotificationCenterProvider,Vh as NotificationCenterTrigger,oc as NotificationItem,zh as NotificationList,Rv as NumberField,Pp as NumberInput,tp as Pagination,np as PaginationContent,sp as PaginationEllipsis,rp as PaginationItem,Za as PaginationLink,ap as PaginationNext,op as PaginationPrevious,Vx as Paragraph,Cx as Parallax,kp as PasswordInput,Wf as PhoneInput,jb as PieChart,px as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,_a as Progress,ex as PullToRefresh,ux as Pulse,uv as QRCode,Cu as RadioGroup,Tu as RadioGroupItem,jv as RangeSlider,Vp as Rating,yw as ResizableHandle,xw as ResizablePanel,hw as ResizablePanelGroup,sv as RichTextEditor,lx as Ripple,sx as Rotate,rx as Scale,ke as ScrollArea,wx as ScrollProgress,Rx as ScrollReveal,Nh as SearchBar,Tv as SearchField,Tf as SegmentedControl,Mf as SegmentedControlItem,Aa as Select,jn as Separator,dx as Shake,Zd as Sheet,Jd as SheetClose,nu as SheetContent,su as SheetDescription,ou as SheetFooter,ru as SheetHeader,eu as SheetOverlay,Li as SheetPortal,au as SheetTitle,Qd as SheetTrigger,Nx as Shimmer,Ha as Skeleton,nx as Slide,Ua as Slider,Fx as Small,ab as Snippet,bT as SortableList,Lx as Sparkles,Na as Spinner,Lh as SpotlightSearch,sf as StatCard,Vv as StatusLight,Pg as Step,Ng as Steps,Zh as SwipeActions,bd as Switch,rb as TabbedCodeBlock,Um as Table,Wm as TableBody,Zm as TableCaption,qm as TableCell,_m as TableFooter,Xm as TableHead,jm as TableHeader,Ym as TableRow,Ud as Tabs,_d as TabsContent,jd as TabsList,Wd as TabsTrigger,Zv as TagGroup,ef as TagInput,Qy as TextBadge,vv as TextField,bx as TextReveal,vd as Textarea,mv as ThemeProvider,pv as ThemeToggle,kv as TimeField,zf as TimeInput,Lb as TimePicker,gf as Timeline,hf as TimelineContent,vf as TimelineItem,xf as TimelineOpposite,$0 as Toaster,Mu as Toggle,ku as ToggleGroup,Pu as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,Wn as TooltipProvider,Yn as TooltipTrigger,Vg as Tree,gx as Typewriter,$x as UL,Yg as User,AT as VirtualList,mx as Wiggle,vx as WordRotate,Av as actionBarVariants,Ev as actionGroupVariants,_h as actionSheetItemVariants,$y as alertVariants,cs as applyMask,zg as autocompleteInputVariants,Dp as avatarGroupVariants,rg as backTopVariants,_y as badgeIndicatorVariants,Oh as bannerVariants,Uh as bottomNavigationVariants,Jc as buttonGroupVariants,Xr as buttonVariants,I0 as calculatePasswordStrength,ad as cardVariants,Qb as carouselVariants,aa as chartContainerVariants,zp as chipVariants,Gp as circularProgressVariants,Cm as closeButtonVariants,u as cn,qg as codeVariants,ih as colorAreaVariants,ph as colorSliderVariants,Df as colorSwatchPickerVariants,Sf as colorSwatchVariants,gh as colorWheelVariants,Ql as contextualHelpTriggerVariants,Ob as copyButtonVariants,Of as currencyInputVariants,Mv as datePickerVariants,Yd as defaultPasswordRequirements,Om as drawerMenuButtonVariants,rv as emojiPickerVariants,nf as emptyStateVariants,fa as fabVariants,Nf as fileUploadVariants,el as formatCurrency,ma as formatDate,is as formatFileSize,ds as formatPhoneNumber,Kb as fullCalendarVariants,kf as getFileIcon,$f as getMaskPlaceholder,V0 as getPasswordStrengthColor,A0 as getPasswordStrengthLabel,th as gridListItemVariants,eh as gridListVariants,ch as hexToRgb,Zs as hsvToRgb,lv as imageCropperVariants,gl as imageVariants,Rl as infiniteScrollLoaderVariants,yl as infiniteScrollVariants,Wp as inputOTPVariants,gv as inputSizeVariants,Xb as kanbanBoardVariants,El as kanbanCardVariants,qb as kanbanColumnVariants,Ab as kbdVariants,bv as labelSizeVariants,yh as labeledValueGroupVariants,hh as labeledValueVariants,tg as linkVariants,cf as listItemVariants,qi as listVariants,$v as listViewItemVariants,Kv as listViewVariants,db as listboxItemVariants,cb as listboxVariants,xb as loadingOverlayVariants,Nb as loadingVariants,Kf as maskedInputVariants,oh as meterVariants,Gi as modalContentVariants,Yf as navbarVariants,vm as navigationMenuLinkStyle,fm as navigationMenuTriggerStyle,Rb as nprogressVariants,yv as numberFieldVariants,jl as parseDate,Bf as parseFormattedValue,vC as phoneInputVariants,Jh as pullToRefreshVariants,Ol as qrCodeVariants,Uv as rangeSliderVariants,Ip as ratingVariants,dh as rgbToHex,lh as rgbToHsv,av as richTextEditorVariants,Mh as searchBarVariants,Cv as searchFieldVariants,wf as segmentedControlItemVariants,Rf as segmentedControlVariants,Ld as selectVariants,tu as sheetVariants,xd as skeletonVariants,ob as snippetVariants,bb as sortableItemVariants,gb as sortableListVariants,Zc as spinnerVariants,af as statCardVariants,Iv as statusLightVariants,kg as stepVariants,Mg as stepsVariants,lc as swipeActionVariants,qh as swipeActionsVariants,La as switchColors,Jl as tagGroupItemVariants,qv as tagGroupVariants,Jp as tagVariants,Zy as textBadgeVariants,fv as textFieldVariants,IN as themeToggleVariants,Nv as timeFieldVariants,Af as timeInputVariants,bf as timelineItemVariants,ff as timelineVariants,$a as toggleVariants,Sg as treeItemVariants,Lg as treeVariants,nl as unmask,NL as useAnimatedValue,vy as useAsync,fL as useAsyncRetry,zE as useBodyScrollLock,ZE as useBooleanToggle,ZP as useBreakpoint,QP as useBreakpoints,vi as useButtonGroup,Is as useCarousel,fE as useClickOutside,gE as useClickOutsideMultiple,AP as useConfetti,vE as useCopy,bE as useCopyToClipboard,yL as useCountdown,JE as useCounter,qE as useCycle,sE as useDebounce,iE as useDebouncedCallback,lE as useDebouncedCallbackWithControls,CL as useDelayedValue,iy as useDisclosure,YE as useDisclosureOpen,GL as useDistance,DL as useDocumentIsVisible,Ey as useDocumentVisibility,HL as useDocumentVisibilityCallback,vR as useDrawer,jE as useElementSize,RE as useEventListener,wE as useEventListenerRef,bL as useFetch,bs as useFieldContext,HE as useFocusTrap,IE as useFocusTrapRef,ul as useFormContext,Hy as useFullscreen,BL as useFullscreenRef,$L as useGeolocation,hE as useHotkeys,xE as useHotkeysMap,ME as useHover,PE as useHoverDelay,kE as useHoverProps,NE as useHoverRef,PL as useIdle,EL as useIdleCallback,eL as useIncrementCounter,ry as useIntersectionObserver,BE as useIntersectionObserverRef,pi as useInterval,xL as useIntervalControls,$P as useIsDesktop,FP as useIsMobile,KP as useIsTablet,CE as useKeyPress,yE as useKeyPressed,eM as useKeyboardShortcut,FE as useLazyLoad,sL as useList,tE as useLocalStorage,TE as useLongPress,iL as useMap,WL as useMediaPermission,Do as useMediaQuery,LE as useMouse,SE as useMouseElement,DE as useMouseElementRef,vL as useMutation,KE as useMutationObserver,$E as useMutationObserverRef,Js as useNotificationCenter,jL as useNotificationPermission,IL as useOnlineStatus,VL as useOnlineStatusCallback,UL as usePermission,GP as usePrefersColorScheme,UP as usePrefersReducedMotion,tL as usePrevious,rL as usePreviousDistinct,nL as usePreviousWithInitial,uL as useQueue,ML as useRafLoop,lL as useRecord,GE as useResizeObserver,UE as useResizeObserverRef,ey as useScrollLock,VE as useScrollPosition,dL as useSelection,rE as useSessionStorage,py as useSet,XL as useSpeechRecognition,YL as useSpeechSynthesis,Uk as useSpotlight,kL as useSpringValue,mL as useStack,uE as useThrottle,mE as useThrottledCallback,Cy as useTimeout,wL as useTimeoutControls,TL as useTimeoutFlag,RL as useTimer,XE as useToggle,qP as useWindowHeight,AE as useWindowScroll,ha as useWindowSize,XP as useWindowWidth,_g as userVariants,Pf as validateFile,tT as validators,Sb as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
73
73
|
//# sourceMappingURL=index.js.map
|