@reeverdev/ui 0.2.47 → 0.2.49
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as Y from'react';import {createContext,useContext}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Loader2,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,EyeOff,Eye,Plus,Calendar,Heart,Star,PanelLeft,PanelLeftOpen,PanelLeftClose,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Copy,RefreshCw,CheckCircle,XCircle,HelpCircle,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,MoreVertical,ArrowRight,Hash,User,Settings,Bell,CheckCheck,Trash2,Image,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 {Slot}from'@radix-ui/react-slot';import*as yo from'@radix-ui/react-checkbox';import*as oe from'@radix-ui/react-dialog';import*as Zi from'@radix-ui/react-label';import*as No from'@radix-ui/react-separator';import*as Po from'@radix-ui/react-switch';import*as Qt from'@radix-ui/react-avatar';import*as xt from'@radix-ui/react-tooltip';import*as Td from'react-dom';import {createPortal}from'react-dom';import*as q from'@radix-ui/react-dropdown-menu';import*as yt from'@radix-ui/react-popover';import*as Rt from'@radix-ui/react-tabs';import*as Zf from'@radix-ui/react-visually-hidden';import {VisuallyHidden}from'@radix-ui/react-visually-hidden';import {Toaster}from'sonner';export{toast}from'sonner';import*as it from'@radix-ui/react-scroll-area';import*as Z from'@radix-ui/react-context-menu';import*as Vr from'@radix-ui/react-radio-group';import*as ls from'@radix-ui/react-toggle';import*as za from'@radix-ui/react-toggle-group';import*as ar from'@radix-ui/react-slider';import*as It from'@radix-ui/react-accordion';import*as ca from'@radix-ui/react-collapsible';import*as ko from'@radix-ui/react-progress';import*as ma from'@radix-ui/react-hover-card';import*as Ec from'@radix-ui/react-aspect-ratio';import*as xe from'@radix-ui/react-navigation-menu';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {format,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*as we from'@radix-ui/react-select';import*as X from'@radix-ui/react-menubar';import*as Se from'@radix-ui/react-alert-dialog';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 ZP from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import iC from'@tiptap/starter-kit';import sC from'@tiptap/extension-link';import lC from'@tiptap/extension-underline';import dC from'@tiptap/extension-text-align';import cC from'@tiptap/extension-placeholder';import LC,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import BC from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useSpring,useTransform,useScroll}from'framer-motion';import vo from'canvas-confetti';function o(...e){return twMerge(clsx(e))}var Bx=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"}}),Ox={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Gx=Y.forwardRef(({className:e,variant:t="solid",type:r="default",radius:a="md",icon:n,hideIcon:i=false,endContent:s,children:l,...d},m)=>{let u=Ox[r],c=!i,g=n!==void 0?n:u?jsx(u,{className:"h-4 w-4"}):null;return jsxs("div",{ref:m,role:"alert",className:o(Bx({variant:t,type:r,radius:a}),s&&"flex items-center justify-between",e),...d,children:[jsxs("div",{className:"flex items-start gap-3",children:[c&&g&&jsx("span",{className:"mt-0.5 shrink-0",children:g}),jsx("div",{children:l})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});Gx.displayName="Alert";var Wx=Y.forwardRef(({className:e,...t},r)=>jsx("h5",{ref:r,className:o("mb-1 font-medium leading-none tracking-tight",e),...t}));Wx.displayName="AlertTitle";var $x=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("text-sm [&_p]:leading-relaxed",e),...t}));$x.displayName="AlertDescription";var _x=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},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"}}),Kx={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},Yx=Y.forwardRef(({className:e,children:t,content:r,variant:a="solid",color:n="default",size:i="md",placement:s="top-right",isDot:l=false,...d},m)=>jsxs("div",{ref:m,className:o("relative inline-flex",e),...d,children:[t,jsx("span",{className:o(_x({variant:a,color:n,size:l?void 0:i,placement:s}),l&&Kx[i||"md"],l&&"min-w-0 p-0"),children:!l&&r})]}));Yx.displayName="Badge";var jx=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"}}),ji=Y.forwardRef(({className:e,color:t,size:r,...a},n)=>jsx("span",{ref:n,className:o(jx({color:t,size:r}),e),...a}));ji.displayName="TextBadge";var Jt=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-2 border-current 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-2 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",icon:"h-10 w-10"},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:"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 border-zinc-900 hover:bg-zinc-900 hover:text-white dark:text-white dark:border-white dark:hover:bg-white dark:hover:text-zinc-900"},{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:"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 border-green-600 hover:bg-green-600 hover:text-white dark:text-green-500 dark:border-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{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:"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 border-amber-600 hover:bg-amber-600 hover:text-white dark:text-amber-500 dark:border-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{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:"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 border-red-600 hover:bg-red-600 hover:text-white dark:text-red-500 dark:border-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{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:"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 border-blue-600 hover:bg-blue-600 hover:text-white dark:text-blue-500 dark:border-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),_=Y.forwardRef(({className:e,variant:t,color:r,size:a,radius:n,asChild:i=false,href:s,loading:l=false,startContent:d,endContent:m,children:u,disabled:c,style:g,...p},x)=>{let y=c||l,h=t==="bordered"?{borderColor:"currentColor",...g}:g,R=l?jsxs(Fragment,{children:[jsx(Loader2,{className:"animate-spin"}),u]}):jsxs(Fragment,{children:[d,u,m]});return i?jsx(Slot,{className:o(Jt({variant:t,color:r,size:a,radius:n,className:e})),ref:x,style:h,...p,children:R}):s?jsx("a",{href:s,className:o(Jt({variant:t,color:r,size:a,radius:n,className:e}),y&&"pointer-events-none opacity-50"),style:h,...p,children:R}):jsx("button",{className:o(Jt({variant:t,color:r,size:a,radius:n,className:e})),ref:x,disabled:y,style:h,...p,children:R})});_.displayName="Button";var nd=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),id=Y.forwardRef(({className:e,radius:t,...r},a)=>jsx("div",{ref:a,className:o(nd({radius:t,className:e})),...r}));id.displayName="Card";var sd=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("p-6 text-2xl font-semibold leading-none tracking-tight",e),...t}));sd.displayName="CardHeader";var ld=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("p-6 pt-0",e),...t}));ld.displayName="CardContent";var dd=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex items-center p-6 pt-0",e),...t}));dd.displayName="CardFooter";var Ro=Y.forwardRef(({className:e,checked:t,onFocus:r,onBlur:a,style:n,...i},s)=>{let[l,d]=Y.useState(false);return jsx(yo.Root,{ref:s,checked:t,className:o("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 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-background data-[state=indeterminate]:text-foreground transition-colors",e),style:{...n,borderColor:l?"var(--color-foreground)":void 0},onFocus:m=>{d(true),r?.(m);},onBlur:m=>{d(false),a?.(m);},...i,children:jsx(yo.Indicator,{className:o("flex items-center justify-center text-current"),children:t==="indeterminate"?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})})});Ro.displayName=yo.Root.displayName;var Xi=oe.Root,ry=oe.Trigger,cd=oe.Portal,ay=oe.Close,qi=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Overlay,{ref:r,className:o("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),...t}));qi.displayName=oe.Overlay.displayName;var pn=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(cd,{children:[jsx(qi,{}),jsxs(oe.Content,{ref:a,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,jsxs(oe.Close,{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 data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pn.displayName=oe.Content.displayName;var md=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});md.displayName="DialogHeader";var ud=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ud.displayName="DialogFooter";var pd=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Title,{ref:r,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));pd.displayName=oe.Title.displayName;var fd=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));fd.displayName=oe.Description.displayName;var ny=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 file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),gn=Y.forwardRef(({className:e,type:t,radius:r,onFocus:a,onBlur:n,style:i,...s},l)=>{let[d,m]=Y.useState(false);return jsx("input",{type:t,className:o(ny({radius:r,className:e})),ref:l,style:{...i,borderColor:d?"var(--color-foreground)":void 0},onFocus:u=>{m(true),a?.(u);},onBlur:u=>{m(false),n?.(u);},...s})});gn.displayName="Input";var ly=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ea=Y.forwardRef(({className:e,...t},r)=>jsx(Zi.Root,{ref:r,className:o(ly(),e),...t}));ea.displayName=Zi.Root.displayName;var kr=Y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,text:a,...n},i)=>a&&t==="horizontal"?jsxs("div",{className:o("flex items-center gap-4",e),children:[jsx(No.Root,{decorative:r,orientation:t,className:"shrink-0 bg-border h-[1px] flex-1",...n}),jsx("span",{className:"text-sm text-muted-foreground",children:a}),jsx(No.Root,{decorative:r,orientation:t,className:"shrink-0 bg-border h-[1px] flex-1",...n})]}):jsx(No.Root,{ref:i,decorative:r,orientation:t,className:o("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));kr.displayName=No.Root.displayName;var xd=Y.forwardRef(({className:e,...t},r)=>jsx(Po.Root,{className:o("peer inline-flex h-6 w-11 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 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:jsx(Po.Thumb,{className:o("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));xd.displayName=Po.Root.displayName;var uy=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-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),yd=Y.forwardRef(({className:e,radius:t,onFocus:r,onBlur:a,style:n,...i},s)=>{let[l,d]=Y.useState(false);return jsx("textarea",{className:o(uy({radius:t,className:e})),ref:s,style:{...n,borderColor:l?"var(--color-foreground)":void 0},onFocus:m=>{d(true),r?.(m);},onBlur:m=>{d(false),a?.(m);},...i})});yd.displayName="Textarea";var wd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),hn=Y.forwardRef(({className:e,variant:t,...r},a)=>jsx("div",{ref:a,className:o(wd({variant:t,className:e})),...r}));hn.displayName="Skeleton";var vy=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),ta=Y.forwardRef(({className:e,size:t,radius:r,...a},n)=>jsx(Qt.Root,{ref:n,className:o(vy({size:t,radius:r,className:e})),...a}));ta.displayName=Qt.Root.displayName;var Ha=Y.forwardRef(({className:e,...t},r)=>jsx(Qt.Image,{ref:r,className:o("aspect-square h-full w-full",e),...t}));Ha.displayName=Qt.Image.displayName;var ra=Y.forwardRef(({className:e,...t},r)=>jsx(Qt.Fallback,{ref:r,className:o("flex h-full w-full items-center justify-center bg-muted",e),...t}));ra.displayName=Qt.Fallback.displayName;var aa=xt.Provider,oa=xt.Root,na=xt.Trigger,Dr=Y.forwardRef(({className:e,sideOffset:t=4,...r},a)=>jsx(xt.Portal,{children:jsx(xt.Content,{ref:a,sideOffset:t,className:o("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 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Dr.displayName=xt.Content.displayName;var Sd=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),kd=Y.forwardRef(({options:e,multiple:t=false,value:r,defaultValue:a,onValueChange:n,placeholder:i="Select...",searchable:s=false,searchPlaceholder:l="Search...",emptyText:d="No results found.",disabled:m=false,clearable:u=false,maxDisplayItems:c=3,radius:g,className:p,...x},y)=>{let[f,h]=Y.useState(false),[R,b]=Y.useState(""),[v,P]=Y.useState(a||""),[w,S]=Y.useState(a||[]),[C,M]=Y.useState({top:0,left:0,width:0}),N=Y.useRef(null),T=Y.useRef(null),k=Y.useRef(null),L=Y.useRef(null),I=r!==void 0?r:v,V=r!==void 0?r:w,D=r!==void 0,E=A=>{u&&I===A?(D||P(""),n?.("")):(D||P(A),n?.(A)),h(false),b("");},B=A=>{let z=V.includes(A)?V.filter(ee=>ee!==A):[...V,A];D||S(z),n?.(z);},W=(A,z)=>{z.stopPropagation();let ee=V.filter(J=>J!==A);D||S(ee),n?.(ee);},H=A=>{A.stopPropagation(),t?(D||S([]),n?.([])):(D||P(""),n?.(""));},U=e.find(A=>A.value===I),$=e.filter(A=>V.includes(A.value)),Pe=$.slice(0,c),ie=$.length-c,F=s?e.filter(A=>A.label.toLowerCase().includes(R.toLowerCase())):e;Y.useEffect(()=>{if(f&&T.current){let A=T.current.getBoundingClientRect();M({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>L.current?.focus(),0);}f||b("");},[f,s]),Y.useEffect(()=>{let A=z=>{let ee=z.target,J=N.current&&!N.current.contains(ee),Ue=k.current&&!k.current.contains(ee);J&&Ue&&(h(false),b(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),Y.useEffect(()=>{if(!f)return;let A=z=>{k.current?.contains(z.target)||(h(false),b(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[f]);let O=t?V.length>0:!!I;return jsxs("div",{ref:N,className:o("relative",p),...x,children:[jsxs("div",{ref:A=>{T.current=A,typeof y=="function"?y(A):y&&(y.current=A);},role:"combobox","aria-expanded":f,"aria-haspopup":"listbox","aria-disabled":m,onClick:()=>!m&&h(!f),className:o(Sd({radius:g}),t&&"flex-wrap gap-1",m&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:o(!U&&"text-muted-foreground"),children:U?U.label:i}),t&&jsx(Fragment,{children:$.length===0?jsx("span",{className:"text-muted-foreground",children:i}):jsxs(Fragment,{children:[Pe.map(A=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsx("span",{role:"button",tabIndex:0,onClick:z=>W(A.value,z),onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&W(A.value,z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},A.value)),ie>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",ie," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[u&&O&&jsx("span",{role:"button",tabIndex:0,onClick:H,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&H(A);},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:o("h-4 w-4 opacity-50 transition-transform",f&&"rotate-180")})]})]}),f&&!m&&typeof document<"u"&&Td.createPortal(jsxs("div",{ref:k,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:C.top,left:C.left,minWidth:C.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:L,type:"text",value:R,onChange:A=>b(A.target.value),placeholder:l,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx("div",{className:"max-h-[240px] overflow-y-auto overscroll-contain p-1",onWheel:A=>A.stopPropagation(),children:F.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:d}):F.map(A=>{let z=t?V.includes(A.value):I===A.value;return jsxs("div",{role:"option","aria-selected":z,onClick:()=>{A.disabled||(t?B(A.value):E(A.value));},className:o("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[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"})}),A.label]},A.value)})})]}),document.body)]})});kd.displayName="Select";var ia=q.Root,sa=q.Trigger,Cy=q.Group,My=q.Portal,Ty=q.Sub,Sy=q.RadioGroup,Dd=Y.forwardRef(({className:e,inset:t,children:r,...a},n)=>jsxs(q.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[r,jsx(ChevronRight,{className:"ml-auto"})]}));Dd.displayName=q.SubTrigger.displayName;var Ld=Y.forwardRef(({className:e,...t},r)=>jsx(q.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ld.displayName=q.SubContent.displayName;var Lr=Y.forwardRef(({className:e,sideOffset:t=4,...r},a)=>jsx(q.Portal,{children:jsx(q.Content,{ref:a,sideOffset:t,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Lr.displayName=q.Content.displayName;var Lt=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(q.Item,{ref:a,className:o("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));Lt.displayName=q.Item.displayName;var Vd=Y.forwardRef(({className:e,children:t,checked:r,...a},n)=>jsxs(q.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(q.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));Vd.displayName=q.CheckboxItem.displayName;var Id=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(q.RadioItem,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(q.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Id.displayName=q.RadioItem.displayName;var Ed=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(q.Label,{ref:a,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Ed.displayName=q.Label.displayName;var yn=Y.forwardRef(({className:e,...t},r)=>jsx(q.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));yn.displayName=q.Separator.displayName;var Hd=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest opacity-60",e),...t});Hd.displayName="DropdownMenuShortcut";var Ie=yt.Root,$e=yt.Trigger,es=yt.Anchor,Me=Y.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},n)=>jsx(yt.Portal,{children:jsx(yt.Content,{ref:n,align:t,sideOffset:r,className:o("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...a})}));Me.displayName=yt.Content.displayName;var Fd=Y.createContext({variant:"solid",radius:"md"}),Bd=()=>Y.useContext(Fd),Od=Y.forwardRef(({variant:e="solid",radius:t="md",...r},a)=>jsx(Fd.Provider,{value:{variant:e,radius:t},children:jsx(Rt.Root,{ref:a,...r})}));Od.displayName="Tabs";var ts={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"}},Gd=Y.forwardRef(({className:e,...t},r)=>{let{variant:a,radius:n}=Bd(),i=Y.useRef(null),[s,l]=Y.useState({opacity:0});Y.useEffect(()=>{let p=i.current;if(!p)return;let x=()=>{let h=p.querySelector('[data-state="active"]');if(h){let R=p.getBoundingClientRect(),b=h.getBoundingClientRect(),v=p.getAttribute("aria-orientation")==="vertical"||window.getComputedStyle(p).flexDirection==="column";a==="underline"?l(v?{width:2,height:b.height,transform:`translateY(${b.top-R.top}px)`,opacity:1}:{width:b.width,height:2,transform:`translateX(${b.left-R.left}px)`,opacity:1}):a==="solid"&&l(v?{width:b.width,height:b.height,transform:`translateY(${b.top-R.top}px)`,opacity:1}:{width:b.width,height:b.height,transform:`translateX(${b.left-R.left}px)`,opacity:1});}};x();let y=new MutationObserver(x);y.observe(p,{attributes:true,subtree:true,attributeFilter:["data-state"]});let f=new ResizeObserver(x);return f.observe(p),()=>{y.disconnect(),f.disconnect();}},[a]);let d={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",outline:"bg-transparent p-0 gap-1 !rounded-none"},m=()=>{let p=i.current;return p?p.getAttribute("aria-orientation")==="vertical"||window.getComputedStyle(p).flexDirection==="column":false},[u,c]=Y.useState(false);Y.useEffect(()=>{c(m());},[]);let g=()=>a==="solid"?u?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":a==="underline"?u?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs(Rt.List,{ref:p=>{if(i.current=p,typeof r=="function"?r(p):r&&(r.current=p),p){let x=p.getAttribute("aria-orientation")==="vertical"||window.getComputedStyle(p).flexDirection==="column";c(x);}},className:o("relative inline-flex h-9 items-center justify-center text-muted-foreground",ts[n].list,d[a],e),...t,children:[(a==="solid"||a==="underline")&&jsx("span",{className:o("absolute transition-all duration-200 ease-out",ts[n].indicator,g()),style:s,"aria-hidden":"true"}),t.children]})});Gd.displayName=Rt.List.displayName;var Wd=Y.forwardRef(({className:e,...t},r)=>{let{variant:a,radius:n}=Bd(),i={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",outline:"border border-transparent data-[state=active]:border-border data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx(Rt.Trigger,{ref:r,className:o("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",ts[n].trigger,i[a],e),...t})});Wd.displayName=Rt.Trigger.displayName;var $d=Y.forwardRef(({className:e,...t},r)=>jsx(Rt.Content,{ref:r,className:o("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 animate-in animate-out",e),...t}));$d.displayName=Rt.Content.displayName;var To=oe.Root,Iy=oe.Trigger,Ey=oe.Close,_d=oe.Portal,as=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Overlay,{className:o("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),...t,ref:r}));as.displayName=oe.Overlay.displayName;var Kd=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Aa=Y.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:a,...n},i)=>jsxs(_d,{children:[jsx(as,{}),jsxs(oe.Content,{ref:i,className:o(Kd({side:e}),t),"aria-describedby":void 0,...n,children:[jsx(VisuallyHidden,{asChild:true,children:jsx(oe.Title,{children:"Sheet"})}),!a&&jsxs(oe.Close,{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 data-[state=open]:bg-secondary",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));Aa.displayName=oe.Content.displayName;var Yd=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yd.displayName="SheetHeader";var jd=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jd.displayName="SheetFooter";var Ud=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Title,{ref:r,className:o("text-lg font-semibold text-foreground",e),...t}));Ud.displayName=oe.Title.displayName;var Xd=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));Xd.displayName=oe.Description.displayName;var zy=({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 ze=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(it.Root,{ref:a,className:o("relative overflow-hidden group/scroll",e),...r,children:[jsx(it.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),jsx(ns,{}),jsx(it.Corner,{})]}));ze.displayName=it.Root.displayName;var ns=Y.forwardRef(({className:e,orientation:t="vertical",...r},a)=>jsx(it.ScrollAreaScrollbar,{ref:a,orientation:t,className:o("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-[1px]",e),...r,children:jsx(it.ScrollAreaThumb,{className:o("relative flex-1 rounded-full transition-colors","bg-transparent group-hover/scroll:bg-border hover:!bg-muted-foreground")})}));ns.displayName=it.ScrollAreaScrollbar.displayName;var $y=Z.Root,_y=Z.Trigger,Ky=Z.Group,Yy=Z.Portal,jy=Z.Sub,Uy=Z.RadioGroup,qd=Y.forwardRef(({className:e,inset:t,children:r,...a},n)=>jsxs(Z.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));qd.displayName=Z.SubTrigger.displayName;var Zd=Y.forwardRef(({className:e,...t},r)=>jsx(Z.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t}));Zd.displayName=Z.SubContent.displayName;var Jd=Y.forwardRef(({className:e,...t},r)=>jsx(Z.Portal,{children:jsx(Z.Content,{ref:r,className:o("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t})}));Jd.displayName=Z.Content.displayName;var Qd=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(Z.Item,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));Qd.displayName=Z.Item.displayName;var ec=Y.forwardRef(({className:e,children:t,checked:r,...a},n)=>jsxs(Z.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(Z.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));ec.displayName=Z.CheckboxItem.displayName;var tc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(Z.RadioItem,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(Z.ItemIndicator,{children:jsx(Circle,{className:"h-4 w-4 fill-current"})})}),t]}));tc.displayName=Z.RadioItem.displayName;var rc=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(Z.Label,{ref:a,className:o("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...r}));rc.displayName=Z.Label.displayName;var ac=Y.forwardRef(({className:e,...t},r)=>jsx(Z.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-border",e),...t}));ac.displayName=Z.Separator.displayName;var oc=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});oc.displayName="ContextMenuShortcut";var nc=Y.forwardRef(({className:e,...t},r)=>jsx(Vr.Root,{className:o("grid gap-2",e),...t,ref:r}));nc.displayName=Vr.Root.displayName;var ic=Y.forwardRef(({className:e,...t},r)=>jsx(Vr.Item,{ref:r,className:o("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",e),...t,children:jsx(Vr.Indicator,{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ic.displayName=Vr.Item.displayName;var wn=cva("inline-flex items-center justify-center rounded-md text-sm font-medium 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 [&_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",outline:"border border-input 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"}}),lc=Y.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsx(ls.Root,{ref:n,className:o(wn({variant:t,size:r,className:e})),...a}));lc.displayName=ls.Root.displayName;var dc=Y.createContext({size:"md",variant:"solid"}),cc=Y.forwardRef(({className:e,variant:t,size:r,children:a,...n},i)=>jsx(za.Root,{ref:i,className:o("flex items-center justify-center gap-1",e),...n,children:jsx(dc.Provider,{value:{variant:t,size:r},children:a})}));cc.displayName=za.Root.displayName;var mc=Y.forwardRef(({className:e,children:t,variant:r,size:a,...n},i)=>{let s=Y.useContext(dc);return jsx(za.Item,{ref:i,className:o(wn({variant:s.variant||r,size:s.size||a}),e),...n,children:t})});mc.displayName=za.Item.displayName;var Nn=Y.forwardRef(({className:e,...t},r)=>jsxs(ar.Root,{ref:r,className:o("relative flex w-full touch-none select-none items-center",e),...t,children:[jsx(ar.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsx(ar.Range,{className:"absolute h-full bg-primary"})}),jsx(ar.Thumb,{className:"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 disabled:pointer-events-none disabled:opacity-50"})]}));Nn.displayName=ar.Root.displayName;var e0=`
|
|
1
|
+
import*as Y from'react';import {createContext,useContext}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Loader2,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,EyeOff,Eye,Plus,Calendar,Heart,Star,PanelLeft,PanelLeftOpen,PanelLeftClose,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Copy,RefreshCw,CheckCircle,XCircle,HelpCircle,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,MoreVertical,ArrowRight,Hash,User,Settings,Bell,CheckCheck,Trash2,Image,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 {Slot}from'@radix-ui/react-slot';import*as yo from'@radix-ui/react-checkbox';import*as oe from'@radix-ui/react-dialog';import*as Zi from'@radix-ui/react-label';import*as No from'@radix-ui/react-separator';import*as Po from'@radix-ui/react-switch';import*as Qt from'@radix-ui/react-avatar';import*as xt from'@radix-ui/react-tooltip';import*as Td from'react-dom';import {createPortal}from'react-dom';import*as it from'@radix-ui/react-scroll-area';import*as q from'@radix-ui/react-dropdown-menu';import*as yt from'@radix-ui/react-popover';import*as Rt from'@radix-ui/react-tabs';import*as Zf from'@radix-ui/react-visually-hidden';import {VisuallyHidden}from'@radix-ui/react-visually-hidden';import {Toaster}from'sonner';export{toast}from'sonner';import*as Z from'@radix-ui/react-context-menu';import*as Vr from'@radix-ui/react-radio-group';import*as ls from'@radix-ui/react-toggle';import*as za from'@radix-ui/react-toggle-group';import*as ar from'@radix-ui/react-slider';import*as It from'@radix-ui/react-accordion';import*as ca from'@radix-ui/react-collapsible';import*as ko from'@radix-ui/react-progress';import*as ma from'@radix-ui/react-hover-card';import*as Ec from'@radix-ui/react-aspect-ratio';import*as xe from'@radix-ui/react-navigation-menu';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {format,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*as we from'@radix-ui/react-select';import*as X from'@radix-ui/react-menubar';import*as ke from'@radix-ui/react-alert-dialog';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 ZP from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import iC from'@tiptap/starter-kit';import sC from'@tiptap/extension-link';import lC from'@tiptap/extension-underline';import dC from'@tiptap/extension-text-align';import cC from'@tiptap/extension-placeholder';import LC,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import BC from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useSpring,useTransform,useScroll}from'framer-motion';import vo from'canvas-confetti';function o(...e){return twMerge(clsx(e))}var Bx=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"}}),Ox={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Gx=Y.forwardRef(({className:e,variant:t="solid",type:r="default",radius:a="md",icon:n,hideIcon:i=false,endContent:s,children:l,...d},m)=>{let u=Ox[r],c=!i,g=n!==void 0?n:u?jsx(u,{className:"h-4 w-4"}):null;return jsxs("div",{ref:m,role:"alert",className:o(Bx({variant:t,type:r,radius:a}),s&&"flex items-center justify-between",e),...d,children:[jsxs("div",{className:"flex items-start gap-3",children:[c&&g&&jsx("span",{className:"mt-0.5 shrink-0",children:g}),jsx("div",{children:l})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});Gx.displayName="Alert";var Wx=Y.forwardRef(({className:e,...t},r)=>jsx("h5",{ref:r,className:o("mb-1 font-medium leading-none tracking-tight",e),...t}));Wx.displayName="AlertTitle";var $x=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("text-sm [&_p]:leading-relaxed",e),...t}));$x.displayName="AlertDescription";var _x=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},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"}}),Kx={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},Yx=Y.forwardRef(({className:e,children:t,content:r,variant:a="solid",color:n="default",size:i="md",placement:s="top-right",isDot:l=false,...d},m)=>jsxs("div",{ref:m,className:o("relative inline-flex",e),...d,children:[t,jsx("span",{className:o(_x({variant:a,color:n,size:l?void 0:i,placement:s}),l&&Kx[i||"md"],l&&"min-w-0 p-0"),children:!l&&r})]}));Yx.displayName="Badge";var jx=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"}}),ji=Y.forwardRef(({className:e,color:t,size:r,...a},n)=>jsx("span",{ref:n,className:o(jx({color:t,size:r}),e),...a}));ji.displayName="TextBadge";var Jt=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-2 border-current 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-2 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",icon:"h-10 w-10"},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:"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 border-zinc-900 hover:bg-zinc-900 hover:text-white dark:text-white dark:border-white dark:hover:bg-white dark:hover:text-zinc-900"},{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:"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 border-green-600 hover:bg-green-600 hover:text-white dark:text-green-500 dark:border-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{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:"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 border-amber-600 hover:bg-amber-600 hover:text-white dark:text-amber-500 dark:border-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{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:"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 border-red-600 hover:bg-red-600 hover:text-white dark:text-red-500 dark:border-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{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:"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 border-blue-600 hover:bg-blue-600 hover:text-white dark:text-blue-500 dark:border-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),_=Y.forwardRef(({className:e,variant:t,color:r,size:a,radius:n,asChild:i=false,href:s,loading:l=false,startContent:d,endContent:m,children:u,disabled:c,style:g,...p},x)=>{let y=c||l,h=t==="bordered"?{borderColor:"currentColor",...g}:g,R=l?jsxs(Fragment,{children:[jsx(Loader2,{className:"animate-spin"}),u]}):jsxs(Fragment,{children:[d,u,m]});return i?jsx(Slot,{className:o(Jt({variant:t,color:r,size:a,radius:n,className:e})),ref:x,style:h,...p,children:R}):s?jsx("a",{href:s,className:o(Jt({variant:t,color:r,size:a,radius:n,className:e}),y&&"pointer-events-none opacity-50"),style:h,...p,children:R}):jsx("button",{className:o(Jt({variant:t,color:r,size:a,radius:n,className:e})),ref:x,disabled:y,style:h,...p,children:R})});_.displayName="Button";var nd=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),id=Y.forwardRef(({className:e,radius:t,...r},a)=>jsx("div",{ref:a,className:o(nd({radius:t,className:e})),...r}));id.displayName="Card";var sd=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("p-6 text-2xl font-semibold leading-none tracking-tight",e),...t}));sd.displayName="CardHeader";var ld=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("p-6 pt-0",e),...t}));ld.displayName="CardContent";var dd=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex items-center p-6 pt-0",e),...t}));dd.displayName="CardFooter";var Ro=Y.forwardRef(({className:e,checked:t,onFocus:r,onBlur:a,style:n,...i},s)=>{let[l,d]=Y.useState(false);return jsx(yo.Root,{ref:s,checked:t,className:o("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 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-background data-[state=indeterminate]:text-foreground transition-colors",e),style:{...n,borderColor:l?"var(--color-foreground)":void 0},onFocus:m=>{d(true),r?.(m);},onBlur:m=>{d(false),a?.(m);},...i,children:jsx(yo.Indicator,{className:o("flex items-center justify-center text-current"),children:t==="indeterminate"?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})})});Ro.displayName=yo.Root.displayName;var Xi=oe.Root,ry=oe.Trigger,cd=oe.Portal,ay=oe.Close,qi=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Overlay,{ref:r,className:o("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),...t}));qi.displayName=oe.Overlay.displayName;var pn=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(cd,{children:[jsx(qi,{}),jsxs(oe.Content,{ref:a,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,jsxs(oe.Close,{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 data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pn.displayName=oe.Content.displayName;var md=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});md.displayName="DialogHeader";var ud=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ud.displayName="DialogFooter";var pd=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Title,{ref:r,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));pd.displayName=oe.Title.displayName;var fd=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));fd.displayName=oe.Description.displayName;var ny=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 file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),gn=Y.forwardRef(({className:e,type:t,radius:r,onFocus:a,onBlur:n,style:i,...s},l)=>{let[d,m]=Y.useState(false);return jsx("input",{type:t,className:o(ny({radius:r,className:e})),ref:l,style:{...i,borderColor:d?"var(--color-foreground)":void 0},onFocus:u=>{m(true),a?.(u);},onBlur:u=>{m(false),n?.(u);},...s})});gn.displayName="Input";var ly=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ea=Y.forwardRef(({className:e,...t},r)=>jsx(Zi.Root,{ref:r,className:o(ly(),e),...t}));ea.displayName=Zi.Root.displayName;var kr=Y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,text:a,...n},i)=>a&&t==="horizontal"?jsxs("div",{className:o("flex items-center gap-4",e),children:[jsx(No.Root,{decorative:r,orientation:t,className:"shrink-0 bg-border h-[1px] flex-1",...n}),jsx("span",{className:"text-sm text-muted-foreground",children:a}),jsx(No.Root,{decorative:r,orientation:t,className:"shrink-0 bg-border h-[1px] flex-1",...n})]}):jsx(No.Root,{ref:i,decorative:r,orientation:t,className:o("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));kr.displayName=No.Root.displayName;var xd=Y.forwardRef(({className:e,...t},r)=>jsx(Po.Root,{className:o("peer inline-flex h-6 w-11 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 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:jsx(Po.Thumb,{className:o("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));xd.displayName=Po.Root.displayName;var uy=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-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),yd=Y.forwardRef(({className:e,radius:t,onFocus:r,onBlur:a,style:n,...i},s)=>{let[l,d]=Y.useState(false);return jsx("textarea",{className:o(uy({radius:t,className:e})),ref:s,style:{...n,borderColor:l?"var(--color-foreground)":void 0},onFocus:m=>{d(true),r?.(m);},onBlur:m=>{d(false),a?.(m);},...i})});yd.displayName="Textarea";var wd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),hn=Y.forwardRef(({className:e,variant:t,...r},a)=>jsx("div",{ref:a,className:o(wd({variant:t,className:e})),...r}));hn.displayName="Skeleton";var vy=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),ta=Y.forwardRef(({className:e,size:t,radius:r,...a},n)=>jsx(Qt.Root,{ref:n,className:o(vy({size:t,radius:r,className:e})),...a}));ta.displayName=Qt.Root.displayName;var Ha=Y.forwardRef(({className:e,...t},r)=>jsx(Qt.Image,{ref:r,className:o("aspect-square h-full w-full",e),...t}));Ha.displayName=Qt.Image.displayName;var ra=Y.forwardRef(({className:e,...t},r)=>jsx(Qt.Fallback,{ref:r,className:o("flex h-full w-full items-center justify-center bg-muted",e),...t}));ra.displayName=Qt.Fallback.displayName;var aa=xt.Provider,oa=xt.Root,na=xt.Trigger,Dr=Y.forwardRef(({className:e,sideOffset:t=4,...r},a)=>jsx(xt.Portal,{children:jsx(xt.Content,{ref:a,sideOffset:t,className:o("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 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Dr.displayName=xt.Content.displayName;var Me=Y.forwardRef(({className:e,viewportClassName:t,children:r,...a},n)=>jsxs(it.Root,{ref:n,className:o("relative overflow-hidden group/scroll",e),...a,children:[jsx(it.Viewport,{className:o("h-full w-full rounded-[inherit]",t),children:r}),jsx(es,{}),jsx(it.Corner,{})]}));Me.displayName=it.Root.displayName;var es=Y.forwardRef(({className:e,orientation:t="vertical",...r},a)=>jsx(it.ScrollAreaScrollbar,{ref:a,orientation:t,className:o("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-[1px]",e),...r,children:jsx(it.ScrollAreaThumb,{className:o("relative flex-1 rounded-full transition-colors","bg-transparent group-hover/scroll:bg-border hover:!bg-muted-foreground")})}));es.displayName=it.ScrollAreaScrollbar.displayName;var Sd=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),kd=Y.forwardRef(({options:e,multiple:t=false,value:r,defaultValue:a,onValueChange:n,placeholder:i="Select...",searchable:s=false,searchPlaceholder:l="Search...",emptyText:d="No results found.",disabled:m=false,clearable:u=false,maxDisplayItems:c=3,radius:g,className:p,...x},y)=>{let[f,h]=Y.useState(false),[R,b]=Y.useState(""),[v,P]=Y.useState(a||""),[w,S]=Y.useState(a||[]),[C,M]=Y.useState({top:0,left:0,width:0}),N=Y.useRef(null),T=Y.useRef(null),k=Y.useRef(null),L=Y.useRef(null),I=r!==void 0?r:v,V=r!==void 0?r:w,D=r!==void 0,E=A=>{u&&I===A?(D||P(""),n?.("")):(D||P(A),n?.(A)),h(false),b("");},B=A=>{let z=V.includes(A)?V.filter(ee=>ee!==A):[...V,A];D||S(z),n?.(z);},W=(A,z)=>{z.stopPropagation();let ee=V.filter(J=>J!==A);D||S(ee),n?.(ee);},H=A=>{A.stopPropagation(),t?(D||S([]),n?.([])):(D||P(""),n?.(""));},U=e.find(A=>A.value===I),$=e.filter(A=>V.includes(A.value)),Pe=$.slice(0,c),ie=$.length-c,F=s?e.filter(A=>A.label.toLowerCase().includes(R.toLowerCase())):e;Y.useEffect(()=>{if(f&&T.current){let A=T.current.getBoundingClientRect();M({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>L.current?.focus(),0);}f||b("");},[f,s]),Y.useEffect(()=>{let A=z=>{let ee=z.target,J=N.current&&!N.current.contains(ee),Xe=k.current&&!k.current.contains(ee);J&&Xe&&(h(false),b(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),Y.useEffect(()=>{if(!f)return;let A=z=>{k.current?.contains(z.target)||(h(false),b(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[f]);let O=t?V.length>0:!!I;return jsxs("div",{ref:N,className:o("relative",p),...x,children:[jsxs("div",{ref:A=>{T.current=A,typeof y=="function"?y(A):y&&(y.current=A);},role:"combobox","aria-expanded":f,"aria-haspopup":"listbox","aria-disabled":m,onClick:()=>!m&&h(!f),className:o(Sd({radius:g}),t&&"flex-wrap gap-1",m&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:o(!U&&"text-muted-foreground"),children:U?U.label:i}),t&&jsx(Fragment,{children:$.length===0?jsx("span",{className:"text-muted-foreground",children:i}):jsxs(Fragment,{children:[Pe.map(A=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsx("span",{role:"button",tabIndex:0,onClick:z=>W(A.value,z),onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&W(A.value,z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},A.value)),ie>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",ie," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[u&&O&&jsx("span",{role:"button",tabIndex:0,onClick:H,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&H(A);},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:o("h-4 w-4 opacity-50 transition-transform",f&&"rotate-180")})]})]}),f&&!m&&typeof document<"u"&&Td.createPortal(jsxs("div",{ref:k,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:C.top,left:C.left,minWidth:C.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:L,type:"text",value:R,onChange:A=>b(A.target.value),placeholder:l,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(Me,{viewportClassName:"max-h-[240px]",onWheel:A=>A.stopPropagation(),children:jsx("div",{className:"p-1",children:F.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:d}):F.map(A=>{let z=t?V.includes(A.value):I===A.value;return jsxs("div",{role:"option","aria-selected":z,onClick:()=>{A.disabled||(t?B(A.value):E(A.value));},className:o("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[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"})}),A.label]},A.value)})})})]}),document.body)]})});kd.displayName="Select";var ia=q.Root,sa=q.Trigger,My=q.Group,Ty=q.Portal,Sy=q.Sub,ky=q.RadioGroup,Dd=Y.forwardRef(({className:e,inset:t,children:r,...a},n)=>jsxs(q.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[r,jsx(ChevronRight,{className:"ml-auto"})]}));Dd.displayName=q.SubTrigger.displayName;var Ld=Y.forwardRef(({className:e,...t},r)=>jsx(q.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ld.displayName=q.SubContent.displayName;var Lr=Y.forwardRef(({className:e,sideOffset:t=4,...r},a)=>jsx(q.Portal,{children:jsx(q.Content,{ref:a,sideOffset:t,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Lr.displayName=q.Content.displayName;var Lt=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(q.Item,{ref:a,className:o("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));Lt.displayName=q.Item.displayName;var Vd=Y.forwardRef(({className:e,children:t,checked:r,...a},n)=>jsxs(q.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(q.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));Vd.displayName=q.CheckboxItem.displayName;var Id=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(q.RadioItem,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(q.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Id.displayName=q.RadioItem.displayName;var Ed=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(q.Label,{ref:a,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Ed.displayName=q.Label.displayName;var yn=Y.forwardRef(({className:e,...t},r)=>jsx(q.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));yn.displayName=q.Separator.displayName;var Hd=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest opacity-60",e),...t});Hd.displayName="DropdownMenuShortcut";var Ee=yt.Root,_e=yt.Trigger,rs=yt.Anchor,Te=Y.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},n)=>jsx(yt.Portal,{children:jsx(yt.Content,{ref:n,align:t,sideOffset:r,className:o("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...a})}));Te.displayName=yt.Content.displayName;var Fd=Y.createContext({variant:"solid",radius:"md"}),Bd=()=>Y.useContext(Fd),Od=Y.forwardRef(({variant:e="solid",radius:t="md",...r},a)=>jsx(Fd.Provider,{value:{variant:e,radius:t},children:jsx(Rt.Root,{ref:a,...r})}));Od.displayName="Tabs";var as={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"}},Gd=Y.forwardRef(({className:e,...t},r)=>{let{variant:a,radius:n}=Bd(),i=Y.useRef(null),[s,l]=Y.useState({opacity:0});Y.useEffect(()=>{let p=i.current;if(!p)return;let x=()=>{let h=p.querySelector('[data-state="active"]');if(h){let R=p.getBoundingClientRect(),b=h.getBoundingClientRect(),v=p.getAttribute("aria-orientation")==="vertical"||window.getComputedStyle(p).flexDirection==="column";a==="underline"?l(v?{width:2,height:b.height,transform:`translateY(${b.top-R.top}px)`,opacity:1}:{width:b.width,height:2,transform:`translateX(${b.left-R.left}px)`,opacity:1}):a==="solid"&&l(v?{width:b.width,height:b.height,transform:`translateY(${b.top-R.top}px)`,opacity:1}:{width:b.width,height:b.height,transform:`translateX(${b.left-R.left}px)`,opacity:1});}};x();let y=new MutationObserver(x);y.observe(p,{attributes:true,subtree:true,attributeFilter:["data-state"]});let f=new ResizeObserver(x);return f.observe(p),()=>{y.disconnect(),f.disconnect();}},[a]);let d={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",outline:"bg-transparent p-0 gap-1 !rounded-none"},m=()=>{let p=i.current;return p?p.getAttribute("aria-orientation")==="vertical"||window.getComputedStyle(p).flexDirection==="column":false},[u,c]=Y.useState(false);Y.useEffect(()=>{c(m());},[]);let g=()=>a==="solid"?u?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":a==="underline"?u?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs(Rt.List,{ref:p=>{if(i.current=p,typeof r=="function"?r(p):r&&(r.current=p),p){let x=p.getAttribute("aria-orientation")==="vertical"||window.getComputedStyle(p).flexDirection==="column";c(x);}},className:o("relative inline-flex h-9 items-center justify-center text-muted-foreground",as[n].list,d[a],e),...t,children:[(a==="solid"||a==="underline")&&jsx("span",{className:o("absolute transition-all duration-200 ease-out",as[n].indicator,g()),style:s,"aria-hidden":"true"}),t.children]})});Gd.displayName=Rt.List.displayName;var Wd=Y.forwardRef(({className:e,...t},r)=>{let{variant:a,radius:n}=Bd(),i={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",outline:"border border-transparent data-[state=active]:border-border data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx(Rt.Trigger,{ref:r,className:o("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",as[n].trigger,i[a],e),...t})});Wd.displayName=Rt.Trigger.displayName;var $d=Y.forwardRef(({className:e,...t},r)=>jsx(Rt.Content,{ref:r,className:o("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 animate-in animate-out",e),...t}));$d.displayName=Rt.Content.displayName;var So=oe.Root,Ey=oe.Trigger,Hy=oe.Close,_d=oe.Portal,ns=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Overlay,{className:o("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),...t,ref:r}));ns.displayName=oe.Overlay.displayName;var Kd=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Aa=Y.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:a,...n},i)=>jsxs(_d,{children:[jsx(ns,{}),jsxs(oe.Content,{ref:i,className:o(Kd({side:e}),t),"aria-describedby":void 0,...n,children:[jsx(VisuallyHidden,{asChild:true,children:jsx(oe.Title,{children:"Sheet"})}),!a&&jsxs(oe.Close,{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 data-[state=open]:bg-secondary",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));Aa.displayName=oe.Content.displayName;var Yd=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yd.displayName="SheetHeader";var jd=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jd.displayName="SheetFooter";var Ud=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Title,{ref:r,className:o("text-lg font-semibold text-foreground",e),...t}));Ud.displayName=oe.Title.displayName;var Xd=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));Xd.displayName=oe.Description.displayName;var Fy=({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 $y=Z.Root,_y=Z.Trigger,Ky=Z.Group,Yy=Z.Portal,jy=Z.Sub,Uy=Z.RadioGroup,qd=Y.forwardRef(({className:e,inset:t,children:r,...a},n)=>jsxs(Z.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));qd.displayName=Z.SubTrigger.displayName;var Zd=Y.forwardRef(({className:e,...t},r)=>jsx(Z.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t}));Zd.displayName=Z.SubContent.displayName;var Jd=Y.forwardRef(({className:e,...t},r)=>jsx(Z.Portal,{children:jsx(Z.Content,{ref:r,className:o("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t})}));Jd.displayName=Z.Content.displayName;var Qd=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(Z.Item,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));Qd.displayName=Z.Item.displayName;var ec=Y.forwardRef(({className:e,children:t,checked:r,...a},n)=>jsxs(Z.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(Z.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));ec.displayName=Z.CheckboxItem.displayName;var tc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(Z.RadioItem,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(Z.ItemIndicator,{children:jsx(Circle,{className:"h-4 w-4 fill-current"})})}),t]}));tc.displayName=Z.RadioItem.displayName;var rc=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(Z.Label,{ref:a,className:o("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...r}));rc.displayName=Z.Label.displayName;var ac=Y.forwardRef(({className:e,...t},r)=>jsx(Z.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-border",e),...t}));ac.displayName=Z.Separator.displayName;var oc=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});oc.displayName="ContextMenuShortcut";var nc=Y.forwardRef(({className:e,...t},r)=>jsx(Vr.Root,{className:o("grid gap-2",e),...t,ref:r}));nc.displayName=Vr.Root.displayName;var ic=Y.forwardRef(({className:e,...t},r)=>jsx(Vr.Item,{ref:r,className:o("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",e),...t,children:jsx(Vr.Indicator,{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ic.displayName=Vr.Item.displayName;var wn=cva("inline-flex items-center justify-center rounded-md text-sm font-medium 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 [&_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",outline:"border border-input 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"}}),lc=Y.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsx(ls.Root,{ref:n,className:o(wn({variant:t,size:r,className:e})),...a}));lc.displayName=ls.Root.displayName;var dc=Y.createContext({size:"md",variant:"solid"}),cc=Y.forwardRef(({className:e,variant:t,size:r,children:a,...n},i)=>jsx(za.Root,{ref:i,className:o("flex items-center justify-center gap-1",e),...n,children:jsx(dc.Provider,{value:{variant:t,size:r},children:a})}));cc.displayName=za.Root.displayName;var mc=Y.forwardRef(({className:e,children:t,variant:r,size:a,...n},i)=>{let s=Y.useContext(dc);return jsx(za.Item,{ref:i,className:o(wn({variant:s.variant||r,size:s.size||a}),e),...n,children:t})});mc.displayName=za.Item.displayName;var Nn=Y.forwardRef(({className:e,...t},r)=>jsxs(ar.Root,{ref:r,className:o("relative flex w-full touch-none select-none items-center",e),...t,children:[jsx(ar.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsx(ar.Range,{className:"absolute h-full bg-primary"})}),jsx(ar.Thumb,{className:"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 disabled:pointer-events-none disabled:opacity-50"})]}));Nn.displayName=ar.Root.displayName;var e0=`
|
|
2
2
|
@keyframes accordion-down {
|
|
3
3
|
from { height: 0; opacity: 0; }
|
|
4
4
|
to { height: var(--radix-accordion-content-height); opacity: 1; }
|
|
@@ -28,12 +28,12 @@ import*as Y from'react';import {createContext,useContext}from'react';import {cva
|
|
|
28
28
|
.collapsible-content[data-state="closed"] {
|
|
29
29
|
animation: collapsible-up 0.2s ease-out;
|
|
30
30
|
}
|
|
31
|
-
`,bc=false,o0=()=>{if(bc||typeof document>"u")return;let e=document.createElement("style");e.textContent=a0,document.head.appendChild(e),bc=true;},xc=Y.forwardRef(({className:e,title:t,children:r,...a},n)=>(Y.useEffect(()=>{o0();},[]),jsxs(ca.Root,{ref:n,className:o("space-y-2",e),...a,children:[t&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:t}),jsx(ca.CollapsibleTrigger,{className:"flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer",children:jsx(ChevronsUpDown,{className:"h-4 w-4"})})]}),r]})));xc.displayName="Collapsible";var yc=Y.forwardRef(({className:e,children:t,...r},a)=>jsx(ca.CollapsibleTrigger,{ref:a,className:o("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer",e),...r,children:t??jsx(ChevronsUpDown,{className:"h-4 w-4"})}));yc.displayName="CollapsibleTrigger";var Rc=Y.forwardRef(({className:e,...t},r)=>jsx(ca.CollapsibleContent,{ref:r,className:o("collapsible-content overflow-hidden",e),...t}));Rc.displayName="CollapsibleContent";var Mn=Y.forwardRef(({className:e,value:t,...r},a)=>jsx(ko.Root,{ref:a,className:o("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:jsx(ko.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Mn.displayName=ko.Root.displayName;var n0=ma.Root,i0=ma.Trigger,Cc=Y.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},n)=>jsx(ma.Content,{ref:n,align:t,sideOffset:r,className:o("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a}));Cc.displayName=ma.Content.displayName;var Mc=Y.createContext({size:"md",variant:"default",radius:"md"}),Sn=()=>Y.useContext(Mc);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var m0=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),u0=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"}}),p0=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"}}),Tc=Y.forwardRef(({size:e="md",variant:t="default",radius:r="md",children:a,...n},i)=>jsx(Mc.Provider,{value:{size:e,variant:t,radius:r},children:jsx("nav",{ref:i,"aria-label":"breadcrumb",...n,children:a})}));Tc.displayName="Breadcrumb";var Sc=Y.forwardRef(({className:e,...t},r)=>{let{size:a,variant:n,radius:i}=Sn();return jsx("ol",{ref:r,className:o(m0({size:a,variant:n,radius:n==="default"?void 0:i}),e),...t})});Sc.displayName="BreadcrumbList";var kc=Y.forwardRef(({className:e,...t},r)=>{let{size:a}=Sn();return jsx("li",{ref:r,className:o("inline-flex items-center",a==="sm"&&"gap-1",a==="md"&&"gap-1.5",a==="lg"&&"gap-2",e),...t})});kc.displayName="BreadcrumbItem";var Dc=Y.forwardRef(({asChild:e,className:t,...r},a)=>jsx(e?Slot:"a",{ref:a,className:o("transition-colors hover:text-foreground cursor-pointer",t),...r}));Dc.displayName="BreadcrumbLink";var Lc=Y.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:o("font-medium text-foreground",e),...t}));Lc.displayName="BreadcrumbPage";var Vc=({children:e,className:t,...r})=>{let{size:a}=Sn();return jsx("li",{role:"presentation","aria-hidden":"true",className:o(u0({size:a}),"text-muted-foreground/60",t),...r,children:e??jsx(ChevronRight,{})})};Vc.displayName="BreadcrumbSeparator";var Ic=({className:e,...t})=>{let{size:r}=Sn();return jsxs("span",{role:"presentation","aria-hidden":"true",className:o(p0({size:r}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};Ic.displayName="BreadcrumbEllipsis";var g0=Ec.Root;var Hc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(xe.Root,{ref:a,className:o("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,jsx(ms,{})]}));Hc.displayName=xe.Root.displayName;var Ac=Y.forwardRef(({className:e,...t},r)=>jsx(xe.List,{ref:r,className:o("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Ac.displayName=xe.List.displayName;var h0=xe.Item,zc=cva("group inline-flex h-10 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-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Fc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(xe.Trigger,{ref:a,className:o(zc(),"group",e),...r,children:[t," ",jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Fc.displayName=xe.Trigger.displayName;var Bc=Y.forwardRef(({className:e,...t},r)=>jsx(xe.Content,{ref:r,className:o("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Bc.displayName=xe.Content.displayName;var x0=xe.Link,ms=Y.forwardRef(({className:e,...t},r)=>jsx("div",{className:o("absolute left-0 top-full flex justify-center"),children:jsx(xe.Viewport,{className:o("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:r,...t})}));ms.displayName=xe.Viewport.displayName;var Oc=Y.forwardRef(({className:e,...t},r)=>jsx(xe.Indicator,{ref:r,className:o("top-full z-[1] flex h-1.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"})}));Oc.displayName=xe.Indicator.displayName;var $c=({shouldScaleBackground:e=true,...t})=>jsx(Drawer.Root,{shouldScaleBackground:e,...t});$c.displayName="Drawer";var y0=Drawer.Trigger,_c=Drawer.Portal,R0=Drawer.Close,us=Y.forwardRef(({className:e,...t},r)=>jsx(Drawer.Overlay,{ref:r,className:o("fixed inset-0 z-50 bg-black/80",e),...t}));us.displayName=Drawer.Overlay.displayName;var Kc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(_c,{children:[jsx(us,{}),jsxs(Drawer.Content,{ref:a,className:o("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...r,children:[jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Kc.displayName="DrawerContent";var Yc=({className:e,...t})=>jsx("div",{className:o("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Yc.displayName="DrawerHeader";var jc=({className:e,...t})=>jsx("div",{className:o("mt-auto flex flex-col gap-2 p-4",e),...t});jc.displayName="DrawerFooter";var Uc=Y.forwardRef(({className:e,...t},r)=>jsx(Drawer.Title,{ref:r,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Uc.displayName=Drawer.Title.displayName;var Xc=Y.forwardRef(({className:e,...t},r)=>jsx(Drawer.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));Xc.displayName=Drawer.Description.displayName;var qc=Y.forwardRef(({className:e,...t},r)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:r,className:o("w-full caption-bottom text-sm",e),...t})}));qc.displayName="Table";var Zc=Y.forwardRef(({className:e,...t},r)=>jsx("thead",{ref:r,className:o("[&_tr]:border-b",e),...t}));Zc.displayName="TableHeader";var Jc=Y.forwardRef(({className:e,...t},r)=>jsx("tbody",{ref:r,className:o("[&_tr:last-child]:border-0",e),...t}));Jc.displayName="TableBody";var Qc=Y.forwardRef(({className:e,...t},r)=>jsx("tfoot",{ref:r,className:o("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Qc.displayName="TableFooter";var em=Y.forwardRef(({className:e,...t},r)=>jsx("tr",{ref:r,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));em.displayName="TableRow";var tm=Y.forwardRef(({className:e,...t},r)=>jsx("th",{ref:r,className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));tm.displayName="TableHead";var rm=Y.forwardRef(({className:e,...t},r)=>jsx("td",{ref:r,className:o("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));rm.displayName="TableCell";var am=Y.forwardRef(({className:e,...t},r)=>jsx("caption",{ref:r,className:o("mt-4 text-sm text-muted-foreground",e),...t}));am.displayName="TableCaption";var nm=cva("animate-spin text-muted-foreground",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),im=Y.forwardRef(({className:e,size:t,...r},a)=>jsx(Loader2,{ref:a,className:o(nm({size:t,className:e})),...r}));im.displayName="Spinner";var ps=["January","February","March","April","May","June","July","August","September","October","November","December"];function L0({currentMonth:e,onMonthChange:t,startYear:r,endYear:a}){let[n,i]=Y.useState(false),[s,l]=Y.useState(false),d=Y.useRef(null),m=Y.useRef(null),u=getMonth(e),c=getYear(e);Y.useEffect(()=>{function y(f){d.current&&!d.current.contains(f.target)&&i(false),m.current&&!m.current.contains(f.target)&&l(false);}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]);let g=y=>{let f=setMonth(e,y);t(f),i(false);},p=y=>{let f=setYear(e,y);t(f),l(false);},x=Y.useMemo(()=>{let y=[];for(let f=a;f>=r;f--)y.push(f);return y},[r,a]);return jsxs("div",{className:"flex items-center gap-2",children:[jsxs("div",{ref:d,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{i(!n),l(false);},className:o("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[120px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",n&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:ps[u]}),jsx(ChevronDown,{className:o("h-4 w-4 text-muted-foreground transition-transform",n&&"rotate-180")})]}),n&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[140px] rounded-md border border-border bg-background shadow-lg",children:jsx(ze,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:ps.map((y,f)=>jsx("button",{type:"button",onClick:()=>g(f),className:o("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",u===f&&"bg-primary/10 text-primary font-medium"),children:y},y))})})})]}),jsxs("div",{ref:m,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{l(!s),i(false);},className:o("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",s&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:c}),jsx(ChevronDown,{className:o("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),s&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[100px] rounded-md border border-border bg-background shadow-lg",children:jsx(ze,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:x.map(y=>jsx("button",{type:"button",onClick:()=>p(y),className:o("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",c===y&&"bg-primary/10 text-primary font-medium"),children:y},y))})})})]})]})}function V0(e,t,r){return function({calendarMonth:n}){let{goToMonth:i,nextMonth:s,previousMonth:l}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsx(L0,{currentMonth:n.date,onMonthChange:i,startYear:t,endYear:r}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!l,onClick:()=>l&&i(l),className:o("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&&i(s),className:o("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"})})]})]});let d=ps[n.date.getMonth()],m=n.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:d}),jsx("span",{className:"text-sm font-medium w-[50px]",children:m})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!l,onClick:()=>l&&i(l),className:o("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&&i(s),className:o("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 Oa({className:e,classNames:t,showOutsideDays:r=true,showMonthAndYearPickers:a=false,startYear:n=1900,endYear:i=new Date().getFullYear()+50,components:s,...l}){let d=Y.useMemo(()=>V0(a,n,i),[a,n,i]);return jsx(DayPicker,{showOutsideDays:r,className:o("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-10 font-normal text-xs text-center",week:"flex w-full mt-1",day:o("relative h-10 w-10 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:o("size-10 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10 hover:text-primary","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:o("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",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0},outside:{backgroundColor:"transparent"}},components:{...s,MonthCaption:d},...l})}Oa.displayName="Calendar";var cm=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:o("mx-auto flex w-full justify-center",e),...t});cm.displayName="Pagination";var mm=Y.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,className:o("flex flex-row items-center gap-1",e),...t}));mm.displayName="PaginationContent";var um=Y.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:o("",e),...t}));um.displayName="PaginationItem";var kn=({className:e,isActive:t,size:r="icon",...a})=>jsx("a",{"aria-current":t?"page":void 0,className:o(Jt({variant:t?"bordered":"ghost",size:r}),e),...a});kn.displayName="PaginationLink";var pm=({className:e,...t})=>jsxs(kn,{"aria-label":"Go to previous page",size:"md",className:o("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});pm.displayName="PaginationPrevious";var fm=({className:e,...t})=>jsxs(kn,{"aria-label":"Go to next page",size:"md",className:o("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});fm.displayName="PaginationNext";var gm=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:o("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"})]});gm.displayName="PaginationEllipsis";var bs=Y.forwardRef(({className:e,...t},r)=>jsx(Command,{ref:r,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));bs.displayName=Command.displayName;var z0=({children:e,...t})=>jsx(Xi,{...t,children:jsx(pn,{className:"overflow-hidden p-0 shadow-lg",children:jsx(bs,{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})})}),bm=Y.forwardRef(({className:e,...t},r)=>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:r,className:o("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})]}));bm.displayName=Command.Input.displayName;var vm=Y.forwardRef(({className:e,...t},r)=>jsx(Command.List,{ref:r,className:o("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));vm.displayName=Command.List.displayName;var hm=Y.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));hm.displayName=Command.Empty.displayName;var xm=Y.forwardRef(({className:e,...t},r)=>jsx(Command.Group,{ref:r,className:o("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}));xm.displayName=Command.Group.displayName;var ym=Y.forwardRef(({className:e,...t},r)=>jsx(Command.Separator,{ref:r,className:o("-mx-1 h-px bg-border",e),...t}));ym.displayName=Command.Separator.displayName;var Rm=Y.forwardRef(({className:e,...t},r)=>jsx(Command.Item,{ref:r,className:o("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Rm.displayName=Command.Item.displayName;var wm=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});wm.displayName="CommandShortcut";var Nm=Y.forwardRef(({className:e,showToggle:t=true,disabled:r,onFocus:a,onBlur:n,style:i,...s},l)=>{let[d,m]=Y.useState(false),[u,c]=Y.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:o("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:l,disabled:r,style:{...i,borderColor:u?"var(--color-foreground)":void 0},onFocus:g=>{c(true),a?.(g);},onBlur:g=>{c(false),n?.(g);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>m(!d),disabled:r,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Nm.displayName="PasswordInput";var Pm=Y.forwardRef(({className:e,showButtons:t=true,step:r=1,min:a,max:n,value:i,defaultValue:s,onChange:l,disabled:d,...m},u)=>{let[c,g]=Y.useState(s),[p,x]=Y.useState(false),y=i!==void 0,f=y?i:c,h=C=>{C!==void 0&&(a!==void 0&&C<a&&(C=a),n!==void 0&&C>n&&(C=n)),y||g(C),l?.(C);},R=()=>{h((f??0)+r);},b=()=>{h((f??0)-r);},v=C=>{let M=C.target.value;if(M==="")h(void 0);else {let N=parseFloat(M);isNaN(N)||h(N);}},P=C=>{C.key==="ArrowUp"?(C.preventDefault(),R()):C.key==="ArrowDown"&&(C.preventDefault(),b());},w=a===void 0||(f??0)>a,S=n===void 0||(f??0)<n;return t?jsxs("div",{className:o("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",d&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:b,disabled:d||!w,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:u,value:f??"",onChange:v,onKeyDown:P,disabled:d,onFocus:()=>x(true),onBlur:()=>x(false),...m}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:R,disabled:d||!S,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:o("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:u,value:f??"",onChange:v,onKeyDown:P,disabled:d,onFocus:()=>x(true),onBlur:()=>x(false),...m})});Pm.displayName="NumberInput";var Mm=Y.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date",dateFormat:n="PPP",disabled:i=false,minDate:s,maxDate:l,className:d},m)=>{let[u,c]=Y.useState(false),[g,p]=Y.useState(t),x=e!==void 0,y=x?e:g,f=h=>{x||p(h),r?.(h),c(false);};return jsxs(Ie,{open:u,onOpenChange:c,children:[jsx($e,{asChild:true,children:jsxs(_,{ref:m,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!y&&"text-muted-foreground",d),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),y?format(y,n):a]})}),jsx(Me,{className:"w-auto p-0",align:"start",children:jsx(Oa,{mode:"single",selected:y,onSelect:f,disabled:h=>!!(s&&h<s||l&&h>l),initialFocus:true})})]})});Mm.displayName="DatePicker";var Dm=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Tm=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"}}),Lm=Y.forwardRef(({className:e,items:t,max:r=5,size:a,showTooltips:n=false,...i},s)=>{let l=t.slice(0,r),d=t.length-r,m=(c,g)=>{let p=jsxs(ta,{className:o(Tm({size:a})),children:[c.src&&jsx(Ha,{src:c.src,alt:c.alt||""}),jsx(ra,{className:"text-xs",children:c.fallback||c.alt?.charAt(0)?.toUpperCase()||"?"})]},g);return n&&c.alt?jsxs(oa,{children:[jsx(na,{asChild:true,children:p}),jsx(Dr,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:c.alt})]},g):p},u=jsxs("div",{ref:s,className:o(Dm({size:a,className:e})),...i,children:[l.map((c,g)=>m(c,g)),d>0&&jsx(ta,{className:o(Tm({size:a})),children:jsxs(ra,{className:"bg-muted text-muted-foreground",children:["+",d]})})]});return n?jsx(aa,{delayDuration:300,children:u}):u});Lm.displayName="AvatarGroup";var Vm=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"}}),Im=Y.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:a,max:n=5,size:i,icon:s="star",allowHalf:l=false,readOnly:d=false,disabled:m=false,filledColor:u,emptyColor:c,...g},p)=>{let[x,y]=Y.useState(r),[f,h]=Y.useState(null),R=t!==void 0,b=R?t:x,v=f!==null?f:b,P=L=>{d||m||(R||y(L),a?.(L));},w=(L,I=false)=>{let V=l&&I?L+.5:L+1;P(V);},S=(L,I)=>{if(d||m)return;let V=L.currentTarget.getBoundingClientRect(),D=l&&L.clientX<V.left+V.width/2;h(D?I+.5:I+1);},C=()=>{h(null);},M=s==="heart"?Heart:Star,N=L=>v>=L+1?"full":v>=L+.5?"half":"empty",T=u?{color:u,fill:u}:{},k=c?{color:c}:{};return jsx("div",{ref:p,className:o(Vm({size:i,className:e}),m&&"opacity-50 cursor-not-allowed"),onMouseLeave:C,role:"radiogroup","aria-label":"Rating",...g,children:Array.from({length:n},(L,I)=>{let V=N(I);return jsxs("button",{type:"button",className:o("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!d&&!m&&"cursor-pointer hover:scale-110 transition-transform"),onClick:D=>{let E=D.currentTarget.getBoundingClientRect(),B=l&&D.clientX<E.left+E.width/2;w(I,B);},onMouseMove:D=>S(D,I),disabled:m||d,"aria-label":`Rate ${I+1} out of ${n}`,role:"radio","aria-checked":b===I+1,children:[jsx(M,{className:o("text-muted-foreground/30",V!=="empty"&&"absolute inset-0"),style:V==="empty"?k:void 0}),V!=="empty"&&jsx(M,{className:o("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",V==="half"&&"clip-path-half"),style:{...T,clipPath:V==="half"?"inset(0 50% 0 0)":void 0}})]},I)})})});Im.displayName="Rating";var Q0="16rem",eR="18rem",tR="3rem",rR="b",xs=Y.createContext(null);function In(){let e=Y.useContext(xs);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function ys(){return Y.useContext(xs)}var Hm=Y.forwardRef(({defaultOpen:e=true,open:t,onOpenChange:r,className:a,style:n,children:i,...s},l)=>{let[d,m]=Y.useState(false),[u,c]=Y.useState(false),[g,p]=Y.useState(e),x=t??g,y=Y.useCallback(b=>{let v=typeof b=="function"?b(x):b;r?r(v):p(v);},[r,x]);Y.useEffect(()=>{let b=()=>{m(window.innerWidth<768);};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);let f=Y.useCallback(()=>d?c(b=>!b):y(b=>!b),[d,y,c]);Y.useEffect(()=>{let b=v=>{v.key===rR&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),f());};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[f]);let h=x?"expanded":"collapsed",R=Y.useMemo(()=>({state:h,open:x,setOpen:y,isMobile:d,openMobile:u,setOpenMobile:c,toggleSidebar:f}),[h,x,y,d,u,c,f]);return jsx(xs.Provider,{value:R,children:jsx(aa,{delayDuration:0,children:jsx("div",{ref:l,style:{"--sidebar-width":Q0,"--sidebar-width-icon":tR,...n},className:o("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",a),...s,children:i})})})});Hm.displayName="SidebarProvider";var Am=Y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",embedded:a=false,resizable:n=false,minWidth:i=200,maxWidth:s=480,defaultWidth:l=256,onWidthChange:d,className:m,children:u,...c},g)=>{let[p,x]=Y.useState(l),[y,f]=Y.useState(false),h=Y.useRef(null),R=Y.useCallback(S=>{S.preventDefault(),f(true);},[]);if(Y.useEffect(()=>{if(!y)return;let S=M=>{if(!h.current)return;let N=h.current.getBoundingClientRect(),T;e==="left"?T=M.clientX-N.left:T=N.right-M.clientX,T=Math.max(i,Math.min(s,T)),x(T),d?.(T);},C=()=>{f(false);};return document.addEventListener("mousemove",S),document.addEventListener("mouseup",C),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",C);}},[y,e,i,s,d]),r==="none"){if(n){let S={width:`${p}px`,minWidth:`${i}px`,maxWidth:`${s}px`};return jsxs("div",{ref:C=>{typeof g=="function"?g(C):g&&(g.current=C),h.current=C;},className:o("relative text-sidebar-foreground h-full min-h-0",y&&"select-none"),"data-sidebar":"sidebar-wrapper","data-resizing":y,children:[jsx("div",{className:o("flex h-full min-h-0 flex-col bg-sidebar overflow-hidden",!y&&"transition-all duration-200 ease-in-out",e==="left"&&"border-r-0",e==="right"&&"border-l-0",m),style:S,...c,children:u}),jsx("div",{onMouseDown:R,className:o("absolute top-0 bottom-0 z-20 w-1 cursor-ew-resize",e==="left"?"right-0":"left-0"),"data-sidebar":"resize-handle",children:jsx("div",{className:o("absolute top-0 bottom-0 w-px transition-colors",e==="left"?"right-0":"left-0","bg-sidebar-border")})})]})}return jsx("div",{ref:g,className:o("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",m),style:{"--sidebar-width":"16rem"},...c,children:u})}let{isMobile:b,state:v,openMobile:P,setOpenMobile:w}=In();if(b&&!a)return jsx(To,{open:P,onOpenChange:w,children:jsx(Aa,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":eR},side:e,children:jsx("div",{className:"flex h-full w-full flex-col",children:u})})});if(a){let S=v==="collapsed",C=r==="offcanvas",M=r==="icon",N=n&&!S&&!M?{width:`${p}px`,minWidth:`${i}px`,maxWidth:`${s}px`}:void 0;return jsxs("div",{ref:T=>{typeof g=="function"?g(T):g&&(g.current=T),h.current=T;},className:o("group peer text-sidebar-foreground relative",y&&"select-none"),"data-state":v,"data-collapsible":S?r:"","data-variant":t,"data-side":e,"data-embedded":"true","data-resizing":y,children:[jsx("div",{className:o("flex h-full flex-col overflow-hidden",!y&&"transition-[width,opacity] duration-200 ease-out",!n&&(C?S?"w-0 opacity-0":"w-[--sidebar-width] opacity-100":M&&S?"w-[--sidebar-width-icon]":"w-[--sidebar-width]"),n&&C&&S&&"w-0 opacity-0",n&&M&&S&&"w-[--sidebar-width-icon]",m),style:N,...c,children:jsx("div",{"data-sidebar":"sidebar",className:o("flex h-full w-full flex-col bg-sidebar transition-opacity duration-200",t==="floating"&&"overflow-hidden rounded-lg border border-sidebar-border shadow-sm",t==="inset"&&"overflow-hidden rounded-lg border border-sidebar-border",t==="sidebar"&&e==="left"&&!n&&"border-r",t==="sidebar"&&e==="right"&&!n&&"border-l"),children:u})}),n&&!S&&jsx("div",{onMouseDown:R,className:o("absolute top-0 bottom-0 z-20 w-1 cursor-ew-resize",e==="left"?"right-0":"left-0"),"data-sidebar":"resize-handle",children:jsx("div",{className:o("absolute top-0 bottom-0 w-px transition-colors",e==="left"?"right-0":"left-0","bg-sidebar-border")})})]})}return jsxs("div",{ref:g,className:"group peer hidden md:block text-sidebar-foreground","data-state":v,"data-collapsible":v==="collapsed"?r:"","data-variant":t,"data-side":e,children:[jsx("div",{className:o("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),jsx("div",{className:o("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",m),...c,children:jsx("div",{"data-sidebar":"sidebar",className:o("flex h-full w-full flex-col bg-sidebar",t==="floating"&&"overflow-hidden rounded-lg border border-sidebar-border shadow-sm",t==="inset"&&"overflow-hidden rounded-lg border border-sidebar-border"),children:u})})]})});Am.displayName="Sidebar";var zm=Y.forwardRef(({className:e,onClick:t,...r},a)=>{let{toggleSidebar:n}=In();return jsxs("button",{ref:a,type:"button","data-sidebar":"trigger",className:o("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer",e),onClick:i=>{t?.(i),n();},...r,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});zm.displayName="SidebarTrigger";var Fm=Y.forwardRef(({className:e,onClick:t,showLabel:r=true,...a},n)=>{let i=ys();if(!i)return null;let{toggleSidebar:s,state:l}=i,d=l==="collapsed";return jsxs("button",{ref:n,type:"button","data-sidebar":"toggle","data-state":l,className:o("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-sidebar-foreground/70","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:m=>{t?.(m),s();},...a,children:[d?jsx(PanelLeftOpen,{className:"h-4 w-4 shrink-0"}):jsx(PanelLeftClose,{className:"h-4 w-4 shrink-0"}),r&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:d?"Expand":"Collapse"})]})});Fm.displayName="SidebarToggle";var Bm=Y.forwardRef(({className:e,onClick:t,expandedLabel:r="Collapse",collapsedLabel:a="Expand",...n},i)=>{let s=ys();if(!s)return null;let{toggleSidebar:l,state:d}=s,m=d==="collapsed";return jsxs(Fragment,{children:[jsxs("button",{ref:i,type:"button","data-sidebar":"toggle","data-state":d,className:o("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-sidebar-foreground/70","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:hidden",e),onClick:u=>{t?.(u),l();},...n,children:[m?jsx(PanelLeftOpen,{className:"h-4 w-4 shrink-0"}):jsx(PanelLeftClose,{className:"h-4 w-4 shrink-0"}),jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:m?a:r})]}),jsxs("button",{type:"button","data-sidebar":"floating-toggle","data-state":d,className:o("fixed left-3 bottom-4 z-50 flex items-center justify-center h-10 w-10 rounded-lg","bg-sidebar border border-sidebar-border shadow-md","text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","transition-all duration-200 cursor-pointer","opacity-0 pointer-events-none scale-90","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:opacity-100","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:pointer-events-auto","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:scale-100"),onClick:u=>{t?.(u),l();},children:[jsx(PanelLeftOpen,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:a})]})]})});Bm.displayName="SidebarPersistentToggle";var Om=Y.forwardRef(({className:e,...t},r)=>{let{toggleSidebar:a}=In();return jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:o("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Om.displayName="SidebarRail";var Gm=Y.forwardRef(({className:e,...t},r)=>jsx("main",{ref:r,className:o("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}));Gm.displayName="SidebarInset";var Wm=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"header",className:o("flex flex-col gap-2 p-2",e),...t}));Wm.displayName="SidebarHeader";var $m=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"footer",className:o("flex flex-col gap-2 p-2",e),...t}));$m.displayName="SidebarFooter";var _m=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"separator",className:o("mx-2 h-px w-auto bg-sidebar-border",e),...t}));_m.displayName="SidebarSeparator";var Km=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"content",className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Km.displayName="SidebarContent";var Ym=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"group",className:o("relative flex w-full min-w-0 flex-col p-2",e),...t}));Ym.displayName="SidebarGroup";var jm=Y.forwardRef(({className:e,asChild:t=false,...r},a)=>jsx(t?Slot:"div",{ref:a,"data-sidebar":"group-label",className:o("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r}));jm.displayName="SidebarGroupLabel";var Um=Y.forwardRef(({className:e,asChild:t=false,...r},a)=>jsx(t?Slot:"button",{ref:a,"data-sidebar":"group-action",className:o("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r}));Um.displayName="SidebarGroupAction";var Xm=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"group-content",className:o("w-full text-sm",e),...t}));Xm.displayName="SidebarGroupContent";var qm=Y.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,"data-sidebar":"menu",className:o("flex w-full min-w-0 flex-col gap-1",e),...t}));qm.displayName="SidebarMenu";var Zm=Y.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,"data-sidebar":"menu-item",className:o("group/menu-item relative",e),...t}));Zm.displayName="SidebarMenuItem";var Jm=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-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:{solid:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",ghost:"hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground",soft:"hover:bg-primary/10 hover:text-primary",surface:"bg-sidebar-accent/30 hover:bg-sidebar-accent hover:text-sidebar-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:"solid",size:"md"}}),Qm=Y.forwardRef(({asChild:e=false,isActive:t=false,variant:r="solid",size:a="md",tooltip:n,className:i,...s},l)=>{let d=e?Slot:"button",m=ys(),u=m?.isMobile??false,c=m?.state??"expanded",g=jsx(d,{ref:l,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:o(Jm({variant:r,size:a}),i),...s});return n?(typeof n=="string"&&(n={children:n}),jsxs(oa,{children:[jsx(na,{asChild:true,children:g}),jsx(Dr,{side:"right",align:"center",hidden:c!=="collapsed"||u,...n})]})):g});Qm.displayName="SidebarMenuButton";var eu=Y.forwardRef(({className:e,asChild:t=false,showOnHover:r=false,...a},n)=>jsx(t?Slot:"button",{ref:n,"data-sidebar":"menu-action",className:o("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...a}));eu.displayName="SidebarMenuAction";var tu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"menu-badge",className:o("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));tu.displayName="SidebarMenuBadge";var ru=Y.forwardRef(({className:e,showIcon:t=false,...r},a)=>{let n=Y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:o("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&jsx("div",{className:"size-4 rounded-md bg-sidebar-accent animate-pulse"}),jsx("div",{className:"h-4 flex-1 max-w-[--skeleton-width] bg-sidebar-accent animate-pulse rounded-md",style:{"--skeleton-width":n}})]})});ru.displayName="SidebarMenuSkeleton";var au=Y.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:o("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));au.displayName="SidebarMenuSub";var ou=Y.forwardRef(({...e},t)=>jsx("li",{ref:t,...e}));ou.displayName="SidebarMenuSubItem";var nu=Y.forwardRef(({asChild:e=false,size:t="md",isActive:r,className:a,...n},i)=>jsx(e?Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:o("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),...n}));nu.displayName="SidebarMenuSubButton";var lu=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",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"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:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),nR=cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),du=Y.forwardRef(({className:e,variant:t,color:r,size:a,radius:n,clickable:i,startContent:s,endContent:l,closable:d,onClose:m,disabled:u,avatar:c,children:g,onClick:p,...x},y)=>{let f=i||!!p,h=R=>{R.stopPropagation(),m?.();};return jsxs("div",{ref:y,role:f?"button":void 0,tabIndex:f&&!u?0:void 0,"aria-disabled":u,onClick:u?void 0:p,onKeyDown:f&&!u?R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p?.(R));}:void 0,className:o(lu({variant:t,color:r,size:a,radius:n,clickable:f}),u&&"opacity-50 cursor-not-allowed",e),...x,children:[c&&jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:c}),s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:g}),l&&jsx("span",{className:"shrink-0",children:l}),d&&jsx("button",{type:"button","aria-label":"Remove",onClick:h,disabled:u,className:o(nR({size:a})),children:jsx(X$1,{})})]})});du.displayName="Chip";var cu=createContext({direction:"horizontal"}),pR=({className:e,direction:t="horizontal",children:r,...a})=>jsx(cu.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:o("flex h-full w-full data-[orientation=vertical]:flex-col",e),...a,children:r})}),fR=Panel,gR=({withHandle:e,className:t,...r})=>{let{direction:a}=useContext(cu),n=a==="vertical";return jsx(Separator,{className:o("relative flex shrink-0 items-center justify-center bg-border outline-none",n?"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),...r,children:e&&jsx("div",{className:o("z-10 flex items-center justify-center rounded-sm border bg-border",n?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var pu=cva("inline-flex items-center gap-1",{variants:{size:{sm:"[&>span]:h-1 [&>span]:w-1",md:"[&>span]:h-1.5 [&>span]:w-1.5",lg:"[&>span]:h-2 [&>span]:w-2",xl:"[&>span]:h-3 [&>span]:w-3"}},defaultVariants:{size:"md"}}),fu=Y.forwardRef(({className:e,size:t,count:r=3,...a},n)=>jsx("span",{ref:n,role:"status","aria-label":"Loading",className:o(pu({size:t,className:e})),...a,children:Array.from({length:r}).map((i,s)=>jsx("span",{className:"rounded-full bg-current animate-dots-bounce",style:{animationDelay:`${s*.16}s`}},s))}));fu.displayName="Dots";var vu=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-14 w-14"},color:{default:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),hR={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:40,strokeWidth:4,fontSize:"text-xs"},lg:{size:56,strokeWidth:5,fontSize:"text-sm"}},gu={default:"#18181b",success:"#16a34a",warning:"#d97706",danger:"#dc2626"},hu=Y.forwardRef(({className:e,size:t="md",color:r="default",value:a,showValue:n=false,trackClassName:i,...s},l)=>{let d=a===void 0,m=Math.min(100,Math.max(0,a??0)),u=hR[t],c=(u.size-u.strokeWidth)/2,g=2*Math.PI*c,p=g-m/100*g,x=g*.3;return jsxs("div",{ref:l,className:o(vu({size:t,color:r}),e),role:"progressbar","aria-valuenow":d?void 0:m,"aria-valuemin":0,"aria-valuemax":100,...s,children:[jsxs("svg",{width:u.size,height:u.size,viewBox:`0 0 ${u.size} ${u.size}`,fill:"none",style:d?{animation:"circular-spin 0.8s linear infinite"}:void 0,children:[jsx("style",{children:`
|
|
31
|
+
`,bc=false,o0=()=>{if(bc||typeof document>"u")return;let e=document.createElement("style");e.textContent=a0,document.head.appendChild(e),bc=true;},xc=Y.forwardRef(({className:e,title:t,children:r,...a},n)=>(Y.useEffect(()=>{o0();},[]),jsxs(ca.Root,{ref:n,className:o("space-y-2",e),...a,children:[t&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:t}),jsx(ca.CollapsibleTrigger,{className:"flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer",children:jsx(ChevronsUpDown,{className:"h-4 w-4"})})]}),r]})));xc.displayName="Collapsible";var yc=Y.forwardRef(({className:e,children:t,...r},a)=>jsx(ca.CollapsibleTrigger,{ref:a,className:o("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer",e),...r,children:t??jsx(ChevronsUpDown,{className:"h-4 w-4"})}));yc.displayName="CollapsibleTrigger";var Rc=Y.forwardRef(({className:e,...t},r)=>jsx(ca.CollapsibleContent,{ref:r,className:o("collapsible-content overflow-hidden",e),...t}));Rc.displayName="CollapsibleContent";var Mn=Y.forwardRef(({className:e,value:t,...r},a)=>jsx(ko.Root,{ref:a,className:o("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:jsx(ko.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Mn.displayName=ko.Root.displayName;var n0=ma.Root,i0=ma.Trigger,Cc=Y.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},n)=>jsx(ma.Content,{ref:n,align:t,sideOffset:r,className:o("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a}));Cc.displayName=ma.Content.displayName;var Mc=Y.createContext({size:"md",variant:"default",radius:"md"}),Sn=()=>Y.useContext(Mc);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var m0=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),u0=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"}}),p0=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"}}),Tc=Y.forwardRef(({size:e="md",variant:t="default",radius:r="md",children:a,...n},i)=>jsx(Mc.Provider,{value:{size:e,variant:t,radius:r},children:jsx("nav",{ref:i,"aria-label":"breadcrumb",...n,children:a})}));Tc.displayName="Breadcrumb";var Sc=Y.forwardRef(({className:e,...t},r)=>{let{size:a,variant:n,radius:i}=Sn();return jsx("ol",{ref:r,className:o(m0({size:a,variant:n,radius:n==="default"?void 0:i}),e),...t})});Sc.displayName="BreadcrumbList";var kc=Y.forwardRef(({className:e,...t},r)=>{let{size:a}=Sn();return jsx("li",{ref:r,className:o("inline-flex items-center",a==="sm"&&"gap-1",a==="md"&&"gap-1.5",a==="lg"&&"gap-2",e),...t})});kc.displayName="BreadcrumbItem";var Dc=Y.forwardRef(({asChild:e,className:t,...r},a)=>jsx(e?Slot:"a",{ref:a,className:o("transition-colors hover:text-foreground cursor-pointer",t),...r}));Dc.displayName="BreadcrumbLink";var Lc=Y.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:o("font-medium text-foreground",e),...t}));Lc.displayName="BreadcrumbPage";var Vc=({children:e,className:t,...r})=>{let{size:a}=Sn();return jsx("li",{role:"presentation","aria-hidden":"true",className:o(u0({size:a}),"text-muted-foreground/60",t),...r,children:e??jsx(ChevronRight,{})})};Vc.displayName="BreadcrumbSeparator";var Ic=({className:e,...t})=>{let{size:r}=Sn();return jsxs("span",{role:"presentation","aria-hidden":"true",className:o(p0({size:r}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};Ic.displayName="BreadcrumbEllipsis";var g0=Ec.Root;var Hc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(xe.Root,{ref:a,className:o("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,jsx(ms,{})]}));Hc.displayName=xe.Root.displayName;var Ac=Y.forwardRef(({className:e,...t},r)=>jsx(xe.List,{ref:r,className:o("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Ac.displayName=xe.List.displayName;var h0=xe.Item,zc=cva("group inline-flex h-10 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-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Fc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(xe.Trigger,{ref:a,className:o(zc(),"group",e),...r,children:[t," ",jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Fc.displayName=xe.Trigger.displayName;var Bc=Y.forwardRef(({className:e,...t},r)=>jsx(xe.Content,{ref:r,className:o("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Bc.displayName=xe.Content.displayName;var x0=xe.Link,ms=Y.forwardRef(({className:e,...t},r)=>jsx("div",{className:o("absolute left-0 top-full flex justify-center"),children:jsx(xe.Viewport,{className:o("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:r,...t})}));ms.displayName=xe.Viewport.displayName;var Oc=Y.forwardRef(({className:e,...t},r)=>jsx(xe.Indicator,{ref:r,className:o("top-full z-[1] flex h-1.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"})}));Oc.displayName=xe.Indicator.displayName;var $c=({shouldScaleBackground:e=true,...t})=>jsx(Drawer.Root,{shouldScaleBackground:e,...t});$c.displayName="Drawer";var y0=Drawer.Trigger,_c=Drawer.Portal,R0=Drawer.Close,us=Y.forwardRef(({className:e,...t},r)=>jsx(Drawer.Overlay,{ref:r,className:o("fixed inset-0 z-50 bg-black/80",e),...t}));us.displayName=Drawer.Overlay.displayName;var Kc=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(_c,{children:[jsx(us,{}),jsxs(Drawer.Content,{ref:a,className:o("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...r,children:[jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Kc.displayName="DrawerContent";var Yc=({className:e,...t})=>jsx("div",{className:o("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Yc.displayName="DrawerHeader";var jc=({className:e,...t})=>jsx("div",{className:o("mt-auto flex flex-col gap-2 p-4",e),...t});jc.displayName="DrawerFooter";var Uc=Y.forwardRef(({className:e,...t},r)=>jsx(Drawer.Title,{ref:r,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Uc.displayName=Drawer.Title.displayName;var Xc=Y.forwardRef(({className:e,...t},r)=>jsx(Drawer.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));Xc.displayName=Drawer.Description.displayName;var qc=Y.forwardRef(({className:e,...t},r)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:r,className:o("w-full caption-bottom text-sm",e),...t})}));qc.displayName="Table";var Zc=Y.forwardRef(({className:e,...t},r)=>jsx("thead",{ref:r,className:o("[&_tr]:border-b",e),...t}));Zc.displayName="TableHeader";var Jc=Y.forwardRef(({className:e,...t},r)=>jsx("tbody",{ref:r,className:o("[&_tr:last-child]:border-0",e),...t}));Jc.displayName="TableBody";var Qc=Y.forwardRef(({className:e,...t},r)=>jsx("tfoot",{ref:r,className:o("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Qc.displayName="TableFooter";var em=Y.forwardRef(({className:e,...t},r)=>jsx("tr",{ref:r,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));em.displayName="TableRow";var tm=Y.forwardRef(({className:e,...t},r)=>jsx("th",{ref:r,className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));tm.displayName="TableHead";var rm=Y.forwardRef(({className:e,...t},r)=>jsx("td",{ref:r,className:o("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));rm.displayName="TableCell";var am=Y.forwardRef(({className:e,...t},r)=>jsx("caption",{ref:r,className:o("mt-4 text-sm text-muted-foreground",e),...t}));am.displayName="TableCaption";var nm=cva("animate-spin text-muted-foreground",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),im=Y.forwardRef(({className:e,size:t,...r},a)=>jsx(Loader2,{ref:a,className:o(nm({size:t,className:e})),...r}));im.displayName="Spinner";var ps=["January","February","March","April","May","June","July","August","September","October","November","December"];function L0({currentMonth:e,onMonthChange:t,startYear:r,endYear:a}){let[n,i]=Y.useState(false),[s,l]=Y.useState(false),d=Y.useRef(null),m=Y.useRef(null),u=getMonth(e),c=getYear(e);Y.useEffect(()=>{function y(f){d.current&&!d.current.contains(f.target)&&i(false),m.current&&!m.current.contains(f.target)&&l(false);}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]);let g=y=>{let f=setMonth(e,y);t(f),i(false);},p=y=>{let f=setYear(e,y);t(f),l(false);},x=Y.useMemo(()=>{let y=[];for(let f=a;f>=r;f--)y.push(f);return y},[r,a]);return jsxs("div",{className:"flex items-center gap-2",children:[jsxs("div",{ref:d,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{i(!n),l(false);},className:o("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[120px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",n&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:ps[u]}),jsx(ChevronDown,{className:o("h-4 w-4 text-muted-foreground transition-transform",n&&"rotate-180")})]}),n&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[140px] rounded-md border border-border bg-background shadow-lg",children:jsx(Me,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:ps.map((y,f)=>jsx("button",{type:"button",onClick:()=>g(f),className:o("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",u===f&&"bg-primary/10 text-primary font-medium"),children:y},y))})})})]}),jsxs("div",{ref:m,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{l(!s),i(false);},className:o("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",s&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:c}),jsx(ChevronDown,{className:o("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),s&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[100px] rounded-md border border-border bg-background shadow-lg",children:jsx(Me,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:x.map(y=>jsx("button",{type:"button",onClick:()=>p(y),className:o("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",c===y&&"bg-primary/10 text-primary font-medium"),children:y},y))})})})]})]})}function V0(e,t,r){return function({calendarMonth:n}){let{goToMonth:i,nextMonth:s,previousMonth:l}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsx(L0,{currentMonth:n.date,onMonthChange:i,startYear:t,endYear:r}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!l,onClick:()=>l&&i(l),className:o("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&&i(s),className:o("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"})})]})]});let d=ps[n.date.getMonth()],m=n.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:d}),jsx("span",{className:"text-sm font-medium w-[50px]",children:m})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!l,onClick:()=>l&&i(l),className:o("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&&i(s),className:o("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 Oa({className:e,classNames:t,showOutsideDays:r=true,showMonthAndYearPickers:a=false,startYear:n=1900,endYear:i=new Date().getFullYear()+50,components:s,...l}){let d=Y.useMemo(()=>V0(a,n,i),[a,n,i]);return jsx(DayPicker,{showOutsideDays:r,className:o("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-10 font-normal text-xs text-center",week:"flex w-full mt-1",day:o("relative h-10 w-10 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:o("size-10 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10 hover:text-primary","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:o("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",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0},outside:{backgroundColor:"transparent"}},components:{...s,MonthCaption:d},...l})}Oa.displayName="Calendar";var cm=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:o("mx-auto flex w-full justify-center",e),...t});cm.displayName="Pagination";var mm=Y.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,className:o("flex flex-row items-center gap-1",e),...t}));mm.displayName="PaginationContent";var um=Y.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:o("",e),...t}));um.displayName="PaginationItem";var kn=({className:e,isActive:t,size:r="icon",...a})=>jsx("a",{"aria-current":t?"page":void 0,className:o(Jt({variant:t?"bordered":"ghost",size:r}),e),...a});kn.displayName="PaginationLink";var pm=({className:e,...t})=>jsxs(kn,{"aria-label":"Go to previous page",size:"md",className:o("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});pm.displayName="PaginationPrevious";var fm=({className:e,...t})=>jsxs(kn,{"aria-label":"Go to next page",size:"md",className:o("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});fm.displayName="PaginationNext";var gm=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:o("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"})]});gm.displayName="PaginationEllipsis";var bs=Y.forwardRef(({className:e,...t},r)=>jsx(Command,{ref:r,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));bs.displayName=Command.displayName;var z0=({children:e,...t})=>jsx(Xi,{...t,children:jsx(pn,{className:"overflow-hidden p-0 shadow-lg",children:jsx(bs,{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})})}),bm=Y.forwardRef(({className:e,...t},r)=>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:r,className:o("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})]}));bm.displayName=Command.Input.displayName;var vm=Y.forwardRef(({className:e,...t},r)=>jsx(Command.List,{ref:r,className:o("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));vm.displayName=Command.List.displayName;var hm=Y.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));hm.displayName=Command.Empty.displayName;var xm=Y.forwardRef(({className:e,...t},r)=>jsx(Command.Group,{ref:r,className:o("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}));xm.displayName=Command.Group.displayName;var ym=Y.forwardRef(({className:e,...t},r)=>jsx(Command.Separator,{ref:r,className:o("-mx-1 h-px bg-border",e),...t}));ym.displayName=Command.Separator.displayName;var Rm=Y.forwardRef(({className:e,...t},r)=>jsx(Command.Item,{ref:r,className:o("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Rm.displayName=Command.Item.displayName;var wm=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});wm.displayName="CommandShortcut";var Nm=Y.forwardRef(({className:e,showToggle:t=true,disabled:r,onFocus:a,onBlur:n,style:i,...s},l)=>{let[d,m]=Y.useState(false),[u,c]=Y.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:o("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:l,disabled:r,style:{...i,borderColor:u?"var(--color-foreground)":void 0},onFocus:g=>{c(true),a?.(g);},onBlur:g=>{c(false),n?.(g);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>m(!d),disabled:r,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Nm.displayName="PasswordInput";var Pm=Y.forwardRef(({className:e,showButtons:t=true,step:r=1,min:a,max:n,value:i,defaultValue:s,onChange:l,disabled:d,...m},u)=>{let[c,g]=Y.useState(s),[p,x]=Y.useState(false),y=i!==void 0,f=y?i:c,h=C=>{C!==void 0&&(a!==void 0&&C<a&&(C=a),n!==void 0&&C>n&&(C=n)),y||g(C),l?.(C);},R=()=>{h((f??0)+r);},b=()=>{h((f??0)-r);},v=C=>{let M=C.target.value;if(M==="")h(void 0);else {let N=parseFloat(M);isNaN(N)||h(N);}},P=C=>{C.key==="ArrowUp"?(C.preventDefault(),R()):C.key==="ArrowDown"&&(C.preventDefault(),b());},w=a===void 0||(f??0)>a,S=n===void 0||(f??0)<n;return t?jsxs("div",{className:o("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",d&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:b,disabled:d||!w,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:u,value:f??"",onChange:v,onKeyDown:P,disabled:d,onFocus:()=>x(true),onBlur:()=>x(false),...m}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:R,disabled:d||!S,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:o("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:u,value:f??"",onChange:v,onKeyDown:P,disabled:d,onFocus:()=>x(true),onBlur:()=>x(false),...m})});Pm.displayName="NumberInput";var Mm=Y.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date",dateFormat:n="PPP",disabled:i=false,minDate:s,maxDate:l,className:d},m)=>{let[u,c]=Y.useState(false),[g,p]=Y.useState(t),x=e!==void 0,y=x?e:g,f=h=>{x||p(h),r?.(h),c(false);};return jsxs(Ee,{open:u,onOpenChange:c,children:[jsx(_e,{asChild:true,children:jsxs(_,{ref:m,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!y&&"text-muted-foreground",d),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),y?format(y,n):a]})}),jsx(Te,{className:"w-auto p-0",align:"start",children:jsx(Oa,{mode:"single",selected:y,onSelect:f,disabled:h=>!!(s&&h<s||l&&h>l),initialFocus:true})})]})});Mm.displayName="DatePicker";var Dm=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Tm=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"}}),Lm=Y.forwardRef(({className:e,items:t,max:r=5,size:a,showTooltips:n=false,...i},s)=>{let l=t.slice(0,r),d=t.length-r,m=(c,g)=>{let p=jsxs(ta,{className:o(Tm({size:a})),children:[c.src&&jsx(Ha,{src:c.src,alt:c.alt||""}),jsx(ra,{className:"text-xs",children:c.fallback||c.alt?.charAt(0)?.toUpperCase()||"?"})]},g);return n&&c.alt?jsxs(oa,{children:[jsx(na,{asChild:true,children:p}),jsx(Dr,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:c.alt})]},g):p},u=jsxs("div",{ref:s,className:o(Dm({size:a,className:e})),...i,children:[l.map((c,g)=>m(c,g)),d>0&&jsx(ta,{className:o(Tm({size:a})),children:jsxs(ra,{className:"bg-muted text-muted-foreground",children:["+",d]})})]});return n?jsx(aa,{delayDuration:300,children:u}):u});Lm.displayName="AvatarGroup";var Vm=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"}}),Im=Y.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:a,max:n=5,size:i,icon:s="star",allowHalf:l=false,readOnly:d=false,disabled:m=false,filledColor:u,emptyColor:c,...g},p)=>{let[x,y]=Y.useState(r),[f,h]=Y.useState(null),R=t!==void 0,b=R?t:x,v=f!==null?f:b,P=L=>{d||m||(R||y(L),a?.(L));},w=(L,I=false)=>{let V=l&&I?L+.5:L+1;P(V);},S=(L,I)=>{if(d||m)return;let V=L.currentTarget.getBoundingClientRect(),D=l&&L.clientX<V.left+V.width/2;h(D?I+.5:I+1);},C=()=>{h(null);},M=s==="heart"?Heart:Star,N=L=>v>=L+1?"full":v>=L+.5?"half":"empty",T=u?{color:u,fill:u}:{},k=c?{color:c}:{};return jsx("div",{ref:p,className:o(Vm({size:i,className:e}),m&&"opacity-50 cursor-not-allowed"),onMouseLeave:C,role:"radiogroup","aria-label":"Rating",...g,children:Array.from({length:n},(L,I)=>{let V=N(I);return jsxs("button",{type:"button",className:o("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!d&&!m&&"cursor-pointer hover:scale-110 transition-transform"),onClick:D=>{let E=D.currentTarget.getBoundingClientRect(),B=l&&D.clientX<E.left+E.width/2;w(I,B);},onMouseMove:D=>S(D,I),disabled:m||d,"aria-label":`Rate ${I+1} out of ${n}`,role:"radio","aria-checked":b===I+1,children:[jsx(M,{className:o("text-muted-foreground/30",V!=="empty"&&"absolute inset-0"),style:V==="empty"?k:void 0}),V!=="empty"&&jsx(M,{className:o("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",V==="half"&&"clip-path-half"),style:{...T,clipPath:V==="half"?"inset(0 50% 0 0)":void 0}})]},I)})})});Im.displayName="Rating";var Q0="16rem",eR="18rem",tR="3rem",rR="b",xs=Y.createContext(null);function In(){let e=Y.useContext(xs);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function ys(){return Y.useContext(xs)}var Hm=Y.forwardRef(({defaultOpen:e=true,open:t,onOpenChange:r,className:a,style:n,children:i,...s},l)=>{let[d,m]=Y.useState(false),[u,c]=Y.useState(false),[g,p]=Y.useState(e),x=t??g,y=Y.useCallback(b=>{let v=typeof b=="function"?b(x):b;r?r(v):p(v);},[r,x]);Y.useEffect(()=>{let b=()=>{m(window.innerWidth<768);};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);let f=Y.useCallback(()=>d?c(b=>!b):y(b=>!b),[d,y,c]);Y.useEffect(()=>{let b=v=>{v.key===rR&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),f());};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[f]);let h=x?"expanded":"collapsed",R=Y.useMemo(()=>({state:h,open:x,setOpen:y,isMobile:d,openMobile:u,setOpenMobile:c,toggleSidebar:f}),[h,x,y,d,u,c,f]);return jsx(xs.Provider,{value:R,children:jsx(aa,{delayDuration:0,children:jsx("div",{ref:l,style:{"--sidebar-width":Q0,"--sidebar-width-icon":tR,...n},className:o("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",a),...s,children:i})})})});Hm.displayName="SidebarProvider";var Am=Y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",embedded:a=false,resizable:n=false,minWidth:i=200,maxWidth:s=480,defaultWidth:l=256,onWidthChange:d,className:m,children:u,...c},g)=>{let[p,x]=Y.useState(l),[y,f]=Y.useState(false),h=Y.useRef(null),R=Y.useCallback(S=>{S.preventDefault(),f(true);},[]);if(Y.useEffect(()=>{if(!y)return;let S=M=>{if(!h.current)return;let N=h.current.getBoundingClientRect(),T;e==="left"?T=M.clientX-N.left:T=N.right-M.clientX,T=Math.max(i,Math.min(s,T)),x(T),d?.(T);},C=()=>{f(false);};return document.addEventListener("mousemove",S),document.addEventListener("mouseup",C),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",C);}},[y,e,i,s,d]),r==="none"){if(n){let S={width:`${p}px`,minWidth:`${i}px`,maxWidth:`${s}px`};return jsxs("div",{ref:C=>{typeof g=="function"?g(C):g&&(g.current=C),h.current=C;},className:o("relative text-sidebar-foreground h-full min-h-0",y&&"select-none"),"data-sidebar":"sidebar-wrapper","data-resizing":y,children:[jsx("div",{className:o("flex h-full min-h-0 flex-col bg-sidebar overflow-hidden",!y&&"transition-all duration-200 ease-in-out",e==="left"&&"border-r-0",e==="right"&&"border-l-0",m),style:S,...c,children:u}),jsx("div",{onMouseDown:R,className:o("absolute top-0 bottom-0 z-20 w-1 cursor-ew-resize",e==="left"?"right-0":"left-0"),"data-sidebar":"resize-handle",children:jsx("div",{className:o("absolute top-0 bottom-0 w-px transition-colors",e==="left"?"right-0":"left-0","bg-sidebar-border")})})]})}return jsx("div",{ref:g,className:o("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",m),style:{"--sidebar-width":"16rem"},...c,children:u})}let{isMobile:b,state:v,openMobile:P,setOpenMobile:w}=In();if(b&&!a)return jsx(So,{open:P,onOpenChange:w,children:jsx(Aa,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":eR},side:e,children:jsx("div",{className:"flex h-full w-full flex-col",children:u})})});if(a){let S=v==="collapsed",C=r==="offcanvas",M=r==="icon",N=n&&!S&&!M?{width:`${p}px`,minWidth:`${i}px`,maxWidth:`${s}px`}:void 0;return jsxs("div",{ref:T=>{typeof g=="function"?g(T):g&&(g.current=T),h.current=T;},className:o("group peer text-sidebar-foreground relative",y&&"select-none"),"data-state":v,"data-collapsible":S?r:"","data-variant":t,"data-side":e,"data-embedded":"true","data-resizing":y,children:[jsx("div",{className:o("flex h-full flex-col overflow-hidden",!y&&"transition-[width,opacity] duration-200 ease-out",!n&&(C?S?"w-0 opacity-0":"w-[--sidebar-width] opacity-100":M&&S?"w-[--sidebar-width-icon]":"w-[--sidebar-width]"),n&&C&&S&&"w-0 opacity-0",n&&M&&S&&"w-[--sidebar-width-icon]",m),style:N,...c,children:jsx("div",{"data-sidebar":"sidebar",className:o("flex h-full w-full flex-col bg-sidebar transition-opacity duration-200",t==="floating"&&"overflow-hidden rounded-lg border border-sidebar-border shadow-sm",t==="inset"&&"overflow-hidden rounded-lg border border-sidebar-border",t==="sidebar"&&e==="left"&&!n&&"border-r",t==="sidebar"&&e==="right"&&!n&&"border-l"),children:u})}),n&&!S&&jsx("div",{onMouseDown:R,className:o("absolute top-0 bottom-0 z-20 w-1 cursor-ew-resize",e==="left"?"right-0":"left-0"),"data-sidebar":"resize-handle",children:jsx("div",{className:o("absolute top-0 bottom-0 w-px transition-colors",e==="left"?"right-0":"left-0","bg-sidebar-border")})})]})}return jsxs("div",{ref:g,className:"group peer hidden md:block text-sidebar-foreground","data-state":v,"data-collapsible":v==="collapsed"?r:"","data-variant":t,"data-side":e,children:[jsx("div",{className:o("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),jsx("div",{className:o("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",m),...c,children:jsx("div",{"data-sidebar":"sidebar",className:o("flex h-full w-full flex-col bg-sidebar",t==="floating"&&"overflow-hidden rounded-lg border border-sidebar-border shadow-sm",t==="inset"&&"overflow-hidden rounded-lg border border-sidebar-border"),children:u})})]})});Am.displayName="Sidebar";var zm=Y.forwardRef(({className:e,onClick:t,...r},a)=>{let{toggleSidebar:n}=In();return jsxs("button",{ref:a,type:"button","data-sidebar":"trigger",className:o("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer",e),onClick:i=>{t?.(i),n();},...r,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});zm.displayName="SidebarTrigger";var Fm=Y.forwardRef(({className:e,onClick:t,showLabel:r=true,...a},n)=>{let i=ys();if(!i)return null;let{toggleSidebar:s,state:l}=i,d=l==="collapsed";return jsxs("button",{ref:n,type:"button","data-sidebar":"toggle","data-state":l,className:o("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-sidebar-foreground/70","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:m=>{t?.(m),s();},...a,children:[d?jsx(PanelLeftOpen,{className:"h-4 w-4 shrink-0"}):jsx(PanelLeftClose,{className:"h-4 w-4 shrink-0"}),r&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:d?"Expand":"Collapse"})]})});Fm.displayName="SidebarToggle";var Bm=Y.forwardRef(({className:e,onClick:t,expandedLabel:r="Collapse",collapsedLabel:a="Expand",...n},i)=>{let s=ys();if(!s)return null;let{toggleSidebar:l,state:d}=s,m=d==="collapsed";return jsxs(Fragment,{children:[jsxs("button",{ref:i,type:"button","data-sidebar":"toggle","data-state":d,className:o("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-sidebar-foreground/70","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:hidden",e),onClick:u=>{t?.(u),l();},...n,children:[m?jsx(PanelLeftOpen,{className:"h-4 w-4 shrink-0"}):jsx(PanelLeftClose,{className:"h-4 w-4 shrink-0"}),jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:m?a:r})]}),jsxs("button",{type:"button","data-sidebar":"floating-toggle","data-state":d,className:o("fixed left-3 bottom-4 z-50 flex items-center justify-center h-10 w-10 rounded-lg","bg-sidebar border border-sidebar-border shadow-md","text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","transition-all duration-200 cursor-pointer","opacity-0 pointer-events-none scale-90","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:opacity-100","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:pointer-events-auto","group-data-[collapsible=offcanvas]:group-data-[state=collapsed]:scale-100"),onClick:u=>{t?.(u),l();},children:[jsx(PanelLeftOpen,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:a})]})]})});Bm.displayName="SidebarPersistentToggle";var Om=Y.forwardRef(({className:e,...t},r)=>{let{toggleSidebar:a}=In();return jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:o("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Om.displayName="SidebarRail";var Gm=Y.forwardRef(({className:e,...t},r)=>jsx("main",{ref:r,className:o("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}));Gm.displayName="SidebarInset";var Wm=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"header",className:o("flex flex-col gap-2 p-2",e),...t}));Wm.displayName="SidebarHeader";var $m=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"footer",className:o("flex flex-col gap-2 p-2",e),...t}));$m.displayName="SidebarFooter";var _m=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"separator",className:o("mx-2 h-px w-auto bg-sidebar-border",e),...t}));_m.displayName="SidebarSeparator";var Km=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"content",className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Km.displayName="SidebarContent";var Ym=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"group",className:o("relative flex w-full min-w-0 flex-col p-2",e),...t}));Ym.displayName="SidebarGroup";var jm=Y.forwardRef(({className:e,asChild:t=false,...r},a)=>jsx(t?Slot:"div",{ref:a,"data-sidebar":"group-label",className:o("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r}));jm.displayName="SidebarGroupLabel";var Um=Y.forwardRef(({className:e,asChild:t=false,...r},a)=>jsx(t?Slot:"button",{ref:a,"data-sidebar":"group-action",className:o("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r}));Um.displayName="SidebarGroupAction";var Xm=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"group-content",className:o("w-full text-sm",e),...t}));Xm.displayName="SidebarGroupContent";var qm=Y.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,"data-sidebar":"menu",className:o("flex w-full min-w-0 flex-col gap-1",e),...t}));qm.displayName="SidebarMenu";var Zm=Y.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,"data-sidebar":"menu-item",className:o("group/menu-item relative",e),...t}));Zm.displayName="SidebarMenuItem";var Jm=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-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:{solid:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",ghost:"hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground",soft:"hover:bg-primary/10 hover:text-primary",surface:"bg-sidebar-accent/30 hover:bg-sidebar-accent hover:text-sidebar-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:"solid",size:"md"}}),Qm=Y.forwardRef(({asChild:e=false,isActive:t=false,variant:r="solid",size:a="md",tooltip:n,className:i,...s},l)=>{let d=e?Slot:"button",m=ys(),u=m?.isMobile??false,c=m?.state??"expanded",g=jsx(d,{ref:l,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:o(Jm({variant:r,size:a}),i),...s});return n?(typeof n=="string"&&(n={children:n}),jsxs(oa,{children:[jsx(na,{asChild:true,children:g}),jsx(Dr,{side:"right",align:"center",hidden:c!=="collapsed"||u,...n})]})):g});Qm.displayName="SidebarMenuButton";var eu=Y.forwardRef(({className:e,asChild:t=false,showOnHover:r=false,...a},n)=>jsx(t?Slot:"button",{ref:n,"data-sidebar":"menu-action",className:o("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...a}));eu.displayName="SidebarMenuAction";var tu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-sidebar":"menu-badge",className:o("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));tu.displayName="SidebarMenuBadge";var ru=Y.forwardRef(({className:e,showIcon:t=false,...r},a)=>{let n=Y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:o("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&jsx("div",{className:"size-4 rounded-md bg-sidebar-accent animate-pulse"}),jsx("div",{className:"h-4 flex-1 max-w-[--skeleton-width] bg-sidebar-accent animate-pulse rounded-md",style:{"--skeleton-width":n}})]})});ru.displayName="SidebarMenuSkeleton";var au=Y.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:o("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));au.displayName="SidebarMenuSub";var ou=Y.forwardRef(({...e},t)=>jsx("li",{ref:t,...e}));ou.displayName="SidebarMenuSubItem";var nu=Y.forwardRef(({asChild:e=false,size:t="md",isActive:r,className:a,...n},i)=>jsx(e?Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:o("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),...n}));nu.displayName="SidebarMenuSubButton";var lu=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",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"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:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),nR=cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),du=Y.forwardRef(({className:e,variant:t,color:r,size:a,radius:n,clickable:i,startContent:s,endContent:l,closable:d,onClose:m,disabled:u,avatar:c,children:g,onClick:p,...x},y)=>{let f=i||!!p,h=R=>{R.stopPropagation(),m?.();};return jsxs("div",{ref:y,role:f?"button":void 0,tabIndex:f&&!u?0:void 0,"aria-disabled":u,onClick:u?void 0:p,onKeyDown:f&&!u?R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p?.(R));}:void 0,className:o(lu({variant:t,color:r,size:a,radius:n,clickable:f}),u&&"opacity-50 cursor-not-allowed",e),...x,children:[c&&jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:c}),s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:g}),l&&jsx("span",{className:"shrink-0",children:l}),d&&jsx("button",{type:"button","aria-label":"Remove",onClick:h,disabled:u,className:o(nR({size:a})),children:jsx(X$1,{})})]})});du.displayName="Chip";var cu=createContext({direction:"horizontal"}),pR=({className:e,direction:t="horizontal",children:r,...a})=>jsx(cu.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:o("flex h-full w-full data-[orientation=vertical]:flex-col",e),...a,children:r})}),fR=Panel,gR=({withHandle:e,className:t,...r})=>{let{direction:a}=useContext(cu),n=a==="vertical";return jsx(Separator,{className:o("relative flex shrink-0 items-center justify-center bg-border outline-none",n?"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),...r,children:e&&jsx("div",{className:o("z-10 flex items-center justify-center rounded-sm border bg-border",n?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var pu=cva("inline-flex items-center gap-1",{variants:{size:{sm:"[&>span]:h-1 [&>span]:w-1",md:"[&>span]:h-1.5 [&>span]:w-1.5",lg:"[&>span]:h-2 [&>span]:w-2",xl:"[&>span]:h-3 [&>span]:w-3"}},defaultVariants:{size:"md"}}),fu=Y.forwardRef(({className:e,size:t,count:r=3,...a},n)=>jsx("span",{ref:n,role:"status","aria-label":"Loading",className:o(pu({size:t,className:e})),...a,children:Array.from({length:r}).map((i,s)=>jsx("span",{className:"rounded-full bg-current animate-dots-bounce",style:{animationDelay:`${s*.16}s`}},s))}));fu.displayName="Dots";var vu=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-14 w-14"},color:{default:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),hR={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:40,strokeWidth:4,fontSize:"text-xs"},lg:{size:56,strokeWidth:5,fontSize:"text-sm"}},gu={default:"#18181b",success:"#16a34a",warning:"#d97706",danger:"#dc2626"},hu=Y.forwardRef(({className:e,size:t="md",color:r="default",value:a,showValue:n=false,trackClassName:i,...s},l)=>{let d=a===void 0,m=Math.min(100,Math.max(0,a??0)),u=hR[t],c=(u.size-u.strokeWidth)/2,g=2*Math.PI*c,p=g-m/100*g,x=g*.3;return jsxs("div",{ref:l,className:o(vu({size:t,color:r}),e),role:"progressbar","aria-valuenow":d?void 0:m,"aria-valuemin":0,"aria-valuemax":100,...s,children:[jsxs("svg",{width:u.size,height:u.size,viewBox:`0 0 ${u.size} ${u.size}`,fill:"none",style:d?{animation:"circular-spin 0.8s linear infinite"}:void 0,children:[jsx("style",{children:`
|
|
32
32
|
@keyframes circular-spin {
|
|
33
33
|
0% { transform: rotate(0deg); }
|
|
34
34
|
100% { transform: rotate(360deg); }
|
|
35
35
|
}
|
|
36
|
-
`}),jsx("circle",{className:o("stroke-muted",i),cx:u.size/2,cy:u.size/2,r:c,strokeWidth:u.strokeWidth,fill:"none"}),jsx("circle",{cx:u.size/2,cy:u.size/2,r:c,strokeWidth:u.strokeWidth,fill:"none",strokeLinecap:"round",stroke:gu[r]||gu.default,strokeDasharray:d?`${x} ${g-x}`:`${g} ${g}`,strokeDashoffset:d?0:p,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:d?void 0:"stroke-dashoffset 0.3s ease-in-out"}})]}),n&&!d&&jsxs("span",{className:o("absolute font-medium text-foreground",u.fontSize),children:[Math.round(m),"%"]})]})});hu.displayName="CircularProgress";var xu=Y.createContext(null),RR=()=>{let e=Y.useContext(xu);if(!e)throw new Error("OTP components must be used within InputOTP");return e},yu=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"}}),Ru=Y.forwardRef(({className:e,containerClassName:t,maxLength:r,value:a,defaultValue:n="",onChange:i,onComplete:s,pattern:l,disabled:d=false,size:m,children:u,...c},g)=>{let[p,x]=Y.useState(n),[y,f]=Y.useState(0),[h,R]=Y.useState(false),b=Y.useRef(null),v=a!==void 0?a:p;Y.useImperativeHandle(g,()=>b.current),Y.useEffect(()=>{f(Math.min(v.length,r-1));},[v,r]),Y.useEffect(()=>{v.length===r&&s&&s(v);},[v,r,s]);let P=T=>{let k=T.target.value;if(l&&k){let L=new RegExp(l.replace("^","").replace("$","").replace("+",""));k=k.split("").filter(I=>L.test(I)).join("");}k=k.slice(0,r),a===void 0&&x(k),i?.(k);},w=T=>{T.key==="ArrowLeft"?f(k=>Math.max(0,k-1)):T.key==="ArrowRight"&&f(k=>Math.min(v.length,r-1,k+1));},S=()=>{b.current?.focus();},C=()=>{R(true),f(Math.min(v.length,r-1));},M=()=>{R(false);},N={value:v,activeIndex:h?y:-1,maxLength:r,disabled:d};return jsx(xu.Provider,{value:N,children:jsxs("div",{className:o(yu({size:m}),t),onClick:S,"data-otp-container":true,children:[jsx("input",{ref:b,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:v,onChange:P,onKeyDown:w,onFocus:C,onBlur:M,disabled:d,maxLength:r,className:o("absolute opacity-0 pointer-events-none w-0 h-0",e),...c}),u]})})});Ru.displayName="InputOTP";var wu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex items-center",e),...t}));wu.displayName="InputOTPGroup";var Nu=Y.forwardRef(({index:e,className:t,...r},a)=>{let{value:n,activeIndex:i,disabled:s}=RR(),l=n[e]||"",d=i===e,m=d&&n.length===e;return jsxs("div",{ref:a,"data-otp-slot":true,"data-active":d,"data-filled":!!l,className:o("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",d&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...r,children:[l,m&&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"})})]})});Nu.displayName="InputOTPSlot";var Pu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:o("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Pu.displayName="InputOTPSeparator";var Tu=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent text-foreground",soft:"bg-primary/15 text-primary",surface:"bg-muted text-muted-foreground"},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:"soft",size:"md"}}),Su=Y.forwardRef(({className:e,variant:t,size:r,value:a=[],onChange:n,placeholder:i="Add tag...",maxTags:s,minTagLength:l=1,maxTagLength:d=50,triggerKeys:m=["Enter",",","Tab"],allowDuplicates:u=false,disabled:c,readOnly:g,renderTag:p,...x},y)=>{let[f,h]=Y.useState(""),R=Y.useRef(null);Y.useImperativeHandle(y,()=>R.current);let b=N=>{let T=N.trim();if(T.length<l||T.length>d||s&&a.length>=s||!u&&a.some(L=>L.text.toLowerCase()===T.toLowerCase()))return;let k={id:crypto.randomUUID(),text:T};n?.([...a,k]),h("");},v=N=>{c||g||n?.(a.filter(T=>T.id!==N));},P=N=>{if(m.includes(N.key)){if(N.key==="Tab"&&!f)return;N.preventDefault(),b(f);}N.key==="Backspace"&&!f&&a.length>0&&v(a[a.length-1].id);},w=N=>{let T=N.target.value;if(T.includes(",")){T.split(",").forEach(L=>{L.trim()&&b(L);});return}h(T);},S=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(L=>{b(L);});},C=()=>{R.current?.focus();},M=s?a.length>=s:false;return jsxs("div",{className:o("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",c&&"cursor-not-allowed opacity-50",e),onClick:C,children:[a.map(N=>p?p(N,()=>v(N.id)):jsxs("span",{className:o(Tu({variant:t,size:r})),children:[N.text,!c&&!g&&jsx("button",{type:"button",onClick:T=>{T.stopPropagation(),v(N.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${N.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},N.id)),!M&&!g&&jsx("input",{ref:R,type:"text",value:f,onChange:w,onKeyDown:P,onPaste:S,placeholder:a.length===0?i:"",disabled:c,className:o("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...x})]})});Su.displayName="TagInput";var Du=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"}}),Lu=Y.forwardRef(({className:e,size:t,icon:r,title:a,description:n,action:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o(Du({size:t,className:e})),...l,children:[r&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:r}),a&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:a}),n&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),i&&jsx("div",{className:"mt-2",children:i}),s]}));Lu.displayName="EmptyState";var Iu=cva("rounded-lg border bg-card p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent",ghost:"border-transparent shadow-none",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-muted"}},defaultVariants:{variant:"outline"}}),Eu=Y.forwardRef(({className:e,variant:t,label:r,value:a,icon:n,trend:i,trendValue:s,description:l,...d},m)=>{let u=i==="up"?TrendingUp:i==="down"?TrendingDown:Minus,c=i==="up"?"text-green-500":i==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:m,className:o(Iu({variant:t,className:e})),...d,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:"text-sm font-medium text-muted-foreground",children:r}),n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:n})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:a}),i&&s&&jsxs("span",{className:o("flex items-center gap-0.5 text-sm",c),children:[jsx(u,{className:"h-3 w-3"}),s]})]}),l&&jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:l})]})});Eu.displayName="StatCard";var Au=cva("flex flex-col",{variants:{variant:{default:"",bordered:"divide-y divide-border rounded-lg border",striped:"[&>*:nth-child(odd)]:bg-muted/50"},size:{sm:"gap-1 [&>*]:py-2 [&>*]:px-3",md:"gap-2 [&>*]:py-3 [&>*]:px-4",lg:"gap-3 [&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),zu=Y.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsx("div",{ref:n,role:"list",className:o(Au({variant:t,size:r,className:e})),...a}));zu.displayName="List";var Fu=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),Bu=Y.forwardRef(({className:e,interactive:t,leading:r,trailing:a,children:n,...i},s)=>jsxs("div",{ref:s,role:"listitem",className:o(Fu({interactive:t,className:e})),...i,children:[r&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:r}),jsx("div",{className:"flex-1 min-w-0",children:n}),a&&jsx("div",{className:"flex-shrink-0",children:a})]}));Bu.displayName="ListItem";var Ou=Y.forwardRef(({className:e,primary:t,secondary:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("min-w-0",e),...n,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),r&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:r}),a]}));Ou.displayName="ListItemText";var $u=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),_u=Y.forwardRef(({className:e,position:t,...r},a)=>jsx("div",{ref:a,"data-position":t,className:o($u({position:t,className:e})),...r}));_u.displayName="Timeline";var Ku=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"}}),Yu=Y.forwardRef(({className:e,variant:t,...r},a)=>jsx("div",{ref:a,className:o(Ku({variant:t,className:e})),...r}));Yu.displayName="TimelineItem";var ju=Y.forwardRef(({className:e,dot:t,showConnector:r=true,...a},n)=>jsxs("div",{ref:n,className:o("flex flex-col items-center",e),...a,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:t}),r&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}));ju.displayName="TimelineSeparator";var Uu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex-1 pt-0.5",e),...t}));Uu.displayName="TimelineContent";var Xu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Xu.displayName="TimelineOpposite";var Zu=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}}),Ju=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 data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"}},defaultVariants:{size:"md"}}),Qu=Y.createContext({}),ep=Y.forwardRef(({className:e,size:t,fullWidth:r,children:a,...n},i)=>jsx(za.Root,{ref:i,type:"single",rovingFocus:false,className:o(Zu({size:t,fullWidth:r,className:e})),...n,children:jsx(Qu.Provider,{value:{size:t??"md"},children:a})}));ep.displayName="SegmentedControl";var tp=Y.forwardRef(({className:e,children:t,...r},a)=>{let{size:n}=Y.useContext(Qu);return jsx(za.Item,{ref:a,className:o(Ju({size:n}),"flex-1",e),...r,children:t})});tp.displayName="SegmentedControlItem";var rp=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"}}),ap=e=>{let t=e.type;return t.startsWith("image/")?Image: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},Fn=e=>{if(e===0)return "0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,a)).toFixed(2))+" "+r[a]},op=(e,t,r)=>{let a=[];return t&&e.size>t&&a.push({code:"file-too-large",message:`File is larger than ${Fn(t)}`}),r&&r.length>0&&(r.some(i=>{if(i.startsWith("."))return e.name.toLowerCase().endsWith(i.toLowerCase());if(i.endsWith("/*")){let s=i.slice(0,-2);return e.type.startsWith(s)}return e.type===i})||a.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${r.join(", ")}`})),a},np=Y.forwardRef(({className:e,variant:t,size:r,onFilesChange:a,onFilesRejected:n,onFileRemove:i,files:s=[],showFileList:l=true,children:d,maxSize:m=10*1024*1024,accept:u,multiple:c=true,disabled:g,...p},x)=>{let[y,f]=Y.useState(false),[h,R]=Y.useState(false),[b,v]=Y.useState([]),P=Y.useRef(null),w=Y.useCallback(D=>{if(!D||D.length===0)return;let E=Array.from(D),B=[],W=[];(c?E:[E[0]]).forEach(U=>{let $=op(U,m,u);$.length>0?W.push({file:U,errors:$}):B.push(U);}),v(W),B.length>0&&a?.(B),W.length>0&&n?.(W);},[m,u,c,a,n]),S=Y.useCallback(D=>{if(D.preventDefault(),D.stopPropagation(),!g&&(f(true),D.dataTransfer.items)){let B=Array.from(D.dataTransfer.items).some(W=>{if(W.kind!=="file")return true;if(u&&u.length>0){let H=W.type;return !u.some(U=>U.endsWith("/*")?H.startsWith(U.slice(0,-2)):H===U)}return false});R(B);}},[g,u]),C=Y.useCallback(D=>{D.preventDefault(),D.stopPropagation(),!g&&(D.dataTransfer.dropEffect="copy");},[g]),M=Y.useCallback(D=>{D.preventDefault(),D.stopPropagation();let E=D.currentTarget.getBoundingClientRect(),B=D.clientX,W=D.clientY;(B<E.left||B>E.right||W<E.top||W>E.bottom)&&(f(false),R(false));},[]),N=Y.useCallback(D=>{D.preventDefault(),D.stopPropagation(),f(false),R(false),!g&&w(D.dataTransfer.files);},[g,w]),T=Y.useCallback(()=>{g||P.current?.click();},[g]),k=Y.useCallback(D=>{w(D.target.files),D.target.value="";},[w]),L=Y.useCallback(D=>{g||(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),P.current?.click());},[g]),I=h?"error":y?"active":t,V=u?.join(",");return jsxs("div",{ref:x,className:o("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:g?-1:0,onDragEnter:S,onDragOver:C,onDragLeave:M,onDrop:N,onClick:T,onKeyDown:L,className:o(rp({variant:I,size:r}),g&&"opacity-50 cursor-not-allowed",!g&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),"aria-disabled":g,children:[jsx("input",{ref:P,type:"file",accept:V,multiple:c,disabled:g,onChange:k,className:"sr-only",tabIndex:-1}),d||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:y?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[m&&`Max ${Fn(m)}`,u&&u.length>0&&` \u2022 ${u.join(", ")}`]})]})]})]}),b.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:b.map(({file:D,errors:E})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:D.name}),":"," ",E.map(B=>B.message).join(", ")]},D.name))}),l&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(D=>{let E=ap(D.file);return jsxs("div",{className:o("flex items-center gap-3 rounded-lg border p-3",D.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(E,{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:D.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[Fn(D.file.size),D.error&&jsx("span",{className:"ml-2 text-danger",children:D.error})]}),D.progress!==void 0&&D.progress<100&&jsx(Mn,{value:D.progress,className:"mt-2 h-1"})]}),jsxs(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:B=>{B.stopPropagation(),i?.(D.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},D.id)})})]})});np.displayName="FileUpload";var OR=`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")`,sp=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}}),Fo=Y.forwardRef(({color:e,isSelected:t,showTransparency:r=true,onSelect:a,size:n,shape:i,interactive:s,className:l,onClick:d,disabled:m,...u},c)=>jsx("button",{ref:c,type:"button",disabled:m,onClick:x=>{d?.(x),a?.(e);},className:o(sp({size:n,shape:i,interactive:s??(!!a||!!d)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:r?OR:void 0,backgroundSize:r?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...u,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Fo.displayName="ColorSwatch";var lp=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),dp=Y.forwardRef(({value:e,defaultValue:t,onChange:r,layout:a,columns:n=6,colors:i,swatchSize:s="md",swatchShape:l="square",disabled:d,className:m,style:u,...c},g)=>{let[p,x]=Y.useState(t),y=e??p,f=Y.useCallback(R=>{d||(e===void 0&&x(R),r?.(R));},[e,r,d]),h=R=>R.toLowerCase();return jsx("div",{ref:g,role:"listbox","aria-label":"Color options",className:o(lp({layout:a}),m),style:{...a==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},...u},...c,children:i.map(R=>{let b=y?h(y)===h(R):false;return jsx(Fo,{role:"option",color:R,size:s,shape:l,isSelected:b,onSelect:f,disabled:d,"aria-selected":b},R)})})});dp.displayName="ColorSwatchPicker";var $R=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],cp={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},mp=Y.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:a,presets:n=$R,showInput:i=true,size:s="md",className:l,variant:d="full"},m)=>{let[u,c]=Y.useState(e??t),g=Y.useId();Y.useEffect(()=>{e!==void 0&&c(e);},[e]);let p=f=>{c(f),r?.(f);},x=f=>{c(f),r?.(f);},y=f=>{let h=f.target.value.toUpperCase();c(h),r?.(h);};return d==="simple"?jsxs("label",{className:o("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",a&&"opacity-50 cursor-not-allowed",cp[s],l),children:[jsx("input",{type:"color",value:u,onChange:y,disabled:a,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:g}),jsx("div",{className:"h-full w-full",style:{backgroundColor:u}})]}):jsxs(Ie,{children:[jsx($e,{asChild:true,children:jsx("button",{ref:m,disabled:a,className:o("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",cp[s],l),style:{backgroundColor:u},"aria-label":`Color picker, current color: ${u}`})}),jsx(Me,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:u,onChange:p,className:"!w-[200px]"}),i&&jsxs("div",{className:"space-y-1.5",children:[jsx(ea,{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:u}}),jsx(HexColorInput,{id:"color-input",color:u,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),n.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(ea,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(f=>jsx(Fo,{color:f,size:"sm",isSelected:u.toLowerCase()===f.toLowerCase(),onSelect:x},f))})]})]})})]})});mp.displayName="ColorPicker";var up=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"}}),Cs=e=>String(e).padStart(2,"0"),UR=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},XR=(e,t)=>`${Cs(e)}:${Cs(t)}`,pp=Y.forwardRef(({className:e,size:t,value:r,onChange:a,use24Hour:n=true,minuteStep:i=1,showPicker:s=true,minTime:l,maxTime:d,disabled:m,...u},c)=>{let[g,p]=Y.useState(r??""),[x,y]=Y.useState(false);Y.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:f,minutes:h}=UR(g||"00:00"),R=M=>{let N=M.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&a?.(N);},b=(M,N)=>{let T=Math.max(0,Math.min(23,M)),k=Math.max(0,Math.min(59,N)),L=XR(T,k);p(L),a?.(L);},v=()=>b(f+1,h),P=()=>b(f-1,h),w=()=>b(f,h+i),S=()=>b(f,h-i),C=({value:M,onIncrement:N,onDecrement:T})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:N,disabled:m,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:Cs(M)}),jsx(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:T,disabled:m,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:c,type:"time",value:g,onChange:R,disabled:m,className:o(up({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...u}),s&&jsxs(Ie,{open:x,onOpenChange:y,children:[jsx($e,{asChild:true,children:jsxs(_,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:m,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxs(Me,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(C,{value:f,onIncrement:v,onDecrement:P,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(C,{value:h,onIncrement:w,onDecrement:S,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(_,{variant:"bordered",size:"sm",onClick:()=>{let M=new Date;b(M.getHours(),M.getMinutes());},children:"Now"}),jsx(_,{size:"sm",onClick:()=>y(false),children:"Done"})]})]})]})]})});pp.displayName="TimeInput";var fp=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"}}),ZR=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}},Ms=(e,t,r,a)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${l}${a}${s}`:l},gp=(e,t,r)=>{if(!e)return;let a=e.replace(new RegExp(`\\${t}`,"g"),"");a=a.replace(r,"."),a=a.replace(/[^0-9.-]/g,"");let n=parseFloat(a);return isNaN(n)?void 0:n},bp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,currency:i="USD",locale:s="en-US",decimals:l=2,min:d,max:m,showCurrency:u=true,currencyPosition:c="prefix",currencySymbol:g,thousandSeparator:p=",",decimalSeparator:x=".",disabled:y,placeholder:f,...h},R)=>{let[b,v]=Y.useState(a),[P,w]=Y.useState(""),[S,C]=Y.useState(false),M=r!==void 0?r:b,N=g??ZR(i,s);Y.useEffect(()=>{!S&&M!==void 0&&w(Ms(M,l,p,x));},[M,l,p,x,S]);let T=D=>{let E=D.target.value;if(!E){w(""),r===void 0&&v(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${x}.-]*$`).test(E))return;w(E);let W=gp(E,p,x);if(W!==void 0){let H=W;d!==void 0&&W<d&&(H=d),m!==void 0&&W>m&&(H=m),r===void 0&&v(H),n?.(H);}},k=()=>{C(true),M!==void 0&&w(M.toString().replace(".",x));},L=()=>{C(false),w(M!==void 0?Ms(M,l,p,x):"");},I=u&&c==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:N}),V=u&&c==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:N});return jsxs("div",{className:"relative flex items-center",children:[I&&jsx("div",{className:"absolute left-3 pointer-events-none",children:I}),jsx("input",{ref:R,type:"text",inputMode:"decimal",value:P,onChange:T,onFocus:k,onBlur:L,disabled:y,placeholder:f??`0${x}${"0".repeat(l)}`,className:o(fp({size:t}),I&&"pl-8",V&&"pr-8","text-right",e),style:{borderColor:S?"var(--color-foreground)":void 0},...h}),V&&jsx("div",{className:"absolute right-3 pointer-events-none",children:V})]})});bp.displayName="CurrencyInput";var vp=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"}}),Ts={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:"#####-####"}},ew=(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}},Br=e=>["#","A","*"].includes(e),On=(e,t,r)=>{let a="",n=0;for(let i=0;i<t.length&&n<=e.length;i++){let s=t[i];if(Br(s)){if(n<e.length){let l=e[n];ew(l,s)?(a+=l,n++):(n++,i--);}}else (n<e.length||r)&&(a+=s);}return a},Ss=(e,t)=>{let r="";for(let a=0;a<e.length&&a<t.length;a++){let n=t[a];Br(n)&&(r+=e[a]);}return r},hp=(e,t)=>e.split("").map(r=>Br(r)?t:r).join(""),tw=(e,t,r)=>{let a=0;for(let l=0;l<r&&l<e.length&&l<t.length;l++)Br(t[l])&&a++;let i=0,s=0;for(let l=0;l<t.length&&s<a;l++)i++,Br(t[l])&&s++;for(;i<t.length&&!Br(t[i]);)i++;return Math.min(i,e.length)},xp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,mask:i,maskPlaceholder:s="_",showMaskPlaceholder:l=false,includeMaskChars:d=false,disabled:m,placeholder:u,...c},g)=>{let p=typeof i=="string"&&i in Ts?Ts[i].mask:i,[x,y]=Y.useState(a),[f,h]=Y.useState(""),[R,b]=Y.useState(false),v=Y.useRef(null),P=r!==void 0?r:x;Y.useImperativeHandle(g,()=>v.current),Y.useEffect(()=>{let M=On(P,p,true);h(M);},[P,p]);let w=M=>{let N=M.target.value,T=M.target.selectionStart??0,k=N.replace(/[^\w]/g,""),L=On(k,p,true),I=Ss(L,p);h(L),r===void 0&&y(d?L:I),n?.(I,L),requestAnimationFrame(()=>{if(v.current){let V=tw(L,p,T);v.current.setSelectionRange(V,V);}});},S=M=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(M.key)||M.ctrlKey||M.metaKey)return;let N=v.current;if(!N)return;let T=N.selectionStart??0;if(M.key==="Backspace"&&T>0){let k=T-1;for(;k>0&&!Br(p[k]);)k--;let L=Ss(f,p),I=0;for(let E=0;E<k&&E<p.length;E++)Br(p[E])&&I++;let V=L.slice(0,Math.max(0,I-1))+L.slice(I),D=On(V,p,true);h(D),r===void 0&&y(d?D:V),n?.(V,D),M.preventDefault(),requestAnimationFrame(()=>{v.current&&v.current.setSelectionRange(k,k);});}},C=l?hp(p,s):u;return jsx("input",{ref:v,type:"text",value:f,onChange:w,onKeyDown:S,onFocus:()=>b(true),onBlur:()=>b(false),disabled:m,placeholder:C,className:o(vp({size:t}),e),style:{borderColor:R?"var(--color-foreground)":void 0},...c})});xp.displayName="MaskedInput";var yp=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"}}),$n={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},Ds={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},ks=(e,t)=>String(e).padStart(t,"0"),Wn=(e,t)=>{let r=ks(e.getDate(),2),a=ks(e.getMonth()+1,2),n=ks(e.getFullYear(),4),i=$n[t],s=Ds[t],l={day:r,month:a,year:n};return s.map(d=>l[d]).join(i)},Rp=(e,t)=>{let r=$n[t],a=e.split(r);if(a.length!==3)return null;let n=Ds[t],i={};if(n.forEach((l,d)=>{i[l]=parseInt(a[d],10);}),isNaN(i.day)||isNaN(i.month)||isNaN(i.year)||i.month<1||i.month>12||i.day<1||i.day>31||i.year<1e3||i.year>9999)return null;let s=new Date(i.year,i.month-1,i.day);return s.getFullYear()!==i.year||s.getMonth()!==i.month-1||s.getDate()!==i.day?null:s},nw=e=>e.toLowerCase(),iw=e=>{let t=$n[e];return Ds[e].map(a=>a==="year"?"####":"##").join(t)},wp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,format:i="DD/MM/YYYY",minDate:s,maxDate:l,showIcon:d=true,disabled:m,placeholder:u,...c},g)=>{let[p,x]=Y.useState(a??null),[y,f]=Y.useState(""),[h,R]=Y.useState(null),b=Y.useRef(null),v=r!==void 0?r:p;Y.useImperativeHandle(g,()=>b.current),Y.useEffect(()=>{v?(f(Wn(v,i)),R(null)):f("");},[v,i]);let P=$n[i],w=iw(i),S=N=>{let T=N.target.value;T=T.replace(new RegExp(`[^0-9\\${P}]`,"g"),"");let k=T.replace(new RegExp(`\\${P}`,"g"),""),L="",I=0;for(let V=0;V<w.length&&I<k.length;V++)w[V]==="#"?(L+=k[I],I++):L+=w[V];if(f(L),L.length===w.length){let V=Rp(L,i);if(V){if(s&&V<s){R(`Date must be after ${Wn(s,i)}`);return}if(l&&V>l){R(`Date must be before ${Wn(l,i)}`);return}R(null),r===void 0&&x(V),n?.(V);}else R("Invalid date");}else r===void 0&&x(null),n?.(null),R(null);},C=()=>{y&&y.length!==w.length&&(f(""),R(null),r===void 0&&x(null),n?.(null));},M=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxs("div",{className:"relative",children:[jsx("input",{ref:b,type:"text",inputMode:"numeric",value:y,onChange:S,onBlur:C,disabled:m,placeholder:u??nw(i),className:o(yp({size:t}),d&&"pr-10",h&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!h,"aria-describedby":h?"date-error":void 0,...c}),d&&jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsx(Calendar,{className:o(M,"text-muted-foreground")})}),h&&jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:h})]})});wp.displayName="DateInput";var Np=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"}}),Pp=[{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:"(###) ###-####"}],_n=(e,t)=>{let r=e.replace(/\D/g,""),a="",n=0;for(let i=0;i<t.length&&n<r.length;i++)t[i]==="#"?(a+=r[n],n++):a+=t[i];return a},mw=e=>e.replace(/#/g,"_"),Cp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,country:i,defaultCountry:s="TR",onCountryChange:l,countries:d=Pp,showCountrySelect:m=true,showDialCode:u=false,disabled:c,placeholder:g,...p},x)=>{let[y,f]=Y.useState(a),[h,R]=Y.useState(i??s),[b,v]=Y.useState(false),P=r!==void 0?r:y,w=i??h,S=d.find(k=>k.code===w)??d[0],C=_n(P,S.format),M=k=>{let I=k.target.value.replace(/\D/g,"");r===void 0&&f(I);let V=_n(I,S.format),D=`${S.dialCode} ${V}`;n?.(I,D,S);};return jsxs("div",{className:"flex",children:[m&&jsxs(we.Root,{value:w,onValueChange:k=>{let L=d.find(D=>D.code===k);if(!L)return;i===void 0&&R(k),l?.(L);let I=_n(P,L.format),V=`${L.dialCode} ${I}`;n?.(P,V,L);},disabled:c,children:[jsxs(we.Trigger,{className:o("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsx(we.Value,{children:jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:S.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:S.dialCode})]})}),jsx(we.Icon,{asChild:true,children:jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}),jsx(we.Portal,{children:jsx(we.Content,{className:o("relative z-50 max-h-[300px] min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1"),position:"popper",children:jsx(we.Viewport,{className:"p-1 h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",children:d.map(k=>jsxs(we.Item,{value:k.code,className:"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(we.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),jsx(we.ItemText,{children:jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:k.flag}),jsx("span",{className:"flex-1",children:k.name}),jsx("span",{className:"text-xs text-muted-foreground",children:k.dialCode})]})})]},k.code))})})})]}),jsxs("div",{className:"relative flex-1",children:[u&&!m&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:S.dialCode}),jsx("input",{ref:x,type:"tel",inputMode:"tel",value:C,onChange:M,onFocus:()=>v(true),onBlur:()=>v(false),disabled:c,placeholder:g??mw(S.format),className:o(Np({size:t}),m&&"rounded-l-none",u&&!m&&"pl-12",e),style:{borderColor:b?"var(--color-foreground)":void 0},...p})]})]})});Cp.displayName="PhoneInput";var Tp=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",outline:"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:"outline",size:"md",sticky:false}}),Sp=Y.forwardRef(({className:e,variant:t,size:r,sticky:a,brand:n,children:i,mobileBreakpoint:s="md",...l},d)=>{let[m,u]=Y.useState(false),c={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],g={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:d,className:o(Tp({variant:t,size:r,sticky:a,className:e})),...l,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[n&&jsx("div",{className:"flex-shrink-0",children:n}),jsx("div",{className:o("items-center gap-4 flex-1 justify-end",c),children:i}),jsx("button",{type:"button",className:o("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",g),onClick:()=>u(!m),"aria-label":m?"Close menu":"Open menu","aria-expanded":m,children:m?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),m&&jsx("div",{className:o("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",g),children:i})]})});Sp.displayName="Navbar";var kp=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex items-center gap-2 font-semibold text-lg",e),...t}));kp.displayName="NavbarBrand";var Dp=Y.forwardRef(({className:e,justify:t="start",...r},a)=>{let n={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:a,className:o("flex items-center gap-4",n,e),...r})});Dp.displayName="NavbarContent";var Lp=Y.forwardRef(({className:e,isActive:t,...r},a)=>jsx("div",{ref:a,className:o("flex items-center",t&&"text-primary font-medium",e),...r}));Lp.displayName="NavbarItem";var Vp=Y.forwardRef(({className:e,isActive:t,...r},a)=>jsx("a",{ref:a,className:o("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...r}));Vp.displayName="NavbarLink";var Ep=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",outline:"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:"outline",size:"md",underline:"hover"}}),Hp=Y.forwardRef(({className:e,variant:t,size:r,underline:a,isExternal:n,showExternalIcon:i=true,isDisabled:s,children:l,...d},m)=>{let u=n?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:m,className:o(Ep({variant:t,size:r,underline:a,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...u,...d,children:[l,n&&i&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});Hp.displayName="Link";var Ap=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"}}),zp=Y.forwardRef(({className:e,position:t,threshold:r=400,icon:a,behavior:n="smooth",variant:i="solid",color:s="default",size:l="md",radius:d="full",target:m,onVisibilityChange:u,onClick:c,...g},p)=>{let[x,y]=Y.useState(false);Y.useEffect(()=>{let R=m?.current||window,b=()=>{let P=(m?.current?m.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;P!==x&&(y(P),u?.(P));};return R.addEventListener("scroll",b,{passive:true}),b(),()=>{R.removeEventListener("scroll",b);}},[r,m,x,u]);let f=R=>{m?.current?m.current.scrollTo({top:0,behavior:n}):window.scrollTo({top:0,behavior:n}),c?.(R);},h=l==="sm"?"h-4 w-4":l==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:o(Ap({position:t}),x?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(_,{ref:p,type:"button",variant:i,color:s,size:"icon",radius:d,onClick:f,"aria-label":"Back to top",className:o("shadow-lg",l==="sm"&&"h-9 w-9",l==="md"&&"h-10 w-10",l==="lg"&&"h-12 w-12"),...g,children:a||jsx(ArrowUp,{className:h})})})});zp.displayName="BackTop";var Pw=X.Menu,Cw=X.Group,Mw=X.Portal,Tw=X.Sub,Sw=X.RadioGroup,Fp=Y.forwardRef(({className:e,...t},r)=>jsx(X.Root,{ref:r,className:o("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",e),...t}));Fp.displayName=X.Root.displayName;var Bp=Y.forwardRef(({className:e,...t},r)=>jsx(X.Trigger,{ref:r,className:o("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));Bp.displayName=X.Trigger.displayName;var Op=Y.forwardRef(({className:e,inset:t,children:r,...a},n)=>jsxs(X.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));Op.displayName=X.SubTrigger.displayName;var Gp=Y.forwardRef(({className:e,...t},r)=>jsx(X.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Gp.displayName=X.SubContent.displayName;var Wp=Y.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:a=8,...n},i)=>jsx(X.Portal,{children:jsx(X.Content,{ref:i,align:t,alignOffset:r,sideOffset:a,className:o("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Wp.displayName=X.Content.displayName;var $p=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(X.Item,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));$p.displayName=X.Item.displayName;var _p=Y.forwardRef(({className:e,children:t,checked:r,...a},n)=>jsxs(X.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(X.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));_p.displayName=X.CheckboxItem.displayName;var Kp=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(X.RadioItem,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(X.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Kp.displayName=X.RadioItem.displayName;var Yp=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(X.Label,{ref:a,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Yp.displayName=X.Label.displayName;var jp=Y.forwardRef(({className:e,...t},r)=>jsx(X.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));jp.displayName=X.Separator.displayName;var Up=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Up.displayName="MenubarShortcut";var Xp=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"}}),qp=Y.forwardRef(({className:e,orientation:t,size:r,currentStep:a=0,children:n,...i},s)=>{let l=Y.Children.toArray(n);return jsx("div",{ref:s,className:o(Xp({orientation:t,size:r,className:e})),...i,children:l.map((d,m)=>Y.isValidElement(d)?Y.cloneElement(d,{...d.props,stepNumber:m+1,status:d.props.status||(m<a?"completed":m===a?"current":"upcoming"),isLast:m===l.length-1,orientation:t,size:r}):d)})});qp.displayName="Steps";var Zp=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"}}),Dw=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"}}),Lw=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"}}),Jp=Y.forwardRef(({className:e,orientation:t="horizontal",size:r="md",title:a,description:n,icon:i,status:s="upcoming",stepNumber:l,isLast:d,...m},u)=>jsxs("div",{ref:u,className:o(Zp({orientation:t,size:r,className:e}),!d&&t==="horizontal"&&"flex-1"),...m,children:[jsx("div",{className:o("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:o(Dw({status:s,size:r})),children:s==="completed"?jsx(Check,{className:r==="sm"?"h-3 w-3":r==="lg"?"h-5 w-5":"h-4 w-4"}):i||l}),(a||n)&&jsxs("div",{className:"flex flex-col",children:[a&&jsx("span",{className:o("font-medium",r==="sm"&&"text-sm",r==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:a}),n&&jsx("span",{className:o("text-muted-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm",r==="lg"&&"text-base"),children:n})]})]})}),!d&&jsx("div",{className:o(Lw({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Jp.displayName="Step";function zw({className:e,data:t,columns:r,selectable:a=false,selectedKeys:n,onSelectionChange:i,getRowKey:s=(v,P)=>String(P),sortable:l=false,sortState:d,onSortChange:m,paginated:u=false,pageSizeOptions:c=[10,20,50],paginationState:g,onPaginationChange:p,emptyContent:x="No data",loading:y=false,striped:f=false,hoverable:h=true,...R},b){let[v,P]=Y.useState(new Set),[w,S]=Y.useState({columnId:null,direction:null}),[C,M]=Y.useState({pageIndex:0,pageSize:c[0]||10}),N=n??v,T=d??w,k=g??C,L=F=>{i?i(F):P(F);},I=F=>{m?m(F):S(F);},V=F=>{p?p(F):M(F);},D=Y.useMemo(()=>{if(!T.columnId||!T.direction)return t;let F=r.find(O=>O.id===T.columnId);return F?[...t].sort((O,A)=>{let z=F.accessor(O),ee=F.accessor(A);if(z===ee)return 0;if(z==null)return 1;if(ee==null)return -1;let J=String(z).localeCompare(String(ee),void 0,{numeric:true});return T.direction==="asc"?J:-J}):t},[t,T,r]),E=Y.useMemo(()=>{if(!u)return D;let F=k.pageIndex*k.pageSize;return D.slice(F,F+k.pageSize)},[D,u,k]),B=Math.ceil(D.length/k.pageSize),W=F=>{if(F){let O=new Set(E.map((A,z)=>s(A,z)));L(O);}else L(new Set);},H=(F,O)=>{let A=new Set(N);O?A.add(F):A.delete(F),L(A);},U=E.length>0&&E.every((F,O)=>N.has(s(F,O))),$=E.some((F,O)=>N.has(s(F,O))),Pe=F=>{if(!r.find(z=>z.id===F)?.sortable&&!l)return;let A="asc";T.columnId===F&&(T.direction==="asc"?A="desc":T.direction==="desc"&&(A=null)),I({columnId:A?F:null,direction:A});},ie=F=>T.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):T.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:b,className:o("w-full",e),...R,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:[a&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(Ro,{checked:U?true:$?"indeterminate":false,onCheckedChange:W,"aria-label":"Select all"})}),r.map(F=>{let O=F.sortable??l;return jsx("th",{className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>O&&Pe(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,O&&ie(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:y?jsx("tr",{children:jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):E.length===0?jsx("tr",{children:jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:x})}):E.map((F,O)=>{let A=s(F,O),z=N.has(A);return jsxs("tr",{className:o("border-b transition-colors",h&&"hover:bg-muted/50",f&&O%2===1&&"bg-muted/30",z&&"bg-muted"),"data-state":z?"selected":void 0,children:[a&&jsx("td",{className:"w-12 px-4",children:jsx(Ro,{checked:z,onCheckedChange:ee=>H(A,!!ee),"aria-label":`Select row ${O+1}`})}),r.map(ee=>jsx("td",{className:"p-4 align-middle",children:ee.cell?ee.cell(F,O):ee.accessor(F)},ee.id))]},A)})})]})}),u&&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:k.pageSize,onChange:F=>V({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:c.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 ",k.pageIndex+1," of ",B||1]}),jsxs("div",{className:"flex gap-1",children:[jsx("button",{onClick:()=>V({...k,pageIndex:k.pageIndex-1}),disabled:k.pageIndex===0,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{onClick:()=>V({...k,pageIndex:k.pageIndex+1}),disabled:k.pageIndex>=B-1,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var Fw=Y.forwardRef(zw);var ef=cva("",{variants:{size:{sm:"[--tree-indent:12px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:16px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:20px] [--tree-item-height:40px] text-base"}},defaultVariants:{size:"md"}}),tf=Y.forwardRef(({className:e,size:t,data:r,defaultExpandedIds:a=[],expandedIds:n,onExpandedChange:i,selectedId:s,onSelect:l,showIcons:d=true,leafIcon:m=jsx(File,{className:"h-4 w-4"}),folderIcon:u=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:c=jsx(FolderOpen,{className:"h-4 w-4"}),defaultExpandAll:g=false,...p},x)=>{let y=Y.useCallback(w=>w.reduce((S,C)=>C.children?.length?[...S,C.id,...y(C.children)]:S,[]),[]),[f,h]=Y.useState(()=>g?y(r):a),R=n??f,b=w=>{i?i(w):h(w);},v=w=>{R.includes(w)?b(R.filter(S=>S!==w)):b([...R,w]);},P=(w,S=0)=>{let C=w.children&&w.children.length>0,M=R.includes(w.id),N=s===w.id,T=()=>{w.disabled||l?.(w);},k=I=>{I.stopPropagation(),C&&v(w.id);},L=()=>w.icon?w.icon:C?M?c:u:m;return jsxs("div",{role:"treeitem","aria-expanded":C?M:void 0,children:[jsxs("div",{className:o("flex items-center gap-1 rounded-md px-2 cursor-pointer transition-colors","h-[var(--tree-item-height)]","hover:bg-muted/50",N&&"bg-primary/10 text-primary",w.disabled&&"opacity-50 cursor-not-allowed"),style:{paddingLeft:`calc(${S} * var(--tree-indent) + 8px)`},onClick:T,children:[jsx("button",{type:"button",className:o("flex h-5 w-5 items-center justify-center rounded hover:bg-muted",!C&&"invisible"),onClick:k,tabIndex:-1,"aria-label":M?"Collapse":"Expand",children:M?jsx(ChevronDown,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})}),d&&jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:L()}),jsx("span",{className:"truncate",children:w.name})]}),C&&M&&jsx("div",{role:"group",children:w.children.map(I=>P(I,S+1))})]},w.id)};return jsx("div",{ref:x,role:"tree",className:o(ef({size:t,className:e})),...p,children:r.map(w=>P(w))})});tf.displayName="TreeView";var af=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),Xw=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let r=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),a=e.split(r);return jsx(Fragment,{children:a.map((n,i)=>r.test(n)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:n},i):jsx("span",{children:n},i))})},qw=(e,t)=>{let[r,a]=Y.useState(e);return Y.useEffect(()=>{let n=setTimeout(()=>{a(e);},t);return ()=>{clearTimeout(n);}},[e,t]),r},of=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,onSelect:i,options:s=[],loadOptions:l,debounceMs:d=300,minChars:m=0,placeholder:u="Type to search...",emptyText:c="No results found.",loadingText:g="Loading...",clearable:p=false,freeSolo:x=true,maxHeight:y=200,highlightMatch:f=true,fullWidth:h=false,disabled:R,...b},v)=>{let[P,w]=Y.useState(false),[S,C]=Y.useState(a),[M,N]=Y.useState([]),[T,k]=Y.useState(false),[L,I]=Y.useState(false),V=Y.useRef(null),D=r!==void 0?r:S,E=qw(D,d);Y.useImperativeHandle(v,()=>V.current);let B=l?M:s,W=Y.useMemo(()=>l?B:B.filter(J=>J.label.toLowerCase().includes(D.toLowerCase())),[B,D,l]);Y.useEffect(()=>{if(!l)return;if(E.length<m){N([]);return}let J=false;return (async()=>{k(true);try{let nt=await l(E);J||N(nt);}catch{J||N([]);}finally{J||k(false);}})(),()=>{J=true;}},[E,l,m]);let H=J=>{r===void 0&&C(J),n?.(J);},U=J=>{let Ue=J.target.value;H(Ue),Ue.length>=m&&w(true);},$=J=>{H(J.label),i?.(J),w(false);},Pe=()=>{H(""),V.current?.focus();},ie=()=>{I(true),D.length>=m&&(W.length>0||T)&&w(true);},F=()=>{I(false);},O=J=>{J.key==="Escape"&&w(false),J.key==="ArrowDown"&&!P&&W.length>0&&w(true);},A=P&&D.length>=m,z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ee=p&&D?"pr-8":"pr-3";return jsxs(Ie,{open:A,onOpenChange:w,children:[jsx(es,{asChild:true,children:jsxs("div",{className:o("relative",h?"w-full":"w-fit"),children:[jsx("input",{ref:V,type:"text",value:D,onChange:U,onFocus:ie,onBlur:F,onKeyDown:O,disabled:R,placeholder:u,className:o(af({size:t,fullWidth:h}),ee,e),style:{borderColor:L?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":A,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...b}),p&&D&&!R&&jsx("button",{type:"button",onClick:Pe,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(Me,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:J=>J.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:y},children:T?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:o(z,"animate-spin")}),g]}):W.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c}):W.map(J=>jsxs(Command.Item,{value:J.value,disabled:J.disabled,onSelect:()=>$(J),className:o("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:o("mr-2 h-4 w-4 shrink-0",D===J.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:f?jsx(Xw,{text:J.label,query:D}):J.label})]},J.value))})})})]})});of.displayName="Autocomplete";var Hs=Y.createContext(null),As=Y.createContext(null),zs=()=>{let e=Y.useContext(Hs);if(!e)throw new Error("useFormContext must be used within a Form");return e},jn=()=>{let e=Y.useContext(As);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},Zw={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:r=>typeof r=="string"&&r.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:r=>typeof r=="number"&&r>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:r=>typeof r=="number"&&r<=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:r=>typeof r=="string"&&e.test(r),message:t}),custom:(e,t)=>({validate:e,message:t})},nf=Y.forwardRef(({defaultValues:e={},onSubmit:t,onError:r,validateOnBlur:a=true,validateOnChange:n=false,children:i,className:s,...l},d)=>{let[m,u]=Y.useState(e),[c,g]=Y.useState({}),[p,x]=Y.useState({}),[y,f]=Y.useState({}),[h,R]=Y.useState(false),b=Y.useRef(new Map),v=Y.useCallback((V,D)=>{b.current.set(V,D);},[]),P=Y.useCallback(V=>{b.current.delete(V);},[]),w=Y.useCallback(V=>{let D=b.current.get(V)||[],E=m[V];for(let B of D)if(!B.validate(E))return g(W=>({...W,[V]:B.message})),false;return g(B=>({...B,[V]:null})),true},[m]),S=Y.useCallback(()=>{let V=true,D={};return b.current.forEach((E,B)=>{let W=m[B];for(let H of E)if(!H.validate(W)){D[B]=H.message,V=false;break}D[B]||(D[B]=null);}),g(D),V},[m]),C=Y.useCallback((V,D)=>{u(E=>({...E,[V]:D})),f(E=>({...E,[V]:true})),n&&setTimeout(()=>{w(V);},0);},[n,w]),M=Y.useCallback((V,D)=>{g(E=>({...E,[V]:D}));},[]),N=Y.useCallback((V,D)=>{x(E=>({...E,[V]:D})),D&&a&&w(V);},[a,w]),T=Y.useCallback(V=>({value:m[V],error:c[V]??null,touched:p[V]??false,dirty:y[V]??false}),[m,c,p,y]),k=Y.useCallback(()=>{u(e),g({}),x({}),f({});},[e]),L=async V=>{V.preventDefault();let D={};if(b.current.forEach((B,W)=>{D[W]=true;}),x(D),!S()){r?.(c);return}if(t){R(true);try{await t(m);}finally{R(false);}}},I={values:m,errors:c,touched:p,dirty:y,isSubmitting:h,setValue:C,setError:M,setTouched:N,validateField:w,validateAll:S,registerField:v,unregisterField:P,getFieldState:T,reset:k};return jsx(Hs.Provider,{value:I,children:jsx("form",{ref:d,onSubmit:L,className:o("space-y-4",s),...l,children:i})})});nf.displayName="Form";var sf=({name:e,rules:t=[],defaultValue:r,children:a})=>{let n=zs(),i=Y.useId();Y.useEffect(()=>(n.registerField(e,t),r!==void 0&&n.values[e]===void 0&&n.setValue(e,r),()=>{n.unregisterField(e);}),[e,t,r,n]);let s=n.getFieldState(e),l={name:e,id:`${i}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(As.Provider,{value:l,children:a})};sf.displayName="FormField";var lf=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("space-y-1.5",e),...t}));lf.displayName="FormItem";var df=Y.forwardRef(({className:e,required:t,children:r,...a},n)=>{let{id:i,error:s,touched:l}=jn();return jsxs(ea,{ref:n,htmlFor:i,className:o(s&&l&&"text-danger",e),...a,children:[r,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});df.displayName="FormLabel";var cf=({children:e})=>{let{name:t,id:r,error:a,touched:n}=jn(),i=zs(),s=i.getFieldState(t),l=m=>{let u=m.target,c=u.type==="checkbox"?u.checked:u.value;i.setValue(t,c);},d=()=>{i.setTouched(t,true);};return Y.cloneElement(e,{id:r,name:t,value:s.value??"",onChange:l,onBlur:d,"aria-invalid":a&&n?"true":void 0,"aria-describedby":a&&n?`${r}-error`:void 0})};cf.displayName="FormControl";var mf=Y.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:o("text-xs text-muted-foreground",e),...t}));mf.displayName="FormDescription";var uf=Y.forwardRef(({className:e,message:t,...r},a)=>{let{id:n,error:i,touched:s}=jn(),l=t??(s?i:null);return l?jsx("p",{ref:a,id:`${n}-error`,className:o("text-xs text-danger",e),role:"alert",...r,children:l}):null});uf.displayName="FormMessage";var ff=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"}}),gf=Y.forwardRef(({className:e,size:t,name:r,description:a,avatarUrl:n,avatarFallback:i,trailing:s,...l},d)=>{let m=i||r.split(" ").map(u=>u[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:d,className:o(ff({size:t,className:e})),...l,children:[jsxs(ta,{"data-user-avatar":true,children:[n&&jsx(Ha,{src:n,alt:r}),jsx(ra,{children:m})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:r}),a&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:a})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});gf.displayName="User";var vf=cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),hf=Y.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsx("code",{ref:n,className:o(vf({variant:t,size:r,className:e})),...a}));hf.displayName="Code";var xf=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",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"}}),yf=Y.forwardRef(({className:e,variant:t,size:r,code:a,copyable:n=true,copyLabel:i="Copy",onCopy:s,symbol:l="$",hideSymbol:d=false,...m},u)=>{let[c,g]=Y.useState(false),p=async()=>{try{await navigator.clipboard.writeText(a),g(!0),s?.(),setTimeout(()=>g(!1),2e3);}catch(x){console.error("Failed to copy:",x);}};return jsxs("div",{ref:u,className:o(xf({variant:t,size:r,className:e})),...m,children:[!d&&jsx("span",{className:"text-muted-foreground select-none",children:l}),jsx("code",{className:"flex-1 truncate",children:a}),n&&jsx("button",{type:"button",onClick:p,className:o("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":c?"Copied":i,children:c?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});yf.displayName="Snippet";var Os=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Rf=Y.forwardRef(({className:e,radius:t,src:r,alt:a,fallback:n,showSkeleton:i=true,onLoad:s,onError:l,fit:d="cover",aspectRatio:m,style:u,...c},g)=>{let[p,x]=Y.useState("loading");Y.useEffect(()=>{r&&x("loading");},[r]);let y=()=>{x("loaded"),s?.();},f=()=>{x("error"),l?.();},h={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[d];return p==="error"&&n?jsx("div",{className:o(Os({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:m,...u},children:n}):jsxs("div",{className:o(Os({radius:t}),"relative",e),style:{aspectRatio:m,...u},children:[p==="loading"&&i&&jsx(hn,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:g,src:r,alt:a,onLoad:y,onError:f,className:o("h-full w-full transition-opacity duration-300",h,p==="loading"?"opacity-0":"opacity-100"),...c})]})});Rf.displayName="Image";var Pf=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"}}),Cf=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"}}),Mf=Y.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),Tf=Y.forwardRef(({className:e,size:t="md",value:r,defaultValue:a="",onValueChange:n,multiple:i=false,children:s,...l},d)=>{let[m,u]=Y.useState(a),c=r??m,g=p=>{let x;if(i){let y=Array.isArray(c)?c:[c].filter(Boolean);y.includes(p)?x=y.filter(f=>f!==p):x=[...y,p];}else x=p;n?n(x):u(x);};return jsx(Mf.Provider,{value:{value:c,onValueChange:g,multiple:i,size:t??"md"},children:jsx("div",{ref:d,role:"listbox","aria-multiselectable":i,className:o(Pf({size:t,className:e})),...l,children:s})})});Tf.displayName="Listbox";var Sf=Y.forwardRef(({className:e,value:t,disabled:r,icon:a,description:n,children:i,...s},l)=>{let{value:d,onValueChange:m,multiple:u,size:c}=Y.useContext(Mf),g=u?Array.isArray(d)&&d.includes(t):d===t,p=()=>{r||m(t);},x=y=>{(y.key==="Enter"||y.key===" ")&&!r&&(y.preventDefault(),m(t));};return jsxs("div",{ref:l,role:"option","aria-selected":g,"data-disabled":r?"":void 0,tabIndex:r?-1:0,className:o(Cf({size:c}),g&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:x,...s,children:[a&&jsx("span",{className:"mr-2 flex-shrink-0",children:a}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:i}),n&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:n})]}),g&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});Sf.displayName="ListboxItem";var Df=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"}}),Lf=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 cN({className:e,variant:t,size:r,items:a,onReorder:n,renderItem:i,showHandle:s=true,disabled:l=false,...d},m){let[u,c]=Y.useState(null),[g,p]=Y.useState(null),x=(b,v)=>{l||(c(v),b.dataTransfer.effectAllowed="move",b.dataTransfer.setData("text/plain",String(v)));},y=(b,v)=>{b.preventDefault(),!(l||u===null||u===v)&&p(v);},f=()=>{p(null);},h=(b,v)=>{if(b.preventDefault(),l||u===null||u===v){c(null),p(null);return}let P=[...a],[w]=P.splice(u,1);P.splice(v,0,w),n?.(P),c(null),p(null);},R=()=>{c(null),p(null);};return jsx("div",{ref:m,className:o(Df({variant:t,size:r,className:e})),...d,children:a.map((b,v)=>jsxs("div",{draggable:!l,onDragStart:P=>x(P,v),onDragOver:P=>y(P,v),onDragLeave:f,onDrop:P=>h(P,v),onDragEnd:R,className:o(Lf({variant:t,size:r,isDragging:u===v,isDragOver:g===v}),!l&&"cursor-move"),children:[s&&jsx("div",{className:o("flex-shrink-0 text-muted-foreground",l?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:i(b,v)})]},b.id))})}var mN=Y.forwardRef(cN);var Ef=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}}),gN={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Hf=Y.forwardRef(({className:e,variant:t,loading:r=true,size:a="md",spinner:n,text:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o("relative",e),...l,children:[s,jsx("div",{className:o(Ef({variant:t,visible:r})),"aria-hidden":!r,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[n||jsx(Loader2,{className:o(gN[a],"animate-spin text-primary")}),i&&jsx("span",{className:"text-sm text-muted-foreground",children:i})]})})]}));Hf.displayName="LoadingOverlay";var Af=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"}}),zf=Y.forwardRef(({className:e,color:t,isLoading:r=false,progress:a,showSpinner:n=false,...i},s)=>{let[l,d]=Y.useState(0),[m,u]=Y.useState(false),c=Y.useRef(null);return Y.useEffect(()=>{if(a!==void 0){d(a),u(a>0&&a<100);return}return r?(u(true),d(10),c.current=setInterval(()=>{d(g=>{if(g>=90)return g;let p=Math.random()*10;return Math.min(g+p,90)});},500)):l>0&&(d(100),setTimeout(()=>{u(false),d(0);},200)),()=>{c.current&&clearInterval(c.current);}},[r,a]),!m&&a===void 0||a!==void 0&&(a<=0||a>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:o(Af({color:t,className:e})),style:{width:`${l}%`},role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,...i,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),n&&m&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:o("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")})})]})});zf.displayName="NProgress";var Gf=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}}),Ff={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},RN={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Wf=Y.forwardRef(({className:e,variant:t="spinner",size:r="md",fullScreen:a,text:n,color:i="primary",...s},l)=>{let d={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[i],m=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(u=>jsx("div",{className:o(RN[r||"md"],"animate-bounce rounded-full bg-current",d),style:{animationDelay:`${u*.15}s`}},u))});case "pulse":return jsx("div",{className:o(Ff[r||"md"],"animate-pulse rounded-full bg-current",d)});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:o(Ff[r||"md"],"animate-spin",d)})}};return jsx("div",{ref:l,className:o(Gf({variant:t,size:r,fullScreen:a,className:e})),role:"status","aria-label":n||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[m(),n&&jsx("span",{className:o("text-sm",d),children:n})]})})});Wf.displayName="Loading";var $s=class extends Y.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((a,n)=>a!==t.resetKeys?.[n])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(_s,{error:this.state.error,onReset:this.reset}):this.props.children}},_s=Y.forwardRef(({error:e,onReset:t,className:r},a)=>jsxs("div",{ref:a,className:o("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",r),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));_s.displayName="DefaultErrorFallback";var PN=$s;var _f=Y.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date range",dateFormat:n="LLL dd, y",disabled:i=false,minDate:s,maxDate:l,numberOfMonths:d=2,className:m,align:u="start"},c)=>{let[g,p]=Y.useState(false),[x,y]=Y.useState(t),f=e!==void 0,h=f?e:x,R=v=>{f||y(v),r?.(v);},b=v=>{if(!v)return a;let{from:P,to:w}=v;return P&&w?`${format(P,n)} - ${format(w,n)}`:P?format(P,n):a};return jsxs(Ie,{open:g,onOpenChange:p,children:[jsx($e,{asChild:true,children:jsxs(_,{ref:c,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!h?.from&&"text-muted-foreground",m),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),b(h)]})}),jsx(Me,{className:"w-auto p-0",align:u,children:jsx(Oa,{mode:"range",defaultMonth:h?.from,selected:h,onSelect:R,numberOfMonths:d,disabled:v=>!!(s&&v<s||l&&v>l),initialFocus:true})})]})});_f.displayName="DateRangePicker";var eo=e=>String(e).padStart(2,"0"),Kf=Y.forwardRef(({value:e,onValueChange:t,placeholder:r="Pick a time",use24Hour:a=true,minuteStep:n=1,disabled:i=false,className:s},l)=>{let[d,m]=Y.useState(false),u=a?Array.from({length:24},(b,v)=>v):Array.from({length:12},(b,v)=>v+1),c=Array.from({length:Math.floor(60/n)},(b,v)=>v*n),g=b=>{if(!b)return r;if(a)return `${eo(b.hours)}:${eo(b.minutes)}`;let v=b.hours%12||12,P=b.hours>=12?"PM":"AM";return `${eo(v)}:${eo(b.minutes)} ${P}`},p=b=>{let v=e?.minutes??0,P=b;if(!a&&e){let w=e.hours>=12;w&&b!==12?P=b+12:!w&&b===12&&(P=0);}t?.({hours:P,minutes:v});},x=b=>{let v=e?.hours??0;t?.({hours:v,minutes:b});},y=b=>{if(!e)return;let v=e.hours;b==="AM"&&e.hours>=12?v=e.hours-12:b==="PM"&&e.hours<12&&(v=e.hours+12),t?.({hours:v,minutes:e.minutes});},f=()=>{let b=new Date;t?.({hours:b.getHours(),minutes:b.getMinutes()});},h=e?e.hours>=12?"PM":"AM":void 0,R=e?a?e.hours:e.hours%12||12:void 0;return jsxs(Ie,{open:d,onOpenChange:m,children:[jsx($e,{asChild:true,children:jsxs(_,{ref:l,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsx(Clock,{className:"mr-2 h-4 w-4"}),g(e)]})}),jsxs(Me,{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(ze,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:u.map(b=>jsx(_,{variant:R===b?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(b),children:eo(b)},b))})})]}),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(ze,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:c.map(b=>jsx(_,{variant:e?.minutes===b?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>x(b),children:eo(b)},b))})})]}),!a&&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(_,{variant:h==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>y("AM"),children:"AM"}),jsx(_,{variant:h==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>y("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(_,{variant:"ghost",size:"sm",onClick:f,children:"Now"}),jsx(_,{size:"sm",onClick:()=>m(false),children:"Done"})]})]})]})});Kf.displayName="TimePicker";var Yf=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function SN({className:e,variant:t,items:r,itemHeight:a,height:n,overscan:i=3,renderItem:s,getItemKey:l,gap:d=0,onScrollChange:m,...u},c){let g=Y.useRef(null),[p,x]=Y.useState(0);Y.useImperativeHandle(c,()=>g.current);let y=r.length*(a+d)-d,f=a+d,h=Math.max(0,Math.floor(p/f)-i),R=Math.ceil(n/f)+2*i,b=Math.min(r.length-1,h+R),v=w=>{let S=w.currentTarget.scrollTop;x(S),m?.(S);},P=Y.useMemo(()=>{let w=[];for(let S=h;S<=b;S++)r[S]!==void 0&&w.push({item:r[S],index:S,style:{position:"absolute",top:S*f,left:0,right:0,height:a}});return w},[r,h,b,f,a]);return jsx("div",{ref:g,className:o(Yf({variant:t,className:e})),style:{height:n,position:"relative"},onScroll:v,...u,children:jsx("div",{style:{height:y,position:"relative"},children:P.map(({item:w,index:S,style:C})=>jsx("div",{style:C,children:s(w,S)},l?l(w,S):S))})})}var kN=Y.forwardRef(SN);var Uf=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),js=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Xf=Y.forwardRef(({className:e,variant:t,size:r,children:a,onLoadMore:n,hasMore:i,isLoading:s=false,loader:l,threshold:d=100,rootMargin:m,useWindow:u=false,endMessage:c,...g},p)=>{let x=Y.useRef(null),y=Y.useRef(null),f=Y.useRef(false);Y.useImperativeHandle(p,()=>x.current),Y.useEffect(()=>{let R=y.current;if(!R)return;let b=new IntersectionObserver(v=>{let[P]=v;P.isIntersecting&&i&&!s&&!f.current&&(f.current=true,Promise.resolve(n()).finally(()=>{f.current=false;}));},{root:u?null:x.current,rootMargin:m||`${d}px`,threshold:0});return b.observe(R),()=>{b.disconnect();}},[i,s,n,d,m,u]);let h=jsx("div",{className:o(js({size:r})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:x,className:o(Uf({variant:t,className:e})),...g,children:[a,jsx("div",{ref:y,className:"h-px w-full"}),s&&(l||h),!i&&!s&&c&&jsx("div",{className:o(js({size:r}),"text-muted-foreground text-sm"),children:c})]})});Xf.displayName="InfiniteScroll";var _o=Y.forwardRef(({className:e,...t},r)=>jsx(Zf.Root,{ref:r,className:o(e),...t}));_o.displayName="VisuallyHidden";var IN={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},EN={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"},Qf=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"),Xs=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"}}),eg=Y.createContext({scrollBehavior:"inside"}),HN=()=>Y.useContext(eg),tg=Y.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a="Modal",children:n,hideCloseButton:i=false,isDismissable:s=true,isKeyboardDismissDisabled:l=false,backdrop:d="opaque",placement:m="center",scrollBehavior:u="inside",size:c,className:g},p)=>jsx(eg.Provider,{value:{scrollBehavior:u},children:jsxs(oe.Root,{open:e,onOpenChange:t,children:[r&&jsx(oe.Trigger,{asChild:true,children:r}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:o(Qf(),IN[d],u==="outside"&&"overflow-y-auto flex items-start justify-center py-4"),children:u==="outside"?jsxs(oe.Content,{ref:p,className:o("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",c==="xs"&&"w-full max-w-xs",c==="sm"&&"w-full max-w-sm",c==="md"&&"w-full max-w-md",c==="lg"&&"w-full max-w-lg",c==="xl"&&"w-full max-w-xl",c==="2xl"&&"w-full max-w-2xl",c==="3xl"&&"w-full max-w-3xl",c==="4xl"&&"w-full max-w-4xl",c==="5xl"&&"w-full max-w-5xl",c==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!c&&"w-full max-w-md",g),onEscapeKeyDown:l?x=>x.preventDefault():void 0,onPointerDownOutside:s?void 0:x=>x.preventDefault(),children:[jsx(_o,{children:jsx(oe.Title,{children:a})}),n,!i&&jsx(oe.Close,{asChild:true,children:jsxs(_,{variant:"light",size:"icon",radius:"full",className:"absolute right-2 top-2 h-8 w-8",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})})]}):null}),u==="inside"&&jsxs(oe.Content,{ref:p,className:o(Xs({size:c}),EN[m],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",g),onEscapeKeyDown:l?x=>x.preventDefault():void 0,onPointerDownOutside:s?void 0:x=>x.preventDefault(),children:[jsx(_o,{children:jsx(oe.Title,{children:a})}),n,!i&&jsx(oe.Close,{asChild:true,children:jsxs(_,{variant:"light",size:"icon",radius:"full",className:"absolute right-2 top-2 h-8 w-8",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})})]})]})]})}));tg.displayName="Modal";var AN=oe.Root,zN=oe.Trigger,rg=oe.Portal,FN=oe.Close,qs=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Overlay,{ref:r,className:o(Qf(),e),...t}));qs.displayName="ModalOverlay";var ag=Y.forwardRef(({className:e,children:t,size:r,showCloseButton:a=true,...n},i)=>jsxs(rg,{children:[jsx(qs,{}),jsxs(oe.Content,{ref:i,className:o(Xs({size:r}),e),...n,children:[t,a&&jsx(oe.Close,{asChild:true,children:jsxs(_,{variant:"light",size:"icon",radius:"full",className:"absolute right-2 top-2 h-8 w-8",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})})]})]}));ag.displayName="ModalContent";var og=({className:e,...t})=>jsx("div",{className:o("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});og.displayName="ModalHeader";var ng=({className:e,children:t})=>{let{scrollBehavior:r}=HN();return r==="inside"?jsx(ze,{className:o("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:o(e),children:t})};ng.displayName="ModalBody";var ig=({className:e,children:t,...r})=>jsx("div",{className:o("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r,children:Y.Children.map(t,a=>Y.isValidElement(a)?jsx(oe.Close,{asChild:true,children:a}):a)});ig.displayName="ModalFooter";var sg=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Title,{ref:r,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));sg.displayName="ModalTitle";var lg=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));lg.displayName="ModalDescription";var cg=cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),_N=cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),KN={default:HelpCircle,danger:XCircle,warning:AlertTriangle,success:CheckCircle,info:Info},Zs=Y.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,confirmText:i="Confirm",cancelText:s="Cancel",onConfirm:l,onCancel:d,showIcon:m=true,icon:u,variant:c="default",loading:g=false,disabled:p=false,className:x},y)=>{let[f,h]=Y.useState(false),R=KN[c||"default"],b=async()=>{if(l){let w=l();if(w instanceof Promise){h(true);try{await w;}finally{h(false);}}}},v=()=>{d?.();},P=g||f;return jsxs(Se.Root,{open:e,onOpenChange:t,children:[r&&jsx(Se.Trigger,{asChild:true,children:r}),jsxs(Se.Portal,{children:[jsx(Se.Overlay,{className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsxs(Se.Content,{ref:y,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",x),children:[jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[m&&jsx("div",{className:o(cg({variant:c})),children:u||jsx(R,{className:"h-6 w-6"})}),jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsx(Se.Title,{className:"text-lg font-semibold",children:a}),n&&jsx(Se.Description,{className:"text-sm text-muted-foreground",children:n})]})]}),jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsx(Se.Cancel,{className:o(Jt({variant:"bordered"})),onClick:v,disabled:P,children:s}),jsx(Se.Action,{className:o(Jt(),_N({variant:c}),P&&"opacity-50 cursor-not-allowed"),onClick:b,disabled:p||P,children:P?jsxs("span",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}),"Loading..."]}):i})]})]})]})]})});Zs.displayName="ConfirmDialog";function YN(){let[e,t]=Y.useState({open:false,options:null,resolve:null}),r=Y.useCallback(l=>new Promise(d=>{t({open:true,options:l,resolve:d});}),[]),a=Y.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),n=Y.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),i=Y.useCallback(l=>{l||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=Y.useMemo(()=>e.options?jsx(Zs,{open:e.open,onOpenChange:i,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:a,onCancel:n}):null,[e,a,n,i]);return {confirm:r,ConfirmDialog:s}}var rP=e=>e.map(t=>typeof t=="string"?{src:t}:t),Qs=Y.forwardRef(({images:e,open:t,onOpenChange:r,initialIndex:a=0,onIndexChange:n,trigger:i,showThumbnails:s=true,showZoom:l=true,showRotate:d=true,showDownload:m=true,showFullscreen:u=true,showNavigation:c=true,showCounter:g=true,closeOnBackdropClick:p=true,className:x},y)=>{let f=Y.useMemo(()=>rP(e),[e]),[h,R]=Y.useState(a),[b,v]=Y.useState(1),[P,w]=Y.useState(0),[S,C]=Y.useState(false),[M,N]=Y.useState(false),[T,k]=Y.useState({x:0,y:0}),[L,I]=Y.useState({x:0,y:0}),V=Y.useRef(null),D=f[h];Y.useEffect(()=>{R(a);},[a]),Y.useEffect(()=>{n?.(h);},[h,n]),Y.useEffect(()=>{v(1),w(0),k({x:0,y:0});},[h]);let E=Y.useCallback(()=>{R(z=>z>0?z-1:f.length-1);},[f.length]),B=Y.useCallback(()=>{R(z=>z<f.length-1?z+1:0);},[f.length]),W=()=>{v(z=>Math.min(z+.5,4));},H=()=>{v(z=>{let ee=Math.max(z-.5,.5);return ee===1&&k({x:0,y:0}),ee});},U=()=>{w(z=>(z+90)%360);},$=async()=>{if(D)try{let ee=await(await fetch(D.src)).blob(),J=URL.createObjectURL(ee),Ue=document.createElement("a");Ue.href=J,Ue.download=D.alt||`image-${h+1}`,document.body.appendChild(Ue),Ue.click(),document.body.removeChild(Ue),URL.revokeObjectURL(J);}catch{window.open(D.src,"_blank");}},Pe=async()=>{if(V.current)if(S)try{await document.exitFullscreen(),C(!1);}catch{}else try{await V.current.requestFullscreen(),C(!0);}catch{}},ie=z=>{b>1&&(N(true),I({x:z.clientX-T.x,y:z.clientY-T.y}));},F=z=>{M&&b>1&&k({x:z.clientX-L.x,y:z.clientY-L.y});},O=()=>{N(false);},A=Y.useCallback(z=>{switch(z.key){case "ArrowLeft":E();break;case "ArrowRight":B();break;case "Escape":r?.(false);break;case "+":case "=":W();break;case "-":H();break}},[E,B,r]);return Y.useEffect(()=>{if(t)return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[t,A]),Y.useEffect(()=>{let z=()=>{C(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",z),()=>document.removeEventListener("fullscreenchange",z)},[]),f.length===0?null:jsxs(oe.Root,{open:t,onOpenChange:r,children:[i&&jsx(oe.Trigger,{asChild:true,children:i}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{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",onClick:p?void 0:z=>z.stopPropagation()}),jsxs(oe.Content,{ref:y,className:o("fixed inset-0 z-50 flex flex-col outline-none",x),onPointerDownOutside:p?void 0:z=>z.preventDefault(),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[g&&f.length>1&&jsxs("span",{className:"text-sm",children:[h+1," / ",f.length]}),D?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:D.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[l&&jsxs(Fragment,{children:[jsx("button",{onClick:H,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(b*100),"%"]}),jsx("button",{onClick:W,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),d&&jsx("button",{onClick:U,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),m&&jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),u&&jsx("button",{onClick:Pe,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:S?"Exit fullscreen":"Fullscreen",children:S?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs(oe.Close,{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:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:ie,onMouseMove:F,onMouseUp:O,onMouseLeave:O,children:[c&&f.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:E,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:B,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:D?.src,alt:D?.alt||"",className:o("max-h-full max-w-full object-contain transition-transform duration-200",M?"cursor-grabbing":b>1?"cursor-grab":""),style:{transform:`translate(${T.x}px, ${T.y}px) scale(${b}) rotate(${P}deg)`},draggable:false})]}),D?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:D.description}),s&&f.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:f.map((z,ee)=>jsx("button",{onClick:()=>R(ee),className:o("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",h===ee?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:z.src,alt:z.alt||`Thumbnail ${ee+1}`,className:"h-full w-full object-cover"})},ee))})]})]})]})});Qs.displayName="ImageViewer";var mg=({children:e,images:t,index:r=0,className:a})=>{let[n,i]=Y.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>i(true),className:o("cursor-zoom-in",a),children:e}),jsx(Qs,{images:t,open:n,onOpenChange:i,initialIndex:r})]})};mg.displayName="ImageViewerTrigger";var fg=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),gg=Y.forwardRef(({className:e,variant:t,size:r,iconSize:a,...n},i)=>{let l=a??{sm:14,md:16,lg:20}[r??"md"];return jsx("button",{ref:i,type:"button",className:o(fg({variant:t,size:r}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:l,height:l}})})});gg.displayName="CloseButton";var vg=cva("inline-flex items-center justify-center rounded-md 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted hover:bg-muted/80"},size:{sm:"h-7 w-7",md:"h-9 w-9",lg:"h-11 w-11"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary text-primary-foreground hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/90"},{variant:"solid",color:"success",className:"bg-success text-success-foreground hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger text-danger-foreground hover:bg-danger/90"},{variant:"soft",color:"primary",className:"bg-primary/10 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary/10 text-secondary-foreground hover:bg-secondary/20"},{variant:"soft",color:"success",className:"bg-success/10 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/10 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/10 text-danger hover:bg-danger/20"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"}],defaultVariants:{variant:"ghost",size:"md",color:"default",radius:"md"}}),hg=Y.forwardRef(({className:e,variant:t,size:r,color:a,radius:n,loading:i,disabled:s,children:l,...d},m)=>jsx("button",{ref:m,type:"button",className:o(vg({variant:t,size:r,color:a,radius:n}),e),disabled:s||i,...d,children:i?jsxs("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"1em",height:"1em"},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"})]}):l}));hg.displayName="ActionIcon";var Rg=({children:e,container:t,disabled:r=false})=>{let[a,n]=Y.useState(false);if(Y.useEffect(()=>{n(true);},[]),r||!a)return jsx(Fragment,{children:e});let i=null;return typeof t=="string"?i=document.querySelector(t):t instanceof Element?i=t:i=document.body,i?createPortal(e,i):jsx(Fragment,{children:e})};Rg.displayName="Portal";var wg=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),Ng=Y.forwardRef(({className:e,color:t,size:r,position:a,ping:n,content:i,show:s=true,offset:l,style:d,...m},u)=>{if(!s)return null;let c=i!=null;return jsxs("span",{ref:u,className:o(wg({color:t,size:c?void 0:r,position:a,ping:n}),c&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...d,...l!==void 0&&{transform:`translate(${a?.includes("right")?l:-l}px, ${a?.includes("top")?-l:l}px)`}},...m,children:[n&&jsx("span",{className:o("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),i]})});Ng.displayName="Indicator";var Pg=Y.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:o("relative inline-flex",e),...r,children:t}));Pg.displayName="IndicatorWrapper";var Mg=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),Tg=Y.forwardRef(({className:e,orientation:t,size:r,hideScrollbar:a=false,shadowColor:n="rgba(0, 0, 0, 0.1)",children:i,...s},l)=>{let d=Y.useRef(null),[m,u]=Y.useState({top:false,bottom:false,left:false,right:false});Y.useImperativeHandle(l,()=>d.current);let c=Y.useCallback(()=>{let h=d.current;if(!h)return;let{scrollTop:R,scrollLeft:b,scrollHeight:v,scrollWidth:P,clientHeight:w,clientWidth:S}=h;u({top:R>0,bottom:R<v-w-1,left:b>0,right:b<P-S-1});},[]);Y.useEffect(()=>{let h=d.current;if(h)return c(),h.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{h.removeEventListener("scroll",c),window.removeEventListener("resize",c);}},[c]);let p={sm:"20px",md:"40px",lg:"60px"}[r??"md"],x=t==="vertical"||t==="both",y=t==="horizontal"||t==="both",f={maskImage:[x&&m.top&&`linear-gradient(to bottom, transparent, black ${p})`,x&&m.bottom&&`linear-gradient(to top, transparent, black ${p})`,y&&m.left&&`linear-gradient(to right, transparent, black ${p})`,y&&m.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:d,className:o(Mg({orientation:t,size:r}),a&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:f,...s,children:i})});Tg.displayName="ScrollShadow";var Sg=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",outline:"rounded border border-border 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"}}),pP={cmd:"\u2318",command:"\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"},fP=e=>{let t=e.toLowerCase();return pP[t]||e.toUpperCase()},kg=Y.forwardRef(({className:e,variant:t,size:r,keys:a,children:n,...i},s)=>{let l=()=>a?(Array.isArray(a)?a:[a]).map((m,u)=>jsxs(Y.Fragment,{children:[u>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:fP(m)})]},u)):n;return jsx("kbd",{ref:s,className:o(Sg({variant:t,size:r}),e),...i,children:l()})});kg.displayName="Kbd";var Lg=Y.forwardRef(({className:e,size:t,axis:r="both",style:a,...n},i)=>{let s=typeof t=="number"?`${t}px`:t,l={...a,...t?{width:r==="vertical"?void 0:s,height:r==="horizontal"?void 0:s,minWidth:r==="vertical"?void 0:s,minHeight:r==="horizontal"?void 0:s,flexShrink:0}:{flex:"1 1 auto"}};return jsx("div",{ref:i,"aria-hidden":"true",className:o(e),style:l,...n})});Lg.displayName="Spacer";var Vg=cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Ig=Y.forwardRef(({className:e,variant:t,size:r,value:a,successDuration:n=2e3,onCopySuccess:i,onCopyError:s,copyIcon:l,successIcon:d,...m},u)=>{let[c,g]=Y.useState(false),p={sm:14,md:16,lg:20}[r??"md"],x=async()=>{try{await navigator.clipboard.writeText(a),g(!0),i?.(),setTimeout(()=>{g(!1);},n);}catch(y){s?.(y);}};return jsx("button",{ref:u,type:"button",className:o(Vg({variant:t,size:r}),e),onClick:x,"aria-label":c?"Copied":"Copy to clipboard",...m,children:c?d??jsx(Check,{className:"text-success",style:{width:p,height:p}}):l??jsx(Copy,{style:{width:p,height:p}})})});Ig.displayName="CopyButton";var Hg=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),NP=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],PP=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function CP(e,t,r){let a=new Date(e,t,1),n=new Date(e,t+1,0),i=[],s=a.getDay()-r;s<0&&(s+=7);for(let d=s-1;d>=0;d--)i.push(new Date(e,t,-d));for(let d=1;d<=n.getDate();d++)i.push(new Date(e,t,d));let l=42-i.length;for(let d=1;d<=l;d++)i.push(new Date(e,t+1,d));return i}function MP(e,t){let r=[],n=e.getDay()-t;n<0&&(n+=7);let i=new Date(e);i.setDate(e.getDate()-n);for(let s=0;s<7;s++){let l=new Date(i);l.setDate(i.getDate()+s),r.push(l);}return r}function ni(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function oi(e){return ni(e,new Date)}function Eg(e,t){return e.filter(r=>{let a=new Date(r.start),n=new Date(r.end);return ni(a,t)||ni(n,t)||a<t&&n>t})}var Ag=Y.forwardRef(({className:e,variant:t,size:r,events:a=[],view:n="month",onViewChange:i,date:s,onDateChange:l,onEventClick:d,onSlotClick:m,weekStartsOn:u=0,locale:c="en-US",...g},p)=>{let[x,y]=Y.useState(new Date),f=s??x,h=N=>{l?l(N):y(N);},R=u===1?PP:NP,b=()=>{let N=new Date(f);n==="month"?N.setMonth(N.getMonth()-1):n==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),h(N);},v=()=>{let N=new Date(f);n==="month"?N.setMonth(N.getMonth()+1):n==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),h(N);},P=()=>{h(new Date);},w=()=>n==="day"?f.toLocaleDateString(c,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):f.toLocaleDateString(c,{year:"numeric",month:"long"}),S=()=>{let N=CP(f.getFullYear(),f.getMonth(),u);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:R.map(T=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:T},T))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((T,k)=>{let L=Eg(a,T),I=T.getMonth()===f.getMonth();return jsxs("div",{className:o("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!I&&"bg-muted/30"),onClick:()=>m?.(T),children:[jsx("div",{className:o("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",oi(T)&&"bg-primary text-primary-foreground",!I&&"text-muted-foreground"),children:T.getDate()}),jsxs("div",{className:"space-y-0.5",children:[L.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:D=>{D.stopPropagation(),d?.(V);},children:V.title},V.id)),L.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",L.length-3," more"]})]})]},k)})})]})},C=()=>{let N=MP(f,u),T=Array.from({length:24},(k,L)=>L);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((k,L)=>jsxs("div",{className:o("p-2 text-center border-l",oi(k)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:R[L]}),jsx("div",{className:o("text-lg font-semibold",oi(k)&&"text-primary"),children:k.getDate()})]},L))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:T.map(k=>jsxs(Y.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[k.toString().padStart(2,"0"),":00"]}),N.map((L,I)=>{let V=new Date(L);V.setHours(k,0,0,0);let D=a.filter(E=>{let B=new Date(E.start);return ni(B,L)&&B.getHours()===k});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(V),children:D.map(E=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:E.color||"hsl(var(--primary))",color:"white"},onClick:B=>{B.stopPropagation(),d?.(E);},children:E.title},E.id))},I)})]},k))})})]})},M=()=>{let N=Array.from({length:24},(k,L)=>L),T=Eg(a,f);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:o("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",oi(f)&&"bg-primary text-primary-foreground"),children:f.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(k=>{let L=new Date(f);L.setHours(k,0,0,0);let I=T.filter(V=>new Date(V.start).getHours()===k);return jsxs(Y.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[k.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(L),children:I.map(V=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:D=>{D.stopPropagation(),d?.(V);},children:V.title},V.id))})]},k)})})})]})};return jsxs("div",{ref:p,className:o(Hg({variant:t,size:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(_,{variant:"bordered",size:"sm",onClick:P,children:"Today"}),jsx(_,{variant:"ghost",size:"icon",onClick:b,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(_,{variant:"ghost",size:"icon",onClick:v,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:w()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsx(_,{variant:n===N?"solid":"ghost",size:"sm",onClick:()=>i?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),n==="month"&&S(),n==="week"&&C(),n==="day"&&M()]})});Ag.displayName="FullCalendar";var Yo=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),jo=["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%))"],zg=Y.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=jo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",curveType:m="monotone",...u},c)=>jsx("div",{ref:c,className:o(Yo({size:t,className:e})),...u,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:r,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),a.map((g,p)=>jsx(Line,{type:m,dataKey:g,stroke:n[p%n.length],strokeWidth:2,dot:{fill:n[p%n.length],strokeWidth:0},activeDot:{r:6}},g))]})})}));zg.displayName="LineChart";var Fg=Y.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=jo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,layout:u="horizontal",...c},g)=>jsx("div",{ref:g,className:o(Yo({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:r,layout:u,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:u==="horizontal"?d:void 0,type:u==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:u==="vertical"?d:void 0,type:u==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),a.map((p,x)=>jsx(Bar,{dataKey:p,fill:n[x%n.length],stackId:m?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Fg.displayName="BarChart";var Bg=Y.forwardRef(({className:e,size:t,data:r,dataKey:a="value",nameKey:n="name",colors:i=jo,innerRadius:s=0,outerRadius:l=80,showLegend:d=true,showTooltip:m=true,showLabels:u=false,...c},g)=>jsx("div",{ref:g,className:o(Yo({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[m&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),d&&jsx(Legend,{}),jsx(Pie,{data:r,dataKey:a,nameKey:n,cx:"50%",cy:"50%",innerRadius:s,outerRadius:l,label:u,labelLine:u,children:r.map((p,x)=>jsx(Cell,{fill:i[x%i.length]},`cell-${x}`))})]})})}));Bg.displayName="PieChart";var Og=Y.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=jo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,curveType:u="monotone",...c},g)=>jsx("div",{ref:g,className:o(Yo({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:r,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),a.map((p,x)=>jsx(Area,{type:u,dataKey:p,stroke:n[x%n.length],fill:n[x%n.length],fillOpacity:.3,stackId:m?"stack":void 0},p))]})})}));Og.displayName="AreaChart";var $g=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"}}),_g=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"}}),ll=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function XP({card:e,columnId:t,variant:r,renderCard:a,onCardClick:n}){let{attributes:i,listeners:s,setNodeRef:l,transform:d,transition:m,isDragging:u}=useSortable({id:e.id,data:{columnId:t}}),c={transform:CSS.Transform.toString(d),transition:m};return jsx("div",{ref:l,style:c,className:o(ll({variant:r,isDragging:u})),onClick:()=>n?.(e,t),...i,...s,children:a?a(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 qP({column:e,variant:t,renderCard:r,onCardClick:a,onAddCard:n,showAddCard:i,columnHeight:s}){return jsxs("div",{className:o(_g({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})]}),i&&jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>n?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(ze,{style:{height:s},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(XP,{card:l,columnId:e.id,variant:t,renderCard:r,onCardClick:a},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 Kg=Y.forwardRef(({className:e,variant:t,columns:r,onCardMove:a,onCardClick:n,onAddCard:i,renderCard:s,showAddCard:l=true,columnHeight:d=500,...m},u)=>{let[c,g]=Y.useState(null),[p,x]=Y.useState(null),y=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),f=v=>r.find(P=>P.cards.some(w=>w.id===v));return jsxs(DndContext,{sensors:y,collisionDetection:closestCorners,onDragStart:v=>{let{active:P}=v,w=f(P.id);if(w){let S=w.cards.find(C=>C.id===P.id);S&&(g(S),x(w.id));}},onDragOver:v=>{let{active:P,over:w}=v;if(!w)return;let S=P.id,C=w.id,M=f(S),N=f(C)||r.find(L=>L.id===C);if(!M||!N||M.id===N.id)return;let T=N.cards.findIndex(L=>L.id===C),k=T===-1?N.cards.length:T;a?.(S,M.id,N.id,k);},onDragEnd:v=>{let{active:P,over:w}=v;if(w&&P.id!==w.id){let S=f(P.id),C=f(w.id)||r.find(M=>M.id===w.id);if(S&&C){let M=C.cards.findIndex(T=>T.id===w.id),N=M===-1?C.cards.length:M;a?.(P.id,S.id,C.id,N);}}g(null),x(null);},children:[jsx("div",{ref:u,className:o($g({variant:t,className:e})),...m,children:r.map(v=>jsx(qP,{column:v,variant:t,renderCard:s,onCardClick:n,onAddCard:i,showAddCard:l,columnHeight:d},v.id))}),jsx(DragOverlay,{children:c&&p&&jsx("div",{className:o(ll({variant:t,isDragging:true})),children:s?s(c,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:c.title}),c.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:c.description})]})]})})})]})});Kg.displayName="KanbanBoard";var Yg=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),jg=Y.createContext(null);function dl(){let e=Y.useContext(jg);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Ug=Y.forwardRef(({className:e,variant:t,children:r,opts:a,plugins:n,orientation:i="horizontal",showArrows:s=true,showDots:l=true,setApi:d,...m},u)=>{let[c,g]=ZP({...a,axis:i==="horizontal"?"x":"y"},n),[p,x]=Y.useState(false),[y,f]=Y.useState(false),[h,R]=Y.useState(0),[b,v]=Y.useState([]),P=Y.useCallback(N=>{N&&(R(N.selectedScrollSnap()),x(N.canScrollPrev()),f(N.canScrollNext()));},[]),w=Y.useCallback(()=>{g?.scrollPrev();},[g]),S=Y.useCallback(()=>{g?.scrollNext();},[g]),C=Y.useCallback(N=>{g?.scrollTo(N);},[g]),M=Y.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),w()):N.key==="ArrowRight"&&(N.preventDefault(),S());},[w,S]);return Y.useEffect(()=>{!g||!d||d(g);},[g,d]),Y.useEffect(()=>{if(g)return v(g.scrollSnapList()),P(g),g.on("reInit",P),g.on("select",P),()=>{g?.off("select",P);}},[g,P]),jsx(jg.Provider,{value:{carouselRef:c,api:g,scrollPrev:w,scrollNext:S,canScrollPrev:p,canScrollNext:y,selectedIndex:h,scrollSnaps:b,scrollTo:C},children:jsxs("div",{ref:u,className:o(Yg({variant:t,className:e})),onKeyDownCapture:M,role:"region","aria-roledescription":"carousel",...m,children:[jsx("div",{ref:c,className:"overflow-hidden",children:jsx("div",{className:o("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:r})}),s&&jsxs(Fragment,{children:[jsx(cl,{}),jsx(ml,{})]}),l&&b.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:b.map((N,T)=>jsx("button",{className:o("w-2 h-2 rounded-full transition-all",T===h?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>C(T),"aria-label":`Go to slide ${T+1}`},T))})]})})});Ug.displayName="Carousel";var Xg=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex",e),...t}));Xg.displayName="CarouselContent";var qg=Y.forwardRef(({className:e,basis:t="basis-full",...r},a)=>jsx("div",{ref:a,role:"group","aria-roledescription":"slide",className:o("min-w-0 shrink-0 grow-0 pl-4",t,e),...r}));qg.displayName="CarouselItem";var cl=Y.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollPrev:i,canScrollPrev:s}=dl();return jsxs(_,{ref:n,variant:t,size:r,className:o("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...a,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});cl.displayName="CarouselPrevious";var ml=Y.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollNext:i,canScrollNext:s}=dl();return jsxs(_,{ref:n,variant:t,size:r,className:o("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...a,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});ml.displayName="CarouselNext";var Zg=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"}}),mi={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"}},pl={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}"]},Jg=Y.forwardRef(({className:e,size:t,onEmojiSelect:r,recentEmojis:a=[],defaultCategory:n="smileys",showSearch:i=true,showCategories:s=true,...l},d)=>{let[m,u]=Y.useState(a.length>0?"recent":n),[c,g]=Y.useState(""),x=c?Object.values(pl).flat().filter(f=>f.toLowerCase().includes(c.toLowerCase())):m==="recent"?a:pl[m]||[],y=f=>{r?.(f);};return jsxs("div",{ref:d,className:o(Zg({size:t,className:e})),...l,children:[i&&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(gn,{placeholder:"Search emojis...",value:c,onChange:f=>g(f.target.value),className:"pl-8 h-8"})]})}),s&&!c&&jsx("div",{className:"flex border-b px-1",children:Object.entries(mi).map(([f,{icon:h}])=>f==="recent"&&a.length===0?null:jsx("button",{className:o("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",m===f&&"bg-accent"),onClick:()=>u(f),title:mi[f].name,children:h},f))}),!c&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:mi[m].name}),jsx(ze,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[x.map((f,h)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>y(f),children:f},`${f}-${h}`)),x.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Jg.displayName="EmojiPicker";var Qg=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),kC=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"}}),DC=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"}}),ke=({icon:e,title:t,isActive:r,onClick:a,disabled:n})=>jsxs(oa,{children:[jsx(na,{asChild:true,children:jsx(_,{type:"button",variant:r?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:a,disabled:n,children:e})}),jsx(Dr,{side:"top",className:"text-xs",children:t})]}),eb=Y.forwardRef(({className:e,variant:t,size:r,value:a="",onChange:n,placeholder:i="Start writing...",readOnly:s=false,showToolbar:l=true,minHeight:d,maxHeight:m,onEditorReady:u,...c},g)=>{let p=useEditor({extensions:[iC.configure({heading:{levels:[1,2,3]}}),sC.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),lC,dC.configure({types:["heading","paragraph"]}),cC.configure({placeholder:i})],content:a,editable:!s,onUpdate:({editor:y})=>{n?.(y.getHTML());},onCreate:({editor:y})=>{u?.(y);}});Y.useEffect(()=>{p&&a!==p.getHTML()&&p.commands.setContent(a);},[a,p]),Y.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let x=()=>{if(!p)return;let y=p.getAttributes("link").href,f=window.prompt("URL",y);if(f!==null){if(f===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:f}).run();}};return p?jsx(aa,{children:jsxs("div",{ref:g,className:o(Qg({variant:t,size:r,className:e})),...c,children:[l&&!s&&jsxs("div",{className:o(kC({size:r})),children:[jsx(ke,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(ke,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(ke,{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(ke,{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(ke,{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(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(ke,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(ke,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(ke,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(ke,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(ke,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(ke,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(ke,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(ke,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(ke,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(ke,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(ke,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(ke,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:x}),jsx(ke,{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:o(DC({size:r})),style:{minHeight:d,maxHeight:m}})]})}):null});eb.displayName="RichTextEditor";var rb=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function FC(e,t,r){return centerCrop(makeAspectCrop({unit:"%",width:90},r,e,t),e,t)}async function tb(e,t,r=0,a=1){let n=document.createElement("canvas"),i=n.getContext("2d");if(!i)return null;let s=e.naturalWidth/e.width,l=e.naturalHeight/e.height,d=window.devicePixelRatio||1;n.width=Math.floor(t.width*s*d),n.height=Math.floor(t.height*l*d),i.scale(d,d),i.imageSmoothingQuality="high";let m=t.x*s,u=t.y*l,c=r*Math.PI/180,g=e.naturalWidth/2,p=e.naturalHeight/2;return i.save(),i.translate(-m,-u),i.translate(g,p),i.rotate(c),i.scale(a,a),i.translate(-g,-p),i.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),i.restore(),new Promise(x=>{n.toBlob(y=>{x(y);},"image/png");})}var ab=Y.forwardRef(({className:e,variant:t,src:r,aspectRatio:a,onCropChange:n,onCropComplete:i,showZoom:s=true,showRotation:l=true,minZoom:d=1,maxZoom:m=3,circularCrop:u=false,initialCrop:c,...g},p)=>{let x=Y.useRef(null),[y,f]=Y.useState(),[h,R]=Y.useState(),[b,v]=Y.useState(1),[P,w]=Y.useState(0),S=T=>{let{width:k,height:L}=T.currentTarget;if(a){let I=FC(k,L,a);f(I);}else f(c||{unit:"%",x:10,y:10,width:80,height:80});},C=T=>{f(T),n?.(T);},M=async T=>{if(R(T),i&&x.current&&T.width&&T.height){let k=await tb(x.current,T,P,b);i(k);}},N=()=>{w(T=>(T+90)%360);};return Y.useEffect(()=>{h&&x.current&&i&&tb(x.current,h,P,b).then(T=>{i(T);});},[b,P,h,i]),jsxs("div",{ref:p,className:o(rb({variant:t,className:e})),...g,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(LC,{crop:y,onChange:C,onComplete:M,aspect:a,circularCrop:u,className:"max-h-[400px]",children:jsx("img",{ref:x,src:r,alt:"Crop preview",onLoad:S,style:{transform:`scale(${b}) rotate(${P}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(Nn,{value:[b],onValueChange:([T])=>v(T),min:d,max:m,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),l&&jsx(_,{variant:"bordered",size:"icon",onClick:N,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});ab.displayName="ImageCropper";var vl=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"}}),GC={sm:96,md:128,lg:192},nb=Y.forwardRef(({className:e,variant:t,size:r,value:a,qrSize:n,fgColor:i="currentColor",bgColor:s="transparent",level:l="M",includeMargin:d=false,title:m,logo:u,logoSize:c=40,logoPadding:g=4,logoBackgroundColor:p="white",...x},y)=>{let f=n??GC[r??"md"];return a?jsx("div",{ref:y,className:o(vl({variant:t,size:r,className:e})),...x,children:jsxs("div",{className:"relative inline-block",children:[jsx(BC,{value:a,size:f,fgColor:i,bgColor:s,level:l,title:m,style:{padding:d?16:0}}),u&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:g,backgroundColor:p},children:jsx("img",{src:u,alt:"Logo",style:{width:c,height:c,objectFit:"contain"}})})]})}):jsx("div",{ref:y,className:o(vl({variant:t,size:r,className:e})),...x,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:f,height:f},children:"No data"})})});nb.displayName="QRCode";var ib=({children:e,defaultTheme:t="system",storageKey:r="reever-ui-theme",enableSystem:a=true,disableTransitionOnChange:n=false,attribute:i="class",forcedTheme:s,themes:l=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:r,enableSystem:a,disableTransitionOnChange:n,attribute:i,forcedTheme:s,themes:l,children:e});ib.displayName="ThemeProvider";var UC=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),sb=Y.forwardRef(({className:e,variant:t="ghost",size:r="md",mode:a="dropdown"},n)=>{let{theme:i,setTheme:s,resolvedTheme:l}=useTheme(),[d,m]=Y.useState(false);Y.useEffect(()=>{m(true);},[]);let u=()=>{let c=["light","dark","system"],p=(c.indexOf(i||"system")+1)%c.length;s(c[p]);};return d?a==="cycle"?jsxs(_,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),onClick:u,children:[l==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(ia,{children:[jsx(sa,{asChild:true,children:jsxs(_,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",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(Lr,{align:"end",children:[jsxs(Lt,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs(Lt,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs(Lt,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(_,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});sb.displayName="ThemeToggle";var db=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),cb=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),mb=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"}}),ub=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,startContent:c,endContent:g,id:p,...x},y)=>{let f=Y.useId(),h=p||f,R=`${h}-description`,b=`${h}-error`,v=i&&a;return jsxs("div",{className:o(db({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:h,className:o(mb({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[c&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:c}),jsx("input",{ref:y,id:h,"aria-invalid":i,"aria-describedby":v?b:r?R:void 0,"aria-required":n,className:o(cb({size:s,isInvalid:i}),c&&"pl-10",g&&"pr-10",d),...x}),g&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:g})]}),r&&!v&&jsx("p",{id:R,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),v&&jsx("p",{id:b,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});ub.displayName="TextField";var bb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZC=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}}),pb=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"}}),fb=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),JC=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"}}),vb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,min:c,max:g,step:p=1,value:x,defaultValue:y,onChange:f,showButtons:h=true,formatOptions:R,fullWidth:b=false,disabled:v,id:P,...w},S)=>{let C=Y.useId(),M=P||C,N=`${M}-description`,T=`${M}-error`,[k,L]=Y.useState(y),[I,V]=Y.useState(false),D=x!==void 0?x:k,E=i&&a,B=Y.useCallback(O=>{O!==void 0&&(c!==void 0&&O<c&&(O=c),g!==void 0&&O>g&&(O=g)),x===void 0&&L(O),f?.(O);},[x,c,g,f]),W=()=>{let O=(D??0)+p;B(O);},H=()=>{let O=(D??0)-p;B(O);},U=O=>{let A=O.target.value;if(A==="")B(void 0);else {let z=parseFloat(A);isNaN(z)||B(z);}},$=O=>{O.key==="ArrowUp"?(O.preventDefault(),W()):O.key==="ArrowDown"&&(O.preventDefault(),H());},Pe=Y.useMemo(()=>D===void 0?"":R?new Intl.NumberFormat(void 0,R).format(D):D.toString(),[D,R]),ie=c!==void 0&&D!==void 0&&D<=c,F=g!==void 0&&D!==void 0&&D>=g;return jsxs("div",{className:o(bb({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:M,className:o(JC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx("button",{type:"button",onClick:H,disabled:v||ie,className:o(pb({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:o(fb({size:s}))})}),jsx("input",{ref:S,id:M,type:"text",inputMode:"decimal",value:Pe,onChange:U,onKeyDown:$,onFocus:()=>V(true),onBlur:()=>V(false),"aria-invalid":i,"aria-describedby":E?T:r?N:void 0,"aria-required":n,"aria-valuemin":c,"aria-valuemax":g,"aria-valuenow":D,disabled:v,className:o(ZC({size:s,isInvalid:i,fullWidth:b}),!h&&"px-3",d),style:{borderColor:I?"var(--color-foreground)":void 0},...w}),h&&jsx("button",{type:"button",onClick:W,disabled:v||F,className:o(pb({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:o(fb({size:s}))})})]}),r&&!E&&jsx("p",{id:N,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),E&&jsx("p",{id:T,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});vb.displayName="NumberField";var yb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),tM=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),hb=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"}}),rM=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"}}),aM=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"}}),Rb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="",onChange:p,onClear:x,onSearch:y,showClearButton:f=true,showSearchIcon:h=true,disabled:R,placeholder:b="Search...",id:v,...P},w)=>{let S=Y.useId(),C=v||S,M=`${C}-description`,N=`${C}-error`,[T,k]=Y.useState(g),L=c!==void 0?c:T,I=i&&a,V=L.length>0,D=W=>{let H=W.target.value;c===void 0&&k(H),p?.(H);},E=()=>{c===void 0&&k(""),p?.(""),x?.();},B=W=>{W.key==="Enter"?(W.preventDefault(),y?.(L)):W.key==="Escape"&&V&&(W.preventDefault(),E());};return jsxs("div",{className:o(yb({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:C,className:o(rM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Search,{className:o(hb({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:w,id:C,type:"search",value:L,onChange:D,onKeyDown:B,placeholder:b,"aria-invalid":i,"aria-describedby":I?N:r?M:void 0,"aria-required":n,disabled:R,className:o(tM({size:s,isInvalid:i}),!h&&"pl-3",!f&&"pr-3",d),...P}),f&&V&&!R&&jsx("button",{type:"button",onClick:E,className:o(aM({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:o(hb({size:s}))})})]}),r&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),I&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Rb.displayName="SearchField";var Nb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),nM=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),iM=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"}}),sM=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"}}),Nl=(e,t="yyyy-MM-dd")=>{if(!e)return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",a).replace("dd",n)},lM=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},Pb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minDate:x,maxDate:y,dateFormat:f="yyyy-MM-dd",showIcon:h=true,fullWidth:R=false,disabled:b,id:v,...P},w)=>{let S=Y.useId(),C=v||S,M=`${C}-description`,N=`${C}-error`,T=Y.useRef(null),k=w||T,[L,I]=Y.useState(g??null),[V,D]=Y.useState(false),E=()=>{!b&&k.current&&k.current.showPicker?.();},B=c!==void 0?c:L,W=i&&a,H=ie=>{let F=lM(ie.target.value);c===void 0&&I(F),p?.(F);},U=B?Nl(B,"yyyy-MM-dd"):"",$=x?Nl(x,"yyyy-MM-dd"):void 0,Pe=y?Nl(y,"yyyy-MM-dd"):void 0;return jsxs("div",{className:o(Nb({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:C,className:o(sM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:o("relative",R?"w-full":"w-fit"),children:[jsx("input",{ref:k,id:C,type:"date",value:U,onChange:H,onFocus:()=>D(true),onBlur:()=>D(false),min:$,max:Pe,"aria-invalid":i,"aria-describedby":W?N:r?M:void 0,"aria-required":n,disabled:b,className:o(nM({size:s,isInvalid:i,fullWidth:R}),!h&&"pr-3",d),style:{borderColor:V?"var(--color-foreground)":void 0},...P}),h&&jsx("button",{type:"button",onClick:E,disabled:b,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:o(iM({size:s}))})})]}),r&&!W&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),W&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Pb.displayName="DateField";var Mb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),dM=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}}),cM=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"}}),Tb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minTime:x,maxTime:y,showSeconds:f=false,hourCycle:h=24,disabled:R,fullWidth:b=false,id:v,...P},w)=>{let S=Y.useId(),C=v||S,M=`${C}-description`,N=`${C}-error`,T=Y.useRef(null),k=Y.useRef(null),L=Y.useRef(null),I=Y.useRef(null),[V,D]=Y.useState(g??null),E=c!==void 0?c:V,B=i&&a,W=G=>h===24?G:G===0?12:G>12?G-12:G,H=G=>G>=12?"PM":"AM",U=(G,Q)=>Q==="AM"?G===12?0:G:G===12?12:G+12,[$,Pe]=Y.useState(E?String(W(E.hour)).padStart(2,"0"):""),[ie,F]=Y.useState(E?String(E.minute).padStart(2,"0"):""),[O,A]=Y.useState(E?.second!==void 0?String(E.second).padStart(2,"0"):""),[z,ee]=Y.useState(E?H(E.hour):"AM"),[J,Ue]=Y.useState(false);Y.useEffect(()=>{c!==void 0&&(c?(Pe(String(W(c.hour)).padStart(2,"0")),F(String(c.minute).padStart(2,"0")),c.second!==void 0&&A(String(c.second).padStart(2,"0")),ee(H(c.hour))):(Pe(""),F(""),A("")));},[c,h]);let nt=(G,Q,Le,qt)=>{let ue=parseInt(G,10),ht=parseInt(Q,10),Zt=f?parseInt(Le,10):void 0;if(isNaN(ue)||isNaN(ht)||f&&isNaN(Zt)){c===void 0&&D(null),p?.(null);return}let Jl={hour:h===12?U(ue,qt):ue,minute:ht,...f&&Zt!==void 0&&{second:Zt}};c===void 0&&D(Jl),p?.(Jl);},Cx=G=>{let Q=G.target.value.replace(/\D/g,"").slice(0,2);Pe(Q);let Le=h===24?23:12,qt=h===24?0:1;if(Q.length===2){let ue=parseInt(Q,10);ue>=qt&&ue<=Le&&(k.current?.focus(),k.current?.select());}},Mx=G=>{let Q=G.target.value.replace(/\D/g,"").slice(0,2);if(F(Q),Q.length===2){let Le=parseInt(Q,10);Le>=0&&Le<=59&&(f?(L.current?.focus(),L.current?.select()):h===12&&I.current?.focus());}},Tx=G=>{let Q=G.target.value.replace(/\D/g,"").slice(0,2);A(Q),Q.length===2&&h===12&&I.current?.focus();},Sx=()=>{if($){let G=parseInt($,10),Q=h===24?23:12,qt=Math.min(Math.max(G,h===24?0:1),Q),ue=String(qt).padStart(2,"0");Pe(ue),nt(ue,ie,O,z);}},kx=()=>{if(ie){let G=parseInt(ie,10),Q=Math.min(Math.max(G,0),59),Le=String(Q).padStart(2,"0");F(Le),nt($,Le,O,z);}},Dx=()=>{if(O){let G=parseInt(O,10),Q=Math.min(Math.max(G,0),59),Le=String(Q).padStart(2,"0");A(Le),nt($,ie,Le,z);}},Zl=()=>{let G=z==="AM"?"PM":"AM";ee(G),nt($,ie,O,G);},Lx=G=>{let Q=G.key.toLowerCase();Q==="a"?(G.preventDefault(),z!=="AM"&&(ee("AM"),nt($,ie,O,"AM"))):Q==="p"?(G.preventDefault(),z!=="PM"&&(ee("PM"),nt($,ie,O,"PM"))):Q==="arrowup"||Q==="arrowdown"?(G.preventDefault(),Zl()):Q==="arrowleft"&&(G.preventDefault(),f?(L.current?.focus(),L.current?.select()):(k.current?.focus(),k.current?.select()));},$i=(G,Q)=>{if(G.key==="ArrowUp"||G.key==="ArrowDown"){G.preventDefault();let Le=G.key==="ArrowUp"?1:-1;if(Q==="hour"){let qt=parseInt($,10)||0,ue=h===24?23:12,ht=h===24?0:1,Zt=qt+Le;Zt>ue&&(Zt=ht),Zt<ht&&(Zt=ue);let Ki=String(Zt).padStart(2,"0");Pe(Ki),nt(Ki,ie,O,z);}else if(Q==="minute"){let ue=(parseInt(ie,10)||0)+Le;ue>59&&(ue=0),ue<0&&(ue=59);let ht=String(ue).padStart(2,"0");F(ht),nt($,ht,O,z);}else if(Q==="second"){let ue=(parseInt(O,10)||0)+Le;ue>59&&(ue=0),ue<0&&(ue=59);let ht=String(ue).padStart(2,"0");A(ht),nt($,ie,ht,z);}}G.key==="ArrowRight"&&(G.preventDefault(),Q==="hour"?(k.current?.focus(),k.current?.select()):Q==="minute"&&f?(L.current?.focus(),L.current?.select()):(Q==="minute"&&!f&&h===12||Q==="second"&&h===12)&&I.current?.focus()),G.key==="ArrowLeft"&&(G.preventDefault(),Q==="minute"?(T.current?.focus(),T.current?.select()):Q==="second"&&(k.current?.focus(),k.current?.select())),G.key==="Backspace"&&G.currentTarget.value===""&&(Q==="minute"?T.current?.focus():Q==="second"&&k.current?.focus());},_i=o((()=>{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",R&&"cursor-not-allowed");return jsxs("div",{ref:w,className:o(Mb({size:s}),e),...P,children:[t&&jsxs(Zi.Root,{htmlFor:C,className:o(cM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:o(dM({size:s,isInvalid:i,disabled:R,fullWidth:b}),d),style:{borderColor:J?"var(--color-foreground)":void 0},onFocus:()=>Ue(true),onBlur:G=>{G.currentTarget.contains(G.relatedTarget)||Ue(false);},children:[jsx("input",{ref:T,id:C,type:"text",inputMode:"numeric",placeholder:h===24?"HH":"hh",value:$,onChange:Cx,onBlur:Sx,onKeyDown:G=>$i(G,"hour"),onFocus:G=>G.target.select(),"aria-label":"Hour","aria-invalid":i,"aria-describedby":B?N:r?M:void 0,"aria-required":n,disabled:R,className:_i}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:k,type:"text",inputMode:"numeric",placeholder:"mm",value:ie,onChange:Mx,onBlur:kx,onKeyDown:G=>$i(G,"minute"),onFocus:G=>G.target.select(),"aria-label":"Minute",disabled:R,className:_i}),f&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:L,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:Tx,onBlur:Dx,onKeyDown:G=>$i(G,"second"),onFocus:G=>G.target.select(),"aria-label":"Second",disabled:R,className:_i})]}),h===12&&jsx("button",{ref:I,type:"button",onClick:Zl,onKeyDown:Lx,disabled:R,className:o("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",R&&"cursor-not-allowed"),"aria-label":"AM/PM",children:z})]}),r&&!B&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),B&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Tb.displayName="TimeField";var Db=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),uM=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),pM=cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),fM=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"}}),Sb=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),gM=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),Lb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="#000000",onChange:p,showSwatch:x=true,showPicker:y=true,allowAlpha:f=false,fullWidth:h=false,disabled:R,id:b,...v},P)=>{let w=Y.useId(),S=b||w,C=`${S}-picker`,M=`${S}-description`,N=`${S}-error`,[T,k]=Y.useState(g),[L,I]=Y.useState(false),V=c!==void 0?c:T,D=i&&a,E=U=>{let $=U.target.value;$&&!$.startsWith("#")&&($="#"+$),c===void 0&&k($),p?.($);},B=U=>{let $=U.target.value.toUpperCase();c===void 0&&k($),p?.($);},W=()=>{if(V&&Sb(V)){let U=gM(V);U!==V&&(c===void 0&&k(U),p?.(U));}},H=Sb(V)?V:"#000000";return jsxs("div",{className:o(Db({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:S,className:o(fM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[x&&jsx("div",{className:o(pM({size:s})),children:y?jsxs("label",{htmlFor:C,className:"block h-full w-full cursor-pointer",children:[jsx("input",{id:C,type:"color",value:H,onChange:B,disabled:R,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsx("div",{className:"h-full w-full",style:{backgroundColor:H}})]}):jsx("div",{className:"h-full w-full",style:{backgroundColor:H}})}),jsx("input",{ref:P,id:S,type:"text",value:V,onChange:E,onFocus:()=>I(true),onBlur:()=>{I(false),W();},placeholder:"#000000",maxLength:f?9:7,"aria-invalid":i,"aria-describedby":D?N:r?M:void 0,"aria-required":n,disabled:R,className:o(uM({size:s,isInvalid:i,fullWidth:h}),!x&&"pl-3",d),style:{borderColor:L?"var(--color-foreground)":void 0},...v})]}),r&&!D&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),D&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Lb.displayName="ColorField";var Ib=cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},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"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),Eb=Y.createContext({});function vM(){return Y.useContext(Eb)}var Hb=Y.forwardRef(({className:e,variant:t,orientation:r,spacing:a,disabled:n,children:i,...s},l)=>jsx(Eb.Provider,{value:{disabled:n},children:jsx("div",{ref:l,role:"group",className:o(Ib({variant:t,orientation:r,spacing:a,className:e})),...s,children:i})}));Hb.displayName="ButtonGroup";var zb=cva("inline-flex items-center justify-center 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10",xl:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"ghost",size:"md",radius:"md"}}),Fb=Y.forwardRef(({className:e,variant:t,size:r,radius:a,isLoading:n,disabled:i,children:s,...l},d)=>{let m={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6"}[r??"md"];return jsx("button",{ref:d,type:"button",disabled:i||n,className:o(zb({variant:t,size:r,radius:a,className:e})),...l,children:n?jsxs("svg",{className:o("animate-spin",m),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}):jsx("span",{className:o("[&>svg]:h-full [&>svg]:w-full",m),children:s})})});Fb.displayName="IconButton";var Ob=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"}}),Gb=Y.forwardRef(({className:e,variant:t,orientation:r,size:a,density:n,items:i,maxVisibleItems:s,isDisabled:l,onAction:d,showLabels:m=false,renderItem:u,...c},g)=>{let p=s&&s<i.length?i.slice(0,s):i,x=s&&s<i.length?i.slice(s):[],y={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[a??"md"],f={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[a??"md"],h={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[a??"md"],R=(v,P)=>{P&&P(),d&&d(v);},b=v=>jsxs("button",{type:"button",disabled:l||v.isDisabled,onClick:()=>R(v.key,v.onPress),className:o("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",m?y:f),"aria-label":v.label,children:[v.icon&&jsx("span",{className:h,children:v.icon}),m&&jsx("span",{children:v.label})]},v.key);return jsxs("div",{ref:g,role:"group",className:o(Ob({variant:t,orientation:r,size:a,density:n,className:e})),...c,children:[p.map(v=>u?u(v):b(v)),x.length>0&&jsxs(ia,{children:[jsx(sa,{asChild:true,children:jsx("button",{type:"button",disabled:l,className:o("inline-flex 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","disabled:pointer-events-none disabled:opacity-50",f),"aria-label":"More actions",children:jsx(MoreHorizontal,{className:h})})}),jsx(Lr,{align:"end",children:x.map(v=>jsxs(Lt,{disabled:v.isDisabled,onClick:()=>R(v.key,v.onPress),children:[v.icon&&jsx("span",{className:o(h,"mr-2"),children:v.icon}),v.label]},v.key))})]})]})});Gb.displayName="ActionGroup";var Kb=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"}}),wM=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}}),Yb=Y.forwardRef(({className:e,variant:t,size:r,pulse:a=false,hideLabel:n=false,children:i,...s},l)=>jsxs("span",{ref:l,role:"status",className:o(Kb({variant:t,size:r,className:e})),...s,children:[jsx("span",{className:o(wM({size:r,pulse:a})),"aria-hidden":"true"}),!n&&i&&jsx("span",{className:"text-foreground",children:i})]}));Yb.displayName="StatusLight";var Ub=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),PM=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),CM=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),MM=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Xb=Y.forwardRef(({className:e,size:t,illustration:r,heading:a,description:n,children:i,...s},l)=>jsxs("div",{ref:l,className:o(Ub({size:t,className:e})),...s,children:[r&&jsx("div",{className:o(PM({size:t})),"aria-hidden":"true",children:r}),a&&jsx("h3",{className:o(CM({size:t})),children:a}),n&&jsx("p",{className:o(MM({size:t})),children:n}),i&&jsx("div",{className:"mt-2",children:i})]}));Xb.displayName="IllustratedMessage";var Jb=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),IM={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Qb=Y.forwardRef(({className:e,variant:t,title:r,icon:a,hideIcon:n=false,isDismissible:i=false,onDismiss:s,actions:l,children:d,...m},u)=>{let[c,g]=Y.useState(true);if(!c)return null;let p=IM[t??"info"],x=()=>{g(false),s?.();};return jsxs("div",{ref:u,role:"alert",className:o(Jb({variant:t,className:e})),...m,children:[!n&&jsx("div",{className:"flex-shrink-0",children:a||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[r&&jsx("div",{className:"font-medium",children:r}),d&&jsx("div",{className:"opacity-90",children:d}),l&&jsx("div",{className:"mt-3 flex gap-2",children:l})]}),i&&jsx("button",{type:"button",onClick:x,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X$1,{className:"h-4 w-4"})})]})});Qb.displayName="InlineAlert";var ev=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"}}),tv=Y.forwardRef(({className:e,position:t,size:r,selectedCount:a=0,isOpen:n=true,onClose:i,showClose:s=true,selectedText:l,children:d,...m},u)=>{if(!n||a===0)return null;let c=()=>typeof l=="function"?l(a):l||`${a} item${a>1?"s":""} selected`;return jsxs("div",{ref:u,role:"toolbar","aria-label":"Actions for selected items",className:o(ev({position:t,size:r,className:e})),...m,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:c()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:d}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx("button",{type:"button",onClick:i,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsx(X$1,{className:"h-4 w-4"})})]})]})});tv.displayName="ActionBar";var rv=Y.forwardRef(({className:e,icon:t,children:r,...a},n)=>jsxs("button",{ref:n,type:"button",className:o("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),...a,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),r]}));rv.displayName="ActionBarButton";var av=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",subtle:"text-muted-foreground hover:text-foreground hover:bg-muted"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-9 w-9"}},defaultVariants:{variant:"ghost",size:"md"}});function OM(e){return "items"in e}var ov=Y.forwardRef(({items:e,align:t="end",side:r="bottom",iconOrientation:a="vertical",trigger:n,variant:i,size:s,onAction:l,"aria-label":d="More actions",triggerClassName:m,disabled:u},c)=>{let g={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}[s??"md"],p=a==="horizontal"?MoreHorizontal:MoreVertical,x=f=>{f.onSelect?.(),l?.(f.key);},y=f=>jsxs(Lt,{disabled:f.isDisabled,onClick:()=>x(f),className:o(f.isDestructive&&"text-destructive focus:text-destructive"),children:[f.icon&&jsx("span",{className:"mr-2 h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:f.icon}),jsx("span",{className:"flex-1",children:f.label}),f.shortcut&&jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:f.shortcut})]},f.key);return jsxs(ia,{children:[jsx(sa,{asChild:true,children:n||jsx("button",{ref:c,type:"button",disabled:u,className:o(av({variant:i,size:s}),m),"aria-label":d,children:jsx(p,{className:g})})}),jsx(Lr,{align:t,side:r,children:e.map((f,h)=>OM(f)?jsxs(Y.Fragment,{children:[h>0&&jsx(yn,{}),f.items.map(y)]},f.key):y(f))})]})});ov.displayName="ActionMenu";var sv=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"}}),lv=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 dv({className:e,variant:t,size:r,items:a,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,allowsDragging:l=false,onReorder:d,showCheckbox:m=false,renderItem:u,emptyContent:c,...g}){let[p,x]=Y.useState(new Set),[y,f]=Y.useState(null),[h,R]=Y.useState(null),b=Y.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),v=C=>{if(i==="none")return;let M;i==="single"?M=b.has(C)?new Set:new Set([C]):(M=new Set(b),M.has(C)?M.delete(C):M.add(C)),n||x(M),s?.(M);},P=(C,M)=>{f(M),C.dataTransfer.effectAllowed="move";},w=(C,M)=>{C.preventDefault(),y!==M&&R(M);},S=()=>{if(y&&h&&y!==h){let C=a.findIndex(k=>k.key===y),M=a.findIndex(k=>k.key===h),N=[...a],[T]=N.splice(C,1);N.splice(M,0,T),d?.(N);}f(null),R(null);};return a.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":i==="multiple",className:o(sv({variant:t,size:r,className:e})),...g,children:a.map(C=>{let M=b.has(C.key),N=y===C.key,T=h===C.key;return u?jsx("div",{role:"option","aria-selected":M,onClick:()=>v(C.key),children:u(C,M)},C.key):jsxs("div",{role:"option","aria-selected":M,"aria-disabled":C.isDisabled,draggable:l&&!C.isDisabled,onDragStart:k=>P(k,C.key),onDragOver:k=>w(k,C.key),onDragEnd:S,onClick:()=>!C.isDisabled&&v(C.key),className:o(lv({variant:t,size:r,isSelected:M,isDisabled:C.isDisabled}),N&&"opacity-50",T&&"border-t-2 border-t-primary"),children:[l&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),m&&i!=="none"&&jsx("div",{className:o("flex h-4 w-4 items-center justify-center rounded border",M?"bg-primary border-primary text-primary-foreground":"border-input"),children:M&&jsx(Check,{className:"h-3 w-3"})}),C.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:C.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:C.label}),C.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:C.description})]})]},C.key)})})}dv.displayName="ListView";var mv=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"}}),$M=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"}}),cv=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",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),uv=Y.forwardRef(({className:e,orientation:t="horizontal",size:r,value:a,defaultValue:n=[25,75],onValueChange:i,onValueCommit:s,showLabels:l=false,formatLabel:d=f=>String(f),trackColor:m="primary",min:u=0,max:c=100,step:g=1,disabled:p,...x},y)=>{let[f,h]=Y.useState(n),R=a??f,b=w=>{let S=w;a||h(S),i?.(S);},v=w=>{s?.(w);},P={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[m];return jsxs("div",{className:"relative w-full",children:[l&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:d(R[0])}),jsx("span",{children:d(R[1])})]}),jsxs(ar.Root,{ref:y,value:R,onValueChange:b,onValueCommit:v,min:u,max:c,step:g,disabled:p,orientation:t??"horizontal",className:o(mv({orientation:t,size:r,className:e})),...x,children:[jsx(ar.Track,{className:o($M({orientation:t,size:r})),children:jsx(ar.Range,{className:o("absolute rounded-full",P,{"h-full":t==="horizontal","w-full":t==="vertical"})})}),jsx(ar.Thumb,{className:o(cv({size:r}))}),jsx(ar.Thumb,{className:o(cv({size:r}))})]})]})});uv.displayName="RangeSlider";var gv=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"}}),jM=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"}}),UM={help:HelpCircle,info:Info,warning:AlertCircle},bv=Y.forwardRef(({variant:e="help",size:t,title:r,children:a,trigger:n,side:i="top",align:s="center",open:l,onOpenChange:d,learnMoreUrl:m,learnMoreText:u="Learn more",triggerClassName:c,contentClassName:g},p)=>{let x=UM[e??"help"];return jsxs(yt.Root,{open:l,onOpenChange:d,children:[jsx(yt.Trigger,{asChild:true,children:n||jsx("button",{ref:p,type:"button",className:o(gv({variant:e,size:t}),c),"aria-label":"Help",children:jsx(x,{className:"h-full w-full"})})}),jsx(yt.Portal,{children:jsxs(yt.Content,{side:i,align:s,sideOffset:8,className:o(jM({size:t}),g),children:[r&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:r}),jsx("div",{className:"text-muted-foreground",children:a}),m&&jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[u," \u2192"]}),jsx(yt.Arrow,{className:"fill-popover"})]})})]})});bv.displayName="ContextualHelp";var hv=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),Vl=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",outline:"border border-input 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:"outline",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 xv({className:e,spacing:t,variant:r,size:a,items:n,selectedKeys:i,selectionMode:s="none",onSelectionChange:l,allowsRemoving:d=false,onRemove:m,label:u,description:c,errorMessage:g,maxTags:p,...x}){let[y,f]=Y.useState(new Set),h=Y.useMemo(()=>i?i instanceof Set?i:new Set(i):y,[i,y]),R=w=>{if(s==="none")return;let S;s==="single"?S=h.has(w)?new Set:new Set([w]):(S=new Set(h),S.has(w)?S.delete(w):S.add(w)),i||f(S),l?.(S);},b=(w,S)=>{S.stopPropagation(),m?.(w);},v=p?n.slice(0,p):n,P=p?Math.max(0,n.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[u&&jsx("span",{className:"text-sm font-medium text-foreground",children:u}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:c}),jsxs("div",{role:"group","aria-label":u,className:o(hv({spacing:t}),e),...x,children:[v.map(w=>{let S=h.has(w.key),C=s!=="none";return jsxs("span",{role:C?"button":void 0,tabIndex:C&&!w.isDisabled?0:void 0,"aria-pressed":C?S:void 0,onClick:()=>!w.isDisabled&&R(w.key),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&!w.isDisabled&&(M.preventDefault(),R(w.key));},style:w.color?{backgroundColor:w.color}:void 0,className:o(Vl({variant:w.color?void 0:r,size:a,isSelected:S,isDisabled:w.isDisabled}),C&&!w.isDisabled&&"cursor-pointer hover:opacity-80",w.color&&"text-white"),children:[w.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:w.icon}),w.label,d&&!w.isDisabled&&jsx("button",{type:"button",onClick:M=>b(w.key,M),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${w.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},w.key)}),P>0&&jsxs("span",{className:o(Vl({variant:"surface",size:a}),"cursor-default"),children:["+",P," more"]})]}),g&&jsx("span",{className:"text-sm text-destructive",children:g})]})}xv.displayName="TagGroup";var wv=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"}}),Nv=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 Pv({className:e,columns:t,gap:r,items:a,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,showSelectionIndicator:l=true,itemVariant:d="default",itemSize:m="md",renderItem:u,emptyContent:c,...g}){let[p,x]=Y.useState(new Set),y=Y.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),f=h=>{if(i==="none")return;let R;i==="single"?R=y.has(h)?new Set:new Set([h]):(R=new Set(y),R.has(h)?R.delete(h):R.add(h)),n||x(R),s?.(R);};return a.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"grid","aria-multiselectable":i==="multiple",className:o(wv({columns:t,gap:r,className:e})),...g,children:a.map(h=>{let R=y.has(h.key);return u?jsx("div",{role:"gridcell","aria-selected":R,onClick:()=>f(h.key),children:u(h,R)},h.key):jsxs("div",{role:"gridcell","aria-selected":R,"aria-disabled":h.isDisabled,onClick:()=>!h.isDisabled&&f(h.key),className:o(Nv({variant:d,size:m,isSelected:R,isDisabled:h.isDisabled})),children:[l&&i!=="none"&&R&&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"})}),h.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:h.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:h.label}),h.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:h.description})]})]},h.key)})})}Pv.displayName="GridList";var Mv=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),ZM=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),JM=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}}),ki=Y.forwardRef(({className:e,size:t,value:r,min:a=0,max:n=100,optimum:i,low:s,high:l,label:d,showValueLabel:m=false,formatValue:u,color:c="primary",trackVariant:g="default",...p},x)=>{let y=Math.min(100,Math.max(0,(r-a)/(n-a)*100)),f=()=>{if(c!=="auto")return "";let R=(r-a)/(n-a),b=s!==void 0?(s-a)/(n-a):.25,v=l!==void 0?(l-a)/(n-a):.75;return (i!==void 0?(i-a)/(n-a):1)>=.5?R<=b?"bg-red-500":R<=v?"bg-yellow-500":"bg-green-500":R>=v?"bg-red-500":R>=b?"bg-yellow-500":"bg-green-500"},h=u?u(r,y):`${Math.round(y)}%`;return jsxs("div",{ref:x,className:o("w-full",e),...p,children:[(d||m)&&jsxs("div",{className:"flex items-center justify-between mb-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:h})]}),jsx("div",{role:"meter","aria-valuenow":r,"aria-valuemin":a,"aria-valuemax":n,"aria-label":d,className:o(Mv({size:t})),children:jsx("div",{className:o(ZM({variant:g})),children:jsx("div",{className:o(JM({color:c==="auto"?void 0:c,rounded:y>=100}),c==="auto"&&f()),style:{width:`${y}%`}})})})]})});ki.displayName="Meter";var Tv=Y.forwardRef((e,t)=>jsx(ki,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Tv.displayName="DiskUsageMeter";var Sv=Y.forwardRef((e,t)=>jsx(ki,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Sv.displayName="BatteryMeter";var kv=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Li=(e,t,r)=>{let a=n=>{let i=(n+e/60)%6;return r-r*t*Math.max(Math.min(i,4-i,1),0)};return [Math.round(a(5)*255),Math.round(a(3)*255),Math.round(a(1)*255)]},Dv=(e,t,r)=>{e/=255,t/=255,r/=255;let a=Math.max(e,t,r),n=Math.min(e,t,r),i=a-n,s=0,l=a===0?0:i/a,d=a;if(i!==0)switch(a){case e:s=((t-r)/i+(t<r?6:0))*60;break;case t:s=((r-e)/i+2)*60;break;case r:s=((e-t)/i+4)*60;break}return [s,l,d]},Lv=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},Vv=(e,t,r)=>"#"+[e,t,r].map(a=>a.toString(16).padStart(2,"0")).join(""),Iv=Y.forwardRef(({hue:e,saturation:t,brightness:r,value:a,defaultValue:n="#ff0000",onChange:i,onColorChange:s,size:l,disabled:d,thumbSize:m=18,className:u,...c},g)=>{let p=Y.useRef(null),[x,y]=Y.useState(false),f=Y.useCallback(H=>{let U=Lv(H);return U?Dv(...U):[0,1,1]},[]),[h,R]=Y.useState(()=>f(a||n)),b=e??h[0],v=t??h[1],P=r??h[2];Y.useEffect(()=>{if(a){let H=f(a);R(H);}},[a,f]);let w=Y.useCallback((H,U)=>{if(d||!p.current)return;let $=p.current.getBoundingClientRect(),Pe=Math.max(0,Math.min(1,(H-$.left)/$.width)),ie=Math.max(0,Math.min(1,(U-$.top)/$.height)),F=Pe,O=1-ie;t===void 0&&r===void 0&&R([b,F,O]),i?.({hue:b,saturation:F,brightness:O});let A=Li(b,F,O);s?.(Vv(...A));},[d,b,t,r,i,s]),S=H=>{d||(H.preventDefault(),y(true),H.target.setPointerCapture(H.pointerId),w(H.clientX,H.clientY));},C=H=>{x&&w(H.clientX,H.clientY);},M=H=>{y(false),H.target.releasePointerCapture(H.pointerId);},[N,T,k]=Li(b,1,1),L=`rgb(${N}, ${T}, ${k})`,I=v*100,V=(1-P)*100,[D,E,B]=Li(b,v,P),W=`rgb(${D}, ${E}, ${B})`;return jsx("div",{ref:g,className:o(kv({size:l}),d&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:L},onPointerDown:S,onPointerMove:C,onPointerUp:M,onPointerLeave:M,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:m,height:m,left:`calc(${I}% - ${m/2}px)`,top:`calc(${V}% - ${m/2}px)`,backgroundColor:W,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Iv.displayName="ColorArea";var Hv=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"}}),rT=`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")`,Ev="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Av=Y.forwardRef(({value:e,defaultValue:t,onChange:r,channel:a="hue",baseColor:n="#ff0000",orientation:i,size:s,disabled:l,thumbSize:d=18,showBorder:m=true,className:u,...c},g)=>{let p=Y.useRef(null),[x,y]=Y.useState(false),f=()=>{switch(a){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[h,R]=Y.useState(t??f()),b=e??h,v=a==="hue"?b/360:b,P=Y.useCallback((L,I)=>{if(l||!p.current)return;let V=p.current.getBoundingClientRect(),D=i!=="vertical",E;D?E=Math.max(0,Math.min(1,(L-V.left)/V.width)):E=Math.max(0,Math.min(1,1-(I-V.top)/V.height));let B=a==="hue"?E*360:E;e===void 0&&R(B),r?.(B);},[l,i,a,e,r]),w=L=>{l||(L.preventDefault(),y(true),L.target.setPointerCapture(L.pointerId),P(L.clientX,L.clientY));},S=L=>{x&&P(L.clientX,L.clientY);},C=L=>{y(false),L.target.releasePointerCapture(L.pointerId);},M=()=>{let L=i!=="vertical",I=L?"to right":"to top";switch(a){case "hue":return L?Ev:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${I}, transparent, ${n})`;case "saturation":return `linear-gradient(${I}, #808080, ${n})`;case "brightness":return `linear-gradient(${I}, #000000, ${n})`;default:return Ev}},N=()=>a==="hue"?`hsl(${b}, 100%, 50%)`:n,T=i!=="vertical",k=v*100;return jsx("div",{ref:g,className:o(Hv({orientation:i,size:s}),l&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:o("absolute inset-0 rounded-full overflow-hidden",m&&"border border-input"),style:{backgroundImage:a==="alpha"?rT:void 0,backgroundSize:a==="alpha"?"8px 8px":void 0},onPointerDown:w,onPointerMove:S,onPointerUp:C,onPointerLeave:C,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:M()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:d,height:d,...T?{left:`calc(${k}% - ${d/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${k}% - ${d/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:N(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Av.displayName="ColorSlider";var zv=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"}}),nT=(e,t,r)=>{let a=e-r,n=t-r,i=Math.atan2(n,a)*180/Math.PI+90;return i<0&&(i+=360),i},Fv=Y.forwardRef(({value:e,defaultValue:t=0,onChange:r,size:a,disabled:n,innerRadius:i=.6,thumbSize:s=20,showCenter:l=true,className:d,...m},u)=>{let c=Y.useRef(null),[g,p]=Y.useState(false),[x,y]=Y.useState(t),f=e??x,h=Y.useCallback((w,S)=>{if(n||!c.current)return;let C=c.current.getBoundingClientRect(),M=C.width/2,N=w-C.left,T=S-C.top,k=nT(N,T,M);e===void 0&&y(k),r?.(k);},[n,e,r]),R=w=>{n||(w.preventDefault(),p(true),w.target.setPointerCapture(w.pointerId),h(w.clientX,w.clientY));},b=w=>{g&&h(w.clientX,w.clientY);},v=w=>{p(false),w.target.releasePointerCapture(w.pointerId);},P=()=>{let w=[];for(let S=0;S<=360;S+=30)w.push(`hsl(${S}, 100%, 50%) ${S}deg`);return `conic-gradient(from 270deg, ${w.join(", ")})`};return jsx("div",{ref:u,className:o(zv({size:a}),n&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:c,className:"absolute inset-0 rounded-full",style:{background:P()},onPointerDown:R,onPointerMove:b,onPointerUp:v,onPointerLeave:v,children:[i<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-i)*50}%`,left:`${(1-i)*50}%`,width:`${i*100}%`,height:`${i*100}%`}}),l&&i<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(iT,{hue:f,innerRadius:i,thumbSize:s})]})})});Fv.displayName="ColorWheel";var iT=({hue:e,innerRadius:t,thumbSize:r})=>{let a=(1-(1-t)/2)*50,n=(e-90)*Math.PI/180,i=50+a*Math.cos(n),s=50+a*Math.sin(n);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:r,height:r,left:`calc(${i}% - ${r/2}px)`,top:`calc(${s}% - ${r/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 Bv=cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},inline:{true:"inline-flex",false:"flex"}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"nowrap",gap:0,inline:false}}),tn=Y.forwardRef(({className:e,direction:t,align:r,justify:a,wrap:n,gap:i,inline:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(Bv({direction:t,align:r,justify:a,wrap:n,gap:i,inline:s,className:e})),...d}));tn.displayName="Flex";var Ov=Y.forwardRef(({gap:e=2,align:t="center",...r},a)=>jsx(tn,{ref:a,direction:"row",gap:e,align:t,...r}));Ov.displayName="HStack";var Gv=Y.forwardRef(({gap:e=2,align:t="stretch",...r},a)=>jsx(tn,{ref:a,direction:"column",gap:e,align:t,...r}));Gv.displayName="VStack";var Wv=Y.forwardRef((e,t)=>jsx(tn,{ref:t,align:"center",justify:"center",...e}));Wv.displayName="Center";var _v=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",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none",auto:"grid-cols-[repeat(auto-fill,minmax(200px,1fr))]"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},gapX:{0:"gap-x-0",1:"gap-x-1",2:"gap-x-2",3:"gap-x-3",4:"gap-x-4",5:"gap-x-5",6:"gap-x-6",8:"gap-x-8",10:"gap-x-10",12:"gap-x-12"},gapY:{0:"gap-y-0",1:"gap-y-1",2:"gap-y-2",3:"gap-y-3",4:"gap-y-4",5:"gap-y-5",6:"gap-y-6",8:"gap-y-8",10:"gap-y-10",12:"gap-y-12"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},placeItems:{start:"place-items-start",center:"place-items-center",end:"place-items-end",stretch:"place-items-stretch"}},defaultVariants:{columns:1,gap:4,flow:"row",align:"stretch",justify:"stretch"}}),Ii=Y.forwardRef(({className:e,columns:t,rows:r,gap:a,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,as:u="div",minChildWidth:c,style:g,...p},x)=>{let y=c?{...g,gridTemplateColumns:`repeat(auto-fill, minmax(${c}, 1fr))`}:g;return jsx(u,{ref:x,className:o(_v({columns:c?void 0:t,rows:r,gap:a,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,className:e})),style:y,...p})});Ii.displayName="Grid";var Kv=cva("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",13:"col-start-13",auto:"col-start-auto"},colEnd:{1:"col-end-1",2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13",auto:"col-end-auto"},rowStart:{1:"row-start-1",2:"row-start-2",3:"row-start-3",4:"row-start-4",5:"row-start-5",6:"row-start-6",7:"row-start-7",auto:"row-start-auto"},rowEnd:{1:"row-end-1",2:"row-end-2",3:"row-end-3",4:"row-end-4",5:"row-end-5",6:"row-end-6",7:"row-end-7",auto:"row-end-auto"}}}),Yv=Y.forwardRef(({className:e,colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:i,rowEnd:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(Kv({colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:i,rowEnd:s,className:e})),...d}));Yv.displayName="GridItem";var jv=Y.forwardRef(({columns:e=2,className:t,...r},a)=>{if(typeof e=="number")return jsx(Ii,{ref:a,columns:e,className:t,...r});let n=o(e.sm&&`sm:grid-cols-${e.sm}`,e.md&&`md:grid-cols-${e.md}`,e.lg&&`lg:grid-cols-${e.lg}`,e.xl&&`xl:grid-cols-${e.xl}`);return jsx(Ii,{ref:a,columns:1,className:o(n,t),...r})});jv.displayName="SimpleGrid";var Xv=cva("rounded-lg",{variants:{variant:{default:"bg-muted",subtle:"bg-muted/50",outline:"border border-border bg-transparent",filled:"bg-accent",sunken:"bg-muted shadow-inner"},size:{sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"lg"}}),qv=Y.forwardRef(({className:e,variant:t,size:r,radius:a,as:n="div",...i},s)=>jsx(n,{ref:s,className:o(Xv({variant:t,size:r,radius:a,className:e})),...i}));qv.displayName="Well";var Jv=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"}}),mT=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),uT=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}}),Qv=Y.forwardRef(({className:e,orientation:t,size:r,align:a,label:n,value:i,valueWeight:s,mono:l,labelWidth:d,labelClassName:m,valueClassName:u,showColon:c=false,copyable:g=false,onCopy:p,...x},y)=>{let f=async()=>{if(!(!g||i===null||i===void 0))try{let h=typeof i=="string"?i:String(i);await navigator.clipboard.writeText(h),p?.();}catch{}};return jsxs("div",{ref:y,className:o(Jv({orientation:t,size:r,align:a,className:e})),...x,children:[jsxs("span",{className:o(mT({size:r}),m),style:d?{width:d,flexShrink:0}:void 0,children:[n,c&&":"]}),jsx("span",{className:o(uT({size:r,weight:s,mono:l}),g&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",u),onClick:g?f:void 0,role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:g?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f());}:void 0,children:i})]})});Qv.displayName="LabeledValue";var eh=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"}}),th=Y.forwardRef(({className:e,orientation:t,gap:r,...a},n)=>jsx("div",{ref:n,className:o(eh({orientation:t,gap:r,className:e})),...a}));th.displayName="LabeledValueGroup";var nh=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),mo=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"}}),ih=Y.forwardRef(({value:e,defaultValue:t="",onChange:r,onSearch:a,onSelect:n,suggestions:i=[],recentSearches:s=[],onClearRecentSearches:l,trendingSearches:d=[],isLoading:m,showClear:u=true,showIcon:c=true,popoverWidth:g="trigger",emptyMessage:p="No results found",size:x,variant:y,className:f,placeholder:h="Search...",disabled:R,...b},v)=>{let[P,w]=Y.useState(false),[S,C]=Y.useState(t),M=e!==void 0?e:S,N=Y.useRef(null);Y.useImperativeHandle(v,()=>N.current);let T=M.length>0,k=P&&(i.length>0||s.length>0||d.length>0||T),L=H=>{e===void 0&&C(H),r?.(H);},I=()=>{L(""),N.current?.focus();},V=H=>{H?.preventDefault(),M.trim()&&(a?.(M.trim()),w(false));},D=H=>{L(H.label),n?.(H),w(false);},E=H=>{L(H),a?.(H),w(false);},B=H=>{L(H),a?.(H),w(false);},W=Y.useMemo(()=>{let H={};return i.forEach(U=>{let $=U.category||"Results";H[$]||(H[$]=[]),H[$].push(U);}),H},[i]);return jsxs(Ie,{open:k,onOpenChange:w,children:[jsx($e,{asChild:true,children:jsxs("form",{onSubmit:V,className:o(nh({size:x,variant:y}),f),children:[c&&jsx(Search,{className:o(mo({size:x}),"ml-3")}),jsx("input",{ref:N,type:"text",value:M,onChange:H=>L(H.target.value),onFocus:()=>w(true),placeholder:h,disabled:R,className:o("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!c&&"pl-3"),...b}),u&&T&&!R&&jsx("button",{type:"button",onClick:I,className:o("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",mo({size:x})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(Me,{className:"p-0",style:{width:g==="trigger"?"var(--radix-popover-trigger-width)":g},align:"start",onOpenAutoFocus:H=>H.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!T&&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"}),l&&jsx("button",{type:"button",onClick:l,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((H,U)=>jsxs("button",{type:"button",onClick:()=>E(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:o(mo({size:x}))}),jsx("span",{className:"flex-1 text-left truncate",children:H}),jsx(ArrowRight,{className:o(mo({size:x}),"opacity-0 group-hover:opacity-100")})]},U))]}),d.length>0&&!T&&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"})}),d.map((H,U)=>jsxs("button",{type:"button",onClick:()=>B(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:o(mo({size:x}))}),jsx("span",{className:"flex-1 text-left truncate",children:H})]},U))]}),T&&jsx("div",{className:"p-2",children:m?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"})}):i.length>0?Object.entries(W).map(([H,U])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:H})}),U.map($=>jsxs("button",{type:"button",onClick:()=>D($),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:o(mo({size:x}))}),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))]},H)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});ih.displayName="SearchBar";var sh={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=Y.forwardRef(({open:e,onOpenChange:t,items:r=[],recentItems:a=[],placeholder:n="Search...",isLoading:i,emptyMessage:s="No results found.",filter:l,shortcut:d="\u2318K",onSelect:m,footer:u},c)=>{let[g,p]=Y.useState(""),x=Y.useRef(null);Y.useEffect(()=>{e||p("");},[e]);let y=Y.useMemo(()=>{let b={};return r.forEach(v=>{let P=v.category||"Results";b[P]||(b[P]=[]),b[P].push(v);}),b},[r]),f=b=>{b.onSelect?.(),m?.(b),t?.(false);},h=g.length>0,R=!h&&a.length>0;return jsx(oe.Root,{open:e,onOpenChange:t,children:jsxs(oe.Portal,{children:[jsx(oe.Overlay,{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"}),jsx(oe.Content,{ref:c,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",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:l,shouldFilter:!l,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:x,value:g,onValueChange:p,placeholder:n,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"}),g&&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:i?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:[R&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),a.map(b=>jsxs(Command.Item,{value:b.label,onSelect:()=>f(b),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:b.icon||sh[b.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:b.label}),b.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:b.description})]}),b.shortcut&&jsx("div",{className:"flex items-center gap-1",children:b.shortcut.map((v,P)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:v},P))})]},b.id))]}),h&&Object.entries(y).map(([b,v])=>jsxs(Command.Group,{heading:b,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:b}),v.map(P=>jsxs(Command.Item,{value:`${P.label} ${P.keywords?.join(" ")||""}`,onSelect:()=>f(P),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:P.icon||sh[b]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:P.label}),P.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:P.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},P.id))]},b)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),u?jsx("div",{className:"border-t px-4 py-3",children:u}):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:d})," to open"]})]})]})})]})})});lh.displayName="SpotlightSearch";function CT(e="k"){let[t,r]=Y.useState(false);return Y.useEffect(()=>{let a=n=>{(n.metaKey||n.ctrlKey)&&n.key===e&&(n.preventDefault(),r(i=>!i));};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),{open:t,setOpen:r,toggle:()=>r(a=>!a)}}var IT=cva("",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ET={default:"bg-muted",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400"},HT=e=>{let t=typeof e=="string"?new Date(e):e,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4),i=Math.floor(a/36e5),s=Math.floor(a/864e5);return n<1?"Just now":n<60?`${n}m ago`:i<24?`${i}h ago`:s<7?`${s}d ago`:t.toLocaleDateString()},dh=Y.forwardRef(({notifications:e=[],onNotificationClick:t,onMarkAsRead:r,onMarkAllAsRead:a,onDismiss:n,onClearAll:i,showSettings:s,onSettingsClick:l,trigger:d,align:m="end",emptyMessage:u="No notifications",maxHeight:c=400,className:g},p)=>{let[x,y]=Y.useState(false),f=e.filter(b=>!b.read).length,h=e.length>0,R=b=>{b.read||r?.(b.id),t?.(b);};return jsxs(Ie,{open:x,onOpenChange:y,children:[jsx($e,{asChild:true,children:d||jsxs("button",{ref:p,className:o("relative inline-flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",g),children:[jsx(Bell,{className:"h-5 w-5"}),f>0&&jsx("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground",children:f>99?"99+":f})]})}),jsxs(Me,{className:"w-80 p-0 sm:w-96",align:m,sideOffset:8,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),f>0&&jsxs(ji,{size:"sm",children:[f," new"]})]}),jsxs("div",{className:"flex items-center gap-1",children:[h&&a&&f>0&&jsx("button",{type:"button",onClick:a,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Mark all as read",children:jsx(CheckCheck,{className:"h-4 w-4"})}),h&&i&&jsx("button",{type:"button",onClick:i,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Clear all",children:jsx(Trash2,{className:"h-4 w-4"})}),s&&l&&jsx("button",{type:"button",onClick:l,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Settings",children:jsx(Settings,{className:"h-4 w-4"})})]})]}),h?jsx(ze,{style:{maxHeight:c},children:jsx("div",{className:"divide-y",children:e.map(b=>jsxs("div",{className:o("group relative flex gap-3 px-4 py-3 transition-colors hover:bg-muted/50",!b.read&&"bg-muted/30"),children:[jsx("div",{className:o("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",b.avatar?"overflow-hidden":ET[b.type||"default"]),children:b.avatar?jsx("img",{src:b.avatar,alt:"",className:"h-full w-full object-cover"}):b.icon?b.icon:jsx(Bell,{className:"h-4 w-4"})}),jsxs("button",{type:"button",onClick:()=>R(b),className:"flex-1 text-left",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:o("text-sm",!b.read&&"font-medium"),children:b.title}),!b.read&&jsx("span",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"})]}),b.description&&jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:b.description}),jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:HT(b.timestamp)})]}),jsxs("div",{className:"absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[!b.read&&r&&jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),r(b.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Mark as read",children:jsx(Check,{className:"h-3.5 w-3.5"})}),(n||b.onDismiss)&&jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),b.onDismiss?.(),n?.(b.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Dismiss",children:jsx(X$1,{className:"h-3.5 w-3.5"})})]})]},b.id))})}):jsxs("div",{className:"flex flex-col items-center justify-center py-10 text-center",children:[jsx(Bell,{className:"h-10 w-10 text-muted-foreground/50"}),jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:u})]})]})]})});dh.displayName="NotificationCenter";var ch=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"}}),WT={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},mh=Y.forwardRef(({message:e,type:t="default",variant:r="solid",showIcon:a=false,icon:n,dismissible:i=true,onDismiss:s,endContent:l,position:d,animate:m,autoDismiss:u,storageKey:c,className:g,...p},x)=>{let[y,f]=Y.useState(true),[h,R]=Y.useState(false);Y.useEffect(()=>{c&&localStorage.getItem(`banner-${c}`)==="true"&&f(false);},[c]),Y.useEffect(()=>{if(u&&y){let w=setTimeout(()=>{b();},u);return ()=>clearTimeout(w)}},[u,y]);let b=()=>{R(true),setTimeout(()=>{f(false),c&&localStorage.setItem(`banner-${c}`,"true"),s?.();},200);};if(!y)return null;let v=WT[t],P=a?n!==void 0?n:v?jsx(v,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:x,className:o(ch({variant:r,type:t,position:d}),m&&"animate-pulse",h&&"animate-out fade-out slide-out-to-top duration-200",g),role:"banner",...p,children:[P&&jsx("span",{className:"shrink-0",children:P}),jsx("span",{className:"text-center font-medium",children:e}),l&&jsx("div",{className:"shrink-0 ml-2",children:l}),i&&jsx("button",{type:"button",onClick:b,className:o("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",d==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});mh.displayName="Banner";var rn=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:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-muted",ghost:"bg-background hover:bg-muted shadow-md"},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:"default",size:"md",position:"bottom-right"}}),KT=cva("transition-transform duration-200",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-7 w-7"}},defaultVariants:{size:"md"}}),Bl=Y.forwardRef(({icon:e,label:t="Action button",extended:r,extendedLabel:a,actions:n,direction:i="up",showTooltip:s=true,closeIcon:l,animation:d="rotate",variant:m,size:u,position:c,className:g,onClick:p,disabled:x,...y},f)=>{let[h,R]=Y.useState(false),b=n&&n.length>0,v=M=>{b&&R(!h),p?.(M);},P=M=>{M.onClick?.(),R(false);},w={up:{container:"flex-col-reverse bottom-full mb-3",item:"mb-3"},down:{container:"flex-col top-full mt-3",item:"mt-3"},left:{container:"flex-row-reverse right-full mr-3",item:"mr-3"},right:{container:"flex-row left-full ml-3",item:"ml-3"}},S=d==="rotate"&&h?"rotate-45":"",C=d==="scale"&&h?"scale-0":"scale-100";return jsxs("div",{className:o("z-50",c!=="relative"&&c&&rn({position:c})),children:[b&&h&&jsx("div",{className:o("absolute flex items-center gap-2",w[i].container),children:n.map((M,N)=>jsxs("div",{className:o("flex items-center gap-2 animate-in fade-in zoom-in duration-200",i==="up"||i==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*50}ms`},children:[s&&(i==="up"||i==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label}),M.href?jsx("a",{href:M.href,className:o(rn({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}):jsx("button",{type:"button",onClick:()=>P(M),className:o(rn({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}),s&&(i==="left"||i==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label})]},M.id))}),jsxs("button",{ref:f,type:"button",onClick:v,disabled:x,className:o(rn({variant:m,size:u,position:"relative"}),r&&"px-6 gap-2",g),"aria-label":t,"aria-expanded":b?h:void 0,...y,children:[h&&l?l:jsx("span",{className:o(KT({size:u}),S,C,"transition-all duration-200"),children:e||jsx(Plus,{})}),r&&a&&jsx("span",{className:"font-medium",children:a})]}),b&&h&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>R(false)})]})});Bl.displayName="FloatingActionButton";var YT=Bl;var bh=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"}}),ph=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),vh=Y.forwardRef(({className:e,variant:t,size:r,items:a,value:n,defaultValue:i,onValueChange:s,hideLabels:l=false,showActiveLabel:d=false,renderItem:m,...u},c)=>{let[g,p]=Y.useState(i||a[0]?.key),x=n!==void 0,y=x?n:g,f=v=>{v.disabled||(x||p(v.key),s?.(v.key));},h=v=>t==="filled"?v?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":v?"text-primary":"text-muted-foreground hover:text-foreground",R=()=>{switch(r){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},b=()=>{switch(r){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:c,className:o(bh({variant:t,size:r}),e),role:"navigation","aria-label":"Bottom navigation",...u,children:a.map(v=>{let P=y===v.key,w=!l&&(d?P:true),S=P&&v.activeIcon?v.activeIcon:v.icon;if(m)return jsx("div",{onClick:()=>f(v),className:o(ph({variant:t}),v.disabled&&"opacity-50 cursor-not-allowed"),children:m(v,P)},v.key);let C=jsxs("div",{onClick:()=>!v.href&&f(v),className:o(ph({variant:t}),h(P),v.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":P?"page":void 0,"aria-disabled":v.disabled,tabIndex:v.disabled?-1:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),f(v));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:o(R(),"[&>svg]:h-full [&>svg]:w-full"),children:S}),v.badge!==void 0&&v.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:v.badge>99?"99+":v.badge}),v.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),w&&v.label&&jsx("span",{className:o(b(),"font-medium truncate max-w-full px-1"),children:v.label})]},v.key);return v.href&&!v.disabled?jsx("a",{href:v.href,onClick:()=>f(v),className:o("flex flex-1 flex-col items-center justify-center gap-1 no-underline",h(P)),children:C},v.key):C})})});vh.displayName="BottomNavigation";var UT="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",xh=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-destructive hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),yh=Y.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,items:i,cancelLabel:s="Cancel",onCancel:l,showCancel:d=true,children:m,closeOnSelect:u=true,onAction:c},g)=>{let p=x=>{x.isDisabled||(x.onSelect?.(),c?.(x.key),u&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[r&&jsx(Drawer.Trigger,{asChild:true,children:r}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:g,className:UT,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(a||n)&&jsxs("div",{className:"px-4 py-3 text-center",children:[a&&jsx(Drawer.Title,{className:"text-base font-semibold",children:a}),n&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:n})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:m||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:i?.map(x=>jsxs("button",{type:"button",disabled:x.isDisabled,onClick:()=>p(x),className:o(xh({variant:x.isDestructive?"destructive":"default"})),children:[x.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:x.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:x.label}),x.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:x.description})]})]},x.key))})}),d&&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:l,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 wh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Gl=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"}}),Nh=Y.forwardRef(({className:e,variant:t,leftActions:r=[],rightActions:a=[],actionSize:n="md",threshold:i=.3,onSwipeEnd:s,disabled:l=false,fullSwipeAction:d,children:m,...u},c)=>{let g=Y.useRef(null),[p,x]=Y.useState(0),[y,f]=Y.useState(false),h=Y.useRef(0),R=Y.useRef(0),b=r.length*(n==="sm"?64:n==="lg"?96:80),v=a.length*(n==="sm"?64:n==="lg"?96:80),P=N=>{l||(f(true),h.current=N.touches[0].clientX,R.current=p);},w=N=>{if(!y||l)return;let k=N.touches[0].clientX-h.current,L=R.current+k;(L>0&&r.length===0||L<0&&a.length===0)&&(L=0),L>b?L=b+(L-b)*.3:L<-v&&(L=-v+(L+v)*.3),x(L);},S=()=>{if(!y)return;f(false);let N=g.current?.offsetWidth||0,T=Math.abs(p)/N;if(d&&T>.6){d==="right"&&p>0&&r[0]?(r[0].onAction?.(),s?.("right",r[0].key)):d==="left"&&p<0&&a[0]&&(a[0].onAction?.(),s?.("left",a[0].key)),x(0);return}p>b*i&&r.length>0?(x(b),s?.("right")):p<-v*i&&a.length>0?(x(-v),s?.("left")):x(0);},C=(N,T)=>{N.onAction?.(),s?.(T,N.key),x(0);},M=()=>{x(0);};return jsxs("div",{ref:c,className:o(wh({variant:t,className:e})),...u,children:[r.length>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:b},children:r.map(N=>jsxs("button",{type:"button",onClick:()=>C(N,"right"),className:o(Gl({variant:N.variant,size:n})),style:{opacity:Math.min(1,p/b)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),a.length>0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:v},children:a.map(N=>jsxs("button",{type:"button",onClick:()=>C(N,"left"),className:o(Gl({variant:N.variant,size:n})),style:{opacity:Math.min(1,Math.abs(p)/v)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),jsx("div",{ref:g,className:o("relative bg-background",y?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:P,onTouchMove:w,onTouchEnd:S,onClick:p!==0?M:void 0,children:m})]})});Nh.displayName="SwipeActions";var Ch=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),ZT=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"}}),Mh=Y.forwardRef(({className:e,variant:t,onRefresh:r,pullThreshold:a=80,maxPullDistance:n=120,loadingIndicator:i,pullIndicator:s,indicatorSize:l="md",disabled:d=false,pullText:m="Pull to refresh",releaseText:u="Release to refresh",refreshingText:c="Refreshing...",children:g,...p},x)=>{let y=Y.useRef(null),[f,h]=Y.useState(0),[R,b]=Y.useState("idle"),v=Y.useRef(0),P=Y.useRef(false),w=()=>d||R==="refreshing"?false:(y.current?.scrollTop??window.scrollY)<=0,S=k=>{w()&&(v.current=k.touches[0].clientY,P.current=true);},C=k=>{if(!P.current||!w())return;let I=k.touches[0].clientY-v.current;if(I<0){h(0),b("idle");return}let D=Math.min(I*.5,n);h(D),b(D>=a?"ready":"pulling");},M=async()=>{if(P.current)if(P.current=false,R==="ready"){b("refreshing"),h(a*.6);try{await r();}finally{b("idle"),h(0);}}else b("idle"),h(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[l],T=()=>{if(R==="refreshing")return i||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:o(N,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:c})]});let k=Math.min(f/a*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:o(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${k}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:R==="ready"?u:m})]})};return jsxs("div",{ref:x,className:o(Ch({variant:t,className:e})),...p,children:[jsx("div",{className:o(ZT({size:l}),"z-10",R==="idle"&&f===0&&"opacity-0"),style:{top:Math.max(f-60,-60),opacity:Math.min(f/(a*.5),1)},children:T()}),jsx("div",{ref:y,className:o("transition-transform duration-200",R==="refreshing"&&"ease-out"),style:{transform:`translateY(${f}px)`,transition:P.current?"none":void 0},onTouchStart:S,onTouchMove:C,onTouchEnd:M,children:g})]})});Mh.displayName="PullToRefresh";var Sh=cva("flex min-h-screen w-full",{variants:{layout:{default:"flex-col",sidebar:"flex-row"}},defaultVariants:{layout:"default"}}),kh=Y.forwardRef(({className:e,layout:t="default",header:r,footer:a,sidebar:n,aside:i,sidebarCollapsed:s=false,sidebarWidth:l="16rem",sidebarCollapsedWidth:d="4rem",asideWidth:m="16rem",fixed:u=false,children:c,...g},p)=>{let x=s?d:l;return jsxs("div",{ref:p,className:o(Sh({layout:t}),e),style:{"--app-shell-sidebar-width":x,"--app-shell-aside-width":m},...g,children:[r&&jsx($l,{fixed:u,hasSidebar:!!n,children:r}),jsxs("div",{className:"flex flex-1",children:[n&&jsx(_l,{collapsed:s,fixed:u,children:n}),jsx("main",{className:o("flex-1 flex flex-col min-h-0",u&&r&&"pt-14",u&&a&&"pb-14"),children:c}),i&&jsx(Kl,{fixed:u,children:i})]}),a&&jsx(Yl,{fixed:u,hasSidebar:!!n,children:a})]})});kh.displayName="AppShell";var $l=Y.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},i)=>jsx("header",{ref:i,className:o("flex h-14 items-center border-b bg-background px-4",t&&"fixed top-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));$l.displayName="AppShellHeader";var _l=Y.forwardRef(({className:e,collapsed:t,fixed:r,children:a,...n},i)=>jsx("aside",{ref:i,className:o("w-[var(--app-shell-sidebar-width)] shrink-0 border-r bg-background transition-[width] duration-200",r&&"fixed left-0 top-0 bottom-0 z-50",e),"data-collapsed":t,...n,children:a}));_l.displayName="AppShellSidebar";var Kl=Y.forwardRef(({className:e,fixed:t,children:r,...a},n)=>jsx("aside",{ref:n,className:o("w-[var(--app-shell-aside-width)] shrink-0 border-l bg-background",t&&"fixed right-0 top-14 bottom-0 z-40",e),...a,children:r}));Kl.displayName="AppShellAside";var Yl=Y.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},i)=>jsx("footer",{ref:i,className:o("flex h-14 items-center border-t bg-background px-4",t&&"fixed bottom-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));Yl.displayName="AppShellFooter";var Dh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex-1 overflow-auto p-4",e),...t}));Dh.displayName="AppShellMain";var Vh=cva("flex min-h-screen w-full bg-muted/40",{variants:{variant:{default:"",bordered:"[&_[data-slot=sidebar]]:border-r [&_[data-slot=header]]:border-b",filled:"[&_[data-slot=sidebar]]:bg-background [&_[data-slot=header]]:bg-background"}},defaultVariants:{variant:"bordered"}}),Ih=Y.forwardRef(({className:e,variant:t,navigation:r,logo:a,userMenu:n,headerActions:i,breadcrumb:s,defaultCollapsed:l=false,collapsed:d,onCollapsedChange:m,children:u,...c},g)=>{let[p,x]=Y.useState(l),[y,f]=Y.useState(false),h=d??p,R=Y.useCallback(b=>{x(b),m?.(b);},[m]);return jsxs("div",{ref:g,className:o(Vh({variant:t}),e),...c,children:[jsxs("aside",{"data-slot":"sidebar","data-collapsed":h,className:o("hidden lg:flex flex-col fixed inset-y-0 left-0 z-50 bg-background transition-[width] duration-200",h?"w-16":"w-64"),children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsx("div",{className:"border-t p-4",children:n})]}),jsx(To,{open:y,onOpenChange:f,children:jsxs(Aa,{side:"left",className:"w-64 p-0",children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsx("div",{className:"border-t p-4",children:n})]})}),jsxs("div",{className:o("flex flex-1 flex-col transition-[margin-left] duration-200",h?"lg:ml-16":"lg:ml-64"),children:[jsxs("header",{"data-slot":"header",className:"sticky top-0 z-40 flex h-14 items-center gap-4 bg-background px-4 lg:px-6",children:[jsxs(_,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>f(true),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle menu"})]}),jsxs(_,{variant:"ghost",size:"icon",className:"hidden lg:flex",onClick:()=>R(!h),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle sidebar"})]}),s&&jsx("div",{className:"flex-1",children:s}),i&&jsx("div",{className:"flex items-center gap-2",children:i})]}),jsx("main",{className:"flex-1 p-4 lg:p-6",children:u})]})]})});Ih.displayName="DashboardLayout";var Eh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("space-y-6",e),...t}));Eh.displayName="DashboardPage";var Hh=Y.forwardRef(({className:e,title:t,description:r,actions:a,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",e),...i,children:[jsxs("div",{className:"space-y-1",children:[t&&jsx("h1",{className:"text-2xl font-bold tracking-tight",children:t}),r&&jsx("p",{className:"text-muted-foreground",children:r}),n]}),a&&jsx("div",{className:"flex items-center gap-2",children:a})]}));Hh.displayName="DashboardPageHeader";var Ah=Y.forwardRef(({className:e,columns:t=4,...r},a)=>jsx("div",{ref:a,className:o("grid gap-4",{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t],e),...r}));Ah.displayName="DashboardGrid";var Oi=cva("min-h-screen w-full",{variants:{variant:{centered:"flex items-center justify-center bg-muted/40",split:"flex flex-col lg:flex-row",cover:"relative flex items-center justify-center"}},defaultVariants:{variant:"centered"}}),zh=Y.forwardRef(({className:e,variant:t="centered",logo:r,sideContent:a,backgroundImage:n,sidePosition:i="left",footer:s,children:l,...d},m)=>t==="split"?jsxs("div",{ref:m,className:o(Oi({variant:t}),e),...d,children:[jsx("div",{className:o("hidden lg:flex lg:w-1/2 flex-col bg-primary text-primary-foreground",i==="right"&&"order-2"),children:a||jsxs("div",{className:"flex flex-1 flex-col items-center justify-center p-8",children:[r&&jsx("div",{className:"mb-8",children:r}),jsxs("div",{className:"max-w-md text-center",children:[jsx("h2",{className:"text-3xl font-bold",children:"Welcome back"}),jsx("p",{className:"mt-4 text-primary-foreground/80",children:"Sign in to your account to continue"})]})]})}),jsxs("div",{className:o("flex flex-1 flex-col lg:w-1/2",i==="right"&&"order-1"),children:[r&&jsx("div",{className:"flex items-center justify-center p-6 lg:hidden",children:r}),jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:jsx("div",{className:"w-full max-w-md space-y-6",children:l})}),s&&jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:s})]})]}):t==="cover"?jsxs("div",{ref:m,className:o(Oi({variant:t}),e),style:n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,...d,children:[n&&jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm"}),jsxs("div",{className:"relative z-10 w-full max-w-md p-6",children:[r&&jsx("div",{className:"mb-8 flex justify-center",children:r}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-lg",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})]}):jsx("div",{ref:m,className:o(Oi({variant:t}),e),...d,children:jsxs("div",{className:"w-full max-w-md p-6",children:[r&&jsx("div",{className:"mb-8 flex justify-center",children:r}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})}));zh.displayName="AuthLayout";var Fh=Y.forwardRef(({className:e,...t},r)=>jsx("form",{ref:r,className:o("space-y-4",e),...t}));Fh.displayName="AuthForm";var Bh=Y.forwardRef(({className:e,title:t,description:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("space-y-2 text-center",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsx("p",{className:"text-muted-foreground",children:r}),a]}));Bh.displayName="AuthHeader";var Oh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex flex-col gap-2 text-center text-sm",e),...t}));Oh.displayName="AuthFooterLinks";var Gh=Y.forwardRef(({className:e,text:t="or continue with",...r},a)=>jsxs("div",{ref:a,className:o("relative my-4",e),...r,children:[jsx("div",{className:"absolute inset-0 flex items-center",children:jsx("span",{className:"w-full border-t"})}),jsx("div",{className:"relative flex justify-center text-xs uppercase",children:jsx("span",{className:"bg-card px-2 text-muted-foreground",children:t})})]}));Gh.displayName="AuthDivider";var Wh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("grid grid-cols-2 gap-2",e),...t}));Wh.displayName="AuthSocialButtons";var Gi=cva("w-full",{variants:{variant:{sidebar:"flex flex-col lg:flex-row gap-8",tabs:"space-y-6",stacked:"space-y-8"}},defaultVariants:{variant:"sidebar"}}),$h=Y.forwardRef(({className:e,variant:t="sidebar",navigation:r,title:a,description:n,children:i,...s},l)=>t==="sidebar"?jsxs("div",{ref:l,className:o(Gi({variant:t}),e),...s,children:[r&&jsx("aside",{className:"lg:w-64 shrink-0",children:jsx("nav",{className:"flex flex-col gap-1",children:r})}),jsxs("div",{className:"flex-1 space-y-6",children:[(a||n)&&jsx(on,{title:a,description:n}),i]})]}):t==="tabs"?jsxs("div",{ref:l,className:o(Gi({variant:t}),e),...s,children:[(a||n)&&jsx(on,{title:a,description:n}),r,jsx("div",{className:"pt-4",children:i})]}):jsxs("div",{ref:l,className:o(Gi({variant:t}),e),...s,children:[(a||n)&&jsx(on,{title:a,description:n}),i]}));$h.displayName="SettingsLayout";var on=Y.forwardRef(({className:e,title:t,description:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("space-y-1",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsx("p",{className:"text-muted-foreground",children:r}),a]}));on.displayName="SettingsHeader";var _h=Y.forwardRef(({className:e,title:t,description:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("space-y-4",e),...n,children:[(t||r)&&jsxs("div",{className:"space-y-1",children:[t&&jsx("h2",{className:"text-lg font-medium",children:t}),r&&jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),a]}));_h.displayName="SettingsSection";var Kh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("rounded-lg border bg-card p-6",e),...t}));Kh.displayName="SettingsCard";var Yh=Y.forwardRef(({className:e,label:t,description:r,htmlFor:a,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 py-4 sm:flex-row sm:items-center sm:justify-between","border-b last:border-0 first:pt-0 last:pb-0",e),...i,children:[jsxs("div",{className:"space-y-0.5",children:[t&&jsx("label",{htmlFor:a,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t}),r&&jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),jsx("div",{className:"shrink-0",children:n})]}));Yh.displayName="SettingsRow";var jh=Y.forwardRef(({className:e,active:t,icon:r,children:a,...n},i)=>jsxs("button",{ref:i,type:"button",className:o("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-muted",t&&"bg-muted",e),...n,children:[r&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:r}),a]}));jh.displayName="SettingsNavItem";var Uh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("h-px bg-border my-4",e),...t}));Uh.displayName="SettingsSeparator";var Ia=(e,t,r)=>({duration:e,delay:t,ease:r||[.4,0,.2,1]}),rS={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Xh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,initialOpacity:l=0,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:rS,custom:l,transition:Ia(r,a,n),className:o(i),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsx(AnimatePresence,{children:e&&c}):c});Xh.displayName="Fade";var aS=(e,t)=>{let r=typeof t=="number"?`${t}px`:t,a={up:{y:r},down:{y:`-${r}`},left:{x:r},right:{x:`-${r}`}};return {hidden:{opacity:0,...a[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...a[e]}}},qh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,direction:l="up",offset:d=20,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=Y.useMemo(()=>aS(l,d),[l,d]),p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:Ia(r,a,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});qh.displayName="Slide";var oS={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"},nS={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Zh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,initialScale:l=.9,origin:d="center",onAnimationStart:m,onAnimationComplete:u},c)=>{let g=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:nS,custom:l,transition:Ia(r,a,n),className:o(i),style:{transformOrigin:oS[d]},onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&g}):g});Zh.displayName="Scale";var Jh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,horizontal:s=false,startingSize:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=s?"width":"height",p={hidden:{[g]:l,opacity:d?0:1},visible:{[g]:"auto",opacity:1},exit:{[g]:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Ia(r,a,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});Jh.displayName="Collapse";var Qh=Y.forwardRef(({show:e=true,children:t,duration:r=.4,delay:a=0,ease:n,className:i,initialWidth:s=0,initialHeight:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{width:s,height:l,opacity:d?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:g,transition:Ia(r,a,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});Qh.displayName="Expand";var ex=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,initialRotation:l=-180,finalRotation:d=0,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{opacity:0,rotate:l},visible:{opacity:1,rotate:d},exit:{opacity:0,rotate:l}},p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:Ia(r,a,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});ex.displayName="Rotate";var tx=Y.forwardRef(({front:e,back:t,direction:r="horizontal",flipped:a=false,duration:n=.6,delay:i=0,ease:s,className:l,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=r==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:u,className:o("relative",l),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[c]:a?180:0},transition:Ia(n,i,s),style:{transformStyle:"preserve-3d"},onAnimationStart:d,onAnimationComplete:m,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${c}(180deg)`},children:t})]})})});tx.displayName="Flip";var rx=Y.forwardRef(({color:e="currentColor",duration:t=.6,children:r,className:a,disabled:n=false},i)=>{let[s,l]=Y.useState([]),d=Y.useRef(null),m=c=>{if(n)return;let g=d.current;if(!g)return;let p=g.getBoundingClientRect(),x=c.clientX-p.left,y=c.clientY-p.top,f=Math.max(p.width,p.height)*2,h={id:Date.now(),x,y,size:f};l(R=>[...R,h]);},u=c=>{l(g=>g.filter(p=>p.id!==c));};return jsxs("div",{ref:i,className:o("relative overflow-hidden",a),onClick:m,children:[jsx("div",{ref:d,className:"relative z-0",children:r}),jsx(AnimatePresence,{children:s.map(c=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>u(c.id),className:"pointer-events-none absolute rounded-full",style:{left:c.x-c.size/2,top:c.y-c.size/2,width:c.size,height:c.size,backgroundColor:e}},c.id))})]})});rx.displayName="Ripple";var ax=Y.forwardRef(({children:e,animate:t=true,height:r=10,duration:a=.5,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=Y.useState(false),u=s?d:t,c={idle:{y:0},bounce:{y:[0,-r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"bounce":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});ax.displayName="Bounce";var lS={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]},ox=Y.forwardRef(({children:e,animate:t=true,intensity:r="normal",duration:a=.5,count:n=1,className:i,triggerOnHover:s=false},l)=>{let[d,m]=Y.useState(false),u=s?d:t,c={idle:{x:0},shake:{x:lS[r],transition:{duration:a,ease:"easeInOut",repeat:n-1}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"shake":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});ox.displayName="Shake";var dS={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},nx=Y.forwardRef(({children:e,animate:t=true,speed:r="normal",className:a},n)=>jsx("div",{ref:n,className:o(t&&dS[r],a),children:e}));nx.displayName="Pulse";var ix=Y.forwardRef(({children:e,animate:t=true,angle:r=10,duration:a=.3,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=Y.useState(false),u=s?d:t,c={idle:{rotate:0},wiggle:{rotate:[0,-r,r,-r,r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"wiggle":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});ix.displayName="Wiggle";var sx=Y.forwardRef(({children:e,animate:t=false,scale:r=1.2,duration:a=.2,className:n,triggerOnHover:i=false,triggerOnClick:s=false},l)=>{let[d,m]=Y.useState(false),u=t||d,c={type:"spring",stiffness:400,damping:17,duration:a},g=()=>{s&&(m(true),setTimeout(()=>m(false),a*1e3));};return jsx(motion.div,{ref:l,animate:{scale:u?r:1},transition:c,className:o(n),onMouseEnter:()=>i&&m(true),onMouseLeave:()=>i&&m(false),onClick:g,children:e})});sx.displayName="Pop";var fS=(e,t,r,a)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${l}${a}${s}`:l},lx=Y.forwardRef(({value:e,from:t=0,duration:r=2,decimals:a=0,prefix:n="",suffix:i="",separator:s=",",decimalSeparator:l=".",animateOnView:d=true,delay:m=0,className:u,onComplete:c},g)=>{let p=Y.useRef(null),x=useInView(p,{once:true}),[y,f]=Y.useState(!d);Y.useEffect(()=>{if(d&&x){let v=setTimeout(()=>f(true),m*1e3);return ()=>clearTimeout(v)}},[d,x,m]);let h={damping:30,stiffness:100,duration:r*1e3},R=useSpring(y?e:t,h),b=useTransform(R,v=>fS(v,a,s,l));return Y.useEffect(()=>{y&&R.set(e);},[y,e,R]),Y.useEffect(()=>{let v=R.on("change",P=>{Math.abs(P-e)<.01&&c&&c();});return ()=>v()},[R,e,c]),jsx("span",{ref:p,className:o(u),children:jsxs("span",{ref:g,children:[n,jsx(motion.span,{children:b}),i]})})});lx.displayName="Counter";var dx=Y.forwardRef(({text:e,speed:t=50,delay:r=0,pauseBetween:a=1500,cursor:n=true,cursorChar:i="|",loop:s=false,deleteSpeed:l=30,animateOnView:d=true,className:m,cursorClassName:u,onComplete:c},g)=>{let p=Array.isArray(e)?e:[e],[x,y]=Y.useState(""),[f,h]=Y.useState(0),[R,b]=Y.useState(false),[v,P]=Y.useState(false),w=Y.useRef(null),S=useInView(w,{once:true}),[C,M]=Y.useState(!d);return Y.useEffect(()=>{if(d&&S){let N=setTimeout(()=>M(true),r*1e3);return ()=>clearTimeout(N)}},[d,S,r]),Y.useEffect(()=>{if(!C||v)return;let N=p[f],T;return R?x.length>0?T=setTimeout(()=>{y(x.slice(0,-1));},l):(b(false),h(k=>(k+1)%p.length)):x.length<N.length?T=setTimeout(()=>{y(N.slice(0,x.length+1));},t):f<p.length-1||s?T=setTimeout(()=>{b(true);},a):(P(true),c?.()),()=>clearTimeout(T)},[C,x,f,R,v,p,t,l,a,s,c]),jsxs("span",{ref:w,className:o(m),children:[jsx("span",{ref:g,children:x}),n&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:o("ml-0.5",u),children:i})]})});dx.displayName="Typewriter";var cx=Y.forwardRef(({children:e,direction:t="up",stagger:r=.05,duration:a=.5,delay:n=0,splitBy:i="word",animateOnView:s=true,className:l},d)=>{let m=Y.useRef(null),u=useInView(m,{once:true,amount:.5}),c=s?u:true,g=typeof e=="string"?e:"",p=i==="word"?g.split(" "):g.split(""),x={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},y={hidden:{},visible:{transition:{staggerChildren:r,delayChildren:n}}},f={hidden:{opacity:0,...x[t]},visible:{opacity:1,x:0,y:0,transition:{duration:a,ease:"easeInOut"}}};return jsx(motion.div,{ref:d,className:o("inline-flex flex-wrap",l),variants:y,initial:"hidden",animate:c?"visible":"hidden",children:jsx("span",{ref:m,children:p.map((h,R)=>jsxs(motion.span,{variants:f,className:"inline-block",children:[h,i==="word"&&R<p.length-1&&"\xA0"]},R))})})});cx.displayName="TextReveal";var mx=Y.forwardRef(({words:e,duration:t=2,animation:r="slide",animationDuration:a=.5,className:n,loop:i=true},s)=>{let[l,d]=Y.useState(0);Y.useEffect(()=>{if(!i&&l===e.length-1)return;let u=setInterval(()=>{d(c=>(c+1)%e.length);},t*1e3);return ()=>clearInterval(u)},[e.length,t,i,l]);let m=()=>{switch(r){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:o("relative inline-block",n),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:m(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:a},className:"inline-block",children:e[l]},e[l])})})});mx.displayName="WordRotate";var gx=Y.forwardRef(({children:e,direction:t="up",distance:r=50,duration:a=.6,delay:n=0,once:i=true,threshold:s=.1,className:l,scale:d,rotate:m,blur:u,ease:c=[.4,0,.2,1]},g)=>{let p=Y.useRef(null),x=useInView(p,{once:i,amount:s}),f={up:{x:0,y:r},down:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0},none:{x:0,y:0}}[t],h={hidden:{opacity:0,x:f.x,y:f.y,scale:d??1,rotate:m??0,filter:u?`blur(${u}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:a,delay:n,ease:c}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:g,variants:h,initial:"hidden",animate:x?"visible":"hidden",className:o(l),children:e})})});gx.displayName="ScrollReveal";var bx=Y.forwardRef(({position:e="top",size:t=4,color:r="hsl(var(--primary))",backgroundColor:a="transparent",zIndex:n=50,className:i,container:s,showPercentage:l=false,useSpring:d=true},m)=>{let{scrollYProgress:u}=useScroll({container:s}),c=useSpring(u,{stiffness:100,damping:30,restDelta:.001}),g=d?c:u,p=e==="top"||e==="bottom",x={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}},y=p?"scaleX":"scaleY",f=p?"left":"top";return jsxs("div",{ref:m,className:o("fixed",i),style:{...x[e],zIndex:n,backgroundColor:a},children:[jsx(motion.div,{className:"h-full w-full",style:{[y]:g,transformOrigin:f,backgroundColor:r}}),l&&jsx(bS,{progress:g,position:e})]})});bx.displayName="ScrollProgress";var bS=({progress:e,position:t})=>{let r=useTransform(e,s=>Math.round(s*100)),[a,n]=Y.useState(0);return Y.useEffect(()=>{let s=r.on("change",n);return ()=>s()},[r]),jsxs("span",{className:o("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:[a,"%"]})},vx=Y.forwardRef(({children:e,speed:t=.5,direction:r="vertical",className:a,container:n},i)=>{let s=Y.useRef(null),{scrollYProgress:l}=useScroll({target:s,container:n,offset:["start end","end start"]}),d=[-100*t,100*t],m=useTransform(l,[0,1],d),u=useSpring(m,{stiffness:100,damping:30}),c=r==="horizontal"?u:0,g=r==="vertical"?u:0;return jsx("div",{ref:s,className:o("overflow-hidden",a),children:jsx(motion.div,{ref:i,style:{x:c,y:g},children:e})})});vx.displayName="Parallax";var yx=Y.forwardRef(({children:e,width:t,height:r,duration:a=1.5,direction:n="right",baseColor:i="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:l,className:d,active:m=true},u)=>{let c={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},g={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:u,className:o("relative overflow-hidden",d),style:{width:t,height:r,borderRadius:l,backgroundColor:i},children:[e,m&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${c[n]}, transparent, ${s}, transparent)`,animation:`${g[n]} ${a}s infinite`}}),jsx("style",{children:`
|
|
36
|
+
`}),jsx("circle",{className:o("stroke-muted",i),cx:u.size/2,cy:u.size/2,r:c,strokeWidth:u.strokeWidth,fill:"none"}),jsx("circle",{cx:u.size/2,cy:u.size/2,r:c,strokeWidth:u.strokeWidth,fill:"none",strokeLinecap:"round",stroke:gu[r]||gu.default,strokeDasharray:d?`${x} ${g-x}`:`${g} ${g}`,strokeDashoffset:d?0:p,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:d?void 0:"stroke-dashoffset 0.3s ease-in-out"}})]}),n&&!d&&jsxs("span",{className:o("absolute font-medium text-foreground",u.fontSize),children:[Math.round(m),"%"]})]})});hu.displayName="CircularProgress";var xu=Y.createContext(null),RR=()=>{let e=Y.useContext(xu);if(!e)throw new Error("OTP components must be used within InputOTP");return e},yu=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"}}),Ru=Y.forwardRef(({className:e,containerClassName:t,maxLength:r,value:a,defaultValue:n="",onChange:i,onComplete:s,pattern:l,disabled:d=false,size:m,children:u,...c},g)=>{let[p,x]=Y.useState(n),[y,f]=Y.useState(0),[h,R]=Y.useState(false),b=Y.useRef(null),v=a!==void 0?a:p;Y.useImperativeHandle(g,()=>b.current),Y.useEffect(()=>{f(Math.min(v.length,r-1));},[v,r]),Y.useEffect(()=>{v.length===r&&s&&s(v);},[v,r,s]);let P=T=>{let k=T.target.value;if(l&&k){let L=new RegExp(l.replace("^","").replace("$","").replace("+",""));k=k.split("").filter(I=>L.test(I)).join("");}k=k.slice(0,r),a===void 0&&x(k),i?.(k);},w=T=>{T.key==="ArrowLeft"?f(k=>Math.max(0,k-1)):T.key==="ArrowRight"&&f(k=>Math.min(v.length,r-1,k+1));},S=()=>{b.current?.focus();},C=()=>{R(true),f(Math.min(v.length,r-1));},M=()=>{R(false);},N={value:v,activeIndex:h?y:-1,maxLength:r,disabled:d};return jsx(xu.Provider,{value:N,children:jsxs("div",{className:o(yu({size:m}),t),onClick:S,"data-otp-container":true,children:[jsx("input",{ref:b,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:v,onChange:P,onKeyDown:w,onFocus:C,onBlur:M,disabled:d,maxLength:r,className:o("absolute opacity-0 pointer-events-none w-0 h-0",e),...c}),u]})})});Ru.displayName="InputOTP";var wu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex items-center",e),...t}));wu.displayName="InputOTPGroup";var Nu=Y.forwardRef(({index:e,className:t,...r},a)=>{let{value:n,activeIndex:i,disabled:s}=RR(),l=n[e]||"",d=i===e,m=d&&n.length===e;return jsxs("div",{ref:a,"data-otp-slot":true,"data-active":d,"data-filled":!!l,className:o("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",d&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...r,children:[l,m&&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"})})]})});Nu.displayName="InputOTPSlot";var Pu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:o("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Pu.displayName="InputOTPSeparator";var Tu=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent text-foreground",soft:"bg-primary/15 text-primary",surface:"bg-muted text-muted-foreground"},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:"soft",size:"md"}}),Su=Y.forwardRef(({className:e,variant:t,size:r,value:a=[],onChange:n,placeholder:i="Add tag...",maxTags:s,minTagLength:l=1,maxTagLength:d=50,triggerKeys:m=["Enter",",","Tab"],allowDuplicates:u=false,disabled:c,readOnly:g,renderTag:p,...x},y)=>{let[f,h]=Y.useState(""),R=Y.useRef(null);Y.useImperativeHandle(y,()=>R.current);let b=N=>{let T=N.trim();if(T.length<l||T.length>d||s&&a.length>=s||!u&&a.some(L=>L.text.toLowerCase()===T.toLowerCase()))return;let k={id:crypto.randomUUID(),text:T};n?.([...a,k]),h("");},v=N=>{c||g||n?.(a.filter(T=>T.id!==N));},P=N=>{if(m.includes(N.key)){if(N.key==="Tab"&&!f)return;N.preventDefault(),b(f);}N.key==="Backspace"&&!f&&a.length>0&&v(a[a.length-1].id);},w=N=>{let T=N.target.value;if(T.includes(",")){T.split(",").forEach(L=>{L.trim()&&b(L);});return}h(T);},S=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(L=>{b(L);});},C=()=>{R.current?.focus();},M=s?a.length>=s:false;return jsxs("div",{className:o("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",c&&"cursor-not-allowed opacity-50",e),onClick:C,children:[a.map(N=>p?p(N,()=>v(N.id)):jsxs("span",{className:o(Tu({variant:t,size:r})),children:[N.text,!c&&!g&&jsx("button",{type:"button",onClick:T=>{T.stopPropagation(),v(N.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${N.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},N.id)),!M&&!g&&jsx("input",{ref:R,type:"text",value:f,onChange:w,onKeyDown:P,onPaste:S,placeholder:a.length===0?i:"",disabled:c,className:o("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...x})]})});Su.displayName="TagInput";var Du=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"}}),Lu=Y.forwardRef(({className:e,size:t,icon:r,title:a,description:n,action:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o(Du({size:t,className:e})),...l,children:[r&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:r}),a&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:a}),n&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),i&&jsx("div",{className:"mt-2",children:i}),s]}));Lu.displayName="EmptyState";var Iu=cva("rounded-lg border bg-card p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent",ghost:"border-transparent shadow-none",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-muted"}},defaultVariants:{variant:"outline"}}),Eu=Y.forwardRef(({className:e,variant:t,label:r,value:a,icon:n,trend:i,trendValue:s,description:l,...d},m)=>{let u=i==="up"?TrendingUp:i==="down"?TrendingDown:Minus,c=i==="up"?"text-green-500":i==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:m,className:o(Iu({variant:t,className:e})),...d,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:"text-sm font-medium text-muted-foreground",children:r}),n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:n})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:a}),i&&s&&jsxs("span",{className:o("flex items-center gap-0.5 text-sm",c),children:[jsx(u,{className:"h-3 w-3"}),s]})]}),l&&jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:l})]})});Eu.displayName="StatCard";var Au=cva("flex flex-col",{variants:{variant:{default:"",bordered:"divide-y divide-border rounded-lg border",striped:"[&>*:nth-child(odd)]:bg-muted/50"},size:{sm:"gap-1 [&>*]:py-2 [&>*]:px-3",md:"gap-2 [&>*]:py-3 [&>*]:px-4",lg:"gap-3 [&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),zu=Y.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsx("div",{ref:n,role:"list",className:o(Au({variant:t,size:r,className:e})),...a}));zu.displayName="List";var Fu=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),Bu=Y.forwardRef(({className:e,interactive:t,leading:r,trailing:a,children:n,...i},s)=>jsxs("div",{ref:s,role:"listitem",className:o(Fu({interactive:t,className:e})),...i,children:[r&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:r}),jsx("div",{className:"flex-1 min-w-0",children:n}),a&&jsx("div",{className:"flex-shrink-0",children:a})]}));Bu.displayName="ListItem";var Ou=Y.forwardRef(({className:e,primary:t,secondary:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("min-w-0",e),...n,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),r&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:r}),a]}));Ou.displayName="ListItemText";var $u=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),_u=Y.forwardRef(({className:e,position:t,...r},a)=>jsx("div",{ref:a,"data-position":t,className:o($u({position:t,className:e})),...r}));_u.displayName="Timeline";var Ku=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"}}),Yu=Y.forwardRef(({className:e,variant:t,...r},a)=>jsx("div",{ref:a,className:o(Ku({variant:t,className:e})),...r}));Yu.displayName="TimelineItem";var ju=Y.forwardRef(({className:e,dot:t,showConnector:r=true,...a},n)=>jsxs("div",{ref:n,className:o("flex flex-col items-center",e),...a,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:t}),r&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}));ju.displayName="TimelineSeparator";var Uu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex-1 pt-0.5",e),...t}));Uu.displayName="TimelineContent";var Xu=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Xu.displayName="TimelineOpposite";var Zu=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}}),Ju=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 data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"}},defaultVariants:{size:"md"}}),Qu=Y.createContext({}),ep=Y.forwardRef(({className:e,size:t,fullWidth:r,children:a,...n},i)=>jsx(za.Root,{ref:i,type:"single",rovingFocus:false,className:o(Zu({size:t,fullWidth:r,className:e})),...n,children:jsx(Qu.Provider,{value:{size:t??"md"},children:a})}));ep.displayName="SegmentedControl";var tp=Y.forwardRef(({className:e,children:t,...r},a)=>{let{size:n}=Y.useContext(Qu);return jsx(za.Item,{ref:a,className:o(Ju({size:n}),"flex-1",e),...r,children:t})});tp.displayName="SegmentedControlItem";var rp=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"}}),ap=e=>{let t=e.type;return t.startsWith("image/")?Image: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},Fn=e=>{if(e===0)return "0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,a)).toFixed(2))+" "+r[a]},op=(e,t,r)=>{let a=[];return t&&e.size>t&&a.push({code:"file-too-large",message:`File is larger than ${Fn(t)}`}),r&&r.length>0&&(r.some(i=>{if(i.startsWith("."))return e.name.toLowerCase().endsWith(i.toLowerCase());if(i.endsWith("/*")){let s=i.slice(0,-2);return e.type.startsWith(s)}return e.type===i})||a.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${r.join(", ")}`})),a},np=Y.forwardRef(({className:e,variant:t,size:r,onFilesChange:a,onFilesRejected:n,onFileRemove:i,files:s=[],showFileList:l=true,children:d,maxSize:m=10*1024*1024,accept:u,multiple:c=true,disabled:g,...p},x)=>{let[y,f]=Y.useState(false),[h,R]=Y.useState(false),[b,v]=Y.useState([]),P=Y.useRef(null),w=Y.useCallback(D=>{if(!D||D.length===0)return;let E=Array.from(D),B=[],W=[];(c?E:[E[0]]).forEach(U=>{let $=op(U,m,u);$.length>0?W.push({file:U,errors:$}):B.push(U);}),v(W),B.length>0&&a?.(B),W.length>0&&n?.(W);},[m,u,c,a,n]),S=Y.useCallback(D=>{if(D.preventDefault(),D.stopPropagation(),!g&&(f(true),D.dataTransfer.items)){let B=Array.from(D.dataTransfer.items).some(W=>{if(W.kind!=="file")return true;if(u&&u.length>0){let H=W.type;return !u.some(U=>U.endsWith("/*")?H.startsWith(U.slice(0,-2)):H===U)}return false});R(B);}},[g,u]),C=Y.useCallback(D=>{D.preventDefault(),D.stopPropagation(),!g&&(D.dataTransfer.dropEffect="copy");},[g]),M=Y.useCallback(D=>{D.preventDefault(),D.stopPropagation();let E=D.currentTarget.getBoundingClientRect(),B=D.clientX,W=D.clientY;(B<E.left||B>E.right||W<E.top||W>E.bottom)&&(f(false),R(false));},[]),N=Y.useCallback(D=>{D.preventDefault(),D.stopPropagation(),f(false),R(false),!g&&w(D.dataTransfer.files);},[g,w]),T=Y.useCallback(()=>{g||P.current?.click();},[g]),k=Y.useCallback(D=>{w(D.target.files),D.target.value="";},[w]),L=Y.useCallback(D=>{g||(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),P.current?.click());},[g]),I=h?"error":y?"active":t,V=u?.join(",");return jsxs("div",{ref:x,className:o("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:g?-1:0,onDragEnter:S,onDragOver:C,onDragLeave:M,onDrop:N,onClick:T,onKeyDown:L,className:o(rp({variant:I,size:r}),g&&"opacity-50 cursor-not-allowed",!g&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),"aria-disabled":g,children:[jsx("input",{ref:P,type:"file",accept:V,multiple:c,disabled:g,onChange:k,className:"sr-only",tabIndex:-1}),d||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:y?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[m&&`Max ${Fn(m)}`,u&&u.length>0&&` \u2022 ${u.join(", ")}`]})]})]})]}),b.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:b.map(({file:D,errors:E})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:D.name}),":"," ",E.map(B=>B.message).join(", ")]},D.name))}),l&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(D=>{let E=ap(D.file);return jsxs("div",{className:o("flex items-center gap-3 rounded-lg border p-3",D.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(E,{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:D.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[Fn(D.file.size),D.error&&jsx("span",{className:"ml-2 text-danger",children:D.error})]}),D.progress!==void 0&&D.progress<100&&jsx(Mn,{value:D.progress,className:"mt-2 h-1"})]}),jsxs(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:B=>{B.stopPropagation(),i?.(D.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},D.id)})})]})});np.displayName="FileUpload";var OR=`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")`,sp=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}}),Fo=Y.forwardRef(({color:e,isSelected:t,showTransparency:r=true,onSelect:a,size:n,shape:i,interactive:s,className:l,onClick:d,disabled:m,...u},c)=>jsx("button",{ref:c,type:"button",disabled:m,onClick:x=>{d?.(x),a?.(e);},className:o(sp({size:n,shape:i,interactive:s??(!!a||!!d)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:r?OR:void 0,backgroundSize:r?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...u,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Fo.displayName="ColorSwatch";var lp=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),dp=Y.forwardRef(({value:e,defaultValue:t,onChange:r,layout:a,columns:n=6,colors:i,swatchSize:s="md",swatchShape:l="square",disabled:d,className:m,style:u,...c},g)=>{let[p,x]=Y.useState(t),y=e??p,f=Y.useCallback(R=>{d||(e===void 0&&x(R),r?.(R));},[e,r,d]),h=R=>R.toLowerCase();return jsx("div",{ref:g,role:"listbox","aria-label":"Color options",className:o(lp({layout:a}),m),style:{...a==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},...u},...c,children:i.map(R=>{let b=y?h(y)===h(R):false;return jsx(Fo,{role:"option",color:R,size:s,shape:l,isSelected:b,onSelect:f,disabled:d,"aria-selected":b},R)})})});dp.displayName="ColorSwatchPicker";var $R=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],cp={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},mp=Y.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:a,presets:n=$R,showInput:i=true,size:s="md",className:l,variant:d="full"},m)=>{let[u,c]=Y.useState(e??t),g=Y.useId();Y.useEffect(()=>{e!==void 0&&c(e);},[e]);let p=f=>{c(f),r?.(f);},x=f=>{c(f),r?.(f);},y=f=>{let h=f.target.value.toUpperCase();c(h),r?.(h);};return d==="simple"?jsxs("label",{className:o("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",a&&"opacity-50 cursor-not-allowed",cp[s],l),children:[jsx("input",{type:"color",value:u,onChange:y,disabled:a,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:g}),jsx("div",{className:"h-full w-full",style:{backgroundColor:u}})]}):jsxs(Ee,{children:[jsx(_e,{asChild:true,children:jsx("button",{ref:m,disabled:a,className:o("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",cp[s],l),style:{backgroundColor:u},"aria-label":`Color picker, current color: ${u}`})}),jsx(Te,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:u,onChange:p,className:"!w-[200px]"}),i&&jsxs("div",{className:"space-y-1.5",children:[jsx(ea,{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:u}}),jsx(HexColorInput,{id:"color-input",color:u,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),n.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(ea,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(f=>jsx(Fo,{color:f,size:"sm",isSelected:u.toLowerCase()===f.toLowerCase(),onSelect:x},f))})]})]})})]})});mp.displayName="ColorPicker";var up=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"}}),Cs=e=>String(e).padStart(2,"0"),UR=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},XR=(e,t)=>`${Cs(e)}:${Cs(t)}`,pp=Y.forwardRef(({className:e,size:t,value:r,onChange:a,use24Hour:n=true,minuteStep:i=1,showPicker:s=true,minTime:l,maxTime:d,disabled:m,...u},c)=>{let[g,p]=Y.useState(r??""),[x,y]=Y.useState(false);Y.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:f,minutes:h}=UR(g||"00:00"),R=M=>{let N=M.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&a?.(N);},b=(M,N)=>{let T=Math.max(0,Math.min(23,M)),k=Math.max(0,Math.min(59,N)),L=XR(T,k);p(L),a?.(L);},v=()=>b(f+1,h),P=()=>b(f-1,h),w=()=>b(f,h+i),S=()=>b(f,h-i),C=({value:M,onIncrement:N,onDecrement:T})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:N,disabled:m,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:Cs(M)}),jsx(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:T,disabled:m,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:c,type:"time",value:g,onChange:R,disabled:m,className:o(up({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...u}),s&&jsxs(Ee,{open:x,onOpenChange:y,children:[jsx(_e,{asChild:true,children:jsxs(_,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:m,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxs(Te,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(C,{value:f,onIncrement:v,onDecrement:P,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(C,{value:h,onIncrement:w,onDecrement:S,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(_,{variant:"bordered",size:"sm",onClick:()=>{let M=new Date;b(M.getHours(),M.getMinutes());},children:"Now"}),jsx(_,{size:"sm",onClick:()=>y(false),children:"Done"})]})]})]})]})});pp.displayName="TimeInput";var fp=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"}}),ZR=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}},Ms=(e,t,r,a)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${l}${a}${s}`:l},gp=(e,t,r)=>{if(!e)return;let a=e.replace(new RegExp(`\\${t}`,"g"),"");a=a.replace(r,"."),a=a.replace(/[^0-9.-]/g,"");let n=parseFloat(a);return isNaN(n)?void 0:n},bp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,currency:i="USD",locale:s="en-US",decimals:l=2,min:d,max:m,showCurrency:u=true,currencyPosition:c="prefix",currencySymbol:g,thousandSeparator:p=",",decimalSeparator:x=".",disabled:y,placeholder:f,...h},R)=>{let[b,v]=Y.useState(a),[P,w]=Y.useState(""),[S,C]=Y.useState(false),M=r!==void 0?r:b,N=g??ZR(i,s);Y.useEffect(()=>{!S&&M!==void 0&&w(Ms(M,l,p,x));},[M,l,p,x,S]);let T=D=>{let E=D.target.value;if(!E){w(""),r===void 0&&v(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${x}.-]*$`).test(E))return;w(E);let W=gp(E,p,x);if(W!==void 0){let H=W;d!==void 0&&W<d&&(H=d),m!==void 0&&W>m&&(H=m),r===void 0&&v(H),n?.(H);}},k=()=>{C(true),M!==void 0&&w(M.toString().replace(".",x));},L=()=>{C(false),w(M!==void 0?Ms(M,l,p,x):"");},I=u&&c==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:N}),V=u&&c==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:N});return jsxs("div",{className:"relative flex items-center",children:[I&&jsx("div",{className:"absolute left-3 pointer-events-none",children:I}),jsx("input",{ref:R,type:"text",inputMode:"decimal",value:P,onChange:T,onFocus:k,onBlur:L,disabled:y,placeholder:f??`0${x}${"0".repeat(l)}`,className:o(fp({size:t}),I&&"pl-8",V&&"pr-8","text-right",e),style:{borderColor:S?"var(--color-foreground)":void 0},...h}),V&&jsx("div",{className:"absolute right-3 pointer-events-none",children:V})]})});bp.displayName="CurrencyInput";var vp=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"}}),Ts={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:"#####-####"}},ew=(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}},Br=e=>["#","A","*"].includes(e),On=(e,t,r)=>{let a="",n=0;for(let i=0;i<t.length&&n<=e.length;i++){let s=t[i];if(Br(s)){if(n<e.length){let l=e[n];ew(l,s)?(a+=l,n++):(n++,i--);}}else (n<e.length||r)&&(a+=s);}return a},Ss=(e,t)=>{let r="";for(let a=0;a<e.length&&a<t.length;a++){let n=t[a];Br(n)&&(r+=e[a]);}return r},hp=(e,t)=>e.split("").map(r=>Br(r)?t:r).join(""),tw=(e,t,r)=>{let a=0;for(let l=0;l<r&&l<e.length&&l<t.length;l++)Br(t[l])&&a++;let i=0,s=0;for(let l=0;l<t.length&&s<a;l++)i++,Br(t[l])&&s++;for(;i<t.length&&!Br(t[i]);)i++;return Math.min(i,e.length)},xp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,mask:i,maskPlaceholder:s="_",showMaskPlaceholder:l=false,includeMaskChars:d=false,disabled:m,placeholder:u,...c},g)=>{let p=typeof i=="string"&&i in Ts?Ts[i].mask:i,[x,y]=Y.useState(a),[f,h]=Y.useState(""),[R,b]=Y.useState(false),v=Y.useRef(null),P=r!==void 0?r:x;Y.useImperativeHandle(g,()=>v.current),Y.useEffect(()=>{let M=On(P,p,true);h(M);},[P,p]);let w=M=>{let N=M.target.value,T=M.target.selectionStart??0,k=N.replace(/[^\w]/g,""),L=On(k,p,true),I=Ss(L,p);h(L),r===void 0&&y(d?L:I),n?.(I,L),requestAnimationFrame(()=>{if(v.current){let V=tw(L,p,T);v.current.setSelectionRange(V,V);}});},S=M=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(M.key)||M.ctrlKey||M.metaKey)return;let N=v.current;if(!N)return;let T=N.selectionStart??0;if(M.key==="Backspace"&&T>0){let k=T-1;for(;k>0&&!Br(p[k]);)k--;let L=Ss(f,p),I=0;for(let E=0;E<k&&E<p.length;E++)Br(p[E])&&I++;let V=L.slice(0,Math.max(0,I-1))+L.slice(I),D=On(V,p,true);h(D),r===void 0&&y(d?D:V),n?.(V,D),M.preventDefault(),requestAnimationFrame(()=>{v.current&&v.current.setSelectionRange(k,k);});}},C=l?hp(p,s):u;return jsx("input",{ref:v,type:"text",value:f,onChange:w,onKeyDown:S,onFocus:()=>b(true),onBlur:()=>b(false),disabled:m,placeholder:C,className:o(vp({size:t}),e),style:{borderColor:R?"var(--color-foreground)":void 0},...c})});xp.displayName="MaskedInput";var yp=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"}}),$n={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},Ds={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},ks=(e,t)=>String(e).padStart(t,"0"),Wn=(e,t)=>{let r=ks(e.getDate(),2),a=ks(e.getMonth()+1,2),n=ks(e.getFullYear(),4),i=$n[t],s=Ds[t],l={day:r,month:a,year:n};return s.map(d=>l[d]).join(i)},Rp=(e,t)=>{let r=$n[t],a=e.split(r);if(a.length!==3)return null;let n=Ds[t],i={};if(n.forEach((l,d)=>{i[l]=parseInt(a[d],10);}),isNaN(i.day)||isNaN(i.month)||isNaN(i.year)||i.month<1||i.month>12||i.day<1||i.day>31||i.year<1e3||i.year>9999)return null;let s=new Date(i.year,i.month-1,i.day);return s.getFullYear()!==i.year||s.getMonth()!==i.month-1||s.getDate()!==i.day?null:s},nw=e=>e.toLowerCase(),iw=e=>{let t=$n[e];return Ds[e].map(a=>a==="year"?"####":"##").join(t)},wp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,format:i="DD/MM/YYYY",minDate:s,maxDate:l,showIcon:d=true,disabled:m,placeholder:u,...c},g)=>{let[p,x]=Y.useState(a??null),[y,f]=Y.useState(""),[h,R]=Y.useState(null),b=Y.useRef(null),v=r!==void 0?r:p;Y.useImperativeHandle(g,()=>b.current),Y.useEffect(()=>{v?(f(Wn(v,i)),R(null)):f("");},[v,i]);let P=$n[i],w=iw(i),S=N=>{let T=N.target.value;T=T.replace(new RegExp(`[^0-9\\${P}]`,"g"),"");let k=T.replace(new RegExp(`\\${P}`,"g"),""),L="",I=0;for(let V=0;V<w.length&&I<k.length;V++)w[V]==="#"?(L+=k[I],I++):L+=w[V];if(f(L),L.length===w.length){let V=Rp(L,i);if(V){if(s&&V<s){R(`Date must be after ${Wn(s,i)}`);return}if(l&&V>l){R(`Date must be before ${Wn(l,i)}`);return}R(null),r===void 0&&x(V),n?.(V);}else R("Invalid date");}else r===void 0&&x(null),n?.(null),R(null);},C=()=>{y&&y.length!==w.length&&(f(""),R(null),r===void 0&&x(null),n?.(null));},M=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxs("div",{className:"relative",children:[jsx("input",{ref:b,type:"text",inputMode:"numeric",value:y,onChange:S,onBlur:C,disabled:m,placeholder:u??nw(i),className:o(yp({size:t}),d&&"pr-10",h&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!h,"aria-describedby":h?"date-error":void 0,...c}),d&&jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsx(Calendar,{className:o(M,"text-muted-foreground")})}),h&&jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:h})]})});wp.displayName="DateInput";var Np=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"}}),Pp=[{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:"(###) ###-####"}],_n=(e,t)=>{let r=e.replace(/\D/g,""),a="",n=0;for(let i=0;i<t.length&&n<r.length;i++)t[i]==="#"?(a+=r[n],n++):a+=t[i];return a},mw=e=>e.replace(/#/g,"_"),Cp=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,country:i,defaultCountry:s="TR",onCountryChange:l,countries:d=Pp,showCountrySelect:m=true,showDialCode:u=false,disabled:c,placeholder:g,...p},x)=>{let[y,f]=Y.useState(a),[h,R]=Y.useState(i??s),[b,v]=Y.useState(false),P=r!==void 0?r:y,w=i??h,S=d.find(k=>k.code===w)??d[0],C=_n(P,S.format),M=k=>{let I=k.target.value.replace(/\D/g,"");r===void 0&&f(I);let V=_n(I,S.format),D=`${S.dialCode} ${V}`;n?.(I,D,S);};return jsxs("div",{className:"flex",children:[m&&jsxs(we.Root,{value:w,onValueChange:k=>{let L=d.find(D=>D.code===k);if(!L)return;i===void 0&&R(k),l?.(L);let I=_n(P,L.format),V=`${L.dialCode} ${I}`;n?.(P,V,L);},disabled:c,children:[jsxs(we.Trigger,{className:o("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsx(we.Value,{children:jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:S.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:S.dialCode})]})}),jsx(we.Icon,{asChild:true,children:jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}),jsx(we.Portal,{children:jsx(we.Content,{className:o("relative z-50 max-h-[300px] min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1"),position:"popper",children:jsx(we.Viewport,{className:"p-1 h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",children:d.map(k=>jsxs(we.Item,{value:k.code,className:"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(we.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),jsx(we.ItemText,{children:jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:k.flag}),jsx("span",{className:"flex-1",children:k.name}),jsx("span",{className:"text-xs text-muted-foreground",children:k.dialCode})]})})]},k.code))})})})]}),jsxs("div",{className:"relative flex-1",children:[u&&!m&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:S.dialCode}),jsx("input",{ref:x,type:"tel",inputMode:"tel",value:C,onChange:M,onFocus:()=>v(true),onBlur:()=>v(false),disabled:c,placeholder:g??mw(S.format),className:o(Np({size:t}),m&&"rounded-l-none",u&&!m&&"pl-12",e),style:{borderColor:b?"var(--color-foreground)":void 0},...p})]})]})});Cp.displayName="PhoneInput";var Tp=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",outline:"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:"outline",size:"md",sticky:false}}),Sp=Y.forwardRef(({className:e,variant:t,size:r,sticky:a,brand:n,children:i,mobileBreakpoint:s="md",...l},d)=>{let[m,u]=Y.useState(false),c={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],g={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:d,className:o(Tp({variant:t,size:r,sticky:a,className:e})),...l,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[n&&jsx("div",{className:"flex-shrink-0",children:n}),jsx("div",{className:o("items-center gap-4 flex-1 justify-end",c),children:i}),jsx("button",{type:"button",className:o("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",g),onClick:()=>u(!m),"aria-label":m?"Close menu":"Open menu","aria-expanded":m,children:m?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),m&&jsx("div",{className:o("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",g),children:i})]})});Sp.displayName="Navbar";var kp=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex items-center gap-2 font-semibold text-lg",e),...t}));kp.displayName="NavbarBrand";var Dp=Y.forwardRef(({className:e,justify:t="start",...r},a)=>{let n={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:a,className:o("flex items-center gap-4",n,e),...r})});Dp.displayName="NavbarContent";var Lp=Y.forwardRef(({className:e,isActive:t,...r},a)=>jsx("div",{ref:a,className:o("flex items-center",t&&"text-primary font-medium",e),...r}));Lp.displayName="NavbarItem";var Vp=Y.forwardRef(({className:e,isActive:t,...r},a)=>jsx("a",{ref:a,className:o("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...r}));Vp.displayName="NavbarLink";var Ep=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",outline:"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:"outline",size:"md",underline:"hover"}}),Hp=Y.forwardRef(({className:e,variant:t,size:r,underline:a,isExternal:n,showExternalIcon:i=true,isDisabled:s,children:l,...d},m)=>{let u=n?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:m,className:o(Ep({variant:t,size:r,underline:a,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...u,...d,children:[l,n&&i&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});Hp.displayName="Link";var Ap=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"}}),zp=Y.forwardRef(({className:e,position:t,threshold:r=400,icon:a,behavior:n="smooth",variant:i="solid",color:s="default",size:l="md",radius:d="full",target:m,onVisibilityChange:u,onClick:c,...g},p)=>{let[x,y]=Y.useState(false);Y.useEffect(()=>{let R=m?.current||window,b=()=>{let P=(m?.current?m.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;P!==x&&(y(P),u?.(P));};return R.addEventListener("scroll",b,{passive:true}),b(),()=>{R.removeEventListener("scroll",b);}},[r,m,x,u]);let f=R=>{m?.current?m.current.scrollTo({top:0,behavior:n}):window.scrollTo({top:0,behavior:n}),c?.(R);},h=l==="sm"?"h-4 w-4":l==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:o(Ap({position:t}),x?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(_,{ref:p,type:"button",variant:i,color:s,size:"icon",radius:d,onClick:f,"aria-label":"Back to top",className:o("shadow-lg",l==="sm"&&"h-9 w-9",l==="md"&&"h-10 w-10",l==="lg"&&"h-12 w-12"),...g,children:a||jsx(ArrowUp,{className:h})})})});zp.displayName="BackTop";var Pw=X.Menu,Cw=X.Group,Mw=X.Portal,Tw=X.Sub,Sw=X.RadioGroup,Fp=Y.forwardRef(({className:e,...t},r)=>jsx(X.Root,{ref:r,className:o("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",e),...t}));Fp.displayName=X.Root.displayName;var Bp=Y.forwardRef(({className:e,...t},r)=>jsx(X.Trigger,{ref:r,className:o("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));Bp.displayName=X.Trigger.displayName;var Op=Y.forwardRef(({className:e,inset:t,children:r,...a},n)=>jsxs(X.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));Op.displayName=X.SubTrigger.displayName;var Gp=Y.forwardRef(({className:e,...t},r)=>jsx(X.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Gp.displayName=X.SubContent.displayName;var Wp=Y.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:a=8,...n},i)=>jsx(X.Portal,{children:jsx(X.Content,{ref:i,align:t,alignOffset:r,sideOffset:a,className:o("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Wp.displayName=X.Content.displayName;var $p=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(X.Item,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));$p.displayName=X.Item.displayName;var _p=Y.forwardRef(({className:e,children:t,checked:r,...a},n)=>jsxs(X.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(X.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));_p.displayName=X.CheckboxItem.displayName;var Kp=Y.forwardRef(({className:e,children:t,...r},a)=>jsxs(X.RadioItem,{ref:a,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(X.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Kp.displayName=X.RadioItem.displayName;var Yp=Y.forwardRef(({className:e,inset:t,...r},a)=>jsx(X.Label,{ref:a,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Yp.displayName=X.Label.displayName;var jp=Y.forwardRef(({className:e,...t},r)=>jsx(X.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));jp.displayName=X.Separator.displayName;var Up=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Up.displayName="MenubarShortcut";var Xp=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"}}),qp=Y.forwardRef(({className:e,orientation:t,size:r,currentStep:a=0,children:n,...i},s)=>{let l=Y.Children.toArray(n);return jsx("div",{ref:s,className:o(Xp({orientation:t,size:r,className:e})),...i,children:l.map((d,m)=>Y.isValidElement(d)?Y.cloneElement(d,{...d.props,stepNumber:m+1,status:d.props.status||(m<a?"completed":m===a?"current":"upcoming"),isLast:m===l.length-1,orientation:t,size:r}):d)})});qp.displayName="Steps";var Zp=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"}}),Dw=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"}}),Lw=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"}}),Jp=Y.forwardRef(({className:e,orientation:t="horizontal",size:r="md",title:a,description:n,icon:i,status:s="upcoming",stepNumber:l,isLast:d,...m},u)=>jsxs("div",{ref:u,className:o(Zp({orientation:t,size:r,className:e}),!d&&t==="horizontal"&&"flex-1"),...m,children:[jsx("div",{className:o("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:o(Dw({status:s,size:r})),children:s==="completed"?jsx(Check,{className:r==="sm"?"h-3 w-3":r==="lg"?"h-5 w-5":"h-4 w-4"}):i||l}),(a||n)&&jsxs("div",{className:"flex flex-col",children:[a&&jsx("span",{className:o("font-medium",r==="sm"&&"text-sm",r==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:a}),n&&jsx("span",{className:o("text-muted-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm",r==="lg"&&"text-base"),children:n})]})]})}),!d&&jsx("div",{className:o(Lw({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Jp.displayName="Step";function zw({className:e,data:t,columns:r,selectable:a=false,selectedKeys:n,onSelectionChange:i,getRowKey:s=(v,P)=>String(P),sortable:l=false,sortState:d,onSortChange:m,paginated:u=false,pageSizeOptions:c=[10,20,50],paginationState:g,onPaginationChange:p,emptyContent:x="No data",loading:y=false,striped:f=false,hoverable:h=true,...R},b){let[v,P]=Y.useState(new Set),[w,S]=Y.useState({columnId:null,direction:null}),[C,M]=Y.useState({pageIndex:0,pageSize:c[0]||10}),N=n??v,T=d??w,k=g??C,L=F=>{i?i(F):P(F);},I=F=>{m?m(F):S(F);},V=F=>{p?p(F):M(F);},D=Y.useMemo(()=>{if(!T.columnId||!T.direction)return t;let F=r.find(O=>O.id===T.columnId);return F?[...t].sort((O,A)=>{let z=F.accessor(O),ee=F.accessor(A);if(z===ee)return 0;if(z==null)return 1;if(ee==null)return -1;let J=String(z).localeCompare(String(ee),void 0,{numeric:true});return T.direction==="asc"?J:-J}):t},[t,T,r]),E=Y.useMemo(()=>{if(!u)return D;let F=k.pageIndex*k.pageSize;return D.slice(F,F+k.pageSize)},[D,u,k]),B=Math.ceil(D.length/k.pageSize),W=F=>{if(F){let O=new Set(E.map((A,z)=>s(A,z)));L(O);}else L(new Set);},H=(F,O)=>{let A=new Set(N);O?A.add(F):A.delete(F),L(A);},U=E.length>0&&E.every((F,O)=>N.has(s(F,O))),$=E.some((F,O)=>N.has(s(F,O))),Pe=F=>{if(!r.find(z=>z.id===F)?.sortable&&!l)return;let A="asc";T.columnId===F&&(T.direction==="asc"?A="desc":T.direction==="desc"&&(A=null)),I({columnId:A?F:null,direction:A});},ie=F=>T.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):T.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:b,className:o("w-full",e),...R,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:[a&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(Ro,{checked:U?true:$?"indeterminate":false,onCheckedChange:W,"aria-label":"Select all"})}),r.map(F=>{let O=F.sortable??l;return jsx("th",{className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>O&&Pe(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,O&&ie(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:y?jsx("tr",{children:jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):E.length===0?jsx("tr",{children:jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:x})}):E.map((F,O)=>{let A=s(F,O),z=N.has(A);return jsxs("tr",{className:o("border-b transition-colors",h&&"hover:bg-muted/50",f&&O%2===1&&"bg-muted/30",z&&"bg-muted"),"data-state":z?"selected":void 0,children:[a&&jsx("td",{className:"w-12 px-4",children:jsx(Ro,{checked:z,onCheckedChange:ee=>H(A,!!ee),"aria-label":`Select row ${O+1}`})}),r.map(ee=>jsx("td",{className:"p-4 align-middle",children:ee.cell?ee.cell(F,O):ee.accessor(F)},ee.id))]},A)})})]})}),u&&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:k.pageSize,onChange:F=>V({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:c.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 ",k.pageIndex+1," of ",B||1]}),jsxs("div",{className:"flex gap-1",children:[jsx("button",{onClick:()=>V({...k,pageIndex:k.pageIndex-1}),disabled:k.pageIndex===0,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{onClick:()=>V({...k,pageIndex:k.pageIndex+1}),disabled:k.pageIndex>=B-1,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var Fw=Y.forwardRef(zw);var ef=cva("",{variants:{size:{sm:"[--tree-indent:12px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:16px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:20px] [--tree-item-height:40px] text-base"}},defaultVariants:{size:"md"}}),tf=Y.forwardRef(({className:e,size:t,data:r,defaultExpandedIds:a=[],expandedIds:n,onExpandedChange:i,selectedId:s,onSelect:l,showIcons:d=true,leafIcon:m=jsx(File,{className:"h-4 w-4"}),folderIcon:u=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:c=jsx(FolderOpen,{className:"h-4 w-4"}),defaultExpandAll:g=false,...p},x)=>{let y=Y.useCallback(w=>w.reduce((S,C)=>C.children?.length?[...S,C.id,...y(C.children)]:S,[]),[]),[f,h]=Y.useState(()=>g?y(r):a),R=n??f,b=w=>{i?i(w):h(w);},v=w=>{R.includes(w)?b(R.filter(S=>S!==w)):b([...R,w]);},P=(w,S=0)=>{let C=w.children&&w.children.length>0,M=R.includes(w.id),N=s===w.id,T=()=>{w.disabled||l?.(w);},k=I=>{I.stopPropagation(),C&&v(w.id);},L=()=>w.icon?w.icon:C?M?c:u:m;return jsxs("div",{role:"treeitem","aria-expanded":C?M:void 0,children:[jsxs("div",{className:o("flex items-center gap-1 rounded-md px-2 cursor-pointer transition-colors","h-[var(--tree-item-height)]","hover:bg-muted/50",N&&"bg-primary/10 text-primary",w.disabled&&"opacity-50 cursor-not-allowed"),style:{paddingLeft:`calc(${S} * var(--tree-indent) + 8px)`},onClick:T,children:[jsx("button",{type:"button",className:o("flex h-5 w-5 items-center justify-center rounded hover:bg-muted",!C&&"invisible"),onClick:k,tabIndex:-1,"aria-label":M?"Collapse":"Expand",children:M?jsx(ChevronDown,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})}),d&&jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:L()}),jsx("span",{className:"truncate",children:w.name})]}),C&&M&&jsx("div",{role:"group",children:w.children.map(I=>P(I,S+1))})]},w.id)};return jsx("div",{ref:x,role:"tree",className:o(ef({size:t,className:e})),...p,children:r.map(w=>P(w))})});tf.displayName="TreeView";var af=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),Xw=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let r=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),a=e.split(r);return jsx(Fragment,{children:a.map((n,i)=>r.test(n)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:n},i):jsx("span",{children:n},i))})},qw=(e,t)=>{let[r,a]=Y.useState(e);return Y.useEffect(()=>{let n=setTimeout(()=>{a(e);},t);return ()=>{clearTimeout(n);}},[e,t]),r},of=Y.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,onSelect:i,options:s=[],loadOptions:l,debounceMs:d=300,minChars:m=0,placeholder:u="Type to search...",emptyText:c="No results found.",loadingText:g="Loading...",clearable:p=false,freeSolo:x=true,maxHeight:y=200,highlightMatch:f=true,fullWidth:h=false,disabled:R,...b},v)=>{let[P,w]=Y.useState(false),[S,C]=Y.useState(a),[M,N]=Y.useState([]),[T,k]=Y.useState(false),[L,I]=Y.useState(false),V=Y.useRef(null),D=r!==void 0?r:S,E=qw(D,d);Y.useImperativeHandle(v,()=>V.current);let B=l?M:s,W=Y.useMemo(()=>l?B:B.filter(J=>J.label.toLowerCase().includes(D.toLowerCase())),[B,D,l]);Y.useEffect(()=>{if(!l)return;if(E.length<m){N([]);return}let J=false;return (async()=>{k(true);try{let nt=await l(E);J||N(nt);}catch{J||N([]);}finally{J||k(false);}})(),()=>{J=true;}},[E,l,m]);let H=J=>{r===void 0&&C(J),n?.(J);},U=J=>{let Xe=J.target.value;H(Xe),Xe.length>=m&&w(true);},$=J=>{H(J.label),i?.(J),w(false);},Pe=()=>{H(""),V.current?.focus();},ie=()=>{I(true),D.length>=m&&(W.length>0||T)&&w(true);},F=()=>{I(false);},O=J=>{J.key==="Escape"&&w(false),J.key==="ArrowDown"&&!P&&W.length>0&&w(true);},A=P&&D.length>=m,z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ee=p&&D?"pr-8":"pr-3";return jsxs(Ee,{open:A,onOpenChange:w,children:[jsx(rs,{asChild:true,children:jsxs("div",{className:o("relative",h?"w-full":"w-fit"),children:[jsx("input",{ref:V,type:"text",value:D,onChange:U,onFocus:ie,onBlur:F,onKeyDown:O,disabled:R,placeholder:u,className:o(af({size:t,fullWidth:h}),ee,e),style:{borderColor:L?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":A,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...b}),p&&D&&!R&&jsx("button",{type:"button",onClick:Pe,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(Te,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:J=>J.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:y},children:T?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:o(z,"animate-spin")}),g]}):W.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c}):W.map(J=>jsxs(Command.Item,{value:J.value,disabled:J.disabled,onSelect:()=>$(J),className:o("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:o("mr-2 h-4 w-4 shrink-0",D===J.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:f?jsx(Xw,{text:J.label,query:D}):J.label})]},J.value))})})})]})});of.displayName="Autocomplete";var Hs=Y.createContext(null),As=Y.createContext(null),zs=()=>{let e=Y.useContext(Hs);if(!e)throw new Error("useFormContext must be used within a Form");return e},jn=()=>{let e=Y.useContext(As);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},Zw={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:r=>typeof r=="string"&&r.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:r=>typeof r=="number"&&r>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:r=>typeof r=="number"&&r<=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:r=>typeof r=="string"&&e.test(r),message:t}),custom:(e,t)=>({validate:e,message:t})},nf=Y.forwardRef(({defaultValues:e={},onSubmit:t,onError:r,validateOnBlur:a=true,validateOnChange:n=false,children:i,className:s,...l},d)=>{let[m,u]=Y.useState(e),[c,g]=Y.useState({}),[p,x]=Y.useState({}),[y,f]=Y.useState({}),[h,R]=Y.useState(false),b=Y.useRef(new Map),v=Y.useCallback((V,D)=>{b.current.set(V,D);},[]),P=Y.useCallback(V=>{b.current.delete(V);},[]),w=Y.useCallback(V=>{let D=b.current.get(V)||[],E=m[V];for(let B of D)if(!B.validate(E))return g(W=>({...W,[V]:B.message})),false;return g(B=>({...B,[V]:null})),true},[m]),S=Y.useCallback(()=>{let V=true,D={};return b.current.forEach((E,B)=>{let W=m[B];for(let H of E)if(!H.validate(W)){D[B]=H.message,V=false;break}D[B]||(D[B]=null);}),g(D),V},[m]),C=Y.useCallback((V,D)=>{u(E=>({...E,[V]:D})),f(E=>({...E,[V]:true})),n&&setTimeout(()=>{w(V);},0);},[n,w]),M=Y.useCallback((V,D)=>{g(E=>({...E,[V]:D}));},[]),N=Y.useCallback((V,D)=>{x(E=>({...E,[V]:D})),D&&a&&w(V);},[a,w]),T=Y.useCallback(V=>({value:m[V],error:c[V]??null,touched:p[V]??false,dirty:y[V]??false}),[m,c,p,y]),k=Y.useCallback(()=>{u(e),g({}),x({}),f({});},[e]),L=async V=>{V.preventDefault();let D={};if(b.current.forEach((B,W)=>{D[W]=true;}),x(D),!S()){r?.(c);return}if(t){R(true);try{await t(m);}finally{R(false);}}},I={values:m,errors:c,touched:p,dirty:y,isSubmitting:h,setValue:C,setError:M,setTouched:N,validateField:w,validateAll:S,registerField:v,unregisterField:P,getFieldState:T,reset:k};return jsx(Hs.Provider,{value:I,children:jsx("form",{ref:d,onSubmit:L,className:o("space-y-4",s),...l,children:i})})});nf.displayName="Form";var sf=({name:e,rules:t=[],defaultValue:r,children:a})=>{let n=zs(),i=Y.useId();Y.useEffect(()=>(n.registerField(e,t),r!==void 0&&n.values[e]===void 0&&n.setValue(e,r),()=>{n.unregisterField(e);}),[e,t,r,n]);let s=n.getFieldState(e),l={name:e,id:`${i}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(As.Provider,{value:l,children:a})};sf.displayName="FormField";var lf=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("space-y-1.5",e),...t}));lf.displayName="FormItem";var df=Y.forwardRef(({className:e,required:t,children:r,...a},n)=>{let{id:i,error:s,touched:l}=jn();return jsxs(ea,{ref:n,htmlFor:i,className:o(s&&l&&"text-danger",e),...a,children:[r,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});df.displayName="FormLabel";var cf=({children:e})=>{let{name:t,id:r,error:a,touched:n}=jn(),i=zs(),s=i.getFieldState(t),l=m=>{let u=m.target,c=u.type==="checkbox"?u.checked:u.value;i.setValue(t,c);},d=()=>{i.setTouched(t,true);};return Y.cloneElement(e,{id:r,name:t,value:s.value??"",onChange:l,onBlur:d,"aria-invalid":a&&n?"true":void 0,"aria-describedby":a&&n?`${r}-error`:void 0})};cf.displayName="FormControl";var mf=Y.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:o("text-xs text-muted-foreground",e),...t}));mf.displayName="FormDescription";var uf=Y.forwardRef(({className:e,message:t,...r},a)=>{let{id:n,error:i,touched:s}=jn(),l=t??(s?i:null);return l?jsx("p",{ref:a,id:`${n}-error`,className:o("text-xs text-danger",e),role:"alert",...r,children:l}):null});uf.displayName="FormMessage";var ff=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"}}),gf=Y.forwardRef(({className:e,size:t,name:r,description:a,avatarUrl:n,avatarFallback:i,trailing:s,...l},d)=>{let m=i||r.split(" ").map(u=>u[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:d,className:o(ff({size:t,className:e})),...l,children:[jsxs(ta,{"data-user-avatar":true,children:[n&&jsx(Ha,{src:n,alt:r}),jsx(ra,{children:m})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:r}),a&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:a})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});gf.displayName="User";var vf=cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),hf=Y.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsx("code",{ref:n,className:o(vf({variant:t,size:r,className:e})),...a}));hf.displayName="Code";var xf=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",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"}}),yf=Y.forwardRef(({className:e,variant:t,size:r,code:a,copyable:n=true,copyLabel:i="Copy",onCopy:s,symbol:l="$",hideSymbol:d=false,...m},u)=>{let[c,g]=Y.useState(false),p=async()=>{try{await navigator.clipboard.writeText(a),g(!0),s?.(),setTimeout(()=>g(!1),2e3);}catch(x){console.error("Failed to copy:",x);}};return jsxs("div",{ref:u,className:o(xf({variant:t,size:r,className:e})),...m,children:[!d&&jsx("span",{className:"text-muted-foreground select-none",children:l}),jsx("code",{className:"flex-1 truncate",children:a}),n&&jsx("button",{type:"button",onClick:p,className:o("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":c?"Copied":i,children:c?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});yf.displayName="Snippet";var Os=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Rf=Y.forwardRef(({className:e,radius:t,src:r,alt:a,fallback:n,showSkeleton:i=true,onLoad:s,onError:l,fit:d="cover",aspectRatio:m,style:u,...c},g)=>{let[p,x]=Y.useState("loading");Y.useEffect(()=>{r&&x("loading");},[r]);let y=()=>{x("loaded"),s?.();},f=()=>{x("error"),l?.();},h={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[d];return p==="error"&&n?jsx("div",{className:o(Os({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:m,...u},children:n}):jsxs("div",{className:o(Os({radius:t}),"relative",e),style:{aspectRatio:m,...u},children:[p==="loading"&&i&&jsx(hn,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:g,src:r,alt:a,onLoad:y,onError:f,className:o("h-full w-full transition-opacity duration-300",h,p==="loading"?"opacity-0":"opacity-100"),...c})]})});Rf.displayName="Image";var Pf=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"}}),Cf=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"}}),Mf=Y.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),Tf=Y.forwardRef(({className:e,size:t="md",value:r,defaultValue:a="",onValueChange:n,multiple:i=false,children:s,...l},d)=>{let[m,u]=Y.useState(a),c=r??m,g=p=>{let x;if(i){let y=Array.isArray(c)?c:[c].filter(Boolean);y.includes(p)?x=y.filter(f=>f!==p):x=[...y,p];}else x=p;n?n(x):u(x);};return jsx(Mf.Provider,{value:{value:c,onValueChange:g,multiple:i,size:t??"md"},children:jsx("div",{ref:d,role:"listbox","aria-multiselectable":i,className:o(Pf({size:t,className:e})),...l,children:s})})});Tf.displayName="Listbox";var Sf=Y.forwardRef(({className:e,value:t,disabled:r,icon:a,description:n,children:i,...s},l)=>{let{value:d,onValueChange:m,multiple:u,size:c}=Y.useContext(Mf),g=u?Array.isArray(d)&&d.includes(t):d===t,p=()=>{r||m(t);},x=y=>{(y.key==="Enter"||y.key===" ")&&!r&&(y.preventDefault(),m(t));};return jsxs("div",{ref:l,role:"option","aria-selected":g,"data-disabled":r?"":void 0,tabIndex:r?-1:0,className:o(Cf({size:c}),g&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:x,...s,children:[a&&jsx("span",{className:"mr-2 flex-shrink-0",children:a}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:i}),n&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:n})]}),g&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});Sf.displayName="ListboxItem";var Df=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"}}),Lf=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 cN({className:e,variant:t,size:r,items:a,onReorder:n,renderItem:i,showHandle:s=true,disabled:l=false,...d},m){let[u,c]=Y.useState(null),[g,p]=Y.useState(null),x=(b,v)=>{l||(c(v),b.dataTransfer.effectAllowed="move",b.dataTransfer.setData("text/plain",String(v)));},y=(b,v)=>{b.preventDefault(),!(l||u===null||u===v)&&p(v);},f=()=>{p(null);},h=(b,v)=>{if(b.preventDefault(),l||u===null||u===v){c(null),p(null);return}let P=[...a],[w]=P.splice(u,1);P.splice(v,0,w),n?.(P),c(null),p(null);},R=()=>{c(null),p(null);};return jsx("div",{ref:m,className:o(Df({variant:t,size:r,className:e})),...d,children:a.map((b,v)=>jsxs("div",{draggable:!l,onDragStart:P=>x(P,v),onDragOver:P=>y(P,v),onDragLeave:f,onDrop:P=>h(P,v),onDragEnd:R,className:o(Lf({variant:t,size:r,isDragging:u===v,isDragOver:g===v}),!l&&"cursor-move"),children:[s&&jsx("div",{className:o("flex-shrink-0 text-muted-foreground",l?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:i(b,v)})]},b.id))})}var mN=Y.forwardRef(cN);var Ef=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}}),gN={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Hf=Y.forwardRef(({className:e,variant:t,loading:r=true,size:a="md",spinner:n,text:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o("relative",e),...l,children:[s,jsx("div",{className:o(Ef({variant:t,visible:r})),"aria-hidden":!r,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[n||jsx(Loader2,{className:o(gN[a],"animate-spin text-primary")}),i&&jsx("span",{className:"text-sm text-muted-foreground",children:i})]})})]}));Hf.displayName="LoadingOverlay";var Af=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"}}),zf=Y.forwardRef(({className:e,color:t,isLoading:r=false,progress:a,showSpinner:n=false,...i},s)=>{let[l,d]=Y.useState(0),[m,u]=Y.useState(false),c=Y.useRef(null);return Y.useEffect(()=>{if(a!==void 0){d(a),u(a>0&&a<100);return}return r?(u(true),d(10),c.current=setInterval(()=>{d(g=>{if(g>=90)return g;let p=Math.random()*10;return Math.min(g+p,90)});},500)):l>0&&(d(100),setTimeout(()=>{u(false),d(0);},200)),()=>{c.current&&clearInterval(c.current);}},[r,a]),!m&&a===void 0||a!==void 0&&(a<=0||a>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:o(Af({color:t,className:e})),style:{width:`${l}%`},role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,...i,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),n&&m&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:o("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")})})]})});zf.displayName="NProgress";var Gf=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}}),Ff={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},RN={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Wf=Y.forwardRef(({className:e,variant:t="spinner",size:r="md",fullScreen:a,text:n,color:i="primary",...s},l)=>{let d={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[i],m=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(u=>jsx("div",{className:o(RN[r||"md"],"animate-bounce rounded-full bg-current",d),style:{animationDelay:`${u*.15}s`}},u))});case "pulse":return jsx("div",{className:o(Ff[r||"md"],"animate-pulse rounded-full bg-current",d)});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:o(Ff[r||"md"],"animate-spin",d)})}};return jsx("div",{ref:l,className:o(Gf({variant:t,size:r,fullScreen:a,className:e})),role:"status","aria-label":n||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[m(),n&&jsx("span",{className:o("text-sm",d),children:n})]})})});Wf.displayName="Loading";var $s=class extends Y.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((a,n)=>a!==t.resetKeys?.[n])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(_s,{error:this.state.error,onReset:this.reset}):this.props.children}},_s=Y.forwardRef(({error:e,onReset:t,className:r},a)=>jsxs("div",{ref:a,className:o("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",r),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));_s.displayName="DefaultErrorFallback";var PN=$s;var _f=Y.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date range",dateFormat:n="LLL dd, y",disabled:i=false,minDate:s,maxDate:l,numberOfMonths:d=2,className:m,align:u="start"},c)=>{let[g,p]=Y.useState(false),[x,y]=Y.useState(t),f=e!==void 0,h=f?e:x,R=v=>{f||y(v),r?.(v);},b=v=>{if(!v)return a;let{from:P,to:w}=v;return P&&w?`${format(P,n)} - ${format(w,n)}`:P?format(P,n):a};return jsxs(Ee,{open:g,onOpenChange:p,children:[jsx(_e,{asChild:true,children:jsxs(_,{ref:c,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!h?.from&&"text-muted-foreground",m),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),b(h)]})}),jsx(Te,{className:"w-auto p-0",align:u,children:jsx(Oa,{mode:"range",defaultMonth:h?.from,selected:h,onSelect:R,numberOfMonths:d,disabled:v=>!!(s&&v<s||l&&v>l),initialFocus:true})})]})});_f.displayName="DateRangePicker";var eo=e=>String(e).padStart(2,"0"),Kf=Y.forwardRef(({value:e,onValueChange:t,placeholder:r="Pick a time",use24Hour:a=true,minuteStep:n=1,disabled:i=false,className:s},l)=>{let[d,m]=Y.useState(false),u=a?Array.from({length:24},(b,v)=>v):Array.from({length:12},(b,v)=>v+1),c=Array.from({length:Math.floor(60/n)},(b,v)=>v*n),g=b=>{if(!b)return r;if(a)return `${eo(b.hours)}:${eo(b.minutes)}`;let v=b.hours%12||12,P=b.hours>=12?"PM":"AM";return `${eo(v)}:${eo(b.minutes)} ${P}`},p=b=>{let v=e?.minutes??0,P=b;if(!a&&e){let w=e.hours>=12;w&&b!==12?P=b+12:!w&&b===12&&(P=0);}t?.({hours:P,minutes:v});},x=b=>{let v=e?.hours??0;t?.({hours:v,minutes:b});},y=b=>{if(!e)return;let v=e.hours;b==="AM"&&e.hours>=12?v=e.hours-12:b==="PM"&&e.hours<12&&(v=e.hours+12),t?.({hours:v,minutes:e.minutes});},f=()=>{let b=new Date;t?.({hours:b.getHours(),minutes:b.getMinutes()});},h=e?e.hours>=12?"PM":"AM":void 0,R=e?a?e.hours:e.hours%12||12:void 0;return jsxs(Ee,{open:d,onOpenChange:m,children:[jsx(_e,{asChild:true,children:jsxs(_,{ref:l,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsx(Clock,{className:"mr-2 h-4 w-4"}),g(e)]})}),jsxs(Te,{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(Me,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:u.map(b=>jsx(_,{variant:R===b?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(b),children:eo(b)},b))})})]}),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(Me,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:c.map(b=>jsx(_,{variant:e?.minutes===b?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>x(b),children:eo(b)},b))})})]}),!a&&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(_,{variant:h==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>y("AM"),children:"AM"}),jsx(_,{variant:h==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>y("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(_,{variant:"ghost",size:"sm",onClick:f,children:"Now"}),jsx(_,{size:"sm",onClick:()=>m(false),children:"Done"})]})]})]})});Kf.displayName="TimePicker";var Yf=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function SN({className:e,variant:t,items:r,itemHeight:a,height:n,overscan:i=3,renderItem:s,getItemKey:l,gap:d=0,onScrollChange:m,...u},c){let g=Y.useRef(null),[p,x]=Y.useState(0);Y.useImperativeHandle(c,()=>g.current);let y=r.length*(a+d)-d,f=a+d,h=Math.max(0,Math.floor(p/f)-i),R=Math.ceil(n/f)+2*i,b=Math.min(r.length-1,h+R),v=w=>{let S=w.currentTarget.scrollTop;x(S),m?.(S);},P=Y.useMemo(()=>{let w=[];for(let S=h;S<=b;S++)r[S]!==void 0&&w.push({item:r[S],index:S,style:{position:"absolute",top:S*f,left:0,right:0,height:a}});return w},[r,h,b,f,a]);return jsx("div",{ref:g,className:o(Yf({variant:t,className:e})),style:{height:n,position:"relative"},onScroll:v,...u,children:jsx("div",{style:{height:y,position:"relative"},children:P.map(({item:w,index:S,style:C})=>jsx("div",{style:C,children:s(w,S)},l?l(w,S):S))})})}var kN=Y.forwardRef(SN);var Uf=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),js=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Xf=Y.forwardRef(({className:e,variant:t,size:r,children:a,onLoadMore:n,hasMore:i,isLoading:s=false,loader:l,threshold:d=100,rootMargin:m,useWindow:u=false,endMessage:c,...g},p)=>{let x=Y.useRef(null),y=Y.useRef(null),f=Y.useRef(false);Y.useImperativeHandle(p,()=>x.current),Y.useEffect(()=>{let R=y.current;if(!R)return;let b=new IntersectionObserver(v=>{let[P]=v;P.isIntersecting&&i&&!s&&!f.current&&(f.current=true,Promise.resolve(n()).finally(()=>{f.current=false;}));},{root:u?null:x.current,rootMargin:m||`${d}px`,threshold:0});return b.observe(R),()=>{b.disconnect();}},[i,s,n,d,m,u]);let h=jsx("div",{className:o(js({size:r})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:x,className:o(Uf({variant:t,className:e})),...g,children:[a,jsx("div",{ref:y,className:"h-px w-full"}),s&&(l||h),!i&&!s&&c&&jsx("div",{className:o(js({size:r}),"text-muted-foreground text-sm"),children:c})]})});Xf.displayName="InfiniteScroll";var _o=Y.forwardRef(({className:e,...t},r)=>jsx(Zf.Root,{ref:r,className:o(e),...t}));_o.displayName="VisuallyHidden";var IN={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},EN={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"},Qf=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"),Xs=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"}}),eg=Y.createContext({scrollBehavior:"inside"}),HN=()=>Y.useContext(eg),tg=Y.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a="Modal",children:n,hideCloseButton:i=false,isDismissable:s=true,isKeyboardDismissDisabled:l=false,backdrop:d="opaque",placement:m="center",scrollBehavior:u="inside",size:c,className:g},p)=>jsx(eg.Provider,{value:{scrollBehavior:u},children:jsxs(oe.Root,{open:e,onOpenChange:t,children:[r&&jsx(oe.Trigger,{asChild:true,children:r}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:o(Qf(),IN[d],u==="outside"&&"overflow-y-auto flex items-start justify-center py-4"),children:u==="outside"?jsxs(oe.Content,{ref:p,className:o("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",c==="xs"&&"w-full max-w-xs",c==="sm"&&"w-full max-w-sm",c==="md"&&"w-full max-w-md",c==="lg"&&"w-full max-w-lg",c==="xl"&&"w-full max-w-xl",c==="2xl"&&"w-full max-w-2xl",c==="3xl"&&"w-full max-w-3xl",c==="4xl"&&"w-full max-w-4xl",c==="5xl"&&"w-full max-w-5xl",c==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!c&&"w-full max-w-md",g),onEscapeKeyDown:l?x=>x.preventDefault():void 0,onPointerDownOutside:s?void 0:x=>x.preventDefault(),children:[jsx(_o,{children:jsx(oe.Title,{children:a})}),n,!i&&jsx(oe.Close,{asChild:true,children:jsxs(_,{variant:"light",size:"icon",radius:"full",className:"absolute right-2 top-2 h-8 w-8",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})})]}):null}),u==="inside"&&jsxs(oe.Content,{ref:p,className:o(Xs({size:c}),EN[m],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",g),onEscapeKeyDown:l?x=>x.preventDefault():void 0,onPointerDownOutside:s?void 0:x=>x.preventDefault(),children:[jsx(_o,{children:jsx(oe.Title,{children:a})}),n,!i&&jsx(oe.Close,{asChild:true,children:jsxs(_,{variant:"light",size:"icon",radius:"full",className:"absolute right-2 top-2 h-8 w-8",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})})]})]})]})}));tg.displayName="Modal";var AN=oe.Root,zN=oe.Trigger,rg=oe.Portal,FN=oe.Close,qs=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Overlay,{ref:r,className:o(Qf(),e),...t}));qs.displayName="ModalOverlay";var ag=Y.forwardRef(({className:e,children:t,size:r,showCloseButton:a=true,...n},i)=>jsxs(rg,{children:[jsx(qs,{}),jsxs(oe.Content,{ref:i,className:o(Xs({size:r}),e),...n,children:[t,a&&jsx(oe.Close,{asChild:true,children:jsxs(_,{variant:"light",size:"icon",radius:"full",className:"absolute right-2 top-2 h-8 w-8",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})})]})]}));ag.displayName="ModalContent";var og=({className:e,...t})=>jsx("div",{className:o("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});og.displayName="ModalHeader";var ng=({className:e,children:t})=>{let{scrollBehavior:r}=HN();return r==="inside"?jsx(Me,{className:o("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:o(e),children:t})};ng.displayName="ModalBody";var ig=({className:e,children:t,...r})=>jsx("div",{className:o("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r,children:Y.Children.map(t,a=>Y.isValidElement(a)?jsx(oe.Close,{asChild:true,children:a}):a)});ig.displayName="ModalFooter";var sg=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Title,{ref:r,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));sg.displayName="ModalTitle";var lg=Y.forwardRef(({className:e,...t},r)=>jsx(oe.Description,{ref:r,className:o("text-sm text-muted-foreground",e),...t}));lg.displayName="ModalDescription";var cg=cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),_N=cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),KN={default:HelpCircle,danger:XCircle,warning:AlertTriangle,success:CheckCircle,info:Info},Zs=Y.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,confirmText:i="Confirm",cancelText:s="Cancel",onConfirm:l,onCancel:d,showIcon:m=true,icon:u,variant:c="default",loading:g=false,disabled:p=false,className:x},y)=>{let[f,h]=Y.useState(false),R=KN[c||"default"],b=async()=>{if(l){let w=l();if(w instanceof Promise){h(true);try{await w;}finally{h(false);}}}},v=()=>{d?.();},P=g||f;return jsxs(ke.Root,{open:e,onOpenChange:t,children:[r&&jsx(ke.Trigger,{asChild:true,children:r}),jsxs(ke.Portal,{children:[jsx(ke.Overlay,{className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsxs(ke.Content,{ref:y,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",x),children:[jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[m&&jsx("div",{className:o(cg({variant:c})),children:u||jsx(R,{className:"h-6 w-6"})}),jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsx(ke.Title,{className:"text-lg font-semibold",children:a}),n&&jsx(ke.Description,{className:"text-sm text-muted-foreground",children:n})]})]}),jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsx(ke.Cancel,{className:o(Jt({variant:"bordered"})),onClick:v,disabled:P,children:s}),jsx(ke.Action,{className:o(Jt(),_N({variant:c}),P&&"opacity-50 cursor-not-allowed"),onClick:b,disabled:p||P,children:P?jsxs("span",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}),"Loading..."]}):i})]})]})]})]})});Zs.displayName="ConfirmDialog";function YN(){let[e,t]=Y.useState({open:false,options:null,resolve:null}),r=Y.useCallback(l=>new Promise(d=>{t({open:true,options:l,resolve:d});}),[]),a=Y.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),n=Y.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),i=Y.useCallback(l=>{l||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=Y.useMemo(()=>e.options?jsx(Zs,{open:e.open,onOpenChange:i,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:a,onCancel:n}):null,[e,a,n,i]);return {confirm:r,ConfirmDialog:s}}var rP=e=>e.map(t=>typeof t=="string"?{src:t}:t),Qs=Y.forwardRef(({images:e,open:t,onOpenChange:r,initialIndex:a=0,onIndexChange:n,trigger:i,showThumbnails:s=true,showZoom:l=true,showRotate:d=true,showDownload:m=true,showFullscreen:u=true,showNavigation:c=true,showCounter:g=true,closeOnBackdropClick:p=true,className:x},y)=>{let f=Y.useMemo(()=>rP(e),[e]),[h,R]=Y.useState(a),[b,v]=Y.useState(1),[P,w]=Y.useState(0),[S,C]=Y.useState(false),[M,N]=Y.useState(false),[T,k]=Y.useState({x:0,y:0}),[L,I]=Y.useState({x:0,y:0}),V=Y.useRef(null),D=f[h];Y.useEffect(()=>{R(a);},[a]),Y.useEffect(()=>{n?.(h);},[h,n]),Y.useEffect(()=>{v(1),w(0),k({x:0,y:0});},[h]);let E=Y.useCallback(()=>{R(z=>z>0?z-1:f.length-1);},[f.length]),B=Y.useCallback(()=>{R(z=>z<f.length-1?z+1:0);},[f.length]),W=()=>{v(z=>Math.min(z+.5,4));},H=()=>{v(z=>{let ee=Math.max(z-.5,.5);return ee===1&&k({x:0,y:0}),ee});},U=()=>{w(z=>(z+90)%360);},$=async()=>{if(D)try{let ee=await(await fetch(D.src)).blob(),J=URL.createObjectURL(ee),Xe=document.createElement("a");Xe.href=J,Xe.download=D.alt||`image-${h+1}`,document.body.appendChild(Xe),Xe.click(),document.body.removeChild(Xe),URL.revokeObjectURL(J);}catch{window.open(D.src,"_blank");}},Pe=async()=>{if(V.current)if(S)try{await document.exitFullscreen(),C(!1);}catch{}else try{await V.current.requestFullscreen(),C(!0);}catch{}},ie=z=>{b>1&&(N(true),I({x:z.clientX-T.x,y:z.clientY-T.y}));},F=z=>{M&&b>1&&k({x:z.clientX-L.x,y:z.clientY-L.y});},O=()=>{N(false);},A=Y.useCallback(z=>{switch(z.key){case "ArrowLeft":E();break;case "ArrowRight":B();break;case "Escape":r?.(false);break;case "+":case "=":W();break;case "-":H();break}},[E,B,r]);return Y.useEffect(()=>{if(t)return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[t,A]),Y.useEffect(()=>{let z=()=>{C(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",z),()=>document.removeEventListener("fullscreenchange",z)},[]),f.length===0?null:jsxs(oe.Root,{open:t,onOpenChange:r,children:[i&&jsx(oe.Trigger,{asChild:true,children:i}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{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",onClick:p?void 0:z=>z.stopPropagation()}),jsxs(oe.Content,{ref:y,className:o("fixed inset-0 z-50 flex flex-col outline-none",x),onPointerDownOutside:p?void 0:z=>z.preventDefault(),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[g&&f.length>1&&jsxs("span",{className:"text-sm",children:[h+1," / ",f.length]}),D?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:D.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[l&&jsxs(Fragment,{children:[jsx("button",{onClick:H,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(b*100),"%"]}),jsx("button",{onClick:W,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),d&&jsx("button",{onClick:U,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),m&&jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),u&&jsx("button",{onClick:Pe,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:S?"Exit fullscreen":"Fullscreen",children:S?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs(oe.Close,{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:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:ie,onMouseMove:F,onMouseUp:O,onMouseLeave:O,children:[c&&f.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:E,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:B,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:D?.src,alt:D?.alt||"",className:o("max-h-full max-w-full object-contain transition-transform duration-200",M?"cursor-grabbing":b>1?"cursor-grab":""),style:{transform:`translate(${T.x}px, ${T.y}px) scale(${b}) rotate(${P}deg)`},draggable:false})]}),D?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:D.description}),s&&f.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:f.map((z,ee)=>jsx("button",{onClick:()=>R(ee),className:o("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",h===ee?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:z.src,alt:z.alt||`Thumbnail ${ee+1}`,className:"h-full w-full object-cover"})},ee))})]})]})]})});Qs.displayName="ImageViewer";var mg=({children:e,images:t,index:r=0,className:a})=>{let[n,i]=Y.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>i(true),className:o("cursor-zoom-in",a),children:e}),jsx(Qs,{images:t,open:n,onOpenChange:i,initialIndex:r})]})};mg.displayName="ImageViewerTrigger";var fg=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),gg=Y.forwardRef(({className:e,variant:t,size:r,iconSize:a,...n},i)=>{let l=a??{sm:14,md:16,lg:20}[r??"md"];return jsx("button",{ref:i,type:"button",className:o(fg({variant:t,size:r}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:l,height:l}})})});gg.displayName="CloseButton";var vg=cva("inline-flex items-center justify-center rounded-md 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted hover:bg-muted/80"},size:{sm:"h-7 w-7",md:"h-9 w-9",lg:"h-11 w-11"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary text-primary-foreground hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/90"},{variant:"solid",color:"success",className:"bg-success text-success-foreground hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger text-danger-foreground hover:bg-danger/90"},{variant:"soft",color:"primary",className:"bg-primary/10 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary/10 text-secondary-foreground hover:bg-secondary/20"},{variant:"soft",color:"success",className:"bg-success/10 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/10 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/10 text-danger hover:bg-danger/20"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"}],defaultVariants:{variant:"ghost",size:"md",color:"default",radius:"md"}}),hg=Y.forwardRef(({className:e,variant:t,size:r,color:a,radius:n,loading:i,disabled:s,children:l,...d},m)=>jsx("button",{ref:m,type:"button",className:o(vg({variant:t,size:r,color:a,radius:n}),e),disabled:s||i,...d,children:i?jsxs("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"1em",height:"1em"},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"})]}):l}));hg.displayName="ActionIcon";var Rg=({children:e,container:t,disabled:r=false})=>{let[a,n]=Y.useState(false);if(Y.useEffect(()=>{n(true);},[]),r||!a)return jsx(Fragment,{children:e});let i=null;return typeof t=="string"?i=document.querySelector(t):t instanceof Element?i=t:i=document.body,i?createPortal(e,i):jsx(Fragment,{children:e})};Rg.displayName="Portal";var wg=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),Ng=Y.forwardRef(({className:e,color:t,size:r,position:a,ping:n,content:i,show:s=true,offset:l,style:d,...m},u)=>{if(!s)return null;let c=i!=null;return jsxs("span",{ref:u,className:o(wg({color:t,size:c?void 0:r,position:a,ping:n}),c&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...d,...l!==void 0&&{transform:`translate(${a?.includes("right")?l:-l}px, ${a?.includes("top")?-l:l}px)`}},...m,children:[n&&jsx("span",{className:o("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),i]})});Ng.displayName="Indicator";var Pg=Y.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:o("relative inline-flex",e),...r,children:t}));Pg.displayName="IndicatorWrapper";var Mg=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),Tg=Y.forwardRef(({className:e,orientation:t,size:r,hideScrollbar:a=false,shadowColor:n="rgba(0, 0, 0, 0.1)",children:i,...s},l)=>{let d=Y.useRef(null),[m,u]=Y.useState({top:false,bottom:false,left:false,right:false});Y.useImperativeHandle(l,()=>d.current);let c=Y.useCallback(()=>{let h=d.current;if(!h)return;let{scrollTop:R,scrollLeft:b,scrollHeight:v,scrollWidth:P,clientHeight:w,clientWidth:S}=h;u({top:R>0,bottom:R<v-w-1,left:b>0,right:b<P-S-1});},[]);Y.useEffect(()=>{let h=d.current;if(h)return c(),h.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{h.removeEventListener("scroll",c),window.removeEventListener("resize",c);}},[c]);let p={sm:"20px",md:"40px",lg:"60px"}[r??"md"],x=t==="vertical"||t==="both",y=t==="horizontal"||t==="both",f={maskImage:[x&&m.top&&`linear-gradient(to bottom, transparent, black ${p})`,x&&m.bottom&&`linear-gradient(to top, transparent, black ${p})`,y&&m.left&&`linear-gradient(to right, transparent, black ${p})`,y&&m.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:d,className:o(Mg({orientation:t,size:r}),a&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:f,...s,children:i})});Tg.displayName="ScrollShadow";var Sg=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",outline:"rounded border border-border 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"}}),pP={cmd:"\u2318",command:"\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"},fP=e=>{let t=e.toLowerCase();return pP[t]||e.toUpperCase()},kg=Y.forwardRef(({className:e,variant:t,size:r,keys:a,children:n,...i},s)=>{let l=()=>a?(Array.isArray(a)?a:[a]).map((m,u)=>jsxs(Y.Fragment,{children:[u>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:fP(m)})]},u)):n;return jsx("kbd",{ref:s,className:o(Sg({variant:t,size:r}),e),...i,children:l()})});kg.displayName="Kbd";var Lg=Y.forwardRef(({className:e,size:t,axis:r="both",style:a,...n},i)=>{let s=typeof t=="number"?`${t}px`:t,l={...a,...t?{width:r==="vertical"?void 0:s,height:r==="horizontal"?void 0:s,minWidth:r==="vertical"?void 0:s,minHeight:r==="horizontal"?void 0:s,flexShrink:0}:{flex:"1 1 auto"}};return jsx("div",{ref:i,"aria-hidden":"true",className:o(e),style:l,...n})});Lg.displayName="Spacer";var Vg=cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Ig=Y.forwardRef(({className:e,variant:t,size:r,value:a,successDuration:n=2e3,onCopySuccess:i,onCopyError:s,copyIcon:l,successIcon:d,...m},u)=>{let[c,g]=Y.useState(false),p={sm:14,md:16,lg:20}[r??"md"],x=async()=>{try{await navigator.clipboard.writeText(a),g(!0),i?.(),setTimeout(()=>{g(!1);},n);}catch(y){s?.(y);}};return jsx("button",{ref:u,type:"button",className:o(Vg({variant:t,size:r}),e),onClick:x,"aria-label":c?"Copied":"Copy to clipboard",...m,children:c?d??jsx(Check,{className:"text-success",style:{width:p,height:p}}):l??jsx(Copy,{style:{width:p,height:p}})})});Ig.displayName="CopyButton";var Hg=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),NP=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],PP=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function CP(e,t,r){let a=new Date(e,t,1),n=new Date(e,t+1,0),i=[],s=a.getDay()-r;s<0&&(s+=7);for(let d=s-1;d>=0;d--)i.push(new Date(e,t,-d));for(let d=1;d<=n.getDate();d++)i.push(new Date(e,t,d));let l=42-i.length;for(let d=1;d<=l;d++)i.push(new Date(e,t+1,d));return i}function MP(e,t){let r=[],n=e.getDay()-t;n<0&&(n+=7);let i=new Date(e);i.setDate(e.getDate()-n);for(let s=0;s<7;s++){let l=new Date(i);l.setDate(i.getDate()+s),r.push(l);}return r}function ni(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function oi(e){return ni(e,new Date)}function Eg(e,t){return e.filter(r=>{let a=new Date(r.start),n=new Date(r.end);return ni(a,t)||ni(n,t)||a<t&&n>t})}var Ag=Y.forwardRef(({className:e,variant:t,size:r,events:a=[],view:n="month",onViewChange:i,date:s,onDateChange:l,onEventClick:d,onSlotClick:m,weekStartsOn:u=0,locale:c="en-US",...g},p)=>{let[x,y]=Y.useState(new Date),f=s??x,h=N=>{l?l(N):y(N);},R=u===1?PP:NP,b=()=>{let N=new Date(f);n==="month"?N.setMonth(N.getMonth()-1):n==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),h(N);},v=()=>{let N=new Date(f);n==="month"?N.setMonth(N.getMonth()+1):n==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),h(N);},P=()=>{h(new Date);},w=()=>n==="day"?f.toLocaleDateString(c,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):f.toLocaleDateString(c,{year:"numeric",month:"long"}),S=()=>{let N=CP(f.getFullYear(),f.getMonth(),u);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:R.map(T=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:T},T))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((T,k)=>{let L=Eg(a,T),I=T.getMonth()===f.getMonth();return jsxs("div",{className:o("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!I&&"bg-muted/30"),onClick:()=>m?.(T),children:[jsx("div",{className:o("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",oi(T)&&"bg-primary text-primary-foreground",!I&&"text-muted-foreground"),children:T.getDate()}),jsxs("div",{className:"space-y-0.5",children:[L.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:D=>{D.stopPropagation(),d?.(V);},children:V.title},V.id)),L.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",L.length-3," more"]})]})]},k)})})]})},C=()=>{let N=MP(f,u),T=Array.from({length:24},(k,L)=>L);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((k,L)=>jsxs("div",{className:o("p-2 text-center border-l",oi(k)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:R[L]}),jsx("div",{className:o("text-lg font-semibold",oi(k)&&"text-primary"),children:k.getDate()})]},L))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:T.map(k=>jsxs(Y.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[k.toString().padStart(2,"0"),":00"]}),N.map((L,I)=>{let V=new Date(L);V.setHours(k,0,0,0);let D=a.filter(E=>{let B=new Date(E.start);return ni(B,L)&&B.getHours()===k});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(V),children:D.map(E=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:E.color||"hsl(var(--primary))",color:"white"},onClick:B=>{B.stopPropagation(),d?.(E);},children:E.title},E.id))},I)})]},k))})})]})},M=()=>{let N=Array.from({length:24},(k,L)=>L),T=Eg(a,f);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:o("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",oi(f)&&"bg-primary text-primary-foreground"),children:f.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(k=>{let L=new Date(f);L.setHours(k,0,0,0);let I=T.filter(V=>new Date(V.start).getHours()===k);return jsxs(Y.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[k.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(L),children:I.map(V=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:D=>{D.stopPropagation(),d?.(V);},children:V.title},V.id))})]},k)})})})]})};return jsxs("div",{ref:p,className:o(Hg({variant:t,size:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(_,{variant:"bordered",size:"sm",onClick:P,children:"Today"}),jsx(_,{variant:"ghost",size:"icon",onClick:b,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(_,{variant:"ghost",size:"icon",onClick:v,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:w()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsx(_,{variant:n===N?"solid":"ghost",size:"sm",onClick:()=>i?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),n==="month"&&S(),n==="week"&&C(),n==="day"&&M()]})});Ag.displayName="FullCalendar";var Yo=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),jo=["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%))"],zg=Y.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=jo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",curveType:m="monotone",...u},c)=>jsx("div",{ref:c,className:o(Yo({size:t,className:e})),...u,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:r,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),a.map((g,p)=>jsx(Line,{type:m,dataKey:g,stroke:n[p%n.length],strokeWidth:2,dot:{fill:n[p%n.length],strokeWidth:0},activeDot:{r:6}},g))]})})}));zg.displayName="LineChart";var Fg=Y.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=jo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,layout:u="horizontal",...c},g)=>jsx("div",{ref:g,className:o(Yo({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:r,layout:u,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:u==="horizontal"?d:void 0,type:u==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:u==="vertical"?d:void 0,type:u==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),a.map((p,x)=>jsx(Bar,{dataKey:p,fill:n[x%n.length],stackId:m?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Fg.displayName="BarChart";var Bg=Y.forwardRef(({className:e,size:t,data:r,dataKey:a="value",nameKey:n="name",colors:i=jo,innerRadius:s=0,outerRadius:l=80,showLegend:d=true,showTooltip:m=true,showLabels:u=false,...c},g)=>jsx("div",{ref:g,className:o(Yo({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[m&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),d&&jsx(Legend,{}),jsx(Pie,{data:r,dataKey:a,nameKey:n,cx:"50%",cy:"50%",innerRadius:s,outerRadius:l,label:u,labelLine:u,children:r.map((p,x)=>jsx(Cell,{fill:i[x%i.length]},`cell-${x}`))})]})})}));Bg.displayName="PieChart";var Og=Y.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=jo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,curveType:u="monotone",...c},g)=>jsx("div",{ref:g,className:o(Yo({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:r,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),a.map((p,x)=>jsx(Area,{type:u,dataKey:p,stroke:n[x%n.length],fill:n[x%n.length],fillOpacity:.3,stackId:m?"stack":void 0},p))]})})}));Og.displayName="AreaChart";var $g=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"}}),_g=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"}}),ll=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function XP({card:e,columnId:t,variant:r,renderCard:a,onCardClick:n}){let{attributes:i,listeners:s,setNodeRef:l,transform:d,transition:m,isDragging:u}=useSortable({id:e.id,data:{columnId:t}}),c={transform:CSS.Transform.toString(d),transition:m};return jsx("div",{ref:l,style:c,className:o(ll({variant:r,isDragging:u})),onClick:()=>n?.(e,t),...i,...s,children:a?a(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 qP({column:e,variant:t,renderCard:r,onCardClick:a,onAddCard:n,showAddCard:i,columnHeight:s}){return jsxs("div",{className:o(_g({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})]}),i&&jsx(_,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>n?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(Me,{style:{height:s},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(XP,{card:l,columnId:e.id,variant:t,renderCard:r,onCardClick:a},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 Kg=Y.forwardRef(({className:e,variant:t,columns:r,onCardMove:a,onCardClick:n,onAddCard:i,renderCard:s,showAddCard:l=true,columnHeight:d=500,...m},u)=>{let[c,g]=Y.useState(null),[p,x]=Y.useState(null),y=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),f=v=>r.find(P=>P.cards.some(w=>w.id===v));return jsxs(DndContext,{sensors:y,collisionDetection:closestCorners,onDragStart:v=>{let{active:P}=v,w=f(P.id);if(w){let S=w.cards.find(C=>C.id===P.id);S&&(g(S),x(w.id));}},onDragOver:v=>{let{active:P,over:w}=v;if(!w)return;let S=P.id,C=w.id,M=f(S),N=f(C)||r.find(L=>L.id===C);if(!M||!N||M.id===N.id)return;let T=N.cards.findIndex(L=>L.id===C),k=T===-1?N.cards.length:T;a?.(S,M.id,N.id,k);},onDragEnd:v=>{let{active:P,over:w}=v;if(w&&P.id!==w.id){let S=f(P.id),C=f(w.id)||r.find(M=>M.id===w.id);if(S&&C){let M=C.cards.findIndex(T=>T.id===w.id),N=M===-1?C.cards.length:M;a?.(P.id,S.id,C.id,N);}}g(null),x(null);},children:[jsx("div",{ref:u,className:o($g({variant:t,className:e})),...m,children:r.map(v=>jsx(qP,{column:v,variant:t,renderCard:s,onCardClick:n,onAddCard:i,showAddCard:l,columnHeight:d},v.id))}),jsx(DragOverlay,{children:c&&p&&jsx("div",{className:o(ll({variant:t,isDragging:true})),children:s?s(c,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:c.title}),c.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:c.description})]})]})})})]})});Kg.displayName="KanbanBoard";var Yg=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),jg=Y.createContext(null);function dl(){let e=Y.useContext(jg);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Ug=Y.forwardRef(({className:e,variant:t,children:r,opts:a,plugins:n,orientation:i="horizontal",showArrows:s=true,showDots:l=true,setApi:d,...m},u)=>{let[c,g]=ZP({...a,axis:i==="horizontal"?"x":"y"},n),[p,x]=Y.useState(false),[y,f]=Y.useState(false),[h,R]=Y.useState(0),[b,v]=Y.useState([]),P=Y.useCallback(N=>{N&&(R(N.selectedScrollSnap()),x(N.canScrollPrev()),f(N.canScrollNext()));},[]),w=Y.useCallback(()=>{g?.scrollPrev();},[g]),S=Y.useCallback(()=>{g?.scrollNext();},[g]),C=Y.useCallback(N=>{g?.scrollTo(N);},[g]),M=Y.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),w()):N.key==="ArrowRight"&&(N.preventDefault(),S());},[w,S]);return Y.useEffect(()=>{!g||!d||d(g);},[g,d]),Y.useEffect(()=>{if(g)return v(g.scrollSnapList()),P(g),g.on("reInit",P),g.on("select",P),()=>{g?.off("select",P);}},[g,P]),jsx(jg.Provider,{value:{carouselRef:c,api:g,scrollPrev:w,scrollNext:S,canScrollPrev:p,canScrollNext:y,selectedIndex:h,scrollSnaps:b,scrollTo:C},children:jsxs("div",{ref:u,className:o(Yg({variant:t,className:e})),onKeyDownCapture:M,role:"region","aria-roledescription":"carousel",...m,children:[jsx("div",{ref:c,className:"overflow-hidden",children:jsx("div",{className:o("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:r})}),s&&jsxs(Fragment,{children:[jsx(cl,{}),jsx(ml,{})]}),l&&b.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:b.map((N,T)=>jsx("button",{className:o("w-2 h-2 rounded-full transition-all",T===h?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>C(T),"aria-label":`Go to slide ${T+1}`},T))})]})})});Ug.displayName="Carousel";var Xg=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex",e),...t}));Xg.displayName="CarouselContent";var qg=Y.forwardRef(({className:e,basis:t="basis-full",...r},a)=>jsx("div",{ref:a,role:"group","aria-roledescription":"slide",className:o("min-w-0 shrink-0 grow-0 pl-4",t,e),...r}));qg.displayName="CarouselItem";var cl=Y.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollPrev:i,canScrollPrev:s}=dl();return jsxs(_,{ref:n,variant:t,size:r,className:o("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...a,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});cl.displayName="CarouselPrevious";var ml=Y.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollNext:i,canScrollNext:s}=dl();return jsxs(_,{ref:n,variant:t,size:r,className:o("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...a,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});ml.displayName="CarouselNext";var Zg=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"}}),mi={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"}},pl={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}"]},Jg=Y.forwardRef(({className:e,size:t,onEmojiSelect:r,recentEmojis:a=[],defaultCategory:n="smileys",showSearch:i=true,showCategories:s=true,...l},d)=>{let[m,u]=Y.useState(a.length>0?"recent":n),[c,g]=Y.useState(""),x=c?Object.values(pl).flat().filter(f=>f.toLowerCase().includes(c.toLowerCase())):m==="recent"?a:pl[m]||[],y=f=>{r?.(f);};return jsxs("div",{ref:d,className:o(Zg({size:t,className:e})),...l,children:[i&&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(gn,{placeholder:"Search emojis...",value:c,onChange:f=>g(f.target.value),className:"pl-8 h-8"})]})}),s&&!c&&jsx("div",{className:"flex border-b px-1",children:Object.entries(mi).map(([f,{icon:h}])=>f==="recent"&&a.length===0?null:jsx("button",{className:o("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",m===f&&"bg-accent"),onClick:()=>u(f),title:mi[f].name,children:h},f))}),!c&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:mi[m].name}),jsx(Me,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[x.map((f,h)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>y(f),children:f},`${f}-${h}`)),x.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Jg.displayName="EmojiPicker";var Qg=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),kC=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"}}),DC=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"}}),De=({icon:e,title:t,isActive:r,onClick:a,disabled:n})=>jsxs(oa,{children:[jsx(na,{asChild:true,children:jsx(_,{type:"button",variant:r?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:a,disabled:n,children:e})}),jsx(Dr,{side:"top",className:"text-xs",children:t})]}),eb=Y.forwardRef(({className:e,variant:t,size:r,value:a="",onChange:n,placeholder:i="Start writing...",readOnly:s=false,showToolbar:l=true,minHeight:d,maxHeight:m,onEditorReady:u,...c},g)=>{let p=useEditor({extensions:[iC.configure({heading:{levels:[1,2,3]}}),sC.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),lC,dC.configure({types:["heading","paragraph"]}),cC.configure({placeholder:i})],content:a,editable:!s,onUpdate:({editor:y})=>{n?.(y.getHTML());},onCreate:({editor:y})=>{u?.(y);}});Y.useEffect(()=>{p&&a!==p.getHTML()&&p.commands.setContent(a);},[a,p]),Y.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let x=()=>{if(!p)return;let y=p.getAttributes("link").href,f=window.prompt("URL",y);if(f!==null){if(f===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:f}).run();}};return p?jsx(aa,{children:jsxs("div",{ref:g,className:o(Qg({variant:t,size:r,className:e})),...c,children:[l&&!s&&jsxs("div",{className:o(kC({size:r})),children:[jsx(De,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(De,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(De,{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(De,{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(De,{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(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(De,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(De,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(De,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(De,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(De,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(De,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(De,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(De,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(De,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(De,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(De,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(De,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:x}),jsx(De,{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:o(DC({size:r})),style:{minHeight:d,maxHeight:m}})]})}):null});eb.displayName="RichTextEditor";var rb=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function FC(e,t,r){return centerCrop(makeAspectCrop({unit:"%",width:90},r,e,t),e,t)}async function tb(e,t,r=0,a=1){let n=document.createElement("canvas"),i=n.getContext("2d");if(!i)return null;let s=e.naturalWidth/e.width,l=e.naturalHeight/e.height,d=window.devicePixelRatio||1;n.width=Math.floor(t.width*s*d),n.height=Math.floor(t.height*l*d),i.scale(d,d),i.imageSmoothingQuality="high";let m=t.x*s,u=t.y*l,c=r*Math.PI/180,g=e.naturalWidth/2,p=e.naturalHeight/2;return i.save(),i.translate(-m,-u),i.translate(g,p),i.rotate(c),i.scale(a,a),i.translate(-g,-p),i.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),i.restore(),new Promise(x=>{n.toBlob(y=>{x(y);},"image/png");})}var ab=Y.forwardRef(({className:e,variant:t,src:r,aspectRatio:a,onCropChange:n,onCropComplete:i,showZoom:s=true,showRotation:l=true,minZoom:d=1,maxZoom:m=3,circularCrop:u=false,initialCrop:c,...g},p)=>{let x=Y.useRef(null),[y,f]=Y.useState(),[h,R]=Y.useState(),[b,v]=Y.useState(1),[P,w]=Y.useState(0),S=T=>{let{width:k,height:L}=T.currentTarget;if(a){let I=FC(k,L,a);f(I);}else f(c||{unit:"%",x:10,y:10,width:80,height:80});},C=T=>{f(T),n?.(T);},M=async T=>{if(R(T),i&&x.current&&T.width&&T.height){let k=await tb(x.current,T,P,b);i(k);}},N=()=>{w(T=>(T+90)%360);};return Y.useEffect(()=>{h&&x.current&&i&&tb(x.current,h,P,b).then(T=>{i(T);});},[b,P,h,i]),jsxs("div",{ref:p,className:o(rb({variant:t,className:e})),...g,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(LC,{crop:y,onChange:C,onComplete:M,aspect:a,circularCrop:u,className:"max-h-[400px]",children:jsx("img",{ref:x,src:r,alt:"Crop preview",onLoad:S,style:{transform:`scale(${b}) rotate(${P}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(Nn,{value:[b],onValueChange:([T])=>v(T),min:d,max:m,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),l&&jsx(_,{variant:"bordered",size:"icon",onClick:N,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});ab.displayName="ImageCropper";var vl=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"}}),GC={sm:96,md:128,lg:192},nb=Y.forwardRef(({className:e,variant:t,size:r,value:a,qrSize:n,fgColor:i="currentColor",bgColor:s="transparent",level:l="M",includeMargin:d=false,title:m,logo:u,logoSize:c=40,logoPadding:g=4,logoBackgroundColor:p="white",...x},y)=>{let f=n??GC[r??"md"];return a?jsx("div",{ref:y,className:o(vl({variant:t,size:r,className:e})),...x,children:jsxs("div",{className:"relative inline-block",children:[jsx(BC,{value:a,size:f,fgColor:i,bgColor:s,level:l,title:m,style:{padding:d?16:0}}),u&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:g,backgroundColor:p},children:jsx("img",{src:u,alt:"Logo",style:{width:c,height:c,objectFit:"contain"}})})]})}):jsx("div",{ref:y,className:o(vl({variant:t,size:r,className:e})),...x,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:f,height:f},children:"No data"})})});nb.displayName="QRCode";var ib=({children:e,defaultTheme:t="system",storageKey:r="reever-ui-theme",enableSystem:a=true,disableTransitionOnChange:n=false,attribute:i="class",forcedTheme:s,themes:l=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:r,enableSystem:a,disableTransitionOnChange:n,attribute:i,forcedTheme:s,themes:l,children:e});ib.displayName="ThemeProvider";var UC=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),sb=Y.forwardRef(({className:e,variant:t="ghost",size:r="md",mode:a="dropdown"},n)=>{let{theme:i,setTheme:s,resolvedTheme:l}=useTheme(),[d,m]=Y.useState(false);Y.useEffect(()=>{m(true);},[]);let u=()=>{let c=["light","dark","system"],p=(c.indexOf(i||"system")+1)%c.length;s(c[p]);};return d?a==="cycle"?jsxs(_,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),onClick:u,children:[l==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(ia,{children:[jsx(sa,{asChild:true,children:jsxs(_,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",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(Lr,{align:"end",children:[jsxs(Lt,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs(Lt,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs(Lt,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(_,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});sb.displayName="ThemeToggle";var db=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),cb=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),mb=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"}}),ub=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,startContent:c,endContent:g,id:p,...x},y)=>{let f=Y.useId(),h=p||f,R=`${h}-description`,b=`${h}-error`,v=i&&a;return jsxs("div",{className:o(db({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:h,className:o(mb({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[c&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:c}),jsx("input",{ref:y,id:h,"aria-invalid":i,"aria-describedby":v?b:r?R:void 0,"aria-required":n,className:o(cb({size:s,isInvalid:i}),c&&"pl-10",g&&"pr-10",d),...x}),g&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:g})]}),r&&!v&&jsx("p",{id:R,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),v&&jsx("p",{id:b,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});ub.displayName="TextField";var bb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZC=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}}),pb=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"}}),fb=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),JC=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"}}),vb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,min:c,max:g,step:p=1,value:x,defaultValue:y,onChange:f,showButtons:h=true,formatOptions:R,fullWidth:b=false,disabled:v,id:P,...w},S)=>{let C=Y.useId(),M=P||C,N=`${M}-description`,T=`${M}-error`,[k,L]=Y.useState(y),[I,V]=Y.useState(false),D=x!==void 0?x:k,E=i&&a,B=Y.useCallback(O=>{O!==void 0&&(c!==void 0&&O<c&&(O=c),g!==void 0&&O>g&&(O=g)),x===void 0&&L(O),f?.(O);},[x,c,g,f]),W=()=>{let O=(D??0)+p;B(O);},H=()=>{let O=(D??0)-p;B(O);},U=O=>{let A=O.target.value;if(A==="")B(void 0);else {let z=parseFloat(A);isNaN(z)||B(z);}},$=O=>{O.key==="ArrowUp"?(O.preventDefault(),W()):O.key==="ArrowDown"&&(O.preventDefault(),H());},Pe=Y.useMemo(()=>D===void 0?"":R?new Intl.NumberFormat(void 0,R).format(D):D.toString(),[D,R]),ie=c!==void 0&&D!==void 0&&D<=c,F=g!==void 0&&D!==void 0&&D>=g;return jsxs("div",{className:o(bb({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:M,className:o(JC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx("button",{type:"button",onClick:H,disabled:v||ie,className:o(pb({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:o(fb({size:s}))})}),jsx("input",{ref:S,id:M,type:"text",inputMode:"decimal",value:Pe,onChange:U,onKeyDown:$,onFocus:()=>V(true),onBlur:()=>V(false),"aria-invalid":i,"aria-describedby":E?T:r?N:void 0,"aria-required":n,"aria-valuemin":c,"aria-valuemax":g,"aria-valuenow":D,disabled:v,className:o(ZC({size:s,isInvalid:i,fullWidth:b}),!h&&"px-3",d),style:{borderColor:I?"var(--color-foreground)":void 0},...w}),h&&jsx("button",{type:"button",onClick:W,disabled:v||F,className:o(pb({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:o(fb({size:s}))})})]}),r&&!E&&jsx("p",{id:N,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),E&&jsx("p",{id:T,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});vb.displayName="NumberField";var yb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),tM=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),hb=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"}}),rM=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"}}),aM=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"}}),Rb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="",onChange:p,onClear:x,onSearch:y,showClearButton:f=true,showSearchIcon:h=true,disabled:R,placeholder:b="Search...",id:v,...P},w)=>{let S=Y.useId(),C=v||S,M=`${C}-description`,N=`${C}-error`,[T,k]=Y.useState(g),L=c!==void 0?c:T,I=i&&a,V=L.length>0,D=W=>{let H=W.target.value;c===void 0&&k(H),p?.(H);},E=()=>{c===void 0&&k(""),p?.(""),x?.();},B=W=>{W.key==="Enter"?(W.preventDefault(),y?.(L)):W.key==="Escape"&&V&&(W.preventDefault(),E());};return jsxs("div",{className:o(yb({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:C,className:o(rM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Search,{className:o(hb({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:w,id:C,type:"search",value:L,onChange:D,onKeyDown:B,placeholder:b,"aria-invalid":i,"aria-describedby":I?N:r?M:void 0,"aria-required":n,disabled:R,className:o(tM({size:s,isInvalid:i}),!h&&"pl-3",!f&&"pr-3",d),...P}),f&&V&&!R&&jsx("button",{type:"button",onClick:E,className:o(aM({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:o(hb({size:s}))})})]}),r&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),I&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Rb.displayName="SearchField";var Nb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),nM=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),iM=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"}}),sM=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"}}),Nl=(e,t="yyyy-MM-dd")=>{if(!e)return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",a).replace("dd",n)},lM=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},Pb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minDate:x,maxDate:y,dateFormat:f="yyyy-MM-dd",showIcon:h=true,fullWidth:R=false,disabled:b,id:v,...P},w)=>{let S=Y.useId(),C=v||S,M=`${C}-description`,N=`${C}-error`,T=Y.useRef(null),k=w||T,[L,I]=Y.useState(g??null),[V,D]=Y.useState(false),E=()=>{!b&&k.current&&k.current.showPicker?.();},B=c!==void 0?c:L,W=i&&a,H=ie=>{let F=lM(ie.target.value);c===void 0&&I(F),p?.(F);},U=B?Nl(B,"yyyy-MM-dd"):"",$=x?Nl(x,"yyyy-MM-dd"):void 0,Pe=y?Nl(y,"yyyy-MM-dd"):void 0;return jsxs("div",{className:o(Nb({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:C,className:o(sM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:o("relative",R?"w-full":"w-fit"),children:[jsx("input",{ref:k,id:C,type:"date",value:U,onChange:H,onFocus:()=>D(true),onBlur:()=>D(false),min:$,max:Pe,"aria-invalid":i,"aria-describedby":W?N:r?M:void 0,"aria-required":n,disabled:b,className:o(nM({size:s,isInvalid:i,fullWidth:R}),!h&&"pr-3",d),style:{borderColor:V?"var(--color-foreground)":void 0},...P}),h&&jsx("button",{type:"button",onClick:E,disabled:b,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:o(iM({size:s}))})})]}),r&&!W&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),W&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Pb.displayName="DateField";var Mb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),dM=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}}),cM=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"}}),Tb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minTime:x,maxTime:y,showSeconds:f=false,hourCycle:h=24,disabled:R,fullWidth:b=false,id:v,...P},w)=>{let S=Y.useId(),C=v||S,M=`${C}-description`,N=`${C}-error`,T=Y.useRef(null),k=Y.useRef(null),L=Y.useRef(null),I=Y.useRef(null),[V,D]=Y.useState(g??null),E=c!==void 0?c:V,B=i&&a,W=G=>h===24?G:G===0?12:G>12?G-12:G,H=G=>G>=12?"PM":"AM",U=(G,Q)=>Q==="AM"?G===12?0:G:G===12?12:G+12,[$,Pe]=Y.useState(E?String(W(E.hour)).padStart(2,"0"):""),[ie,F]=Y.useState(E?String(E.minute).padStart(2,"0"):""),[O,A]=Y.useState(E?.second!==void 0?String(E.second).padStart(2,"0"):""),[z,ee]=Y.useState(E?H(E.hour):"AM"),[J,Xe]=Y.useState(false);Y.useEffect(()=>{c!==void 0&&(c?(Pe(String(W(c.hour)).padStart(2,"0")),F(String(c.minute).padStart(2,"0")),c.second!==void 0&&A(String(c.second).padStart(2,"0")),ee(H(c.hour))):(Pe(""),F(""),A("")));},[c,h]);let nt=(G,Q,Ve,qt)=>{let ue=parseInt(G,10),ht=parseInt(Q,10),Zt=f?parseInt(Ve,10):void 0;if(isNaN(ue)||isNaN(ht)||f&&isNaN(Zt)){c===void 0&&D(null),p?.(null);return}let Jl={hour:h===12?U(ue,qt):ue,minute:ht,...f&&Zt!==void 0&&{second:Zt}};c===void 0&&D(Jl),p?.(Jl);},Cx=G=>{let Q=G.target.value.replace(/\D/g,"").slice(0,2);Pe(Q);let Ve=h===24?23:12,qt=h===24?0:1;if(Q.length===2){let ue=parseInt(Q,10);ue>=qt&&ue<=Ve&&(k.current?.focus(),k.current?.select());}},Mx=G=>{let Q=G.target.value.replace(/\D/g,"").slice(0,2);if(F(Q),Q.length===2){let Ve=parseInt(Q,10);Ve>=0&&Ve<=59&&(f?(L.current?.focus(),L.current?.select()):h===12&&I.current?.focus());}},Tx=G=>{let Q=G.target.value.replace(/\D/g,"").slice(0,2);A(Q),Q.length===2&&h===12&&I.current?.focus();},Sx=()=>{if($){let G=parseInt($,10),Q=h===24?23:12,qt=Math.min(Math.max(G,h===24?0:1),Q),ue=String(qt).padStart(2,"0");Pe(ue),nt(ue,ie,O,z);}},kx=()=>{if(ie){let G=parseInt(ie,10),Q=Math.min(Math.max(G,0),59),Ve=String(Q).padStart(2,"0");F(Ve),nt($,Ve,O,z);}},Dx=()=>{if(O){let G=parseInt(O,10),Q=Math.min(Math.max(G,0),59),Ve=String(Q).padStart(2,"0");A(Ve),nt($,ie,Ve,z);}},Zl=()=>{let G=z==="AM"?"PM":"AM";ee(G),nt($,ie,O,G);},Lx=G=>{let Q=G.key.toLowerCase();Q==="a"?(G.preventDefault(),z!=="AM"&&(ee("AM"),nt($,ie,O,"AM"))):Q==="p"?(G.preventDefault(),z!=="PM"&&(ee("PM"),nt($,ie,O,"PM"))):Q==="arrowup"||Q==="arrowdown"?(G.preventDefault(),Zl()):Q==="arrowleft"&&(G.preventDefault(),f?(L.current?.focus(),L.current?.select()):(k.current?.focus(),k.current?.select()));},$i=(G,Q)=>{if(G.key==="ArrowUp"||G.key==="ArrowDown"){G.preventDefault();let Ve=G.key==="ArrowUp"?1:-1;if(Q==="hour"){let qt=parseInt($,10)||0,ue=h===24?23:12,ht=h===24?0:1,Zt=qt+Ve;Zt>ue&&(Zt=ht),Zt<ht&&(Zt=ue);let Ki=String(Zt).padStart(2,"0");Pe(Ki),nt(Ki,ie,O,z);}else if(Q==="minute"){let ue=(parseInt(ie,10)||0)+Ve;ue>59&&(ue=0),ue<0&&(ue=59);let ht=String(ue).padStart(2,"0");F(ht),nt($,ht,O,z);}else if(Q==="second"){let ue=(parseInt(O,10)||0)+Ve;ue>59&&(ue=0),ue<0&&(ue=59);let ht=String(ue).padStart(2,"0");A(ht),nt($,ie,ht,z);}}G.key==="ArrowRight"&&(G.preventDefault(),Q==="hour"?(k.current?.focus(),k.current?.select()):Q==="minute"&&f?(L.current?.focus(),L.current?.select()):(Q==="minute"&&!f&&h===12||Q==="second"&&h===12)&&I.current?.focus()),G.key==="ArrowLeft"&&(G.preventDefault(),Q==="minute"?(T.current?.focus(),T.current?.select()):Q==="second"&&(k.current?.focus(),k.current?.select())),G.key==="Backspace"&&G.currentTarget.value===""&&(Q==="minute"?T.current?.focus():Q==="second"&&k.current?.focus());},_i=o((()=>{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",R&&"cursor-not-allowed");return jsxs("div",{ref:w,className:o(Mb({size:s}),e),...P,children:[t&&jsxs(Zi.Root,{htmlFor:C,className:o(cM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:o(dM({size:s,isInvalid:i,disabled:R,fullWidth:b}),d),style:{borderColor:J?"var(--color-foreground)":void 0},onFocus:()=>Xe(true),onBlur:G=>{G.currentTarget.contains(G.relatedTarget)||Xe(false);},children:[jsx("input",{ref:T,id:C,type:"text",inputMode:"numeric",placeholder:h===24?"HH":"hh",value:$,onChange:Cx,onBlur:Sx,onKeyDown:G=>$i(G,"hour"),onFocus:G=>G.target.select(),"aria-label":"Hour","aria-invalid":i,"aria-describedby":B?N:r?M:void 0,"aria-required":n,disabled:R,className:_i}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:k,type:"text",inputMode:"numeric",placeholder:"mm",value:ie,onChange:Mx,onBlur:kx,onKeyDown:G=>$i(G,"minute"),onFocus:G=>G.target.select(),"aria-label":"Minute",disabled:R,className:_i}),f&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:L,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:Tx,onBlur:Dx,onKeyDown:G=>$i(G,"second"),onFocus:G=>G.target.select(),"aria-label":"Second",disabled:R,className:_i})]}),h===12&&jsx("button",{ref:I,type:"button",onClick:Zl,onKeyDown:Lx,disabled:R,className:o("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",R&&"cursor-not-allowed"),"aria-label":"AM/PM",children:z})]}),r&&!B&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),B&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Tb.displayName="TimeField";var Db=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),uM=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),pM=cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),fM=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"}}),Sb=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),gM=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),Lb=Y.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="#000000",onChange:p,showSwatch:x=true,showPicker:y=true,allowAlpha:f=false,fullWidth:h=false,disabled:R,id:b,...v},P)=>{let w=Y.useId(),S=b||w,C=`${S}-picker`,M=`${S}-description`,N=`${S}-error`,[T,k]=Y.useState(g),[L,I]=Y.useState(false),V=c!==void 0?c:T,D=i&&a,E=U=>{let $=U.target.value;$&&!$.startsWith("#")&&($="#"+$),c===void 0&&k($),p?.($);},B=U=>{let $=U.target.value.toUpperCase();c===void 0&&k($),p?.($);},W=()=>{if(V&&Sb(V)){let U=gM(V);U!==V&&(c===void 0&&k(U),p?.(U));}},H=Sb(V)?V:"#000000";return jsxs("div",{className:o(Db({size:s}),e),children:[t&&jsxs(Zi.Root,{htmlFor:S,className:o(fM({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[x&&jsx("div",{className:o(pM({size:s})),children:y?jsxs("label",{htmlFor:C,className:"block h-full w-full cursor-pointer",children:[jsx("input",{id:C,type:"color",value:H,onChange:B,disabled:R,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsx("div",{className:"h-full w-full",style:{backgroundColor:H}})]}):jsx("div",{className:"h-full w-full",style:{backgroundColor:H}})}),jsx("input",{ref:P,id:S,type:"text",value:V,onChange:E,onFocus:()=>I(true),onBlur:()=>{I(false),W();},placeholder:"#000000",maxLength:f?9:7,"aria-invalid":i,"aria-describedby":D?N:r?M:void 0,"aria-required":n,disabled:R,className:o(uM({size:s,isInvalid:i,fullWidth:h}),!x&&"pl-3",d),style:{borderColor:L?"var(--color-foreground)":void 0},...v})]}),r&&!D&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:r}),D&&jsx("p",{id:N,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:a})]})});Lb.displayName="ColorField";var Ib=cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},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"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),Eb=Y.createContext({});function vM(){return Y.useContext(Eb)}var Hb=Y.forwardRef(({className:e,variant:t,orientation:r,spacing:a,disabled:n,children:i,...s},l)=>jsx(Eb.Provider,{value:{disabled:n},children:jsx("div",{ref:l,role:"group",className:o(Ib({variant:t,orientation:r,spacing:a,className:e})),...s,children:i})}));Hb.displayName="ButtonGroup";var zb=cva("inline-flex items-center justify-center 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10",xl:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"ghost",size:"md",radius:"md"}}),Fb=Y.forwardRef(({className:e,variant:t,size:r,radius:a,isLoading:n,disabled:i,children:s,...l},d)=>{let m={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6"}[r??"md"];return jsx("button",{ref:d,type:"button",disabled:i||n,className:o(zb({variant:t,size:r,radius:a,className:e})),...l,children:n?jsxs("svg",{className:o("animate-spin",m),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}):jsx("span",{className:o("[&>svg]:h-full [&>svg]:w-full",m),children:s})})});Fb.displayName="IconButton";var Ob=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"}}),Gb=Y.forwardRef(({className:e,variant:t,orientation:r,size:a,density:n,items:i,maxVisibleItems:s,isDisabled:l,onAction:d,showLabels:m=false,renderItem:u,...c},g)=>{let p=s&&s<i.length?i.slice(0,s):i,x=s&&s<i.length?i.slice(s):[],y={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[a??"md"],f={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[a??"md"],h={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[a??"md"],R=(v,P)=>{P&&P(),d&&d(v);},b=v=>jsxs("button",{type:"button",disabled:l||v.isDisabled,onClick:()=>R(v.key,v.onPress),className:o("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",m?y:f),"aria-label":v.label,children:[v.icon&&jsx("span",{className:h,children:v.icon}),m&&jsx("span",{children:v.label})]},v.key);return jsxs("div",{ref:g,role:"group",className:o(Ob({variant:t,orientation:r,size:a,density:n,className:e})),...c,children:[p.map(v=>u?u(v):b(v)),x.length>0&&jsxs(ia,{children:[jsx(sa,{asChild:true,children:jsx("button",{type:"button",disabled:l,className:o("inline-flex 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","disabled:pointer-events-none disabled:opacity-50",f),"aria-label":"More actions",children:jsx(MoreHorizontal,{className:h})})}),jsx(Lr,{align:"end",children:x.map(v=>jsxs(Lt,{disabled:v.isDisabled,onClick:()=>R(v.key,v.onPress),children:[v.icon&&jsx("span",{className:o(h,"mr-2"),children:v.icon}),v.label]},v.key))})]})]})});Gb.displayName="ActionGroup";var Kb=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"}}),wM=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}}),Yb=Y.forwardRef(({className:e,variant:t,size:r,pulse:a=false,hideLabel:n=false,children:i,...s},l)=>jsxs("span",{ref:l,role:"status",className:o(Kb({variant:t,size:r,className:e})),...s,children:[jsx("span",{className:o(wM({size:r,pulse:a})),"aria-hidden":"true"}),!n&&i&&jsx("span",{className:"text-foreground",children:i})]}));Yb.displayName="StatusLight";var Ub=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),PM=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),CM=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),MM=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Xb=Y.forwardRef(({className:e,size:t,illustration:r,heading:a,description:n,children:i,...s},l)=>jsxs("div",{ref:l,className:o(Ub({size:t,className:e})),...s,children:[r&&jsx("div",{className:o(PM({size:t})),"aria-hidden":"true",children:r}),a&&jsx("h3",{className:o(CM({size:t})),children:a}),n&&jsx("p",{className:o(MM({size:t})),children:n}),i&&jsx("div",{className:"mt-2",children:i})]}));Xb.displayName="IllustratedMessage";var Jb=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),IM={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Qb=Y.forwardRef(({className:e,variant:t,title:r,icon:a,hideIcon:n=false,isDismissible:i=false,onDismiss:s,actions:l,children:d,...m},u)=>{let[c,g]=Y.useState(true);if(!c)return null;let p=IM[t??"info"],x=()=>{g(false),s?.();};return jsxs("div",{ref:u,role:"alert",className:o(Jb({variant:t,className:e})),...m,children:[!n&&jsx("div",{className:"flex-shrink-0",children:a||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[r&&jsx("div",{className:"font-medium",children:r}),d&&jsx("div",{className:"opacity-90",children:d}),l&&jsx("div",{className:"mt-3 flex gap-2",children:l})]}),i&&jsx("button",{type:"button",onClick:x,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X$1,{className:"h-4 w-4"})})]})});Qb.displayName="InlineAlert";var ev=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"}}),tv=Y.forwardRef(({className:e,position:t,size:r,selectedCount:a=0,isOpen:n=true,onClose:i,showClose:s=true,selectedText:l,children:d,...m},u)=>{if(!n||a===0)return null;let c=()=>typeof l=="function"?l(a):l||`${a} item${a>1?"s":""} selected`;return jsxs("div",{ref:u,role:"toolbar","aria-label":"Actions for selected items",className:o(ev({position:t,size:r,className:e})),...m,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:c()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:d}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx("button",{type:"button",onClick:i,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsx(X$1,{className:"h-4 w-4"})})]})]})});tv.displayName="ActionBar";var rv=Y.forwardRef(({className:e,icon:t,children:r,...a},n)=>jsxs("button",{ref:n,type:"button",className:o("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),...a,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),r]}));rv.displayName="ActionBarButton";var av=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",subtle:"text-muted-foreground hover:text-foreground hover:bg-muted"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-9 w-9"}},defaultVariants:{variant:"ghost",size:"md"}});function OM(e){return "items"in e}var ov=Y.forwardRef(({items:e,align:t="end",side:r="bottom",iconOrientation:a="vertical",trigger:n,variant:i,size:s,onAction:l,"aria-label":d="More actions",triggerClassName:m,disabled:u},c)=>{let g={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}[s??"md"],p=a==="horizontal"?MoreHorizontal:MoreVertical,x=f=>{f.onSelect?.(),l?.(f.key);},y=f=>jsxs(Lt,{disabled:f.isDisabled,onClick:()=>x(f),className:o(f.isDestructive&&"text-destructive focus:text-destructive"),children:[f.icon&&jsx("span",{className:"mr-2 h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:f.icon}),jsx("span",{className:"flex-1",children:f.label}),f.shortcut&&jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:f.shortcut})]},f.key);return jsxs(ia,{children:[jsx(sa,{asChild:true,children:n||jsx("button",{ref:c,type:"button",disabled:u,className:o(av({variant:i,size:s}),m),"aria-label":d,children:jsx(p,{className:g})})}),jsx(Lr,{align:t,side:r,children:e.map((f,h)=>OM(f)?jsxs(Y.Fragment,{children:[h>0&&jsx(yn,{}),f.items.map(y)]},f.key):y(f))})]})});ov.displayName="ActionMenu";var sv=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"}}),lv=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 dv({className:e,variant:t,size:r,items:a,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,allowsDragging:l=false,onReorder:d,showCheckbox:m=false,renderItem:u,emptyContent:c,...g}){let[p,x]=Y.useState(new Set),[y,f]=Y.useState(null),[h,R]=Y.useState(null),b=Y.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),v=C=>{if(i==="none")return;let M;i==="single"?M=b.has(C)?new Set:new Set([C]):(M=new Set(b),M.has(C)?M.delete(C):M.add(C)),n||x(M),s?.(M);},P=(C,M)=>{f(M),C.dataTransfer.effectAllowed="move";},w=(C,M)=>{C.preventDefault(),y!==M&&R(M);},S=()=>{if(y&&h&&y!==h){let C=a.findIndex(k=>k.key===y),M=a.findIndex(k=>k.key===h),N=[...a],[T]=N.splice(C,1);N.splice(M,0,T),d?.(N);}f(null),R(null);};return a.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":i==="multiple",className:o(sv({variant:t,size:r,className:e})),...g,children:a.map(C=>{let M=b.has(C.key),N=y===C.key,T=h===C.key;return u?jsx("div",{role:"option","aria-selected":M,onClick:()=>v(C.key),children:u(C,M)},C.key):jsxs("div",{role:"option","aria-selected":M,"aria-disabled":C.isDisabled,draggable:l&&!C.isDisabled,onDragStart:k=>P(k,C.key),onDragOver:k=>w(k,C.key),onDragEnd:S,onClick:()=>!C.isDisabled&&v(C.key),className:o(lv({variant:t,size:r,isSelected:M,isDisabled:C.isDisabled}),N&&"opacity-50",T&&"border-t-2 border-t-primary"),children:[l&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),m&&i!=="none"&&jsx("div",{className:o("flex h-4 w-4 items-center justify-center rounded border",M?"bg-primary border-primary text-primary-foreground":"border-input"),children:M&&jsx(Check,{className:"h-3 w-3"})}),C.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:C.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:C.label}),C.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:C.description})]})]},C.key)})})}dv.displayName="ListView";var mv=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"}}),$M=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"}}),cv=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",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),uv=Y.forwardRef(({className:e,orientation:t="horizontal",size:r,value:a,defaultValue:n=[25,75],onValueChange:i,onValueCommit:s,showLabels:l=false,formatLabel:d=f=>String(f),trackColor:m="primary",min:u=0,max:c=100,step:g=1,disabled:p,...x},y)=>{let[f,h]=Y.useState(n),R=a??f,b=w=>{let S=w;a||h(S),i?.(S);},v=w=>{s?.(w);},P={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[m];return jsxs("div",{className:"relative w-full",children:[l&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:d(R[0])}),jsx("span",{children:d(R[1])})]}),jsxs(ar.Root,{ref:y,value:R,onValueChange:b,onValueCommit:v,min:u,max:c,step:g,disabled:p,orientation:t??"horizontal",className:o(mv({orientation:t,size:r,className:e})),...x,children:[jsx(ar.Track,{className:o($M({orientation:t,size:r})),children:jsx(ar.Range,{className:o("absolute rounded-full",P,{"h-full":t==="horizontal","w-full":t==="vertical"})})}),jsx(ar.Thumb,{className:o(cv({size:r}))}),jsx(ar.Thumb,{className:o(cv({size:r}))})]})]})});uv.displayName="RangeSlider";var gv=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"}}),jM=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"}}),UM={help:HelpCircle,info:Info,warning:AlertCircle},bv=Y.forwardRef(({variant:e="help",size:t,title:r,children:a,trigger:n,side:i="top",align:s="center",open:l,onOpenChange:d,learnMoreUrl:m,learnMoreText:u="Learn more",triggerClassName:c,contentClassName:g},p)=>{let x=UM[e??"help"];return jsxs(yt.Root,{open:l,onOpenChange:d,children:[jsx(yt.Trigger,{asChild:true,children:n||jsx("button",{ref:p,type:"button",className:o(gv({variant:e,size:t}),c),"aria-label":"Help",children:jsx(x,{className:"h-full w-full"})})}),jsx(yt.Portal,{children:jsxs(yt.Content,{side:i,align:s,sideOffset:8,className:o(jM({size:t}),g),children:[r&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:r}),jsx("div",{className:"text-muted-foreground",children:a}),m&&jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[u," \u2192"]}),jsx(yt.Arrow,{className:"fill-popover"})]})})]})});bv.displayName="ContextualHelp";var hv=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),Vl=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",outline:"border border-input 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:"outline",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 xv({className:e,spacing:t,variant:r,size:a,items:n,selectedKeys:i,selectionMode:s="none",onSelectionChange:l,allowsRemoving:d=false,onRemove:m,label:u,description:c,errorMessage:g,maxTags:p,...x}){let[y,f]=Y.useState(new Set),h=Y.useMemo(()=>i?i instanceof Set?i:new Set(i):y,[i,y]),R=w=>{if(s==="none")return;let S;s==="single"?S=h.has(w)?new Set:new Set([w]):(S=new Set(h),S.has(w)?S.delete(w):S.add(w)),i||f(S),l?.(S);},b=(w,S)=>{S.stopPropagation(),m?.(w);},v=p?n.slice(0,p):n,P=p?Math.max(0,n.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[u&&jsx("span",{className:"text-sm font-medium text-foreground",children:u}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:c}),jsxs("div",{role:"group","aria-label":u,className:o(hv({spacing:t}),e),...x,children:[v.map(w=>{let S=h.has(w.key),C=s!=="none";return jsxs("span",{role:C?"button":void 0,tabIndex:C&&!w.isDisabled?0:void 0,"aria-pressed":C?S:void 0,onClick:()=>!w.isDisabled&&R(w.key),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&!w.isDisabled&&(M.preventDefault(),R(w.key));},style:w.color?{backgroundColor:w.color}:void 0,className:o(Vl({variant:w.color?void 0:r,size:a,isSelected:S,isDisabled:w.isDisabled}),C&&!w.isDisabled&&"cursor-pointer hover:opacity-80",w.color&&"text-white"),children:[w.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:w.icon}),w.label,d&&!w.isDisabled&&jsx("button",{type:"button",onClick:M=>b(w.key,M),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${w.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},w.key)}),P>0&&jsxs("span",{className:o(Vl({variant:"surface",size:a}),"cursor-default"),children:["+",P," more"]})]}),g&&jsx("span",{className:"text-sm text-destructive",children:g})]})}xv.displayName="TagGroup";var wv=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"}}),Nv=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 Pv({className:e,columns:t,gap:r,items:a,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,showSelectionIndicator:l=true,itemVariant:d="default",itemSize:m="md",renderItem:u,emptyContent:c,...g}){let[p,x]=Y.useState(new Set),y=Y.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),f=h=>{if(i==="none")return;let R;i==="single"?R=y.has(h)?new Set:new Set([h]):(R=new Set(y),R.has(h)?R.delete(h):R.add(h)),n||x(R),s?.(R);};return a.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"grid","aria-multiselectable":i==="multiple",className:o(wv({columns:t,gap:r,className:e})),...g,children:a.map(h=>{let R=y.has(h.key);return u?jsx("div",{role:"gridcell","aria-selected":R,onClick:()=>f(h.key),children:u(h,R)},h.key):jsxs("div",{role:"gridcell","aria-selected":R,"aria-disabled":h.isDisabled,onClick:()=>!h.isDisabled&&f(h.key),className:o(Nv({variant:d,size:m,isSelected:R,isDisabled:h.isDisabled})),children:[l&&i!=="none"&&R&&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"})}),h.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:h.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:h.label}),h.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:h.description})]})]},h.key)})})}Pv.displayName="GridList";var Mv=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),ZM=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),JM=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}}),ki=Y.forwardRef(({className:e,size:t,value:r,min:a=0,max:n=100,optimum:i,low:s,high:l,label:d,showValueLabel:m=false,formatValue:u,color:c="primary",trackVariant:g="default",...p},x)=>{let y=Math.min(100,Math.max(0,(r-a)/(n-a)*100)),f=()=>{if(c!=="auto")return "";let R=(r-a)/(n-a),b=s!==void 0?(s-a)/(n-a):.25,v=l!==void 0?(l-a)/(n-a):.75;return (i!==void 0?(i-a)/(n-a):1)>=.5?R<=b?"bg-red-500":R<=v?"bg-yellow-500":"bg-green-500":R>=v?"bg-red-500":R>=b?"bg-yellow-500":"bg-green-500"},h=u?u(r,y):`${Math.round(y)}%`;return jsxs("div",{ref:x,className:o("w-full",e),...p,children:[(d||m)&&jsxs("div",{className:"flex items-center justify-between mb-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:h})]}),jsx("div",{role:"meter","aria-valuenow":r,"aria-valuemin":a,"aria-valuemax":n,"aria-label":d,className:o(Mv({size:t})),children:jsx("div",{className:o(ZM({variant:g})),children:jsx("div",{className:o(JM({color:c==="auto"?void 0:c,rounded:y>=100}),c==="auto"&&f()),style:{width:`${y}%`}})})})]})});ki.displayName="Meter";var Tv=Y.forwardRef((e,t)=>jsx(ki,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Tv.displayName="DiskUsageMeter";var Sv=Y.forwardRef((e,t)=>jsx(ki,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Sv.displayName="BatteryMeter";var kv=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Li=(e,t,r)=>{let a=n=>{let i=(n+e/60)%6;return r-r*t*Math.max(Math.min(i,4-i,1),0)};return [Math.round(a(5)*255),Math.round(a(3)*255),Math.round(a(1)*255)]},Dv=(e,t,r)=>{e/=255,t/=255,r/=255;let a=Math.max(e,t,r),n=Math.min(e,t,r),i=a-n,s=0,l=a===0?0:i/a,d=a;if(i!==0)switch(a){case e:s=((t-r)/i+(t<r?6:0))*60;break;case t:s=((r-e)/i+2)*60;break;case r:s=((e-t)/i+4)*60;break}return [s,l,d]},Lv=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},Vv=(e,t,r)=>"#"+[e,t,r].map(a=>a.toString(16).padStart(2,"0")).join(""),Iv=Y.forwardRef(({hue:e,saturation:t,brightness:r,value:a,defaultValue:n="#ff0000",onChange:i,onColorChange:s,size:l,disabled:d,thumbSize:m=18,className:u,...c},g)=>{let p=Y.useRef(null),[x,y]=Y.useState(false),f=Y.useCallback(H=>{let U=Lv(H);return U?Dv(...U):[0,1,1]},[]),[h,R]=Y.useState(()=>f(a||n)),b=e??h[0],v=t??h[1],P=r??h[2];Y.useEffect(()=>{if(a){let H=f(a);R(H);}},[a,f]);let w=Y.useCallback((H,U)=>{if(d||!p.current)return;let $=p.current.getBoundingClientRect(),Pe=Math.max(0,Math.min(1,(H-$.left)/$.width)),ie=Math.max(0,Math.min(1,(U-$.top)/$.height)),F=Pe,O=1-ie;t===void 0&&r===void 0&&R([b,F,O]),i?.({hue:b,saturation:F,brightness:O});let A=Li(b,F,O);s?.(Vv(...A));},[d,b,t,r,i,s]),S=H=>{d||(H.preventDefault(),y(true),H.target.setPointerCapture(H.pointerId),w(H.clientX,H.clientY));},C=H=>{x&&w(H.clientX,H.clientY);},M=H=>{y(false),H.target.releasePointerCapture(H.pointerId);},[N,T,k]=Li(b,1,1),L=`rgb(${N}, ${T}, ${k})`,I=v*100,V=(1-P)*100,[D,E,B]=Li(b,v,P),W=`rgb(${D}, ${E}, ${B})`;return jsx("div",{ref:g,className:o(kv({size:l}),d&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:L},onPointerDown:S,onPointerMove:C,onPointerUp:M,onPointerLeave:M,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:m,height:m,left:`calc(${I}% - ${m/2}px)`,top:`calc(${V}% - ${m/2}px)`,backgroundColor:W,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Iv.displayName="ColorArea";var Hv=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"}}),rT=`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")`,Ev="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Av=Y.forwardRef(({value:e,defaultValue:t,onChange:r,channel:a="hue",baseColor:n="#ff0000",orientation:i,size:s,disabled:l,thumbSize:d=18,showBorder:m=true,className:u,...c},g)=>{let p=Y.useRef(null),[x,y]=Y.useState(false),f=()=>{switch(a){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[h,R]=Y.useState(t??f()),b=e??h,v=a==="hue"?b/360:b,P=Y.useCallback((L,I)=>{if(l||!p.current)return;let V=p.current.getBoundingClientRect(),D=i!=="vertical",E;D?E=Math.max(0,Math.min(1,(L-V.left)/V.width)):E=Math.max(0,Math.min(1,1-(I-V.top)/V.height));let B=a==="hue"?E*360:E;e===void 0&&R(B),r?.(B);},[l,i,a,e,r]),w=L=>{l||(L.preventDefault(),y(true),L.target.setPointerCapture(L.pointerId),P(L.clientX,L.clientY));},S=L=>{x&&P(L.clientX,L.clientY);},C=L=>{y(false),L.target.releasePointerCapture(L.pointerId);},M=()=>{let L=i!=="vertical",I=L?"to right":"to top";switch(a){case "hue":return L?Ev:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${I}, transparent, ${n})`;case "saturation":return `linear-gradient(${I}, #808080, ${n})`;case "brightness":return `linear-gradient(${I}, #000000, ${n})`;default:return Ev}},N=()=>a==="hue"?`hsl(${b}, 100%, 50%)`:n,T=i!=="vertical",k=v*100;return jsx("div",{ref:g,className:o(Hv({orientation:i,size:s}),l&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:o("absolute inset-0 rounded-full overflow-hidden",m&&"border border-input"),style:{backgroundImage:a==="alpha"?rT:void 0,backgroundSize:a==="alpha"?"8px 8px":void 0},onPointerDown:w,onPointerMove:S,onPointerUp:C,onPointerLeave:C,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:M()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:d,height:d,...T?{left:`calc(${k}% - ${d/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${k}% - ${d/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:N(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Av.displayName="ColorSlider";var zv=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"}}),nT=(e,t,r)=>{let a=e-r,n=t-r,i=Math.atan2(n,a)*180/Math.PI+90;return i<0&&(i+=360),i},Fv=Y.forwardRef(({value:e,defaultValue:t=0,onChange:r,size:a,disabled:n,innerRadius:i=.6,thumbSize:s=20,showCenter:l=true,className:d,...m},u)=>{let c=Y.useRef(null),[g,p]=Y.useState(false),[x,y]=Y.useState(t),f=e??x,h=Y.useCallback((w,S)=>{if(n||!c.current)return;let C=c.current.getBoundingClientRect(),M=C.width/2,N=w-C.left,T=S-C.top,k=nT(N,T,M);e===void 0&&y(k),r?.(k);},[n,e,r]),R=w=>{n||(w.preventDefault(),p(true),w.target.setPointerCapture(w.pointerId),h(w.clientX,w.clientY));},b=w=>{g&&h(w.clientX,w.clientY);},v=w=>{p(false),w.target.releasePointerCapture(w.pointerId);},P=()=>{let w=[];for(let S=0;S<=360;S+=30)w.push(`hsl(${S}, 100%, 50%) ${S}deg`);return `conic-gradient(from 270deg, ${w.join(", ")})`};return jsx("div",{ref:u,className:o(zv({size:a}),n&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:c,className:"absolute inset-0 rounded-full",style:{background:P()},onPointerDown:R,onPointerMove:b,onPointerUp:v,onPointerLeave:v,children:[i<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-i)*50}%`,left:`${(1-i)*50}%`,width:`${i*100}%`,height:`${i*100}%`}}),l&&i<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(iT,{hue:f,innerRadius:i,thumbSize:s})]})})});Fv.displayName="ColorWheel";var iT=({hue:e,innerRadius:t,thumbSize:r})=>{let a=(1-(1-t)/2)*50,n=(e-90)*Math.PI/180,i=50+a*Math.cos(n),s=50+a*Math.sin(n);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:r,height:r,left:`calc(${i}% - ${r/2}px)`,top:`calc(${s}% - ${r/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 Bv=cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},inline:{true:"inline-flex",false:"flex"}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"nowrap",gap:0,inline:false}}),tn=Y.forwardRef(({className:e,direction:t,align:r,justify:a,wrap:n,gap:i,inline:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(Bv({direction:t,align:r,justify:a,wrap:n,gap:i,inline:s,className:e})),...d}));tn.displayName="Flex";var Ov=Y.forwardRef(({gap:e=2,align:t="center",...r},a)=>jsx(tn,{ref:a,direction:"row",gap:e,align:t,...r}));Ov.displayName="HStack";var Gv=Y.forwardRef(({gap:e=2,align:t="stretch",...r},a)=>jsx(tn,{ref:a,direction:"column",gap:e,align:t,...r}));Gv.displayName="VStack";var Wv=Y.forwardRef((e,t)=>jsx(tn,{ref:t,align:"center",justify:"center",...e}));Wv.displayName="Center";var _v=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",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none",auto:"grid-cols-[repeat(auto-fill,minmax(200px,1fr))]"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},gapX:{0:"gap-x-0",1:"gap-x-1",2:"gap-x-2",3:"gap-x-3",4:"gap-x-4",5:"gap-x-5",6:"gap-x-6",8:"gap-x-8",10:"gap-x-10",12:"gap-x-12"},gapY:{0:"gap-y-0",1:"gap-y-1",2:"gap-y-2",3:"gap-y-3",4:"gap-y-4",5:"gap-y-5",6:"gap-y-6",8:"gap-y-8",10:"gap-y-10",12:"gap-y-12"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},placeItems:{start:"place-items-start",center:"place-items-center",end:"place-items-end",stretch:"place-items-stretch"}},defaultVariants:{columns:1,gap:4,flow:"row",align:"stretch",justify:"stretch"}}),Ii=Y.forwardRef(({className:e,columns:t,rows:r,gap:a,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,as:u="div",minChildWidth:c,style:g,...p},x)=>{let y=c?{...g,gridTemplateColumns:`repeat(auto-fill, minmax(${c}, 1fr))`}:g;return jsx(u,{ref:x,className:o(_v({columns:c?void 0:t,rows:r,gap:a,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,className:e})),style:y,...p})});Ii.displayName="Grid";var Kv=cva("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",13:"col-start-13",auto:"col-start-auto"},colEnd:{1:"col-end-1",2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13",auto:"col-end-auto"},rowStart:{1:"row-start-1",2:"row-start-2",3:"row-start-3",4:"row-start-4",5:"row-start-5",6:"row-start-6",7:"row-start-7",auto:"row-start-auto"},rowEnd:{1:"row-end-1",2:"row-end-2",3:"row-end-3",4:"row-end-4",5:"row-end-5",6:"row-end-6",7:"row-end-7",auto:"row-end-auto"}}}),Yv=Y.forwardRef(({className:e,colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:i,rowEnd:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(Kv({colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:i,rowEnd:s,className:e})),...d}));Yv.displayName="GridItem";var jv=Y.forwardRef(({columns:e=2,className:t,...r},a)=>{if(typeof e=="number")return jsx(Ii,{ref:a,columns:e,className:t,...r});let n=o(e.sm&&`sm:grid-cols-${e.sm}`,e.md&&`md:grid-cols-${e.md}`,e.lg&&`lg:grid-cols-${e.lg}`,e.xl&&`xl:grid-cols-${e.xl}`);return jsx(Ii,{ref:a,columns:1,className:o(n,t),...r})});jv.displayName="SimpleGrid";var Xv=cva("rounded-lg",{variants:{variant:{default:"bg-muted",subtle:"bg-muted/50",outline:"border border-border bg-transparent",filled:"bg-accent",sunken:"bg-muted shadow-inner"},size:{sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"lg"}}),qv=Y.forwardRef(({className:e,variant:t,size:r,radius:a,as:n="div",...i},s)=>jsx(n,{ref:s,className:o(Xv({variant:t,size:r,radius:a,className:e})),...i}));qv.displayName="Well";var Jv=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"}}),mT=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),uT=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}}),Qv=Y.forwardRef(({className:e,orientation:t,size:r,align:a,label:n,value:i,valueWeight:s,mono:l,labelWidth:d,labelClassName:m,valueClassName:u,showColon:c=false,copyable:g=false,onCopy:p,...x},y)=>{let f=async()=>{if(!(!g||i===null||i===void 0))try{let h=typeof i=="string"?i:String(i);await navigator.clipboard.writeText(h),p?.();}catch{}};return jsxs("div",{ref:y,className:o(Jv({orientation:t,size:r,align:a,className:e})),...x,children:[jsxs("span",{className:o(mT({size:r}),m),style:d?{width:d,flexShrink:0}:void 0,children:[n,c&&":"]}),jsx("span",{className:o(uT({size:r,weight:s,mono:l}),g&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",u),onClick:g?f:void 0,role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:g?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f());}:void 0,children:i})]})});Qv.displayName="LabeledValue";var eh=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"}}),th=Y.forwardRef(({className:e,orientation:t,gap:r,...a},n)=>jsx("div",{ref:n,className:o(eh({orientation:t,gap:r,className:e})),...a}));th.displayName="LabeledValueGroup";var nh=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),mo=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"}}),ih=Y.forwardRef(({value:e,defaultValue:t="",onChange:r,onSearch:a,onSelect:n,suggestions:i=[],recentSearches:s=[],onClearRecentSearches:l,trendingSearches:d=[],isLoading:m,showClear:u=true,showIcon:c=true,popoverWidth:g="trigger",emptyMessage:p="No results found",size:x,variant:y,className:f,placeholder:h="Search...",disabled:R,...b},v)=>{let[P,w]=Y.useState(false),[S,C]=Y.useState(t),M=e!==void 0?e:S,N=Y.useRef(null);Y.useImperativeHandle(v,()=>N.current);let T=M.length>0,k=P&&(i.length>0||s.length>0||d.length>0||T),L=H=>{e===void 0&&C(H),r?.(H);},I=()=>{L(""),N.current?.focus();},V=H=>{H?.preventDefault(),M.trim()&&(a?.(M.trim()),w(false));},D=H=>{L(H.label),n?.(H),w(false);},E=H=>{L(H),a?.(H),w(false);},B=H=>{L(H),a?.(H),w(false);},W=Y.useMemo(()=>{let H={};return i.forEach(U=>{let $=U.category||"Results";H[$]||(H[$]=[]),H[$].push(U);}),H},[i]);return jsxs(Ee,{open:k,onOpenChange:w,children:[jsx(_e,{asChild:true,children:jsxs("form",{onSubmit:V,className:o(nh({size:x,variant:y}),f),children:[c&&jsx(Search,{className:o(mo({size:x}),"ml-3")}),jsx("input",{ref:N,type:"text",value:M,onChange:H=>L(H.target.value),onFocus:()=>w(true),placeholder:h,disabled:R,className:o("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!c&&"pl-3"),...b}),u&&T&&!R&&jsx("button",{type:"button",onClick:I,className:o("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",mo({size:x})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(Te,{className:"p-0",style:{width:g==="trigger"?"var(--radix-popover-trigger-width)":g},align:"start",onOpenAutoFocus:H=>H.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!T&&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"}),l&&jsx("button",{type:"button",onClick:l,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((H,U)=>jsxs("button",{type:"button",onClick:()=>E(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:o(mo({size:x}))}),jsx("span",{className:"flex-1 text-left truncate",children:H}),jsx(ArrowRight,{className:o(mo({size:x}),"opacity-0 group-hover:opacity-100")})]},U))]}),d.length>0&&!T&&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"})}),d.map((H,U)=>jsxs("button",{type:"button",onClick:()=>B(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:o(mo({size:x}))}),jsx("span",{className:"flex-1 text-left truncate",children:H})]},U))]}),T&&jsx("div",{className:"p-2",children:m?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"})}):i.length>0?Object.entries(W).map(([H,U])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:H})}),U.map($=>jsxs("button",{type:"button",onClick:()=>D($),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:o(mo({size:x}))}),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))]},H)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});ih.displayName="SearchBar";var sh={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=Y.forwardRef(({open:e,onOpenChange:t,items:r=[],recentItems:a=[],placeholder:n="Search...",isLoading:i,emptyMessage:s="No results found.",filter:l,shortcut:d="\u2318K",onSelect:m,footer:u},c)=>{let[g,p]=Y.useState(""),x=Y.useRef(null);Y.useEffect(()=>{e||p("");},[e]);let y=Y.useMemo(()=>{let b={};return r.forEach(v=>{let P=v.category||"Results";b[P]||(b[P]=[]),b[P].push(v);}),b},[r]),f=b=>{b.onSelect?.(),m?.(b),t?.(false);},h=g.length>0,R=!h&&a.length>0;return jsx(oe.Root,{open:e,onOpenChange:t,children:jsxs(oe.Portal,{children:[jsx(oe.Overlay,{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"}),jsx(oe.Content,{ref:c,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",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:l,shouldFilter:!l,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:x,value:g,onValueChange:p,placeholder:n,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"}),g&&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:i?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:[R&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),a.map(b=>jsxs(Command.Item,{value:b.label,onSelect:()=>f(b),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:b.icon||sh[b.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:b.label}),b.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:b.description})]}),b.shortcut&&jsx("div",{className:"flex items-center gap-1",children:b.shortcut.map((v,P)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:v},P))})]},b.id))]}),h&&Object.entries(y).map(([b,v])=>jsxs(Command.Group,{heading:b,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:b}),v.map(P=>jsxs(Command.Item,{value:`${P.label} ${P.keywords?.join(" ")||""}`,onSelect:()=>f(P),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:P.icon||sh[b]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:P.label}),P.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:P.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},P.id))]},b)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),u?jsx("div",{className:"border-t px-4 py-3",children:u}):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:d})," to open"]})]})]})})]})})});lh.displayName="SpotlightSearch";function CT(e="k"){let[t,r]=Y.useState(false);return Y.useEffect(()=>{let a=n=>{(n.metaKey||n.ctrlKey)&&n.key===e&&(n.preventDefault(),r(i=>!i));};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),{open:t,setOpen:r,toggle:()=>r(a=>!a)}}var IT=cva("",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ET={default:"bg-muted",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400"},HT=e=>{let t=typeof e=="string"?new Date(e):e,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4),i=Math.floor(a/36e5),s=Math.floor(a/864e5);return n<1?"Just now":n<60?`${n}m ago`:i<24?`${i}h ago`:s<7?`${s}d ago`:t.toLocaleDateString()},dh=Y.forwardRef(({notifications:e=[],onNotificationClick:t,onMarkAsRead:r,onMarkAllAsRead:a,onDismiss:n,onClearAll:i,showSettings:s,onSettingsClick:l,trigger:d,align:m="end",emptyMessage:u="No notifications",maxHeight:c=400,className:g},p)=>{let[x,y]=Y.useState(false),f=e.filter(b=>!b.read).length,h=e.length>0,R=b=>{b.read||r?.(b.id),t?.(b);};return jsxs(Ee,{open:x,onOpenChange:y,children:[jsx(_e,{asChild:true,children:d||jsxs("button",{ref:p,className:o("relative inline-flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",g),children:[jsx(Bell,{className:"h-5 w-5"}),f>0&&jsx("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground",children:f>99?"99+":f})]})}),jsxs(Te,{className:"w-80 p-0 sm:w-96",align:m,sideOffset:8,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),f>0&&jsxs(ji,{size:"sm",children:[f," new"]})]}),jsxs("div",{className:"flex items-center gap-1",children:[h&&a&&f>0&&jsx("button",{type:"button",onClick:a,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Mark all as read",children:jsx(CheckCheck,{className:"h-4 w-4"})}),h&&i&&jsx("button",{type:"button",onClick:i,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Clear all",children:jsx(Trash2,{className:"h-4 w-4"})}),s&&l&&jsx("button",{type:"button",onClick:l,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Settings",children:jsx(Settings,{className:"h-4 w-4"})})]})]}),h?jsx(Me,{style:{maxHeight:c},children:jsx("div",{className:"divide-y",children:e.map(b=>jsxs("div",{className:o("group relative flex gap-3 px-4 py-3 transition-colors hover:bg-muted/50",!b.read&&"bg-muted/30"),children:[jsx("div",{className:o("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",b.avatar?"overflow-hidden":ET[b.type||"default"]),children:b.avatar?jsx("img",{src:b.avatar,alt:"",className:"h-full w-full object-cover"}):b.icon?b.icon:jsx(Bell,{className:"h-4 w-4"})}),jsxs("button",{type:"button",onClick:()=>R(b),className:"flex-1 text-left",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:o("text-sm",!b.read&&"font-medium"),children:b.title}),!b.read&&jsx("span",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"})]}),b.description&&jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:b.description}),jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:HT(b.timestamp)})]}),jsxs("div",{className:"absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[!b.read&&r&&jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),r(b.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Mark as read",children:jsx(Check,{className:"h-3.5 w-3.5"})}),(n||b.onDismiss)&&jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),b.onDismiss?.(),n?.(b.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Dismiss",children:jsx(X$1,{className:"h-3.5 w-3.5"})})]})]},b.id))})}):jsxs("div",{className:"flex flex-col items-center justify-center py-10 text-center",children:[jsx(Bell,{className:"h-10 w-10 text-muted-foreground/50"}),jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:u})]})]})]})});dh.displayName="NotificationCenter";var ch=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"}}),WT={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},mh=Y.forwardRef(({message:e,type:t="default",variant:r="solid",showIcon:a=false,icon:n,dismissible:i=true,onDismiss:s,endContent:l,position:d,animate:m,autoDismiss:u,storageKey:c,className:g,...p},x)=>{let[y,f]=Y.useState(true),[h,R]=Y.useState(false);Y.useEffect(()=>{c&&localStorage.getItem(`banner-${c}`)==="true"&&f(false);},[c]),Y.useEffect(()=>{if(u&&y){let w=setTimeout(()=>{b();},u);return ()=>clearTimeout(w)}},[u,y]);let b=()=>{R(true),setTimeout(()=>{f(false),c&&localStorage.setItem(`banner-${c}`,"true"),s?.();},200);};if(!y)return null;let v=WT[t],P=a?n!==void 0?n:v?jsx(v,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:x,className:o(ch({variant:r,type:t,position:d}),m&&"animate-pulse",h&&"animate-out fade-out slide-out-to-top duration-200",g),role:"banner",...p,children:[P&&jsx("span",{className:"shrink-0",children:P}),jsx("span",{className:"text-center font-medium",children:e}),l&&jsx("div",{className:"shrink-0 ml-2",children:l}),i&&jsx("button",{type:"button",onClick:b,className:o("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",d==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});mh.displayName="Banner";var rn=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:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-muted",ghost:"bg-background hover:bg-muted shadow-md"},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:"default",size:"md",position:"bottom-right"}}),KT=cva("transition-transform duration-200",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-7 w-7"}},defaultVariants:{size:"md"}}),Bl=Y.forwardRef(({icon:e,label:t="Action button",extended:r,extendedLabel:a,actions:n,direction:i="up",showTooltip:s=true,closeIcon:l,animation:d="rotate",variant:m,size:u,position:c,className:g,onClick:p,disabled:x,...y},f)=>{let[h,R]=Y.useState(false),b=n&&n.length>0,v=M=>{b&&R(!h),p?.(M);},P=M=>{M.onClick?.(),R(false);},w={up:{container:"flex-col-reverse bottom-full mb-3",item:"mb-3"},down:{container:"flex-col top-full mt-3",item:"mt-3"},left:{container:"flex-row-reverse right-full mr-3",item:"mr-3"},right:{container:"flex-row left-full ml-3",item:"ml-3"}},S=d==="rotate"&&h?"rotate-45":"",C=d==="scale"&&h?"scale-0":"scale-100";return jsxs("div",{className:o("z-50",c!=="relative"&&c&&rn({position:c})),children:[b&&h&&jsx("div",{className:o("absolute flex items-center gap-2",w[i].container),children:n.map((M,N)=>jsxs("div",{className:o("flex items-center gap-2 animate-in fade-in zoom-in duration-200",i==="up"||i==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*50}ms`},children:[s&&(i==="up"||i==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label}),M.href?jsx("a",{href:M.href,className:o(rn({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}):jsx("button",{type:"button",onClick:()=>P(M),className:o(rn({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}),s&&(i==="left"||i==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label})]},M.id))}),jsxs("button",{ref:f,type:"button",onClick:v,disabled:x,className:o(rn({variant:m,size:u,position:"relative"}),r&&"px-6 gap-2",g),"aria-label":t,"aria-expanded":b?h:void 0,...y,children:[h&&l?l:jsx("span",{className:o(KT({size:u}),S,C,"transition-all duration-200"),children:e||jsx(Plus,{})}),r&&a&&jsx("span",{className:"font-medium",children:a})]}),b&&h&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>R(false)})]})});Bl.displayName="FloatingActionButton";var YT=Bl;var bh=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"}}),ph=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),vh=Y.forwardRef(({className:e,variant:t,size:r,items:a,value:n,defaultValue:i,onValueChange:s,hideLabels:l=false,showActiveLabel:d=false,renderItem:m,...u},c)=>{let[g,p]=Y.useState(i||a[0]?.key),x=n!==void 0,y=x?n:g,f=v=>{v.disabled||(x||p(v.key),s?.(v.key));},h=v=>t==="filled"?v?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":v?"text-primary":"text-muted-foreground hover:text-foreground",R=()=>{switch(r){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},b=()=>{switch(r){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:c,className:o(bh({variant:t,size:r}),e),role:"navigation","aria-label":"Bottom navigation",...u,children:a.map(v=>{let P=y===v.key,w=!l&&(d?P:true),S=P&&v.activeIcon?v.activeIcon:v.icon;if(m)return jsx("div",{onClick:()=>f(v),className:o(ph({variant:t}),v.disabled&&"opacity-50 cursor-not-allowed"),children:m(v,P)},v.key);let C=jsxs("div",{onClick:()=>!v.href&&f(v),className:o(ph({variant:t}),h(P),v.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":P?"page":void 0,"aria-disabled":v.disabled,tabIndex:v.disabled?-1:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),f(v));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:o(R(),"[&>svg]:h-full [&>svg]:w-full"),children:S}),v.badge!==void 0&&v.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:v.badge>99?"99+":v.badge}),v.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),w&&v.label&&jsx("span",{className:o(b(),"font-medium truncate max-w-full px-1"),children:v.label})]},v.key);return v.href&&!v.disabled?jsx("a",{href:v.href,onClick:()=>f(v),className:o("flex flex-1 flex-col items-center justify-center gap-1 no-underline",h(P)),children:C},v.key):C})})});vh.displayName="BottomNavigation";var UT="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",xh=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-destructive hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),yh=Y.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,items:i,cancelLabel:s="Cancel",onCancel:l,showCancel:d=true,children:m,closeOnSelect:u=true,onAction:c},g)=>{let p=x=>{x.isDisabled||(x.onSelect?.(),c?.(x.key),u&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[r&&jsx(Drawer.Trigger,{asChild:true,children:r}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:g,className:UT,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(a||n)&&jsxs("div",{className:"px-4 py-3 text-center",children:[a&&jsx(Drawer.Title,{className:"text-base font-semibold",children:a}),n&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:n})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:m||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:i?.map(x=>jsxs("button",{type:"button",disabled:x.isDisabled,onClick:()=>p(x),className:o(xh({variant:x.isDestructive?"destructive":"default"})),children:[x.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:x.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:x.label}),x.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:x.description})]})]},x.key))})}),d&&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:l,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 wh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Gl=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"}}),Nh=Y.forwardRef(({className:e,variant:t,leftActions:r=[],rightActions:a=[],actionSize:n="md",threshold:i=.3,onSwipeEnd:s,disabled:l=false,fullSwipeAction:d,children:m,...u},c)=>{let g=Y.useRef(null),[p,x]=Y.useState(0),[y,f]=Y.useState(false),h=Y.useRef(0),R=Y.useRef(0),b=r.length*(n==="sm"?64:n==="lg"?96:80),v=a.length*(n==="sm"?64:n==="lg"?96:80),P=N=>{l||(f(true),h.current=N.touches[0].clientX,R.current=p);},w=N=>{if(!y||l)return;let k=N.touches[0].clientX-h.current,L=R.current+k;(L>0&&r.length===0||L<0&&a.length===0)&&(L=0),L>b?L=b+(L-b)*.3:L<-v&&(L=-v+(L+v)*.3),x(L);},S=()=>{if(!y)return;f(false);let N=g.current?.offsetWidth||0,T=Math.abs(p)/N;if(d&&T>.6){d==="right"&&p>0&&r[0]?(r[0].onAction?.(),s?.("right",r[0].key)):d==="left"&&p<0&&a[0]&&(a[0].onAction?.(),s?.("left",a[0].key)),x(0);return}p>b*i&&r.length>0?(x(b),s?.("right")):p<-v*i&&a.length>0?(x(-v),s?.("left")):x(0);},C=(N,T)=>{N.onAction?.(),s?.(T,N.key),x(0);},M=()=>{x(0);};return jsxs("div",{ref:c,className:o(wh({variant:t,className:e})),...u,children:[r.length>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:b},children:r.map(N=>jsxs("button",{type:"button",onClick:()=>C(N,"right"),className:o(Gl({variant:N.variant,size:n})),style:{opacity:Math.min(1,p/b)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),a.length>0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:v},children:a.map(N=>jsxs("button",{type:"button",onClick:()=>C(N,"left"),className:o(Gl({variant:N.variant,size:n})),style:{opacity:Math.min(1,Math.abs(p)/v)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),jsx("div",{ref:g,className:o("relative bg-background",y?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:P,onTouchMove:w,onTouchEnd:S,onClick:p!==0?M:void 0,children:m})]})});Nh.displayName="SwipeActions";var Ch=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),ZT=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"}}),Mh=Y.forwardRef(({className:e,variant:t,onRefresh:r,pullThreshold:a=80,maxPullDistance:n=120,loadingIndicator:i,pullIndicator:s,indicatorSize:l="md",disabled:d=false,pullText:m="Pull to refresh",releaseText:u="Release to refresh",refreshingText:c="Refreshing...",children:g,...p},x)=>{let y=Y.useRef(null),[f,h]=Y.useState(0),[R,b]=Y.useState("idle"),v=Y.useRef(0),P=Y.useRef(false),w=()=>d||R==="refreshing"?false:(y.current?.scrollTop??window.scrollY)<=0,S=k=>{w()&&(v.current=k.touches[0].clientY,P.current=true);},C=k=>{if(!P.current||!w())return;let I=k.touches[0].clientY-v.current;if(I<0){h(0),b("idle");return}let D=Math.min(I*.5,n);h(D),b(D>=a?"ready":"pulling");},M=async()=>{if(P.current)if(P.current=false,R==="ready"){b("refreshing"),h(a*.6);try{await r();}finally{b("idle"),h(0);}}else b("idle"),h(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[l],T=()=>{if(R==="refreshing")return i||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:o(N,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:c})]});let k=Math.min(f/a*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:o(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${k}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:R==="ready"?u:m})]})};return jsxs("div",{ref:x,className:o(Ch({variant:t,className:e})),...p,children:[jsx("div",{className:o(ZT({size:l}),"z-10",R==="idle"&&f===0&&"opacity-0"),style:{top:Math.max(f-60,-60),opacity:Math.min(f/(a*.5),1)},children:T()}),jsx("div",{ref:y,className:o("transition-transform duration-200",R==="refreshing"&&"ease-out"),style:{transform:`translateY(${f}px)`,transition:P.current?"none":void 0},onTouchStart:S,onTouchMove:C,onTouchEnd:M,children:g})]})});Mh.displayName="PullToRefresh";var Sh=cva("flex min-h-screen w-full",{variants:{layout:{default:"flex-col",sidebar:"flex-row"}},defaultVariants:{layout:"default"}}),kh=Y.forwardRef(({className:e,layout:t="default",header:r,footer:a,sidebar:n,aside:i,sidebarCollapsed:s=false,sidebarWidth:l="16rem",sidebarCollapsedWidth:d="4rem",asideWidth:m="16rem",fixed:u=false,children:c,...g},p)=>{let x=s?d:l;return jsxs("div",{ref:p,className:o(Sh({layout:t}),e),style:{"--app-shell-sidebar-width":x,"--app-shell-aside-width":m},...g,children:[r&&jsx($l,{fixed:u,hasSidebar:!!n,children:r}),jsxs("div",{className:"flex flex-1",children:[n&&jsx(_l,{collapsed:s,fixed:u,children:n}),jsx("main",{className:o("flex-1 flex flex-col min-h-0",u&&r&&"pt-14",u&&a&&"pb-14"),children:c}),i&&jsx(Kl,{fixed:u,children:i})]}),a&&jsx(Yl,{fixed:u,hasSidebar:!!n,children:a})]})});kh.displayName="AppShell";var $l=Y.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},i)=>jsx("header",{ref:i,className:o("flex h-14 items-center border-b bg-background px-4",t&&"fixed top-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));$l.displayName="AppShellHeader";var _l=Y.forwardRef(({className:e,collapsed:t,fixed:r,children:a,...n},i)=>jsx("aside",{ref:i,className:o("w-[var(--app-shell-sidebar-width)] shrink-0 border-r bg-background transition-[width] duration-200",r&&"fixed left-0 top-0 bottom-0 z-50",e),"data-collapsed":t,...n,children:a}));_l.displayName="AppShellSidebar";var Kl=Y.forwardRef(({className:e,fixed:t,children:r,...a},n)=>jsx("aside",{ref:n,className:o("w-[var(--app-shell-aside-width)] shrink-0 border-l bg-background",t&&"fixed right-0 top-14 bottom-0 z-40",e),...a,children:r}));Kl.displayName="AppShellAside";var Yl=Y.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},i)=>jsx("footer",{ref:i,className:o("flex h-14 items-center border-t bg-background px-4",t&&"fixed bottom-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));Yl.displayName="AppShellFooter";var Dh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex-1 overflow-auto p-4",e),...t}));Dh.displayName="AppShellMain";var Vh=cva("flex min-h-screen w-full bg-muted/40",{variants:{variant:{default:"",bordered:"[&_[data-slot=sidebar]]:border-r [&_[data-slot=header]]:border-b",filled:"[&_[data-slot=sidebar]]:bg-background [&_[data-slot=header]]:bg-background"}},defaultVariants:{variant:"bordered"}}),Ih=Y.forwardRef(({className:e,variant:t,navigation:r,logo:a,userMenu:n,headerActions:i,breadcrumb:s,defaultCollapsed:l=false,collapsed:d,onCollapsedChange:m,children:u,...c},g)=>{let[p,x]=Y.useState(l),[y,f]=Y.useState(false),h=d??p,R=Y.useCallback(b=>{x(b),m?.(b);},[m]);return jsxs("div",{ref:g,className:o(Vh({variant:t}),e),...c,children:[jsxs("aside",{"data-slot":"sidebar","data-collapsed":h,className:o("hidden lg:flex flex-col fixed inset-y-0 left-0 z-50 bg-background transition-[width] duration-200",h?"w-16":"w-64"),children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsx("div",{className:"border-t p-4",children:n})]}),jsx(So,{open:y,onOpenChange:f,children:jsxs(Aa,{side:"left",className:"w-64 p-0",children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsx("div",{className:"border-t p-4",children:n})]})}),jsxs("div",{className:o("flex flex-1 flex-col transition-[margin-left] duration-200",h?"lg:ml-16":"lg:ml-64"),children:[jsxs("header",{"data-slot":"header",className:"sticky top-0 z-40 flex h-14 items-center gap-4 bg-background px-4 lg:px-6",children:[jsxs(_,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>f(true),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle menu"})]}),jsxs(_,{variant:"ghost",size:"icon",className:"hidden lg:flex",onClick:()=>R(!h),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle sidebar"})]}),s&&jsx("div",{className:"flex-1",children:s}),i&&jsx("div",{className:"flex items-center gap-2",children:i})]}),jsx("main",{className:"flex-1 p-4 lg:p-6",children:u})]})]})});Ih.displayName="DashboardLayout";var Eh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("space-y-6",e),...t}));Eh.displayName="DashboardPage";var Hh=Y.forwardRef(({className:e,title:t,description:r,actions:a,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",e),...i,children:[jsxs("div",{className:"space-y-1",children:[t&&jsx("h1",{className:"text-2xl font-bold tracking-tight",children:t}),r&&jsx("p",{className:"text-muted-foreground",children:r}),n]}),a&&jsx("div",{className:"flex items-center gap-2",children:a})]}));Hh.displayName="DashboardPageHeader";var Ah=Y.forwardRef(({className:e,columns:t=4,...r},a)=>jsx("div",{ref:a,className:o("grid gap-4",{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t],e),...r}));Ah.displayName="DashboardGrid";var Oi=cva("min-h-screen w-full",{variants:{variant:{centered:"flex items-center justify-center bg-muted/40",split:"flex flex-col lg:flex-row",cover:"relative flex items-center justify-center"}},defaultVariants:{variant:"centered"}}),zh=Y.forwardRef(({className:e,variant:t="centered",logo:r,sideContent:a,backgroundImage:n,sidePosition:i="left",footer:s,children:l,...d},m)=>t==="split"?jsxs("div",{ref:m,className:o(Oi({variant:t}),e),...d,children:[jsx("div",{className:o("hidden lg:flex lg:w-1/2 flex-col bg-primary text-primary-foreground",i==="right"&&"order-2"),children:a||jsxs("div",{className:"flex flex-1 flex-col items-center justify-center p-8",children:[r&&jsx("div",{className:"mb-8",children:r}),jsxs("div",{className:"max-w-md text-center",children:[jsx("h2",{className:"text-3xl font-bold",children:"Welcome back"}),jsx("p",{className:"mt-4 text-primary-foreground/80",children:"Sign in to your account to continue"})]})]})}),jsxs("div",{className:o("flex flex-1 flex-col lg:w-1/2",i==="right"&&"order-1"),children:[r&&jsx("div",{className:"flex items-center justify-center p-6 lg:hidden",children:r}),jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:jsx("div",{className:"w-full max-w-md space-y-6",children:l})}),s&&jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:s})]})]}):t==="cover"?jsxs("div",{ref:m,className:o(Oi({variant:t}),e),style:n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,...d,children:[n&&jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm"}),jsxs("div",{className:"relative z-10 w-full max-w-md p-6",children:[r&&jsx("div",{className:"mb-8 flex justify-center",children:r}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-lg",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})]}):jsx("div",{ref:m,className:o(Oi({variant:t}),e),...d,children:jsxs("div",{className:"w-full max-w-md p-6",children:[r&&jsx("div",{className:"mb-8 flex justify-center",children:r}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})}));zh.displayName="AuthLayout";var Fh=Y.forwardRef(({className:e,...t},r)=>jsx("form",{ref:r,className:o("space-y-4",e),...t}));Fh.displayName="AuthForm";var Bh=Y.forwardRef(({className:e,title:t,description:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("space-y-2 text-center",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsx("p",{className:"text-muted-foreground",children:r}),a]}));Bh.displayName="AuthHeader";var Oh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("flex flex-col gap-2 text-center text-sm",e),...t}));Oh.displayName="AuthFooterLinks";var Gh=Y.forwardRef(({className:e,text:t="or continue with",...r},a)=>jsxs("div",{ref:a,className:o("relative my-4",e),...r,children:[jsx("div",{className:"absolute inset-0 flex items-center",children:jsx("span",{className:"w-full border-t"})}),jsx("div",{className:"relative flex justify-center text-xs uppercase",children:jsx("span",{className:"bg-card px-2 text-muted-foreground",children:t})})]}));Gh.displayName="AuthDivider";var Wh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("grid grid-cols-2 gap-2",e),...t}));Wh.displayName="AuthSocialButtons";var Gi=cva("w-full",{variants:{variant:{sidebar:"flex flex-col lg:flex-row gap-8",tabs:"space-y-6",stacked:"space-y-8"}},defaultVariants:{variant:"sidebar"}}),$h=Y.forwardRef(({className:e,variant:t="sidebar",navigation:r,title:a,description:n,children:i,...s},l)=>t==="sidebar"?jsxs("div",{ref:l,className:o(Gi({variant:t}),e),...s,children:[r&&jsx("aside",{className:"lg:w-64 shrink-0",children:jsx("nav",{className:"flex flex-col gap-1",children:r})}),jsxs("div",{className:"flex-1 space-y-6",children:[(a||n)&&jsx(on,{title:a,description:n}),i]})]}):t==="tabs"?jsxs("div",{ref:l,className:o(Gi({variant:t}),e),...s,children:[(a||n)&&jsx(on,{title:a,description:n}),r,jsx("div",{className:"pt-4",children:i})]}):jsxs("div",{ref:l,className:o(Gi({variant:t}),e),...s,children:[(a||n)&&jsx(on,{title:a,description:n}),i]}));$h.displayName="SettingsLayout";var on=Y.forwardRef(({className:e,title:t,description:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("space-y-1",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsx("p",{className:"text-muted-foreground",children:r}),a]}));on.displayName="SettingsHeader";var _h=Y.forwardRef(({className:e,title:t,description:r,children:a,...n},i)=>jsxs("div",{ref:i,className:o("space-y-4",e),...n,children:[(t||r)&&jsxs("div",{className:"space-y-1",children:[t&&jsx("h2",{className:"text-lg font-medium",children:t}),r&&jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),a]}));_h.displayName="SettingsSection";var Kh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("rounded-lg border bg-card p-6",e),...t}));Kh.displayName="SettingsCard";var Yh=Y.forwardRef(({className:e,label:t,description:r,htmlFor:a,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 py-4 sm:flex-row sm:items-center sm:justify-between","border-b last:border-0 first:pt-0 last:pb-0",e),...i,children:[jsxs("div",{className:"space-y-0.5",children:[t&&jsx("label",{htmlFor:a,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t}),r&&jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),jsx("div",{className:"shrink-0",children:n})]}));Yh.displayName="SettingsRow";var jh=Y.forwardRef(({className:e,active:t,icon:r,children:a,...n},i)=>jsxs("button",{ref:i,type:"button",className:o("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-muted",t&&"bg-muted",e),...n,children:[r&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:r}),a]}));jh.displayName="SettingsNavItem";var Uh=Y.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:o("h-px bg-border my-4",e),...t}));Uh.displayName="SettingsSeparator";var Ia=(e,t,r)=>({duration:e,delay:t,ease:r||[.4,0,.2,1]}),rS={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Xh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,initialOpacity:l=0,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:rS,custom:l,transition:Ia(r,a,n),className:o(i),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsx(AnimatePresence,{children:e&&c}):c});Xh.displayName="Fade";var aS=(e,t)=>{let r=typeof t=="number"?`${t}px`:t,a={up:{y:r},down:{y:`-${r}`},left:{x:r},right:{x:`-${r}`}};return {hidden:{opacity:0,...a[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...a[e]}}},qh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,direction:l="up",offset:d=20,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=Y.useMemo(()=>aS(l,d),[l,d]),p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:Ia(r,a,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});qh.displayName="Slide";var oS={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"},nS={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Zh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,initialScale:l=.9,origin:d="center",onAnimationStart:m,onAnimationComplete:u},c)=>{let g=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:nS,custom:l,transition:Ia(r,a,n),className:o(i),style:{transformOrigin:oS[d]},onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&g}):g});Zh.displayName="Scale";var Jh=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,horizontal:s=false,startingSize:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=s?"width":"height",p={hidden:{[g]:l,opacity:d?0:1},visible:{[g]:"auto",opacity:1},exit:{[g]:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Ia(r,a,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});Jh.displayName="Collapse";var Qh=Y.forwardRef(({show:e=true,children:t,duration:r=.4,delay:a=0,ease:n,className:i,initialWidth:s=0,initialHeight:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{width:s,height:l,opacity:d?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:g,transition:Ia(r,a,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});Qh.displayName="Expand";var ex=Y.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:i,unmountOnExit:s=true,initialRotation:l=-180,finalRotation:d=0,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{opacity:0,rotate:l},visible:{opacity:1,rotate:d},exit:{opacity:0,rotate:l}},p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:Ia(r,a,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});ex.displayName="Rotate";var tx=Y.forwardRef(({front:e,back:t,direction:r="horizontal",flipped:a=false,duration:n=.6,delay:i=0,ease:s,className:l,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=r==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:u,className:o("relative",l),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[c]:a?180:0},transition:Ia(n,i,s),style:{transformStyle:"preserve-3d"},onAnimationStart:d,onAnimationComplete:m,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${c}(180deg)`},children:t})]})})});tx.displayName="Flip";var rx=Y.forwardRef(({color:e="currentColor",duration:t=.6,children:r,className:a,disabled:n=false},i)=>{let[s,l]=Y.useState([]),d=Y.useRef(null),m=c=>{if(n)return;let g=d.current;if(!g)return;let p=g.getBoundingClientRect(),x=c.clientX-p.left,y=c.clientY-p.top,f=Math.max(p.width,p.height)*2,h={id:Date.now(),x,y,size:f};l(R=>[...R,h]);},u=c=>{l(g=>g.filter(p=>p.id!==c));};return jsxs("div",{ref:i,className:o("relative overflow-hidden",a),onClick:m,children:[jsx("div",{ref:d,className:"relative z-0",children:r}),jsx(AnimatePresence,{children:s.map(c=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>u(c.id),className:"pointer-events-none absolute rounded-full",style:{left:c.x-c.size/2,top:c.y-c.size/2,width:c.size,height:c.size,backgroundColor:e}},c.id))})]})});rx.displayName="Ripple";var ax=Y.forwardRef(({children:e,animate:t=true,height:r=10,duration:a=.5,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=Y.useState(false),u=s?d:t,c={idle:{y:0},bounce:{y:[0,-r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"bounce":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});ax.displayName="Bounce";var lS={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]},ox=Y.forwardRef(({children:e,animate:t=true,intensity:r="normal",duration:a=.5,count:n=1,className:i,triggerOnHover:s=false},l)=>{let[d,m]=Y.useState(false),u=s?d:t,c={idle:{x:0},shake:{x:lS[r],transition:{duration:a,ease:"easeInOut",repeat:n-1}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"shake":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});ox.displayName="Shake";var dS={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},nx=Y.forwardRef(({children:e,animate:t=true,speed:r="normal",className:a},n)=>jsx("div",{ref:n,className:o(t&&dS[r],a),children:e}));nx.displayName="Pulse";var ix=Y.forwardRef(({children:e,animate:t=true,angle:r=10,duration:a=.3,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=Y.useState(false),u=s?d:t,c={idle:{rotate:0},wiggle:{rotate:[0,-r,r,-r,r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"wiggle":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});ix.displayName="Wiggle";var sx=Y.forwardRef(({children:e,animate:t=false,scale:r=1.2,duration:a=.2,className:n,triggerOnHover:i=false,triggerOnClick:s=false},l)=>{let[d,m]=Y.useState(false),u=t||d,c={type:"spring",stiffness:400,damping:17,duration:a},g=()=>{s&&(m(true),setTimeout(()=>m(false),a*1e3));};return jsx(motion.div,{ref:l,animate:{scale:u?r:1},transition:c,className:o(n),onMouseEnter:()=>i&&m(true),onMouseLeave:()=>i&&m(false),onClick:g,children:e})});sx.displayName="Pop";var fS=(e,t,r,a)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${l}${a}${s}`:l},lx=Y.forwardRef(({value:e,from:t=0,duration:r=2,decimals:a=0,prefix:n="",suffix:i="",separator:s=",",decimalSeparator:l=".",animateOnView:d=true,delay:m=0,className:u,onComplete:c},g)=>{let p=Y.useRef(null),x=useInView(p,{once:true}),[y,f]=Y.useState(!d);Y.useEffect(()=>{if(d&&x){let v=setTimeout(()=>f(true),m*1e3);return ()=>clearTimeout(v)}},[d,x,m]);let h={damping:30,stiffness:100,duration:r*1e3},R=useSpring(y?e:t,h),b=useTransform(R,v=>fS(v,a,s,l));return Y.useEffect(()=>{y&&R.set(e);},[y,e,R]),Y.useEffect(()=>{let v=R.on("change",P=>{Math.abs(P-e)<.01&&c&&c();});return ()=>v()},[R,e,c]),jsx("span",{ref:p,className:o(u),children:jsxs("span",{ref:g,children:[n,jsx(motion.span,{children:b}),i]})})});lx.displayName="Counter";var dx=Y.forwardRef(({text:e,speed:t=50,delay:r=0,pauseBetween:a=1500,cursor:n=true,cursorChar:i="|",loop:s=false,deleteSpeed:l=30,animateOnView:d=true,className:m,cursorClassName:u,onComplete:c},g)=>{let p=Array.isArray(e)?e:[e],[x,y]=Y.useState(""),[f,h]=Y.useState(0),[R,b]=Y.useState(false),[v,P]=Y.useState(false),w=Y.useRef(null),S=useInView(w,{once:true}),[C,M]=Y.useState(!d);return Y.useEffect(()=>{if(d&&S){let N=setTimeout(()=>M(true),r*1e3);return ()=>clearTimeout(N)}},[d,S,r]),Y.useEffect(()=>{if(!C||v)return;let N=p[f],T;return R?x.length>0?T=setTimeout(()=>{y(x.slice(0,-1));},l):(b(false),h(k=>(k+1)%p.length)):x.length<N.length?T=setTimeout(()=>{y(N.slice(0,x.length+1));},t):f<p.length-1||s?T=setTimeout(()=>{b(true);},a):(P(true),c?.()),()=>clearTimeout(T)},[C,x,f,R,v,p,t,l,a,s,c]),jsxs("span",{ref:w,className:o(m),children:[jsx("span",{ref:g,children:x}),n&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:o("ml-0.5",u),children:i})]})});dx.displayName="Typewriter";var cx=Y.forwardRef(({children:e,direction:t="up",stagger:r=.05,duration:a=.5,delay:n=0,splitBy:i="word",animateOnView:s=true,className:l},d)=>{let m=Y.useRef(null),u=useInView(m,{once:true,amount:.5}),c=s?u:true,g=typeof e=="string"?e:"",p=i==="word"?g.split(" "):g.split(""),x={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},y={hidden:{},visible:{transition:{staggerChildren:r,delayChildren:n}}},f={hidden:{opacity:0,...x[t]},visible:{opacity:1,x:0,y:0,transition:{duration:a,ease:"easeInOut"}}};return jsx(motion.div,{ref:d,className:o("inline-flex flex-wrap",l),variants:y,initial:"hidden",animate:c?"visible":"hidden",children:jsx("span",{ref:m,children:p.map((h,R)=>jsxs(motion.span,{variants:f,className:"inline-block",children:[h,i==="word"&&R<p.length-1&&"\xA0"]},R))})})});cx.displayName="TextReveal";var mx=Y.forwardRef(({words:e,duration:t=2,animation:r="slide",animationDuration:a=.5,className:n,loop:i=true},s)=>{let[l,d]=Y.useState(0);Y.useEffect(()=>{if(!i&&l===e.length-1)return;let u=setInterval(()=>{d(c=>(c+1)%e.length);},t*1e3);return ()=>clearInterval(u)},[e.length,t,i,l]);let m=()=>{switch(r){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:o("relative inline-block",n),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:m(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:a},className:"inline-block",children:e[l]},e[l])})})});mx.displayName="WordRotate";var gx=Y.forwardRef(({children:e,direction:t="up",distance:r=50,duration:a=.6,delay:n=0,once:i=true,threshold:s=.1,className:l,scale:d,rotate:m,blur:u,ease:c=[.4,0,.2,1]},g)=>{let p=Y.useRef(null),x=useInView(p,{once:i,amount:s}),f={up:{x:0,y:r},down:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0},none:{x:0,y:0}}[t],h={hidden:{opacity:0,x:f.x,y:f.y,scale:d??1,rotate:m??0,filter:u?`blur(${u}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:a,delay:n,ease:c}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:g,variants:h,initial:"hidden",animate:x?"visible":"hidden",className:o(l),children:e})})});gx.displayName="ScrollReveal";var bx=Y.forwardRef(({position:e="top",size:t=4,color:r="hsl(var(--primary))",backgroundColor:a="transparent",zIndex:n=50,className:i,container:s,showPercentage:l=false,useSpring:d=true},m)=>{let{scrollYProgress:u}=useScroll({container:s}),c=useSpring(u,{stiffness:100,damping:30,restDelta:.001}),g=d?c:u,p=e==="top"||e==="bottom",x={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}},y=p?"scaleX":"scaleY",f=p?"left":"top";return jsxs("div",{ref:m,className:o("fixed",i),style:{...x[e],zIndex:n,backgroundColor:a},children:[jsx(motion.div,{className:"h-full w-full",style:{[y]:g,transformOrigin:f,backgroundColor:r}}),l&&jsx(bS,{progress:g,position:e})]})});bx.displayName="ScrollProgress";var bS=({progress:e,position:t})=>{let r=useTransform(e,s=>Math.round(s*100)),[a,n]=Y.useState(0);return Y.useEffect(()=>{let s=r.on("change",n);return ()=>s()},[r]),jsxs("span",{className:o("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:[a,"%"]})},vx=Y.forwardRef(({children:e,speed:t=.5,direction:r="vertical",className:a,container:n},i)=>{let s=Y.useRef(null),{scrollYProgress:l}=useScroll({target:s,container:n,offset:["start end","end start"]}),d=[-100*t,100*t],m=useTransform(l,[0,1],d),u=useSpring(m,{stiffness:100,damping:30}),c=r==="horizontal"?u:0,g=r==="vertical"?u:0;return jsx("div",{ref:s,className:o("overflow-hidden",a),children:jsx(motion.div,{ref:i,style:{x:c,y:g},children:e})})});vx.displayName="Parallax";var yx=Y.forwardRef(({children:e,width:t,height:r,duration:a=1.5,direction:n="right",baseColor:i="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:l,className:d,active:m=true},u)=>{let c={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},g={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:u,className:o("relative overflow-hidden",d),style:{width:t,height:r,borderRadius:l,backgroundColor:i},children:[e,m&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${c[n]}, transparent, ${s}, transparent)`,animation:`${g[n]} ${a}s infinite`}}),jsx("style",{children:`
|
|
37
37
|
@keyframes shimmer-right {
|
|
38
38
|
0% { transform: translateX(-100%); }
|
|
39
39
|
100% { transform: translateX(100%); }
|
|
@@ -50,5 +50,5 @@ import*as Y from'react';import {createContext,useContext}from'react';import {cva
|
|
|
50
50
|
0% { transform: translateY(-100%); }
|
|
51
51
|
100% { transform: translateY(100%); }
|
|
52
52
|
}
|
|
53
|
-
`})]})});yx.displayName="Shimmer";var vS={sm:24,md:40,lg:56,xl:80},hS={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"}},Rx=Y.forwardRef(({show:e=true,size:t="md",variant:r="success",strokeWidth:a=2,duration:n=.6,delay:i=0,className:s,onComplete:l},d)=>{let m=vS[t],u=hS[r],c={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:n*.5,delay:i,ease:"easeOut"}}},g={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:n*.5,delay:i+n*.4,ease:"easeOut"}}};return jsxs("svg",{ref:d,width:m,height:m,viewBox:"0 0 50 50",className:o(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:a,className:u.circle,variants:c,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",className:u.check,variants:g,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&l?.()})]})});Rx.displayName="Checkmark";var ho={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},wx=Y.forwardRef(({autoTrigger:e=false,delay:t=0,options:r={},children:a,onTrigger:n},i)=>{let s=Y.useCallback(()=>{let l={...ho,...r};vo(l),n?.();},[r,n]);return Y.useEffect(()=>{if(e){let l=setTimeout(s,t);return ()=>clearTimeout(l)}},[e,t,s]),a?jsx("button",{ref:i,type:"button",onClick:s,children:a}):null});wx.displayName="Confetti";var xS=()=>{let e=Y.useCallback(a=>{let n={...ho,...a};vo(n);},[]),t=Y.useCallback(()=>{let n=Date.now()+3e3,i=setInterval(()=>{let s=n-Date.now();if(s<=0){clearInterval(i);return}let l=50*(s/3e3);vo({...ho,particleCount:l,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),vo({...ho,particleCount:l,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),r=Y.useCallback((a="both")=>{let n={x:0,y:1},i={x:1,y:1};(a==="left"||a==="both")&&vo({...ho,particleCount:50,angle:60,spread:55,origin:n}),(a==="right"||a==="both")&&vo({...ho,particleCount:50,angle:120,spread:55,origin:i});},[]);return {fire:e,fireworks:t,cannon:r}},Nx=Y.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:r=20,spread:a=0,animate:n=false,duration:i=2,className:s},l)=>{let d={boxShadow:`0 0 ${r}px ${a}px ${t}`};return n?jsx(motion.div,{ref:l,className:o(s),animate:{boxShadow:[`0 0 ${r}px ${a}px ${t}`,`0 0 ${r*1.5}px ${a+5}px ${t}`,`0 0 ${r}px ${a}px ${t}`]},transition:{duration:i,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:l,className:o(s),style:d,children:e})});Nx.displayName="Glow";var xx=(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}),Px=Y.forwardRef(({children:e,count:t=10,color:r="hsl(var(--primary))",minSize:a=4,maxSize:n=8,duration:i=1.5,className:s},l)=>{let[d,m]=Y.useState([]);return Y.useEffect(()=>{let u=Array.from({length:t},()=>xx(a,n));m(u);let c=setInterval(()=>{m(g=>{let p=[...g],x=Math.floor(Math.random()*t);return p[x]=xx(a,n),p});},i*500);return ()=>clearInterval(c)},[t,a,n,i]),jsxs("div",{ref:l,className:o("relative inline-block",s),children:[e,d.map(u=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:u.x,top:u.y,width:u.size,height:u.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:i,delay:u.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:r})},u.id))]})});Px.displayName="Sparkles";export{r0 as Accordion,gc as AccordionItem,tv as ActionBar,rv as ActionBarButton,Gb as ActionGroup,hg as ActionIcon,ov as ActionMenu,yh as ActionSheet,Gx as Alert,$x as AlertDescription,Wx as AlertTitle,kh as AppShell,Kl as AppShellAside,Yl as AppShellFooter,$l as AppShellHeader,Dh as AppShellMain,_l as AppShellSidebar,Og as AreaChart,g0 as AspectRatio,Gh as AuthDivider,Oh as AuthFooterLinks,Fh as AuthForm,Bh as AuthHeader,zh as AuthLayout,Wh as AuthSocialButtons,of as Autocomplete,ta as Avatar,ra as AvatarFallback,Lm as AvatarGroup,Ha as AvatarImage,zp as BackTop,Yx as Badge,mh as Banner,Fg as BarChart,Sv as BatteryMeter,vh as BottomNavigation,ax as Bounce,Tc as Breadcrumb,Ic as BreadcrumbEllipsis,kc as BreadcrumbItem,Dc as BreadcrumbLink,Sc as BreadcrumbList,Lc as BreadcrumbPage,Vc as BreadcrumbSeparator,_ as Button,Hb as ButtonGroup,Pp as COUNTRIES,Oa as Calendar,id as Card,ld as CardContent,dd as CardFooter,sd as CardHeader,Ug as Carousel,Xg as CarouselContent,qg as CarouselItem,ml as CarouselNext,cl as CarouselPrevious,Wv as Center,Ro as Checkbox,Rx as Checkmark,du as Chip,hu as CircularProgress,gg as CloseButton,hf as Code,Jh as Collapse,xc as Collapsible,Rc as CollapsibleContent,yc as CollapsibleTrigger,Iv as ColorArea,Lb as ColorField,mp as ColorPicker,Av as ColorSlider,Fo as ColorSwatch,dp as ColorSwatchPicker,Fv as ColorWheel,bs as Command,z0 as CommandDialog,hm as CommandEmpty,xm as CommandGroup,bm as CommandInput,Rm as CommandItem,vm as CommandList,ym as CommandSeparator,wm as CommandShortcut,wx as Confetti,Zs as ConfirmDialog,$y as ContextMenu,ec as ContextMenuCheckboxItem,Jd as ContextMenuContent,Ky as ContextMenuGroup,Qd as ContextMenuItem,rc as ContextMenuLabel,Yy as ContextMenuPortal,Uy as ContextMenuRadioGroup,tc as ContextMenuRadioItem,ac as ContextMenuSeparator,oc as ContextMenuShortcut,jy as ContextMenuSub,Zd as ContextMenuSubContent,qd as ContextMenuSubTrigger,_y as ContextMenuTrigger,bv as ContextualHelp,Ig as CopyButton,lx as Counter,bp as CurrencyInput,jo as DEFAULT_COLORS,Ah as DashboardGrid,Ih as DashboardLayout,Eh as DashboardPage,Hh as DashboardPageHeader,Fw as DataTable,Pb as DateField,wp as DateInput,Mm as DatePicker,_f as DateRangePicker,_s as DefaultErrorFallback,Xi as Dialog,ay as DialogClose,pn as DialogContent,fd as DialogDescription,ud as DialogFooter,md as DialogHeader,qi as DialogOverlay,cd as DialogPortal,pd as DialogTitle,ry as DialogTrigger,Tv as DiskUsageMeter,fu as Dots,$c as Drawer,R0 as DrawerClose,Kc as DrawerContent,Xc as DrawerDescription,jc as DrawerFooter,Yc as DrawerHeader,us as DrawerOverlay,_c as DrawerPortal,Uc as DrawerTitle,y0 as DrawerTrigger,ia as DropdownMenu,Vd as DropdownMenuCheckboxItem,Lr as DropdownMenuContent,Cy as DropdownMenuGroup,Lt as DropdownMenuItem,Ed as DropdownMenuLabel,My as DropdownMenuPortal,Sy as DropdownMenuRadioGroup,Id as DropdownMenuRadioItem,yn as DropdownMenuSeparator,Hd as DropdownMenuShortcut,Ty as DropdownMenuSub,Ld as DropdownMenuSubContent,Dd as DropdownMenuSubTrigger,sa as DropdownMenuTrigger,pl as EMOJIS,mi as EMOJI_CATEGORIES,Jg as EmojiPicker,Lu as EmptyState,PN as ErrorBoundary,Qh as Expand,YT as FAB,Xh as Fade,As as FieldContext,np as FileUpload,tn as Flex,tx as Flip,Bl as FloatingActionButton,nf as Form,Hs as FormContext,cf as FormControl,mf as FormDescription,sf as FormField,lf as FormItem,df as FormLabel,uf as FormMessage,Ag as FullCalendar,Nx as Glow,Ii as Grid,Yv as GridItem,Pv as GridList,Ov as HStack,n0 as HoverCard,Cc as HoverCardContent,i0 as HoverCardTrigger,Fb as IconButton,Xb as IllustratedMessage,Rf as Image,ab as ImageCropper,Qs as ImageViewer,mg as ImageViewerTrigger,Ng as Indicator,Pg as IndicatorWrapper,Xf as InfiniteScroll,Qb as InlineAlert,gn as Input,Ru as InputOTP,wu as InputOTPGroup,Pu as InputOTPSeparator,Nu as InputOTPSlot,Kg as KanbanBoard,kg as Kbd,ea as Label,Qv as LabeledValue,th as LabeledValueGroup,zg as LineChart,Hp as Link,zu as List,Bu as ListItem,Ou as ListItemText,dv as ListView,Tf as Listbox,Sf as ListboxItem,Wf as Loading,Hf as LoadingOverlay,Ts as MASK_PRESETS,xp as MaskedInput,Fp as Menubar,_p as MenubarCheckboxItem,Wp as MenubarContent,Cw as MenubarGroup,$p as MenubarItem,Yp as MenubarLabel,Pw as MenubarMenu,Mw as MenubarPortal,Sw as MenubarRadioGroup,Kp as MenubarRadioItem,jp as MenubarSeparator,Up as MenubarShortcut,Tw as MenubarSub,Gp as MenubarSubContent,Op as MenubarSubTrigger,Bp as MenubarTrigger,ki as Meter,tg as Modal,ng as ModalBody,FN as ModalClose,ag as ModalContent,lg as ModalDescription,ig as ModalFooter,og as ModalHeader,qs as ModalOverlay,rg as ModalPortal,AN as ModalRoot,sg as ModalTitle,zN as ModalTrigger,zf as NProgress,Sp as Navbar,kp as NavbarBrand,Dp as NavbarContent,Lp as NavbarItem,Vp as NavbarLink,Hc as NavigationMenu,Bc as NavigationMenuContent,Oc as NavigationMenuIndicator,h0 as NavigationMenuItem,x0 as NavigationMenuLink,Ac as NavigationMenuList,Fc as NavigationMenuTrigger,ms as NavigationMenuViewport,dh as NotificationCenter,vb as NumberField,Pm as NumberInput,cm as Pagination,mm as PaginationContent,gm as PaginationEllipsis,um as PaginationItem,kn as PaginationLink,fm as PaginationNext,pm as PaginationPrevious,vx as Parallax,Nm as PasswordInput,Cp as PhoneInput,Bg as PieChart,sx as Pop,Ie as Popover,es as PopoverAnchor,Me as PopoverContent,$e as PopoverTrigger,Rg as Portal,Mn as Progress,Mh as PullToRefresh,nx as Pulse,nb as QRCode,nc as RadioGroup,ic as RadioGroupItem,uv as RangeSlider,Im as Rating,gR as ResizableHandle,fR as ResizablePanel,pR as ResizablePanelGroup,eb as RichTextEditor,rx as Ripple,ex as Rotate,Zh as Scale,ze as ScrollArea,ns as ScrollBar,bx as ScrollProgress,gx as ScrollReveal,Tg as ScrollShadow,ih as SearchBar,Rb as SearchField,ep as SegmentedControl,tp as SegmentedControlItem,kd as Select,kr as Separator,Kh as SettingsCard,on as SettingsHeader,$h as SettingsLayout,jh as SettingsNavItem,Yh as SettingsRow,_h as SettingsSection,Uh as SettingsSeparator,ox as Shake,To as Sheet,Ey as SheetClose,Aa as SheetContent,Xd as SheetDescription,jd as SheetFooter,Yd as SheetHeader,as as SheetOverlay,_d as SheetPortal,Ud as SheetTitle,Iy as SheetTrigger,yx as Shimmer,Am as Sidebar,Km as SidebarContent,$m as SidebarFooter,Ym as SidebarGroup,Um as SidebarGroupAction,Xm as SidebarGroupContent,jm as SidebarGroupLabel,Wm as SidebarHeader,Gm as SidebarInset,qm as SidebarMenu,eu as SidebarMenuAction,tu as SidebarMenuBadge,Qm as SidebarMenuButton,Zm as SidebarMenuItem,ru as SidebarMenuSkeleton,au as SidebarMenuSub,nu as SidebarMenuSubButton,ou as SidebarMenuSubItem,Bm as SidebarPersistentToggle,Hm as SidebarProvider,Om as SidebarRail,_m as SidebarSeparator,Fm as SidebarToggle,zm as SidebarTrigger,jv as SimpleGrid,hn as Skeleton,qh as Slide,Nn as Slider,yf as Snippet,mN as SortableList,Lg as Spacer,Px as Sparkles,im as Spinner,lh as SpotlightSearch,Eu as StatCard,Yb as StatusLight,Jp as Step,qp as Steps,Nh as SwipeActions,xd as Switch,qc as Table,Jc as TableBody,am as TableCaption,rm as TableCell,Qc as TableFooter,tm as TableHead,Zc as TableHeader,em as TableRow,Od as Tabs,$d as TabsContent,Gd as TabsList,Wd as TabsTrigger,xv as TagGroup,Su as TagInput,ji as TextBadge,ub as TextField,cx as TextReveal,yd as Textarea,ib as ThemeProvider,sb as ThemeToggle,Tb as TimeField,pp as TimeInput,Kf as TimePicker,_u as Timeline,Uu as TimelineContent,Yu as TimelineItem,Xu as TimelineOpposite,ju as TimelineSeparator,zy as Toaster,lc as Toggle,cc as ToggleGroup,mc as ToggleGroupItem,oa as Tooltip,Dr as TooltipContent,aa as TooltipProvider,na as TooltipTrigger,tf as TreeView,dx as Typewriter,gf as User,Gv as VStack,kN as VirtualList,_o as VisuallyHidden,qv as Well,ix as Wiggle,mx as WordRotate,ev as actionBarVariants,Ob as actionGroupVariants,vg as actionIconVariants,av as actionMenuTriggerVariants,xh as actionSheetItemVariants,Bx as alertVariants,Sh as appShellVariants,On as applyMask,Oi as authLayoutVariants,af as autocompleteInputVariants,Dm as avatarGroupVariants,Ap as backTopVariants,_x as badgeIndicatorVariants,ch as bannerVariants,bh as bottomNavigationVariants,Ib as buttonGroupVariants,Jt as buttonVariants,nd as cardVariants,Yg as carouselVariants,Yo as chartContainerVariants,lu as chipVariants,vu as circularProgressVariants,fg as closeButtonVariants,o as cn,vf as codeVariants,kv as colorAreaVariants,Db as colorFieldVariants,Hv as colorSliderVariants,lp as colorSwatchPickerVariants,sp as colorSwatchVariants,zv as colorWheelVariants,cg as confirmDialogIconVariants,gv as contextualHelpTriggerVariants,Vg as copyButtonVariants,fp as currencyInputVariants,Vh as dashboardLayoutVariants,Nb as dateFieldVariants,yp as dateInputVariants,pu as dotsVariants,Zg as emojiPickerVariants,Du as emptyStateVariants,rn as fabVariants,rp as fileUploadVariants,Bv as flexVariants,Ms as formatCurrency,Wn as formatDate,Fn as formatFileSize,_n as formatPhoneNumber,Hg as fullCalendarVariants,ap as getFileIcon,hp as getMaskPlaceholder,Kv as gridItemVariants,Nv as gridListItemVariants,wv as gridListVariants,_v as gridVariants,Lv as hexToRgb,Li as hsvToRgb,zb as iconButtonVariants,Ub as illustratedMessageVariants,rb as imageCropperVariants,Os as imageVariants,wg as indicatorVariants,js as infiniteScrollLoaderVariants,Uf as infiniteScrollVariants,Jb as inlineAlertVariants,yu as inputOTPVariants,cb as inputSizeVariants,$g as kanbanBoardVariants,ll as kanbanCardVariants,_g as kanbanColumnVariants,Sg as kbdVariants,mb as labelSizeVariants,eh as labeledValueGroupVariants,Jv as labeledValueVariants,Ep as linkVariants,Fu as listItemVariants,Au as listVariants,lv as listViewItemVariants,sv as listViewVariants,Cf as listboxItemVariants,Pf as listboxVariants,Ef as loadingOverlayVariants,Gf as loadingVariants,vp as maskedInputVariants,Mv as meterVariants,Xs as modalContentVariants,Tp as navbarVariants,zc as navigationMenuTriggerStyle,IT as notificationCenterVariants,Af as nprogressVariants,bb as numberFieldVariants,Rp as parseDate,gp as parseFormattedValue,Np as phoneInputVariants,Ch as pullToRefreshVariants,vl as qrCodeVariants,mv as rangeSliderVariants,Vm as ratingVariants,Vv as rgbToHex,Dv as rgbToHsv,Qg as richTextEditorVariants,Mg as scrollShadowVariants,nh as searchBarVariants,yb as searchFieldVariants,Ju as segmentedControlItemVariants,Zu as segmentedControlVariants,Sd as selectVariants,Gi as settingsLayoutVariants,Kd as sheetVariants,Jm as sidebarMenuButtonVariants,wd as skeletonVariants,xf as snippetVariants,Lf as sortableItemVariants,Df as sortableListVariants,nm as spinnerVariants,Iu as statCardVariants,Kb as statusLightVariants,Zp as stepVariants,Xp as stepsVariants,Gl as swipeActionVariants,wh as swipeActionsVariants,Vl as tagGroupItemVariants,hv as tagGroupVariants,Tu as tagVariants,jx as textBadgeVariants,db as textFieldVariants,UC as themeToggleVariants,Mb as timeFieldVariants,up as timeInputVariants,Ku as timelineItemVariants,$u as timelineVariants,wn as toggleVariants,ef as treeViewVariants,Ss as unmask,vM as useButtonGroup,dl as useCarousel,xS as useConfetti,YN as useConfirmDialog,jn as useFieldContext,zs as useFormContext,In as useSidebar,CT as useSpotlight,ff as userVariants,op as validateFile,Zw as validators,Yf as virtualListVariants,Xv as wellVariants};//# sourceMappingURL=index.js.map
|
|
53
|
+
`})]})});yx.displayName="Shimmer";var vS={sm:24,md:40,lg:56,xl:80},hS={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"}},Rx=Y.forwardRef(({show:e=true,size:t="md",variant:r="success",strokeWidth:a=2,duration:n=.6,delay:i=0,className:s,onComplete:l},d)=>{let m=vS[t],u=hS[r],c={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:n*.5,delay:i,ease:"easeOut"}}},g={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:n*.5,delay:i+n*.4,ease:"easeOut"}}};return jsxs("svg",{ref:d,width:m,height:m,viewBox:"0 0 50 50",className:o(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:a,className:u.circle,variants:c,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",className:u.check,variants:g,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&l?.()})]})});Rx.displayName="Checkmark";var ho={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},wx=Y.forwardRef(({autoTrigger:e=false,delay:t=0,options:r={},children:a,onTrigger:n},i)=>{let s=Y.useCallback(()=>{let l={...ho,...r};vo(l),n?.();},[r,n]);return Y.useEffect(()=>{if(e){let l=setTimeout(s,t);return ()=>clearTimeout(l)}},[e,t,s]),a?jsx("button",{ref:i,type:"button",onClick:s,children:a}):null});wx.displayName="Confetti";var xS=()=>{let e=Y.useCallback(a=>{let n={...ho,...a};vo(n);},[]),t=Y.useCallback(()=>{let n=Date.now()+3e3,i=setInterval(()=>{let s=n-Date.now();if(s<=0){clearInterval(i);return}let l=50*(s/3e3);vo({...ho,particleCount:l,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),vo({...ho,particleCount:l,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),r=Y.useCallback((a="both")=>{let n={x:0,y:1},i={x:1,y:1};(a==="left"||a==="both")&&vo({...ho,particleCount:50,angle:60,spread:55,origin:n}),(a==="right"||a==="both")&&vo({...ho,particleCount:50,angle:120,spread:55,origin:i});},[]);return {fire:e,fireworks:t,cannon:r}},Nx=Y.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:r=20,spread:a=0,animate:n=false,duration:i=2,className:s},l)=>{let d={boxShadow:`0 0 ${r}px ${a}px ${t}`};return n?jsx(motion.div,{ref:l,className:o(s),animate:{boxShadow:[`0 0 ${r}px ${a}px ${t}`,`0 0 ${r*1.5}px ${a+5}px ${t}`,`0 0 ${r}px ${a}px ${t}`]},transition:{duration:i,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:l,className:o(s),style:d,children:e})});Nx.displayName="Glow";var xx=(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}),Px=Y.forwardRef(({children:e,count:t=10,color:r="hsl(var(--primary))",minSize:a=4,maxSize:n=8,duration:i=1.5,className:s},l)=>{let[d,m]=Y.useState([]);return Y.useEffect(()=>{let u=Array.from({length:t},()=>xx(a,n));m(u);let c=setInterval(()=>{m(g=>{let p=[...g],x=Math.floor(Math.random()*t);return p[x]=xx(a,n),p});},i*500);return ()=>clearInterval(c)},[t,a,n,i]),jsxs("div",{ref:l,className:o("relative inline-block",s),children:[e,d.map(u=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:u.x,top:u.y,width:u.size,height:u.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:i,delay:u.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:r})},u.id))]})});Px.displayName="Sparkles";export{r0 as Accordion,gc as AccordionItem,tv as ActionBar,rv as ActionBarButton,Gb as ActionGroup,hg as ActionIcon,ov as ActionMenu,yh as ActionSheet,Gx as Alert,$x as AlertDescription,Wx as AlertTitle,kh as AppShell,Kl as AppShellAside,Yl as AppShellFooter,$l as AppShellHeader,Dh as AppShellMain,_l as AppShellSidebar,Og as AreaChart,g0 as AspectRatio,Gh as AuthDivider,Oh as AuthFooterLinks,Fh as AuthForm,Bh as AuthHeader,zh as AuthLayout,Wh as AuthSocialButtons,of as Autocomplete,ta as Avatar,ra as AvatarFallback,Lm as AvatarGroup,Ha as AvatarImage,zp as BackTop,Yx as Badge,mh as Banner,Fg as BarChart,Sv as BatteryMeter,vh as BottomNavigation,ax as Bounce,Tc as Breadcrumb,Ic as BreadcrumbEllipsis,kc as BreadcrumbItem,Dc as BreadcrumbLink,Sc as BreadcrumbList,Lc as BreadcrumbPage,Vc as BreadcrumbSeparator,_ as Button,Hb as ButtonGroup,Pp as COUNTRIES,Oa as Calendar,id as Card,ld as CardContent,dd as CardFooter,sd as CardHeader,Ug as Carousel,Xg as CarouselContent,qg as CarouselItem,ml as CarouselNext,cl as CarouselPrevious,Wv as Center,Ro as Checkbox,Rx as Checkmark,du as Chip,hu as CircularProgress,gg as CloseButton,hf as Code,Jh as Collapse,xc as Collapsible,Rc as CollapsibleContent,yc as CollapsibleTrigger,Iv as ColorArea,Lb as ColorField,mp as ColorPicker,Av as ColorSlider,Fo as ColorSwatch,dp as ColorSwatchPicker,Fv as ColorWheel,bs as Command,z0 as CommandDialog,hm as CommandEmpty,xm as CommandGroup,bm as CommandInput,Rm as CommandItem,vm as CommandList,ym as CommandSeparator,wm as CommandShortcut,wx as Confetti,Zs as ConfirmDialog,$y as ContextMenu,ec as ContextMenuCheckboxItem,Jd as ContextMenuContent,Ky as ContextMenuGroup,Qd as ContextMenuItem,rc as ContextMenuLabel,Yy as ContextMenuPortal,Uy as ContextMenuRadioGroup,tc as ContextMenuRadioItem,ac as ContextMenuSeparator,oc as ContextMenuShortcut,jy as ContextMenuSub,Zd as ContextMenuSubContent,qd as ContextMenuSubTrigger,_y as ContextMenuTrigger,bv as ContextualHelp,Ig as CopyButton,lx as Counter,bp as CurrencyInput,jo as DEFAULT_COLORS,Ah as DashboardGrid,Ih as DashboardLayout,Eh as DashboardPage,Hh as DashboardPageHeader,Fw as DataTable,Pb as DateField,wp as DateInput,Mm as DatePicker,_f as DateRangePicker,_s as DefaultErrorFallback,Xi as Dialog,ay as DialogClose,pn as DialogContent,fd as DialogDescription,ud as DialogFooter,md as DialogHeader,qi as DialogOverlay,cd as DialogPortal,pd as DialogTitle,ry as DialogTrigger,Tv as DiskUsageMeter,fu as Dots,$c as Drawer,R0 as DrawerClose,Kc as DrawerContent,Xc as DrawerDescription,jc as DrawerFooter,Yc as DrawerHeader,us as DrawerOverlay,_c as DrawerPortal,Uc as DrawerTitle,y0 as DrawerTrigger,ia as DropdownMenu,Vd as DropdownMenuCheckboxItem,Lr as DropdownMenuContent,My as DropdownMenuGroup,Lt as DropdownMenuItem,Ed as DropdownMenuLabel,Ty as DropdownMenuPortal,ky as DropdownMenuRadioGroup,Id as DropdownMenuRadioItem,yn as DropdownMenuSeparator,Hd as DropdownMenuShortcut,Sy as DropdownMenuSub,Ld as DropdownMenuSubContent,Dd as DropdownMenuSubTrigger,sa as DropdownMenuTrigger,pl as EMOJIS,mi as EMOJI_CATEGORIES,Jg as EmojiPicker,Lu as EmptyState,PN as ErrorBoundary,Qh as Expand,YT as FAB,Xh as Fade,As as FieldContext,np as FileUpload,tn as Flex,tx as Flip,Bl as FloatingActionButton,nf as Form,Hs as FormContext,cf as FormControl,mf as FormDescription,sf as FormField,lf as FormItem,df as FormLabel,uf as FormMessage,Ag as FullCalendar,Nx as Glow,Ii as Grid,Yv as GridItem,Pv as GridList,Ov as HStack,n0 as HoverCard,Cc as HoverCardContent,i0 as HoverCardTrigger,Fb as IconButton,Xb as IllustratedMessage,Rf as Image,ab as ImageCropper,Qs as ImageViewer,mg as ImageViewerTrigger,Ng as Indicator,Pg as IndicatorWrapper,Xf as InfiniteScroll,Qb as InlineAlert,gn as Input,Ru as InputOTP,wu as InputOTPGroup,Pu as InputOTPSeparator,Nu as InputOTPSlot,Kg as KanbanBoard,kg as Kbd,ea as Label,Qv as LabeledValue,th as LabeledValueGroup,zg as LineChart,Hp as Link,zu as List,Bu as ListItem,Ou as ListItemText,dv as ListView,Tf as Listbox,Sf as ListboxItem,Wf as Loading,Hf as LoadingOverlay,Ts as MASK_PRESETS,xp as MaskedInput,Fp as Menubar,_p as MenubarCheckboxItem,Wp as MenubarContent,Cw as MenubarGroup,$p as MenubarItem,Yp as MenubarLabel,Pw as MenubarMenu,Mw as MenubarPortal,Sw as MenubarRadioGroup,Kp as MenubarRadioItem,jp as MenubarSeparator,Up as MenubarShortcut,Tw as MenubarSub,Gp as MenubarSubContent,Op as MenubarSubTrigger,Bp as MenubarTrigger,ki as Meter,tg as Modal,ng as ModalBody,FN as ModalClose,ag as ModalContent,lg as ModalDescription,ig as ModalFooter,og as ModalHeader,qs as ModalOverlay,rg as ModalPortal,AN as ModalRoot,sg as ModalTitle,zN as ModalTrigger,zf as NProgress,Sp as Navbar,kp as NavbarBrand,Dp as NavbarContent,Lp as NavbarItem,Vp as NavbarLink,Hc as NavigationMenu,Bc as NavigationMenuContent,Oc as NavigationMenuIndicator,h0 as NavigationMenuItem,x0 as NavigationMenuLink,Ac as NavigationMenuList,Fc as NavigationMenuTrigger,ms as NavigationMenuViewport,dh as NotificationCenter,vb as NumberField,Pm as NumberInput,cm as Pagination,mm as PaginationContent,gm as PaginationEllipsis,um as PaginationItem,kn as PaginationLink,fm as PaginationNext,pm as PaginationPrevious,vx as Parallax,Nm as PasswordInput,Cp as PhoneInput,Bg as PieChart,sx as Pop,Ee as Popover,rs as PopoverAnchor,Te as PopoverContent,_e as PopoverTrigger,Rg as Portal,Mn as Progress,Mh as PullToRefresh,nx as Pulse,nb as QRCode,nc as RadioGroup,ic as RadioGroupItem,uv as RangeSlider,Im as Rating,gR as ResizableHandle,fR as ResizablePanel,pR as ResizablePanelGroup,eb as RichTextEditor,rx as Ripple,ex as Rotate,Zh as Scale,Me as ScrollArea,es as ScrollBar,bx as ScrollProgress,gx as ScrollReveal,Tg as ScrollShadow,ih as SearchBar,Rb as SearchField,ep as SegmentedControl,tp as SegmentedControlItem,kd as Select,kr as Separator,Kh as SettingsCard,on as SettingsHeader,$h as SettingsLayout,jh as SettingsNavItem,Yh as SettingsRow,_h as SettingsSection,Uh as SettingsSeparator,ox as Shake,So as Sheet,Hy as SheetClose,Aa as SheetContent,Xd as SheetDescription,jd as SheetFooter,Yd as SheetHeader,ns as SheetOverlay,_d as SheetPortal,Ud as SheetTitle,Ey as SheetTrigger,yx as Shimmer,Am as Sidebar,Km as SidebarContent,$m as SidebarFooter,Ym as SidebarGroup,Um as SidebarGroupAction,Xm as SidebarGroupContent,jm as SidebarGroupLabel,Wm as SidebarHeader,Gm as SidebarInset,qm as SidebarMenu,eu as SidebarMenuAction,tu as SidebarMenuBadge,Qm as SidebarMenuButton,Zm as SidebarMenuItem,ru as SidebarMenuSkeleton,au as SidebarMenuSub,nu as SidebarMenuSubButton,ou as SidebarMenuSubItem,Bm as SidebarPersistentToggle,Hm as SidebarProvider,Om as SidebarRail,_m as SidebarSeparator,Fm as SidebarToggle,zm as SidebarTrigger,jv as SimpleGrid,hn as Skeleton,qh as Slide,Nn as Slider,yf as Snippet,mN as SortableList,Lg as Spacer,Px as Sparkles,im as Spinner,lh as SpotlightSearch,Eu as StatCard,Yb as StatusLight,Jp as Step,qp as Steps,Nh as SwipeActions,xd as Switch,qc as Table,Jc as TableBody,am as TableCaption,rm as TableCell,Qc as TableFooter,tm as TableHead,Zc as TableHeader,em as TableRow,Od as Tabs,$d as TabsContent,Gd as TabsList,Wd as TabsTrigger,xv as TagGroup,Su as TagInput,ji as TextBadge,ub as TextField,cx as TextReveal,yd as Textarea,ib as ThemeProvider,sb as ThemeToggle,Tb as TimeField,pp as TimeInput,Kf as TimePicker,_u as Timeline,Uu as TimelineContent,Yu as TimelineItem,Xu as TimelineOpposite,ju as TimelineSeparator,Fy as Toaster,lc as Toggle,cc as ToggleGroup,mc as ToggleGroupItem,oa as Tooltip,Dr as TooltipContent,aa as TooltipProvider,na as TooltipTrigger,tf as TreeView,dx as Typewriter,gf as User,Gv as VStack,kN as VirtualList,_o as VisuallyHidden,qv as Well,ix as Wiggle,mx as WordRotate,ev as actionBarVariants,Ob as actionGroupVariants,vg as actionIconVariants,av as actionMenuTriggerVariants,xh as actionSheetItemVariants,Bx as alertVariants,Sh as appShellVariants,On as applyMask,Oi as authLayoutVariants,af as autocompleteInputVariants,Dm as avatarGroupVariants,Ap as backTopVariants,_x as badgeIndicatorVariants,ch as bannerVariants,bh as bottomNavigationVariants,Ib as buttonGroupVariants,Jt as buttonVariants,nd as cardVariants,Yg as carouselVariants,Yo as chartContainerVariants,lu as chipVariants,vu as circularProgressVariants,fg as closeButtonVariants,o as cn,vf as codeVariants,kv as colorAreaVariants,Db as colorFieldVariants,Hv as colorSliderVariants,lp as colorSwatchPickerVariants,sp as colorSwatchVariants,zv as colorWheelVariants,cg as confirmDialogIconVariants,gv as contextualHelpTriggerVariants,Vg as copyButtonVariants,fp as currencyInputVariants,Vh as dashboardLayoutVariants,Nb as dateFieldVariants,yp as dateInputVariants,pu as dotsVariants,Zg as emojiPickerVariants,Du as emptyStateVariants,rn as fabVariants,rp as fileUploadVariants,Bv as flexVariants,Ms as formatCurrency,Wn as formatDate,Fn as formatFileSize,_n as formatPhoneNumber,Hg as fullCalendarVariants,ap as getFileIcon,hp as getMaskPlaceholder,Kv as gridItemVariants,Nv as gridListItemVariants,wv as gridListVariants,_v as gridVariants,Lv as hexToRgb,Li as hsvToRgb,zb as iconButtonVariants,Ub as illustratedMessageVariants,rb as imageCropperVariants,Os as imageVariants,wg as indicatorVariants,js as infiniteScrollLoaderVariants,Uf as infiniteScrollVariants,Jb as inlineAlertVariants,yu as inputOTPVariants,cb as inputSizeVariants,$g as kanbanBoardVariants,ll as kanbanCardVariants,_g as kanbanColumnVariants,Sg as kbdVariants,mb as labelSizeVariants,eh as labeledValueGroupVariants,Jv as labeledValueVariants,Ep as linkVariants,Fu as listItemVariants,Au as listVariants,lv as listViewItemVariants,sv as listViewVariants,Cf as listboxItemVariants,Pf as listboxVariants,Ef as loadingOverlayVariants,Gf as loadingVariants,vp as maskedInputVariants,Mv as meterVariants,Xs as modalContentVariants,Tp as navbarVariants,zc as navigationMenuTriggerStyle,IT as notificationCenterVariants,Af as nprogressVariants,bb as numberFieldVariants,Rp as parseDate,gp as parseFormattedValue,Np as phoneInputVariants,Ch as pullToRefreshVariants,vl as qrCodeVariants,mv as rangeSliderVariants,Vm as ratingVariants,Vv as rgbToHex,Dv as rgbToHsv,Qg as richTextEditorVariants,Mg as scrollShadowVariants,nh as searchBarVariants,yb as searchFieldVariants,Ju as segmentedControlItemVariants,Zu as segmentedControlVariants,Sd as selectVariants,Gi as settingsLayoutVariants,Kd as sheetVariants,Jm as sidebarMenuButtonVariants,wd as skeletonVariants,xf as snippetVariants,Lf as sortableItemVariants,Df as sortableListVariants,nm as spinnerVariants,Iu as statCardVariants,Kb as statusLightVariants,Zp as stepVariants,Xp as stepsVariants,Gl as swipeActionVariants,wh as swipeActionsVariants,Vl as tagGroupItemVariants,hv as tagGroupVariants,Tu as tagVariants,jx as textBadgeVariants,db as textFieldVariants,UC as themeToggleVariants,Mb as timeFieldVariants,up as timeInputVariants,Ku as timelineItemVariants,$u as timelineVariants,wn as toggleVariants,ef as treeViewVariants,Ss as unmask,vM as useButtonGroup,dl as useCarousel,xS as useConfetti,YN as useConfirmDialog,jn as useFieldContext,zs as useFormContext,In as useSidebar,CT as useSpotlight,ff as userVariants,op as validateFile,Zw as validators,Yf as virtualListVariants,Xv as wellVariants};//# sourceMappingURL=index.js.map
|
|
54
54
|
//# sourceMappingURL=index.js.map
|