@reeverdev/ui 0.2.193 → 0.2.195
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 +7 -43
- package/dist/index.d.ts +7 -43
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as X from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,Calendar,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Ba from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import HM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import $M from'@tiptap/starter-kit';import GM from'@tiptap/extension-link';import UM from'@tiptap/extension-underline';import jM from'@tiptap/extension-text-align';import WM from'@tiptap/extension-placeholder';import pN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import RN from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import So from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var By=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"}}),Fy={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Ky=X.forwardRef(({className:e,variant:t="solid",type:n="default",radius:r="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=Fy[n],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u(By({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});Ky.displayName="Alert";var $y=X.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));$y.displayName="AlertTitle";var Gy=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("text-sm [&_p]:leading-relaxed",e),...t}));Gy.displayName="AlertDescription";var Uy=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),jy={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},Wy={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},_y=X.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,showPing:l=false,...c},d)=>jsxs("div",{ref:d,className:u("relative inline-flex",e),...c,children:[t,jsxs("span",{className:u(Uy({variant:r,color:o,size:i?void 0:a,placement:s}),i&&jy[a||"md"],i&&"min-w-0 p-0"),children:[l&&jsx("span",{className:u("absolute inset-0 rounded-full animate-ping opacity-75",Wy[o||"default"])}),!i&&n]})]}));_y.displayName="Badge";var Yy=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"}}),Xy=X.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:u(Yy({color:t,size:n}),e),...r}));Xy.displayName="TextBadge";var Xc=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),Zy={sm:"text-xs",md:"text-sm",lg:"text-base"},Na=X.forwardRef(({className:e,size:t="md",color:n,label:r="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(Xc({size:t,color:s?void 0:n})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":r,children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",Zy[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Na.displayName="Spinner";var Zc=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),Qc=X.createContext({});function vi(){return X.useContext(Qc)}var Jc=X.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(Qc.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(Zc({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));Jc.displayName="ButtonGroup";var qr=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"border-zinc-300 dark:border-zinc-700 text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"border-green-600 dark:border-green-500 text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white hover:border-green-600 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white dark:hover:border-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"border-amber-600 dark:border-amber-500 text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white hover:border-amber-600 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white dark:hover:border-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"border-red-600 dark:border-red-500 text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white hover:border-red-600 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white dark:hover:border-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"border-blue-600 dark:border-blue-500 text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white hover:border-blue-600 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:hover:border-blue-500"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=vi(),b=d||h.disabled||s,v=m,y=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",w=s?jsxs(Fragment,{children:[jsx(Na,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:a,className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y),style:v,...p,children:w}):jsx("button",{type:"button",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y),ref:g,disabled:b,style:v,...p,children:w})});ae.displayName="Button";var rd=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"lg"}}),od=X.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:u(rd({radius:t,className:e})),...n}));od.displayName="Card";var ad=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex flex-col space-y-1.5 p-6",e),...t}));ad.displayName="CardHeader";var sd=X.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));sd.displayName="CardTitle";var id=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));id.displayName="CardDescription";var ld=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("p-6 pt-0",e),...t}));ld.displayName="CardContent";var cd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center p-6 pt-0",e),...t}));cd.displayName="CardFooter";var Oo=X.forwardRef(({className:e,checked:t,defaultChecked:n=false,onCheckedChange:r,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,[v,y]=X.useState(false),x=X.useId(),w=()=>{if(o)return;let k=b==="indeterminate"?true:!b;h||g(k),r?.(k);},C=k=>{k.key==="Enter"&&k.preventDefault(),d?.(k);},R=b===true,T=b==="indeterminate",M=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?x:void 0,"aria-checked":T?"mixed":R,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",R&&"bg-primary text-primary-foreground",T&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:w,onKeyDown:C,onFocus:()=>y(true),onBlur:()=>y(false),...m,children:(R||T)&&jsx("span",{className:"flex items-center justify-center text-current",children:T?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:R,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[M,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:x,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):M});Oo.displayName="Checkbox";var a0=cva("flex w-full border border-input bg-background px-3 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Pa=X.forwardRef(({className:e,type:t,size:n,radius:r,label:o,isRequired:a,description:s,errorMessage:i,isInvalid:l,onFocus:c,onBlur:d,style:m,...f},p)=>{let[g,h]=X.useState(false),b=X.useId(),v=f.id||b,y=l||!!i,x=jsx("input",{id:v,type:t,className:u(a0({size:n,radius:r}),y&&"border-danger focus:border-danger",!o&&e),ref:p,required:a,"aria-invalid":y,"aria-describedby":s||i?`${v}-description`:void 0,style:{...m,borderColor:y?void 0:g?"var(--color-foreground)":void 0},onFocus:w=>{h(true),c?.(w);},onBlur:w=>{h(false),d?.(w);},...f});return !o&&!s&&!i?x:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[o&&jsxs("label",{htmlFor:v,className:"text-sm font-medium leading-none",children:[o,a&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),x,(s||i)&&jsx("p",{id:`${v}-description`,className:u("text-xs",y?"text-danger":"text-muted-foreground"),children:i||s})]})});Pa.displayName="Input";var i0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cr=X.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:u(i0(),e),...t}));Cr.displayName="Label";var jn=X.forwardRef(({className:e,orientation:t="horizontal",decorative:n=true,text:r,...o},a)=>{let s=n?{role:"none"}:{role:"separator","aria-orientation":t};return r&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:r}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});jn.displayName="Separator";var d0="peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",La={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},pd={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},fd=X.forwardRef(({className:e,color:t,size:n="md",customColor:r,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=X.useState(a),v=o!==void 0,y=v?o:h,x=()=>{if(i)return;let T=!y;v||b(T),s?.(T);},w=T=>{T.key==="Enter"&&T.preventDefault(),m?.(T);},C=t&&La[t]?La[t]:La.default,R=pd[n]||pd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":y,"aria-required":l,"data-state":y?"checked":"unchecked",disabled:i,ref:g,className:u(d0,R.track,y?r?"":C:"bg-input",e),style:r&&y?{backgroundColor:r,...f}:f,onClick:x,onKeyDown:w,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",R.thumb,y?R.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:y,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});fd.displayName="Switch";var f0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"md"}}),gd=X.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=X.useState(false);return jsx("textarea",{className:u(f0({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),n?.(c);},onBlur:c=>{l(false),r?.(c);},...a})});gd.displayName="Textarea";var vd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Ha=X.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:u(vd({variant:t,className:e})),...n}));Ha.displayName="Skeleton";var x0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),hd=X.createContext(null),xd=()=>{let e=X.useContext(hd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Tr=X.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=X.useState("idle");return jsx(hd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(x0({size:t,radius:n,className:e})),...r})})});Tr.displayName="Avatar";var Jr=X.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=xd();return X.useEffect(()=>{if(!t){i("error");return}i("loading"),r?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),r?.("loaded");},l.onerror=()=>{i("error"),r?.("error");};},[t,i,r]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:n,className:u("aspect-square h-full w-full object-cover",e),...o})});Jr.displayName="AvatarImage";var Mr=X.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=xd(),[s,i]=X.useState(t===0);return X.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Mr.displayName="AvatarFallback";var Rd=X.createContext({delayDuration:700,skipDelayDuration:300}),Wn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(Rd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});Wn.displayName="TooltipProvider";var wd=X.createContext(null),Cd=()=>{let e=X.useContext(wd);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},_n=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=X.useContext(Rd),[s,i]=X.useState(n),l=t!==void 0,c=l?t:s,d=X.useRef(null),m=X.useId(),f=X.useRef(null),p=o??a.delayDuration,g=X.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),r?.(true);},p):(l||i(false),r?.(false));},[l,r,p]);return X.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(wd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};_n.displayName="Tooltip";var Yn=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Cd();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{n?.(h),i(false);},onFocus:h=>{r?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});Yn.displayName="TooltipTrigger";var Xn=X.forwardRef(({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Cd(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);if(X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),x=0,w=0;switch(t){case "top":x=v.top-y.height-n;break;case "bottom":x=v.bottom+n;break;case "left":w=v.left-y.width-n;break;case "right":w=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":w=v.left+o;break;case "center":w=v.left+v.width/2-y.width/2;break;case "end":w=v.right-y.width-o;break}else switch(r){case "start":x=v.top+o;break;case "center":x=v.top+v.height/2-y.height/2;break;case "end":x=v.bottom-y.height-o;break}f({top:x,left:w});},[l,t,n,r,o,c]),!p||!l)return null;let b={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Xn.displayName="TooltipContent";var y0={sm:"20px",md:"40px",lg:"60px"},ke=X.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",showShadow:r=false,shadowSize:o="md",children:a,style:s,...i},l)=>{let c=X.useRef(null),[d,m]=X.useState(false),[f,p]=X.useState({top:false,bottom:false,left:false,right:false}),g=X.useId().replace(/:/g,"");X.useImperativeHandle(l,()=>c.current);let h=X.useCallback(()=>{let C=c.current;if(!C||!r)return;let{scrollTop:R,scrollLeft:T,scrollHeight:M,scrollWidth:k,clientHeight:P,clientWidth:E}=C;p({top:R>0,bottom:R<M-P-1,left:T>0,right:T<k-E-1});},[r]);X.useEffect(()=>{if(!r)return;let C=c.current;if(C)return h(),C.addEventListener("scroll",h),window.addEventListener("resize",h),()=>{C.removeEventListener("scroll",h),window.removeEventListener("resize",h);}},[r,h]);let b=n==="visible"||n==="hover"&&d,v=b?"rgba(0,0,0,0.3)":"transparent",y=b?"rgba(255,255,255,0.3)":"transparent",x=`
|
|
1
|
+
import*as X from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,Calendar,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Ba from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import TM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import HM from'@tiptap/starter-kit';import IM from'@tiptap/extension-link';import VM from'@tiptap/extension-underline';import AM from'@tiptap/extension-text-align';import zM from'@tiptap/extension-placeholder';import oN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import mN from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import So from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var Ly=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"}}),Sy={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Dy=X.forwardRef(({className:e,variant:t="solid",type:n="default",radius:r="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=Sy[n],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u(Ly({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});Dy.displayName="Alert";var Hy=X.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));Hy.displayName="AlertTitle";var Iy=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("text-sm [&_p]:leading-relaxed",e),...t}));Iy.displayName="AlertDescription";var Vy=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),Ay={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},zy={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},Oy=X.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,showPing:l=false,...c},d)=>jsxs("div",{ref:d,className:u("relative inline-flex",e),...c,children:[t,jsxs("span",{className:u(Vy({variant:r,color:o,size:i?void 0:a,placement:s}),i&&Ay[a||"md"],i&&"min-w-0 p-0"),children:[l&&jsx("span",{className:u("absolute inset-0 rounded-full animate-ping opacity-75",zy[o||"default"])}),!i&&n]})]}));Oy.displayName="Badge";var By=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"}}),Fy=X.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:u(By({color:t,size:n}),e),...r}));Fy.displayName="TextBadge";var _c=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),$y={sm:"text-xs",md:"text-sm",lg:"text-base"},Na=X.forwardRef(({className:e,size:t="md",color:n,label:r="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(_c({size:t,color:s?void 0:n})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":r,children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",$y[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Na.displayName="Spinner";var Xc=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),qc=X.createContext({});function bi(){return X.useContext(qc)}var Zc=X.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(qc.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(Xc({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));Zc.displayName="ButtonGroup";var qr=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"border-zinc-300 dark:border-zinc-700 text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"border-green-600 dark:border-green-500 text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white hover:border-green-600 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white dark:hover:border-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"border-amber-600 dark:border-amber-500 text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white hover:border-amber-600 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white dark:hover:border-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"border-red-600 dark:border-red-500 text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white hover:border-red-600 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white dark:hover:border-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"border-blue-600 dark:border-blue-500 text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white hover:border-blue-600 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:hover:border-blue-500"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=bi(),b=d||h.disabled||s,v=m,y=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",w=s?jsxs(Fragment,{children:[jsx(Na,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:a,className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y),style:v,...p,children:w}):jsx("button",{type:"button",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y),ref:g,disabled:b,style:v,...p,children:w})});ae.displayName="Button";var td=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"lg"}}),nd=X.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:u(td({radius:t,className:e})),...n}));nd.displayName="Card";var rd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex flex-col space-y-1.5 p-6",e),...t}));rd.displayName="CardHeader";var od=X.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));od.displayName="CardTitle";var ad=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));ad.displayName="CardDescription";var sd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("p-6 pt-0",e),...t}));sd.displayName="CardContent";var id=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center p-6 pt-0",e),...t}));id.displayName="CardFooter";var Oo=X.forwardRef(({className:e,checked:t,defaultChecked:n=false,onCheckedChange:r,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,[v,y]=X.useState(false),x=X.useId(),w=()=>{if(o)return;let k=b==="indeterminate"?true:!b;h||g(k),r?.(k);},C=k=>{k.key==="Enter"&&k.preventDefault(),d?.(k);},R=b===true,T=b==="indeterminate",M=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?x:void 0,"aria-checked":T?"mixed":R,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",R&&"bg-primary text-primary-foreground",T&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:w,onKeyDown:C,onFocus:()=>y(true),onBlur:()=>y(false),...m,children:(R||T)&&jsx("span",{className:"flex items-center justify-center text-current",children:T?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:R,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[M,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:x,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):M});Oo.displayName="Checkbox";var qy=cva("flex w-full border border-input bg-background px-3 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Pa=X.forwardRef(({className:e,type:t,size:n,radius:r,label:o,isRequired:a,description:s,errorMessage:i,isInvalid:l,onFocus:c,onBlur:d,style:m,...f},p)=>{let[g,h]=X.useState(false),b=X.useId(),v=f.id||b,y=l||!!i,x=jsx("input",{id:v,type:t,className:u(qy({size:n,radius:r}),y&&"border-danger focus:border-danger",!o&&e),ref:p,required:a,"aria-invalid":y,"aria-describedby":s||i?`${v}-description`:void 0,style:{...m,borderColor:y?void 0:g?"var(--color-foreground)":void 0},onFocus:w=>{h(true),c?.(w);},onBlur:w=>{h(false),d?.(w);},...f});return !o&&!s&&!i?x:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[o&&jsxs("label",{htmlFor:v,className:"text-sm font-medium leading-none",children:[o,a&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),x,(s||i)&&jsx("p",{id:`${v}-description`,className:u("text-xs",y?"text-danger":"text-muted-foreground"),children:i||s})]})});Pa.displayName="Input";var Qy=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cr=X.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:u(Qy(),e),...t}));Cr.displayName="Label";var jn=X.forwardRef(({className:e,orientation:t="horizontal",decorative:n=true,text:r,...o},a)=>{let s=n?{role:"none"}:{role:"separator","aria-orientation":t};return r&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:r}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});jn.displayName="Separator";var t0="peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",La={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},ud={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},md=X.forwardRef(({className:e,color:t,size:n="md",customColor:r,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=X.useState(a),v=o!==void 0,y=v?o:h,x=()=>{if(i)return;let T=!y;v||b(T),s?.(T);},w=T=>{T.key==="Enter"&&T.preventDefault(),m?.(T);},C=t&&La[t]?La[t]:La.default,R=ud[n]||ud.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":y,"aria-required":l,"data-state":y?"checked":"unchecked",disabled:i,ref:g,className:u(t0,R.track,y?r?"":C:"bg-input",e),style:r&&y?{backgroundColor:r,...f}:f,onClick:x,onKeyDown:w,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",R.thumb,y?R.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:y,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});md.displayName="Switch";var a0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"md"}}),pd=X.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=X.useState(false);return jsx("textarea",{className:u(a0({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),n?.(c);},onBlur:c=>{l(false),r?.(c);},...a})});pd.displayName="Textarea";var gd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Ha=X.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:u(gd({variant:t,className:e})),...n}));Ha.displayName="Skeleton";var d0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),bd=X.createContext(null),vd=()=>{let e=X.useContext(bd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Tr=X.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=X.useState("idle");return jsx(bd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(d0({size:t,radius:n,className:e})),...r})})});Tr.displayName="Avatar";var Jr=X.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=vd();return X.useEffect(()=>{if(!t){i("error");return}i("loading"),r?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),r?.("loaded");},l.onerror=()=>{i("error"),r?.("error");};},[t,i,r]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:n,className:u("aspect-square h-full w-full object-cover",e),...o})});Jr.displayName="AvatarImage";var Mr=X.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=vd(),[s,i]=X.useState(t===0);return X.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Mr.displayName="AvatarFallback";var xd=X.createContext({delayDuration:700,skipDelayDuration:300}),Wn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(xd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});Wn.displayName="TooltipProvider";var yd=X.createContext(null),Rd=()=>{let e=X.useContext(yd);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},_n=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=X.useContext(xd),[s,i]=X.useState(n),l=t!==void 0,c=l?t:s,d=X.useRef(null),m=X.useId(),f=X.useRef(null),p=o??a.delayDuration,g=X.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),r?.(true);},p):(l||i(false),r?.(false));},[l,r,p]);return X.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(yd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};_n.displayName="Tooltip";var Yn=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Rd();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{n?.(h),i(false);},onFocus:h=>{r?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});Yn.displayName="TooltipTrigger";var Xn=X.forwardRef(({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Rd(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);if(X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),x=0,w=0;switch(t){case "top":x=v.top-y.height-n;break;case "bottom":x=v.bottom+n;break;case "left":w=v.left-y.width-n;break;case "right":w=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":w=v.left+o;break;case "center":w=v.left+v.width/2-y.width/2;break;case "end":w=v.right-y.width-o;break}else switch(r){case "start":x=v.top+o;break;case "center":x=v.top+v.height/2-y.height/2;break;case "end":x=v.bottom-y.height-o;break}f({top:x,left:w});},[l,t,n,r,o,c]),!p||!l)return null;let b={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Xn.displayName="TooltipContent";var u0={sm:"20px",md:"40px",lg:"60px"},ke=X.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",showShadow:r=false,shadowSize:o="md",children:a,style:s,...i},l)=>{let c=X.useRef(null),[d,m]=X.useState(false),[f,p]=X.useState({top:false,bottom:false,left:false,right:false}),g=X.useId().replace(/:/g,"");X.useImperativeHandle(l,()=>c.current);let h=X.useCallback(()=>{let C=c.current;if(!C||!r)return;let{scrollTop:R,scrollLeft:T,scrollHeight:M,scrollWidth:k,clientHeight:P,clientWidth:E}=C;p({top:R>0,bottom:R<M-P-1,left:T>0,right:T<k-E-1});},[r]);X.useEffect(()=>{if(!r)return;let C=c.current;if(C)return h(),C.addEventListener("scroll",h),window.addEventListener("resize",h),()=>{C.removeEventListener("scroll",h),window.removeEventListener("resize",h);}},[r,h]);let b=n==="visible"||n==="hover"&&d,v=b?"rgba(0,0,0,0.3)":"transparent",y=b?"rgba(255,255,255,0.3)":"transparent",x=`
|
|
2
2
|
#${g} {
|
|
3
3
|
scrollbar-width: thin;
|
|
4
4
|
scrollbar-color: ${v} transparent;
|
|
@@ -40,7 +40,7 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
40
40
|
scrollbar-width: none;
|
|
41
41
|
}
|
|
42
42
|
`:""}
|
|
43
|
-
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:x}}),jsx("div",{ref:c,id:g,onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),style:{...s,...(()=>{if(!r)return {};let C=y0[o],R=t==="vertical"||t==="both",T=t==="horizontal"||t==="both",M=[R&&f.top&&`linear-gradient(to bottom, transparent, black ${C})`,R&&f.bottom&&`linear-gradient(to top, transparent, black ${C})`,T&&f.left&&`linear-gradient(to right, transparent, black ${C})`,T&&f.right&&`linear-gradient(to left, transparent, black ${C})`].filter(Boolean);return M.length===0?{}:{maskImage:M.join(", "),WebkitMaskImage:M.join(", "),maskComposite:"intersect",WebkitMaskComposite:"source-in"}})()},className:u(t==="vertical"&&"h-full w-full overflow-y-auto overflow-x-hidden",t==="horizontal"&&"w-full overflow-x-auto overflow-y-hidden",t==="both"&&"h-full w-full overflow-auto",e),...i,children:a})]})});ke.displayName="ScrollArea";var Pd=cva("flex w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"min-h-9 py-1.5 text-xs",md:"min-h-10 py-2",lg:"min-h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Aa=X.forwardRef(({options:e,multiple:t=false,value:n,defaultValue:r,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,size:p,radius:g,className:h,...b},v)=>{let[y,x]=X.useState(false),[w,C]=X.useState(""),[R,T]=X.useState(r||""),[M,k]=X.useState(r||[]),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),D=X.useRef(null),L=n!==void 0?n:R,I=n!==void 0?n:M,V=n!==void 0,O=B=>{d&&L===B?(V||T(""),o?.("")):(V||T(B),o?.(B)),x(false),C("");},A=B=>{let Z=I.includes(B)?I.filter(ue=>ue!==B):[...I,B];V||k(Z),o?.(Z);},K=(B,Z)=>{Z.stopPropagation();let ue=I.filter(U=>U!==B);V||k(ue),o?.(ue);},$=B=>{B.stopPropagation(),t?(V||k([]),o?.([])):(V||T(""),o?.(""));},G=e.find(B=>B.value===L),Y=e.filter(B=>I.includes(B.value)),F=Y.slice(0,m),z=Y.length-m,j=s?e.filter(B=>B.label.toLowerCase().includes(w.toLowerCase())):e;X.useEffect(()=>{if(y&&S.current){let B=S.current.getBoundingClientRect();E({top:B.bottom+4,left:B.left,width:B.width}),s&&setTimeout(()=>D.current?.focus(),0);}y||C("");},[y,s]),X.useEffect(()=>{let B=Z=>{let ue=Z.target,U=N.current&&!N.current.contains(ue),Ce=H.current&&!H.current.contains(ue);U&&Ce&&(x(false),C(""));};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]),X.useEffect(()=>{if(!y)return;let B=Z=>{H.current?.contains(Z.target)||(x(false),C(""));};return window.addEventListener("scroll",B,true),()=>window.removeEventListener("scroll",B,true)},[y]);let W=t?I.length>0:!!L;return jsxs("div",{ref:N,className:u("relative",h),...b,children:[jsxs("div",{ref:B=>{S.current=B,typeof v=="function"?v(B):v&&(v.current=B);},role:"combobox","aria-expanded":y,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&x(!y),className:u(Pd({size:p,radius:g}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!G&&"text-muted-foreground"),children:G?G.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[F.map(B=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[B.label,jsx("span",{role:"button",tabIndex:0,onClick:Z=>K(B.value,Z),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&K(B.value,Z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},B.value)),z>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",z," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:$,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&$(B);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X$1,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",y&&"rotate-180")})]})]}),y&&!c&&typeof document<"u"&&Ba.createPortal(jsxs("div",{ref:H,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:P.top,left:P.left,minWidth:P.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:D,type:"text",value:w,onChange:B=>C(B.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(ke,{style:{maxHeight:f},onWheel:B=>B.stopPropagation(),children:jsx("div",{className:"p-1",children:j.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):j.map(B=>{let Z=t?I.includes(B.value):L===B.value;return jsxs("div",{role:"option","aria-selected":Z,onClick:()=>{B.disabled||(t?A(B.value):O(B.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",B.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Z&&jsx(Check,{className:"h-4 w-4"})}),B.label]},B.value)})})})]}),document.body)]})});Aa.displayName="Select";var Ed=X.createContext(null),Bo=()=>{let e=X.useContext(Ed);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},wi=X.createContext({radius:"md"}),Ci=X.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),[s,i]=X.useState(-1),l=t!==void 0,c=l?t:o,d=X.useRef(null),m=X.useRef(null),f=X.useId(),p=X.useRef(new Map),g=X.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=X.useCallback((v,y)=>{p.current.set(v,y);},[]),b=X.useCallback(v=>{p.current.delete(v);},[]);return jsx(Ed.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};Cn.displayName="Dropdown";var Tn=X.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Bo();return jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{n?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});Tn.displayName="DropdownTrigger";var P0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},Mn=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:b,contentId:v,activeIndex:y,setActiveIndex:x,items:w}=Bo(),[C,R]=X.useState({top:0,left:0}),[T,M]=X.useState(t),[k,P]=X.useState(false),E=X.useRef(0);if(X.useEffect(()=>{P(true);},[]),X.useEffect(()=>{p&&(E.current=w.current.size);},[p,w]),X.useEffect(()=>{if(!p||!h.current||!b.current)return;let S=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),D=b.current.getBoundingClientRect(),L=window.innerWidth,I=window.innerHeight,V=0,O=0,A=t;switch(t){case "top":V=H.top-D.height-n,V<a&&(V=H.bottom+n,A="bottom");break;case "bottom":V=H.bottom+n,V+D.height>I-a&&(V=H.top-D.height-n,A="top");break;case "left":O=H.left-D.width-n,O<a&&(O=H.right+n,A="right");break;case "right":O=H.right+n,O+D.width>L-a&&(O=H.left-D.width-n,A="left");break}if(A==="top"||A==="bottom"){switch(r){case "start":O=H.left+o;break;case "center":O=H.left+H.width/2-D.width/2;break;case "end":O=H.right-D.width-o;break}O<a?O=a:O+D.width>L-a&&(O=L-D.width-a);}else {switch(r){case "start":V=H.top+o;break;case "center":V=H.top+H.height/2-D.height/2;break;case "end":V=H.bottom-D.height-o;break}V<a?V=a:V+D.height>I-a&&(V=I-D.height-a);}R({top:V,left:O}),M(A);};return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S,true),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S,true);}},[p,t,n,r,o,a,h]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=H.target;b.current&&!b.current.contains(D)&&h.current&&!h.current.contains(D)&&(s?.(),g(false));};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[p,g,s,h,b]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=Array.from(w.current.entries()).sort(([I],[V])=>I-V).map(([,I])=>I),L=D.length;if(L!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),y===-1||y>=L-1?x(l?0:Math.min(y+1,L-1)):x(y+1);break;case "ArrowUp":H.preventDefault(),y<=0?x(l?L-1:0):x(y-1);break;case "Home":H.preventDefault(),x(0);break;case "End":H.preventDefault(),x(L-1);break;case "Enter":case " ":H.preventDefault(),y>=0&&y<L&&D[y]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p,g,i,y,x,w,l,h]),X.useEffect(()=>{p&&y>=0&&Array.from(w.current.entries()).sort(([H],[D])=>H-D).map(([,H])=>H)[y]?.focus();},[p,y,w]),!k||!p)return null;let N={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[T];return Ba.createPortal(jsx("div",{ref:S=>{b.current=S,typeof f=="function"?f(S):f&&(f.current=S);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":T,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",P0[c],N,e),style:{top:C.top,left:C.left},...m,children:jsx(wi.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Ld=0,Sd={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Bo(),{radius:b}=X.useContext(wi),[v]=X.useState(()=>Ld++),y=X.useRef(null);X.useEffect(()=>(!n&&y.current&&g(v,y.current),()=>{h(v);}),[n,v,g,h]);let x=R=>{if(n){R.preventDefault();return}o?.(R),r?.(),m(false);},w=R=>{a?.(R),n||p(v);};return jsxs("div",{ref:R=>{y.current=R,typeof d=="function"?d(R):d&&(d.current=R);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===v?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Sd[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:x,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Ti=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ti.displayName="DropdownSection";var Dd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Dd.displayName="DropdownSeparator";var Hd=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Hd.displayName="DropdownShortcut";var Id=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Id.displayName="DropdownGroup";var Vd=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),{contentRef:s}=Bo(),i=t!==void 0,l=i?t:o,c=X.useRef(null),d=X.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsx(Ci.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Vd.displayName="DropdownSub";var Ad=X.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=X.useContext(Ci),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Bo(),{radius:p}=X.useContext(wi),[g]=X.useState(()=>Ld++),h=X.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:y}=c;X.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let x=R=>{o?.(R),n||(d(g),v(true));},w=R=>{a?.(R);},C=R=>{s?.(R),(R.key==="ArrowRight"||R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(true));};return jsxs("div",{ref:R=>{h.current=R,y.current=R,typeof l=="function"?l(R):l&&(l.current=R);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:n?-1:0,"aria-disabled":n,"data-state":b?"open":"closed","data-disabled":n?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Sd[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:x,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Ad.displayName="DropdownSubTrigger";var zd=X.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=X.useContext(Ci);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=X.useState({top:0,left:0}),[h,b]=X.useState(false),v=X.useRef(null),y=X.useRef(null);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let R=m.current.getBoundingClientRect(),T=v.current.getBoundingClientRect(),M=window.innerWidth,k=window.innerHeight,P=R.top+n,E=R.right+t;E+T.width>M-r&&(E=R.left-T.width-t),P+T.height>k-r&&(P=k-T.height-r),P<r&&(P=r),g({top:P,left:E});})();},[c,t,n,r,m]);let x=C=>{o?.(C),y.current&&(clearTimeout(y.current),y.current=null),d(true);},w=C=>{a?.(C);let R=C.relatedTarget;m.current?.contains(R)||f?.current?.contains(R)||(y.current=setTimeout(()=>{d(false);},100));};return X.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),!h||!c?null:Ba.createPortal(jsx("div",{ref:C=>{v.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:x,onMouseLeave:w,...s}),document.body)});zd.displayName="DropdownSubContent";var E0=Ti;var Fd=X.createContext(null),Mi=()=>{let e=X.useContext(Fd);if(!e)throw new Error("Popover components must be used within a Popover");return e},ot=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useId(),d=X.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsx(Fd.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=X.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Mi(),c=f=>{t?.(f),s(!a);},d=f=>{i.current=f,typeof o=="function"?o(f):o&&(o.current=f);},m={"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r};return n&&X.isValidElement(e)?X.cloneElement(e,{...m,ref:d,onClick:f=>{e.props.onClick?.(f),c(f);}}):jsx("button",{ref:d,type:"button",...m,children:e})});qn.displayName="PopoverTrigger";var an=X.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Mi();return jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});an.displayName="PopoverAnchor";var at=X.forwardRef(({className:e,style:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:b}=Mi(),[v,y]=X.useState({top:0,left:0}),[x,w]=X.useState(false),[C,R]=X.useState(null);if(X.useEffect(()=>{w(true);},[]),X.useEffect(()=>{if(!p||!h.current||!C)return;let M=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),P=C.getBoundingClientRect(),E=0,N=0;switch(n){case "top":E=k.top-P.height-r;break;case "bottom":E=k.bottom+r;break;case "left":N=k.left-P.width-r;break;case "right":N=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":N=k.left+a;break;case "center":N=k.left+k.width/2-P.width/2;break;case "end":N=k.right-P.width-a;break}else switch(o){case "start":E=k.top+a;break;case "center":E=k.top+k.height/2-P.height/2;break;case "end":E=k.bottom-P.height-a;break}y({top:E,left:N});};return M(),window.addEventListener("resize",M),window.addEventListener("scroll",M,true),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true);}},[p,n,r,o,a,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{let P=k.target;C&&C.contains(P)||h.current&&h.current.contains(P)||P.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",M),()=>document.removeEventListener("mouseup",M)},[p,g,s,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[p,g,i]),!x||!p)return null;let T={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[n];return Ba.createPortal(jsx("div",{ref:M=>{R(k=>k!==M?M:k),typeof f=="function"?f(M):f&&(f.current=M);},id:b,role:"dialog","data-state":p?"open":"closed","data-side":n,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",T,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});at.displayName="PopoverContent";var Kd=X.createContext(null),ki=()=>{let e=X.useContext(Kd);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},$d=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=X.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsx(Kd.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});$d.displayName="Tabs";var Ni={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},Gd=X.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=ki(),l=X.useRef(null),[c,d]=X.useState({opacity:0});X.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let y=g.getBoundingClientRect(),x=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:x.height,transform:`translateY(${x.top-y.top}px)`,opacity:1}:{width:x.width,height:2,transform:`translateX(${x.left-y.left}px)`,opacity:1}):o==="solid"&&d(w?{width:x.width,height:x.height,transform:`translateY(${x.top-y.top}px)`,opacity:1}:{width:x.width,height:x.height,transform:`translateX(${x.left-y.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs("div",{ref:g=>{l.current=g,typeof r=="function"?r(g):r&&(r.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Ni[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Ni[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Gd.displayName="TabsList";var Ud=X.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=ki(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Ni[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});Ud.displayName="TabsTrigger";var jd=X.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=ki(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r,children:n}):null});jd.displayName="TabsContent";var Wd=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function S0(e,t=Wd){return e?t.filter(r=>r.test(e)).length/t.length:0}function D0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function H0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Ko=0,Pi=null;function Gt(){Ko===0&&(Pi=document.body.style.overflow,document.body.style.overflow="hidden"),Ko++;}function Ut(){Ko--,Ko<=0&&(Ko=0,document.body.style.overflow=Pi??"",Pi=null);}var Yd=X.createContext(null),Oa=()=>{let e=X.useContext(Yd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},Xd=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=X.useState(t),s=e!==void 0,i=s?e:o,l=X.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(Yd.Provider,{value:{open:i,onOpenChange:l},children:r})};Xd.displayName="Sheet";var qd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});qd.displayName="SheetTrigger";var Zd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});Zd.displayName="SheetClose";var Li=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Li.displayName="SheetPortal";var Qd=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Oa();return r?jsx("div",{ref:n,className:u("fixed inset-0 z-50 bg-black/80",r?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Qd.displayName="SheetOverlay";var Jd=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),A0=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],eu=X.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Oa(),[d,m]=X.useState(false),[,f]=X.useState(false);return X.useEffect(()=>{if(l)m(true),f(true),Gt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Ut();}},[l]),X.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxs(Li,{children:[jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(Jd({side:e}),A0(e,l),t),...s,children:[!r&&jsxs("button",{type:"button",onClick:()=>c(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});eu.displayName="SheetContent";var tu=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});tu.displayName="SheetHeader";var nu=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});nu.displayName="SheetFooter";var ru=X.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));ru.displayName="SheetTitle";var ou=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));ou.displayName="SheetDescription";var B0=({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 au=X.createContext(null),Fa=()=>{let e=X.useContext(au);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Si=X.createContext(null),su=({children:e,onOpenChange:t})=>{let[n,r]=X.useState(false),[o,a]=X.useState({x:0,y:0}),s=X.useId(),i=X.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(au.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};su.displayName="ContextMenu";var iu=X.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Fa(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});iu.displayName="ContextMenuTrigger";var lu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));lu.displayName="ContextMenuGroup";var cu=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};cu.displayName="ContextMenuPortal";var du=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Si.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};du.displayName="ContextMenuSub";var uu=X.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Fa(),[d,m]=X.useState(false),[f,p]=X.useState(l),g=X.useRef(null);return X.useEffect(()=>{m(true);},[]),X.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),y+b.height>window.innerHeight&&(y=window.innerHeight-b.height-8),p({x:v,y});},[s,l]),X.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),X.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:Ba.createPortal(jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:r}),document.body)});uu.displayName="ContextMenuContent";var mu=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=X.useContext(Si);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{r?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});mu.displayName="ContextMenuSubTrigger";var pu=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=X.useContext(Si);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=X.useState({top:0,left:0}),[f,p]=X.useState(false),g=X.useRef(null);X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let y=c.current.getBoundingClientRect(),x=g.current.getBoundingClientRect(),w=y.top,C=y.right+t;C+x.width>window.innerWidth&&(C=y.left-x.width-t),m({top:w,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:Ba.createPortal(jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:b,...o}),document.body)});pu.displayName="ContextMenuSubContent";var fu=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Fa(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});fu.displayName="ContextMenuItem";var gu=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Fa(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});gu.displayName="ContextMenuCheckboxItem";var bu=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));bu.displayName="ContextMenuSection";var vu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));vu.displayName="ContextMenuSeparator";var hu=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});hu.displayName="ContextMenuShortcut";var yu=X.createContext(null),U0=()=>{let e=X.useContext(yu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Ru=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=X.useState(n),p=t!==void 0,g=p?t:m,h=X.useId(),b=v=>{p||f(v),r?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(yu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});Ru.displayName="RadioGroup";var wu=X.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=U0(),s=a.value===t,i=n||a.disabled;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>a.onValueChange(t),...r,children:s&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});wu.displayName="RadioGroupItem";var $a=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),Cu=X.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=X.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u($a({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Cu.displayName="Toggle";var Tu=X.createContext(null),X0=()=>{let e=X.useContext(Tu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Mu=X.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=X.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:m,h=b=>{if(r==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(y=>y!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(Tu.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Mu.displayName="ToggleGroup";var Nu=X.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=X0(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u($a({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Nu.displayName="ToggleGroupItem";var Ua=X.forwardRef(({className:e,value:t,defaultValue:n=[0],onValueChange:r,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,v=X.useRef(null),[y,x]=X.useState(false),[w,C]=X.useState(null),R=(H,D)=>{if(!v.current)return b[0];let L=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-L.left)/L.width:I=1-(D-L.top)/L.height,I=Math.max(0,Math.min(1,I));let V=a+I*(s-a),O=Math.round(V/i)*i;return Math.max(a,Math.min(s,O))},T=(H,D)=>{let L=[...b];L[D]=H,D>0&&H<b[D-1]&&(L[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(L[D]=b[D+1]),h||g(L),r?.(L);},M=(H,D)=>{l||(H.preventDefault(),x(true),C(D),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!y||w===null||l)return;let D=R(H.clientX,H.clientY);T(D,w);},P=()=>{y&&(x(false),C(null),o?.(b));},E=H=>{if(l)return;let D=R(H.clientX,H.clientY),L=0,I=Math.abs(b[0]-D);for(let V=1;V<b.length;V++){let O=Math.abs(b[V]-D);O<I&&(I=O,L=V);}T(D,L),o?.([...b.slice(0,L),D,...b.slice(L+1)]);},N=(H,D)=>{if(l)return;let L=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),L=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),L=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),L=a;break;case "End":H.preventDefault(),L=s;break;default:return}T(L,D),o?.([...b.slice(0,D),L,...b.slice(D+1)]);},S=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsx("div",{ref:v,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:E,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${S(b[0])}%`:0,right:`${100-S(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${S(b[0])}%`:0,top:`${100-S(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,D)=>jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",y&&w===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${S(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:L=>M(L,D),onPointerMove:k,onPointerUp:P,onPointerCancel:P,onKeyDown:L=>N(L,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ua.displayName="Slider";var ku=X.createContext(null),Pu=()=>{let e=X.useContext(ku);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Hi=X.createContext(null),Eu=()=>{let e=X.useContext(Hi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Lu=X.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=X.useState(()=>t==="single"?r?[r]:[]:r||[]),f=X.useRef(new Map),p=X.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=w=>{if(t==="single"){let R=h.includes(w)&&a?[]:[w];g||m(R),o?.(R[0]||"");}else {let C=h.includes(w)?h.filter(R=>R!==w):[...h,w];g||m(C),o?.(C);}},v=X.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),y=X.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),x=X.useCallback(w=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,T;f.current.forEach((N,S)=>{N===R&&(T=S);});let M=T?C.indexOf(T):-1,k;switch(w){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=M===-1?0:(M+1)%C.length;break;case "prev":k=M===-1?C.length-1:(M-1+C.length)%C.length;break}let P=C[k];f.current.get(P)?.focus();},[]);return jsx(ku.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:y,focusTrigger:x},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Lu.displayName="Accordion";var Su=X.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Pu(),d=c.value.includes(t),m=n||c.disabled||false,f=X.useId(),p=X.useId();return r!==void 0?jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(Du,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:r}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(Hu,{children:s})]})}):jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});Su.displayName="AccordionItem";var Du=X.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Pu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=Eu(),f=X.useRef(null);X.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(r?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsx("h3",{className:"flex",children:jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{n?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});Du.displayName="AccordionTrigger";var Hu=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Eu();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:n,...r,children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});Hu.displayName="AccordionContent";var Vu=X.createContext(null),Au=()=>{let e=X.useContext(Vu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},zu=X.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=X.useState(n),m=t!==void 0,f=m?t:c,p=X.useId(),g=X.useId(),h=b=>{o||(m||d(b),r?.(b));};return jsx(Vu.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Ii,{})]}),s]})})});zu.displayName="Collapsible";var Ii=X.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=Au();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Ii.displayName="CollapsibleTrigger";var Ou=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=Au(),c=X.useRef(null),[d,m]=X.useState(0),[f,p]=X.useState(false),[g,h]=X.useState(a);X.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Ou.displayName="CollapsibleContent";var _a=X.forwardRef(({className:e,value:t=0,max:n=100,label:r,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/n*100,0),100);return jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsx("span",{className:"text-muted-foreground",children:r}),o&&jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":typeof r=="string"?r:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});_a.displayName="Progress";var $u=X.createContext(null),Gu=()=>{let e=X.useContext($u);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},Uu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=X.useState(n),c=t!==void 0,d=c?t:i,m=X.useRef(null),f=X.useId(),p=X.useRef(null),g=X.useRef(null),h=X.useCallback(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return X.useEffect(()=>{if(!s||!d)return;let b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,r]),X.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx($u.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};Uu.displayName="HoverCard";var ju=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Gu();return jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{n?.(p),i(false);},onFocus:p=>{r?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});ju.displayName="HoverCardTrigger";var Wu=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=Gu(),[g,h]=X.useState({top:0,left:0}),[b,v]=X.useState(false),y=X.useRef(null);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!d||!f.current||!y.current)return;(()=>{if(!f.current||!y.current)return;let T=f.current.getBoundingClientRect(),M=y.current.getBoundingClientRect(),k=0,P=0;switch(t){case "top":k=T.top-M.height-n;break;case "bottom":k=T.bottom+n;break;case "left":P=T.left-M.width-n;break;case "right":P=T.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":P=T.left+o;break;case "center":P=T.left+T.width/2-M.width/2;break;case "end":P=T.right-M.width-o;break}else switch(r){case "start":k=T.top+o;break;case "center":k=T.top+T.height/2-M.height/2;break;case "end":k=T.bottom-M.height-o;break}h({top:k,left:P});})();},[d,t,n,r,o,f]);let x=R=>{a?.(R),m(true);},w=R=>{s?.(R),m(false);};if(!b||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:R=>{y.current=R,typeof c=="function"?c(R):c&&(c.current=R);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:x,onMouseLeave:w,...l,children:i}),document.body)});Wu.displayName="HoverCardContent";var _u=X.createContext({size:"md",variant:"default",radius:"md"}),Xa=()=>X.useContext(_u);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var tR=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),nR=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"}}),rR=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"}}),Yu=X.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(_u.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Yu.displayName="Breadcrumb";var Xu=X.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=Xa();return jsx("ol",{ref:n,className:u(tR({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});Xu.displayName="BreadcrumbList";var qu=X.forwardRef(({className:e,...t},n)=>{let{size:r}=Xa();return jsx("li",{ref:n,className:u("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});qu.displayName="BreadcrumbItem";var Zu=X.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Zu.displayName="BreadcrumbLink";var Qu=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));Qu.displayName="BreadcrumbPage";var Ju=({children:e,className:t,...n})=>{let{size:r}=Xa();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(nR({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};Ju.displayName="BreadcrumbSeparator";var em=({className:e,...t})=>{let{size:n}=Xa();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(rR({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};em.displayName="BreadcrumbEllipsis";var rm=X.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));rm.displayName="AspectRatio";var sm=X.createContext(null),Ai=()=>{let e=X.useContext(sm);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},im=X.createContext(null),lm=()=>{let e=X.useContext(im);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},cm=X.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=X.useState(null);return jsx(sm.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(zi,{})]})})});cm.displayName="NavigationMenu";var dm=X.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Ai();return jsx("ul",{ref:n,className:u("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});dm.displayName="NavigationMenuList";var um=X.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Ai(),s=X.useId(),i=X.useRef(null),l=o===s,c=X.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(im.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});um.displayName="NavigationMenuItem";var mm=cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),pm=X.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=lm(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(mm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});pm.displayName="NavigationMenuTrigger";var fm=X.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=lm(),l=X.useRef(null),[c,d]=X.useState({top:0,left:0});X.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?Ba.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...r}),document.body):null});fm.displayName="NavigationMenuContent";var gm=cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),bm=X.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:u(gm(),t&&"bg-accent text-accent-foreground",e),...n}));bm.displayName="NavigationMenuLink";var zi=X.forwardRef((e,t)=>null);zi.displayName="NavigationMenuViewport";var vm=X.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Ai();return r?jsx("div",{ref:n,className:u("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});vm.displayName="NavigationMenuIndicator";var Rm=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Nt=X.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:r,type:"button",className:u(Rm({size:t}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:a,height:a}})})});Nt.displayName="CloseButton";var qa=X.createContext(null);function fR(){let e=X.useContext(qa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return X.useContext(qa)}var gR="16rem",bR="18rem",vR="3rem",hR="b",xR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},yR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Oi=X.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:n,placement:r="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,y]=X.useState(false),[x,w]=X.useState(false),[C,R]=X.useState(e),T=t??C,M=X.useCallback(N=>{let S=typeof N=="function"?N(T):N;n?n(S):R(S);},[n,T]);X.useEffect(()=>{let N=()=>{y(window.innerWidth<768);};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);let k=X.useCallback(()=>b?M(N=>!N):v?w(N=>!N):M(N=>!N),[v,M,w,b]);X.useEffect(()=>{if(b)return;let N=S=>{S.key===hR&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),k());};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[k,b]);let P=T?"expanded":"collapsed",E=X.useMemo(()=>({placement:r,state:P,open:T,setOpen:M,isMobile:v,openMobile:x,setOpenMobile:w,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,P,T,M,v,x,w,k,l,h,o,a,s,i]);return b?jsx(qa.Provider,{value:E,children:jsx(Drawer.Root,{open:T,onOpenChange:M,direction:r,dismissible:s,children:f})}):jsx(qa.Provider,{value:E,children:jsx(Wn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":gR,"--drawer-width-icon":vR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Oi.displayName="Drawer";var Cm=X.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=kn();if(!s)return jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:r});if(l==="none")return jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",n),...o,children:r});if(c&&!t)return jsx(RR,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":b&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:r})})})}return jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:r})})]})});Cm.displayName="DrawerSidebar";var RR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=X.useState(false);return X.useEffect(()=>{a(true);},[]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",r==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",r==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":bR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Tm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return jsxs("button",{ref:r,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...n,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});Tm.displayName="DrawerTrigger";var Mm=X.forwardRef(({className:e,children:t,...n},r)=>{let o=kn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque";if(a){let c=s==="top"||s==="bottom",d=s==="left"||s==="right",m=d?xR[i]:yR[i],f={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},p={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",f[l])}),jsxs(Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",p[s],e),style:{...d?{width:m,height:"100%"}:{},...c?{maxHeight:m}:{},...n.style},...n,children:[c&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});Mm.displayName="DrawerContent";var Nm=X.forwardRef(({className:e,hideCloseButton:t,children:n,...r},o)=>{let a=kn(),s=a?.hideCloseButton??false,i=!t&&!s;return jsxs("div",{ref:o,"data-drawer":"header",className:u("flex flex-col gap-2 p-4 relative",e),...r,children:[n,i&&jsx(Nt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});Nm.displayName="DrawerHeader";var km=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));km.displayName="DrawerBody";var Pm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Pm.displayName="DrawerFooter";var Em=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Em.displayName="DrawerTitle";var Lm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Lm.displayName="DrawerDescription";var Sm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Nt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Sm.displayName="DrawerClose";var Dm=X.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=kn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...r,children:[c?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Dm.displayName="DrawerToggle";var Hm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Hm.displayName="DrawerSeparator";var Im=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));Im.displayName="DrawerMenu";var Vm=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));Vm.displayName="DrawerMenuItem";var Am=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),zm=X.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=kn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(Am({variant:t,size:n}),o),...s,children:a});return r?jsxs(_n,{children:[jsx(Yn,{children:m}),jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});zm.displayName="DrawerMenuButton";var Om=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));Om.displayName="DrawerGroup";var Bm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));Bm.displayName="DrawerGroupLabel";var Fm=X.forwardRef(({className:e,...t},n)=>jsx("main",{ref:n,className:u("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Fm.displayName="DrawerInset";var wR=Oi;var $m=X.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));$m.displayName="Table";var Gm=X.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Gm.displayName="TableHeader";var Um=X.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));Um.displayName="TableBody";var jm=X.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));jm.displayName="TableFooter";var Wm=X.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Wm.displayName="TableRow";var _m=X.forwardRef(({className:e,...t},n)=>jsx("th",{ref:n,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));_m.displayName="TableHead";var Ym=X.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Ym.displayName="TableCell";var Xm=X.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));Xm.displayName="TableCaption";function PR({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(w,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...y},x){let[w,C]=X.useState(new Set),[R,T]=X.useState({columnId:null,direction:null}),[M,k]=X.useState({pageIndex:0,pageSize:m[0]||10}),P=o??w,E=l??R,N=f??M,S=F=>{a?a(F):C(F);},H=F=>{c?c(F):T(F);},D=F=>{p?p(F):k(F);},L=X.useMemo(()=>{if(!E.columnId||!E.direction)return t;let F=n.find(z=>z.id===E.columnId);return F?[...t].sort((z,j)=>{let W=F.accessor(z),B=F.accessor(j);if(W===B)return 0;if(W==null)return 1;if(B==null)return -1;let Z=String(W).localeCompare(String(B),void 0,{numeric:true});return E.direction==="asc"?Z:-Z}):t},[t,E,n]),I=X.useMemo(()=>{if(!d)return L;let F=N.pageIndex*N.pageSize;return L.slice(F,F+N.pageSize)},[L,d,N]),V=Math.ceil(L.length/N.pageSize),O=F=>{if(F===true){let z=new Set(I.map((j,W)=>s(j,W)));S(z);}else S(new Set);},A=(F,z)=>{let j=new Set(P);z?j.add(F):j.delete(F),S(j);},K=I.length>0&&I.every((F,z)=>P.has(s(F,z))),$=I.some((F,z)=>P.has(s(F,z))),G=F=>{if(!n.find(W=>W.id===F)?.sortable&&!i)return;let j="asc";E.columnId===F&&(E.direction==="asc"?j="desc":E.direction==="desc"&&(j=null)),H({columnId:j?F:null,direction:j});},Y=F=>E.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):E.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:x,className:u("w-full",e),...y,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(Oo,{checked:K?true:$?"indeterminate":false,onCheckedChange:O,"aria-label":"Select all"})}),n.map(F=>{let z=F.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",z&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>z&&G(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,z&&Y(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):I.map((F,z)=>{let j=s(F,z),W=P.has(j);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&z%2===1&&"bg-muted/30",W&&"bg-muted"),"data-state":W?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(Oo,{checked:W,onCheckedChange:B=>A(j,!!B),"aria-label":`Select row ${z+1}`})}),n.map(B=>jsx("td",{className:"p-4 align-middle",children:B.cell?B.cell(F,z):B.accessor(F)},B.id))]},j)})})]})}),d&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:N.pageSize,onChange:F=>D({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(F=>jsx("option",{value:F,children:F},F))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",N.pageIndex+1," of ",V||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex-1}),disabled:N.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex+1}),disabled:N.pageIndex>=V-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var ER=X.forwardRef(PR);var Bi=["January","February","March","April","May","June","July","August","September","October","November","December"];function AR({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=X.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Bi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Bi.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[80px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function zR(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(AR,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Bi[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function to({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=X.useMemo(()=>zR(r,o,a),[r,o,a]);return jsx(DayPicker,{showOutsideDays:n,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}to.displayName="Calendar";var Jm=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});Jm.displayName="Pagination";var ep=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));ep.displayName="PaginationContent";var tp=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:u("",e),...t}));tp.displayName="PaginationItem";var Za=({className:e,isActive:t,size:n="sm",isIconOnly:r=true,...o})=>jsx("a",{"aria-current":t?"page":void 0,className:u(qr({variant:t?"solid":"light",size:n}),r&&"!px-0 !w-9",e),...o});Za.displayName="PaginationLink";var np=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});np.displayName="PaginationPrevious";var rp=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});rp.displayName="PaginationNext";var op=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});op.displayName="PaginationEllipsis";var $o=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));$o.displayName="VisuallyHidden";var sp={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},$R={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"},ip=cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Gi=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Ja=X.createContext(null),Pr=()=>{let e=X.useContext(Ja);if(!e)throw new Error("Modal components must be used within a Modal");return e},cp=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=X.useState(false),b=e!==void 0,v=b?e:g,[y,x]=X.useState(false),w=X.useRef(null),C=X.useId(),R=X.useId();X.useEffect(()=>{x(true);},[]);let T=X.useCallback(E=>{b||h(E),t?.(E);},[b,t]);X.useEffect(()=>{if(v)return Gt(),()=>Ut()},[v]),X.useEffect(()=>{if(!v||i)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[v,i,T]);let M=E=>{s&&E.target===E.currentTarget&&T(false);},k=n?X.isValidElement(n)?X.cloneElement(n,{onClick:E=>{n.props.onClick?.(E),T(true);}}):jsx("button",{type:"button",onClick:()=>T(true),children:n}):null,P=()=>!y||!v?null:d==="outside"?Ba.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(ip(),sp[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(ip(),sp[l]),onClick:M,"aria-hidden":"true"}),jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u(Gi({size:m}),$R[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxs(Ja.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:d,titleId:C,descriptionId:R},children:[k,P()]})});cp.displayName="Modal";var es=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=X.useState(n),i=t!==void 0,l=i?t:a,c=X.useId(),d=X.useId(),m=X.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Ja.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};es.displayName="ModalRoot";var dp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});dp.displayName="ModalTrigger";var Ui=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Ui.displayName="ModalPortal";var ji=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Pr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});ji.displayName="ModalOverlay";var up=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});up.displayName="ModalClose";var ts=X.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Pr(),[f,p]=X.useState(false);return X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),X.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Ui,{children:[jsx(ji,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Gi({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});ts.displayName="ModalContent";var mp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});mp.displayName="ModalHeader";var pp=({className:e,children:t})=>(X.useContext(Ja)?.scrollBehavior??"inside")==="inside"?jsx(ke,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});pp.displayName="ModalBody";var fp=({className:e,children:t,...n})=>{let{onOpenChange:r}=Pr();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:X.Children.map(t,o=>X.isValidElement(o)?X.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};fp.displayName="ModalFooter";var gp=X.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Pr();return jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});gp.displayName="ModalTitle";var bp=X.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Pr();return jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});bp.displayName="ModalDescription";var Wi=X.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Wi.displayName=Command.displayName;var jR=({children:e,...t})=>jsx(es,{...t,children:jsx(ts,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(Wi,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),vp=X.forwardRef(({className:e,...t},n)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:n,className:u("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));vp.displayName=Command.Input.displayName;var hp=X.forwardRef(({className:e,children:t,...n},r)=>jsx(ke,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:u("overflow-hidden",e),...n,children:t})}));hp.displayName=Command.List.displayName;var xp=X.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));xp.displayName=Command.Empty.displayName;var yp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Group,{ref:n,className:u("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));yp.displayName=Command.Group.displayName;var Rp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Rp.displayName=Command.Separator.displayName;var wp=X.forwardRef(({className:e,children:t,startContent:n,endContent:r,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...o,children:[n,t&&jsx("span",{className:"flex-1",children:t}),r]}));wp.displayName=Command.Item.displayName;var Cp=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Cp.displayName="CommandShortcut";var YR={sm:{input:"h-9 px-2 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{input:"h-10 px-3 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{input:"h-11 px-4 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},XR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Mp=X.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,size:s="md",radius:i="md",...l},c)=>{let[d,m]=X.useState(false),[f,p]=X.useState(false),g=YR[s],h=XR[i];return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:u("flex w-full border border-input bg-background py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",g.input,h,t&&"pr-10",e),ref:c,disabled:n,style:{...a,borderColor:f?"var(--color-foreground)":void 0},onFocus:b=>{p(true),r?.(b);},onBlur:b=>{p(false),o?.(b);},...l}),t&&jsx("button",{type:"button",className:u("absolute right-0 top-0 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",g.button),onClick:()=>m(!d),disabled:n,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:g.icon}):jsx(Eye,{className:g.icon})})]})});Mp.displayName="PasswordInput";var JR={sm:{wrapper:"h-9",input:"h-9 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{wrapper:"h-10",input:"h-10 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{wrapper:"h-11",input:"h-11 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},ew={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Np=X.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,size:c="md",radius:d="md",...m},f)=>{let[p,g]=X.useState(s),[h,b]=X.useState(false),v=a!==void 0,y=v?a:p,x=JR[c],w=ew[d],C=N=>{N!==void 0&&(r!==void 0&&N<r&&(N=r),o!==void 0&&N>o&&(N=o)),v||g(N),i?.(N);},R=()=>{C((y??0)+n);},T=()=>{C((y??0)-n);},M=N=>{let S=N.target.value;if(S==="")C(void 0);else {let H=parseFloat(S);isNaN(H)||C(H);}},k=N=>{N.key==="ArrowUp"?(N.preventDefault(),R()):N.key==="ArrowDown"&&(N.preventDefault(),T());},P=r===void 0||(y??0)>r,E=o===void 0||(y??0)<o;return t?jsxs("div",{className:u("relative flex items-center border transition-colors",x.wrapper,w,h?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",x.button),onClick:T,disabled:l||!P,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:x.icon})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("min-w-0 flex-1 bg-background text-center focus:outline-none disabled:cursor-not-allowed",x.input),ref:f,value:y??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m}),jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",x.button),onClick:R,disabled:l||!E,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:x.icon})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex w-full bg-background px-3 py-2 text-center border placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",x.input,w,h?"border-foreground":"border-input",e),ref:f,value:y??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m})});Np.displayName="NumberInput";var Lp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),kp=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"}}),Sp=X.forwardRef(({className:e,items:t,max:n=5,size:r,showTooltips:o=false,...a},s)=>{let i=t.slice(0,n),l=t.length-n,c=(m,f)=>{let p=jsxs(Tr,{className:u(kp({size:r})),children:[m.src&&jsx(Jr,{src:m.src,alt:m.alt||""}),jsx(Mr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(_n,{children:[jsx(Yn,{children:p}),jsx(Xn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Lp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(Tr,{className:u(kp({size:r})),children:jsxs(Mr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(Wn,{delayDuration:300,children:d}):d});Sp.displayName="AvatarGroup";var Dp=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"}}),Hp=X.forwardRef(({className:e,value:t,defaultValue:n=0,onValueChange:r,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=X.useState(n),[b,v]=X.useState(null),y=t!==void 0,x=y?t:g,w=b!==null?b:x,C=S=>{l||c||(y||h(S),r?.(S));},R=(S,H=false)=>{let D=i&&H?S+.5:S+1;C(D);},T=(S,H)=>{if(l||c)return;let D=S.currentTarget.getBoundingClientRect(),L=i&&S.clientX<D.left+D.width/2;v(L?H+.5:H+1);},M=()=>{v(null);},k=s==="heart"?Heart:Star,P=S=>w>=S+1?"full":w>=S+.5?"half":"empty",E=d?{color:d,fill:d}:{},N=m?{color:m}:{};return jsx("div",{ref:p,className:u(Dp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:M,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(S,H)=>{let D=P(H);return jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:L=>{let I=L.currentTarget.getBoundingClientRect(),V=i&&L.clientX<I.left+I.width/2;R(H,V);},onMouseMove:L=>T(L,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":x===H+1,children:[jsx(k,{className:u("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?N:void 0}),D!=="empty"&&jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...E,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Hp.displayName="Rating";var Vp=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),iw={sm:"sm",md:"sm",lg:"sm"},Ap=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(Vp({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(Nt,{size:iw[r??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Ap.displayName="Chip";var zp=createContext({direction:"horizontal"}),gw=({className:e,direction:t="horizontal",children:n,...r})=>jsx(zp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),bw=Panel,vw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(zp),o=r==="vertical";return jsx(Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...n,children:e&&jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var Kp=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),xw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},Op={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},$p=X.forwardRef(({className:e,size:t="md",color:n="default",value:r,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,r/o*100)),m=xw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(Kp({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Op[n]||Op.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});$p.displayName="CircularProgress";var Gp=X.createContext(null),ww=()=>{let e=X.useContext(Gp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Up=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"}}),jp=X.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,radius:d="md",children:m,...f},p)=>{let[g,h]=X.useState(o),[b,v]=X.useState(0),[y,x]=X.useState(false),w=X.useRef(null),C=r!==void 0?r:g;X.useImperativeHandle(p,()=>w.current),X.useEffect(()=>{v(Math.min(C.length,n-1));},[C,n]),X.useEffect(()=>{C.length===n&&s&&s(C);},[C,n,s]);let R=N=>{let S=N.target.value;if(i&&S){let H=new RegExp(i.replace("^","").replace("$","").replace("+",""));S=S.split("").filter(D=>H.test(D)).join("");}S=S.slice(0,n),r===void 0&&h(S),a?.(S);},T=N=>{N.key==="ArrowLeft"?v(S=>Math.max(0,S-1)):N.key==="ArrowRight"&&v(S=>Math.min(C.length,n-1,S+1));},M=()=>{w.current?.focus();},k=()=>{x(true),v(Math.min(C.length,n-1));},P=()=>{x(false);},E={value:C,activeIndex:y?b:-1,maxLength:n,disabled:l,radius:d};return jsx(Gp.Provider,{value:E,children:jsxs("div",{className:u(Up({size:c}),t),onClick:M,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:C,onChange:R,onKeyDown:T,onFocus:k,onBlur:P,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...f}),m]})})});jp.displayName="InputOTP";var Wp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center",e),...t}));Wp.displayName="InputOTPGroup";var Cw={none:"first:rounded-l-none",sm:"first:rounded-l-md",md:"first:rounded-l-lg",lg:"first:rounded-l-xl",full:"first:rounded-l-full"},Tw={none:"last:rounded-r-none",sm:"last:rounded-r-md",md:"last:rounded-r-lg",lg:"last:rounded-r-xl",full:"last:rounded-r-full"},_p=X.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s,radius:i}=ww(),l=o[e]||"",c=a===e,d=c&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":c,"data-filled":!!l,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:border-l",Cw[i],Tw[i],c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[l,d&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});_p.displayName="InputOTPSlot";var Yp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Yp.displayName="InputOTPSeparator";var Zp=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),Qp=X.forwardRef(({className:e,variant:t,size:n,value:r=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=X.useState(""),y=X.useRef(null);X.useImperativeHandle(h,()=>y.current);let x=P=>{let E=P.trim();if(E.length<i||E.length>l||s&&r.length>=s||!d&&r.some(S=>S.text.toLowerCase()===E.toLowerCase()))return;let N={id:crypto.randomUUID(),text:E};o?.([...r,N]),v("");},w=P=>{m||f||o?.(r.filter(E=>E.id!==P));},C=P=>{if(c.includes(P.key)){if(P.key==="Tab"&&!b)return;P.preventDefault(),x(b);}P.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},R=P=>{let E=P.target.value;if(E.includes(",")){E.split(",").forEach(S=>{S.trim()&&x(S);});return}v(E);},T=P=>{P.preventDefault(),P.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(S=>{x(S);});},M=()=>{y.current?.focus();},k=s?r.length>=s:false;return jsxs("div",{className:u("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",m&&"cursor-not-allowed opacity-50",e),onClick:M,children:[r.map(P=>p?p(P,()=>w(P.id)):jsxs("span",{className:u(Zp({variant:t,size:n})),children:[P.text,!m&&!f&&jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),w(P.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${P.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},P.id)),!k&&!f&&jsx("input",{ref:y,type:"text",value:b,onChange:R,onKeyDown:C,onPaste:T,placeholder:r.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});Qp.displayName="TagInput";var ef=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"}}),tf=X.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(ef({size:t,className:e})),...i,children:[n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));tf.displayName="EmptyState";var rf=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),of=X.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(rf({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});of.displayName="StatCard";var qi=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),Vw=({checked:e,disabled:t,onClick:n})=>jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:r=>{r.stopPropagation(),t||n(r);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function Aw({className:e,variant:t,size:n,items:r,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:y,...x},w){let[C,R]=X.useState(null),[T,M]=X.useState(null),[k,P]=X.useState(new Set(f)),E=m!==void 0,N=E?new Set(m):k,[S,H]=X.useState(new Set(b)),D=h!==void 0,L=D?new Set(h):S,I=(z,j)=>{R(j),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/plain",String(j));},V=(z,j)=>{z.preventDefault(),!(C===null||C===j)&&M(j);},O=()=>{M(null);},A=(z,j)=>{if(z.preventDefault(),!r||C===null||C===j){R(null),M(null);return}let W=[...r],[B]=W.splice(C,1);W.splice(j,0,B),s?.(W),R(null),M(null);},K=()=>{R(null),M(null);},$=X.useCallback((z,j)=>{if(!r)return;let W=new Set(N),B=!W.has(z.id);d?B?W.add(z.id):W.delete(z.id):(W.clear(),B&&W.add(z.id)),E||P(W);let Z=r.filter(ue=>W.has(ue.id));p?.(Array.from(W),{selected:B,selectedItems:Z,item:z,event:j});},[r,N,d,E,p]),G=X.useCallback((z,j)=>{if(!r)return;let W=new Set(L),B=!W.has(z.id);B?W.add(z.id):W.delete(z.id),D||H(W);let Z=r.filter(ue=>W.has(ue.id));v?.(Array.from(W),{checked:B,checkedItems:Z,item:z,event:j});},[r,L,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...x,children:r.map((z,j)=>{let W=N.has(z.id),B=L.has(z.id);return jsxs("div",{role:"listitem","aria-selected":c?W:void 0,draggable:a,onDragStart:a?U=>I(U,j):void 0,onDragOver:a?U=>V(U,j):void 0,onDragLeave:a?O:void 0,onDrop:a?U=>A(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>$(z,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",T===j&&"border-primary border-dashed border rounded-md",W&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(Vw,{checked:B,onClick:U=>G(z,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(z,j)})]},z.id)})}):jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...x,children:y})}var zw=X.forwardRef(Aw),sf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),lf=X.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(sf({interactive:t,className:e})),...a,children:[n&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));lf.displayName="ListItem";var cf=X.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));cf.displayName="ListItemText";var mf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),pf=X.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:u(mf({position:t,className:e})),...n}));pf.displayName="Timeline";var ff=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"}}),gf=X.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(ff({variant:t,className:e})),...s,children:[!n&&jsxs("div",{className:"flex flex-col items-center",children:[jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:o}),!r&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));gf.displayName="TimelineItem";var bf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));bf.displayName="TimelineContent";var vf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));vf.displayName="TimelineOpposite";var xf=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}}),yf=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),Rf=X.createContext({}),wf=X.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=X.useState(a),f=o!==void 0?o:d,p=X.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(Rf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(xf({size:t,fullWidth:n,className:e})),...l,children:r})})});wf.displayName="SegmentedControl";var Cf=X.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=X.useContext(Rf),i=s.value===n,l=r||s.disabled;return jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(n);},className:u(yf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Cf.displayName="SegmentedControlItem";var Tf=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"}}),Mf=e=>{let t=e.type;return t.startsWith("image/")?Image$1:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},is=e=>{if(e===0)return "0 Bytes";let t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Nf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${is(t)}`}),n&&n.length>0&&(n.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${n.join(", ")}`})),r},kf=X.forwardRef(({className:e,variant:t,size:n,onFilesChange:r,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,b]=X.useState(false),[v,y]=X.useState(false),[x,w]=X.useState([]),C=X.useRef(null),R=X.useCallback(L=>{if(!L||L.length===0)return;let I=Array.from(L),V=[],O=[];(m?I:[I[0]]).forEach(K=>{let $=Nf(K,c,d);$.length>0?O.push({file:K,errors:$}):V.push(K);}),w(O),V.length>0&&r?.(V),O.length>0&&o?.(O);},[c,d,m,r,o]),T=X.useCallback(L=>{if(L.preventDefault(),L.stopPropagation(),!f&&(b(true),L.dataTransfer.items)){let V=Array.from(L.dataTransfer.items).some(O=>{if(O.kind!=="file")return true;if(d&&d.length>0){let A=O.type;return !d.some(K=>K.endsWith("/*")?A.startsWith(K.slice(0,-2)):A===K)}return false});y(V);}},[f,d]),M=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!f&&(L.dataTransfer.dropEffect="copy");},[f]),k=X.useCallback(L=>{L.preventDefault(),L.stopPropagation();let I=L.currentTarget.getBoundingClientRect(),V=L.clientX,O=L.clientY;(V<I.left||V>I.right||O<I.top||O>I.bottom)&&(b(false),y(false));},[]),P=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),b(false),y(false),!f&&R(L.dataTransfer.files);},[f,R]),E=X.useCallback(()=>{f||C.current?.click();},[f]),N=X.useCallback(L=>{R(L.target.files),L.target.value="";},[R]),S=X.useCallback(L=>{f||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:T,onDragOver:M,onDragLeave:k,onDrop:P,onClick:E,onKeyDown:S,className:u(Tf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:D,multiple:m,disabled:f,onChange:N,className:"sr-only",tabIndex:-1}),l||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${is(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),x.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:x.map(({file:L,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:L.name}),":"," ",I.map(V=>V.message).join(", ")]},L.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(L=>{let I=Mf(L.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",L.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(I,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:L.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[is(L.file.size),L.error&&jsx("span",{className:"ml-2 text-danger",children:L.error})]}),L.progress!==void 0&&L.progress<100&&jsx(_a,{value:L.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:V=>{V.stopPropagation(),a?.(L.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},L.id)})})]})});kf.displayName="FileUpload";var _w=`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")`,Ef=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}}),qo=X.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),r?.(e);},className:u(Ef({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?_w:void 0,backgroundSize:n?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));qo.displayName="ColorSwatch";var Lf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Sf=X.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=X.useState(t),b=e??g,v=X.useCallback(x=>{l||(e===void 0&&h(x),n?.(x));},[e,n,l]),y=x=>x.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Lf({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(x=>{let w=b?y(b)===y(x):false;return jsx(qo,{role:"option",color:x,size:s,shape:i,isSelected:w,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":w},x)})})});Sf.displayName="ColorSwatchPicker";var qw=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Df={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Hf=X.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=qw,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=X.useState(e??t),f=X.useId();X.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=b=>{m(b),n?.(b);},g=b=>{m(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),n?.(v);};return l==="simple"?jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",r&&"opacity-50 cursor-not-allowed",Df[s],i),children:[jsx("input",{type:"color",value:d,onChange:h,disabled:r,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(ot,{children:[jsx(qn,{ref:c,disabled:r,className:u("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",Df[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(at,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(qo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Hf.displayName="ColorPicker";var If=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),Ji=e=>String(e).padStart(2,"0"),tC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},nC=(e,t)=>`${Ji(e)}:${Ji(t)}`,Vf=X.forwardRef(({className:e,size:t,value:n,onChange:r,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=X.useState(n??""),[g,h]=X.useState(false);X.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=tC(f||"00:00"),y=k=>{let P=k.target.value;p(P),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(P)&&r?.(P);},x=(k,P)=>{let E=Math.max(0,Math.min(23,k)),N=Math.max(0,Math.min(59,P)),S=nC(E,N);p(S),r?.(S);},w=()=>x(b+1,v),C=()=>x(b-1,v),R=()=>x(b,v+a),T=()=>x(b,v-a),M=({value:k,onIncrement:P,onDecrement:E})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:Ji(k)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:E,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:y,disabled:c,className:u(If({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(ot,{open:g,onOpenChange:h,children:[jsxs(qn,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(at,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(M,{value:b,onIncrement:w,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(M,{value:v,onIncrement:R,onDecrement:T,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;x(k.getHours(),k.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Vf.displayName="TimeInput";var Af=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),oC={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},aC=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},el=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},zf=(e,t,n)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(n,"."),r=r.replace(/[^0-9.-]/g,"");let o=parseFloat(r);return isNaN(o)?void 0:o},Of=X.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",radius:h="md",disabled:b,placeholder:v,...y},x)=>{let[w,C]=X.useState(r),[R,T]=X.useState(""),[M,k]=X.useState(false),P=n!==void 0?n:w,E=f??aC(a,s);X.useEffect(()=>{!M&&P!==void 0&&T(el(P,i,p,g));},[P,i,p,g,M]);let N=I=>{let V=I.target.value;if(!V){T(""),n===void 0&&C(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;T(V);let A=zf(V,p,g);if(A!==void 0){let K=A;l!==void 0&&A<l&&(K=l),c!==void 0&&A>c&&(K=c),n===void 0&&C(K),o?.(K);}},S=()=>{k(true),P!==void 0&&T(P.toString().replace(".",g));},H=()=>{k(false),T(P!==void 0?el(P,i,p,g):"");},D=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:E}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:E});return jsxs("div",{className:"relative flex items-center",children:[D&&jsx("div",{className:"absolute left-3 pointer-events-none",children:D}),jsx("input",{ref:x,type:"text",inputMode:"decimal",value:R,onChange:N,onFocus:S,onBlur:H,disabled:b,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(Af({size:t}),oC[h],D&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...y}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Of.displayName="CurrencyInput";var Bf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),tl={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},lC=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},rr=e=>["#","A","*"].includes(e),cs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];lC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},nl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},Ff=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),cC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},Kf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in tl?tl[a].mask:a,[g,h]=X.useState(r),[b,v]=X.useState(""),[y,x]=X.useState(false),w=X.useRef(null),C=n!==void 0?n:g;X.useImperativeHandle(f,()=>w.current),X.useEffect(()=>{let k=cs(C,p,true);v(k);},[C,p]);let R=k=>{let P=k.target.value,E=k.target.selectionStart??0,N=P.replace(/[^\w]/g,""),S=cs(N,p,true),H=nl(S,p);v(S),n===void 0&&h(l?S:H),o?.(H,S),requestAnimationFrame(()=>{if(w.current){let D=cC(S,p,E);w.current.setSelectionRange(D,D);}});},T=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let P=w.current;if(!P)return;let E=P.selectionStart??0;if(k.key==="Backspace"&&E>0){let N=E-1;for(;N>0&&!rr(p[N]);)N--;let S=nl(b,p),H=0;for(let I=0;I<N&&I<p.length;I++)rr(p[I])&&H++;let D=S.slice(0,Math.max(0,H-1))+S.slice(H),L=cs(D,p,true);v(L),n===void 0&&h(l?L:D),o?.(D,L),k.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(N,N);});}},M=i?Ff(p,s):d;return jsx("input",{ref:w,type:"text",value:b,onChange:R,onKeyDown:T,onFocus:()=>x(true),onBlur:()=>x(false),disabled:c,placeholder:M,className:u(Bf({size:t}),e),style:{borderColor:y?"var(--color-foreground)":void 0},...m})});Kf.displayName="MaskedInput";var fC=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"}}),Gf=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],ds=(e,t)=>{let n=e.replace(/\D/g,""),r="",o=0;for(let a=0;a<t.length&&o<n.length;a++)t[a]==="#"?(r+=n[o],o++):r+=t[a];return r},gC=e=>e.replace(/#/g,"_"),Uf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Gf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,radius:p="md",...g},h)=>{let[b,v]=X.useState(r),[y,x]=X.useState(a??s),[w,C]=X.useState(false),[R,T]=X.useState(false),[M,k]=X.useState(false),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=n!==void 0?n:b,D=a??y,L=l.find(G=>G.code===D)??l[0],I=ds(H,L.format);X.useEffect(()=>{k(true);},[]),X.useEffect(()=>{if(R&&N.current){let G=N.current.getBoundingClientRect();E({top:G.bottom+4,left:G.left,width:Math.max(G.width,280)});}},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{N.current&&!N.current.contains(Y.target)&&S.current&&!S.current.contains(Y.target)&&T(false);};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{Y.key==="Escape"&&T(false);};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[R]);let V=G=>{let F=G.target.value.replace(/\D/g,"");n===void 0&&v(F);let z=ds(F,L.format),j=`${L.dialCode} ${z}`;o?.(F,j,L);},O=G=>{let Y=l.find(j=>j.code===G);if(!Y)return;a===void 0&&x(G),i?.(Y);let F=ds(H,Y.format),z=`${Y.dialCode} ${F}`;o?.(H,z,Y),T(false);},A=t==="sm"?"h-9":t==="lg"?"h-11":"h-10",K=w||R;return jsxs("div",{className:u("flex border bg-background transition-colors",{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}[p],m&&"cursor-not-allowed opacity-50"),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:N,type:"button",disabled:m,onClick:()=>T(!R),className:u("flex items-center justify-between bg-transparent px-3 py-2 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50","w-[100px] shrink-0 border-r",A),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",R&&"rotate-180")})]}),M&&R&&Ba.createPortal(jsx("div",{ref:S,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:P.top,left:P.left,minWidth:P.width},children:jsx(ke,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(G=>jsxs("div",{role:"option","aria-selected":G.code===D,onClick:()=>O(G.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.code===D&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:G.flag}),jsx("span",{className:"flex-1",children:G.name}),jsx("span",{className:"text-xs text-muted-foreground",children:G.dialCode})]})]},G.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:h,type:"tel",inputMode:"tel",value:I,onChange:V,onFocus:()=>C(true),onBlur:()=>C(false),disabled:m,placeholder:f??gC(L.format),className:u("flex h-10 w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",t==="sm"&&"h-8 px-2 text-xs",t==="lg"&&"h-12 px-4 text-base",d&&!c&&"pl-12",e),...g})]})]})});Uf.displayName="PhoneInput";var Wf=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"bordered",size:"md",sticky:false}}),_f=X.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=X.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:l,className:u(Wf({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});_f.displayName="Navbar";var Yf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));Yf.displayName="NavbarBrand";var Xf=X.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});Xf.displayName="NavbarContent";var qf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));qf.displayName="NavbarItem";var Zf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));Zf.displayName="NavbarLink";var Jf=cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",bordered:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"bordered",size:"md",underline:"hover"}}),eg=X.forwardRef(({className:e,variant:t,size:n,underline:r,isExternal:o,showExternalIcon:a=true,isDisabled:s,children:i,...l},c)=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:c,className:u(Jf({variant:t,size:n,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});eg.displayName="Link";var tg=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"}}),ng=X.forwardRef(({className:e,position:t,threshold:n=400,icon:r,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=X.useState(false);X.useEffect(()=>{let y=c?.current||window,x=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return y.addEventListener("scroll",x,{passive:true}),x(),()=>{y.removeEventListener("scroll",x);}},[n,c,g,d]);let b=y=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(y);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(tg({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:i,isIconOnly:true,radius:l,onClick:b,"aria-label":"Back to top",className:"shadow-lg",...f,children:r||jsx(ArrowUp,{className:v})})})});ng.displayName="BackTop";var EC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),LC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),rg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ps=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),og=X.createContext(null),ar=()=>{let e=X.useContext(og);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},ag=X.createContext(null),Qo=()=>{let e=X.useContext(ag);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},ol=X.createContext(null),sg=X.createContext(null),ig=X.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=X.useState(null);return jsx(og.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",EC({radius:n}),e),...r,children:t})})});ig.displayName="Menubar";var lg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=X.useId(),o=X.useRef(null),a=t===r,s=X.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(ag.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};lg.displayName="MenubarMenu";var cg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));cg.displayName="MenubarGroup";var dg=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};dg.displayName="MenubarPortal";var ug=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(ol.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};ug.displayName="MenubarSub";var mg=X.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(sg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));mg.displayName="MenubarRadioGroup";var pg=X.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Qo(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",LC({radius:i}),e),onClick:f,onMouseEnter:p,...r})});pg.displayName="MenubarTrigger";var fg=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=X.useContext(ol);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ps({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});fg.displayName="MenubarSubTrigger";var gg=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=X.useContext(ol);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let x=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=x.top,R=x.right+t;R+w.width>window.innerWidth&&(R=x.left-w.width-t),f({top:C,left:R});})();},[l,t,d]);let b=y=>{n?.(y),c(true);},v=y=>{r?.(y),c(false);};return !p||!l?null:Ba.createPortal(jsx("div",{ref:y=>{h.current=y,typeof a=="function"?a(y):a&&(a.current=y);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",rg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});gg.displayName="MenubarSubContent";var bg=X.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=Qo(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),x=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-y.width/2:t==="end"&&(w=v.right-y.width-n),f({top:x,left:w});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,n,r,l]),X.useEffect(()=>{if(!c)return;let b=v=>{let y=v.target;h.current&&!h.current.contains(y)&&l.current&&!l.current.contains(y)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),X.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:Ba.createPortal(jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",rg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});bg.displayName="MenubarContent";var vg=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});vg.displayName="MenubarItem";var hg=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=Qo(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});hg.displayName="MenubarCheckboxItem";var xg=X.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=X.useContext(sg),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});xg.displayName="MenubarRadioItem";var yg=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));yg.displayName="MenubarLabel";var Rg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Rg.displayName="MenubarSeparator";var wg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});wg.displayName="MenubarShortcut";var Cg=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"}}),Tg=X.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=X.Children.toArray(o);return jsx("div",{ref:s,className:u(Cg({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>X.isValidElement(l)?X.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<r?"completed":c===r?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:n}):l)})});Tg.displayName="Steps";var Mg=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"}}),DC=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"}}),HC=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"}}),Ng=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(Mg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(DC({status:s,size:n})),children:s==="completed"?jsx(Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(HC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Ng.displayName="Step";var Pg=cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),Eg=cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),Lg=X.createContext(null),KC=()=>{let e=X.useContext(Lg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},$C=({checked:e,indeterminate:t,disabled:n,onClick:r})=>jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:n,onClick:o=>{o.stopPropagation(),n||r(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",n&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),Sg=({node:e,level:t,isLast:n=false,parentIsLastPath:r=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:y,handleDrop:x,allowDrop:w,onDragStart:C,onDragOver:R,onDragEnter:T,onDragLeave:M,onDragEnd:k,showLine:P,showIcon:E,showHandle:N,dragIcon:S,icon:H,leafIcon:D,folderIcon:L,folderOpenIcon:I,blockNode:V,disabled:O,size:A,getAllKeys:K}=KC(),$=e.children&&e.children.length>0,G=e.isLeaf??!$,Y=o.has(e.key),F=s.has(e.key),z=c.has(e.key),j=d.has(e.key),W=g?.key===e.key,B=b===e.key,Z=!!(O||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ce=X.useMemo(()=>Z?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Z]),Q=X.useMemo(()=>S!==void 0?S:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[S,p]),le=X.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:Y,isLeaf:G}):H:G?D:Y?I:L,[e.icon,H,Y,G,D,L,I]),Fe=q=>{if(!Ce)return;q.stopPropagation(),q.dataTransfer.effectAllowed="move";let De=q.currentTarget,de=De.cloneNode(true),je=document.documentElement.classList.contains("dark"),We=je?"#0a0a0a":"#ffffff",Gn=je?"#27272a":"#e4e4e7";de.style.cssText=`
|
|
43
|
+
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:x}}),jsx("div",{ref:c,id:g,onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),style:{...s,...(()=>{if(!r)return {};let C=u0[o],R=t==="vertical"||t==="both",T=t==="horizontal"||t==="both",M=[R&&f.top&&`linear-gradient(to bottom, transparent, black ${C})`,R&&f.bottom&&`linear-gradient(to top, transparent, black ${C})`,T&&f.left&&`linear-gradient(to right, transparent, black ${C})`,T&&f.right&&`linear-gradient(to left, transparent, black ${C})`].filter(Boolean);return M.length===0?{}:{maskImage:M.join(", "),WebkitMaskImage:M.join(", "),maskComposite:"intersect",WebkitMaskComposite:"source-in"}})()},className:u(t==="vertical"&&"h-full w-full overflow-y-auto overflow-x-hidden",t==="horizontal"&&"w-full overflow-x-auto overflow-y-hidden",t==="both"&&"h-full w-full overflow-auto",e),...i,children:a})]})});ke.displayName="ScrollArea";var Nd=cva("flex w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"min-h-9 py-1.5 text-xs",md:"min-h-10 py-2",lg:"min-h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Aa=X.forwardRef(({options:e,multiple:t=false,value:n,defaultValue:r,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,size:p,radius:g,className:h,...b},v)=>{let[y,x]=X.useState(false),[w,C]=X.useState(""),[R,T]=X.useState(r||""),[M,k]=X.useState(r||[]),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),D=X.useRef(null),L=n!==void 0?n:R,I=n!==void 0?n:M,V=n!==void 0,O=B=>{d&&L===B?(V||T(""),o?.("")):(V||T(B),o?.(B)),x(false),C("");},A=B=>{let Z=I.includes(B)?I.filter(ue=>ue!==B):[...I,B];V||k(Z),o?.(Z);},K=(B,Z)=>{Z.stopPropagation();let ue=I.filter(U=>U!==B);V||k(ue),o?.(ue);},$=B=>{B.stopPropagation(),t?(V||k([]),o?.([])):(V||T(""),o?.(""));},G=e.find(B=>B.value===L),Y=e.filter(B=>I.includes(B.value)),F=Y.slice(0,m),z=Y.length-m,j=s?e.filter(B=>B.label.toLowerCase().includes(w.toLowerCase())):e;X.useEffect(()=>{if(y&&S.current){let B=S.current.getBoundingClientRect();E({top:B.bottom+4,left:B.left,width:B.width}),s&&setTimeout(()=>D.current?.focus(),0);}y||C("");},[y,s]),X.useEffect(()=>{let B=Z=>{let ue=Z.target,U=N.current&&!N.current.contains(ue),Ce=H.current&&!H.current.contains(ue);U&&Ce&&(x(false),C(""));};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]),X.useEffect(()=>{if(!y)return;let B=Z=>{H.current?.contains(Z.target)||(x(false),C(""));};return window.addEventListener("scroll",B,true),()=>window.removeEventListener("scroll",B,true)},[y]);let W=t?I.length>0:!!L;return jsxs("div",{ref:N,className:u("relative",h),...b,children:[jsxs("div",{ref:B=>{S.current=B,typeof v=="function"?v(B):v&&(v.current=B);},role:"combobox","aria-expanded":y,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&x(!y),className:u(Nd({size:p,radius:g}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!G&&"text-muted-foreground"),children:G?G.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[F.map(B=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[B.label,jsx("span",{role:"button",tabIndex:0,onClick:Z=>K(B.value,Z),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&K(B.value,Z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},B.value)),z>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",z," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:$,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&$(B);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X$1,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",y&&"rotate-180")})]})]}),y&&!c&&typeof document<"u"&&Ba.createPortal(jsxs("div",{ref:H,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:P.top,left:P.left,minWidth:P.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:D,type:"text",value:w,onChange:B=>C(B.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(ke,{style:{maxHeight:f},onWheel:B=>B.stopPropagation(),children:jsx("div",{className:"p-1",children:j.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):j.map(B=>{let Z=t?I.includes(B.value):L===B.value;return jsxs("div",{role:"option","aria-selected":Z,onClick:()=>{B.disabled||(t?A(B.value):O(B.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",B.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Z&&jsx(Check,{className:"h-4 w-4"})}),B.label]},B.value)})})})]}),document.body)]})});Aa.displayName="Select";var kd=X.createContext(null),Bo=()=>{let e=X.useContext(kd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Ri=X.createContext({radius:"md"}),wi=X.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),[s,i]=X.useState(-1),l=t!==void 0,c=l?t:o,d=X.useRef(null),m=X.useRef(null),f=X.useId(),p=X.useRef(new Map),g=X.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=X.useCallback((v,y)=>{p.current.set(v,y);},[]),b=X.useCallback(v=>{p.current.delete(v);},[]);return jsx(kd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};Cn.displayName="Dropdown";var Tn=X.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Bo();return jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{n?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});Tn.displayName="DropdownTrigger";var x0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},Mn=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:b,contentId:v,activeIndex:y,setActiveIndex:x,items:w}=Bo(),[C,R]=X.useState({top:0,left:0}),[T,M]=X.useState(t),[k,P]=X.useState(false),E=X.useRef(0);if(X.useEffect(()=>{P(true);},[]),X.useEffect(()=>{p&&(E.current=w.current.size);},[p,w]),X.useEffect(()=>{if(!p||!h.current||!b.current)return;let S=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),D=b.current.getBoundingClientRect(),L=window.innerWidth,I=window.innerHeight,V=0,O=0,A=t;switch(t){case "top":V=H.top-D.height-n,V<a&&(V=H.bottom+n,A="bottom");break;case "bottom":V=H.bottom+n,V+D.height>I-a&&(V=H.top-D.height-n,A="top");break;case "left":O=H.left-D.width-n,O<a&&(O=H.right+n,A="right");break;case "right":O=H.right+n,O+D.width>L-a&&(O=H.left-D.width-n,A="left");break}if(A==="top"||A==="bottom"){switch(r){case "start":O=H.left+o;break;case "center":O=H.left+H.width/2-D.width/2;break;case "end":O=H.right-D.width-o;break}O<a?O=a:O+D.width>L-a&&(O=L-D.width-a);}else {switch(r){case "start":V=H.top+o;break;case "center":V=H.top+H.height/2-D.height/2;break;case "end":V=H.bottom-D.height-o;break}V<a?V=a:V+D.height>I-a&&(V=I-D.height-a);}R({top:V,left:O}),M(A);};return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S,true),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S,true);}},[p,t,n,r,o,a,h]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=H.target;b.current&&!b.current.contains(D)&&h.current&&!h.current.contains(D)&&(s?.(),g(false));};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[p,g,s,h,b]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=Array.from(w.current.entries()).sort(([I],[V])=>I-V).map(([,I])=>I),L=D.length;if(L!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),y===-1||y>=L-1?x(l?0:Math.min(y+1,L-1)):x(y+1);break;case "ArrowUp":H.preventDefault(),y<=0?x(l?L-1:0):x(y-1);break;case "Home":H.preventDefault(),x(0);break;case "End":H.preventDefault(),x(L-1);break;case "Enter":case " ":H.preventDefault(),y>=0&&y<L&&D[y]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p,g,i,y,x,w,l,h]),X.useEffect(()=>{p&&y>=0&&Array.from(w.current.entries()).sort(([H],[D])=>H-D).map(([,H])=>H)[y]?.focus();},[p,y,w]),!k||!p)return null;let N={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[T];return Ba.createPortal(jsx("div",{ref:S=>{b.current=S,typeof f=="function"?f(S):f&&(f.current=S);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":T,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",x0[c],N,e),style:{top:C.top,left:C.left},...m,children:jsx(Ri.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Pd=0,Ed={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Bo(),{radius:b}=X.useContext(Ri),[v]=X.useState(()=>Pd++),y=X.useRef(null);X.useEffect(()=>(!n&&y.current&&g(v,y.current),()=>{h(v);}),[n,v,g,h]);let x=R=>{if(n){R.preventDefault();return}o?.(R),r?.(),m(false);},w=R=>{a?.(R),n||p(v);};return jsxs("div",{ref:R=>{y.current=R,typeof d=="function"?d(R):d&&(d.current=R);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===v?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ed[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:x,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Ci=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ci.displayName="DropdownSection";var Ld=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Ld.displayName="DropdownSeparator";var Sd=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Sd.displayName="DropdownShortcut";var Dd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Dd.displayName="DropdownGroup";var Hd=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),{contentRef:s}=Bo(),i=t!==void 0,l=i?t:o,c=X.useRef(null),d=X.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsx(wi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Hd.displayName="DropdownSub";var Id=X.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=X.useContext(wi),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Bo(),{radius:p}=X.useContext(Ri),[g]=X.useState(()=>Pd++),h=X.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:y}=c;X.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let x=R=>{o?.(R),n||(d(g),v(true));},w=R=>{a?.(R);},C=R=>{s?.(R),(R.key==="ArrowRight"||R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(true));};return jsxs("div",{ref:R=>{h.current=R,y.current=R,typeof l=="function"?l(R):l&&(l.current=R);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:n?-1:0,"aria-disabled":n,"data-state":b?"open":"closed","data-disabled":n?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ed[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:x,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Id.displayName="DropdownSubTrigger";var Vd=X.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=X.useContext(wi);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=X.useState({top:0,left:0}),[h,b]=X.useState(false),v=X.useRef(null),y=X.useRef(null);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let R=m.current.getBoundingClientRect(),T=v.current.getBoundingClientRect(),M=window.innerWidth,k=window.innerHeight,P=R.top+n,E=R.right+t;E+T.width>M-r&&(E=R.left-T.width-t),P+T.height>k-r&&(P=k-T.height-r),P<r&&(P=r),g({top:P,left:E});})();},[c,t,n,r,m]);let x=C=>{o?.(C),y.current&&(clearTimeout(y.current),y.current=null),d(true);},w=C=>{a?.(C);let R=C.relatedTarget;m.current?.contains(R)||f?.current?.contains(R)||(y.current=setTimeout(()=>{d(false);},100));};return X.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),!h||!c?null:Ba.createPortal(jsx("div",{ref:C=>{v.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:x,onMouseLeave:w,...s}),document.body)});Vd.displayName="DropdownSubContent";var y0=Ci;var Od=X.createContext(null),Ti=()=>{let e=X.useContext(Od);if(!e)throw new Error("Popover components must be used within a Popover");return e},ot=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useId(),d=X.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsx(Od.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=X.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Ti(),c=f=>{t?.(f),s(!a);},d=f=>{i.current=f,typeof o=="function"?o(f):o&&(o.current=f);},m={"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r};return n&&X.isValidElement(e)?X.cloneElement(e,{...m,ref:d,onClick:f=>{e.props.onClick?.(f),c(f);}}):jsx("button",{ref:d,type:"button",...m,children:e})});qn.displayName="PopoverTrigger";var an=X.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Ti();return jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});an.displayName="PopoverAnchor";var at=X.forwardRef(({className:e,style:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:b}=Ti(),[v,y]=X.useState({top:0,left:0}),[x,w]=X.useState(false),[C,R]=X.useState(null);if(X.useEffect(()=>{w(true);},[]),X.useEffect(()=>{if(!p||!h.current||!C)return;let M=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),P=C.getBoundingClientRect(),E=0,N=0;switch(n){case "top":E=k.top-P.height-r;break;case "bottom":E=k.bottom+r;break;case "left":N=k.left-P.width-r;break;case "right":N=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":N=k.left+a;break;case "center":N=k.left+k.width/2-P.width/2;break;case "end":N=k.right-P.width-a;break}else switch(o){case "start":E=k.top+a;break;case "center":E=k.top+k.height/2-P.height/2;break;case "end":E=k.bottom-P.height-a;break}y({top:E,left:N});};return M(),window.addEventListener("resize",M),window.addEventListener("scroll",M,true),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true);}},[p,n,r,o,a,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{let P=k.target;C&&C.contains(P)||h.current&&h.current.contains(P)||P.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",M),()=>document.removeEventListener("mouseup",M)},[p,g,s,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[p,g,i]),!x||!p)return null;let T={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[n];return Ba.createPortal(jsx("div",{ref:M=>{R(k=>k!==M?M:k),typeof f=="function"?f(M):f&&(f.current=M);},id:b,role:"dialog","data-state":p?"open":"closed","data-side":n,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",T,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});at.displayName="PopoverContent";var Bd=X.createContext(null),Ni=()=>{let e=X.useContext(Bd);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},Fd=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=X.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsx(Bd.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});Fd.displayName="Tabs";var Mi={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"}},Kd=X.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Ni(),l=X.useRef(null),[c,d]=X.useState({opacity:0});X.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let y=g.getBoundingClientRect(),x=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:x.height,transform:`translateY(${x.top-y.top}px)`,opacity:1}:{width:x.width,height:2,transform:`translateX(${x.left-y.left}px)`,opacity:1}):o==="solid"&&d(w?{width:x.width,height:x.height,transform:`translateY(${x.top-y.top}px)`,opacity:1}:{width:x.width,height:x.height,transform:`translateX(${x.left-y.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs("div",{ref:g=>{l.current=g,typeof r=="function"?r(g):r&&(r.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Mi[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Mi[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Kd.displayName="TabsList";var $d=X.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Ni(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Mi[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});$d.displayName="TabsTrigger";var Gd=X.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Ni(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r,children:n}):null});Gd.displayName="TabsContent";var Ud=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function w0(e,t=Ud){return e?t.filter(r=>r.test(e)).length/t.length:0}function C0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function T0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Ko=0,ki=null;function Gt(){Ko===0&&(ki=document.body.style.overflow,document.body.style.overflow="hidden"),Ko++;}function Ut(){Ko--,Ko<=0&&(Ko=0,document.body.style.overflow=ki??"",ki=null);}var Wd=X.createContext(null),Oa=()=>{let e=X.useContext(Wd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},_d=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=X.useState(t),s=e!==void 0,i=s?e:o,l=X.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(Wd.Provider,{value:{open:i,onOpenChange:l},children:r})};_d.displayName="Sheet";var Yd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Yd.displayName="SheetTrigger";var Xd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});Xd.displayName="SheetClose";var Ei=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Ei.displayName="SheetPortal";var qd=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Oa();return r?jsx("div",{ref:n,className:u("fixed inset-0 z-50 bg-black/80",r?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});qd.displayName="SheetOverlay";var Zd=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),k0=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],Qd=X.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Oa(),[d,m]=X.useState(false),[,f]=X.useState(false);return X.useEffect(()=>{if(l)m(true),f(true),Gt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Ut();}},[l]),X.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxs(Ei,{children:[jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(Zd({side:e}),k0(e,l),t),...s,children:[!r&&jsxs("button",{type:"button",onClick:()=>c(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});Qd.displayName="SheetContent";var Jd=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jd.displayName="SheetHeader";var eu=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});eu.displayName="SheetFooter";var tu=X.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));tu.displayName="SheetTitle";var nu=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));nu.displayName="SheetDescription";var L0=({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 ru=X.createContext(null),Fa=()=>{let e=X.useContext(ru);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Li=X.createContext(null),ou=({children:e,onOpenChange:t})=>{let[n,r]=X.useState(false),[o,a]=X.useState({x:0,y:0}),s=X.useId(),i=X.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(ru.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};ou.displayName="ContextMenu";var au=X.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Fa(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});au.displayName="ContextMenuTrigger";var su=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));su.displayName="ContextMenuGroup";var iu=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};iu.displayName="ContextMenuPortal";var lu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Li.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};lu.displayName="ContextMenuSub";var cu=X.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Fa(),[d,m]=X.useState(false),[f,p]=X.useState(l),g=X.useRef(null);return X.useEffect(()=>{m(true);},[]),X.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),y+b.height>window.innerHeight&&(y=window.innerHeight-b.height-8),p({x:v,y});},[s,l]),X.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),X.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:Ba.createPortal(jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:r}),document.body)});cu.displayName="ContextMenuContent";var du=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=X.useContext(Li);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{r?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});du.displayName="ContextMenuSubTrigger";var uu=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=X.useContext(Li);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=X.useState({top:0,left:0}),[f,p]=X.useState(false),g=X.useRef(null);X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let y=c.current.getBoundingClientRect(),x=g.current.getBoundingClientRect(),w=y.top,C=y.right+t;C+x.width>window.innerWidth&&(C=y.left-x.width-t),m({top:w,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:Ba.createPortal(jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:b,...o}),document.body)});uu.displayName="ContextMenuSubContent";var mu=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Fa(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});mu.displayName="ContextMenuItem";var pu=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Fa(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});pu.displayName="ContextMenuCheckboxItem";var fu=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));fu.displayName="ContextMenuSection";var gu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));gu.displayName="ContextMenuSeparator";var bu=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bu.displayName="ContextMenuShortcut";var hu=X.createContext(null),V0=()=>{let e=X.useContext(hu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},xu=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=X.useState(n),p=t!==void 0,g=p?t:m,h=X.useId(),b=v=>{p||f(v),r?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(hu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});xu.displayName="RadioGroup";var yu=X.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=V0(),s=a.value===t,i=n||a.disabled;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>a.onValueChange(t),...r,children:s&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});yu.displayName="RadioGroupItem";var $a=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),Ru=X.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=X.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u($a({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Ru.displayName="Toggle";var wu=X.createContext(null),F0=()=>{let e=X.useContext(wu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Cu=X.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=X.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:m,h=b=>{if(r==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(y=>y!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(wu.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Cu.displayName="ToggleGroup";var Tu=X.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=F0(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u($a({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Tu.displayName="ToggleGroupItem";var Ua=X.forwardRef(({className:e,value:t,defaultValue:n=[0],onValueChange:r,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,v=X.useRef(null),[y,x]=X.useState(false),[w,C]=X.useState(null),R=(H,D)=>{if(!v.current)return b[0];let L=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-L.left)/L.width:I=1-(D-L.top)/L.height,I=Math.max(0,Math.min(1,I));let V=a+I*(s-a),O=Math.round(V/i)*i;return Math.max(a,Math.min(s,O))},T=(H,D)=>{let L=[...b];L[D]=H,D>0&&H<b[D-1]&&(L[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(L[D]=b[D+1]),h||g(L),r?.(L);},M=(H,D)=>{l||(H.preventDefault(),x(true),C(D),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!y||w===null||l)return;let D=R(H.clientX,H.clientY);T(D,w);},P=()=>{y&&(x(false),C(null),o?.(b));},E=H=>{if(l)return;let D=R(H.clientX,H.clientY),L=0,I=Math.abs(b[0]-D);for(let V=1;V<b.length;V++){let O=Math.abs(b[V]-D);O<I&&(I=O,L=V);}T(D,L),o?.([...b.slice(0,L),D,...b.slice(L+1)]);},N=(H,D)=>{if(l)return;let L=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),L=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),L=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),L=a;break;case "End":H.preventDefault(),L=s;break;default:return}T(L,D),o?.([...b.slice(0,D),L,...b.slice(D+1)]);},S=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsx("div",{ref:v,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:E,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${S(b[0])}%`:0,right:`${100-S(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${S(b[0])}%`:0,top:`${100-S(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,D)=>jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",y&&w===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${S(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:L=>M(L,D),onPointerMove:k,onPointerUp:P,onPointerCancel:P,onKeyDown:L=>N(L,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ua.displayName="Slider";var Mu=X.createContext(null),Nu=()=>{let e=X.useContext(Mu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Di=X.createContext(null),ku=()=>{let e=X.useContext(Di);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Pu=X.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=X.useState(()=>t==="single"?r?[r]:[]:r||[]),f=X.useRef(new Map),p=X.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=w=>{if(t==="single"){let R=h.includes(w)&&a?[]:[w];g||m(R),o?.(R[0]||"");}else {let C=h.includes(w)?h.filter(R=>R!==w):[...h,w];g||m(C),o?.(C);}},v=X.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),y=X.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),x=X.useCallback(w=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,T;f.current.forEach((N,S)=>{N===R&&(T=S);});let M=T?C.indexOf(T):-1,k;switch(w){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=M===-1?0:(M+1)%C.length;break;case "prev":k=M===-1?C.length-1:(M-1+C.length)%C.length;break}let P=C[k];f.current.get(P)?.focus();},[]);return jsx(Mu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:y,focusTrigger:x},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Pu.displayName="Accordion";var Eu=X.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Nu(),d=c.value.includes(t),m=n||c.disabled||false,f=X.useId(),p=X.useId();return r!==void 0?jsx(Di.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(Lu,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:r}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(Su,{children:s})]})}):jsx(Di.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});Eu.displayName="AccordionItem";var Lu=X.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Nu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=ku(),f=X.useRef(null);X.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(r?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsx("h3",{className:"flex",children:jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{n?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});Lu.displayName="AccordionTrigger";var Su=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=ku();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:n,...r,children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});Su.displayName="AccordionContent";var Hu=X.createContext(null),Iu=()=>{let e=X.useContext(Hu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},Vu=X.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=X.useState(n),m=t!==void 0,f=m?t:c,p=X.useId(),g=X.useId(),h=b=>{o||(m||d(b),r?.(b));};return jsx(Hu.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Hi,{})]}),s]})})});Vu.displayName="Collapsible";var Hi=X.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=Iu();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Hi.displayName="CollapsibleTrigger";var Au=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=Iu(),c=X.useRef(null),[d,m]=X.useState(0),[f,p]=X.useState(false),[g,h]=X.useState(a);X.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Au.displayName="CollapsibleContent";var _a=X.forwardRef(({className:e,value:t=0,max:n=100,label:r,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/n*100,0),100);return jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsx("span",{className:"text-muted-foreground",children:r}),o&&jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":typeof r=="string"?r:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});_a.displayName="Progress";var Fu=X.createContext(null),Ku=()=>{let e=X.useContext(Fu);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},$u=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=X.useState(n),c=t!==void 0,d=c?t:i,m=X.useRef(null),f=X.useId(),p=X.useRef(null),g=X.useRef(null),h=X.useCallback(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return X.useEffect(()=>{if(!s||!d)return;let b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,r]),X.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(Fu.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};$u.displayName="HoverCard";var Gu=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Ku();return jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{n?.(p),i(false);},onFocus:p=>{r?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});Gu.displayName="HoverCardTrigger";var Uu=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=Ku(),[g,h]=X.useState({top:0,left:0}),[b,v]=X.useState(false),y=X.useRef(null);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!d||!f.current||!y.current)return;(()=>{if(!f.current||!y.current)return;let T=f.current.getBoundingClientRect(),M=y.current.getBoundingClientRect(),k=0,P=0;switch(t){case "top":k=T.top-M.height-n;break;case "bottom":k=T.bottom+n;break;case "left":P=T.left-M.width-n;break;case "right":P=T.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":P=T.left+o;break;case "center":P=T.left+T.width/2-M.width/2;break;case "end":P=T.right-M.width-o;break}else switch(r){case "start":k=T.top+o;break;case "center":k=T.top+T.height/2-M.height/2;break;case "end":k=T.bottom-M.height-o;break}h({top:k,left:P});})();},[d,t,n,r,o,f]);let x=R=>{a?.(R),m(true);},w=R=>{s?.(R),m(false);};if(!b||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:R=>{y.current=R,typeof c=="function"?c(R):c&&(c.current=R);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:x,onMouseLeave:w,...l,children:i}),document.body)});Uu.displayName="HoverCardContent";var ju=X.createContext({size:"md",variant:"default",radius:"md"}),Xa=()=>X.useContext(ju);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var W0=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),_0=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"}}),Y0=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"}}),Wu=X.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(ju.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Wu.displayName="Breadcrumb";var _u=X.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=Xa();return jsx("ol",{ref:n,className:u(W0({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});_u.displayName="BreadcrumbList";var Yu=X.forwardRef(({className:e,...t},n)=>{let{size:r}=Xa();return jsx("li",{ref:n,className:u("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});Yu.displayName="BreadcrumbItem";var Xu=X.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Xu.displayName="BreadcrumbLink";var qu=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));qu.displayName="BreadcrumbPage";var Zu=({children:e,className:t,...n})=>{let{size:r}=Xa();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(_0({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};Zu.displayName="BreadcrumbSeparator";var Qu=({className:e,...t})=>{let{size:n}=Xa();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(Y0({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};Qu.displayName="BreadcrumbEllipsis";var tm=X.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));tm.displayName="AspectRatio";var om=X.createContext(null),Vi=()=>{let e=X.useContext(om);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},am=X.createContext(null),sm=()=>{let e=X.useContext(am);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},im=X.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=X.useState(null);return jsx(om.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(Ai,{})]})})});im.displayName="NavigationMenu";var lm=X.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Vi();return jsx("ul",{ref:n,className:u("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});lm.displayName="NavigationMenuList";var cm=X.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Vi(),s=X.useId(),i=X.useRef(null),l=o===s,c=X.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(am.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});cm.displayName="NavigationMenuItem";var dm=cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),um=X.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=sm(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(dm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});um.displayName="NavigationMenuTrigger";var mm=X.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=sm(),l=X.useRef(null),[c,d]=X.useState({top:0,left:0});X.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?Ba.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...r}),document.body):null});mm.displayName="NavigationMenuContent";var pm=cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),fm=X.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:u(pm(),t&&"bg-accent text-accent-foreground",e),...n}));fm.displayName="NavigationMenuLink";var Ai=X.forwardRef((e,t)=>null);Ai.displayName="NavigationMenuViewport";var gm=X.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Vi();return r?jsx("div",{ref:n,className:u("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});gm.displayName="NavigationMenuIndicator";var xm=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Nt=X.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:r,type:"button",className:u(xm({size:t}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:a,height:a}})})});Nt.displayName="CloseButton";var qa=X.createContext(null);function aR(){let e=X.useContext(qa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return X.useContext(qa)}var sR="16rem",iR="18rem",lR="3rem",cR="b",dR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},uR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},zi=X.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:n,placement:r="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,y]=X.useState(false),[x,w]=X.useState(false),[C,R]=X.useState(e),T=t??C,M=X.useCallback(N=>{let S=typeof N=="function"?N(T):N;n?n(S):R(S);},[n,T]);X.useEffect(()=>{let N=()=>{y(window.innerWidth<768);};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);let k=X.useCallback(()=>b?M(N=>!N):v?w(N=>!N):M(N=>!N),[v,M,w,b]);X.useEffect(()=>{if(b)return;let N=S=>{S.key===cR&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),k());};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[k,b]);let P=T?"expanded":"collapsed",E=X.useMemo(()=>({placement:r,state:P,open:T,setOpen:M,isMobile:v,openMobile:x,setOpenMobile:w,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,P,T,M,v,x,w,k,l,h,o,a,s,i]);return b?jsx(qa.Provider,{value:E,children:jsx(Drawer.Root,{open:T,onOpenChange:M,direction:r,dismissible:s,children:f})}):jsx(qa.Provider,{value:E,children:jsx(Wn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":sR,"--drawer-width-icon":lR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});zi.displayName="Drawer";var Rm=X.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=kn();if(!s)return jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:r});if(l==="none")return jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",n),...o,children:r});if(c&&!t)return jsx(mR,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":b&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:r})})})}return jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:r})})]})});Rm.displayName="DrawerSidebar";var mR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=X.useState(false);return X.useEffect(()=>{a(true);},[]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",r==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",r==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":iR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},wm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return jsxs("button",{ref:r,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...n,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});wm.displayName="DrawerTrigger";var Cm=X.forwardRef(({className:e,children:t,...n},r)=>{let o=kn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque";if(a){let c=s==="top"||s==="bottom",d=s==="left"||s==="right",m=d?dR[i]:uR[i],f={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},p={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",f[l])}),jsxs(Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",p[s],e),style:{...d?{width:m,height:"100%"}:{},...c?{maxHeight:m}:{},...n.style},...n,children:[c&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});Cm.displayName="DrawerContent";var Tm=X.forwardRef(({className:e,hideCloseButton:t,children:n,...r},o)=>{let a=kn(),s=a?.hideCloseButton??false,i=!t&&!s;return jsxs("div",{ref:o,"data-drawer":"header",className:u("flex flex-col gap-2 p-4 relative",e),...r,children:[n,i&&jsx(Nt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});Tm.displayName="DrawerHeader";var Mm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));Mm.displayName="DrawerBody";var Nm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Nm.displayName="DrawerFooter";var km=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));km.displayName="DrawerTitle";var Pm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Pm.displayName="DrawerDescription";var Em=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Nt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Em.displayName="DrawerClose";var Lm=X.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=kn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...r,children:[c?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Lm.displayName="DrawerToggle";var Sm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Sm.displayName="DrawerSeparator";var Dm=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));Dm.displayName="DrawerMenu";var Hm=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));Hm.displayName="DrawerMenuItem";var Im=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),Vm=X.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=kn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(Im({variant:t,size:n}),o),...s,children:a});return r?jsxs(_n,{children:[jsx(Yn,{children:m}),jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});Vm.displayName="DrawerMenuButton";var Am=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));Am.displayName="DrawerGroup";var zm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));zm.displayName="DrawerGroupLabel";var Om=X.forwardRef(({className:e,...t},n)=>jsx("main",{ref:n,className:u("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Om.displayName="DrawerInset";var pR=zi;var Fm=X.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));Fm.displayName="Table";var Km=X.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Km.displayName="TableHeader";var $m=X.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));$m.displayName="TableBody";var Gm=X.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Gm.displayName="TableFooter";var Um=X.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Um.displayName="TableRow";var jm=X.forwardRef(({className:e,...t},n)=>jsx("th",{ref:n,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));jm.displayName="TableHead";var Wm=X.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Wm.displayName="TableCell";var _m=X.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));_m.displayName="TableCaption";function xR({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(w,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...y},x){let[w,C]=X.useState(new Set),[R,T]=X.useState({columnId:null,direction:null}),[M,k]=X.useState({pageIndex:0,pageSize:m[0]||10}),P=o??w,E=l??R,N=f??M,S=F=>{a?a(F):C(F);},H=F=>{c?c(F):T(F);},D=F=>{p?p(F):k(F);},L=X.useMemo(()=>{if(!E.columnId||!E.direction)return t;let F=n.find(z=>z.id===E.columnId);return F?[...t].sort((z,j)=>{let W=F.accessor(z),B=F.accessor(j);if(W===B)return 0;if(W==null)return 1;if(B==null)return -1;let Z=String(W).localeCompare(String(B),void 0,{numeric:true});return E.direction==="asc"?Z:-Z}):t},[t,E,n]),I=X.useMemo(()=>{if(!d)return L;let F=N.pageIndex*N.pageSize;return L.slice(F,F+N.pageSize)},[L,d,N]),V=Math.ceil(L.length/N.pageSize),O=F=>{if(F===true){let z=new Set(I.map((j,W)=>s(j,W)));S(z);}else S(new Set);},A=(F,z)=>{let j=new Set(P);z?j.add(F):j.delete(F),S(j);},K=I.length>0&&I.every((F,z)=>P.has(s(F,z))),$=I.some((F,z)=>P.has(s(F,z))),G=F=>{if(!n.find(W=>W.id===F)?.sortable&&!i)return;let j="asc";E.columnId===F&&(E.direction==="asc"?j="desc":E.direction==="desc"&&(j=null)),H({columnId:j?F:null,direction:j});},Y=F=>E.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):E.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:x,className:u("w-full",e),...y,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(Oo,{checked:K?true:$?"indeterminate":false,onCheckedChange:O,"aria-label":"Select all"})}),n.map(F=>{let z=F.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",z&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>z&&G(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,z&&Y(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):I.map((F,z)=>{let j=s(F,z),W=P.has(j);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&z%2===1&&"bg-muted/30",W&&"bg-muted"),"data-state":W?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(Oo,{checked:W,onCheckedChange:B=>A(j,!!B),"aria-label":`Select row ${z+1}`})}),n.map(B=>jsx("td",{className:"p-4 align-middle",children:B.cell?B.cell(F,z):B.accessor(F)},B.id))]},j)})})]})}),d&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:N.pageSize,onChange:F=>D({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(F=>jsx("option",{value:F,children:F},F))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",N.pageIndex+1," of ",V||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex-1}),disabled:N.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex+1}),disabled:N.pageIndex>=V-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var yR=X.forwardRef(xR);var Oi=["January","February","March","April","May","June","July","August","September","October","November","December"];function kR({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=X.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Oi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Oi.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[80px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function PR(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(kR,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Oi[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function to({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=X.useMemo(()=>PR(r,o,a),[r,o,a]);return jsx(DayPicker,{showOutsideDays:n,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}to.displayName="Calendar";var Zm=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});Zm.displayName="Pagination";var Qm=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));Qm.displayName="PaginationContent";var Jm=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:u("",e),...t}));Jm.displayName="PaginationItem";var Za=({className:e,isActive:t,size:n="sm",isIconOnly:r=true,...o})=>jsx("a",{"aria-current":t?"page":void 0,className:u(qr({variant:t?"solid":"light",size:n}),r&&"!px-0 !w-9",e),...o});Za.displayName="PaginationLink";var ep=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});ep.displayName="PaginationPrevious";var tp=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});tp.displayName="PaginationNext";var np=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});np.displayName="PaginationEllipsis";var $o=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));$o.displayName="VisuallyHidden";var op={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},HR={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"},ap=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"),$i=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Ja=X.createContext(null),Pr=()=>{let e=X.useContext(Ja);if(!e)throw new Error("Modal components must be used within a Modal");return e},ip=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=X.useState(false),b=e!==void 0,v=b?e:g,[y,x]=X.useState(false),w=X.useRef(null),C=X.useId(),R=X.useId();X.useEffect(()=>{x(true);},[]);let T=X.useCallback(E=>{b||h(E),t?.(E);},[b,t]);X.useEffect(()=>{if(v)return Gt(),()=>Ut()},[v]),X.useEffect(()=>{if(!v||i)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[v,i,T]);let M=E=>{s&&E.target===E.currentTarget&&T(false);},k=n?X.isValidElement(n)?X.cloneElement(n,{onClick:E=>{n.props.onClick?.(E),T(true);}}):jsx("button",{type:"button",onClick:()=>T(true),children:n}):null,P=()=>!y||!v?null:d==="outside"?Ba.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(ap(),op[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(ap(),op[l]),onClick:M,"aria-hidden":"true"}),jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u($i({size:m}),HR[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxs(Ja.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:d,titleId:C,descriptionId:R},children:[k,P()]})});ip.displayName="Modal";var es=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=X.useState(n),i=t!==void 0,l=i?t:a,c=X.useId(),d=X.useId(),m=X.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Ja.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};es.displayName="ModalRoot";var lp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});lp.displayName="ModalTrigger";var Gi=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Gi.displayName="ModalPortal";var Ui=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Pr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Ui.displayName="ModalOverlay";var cp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});cp.displayName="ModalClose";var ts=X.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Pr(),[f,p]=X.useState(false);return X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),X.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Gi,{children:[jsx(Ui,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u($i({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});ts.displayName="ModalContent";var dp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});dp.displayName="ModalHeader";var up=({className:e,children:t})=>(X.useContext(Ja)?.scrollBehavior??"inside")==="inside"?jsx(ke,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});up.displayName="ModalBody";var mp=({className:e,children:t,...n})=>{let{onOpenChange:r}=Pr();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:X.Children.map(t,o=>X.isValidElement(o)?X.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};mp.displayName="ModalFooter";var pp=X.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Pr();return jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});pp.displayName="ModalTitle";var fp=X.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Pr();return jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});fp.displayName="ModalDescription";var ji=X.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ji.displayName=Command.displayName;var AR=({children:e,...t})=>jsx(es,{...t,children:jsx(ts,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(ji,{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})})}),gp=X.forwardRef(({className:e,...t},n)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:n,className:u("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));gp.displayName=Command.Input.displayName;var bp=X.forwardRef(({className:e,children:t,...n},r)=>jsx(ke,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:u("overflow-hidden",e),...n,children:t})}));bp.displayName=Command.List.displayName;var vp=X.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));vp.displayName=Command.Empty.displayName;var hp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Group,{ref:n,className:u("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));hp.displayName=Command.Group.displayName;var xp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));xp.displayName=Command.Separator.displayName;var yp=X.forwardRef(({className:e,children:t,startContent:n,endContent:r,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...o,children:[n,t&&jsx("span",{className:"flex-1",children:t}),r]}));yp.displayName=Command.Item.displayName;var Rp=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Rp.displayName="CommandShortcut";var BR={sm:{input:"h-9 px-2 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{input:"h-10 px-3 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{input:"h-11 px-4 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},FR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Cp=X.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,size:s="md",radius:i="md",...l},c)=>{let[d,m]=X.useState(false),[f,p]=X.useState(false),g=BR[s],h=FR[i];return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:u("flex w-full border border-input bg-background py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",g.input,h,t&&"pr-10",e),ref:c,disabled:n,style:{...a,borderColor:f?"var(--color-foreground)":void 0},onFocus:b=>{p(true),r?.(b);},onBlur:b=>{p(false),o?.(b);},...l}),t&&jsx("button",{type:"button",className:u("absolute right-0 top-0 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",g.button),onClick:()=>m(!d),disabled:n,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:g.icon}):jsx(Eye,{className:g.icon})})]})});Cp.displayName="PasswordInput";var UR={sm:{wrapper:"h-9",input:"h-9 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{wrapper:"h-10",input:"h-10 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{wrapper:"h-11",input:"h-11 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},jR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Tp=X.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,size:c="md",radius:d="md",...m},f)=>{let[p,g]=X.useState(s),[h,b]=X.useState(false),v=a!==void 0,y=v?a:p,x=UR[c],w=jR[d],C=N=>{N!==void 0&&(r!==void 0&&N<r&&(N=r),o!==void 0&&N>o&&(N=o)),v||g(N),i?.(N);},R=()=>{C((y??0)+n);},T=()=>{C((y??0)-n);},M=N=>{let S=N.target.value;if(S==="")C(void 0);else {let H=parseFloat(S);isNaN(H)||C(H);}},k=N=>{N.key==="ArrowUp"?(N.preventDefault(),R()):N.key==="ArrowDown"&&(N.preventDefault(),T());},P=r===void 0||(y??0)>r,E=o===void 0||(y??0)<o;return t?jsxs("div",{className:u("relative flex items-center border transition-colors",x.wrapper,w,h?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",x.button),onClick:T,disabled:l||!P,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:x.icon})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("min-w-0 flex-1 bg-background text-center focus:outline-none disabled:cursor-not-allowed",x.input),ref:f,value:y??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m}),jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",x.button),onClick:R,disabled:l||!E,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:x.icon})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex w-full bg-background px-3 py-2 text-center border placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",x.input,w,h?"border-foreground":"border-input",e),ref:f,value:y??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m})});Tp.displayName="NumberInput";var Pp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Mp=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"}}),Ep=X.forwardRef(({className:e,items:t,max:n=5,size:r,showTooltips:o=false,...a},s)=>{let i=t.slice(0,n),l=t.length-n,c=(m,f)=>{let p=jsxs(Tr,{className:u(Mp({size:r})),children:[m.src&&jsx(Jr,{src:m.src,alt:m.alt||""}),jsx(Mr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(_n,{children:[jsx(Yn,{children:p}),jsx(Xn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Pp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(Tr,{className:u(Mp({size:r})),children:jsxs(Mr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(Wn,{delayDuration:300,children:d}):d});Ep.displayName="AvatarGroup";var Lp=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"}}),Sp=X.forwardRef(({className:e,value:t,defaultValue:n=0,onValueChange:r,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=X.useState(n),[b,v]=X.useState(null),y=t!==void 0,x=y?t:g,w=b!==null?b:x,C=S=>{l||c||(y||h(S),r?.(S));},R=(S,H=false)=>{let D=i&&H?S+.5:S+1;C(D);},T=(S,H)=>{if(l||c)return;let D=S.currentTarget.getBoundingClientRect(),L=i&&S.clientX<D.left+D.width/2;v(L?H+.5:H+1);},M=()=>{v(null);},k=s==="heart"?Heart:Star,P=S=>w>=S+1?"full":w>=S+.5?"half":"empty",E=d?{color:d,fill:d}:{},N=m?{color:m}:{};return jsx("div",{ref:p,className:u(Lp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:M,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(S,H)=>{let D=P(H);return jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:L=>{let I=L.currentTarget.getBoundingClientRect(),V=i&&L.clientX<I.left+I.width/2;R(H,V);},onMouseMove:L=>T(L,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":x===H+1,children:[jsx(k,{className:u("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?N:void 0}),D!=="empty"&&jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...E,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Sp.displayName="Rating";var Hp=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),QR={sm:"sm",md:"sm",lg:"sm"},Ip=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(Hp({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(Nt,{size:QR[r??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Ip.displayName="Chip";var Vp=createContext({direction:"horizontal"}),sw=({className:e,direction:t="horizontal",children:n,...r})=>jsx(Vp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),iw=Panel,lw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(Vp),o=r==="vertical";return jsx(Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...n,children:e&&jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var Bp=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),dw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},Ap={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},Fp=X.forwardRef(({className:e,size:t="md",color:n="default",value:r,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,r/o*100)),m=dw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(Bp({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Ap[n]||Ap.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});Fp.displayName="CircularProgress";var Kp=X.createContext(null),pw=()=>{let e=X.useContext(Kp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},$p=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"}}),Gp=X.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,radius:d="md",children:m,...f},p)=>{let[g,h]=X.useState(o),[b,v]=X.useState(0),[y,x]=X.useState(false),w=X.useRef(null),C=r!==void 0?r:g;X.useImperativeHandle(p,()=>w.current),X.useEffect(()=>{v(Math.min(C.length,n-1));},[C,n]),X.useEffect(()=>{C.length===n&&s&&s(C);},[C,n,s]);let R=N=>{let S=N.target.value;if(i&&S){let H=new RegExp(i.replace("^","").replace("$","").replace("+",""));S=S.split("").filter(D=>H.test(D)).join("");}S=S.slice(0,n),r===void 0&&h(S),a?.(S);},T=N=>{N.key==="ArrowLeft"?v(S=>Math.max(0,S-1)):N.key==="ArrowRight"&&v(S=>Math.min(C.length,n-1,S+1));},M=()=>{w.current?.focus();},k=()=>{x(true),v(Math.min(C.length,n-1));},P=()=>{x(false);},E={value:C,activeIndex:y?b:-1,maxLength:n,disabled:l,radius:d};return jsx(Kp.Provider,{value:E,children:jsxs("div",{className:u($p({size:c}),t),onClick:M,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:C,onChange:R,onKeyDown:T,onFocus:k,onBlur:P,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...f}),m]})})});Gp.displayName="InputOTP";var Up=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center",e),...t}));Up.displayName="InputOTPGroup";var fw={none:"first:rounded-l-none",sm:"first:rounded-l-md",md:"first:rounded-l-lg",lg:"first:rounded-l-xl",full:"first:rounded-l-full"},gw={none:"last:rounded-r-none",sm:"last:rounded-r-md",md:"last:rounded-r-lg",lg:"last:rounded-r-xl",full:"last:rounded-r-full"},jp=X.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s,radius:i}=pw(),l=o[e]||"",c=a===e,d=c&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":c,"data-filled":!!l,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:border-l",fw[i],gw[i],c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[l,d&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});jp.displayName="InputOTPSlot";var Wp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Wp.displayName="InputOTPSeparator";var Xp=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),qp=X.forwardRef(({className:e,variant:t,size:n,value:r=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=X.useState(""),y=X.useRef(null);X.useImperativeHandle(h,()=>y.current);let x=P=>{let E=P.trim();if(E.length<i||E.length>l||s&&r.length>=s||!d&&r.some(S=>S.text.toLowerCase()===E.toLowerCase()))return;let N={id:crypto.randomUUID(),text:E};o?.([...r,N]),v("");},w=P=>{m||f||o?.(r.filter(E=>E.id!==P));},C=P=>{if(c.includes(P.key)){if(P.key==="Tab"&&!b)return;P.preventDefault(),x(b);}P.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},R=P=>{let E=P.target.value;if(E.includes(",")){E.split(",").forEach(S=>{S.trim()&&x(S);});return}v(E);},T=P=>{P.preventDefault(),P.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(S=>{x(S);});},M=()=>{y.current?.focus();},k=s?r.length>=s:false;return jsxs("div",{className:u("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",m&&"cursor-not-allowed opacity-50",e),onClick:M,children:[r.map(P=>p?p(P,()=>w(P.id)):jsxs("span",{className:u(Xp({variant:t,size:n})),children:[P.text,!m&&!f&&jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),w(P.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${P.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},P.id)),!k&&!f&&jsx("input",{ref:y,type:"text",value:b,onChange:R,onKeyDown:C,onPaste:T,placeholder:r.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});qp.displayName="TagInput";var Qp=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"}}),Jp=X.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(Qp({size:t,className:e})),...i,children:[n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));Jp.displayName="EmptyState";var tf=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),nf=X.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(tf({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});nf.displayName="StatCard";var Xi=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),Nw=({checked:e,disabled:t,onClick:n})=>jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:r=>{r.stopPropagation(),t||n(r);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function kw({className:e,variant:t,size:n,items:r,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:y,...x},w){let[C,R]=X.useState(null),[T,M]=X.useState(null),[k,P]=X.useState(new Set(f)),E=m!==void 0,N=E?new Set(m):k,[S,H]=X.useState(new Set(b)),D=h!==void 0,L=D?new Set(h):S,I=(z,j)=>{R(j),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/plain",String(j));},V=(z,j)=>{z.preventDefault(),!(C===null||C===j)&&M(j);},O=()=>{M(null);},A=(z,j)=>{if(z.preventDefault(),!r||C===null||C===j){R(null),M(null);return}let W=[...r],[B]=W.splice(C,1);W.splice(j,0,B),s?.(W),R(null),M(null);},K=()=>{R(null),M(null);},$=X.useCallback((z,j)=>{if(!r)return;let W=new Set(N),B=!W.has(z.id);d?B?W.add(z.id):W.delete(z.id):(W.clear(),B&&W.add(z.id)),E||P(W);let Z=r.filter(ue=>W.has(ue.id));p?.(Array.from(W),{selected:B,selectedItems:Z,item:z,event:j});},[r,N,d,E,p]),G=X.useCallback((z,j)=>{if(!r)return;let W=new Set(L),B=!W.has(z.id);B?W.add(z.id):W.delete(z.id),D||H(W);let Z=r.filter(ue=>W.has(ue.id));v?.(Array.from(W),{checked:B,checkedItems:Z,item:z,event:j});},[r,L,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:w,role:"list",className:u(Xi({variant:t,size:n,className:e})),...x,children:r.map((z,j)=>{let W=N.has(z.id),B=L.has(z.id);return jsxs("div",{role:"listitem","aria-selected":c?W:void 0,draggable:a,onDragStart:a?U=>I(U,j):void 0,onDragOver:a?U=>V(U,j):void 0,onDragLeave:a?O:void 0,onDrop:a?U=>A(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>$(z,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",T===j&&"border-primary border-dashed border rounded-md",W&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(Nw,{checked:B,onClick:U=>G(z,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(z,j)})]},z.id)})}):jsx("div",{ref:w,role:"list",className:u(Xi({variant:t,size:n,className:e})),...x,children:y})}var Pw=X.forwardRef(kw),of=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),af=X.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(of({interactive:t,className:e})),...a,children:[n&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));af.displayName="ListItem";var sf=X.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));sf.displayName="ListItemText";var df=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),uf=X.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:u(df({position:t,className:e})),...n}));uf.displayName="Timeline";var mf=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"}}),pf=X.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(mf({variant:t,className:e})),...s,children:[!n&&jsxs("div",{className:"flex flex-col items-center",children:[jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:o}),!r&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));pf.displayName="TimelineItem";var ff=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));ff.displayName="TimelineContent";var gf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));gf.displayName="TimelineOpposite";var vf=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}}),hf=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),xf=X.createContext({}),yf=X.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=X.useState(a),f=o!==void 0?o:d,p=X.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(xf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(vf({size:t,fullWidth:n,className:e})),...l,children:r})})});yf.displayName="SegmentedControl";var Rf=X.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=X.useContext(xf),i=s.value===n,l=r||s.disabled;return jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(n);},className:u(hf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Rf.displayName="SegmentedControlItem";var wf=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"}}),Cf=e=>{let t=e.type;return t.startsWith("image/")?Image$1:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},is=e=>{if(e===0)return "0 Bytes";let t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Tf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${is(t)}`}),n&&n.length>0&&(n.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${n.join(", ")}`})),r},Mf=X.forwardRef(({className:e,variant:t,size:n,onFilesChange:r,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,b]=X.useState(false),[v,y]=X.useState(false),[x,w]=X.useState([]),C=X.useRef(null),R=X.useCallback(L=>{if(!L||L.length===0)return;let I=Array.from(L),V=[],O=[];(m?I:[I[0]]).forEach(K=>{let $=Tf(K,c,d);$.length>0?O.push({file:K,errors:$}):V.push(K);}),w(O),V.length>0&&r?.(V),O.length>0&&o?.(O);},[c,d,m,r,o]),T=X.useCallback(L=>{if(L.preventDefault(),L.stopPropagation(),!f&&(b(true),L.dataTransfer.items)){let V=Array.from(L.dataTransfer.items).some(O=>{if(O.kind!=="file")return true;if(d&&d.length>0){let A=O.type;return !d.some(K=>K.endsWith("/*")?A.startsWith(K.slice(0,-2)):A===K)}return false});y(V);}},[f,d]),M=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!f&&(L.dataTransfer.dropEffect="copy");},[f]),k=X.useCallback(L=>{L.preventDefault(),L.stopPropagation();let I=L.currentTarget.getBoundingClientRect(),V=L.clientX,O=L.clientY;(V<I.left||V>I.right||O<I.top||O>I.bottom)&&(b(false),y(false));},[]),P=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),b(false),y(false),!f&&R(L.dataTransfer.files);},[f,R]),E=X.useCallback(()=>{f||C.current?.click();},[f]),N=X.useCallback(L=>{R(L.target.files),L.target.value="";},[R]),S=X.useCallback(L=>{f||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:T,onDragOver:M,onDragLeave:k,onDrop:P,onClick:E,onKeyDown:S,className:u(wf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:D,multiple:m,disabled:f,onChange:N,className:"sr-only",tabIndex:-1}),l||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${is(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),x.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:x.map(({file:L,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:L.name}),":"," ",I.map(V=>V.message).join(", ")]},L.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(L=>{let I=Cf(L.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",L.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(I,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:L.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[is(L.file.size),L.error&&jsx("span",{className:"ml-2 text-danger",children:L.error})]}),L.progress!==void 0&&L.progress<100&&jsx(_a,{value:L.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:V=>{V.stopPropagation(),a?.(L.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},L.id)})})]})});Mf.displayName="FileUpload";var Ow=`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")`,kf=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}}),qo=X.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),r?.(e);},className:u(kf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?Ow:void 0,backgroundSize:n?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));qo.displayName="ColorSwatch";var Pf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Ef=X.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=X.useState(t),b=e??g,v=X.useCallback(x=>{l||(e===void 0&&h(x),n?.(x));},[e,n,l]),y=x=>x.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Pf({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(x=>{let w=b?y(b)===y(x):false;return jsx(qo,{role:"option",color:x,size:s,shape:i,isSelected:w,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":w},x)})})});Ef.displayName="ColorSwatchPicker";var Kw=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Lf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Sf=X.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=Kw,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=X.useState(e??t),f=X.useId();X.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=b=>{m(b),n?.(b);},g=b=>{m(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),n?.(v);};return l==="simple"?jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",r&&"opacity-50 cursor-not-allowed",Lf[s],i),children:[jsx("input",{type:"color",value:d,onChange:h,disabled:r,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(ot,{children:[jsx(qn,{ref:c,disabled:r,className:u("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",Lf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(at,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(qo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Sf.displayName="ColorPicker";var Df=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"}}),Qi=e=>String(e).padStart(2,"0"),Ww=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},_w=(e,t)=>`${Qi(e)}:${Qi(t)}`,Hf=X.forwardRef(({className:e,size:t,value:n,onChange:r,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=X.useState(n??""),[g,h]=X.useState(false);X.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=Ww(f||"00:00"),y=k=>{let P=k.target.value;p(P),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(P)&&r?.(P);},x=(k,P)=>{let E=Math.max(0,Math.min(23,k)),N=Math.max(0,Math.min(59,P)),S=_w(E,N);p(S),r?.(S);},w=()=>x(b+1,v),C=()=>x(b-1,v),R=()=>x(b,v+a),T=()=>x(b,v-a),M=({value:k,onIncrement:P,onDecrement:E})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:Qi(k)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:E,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:y,disabled:c,className:u(Df({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(ot,{open:g,onOpenChange:h,children:[jsxs(qn,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(at,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(M,{value:b,onIncrement:w,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(M,{value:v,onIncrement:R,onDecrement:T,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;x(k.getHours(),k.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Hf.displayName="TimeInput";var If=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),Xw={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},qw=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},Ji=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},Vf=(e,t,n)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(n,"."),r=r.replace(/[^0-9.-]/g,"");let o=parseFloat(r);return isNaN(o)?void 0:o},Af=X.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",radius:h="md",disabled:b,placeholder:v,...y},x)=>{let[w,C]=X.useState(r),[R,T]=X.useState(""),[M,k]=X.useState(false),P=n!==void 0?n:w,E=f??qw(a,s);X.useEffect(()=>{!M&&P!==void 0&&T(Ji(P,i,p,g));},[P,i,p,g,M]);let N=I=>{let V=I.target.value;if(!V){T(""),n===void 0&&C(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;T(V);let A=Vf(V,p,g);if(A!==void 0){let K=A;l!==void 0&&A<l&&(K=l),c!==void 0&&A>c&&(K=c),n===void 0&&C(K),o?.(K);}},S=()=>{k(true),P!==void 0&&T(P.toString().replace(".",g));},H=()=>{k(false),T(P!==void 0?Ji(P,i,p,g):"");},D=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:E}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:E});return jsxs("div",{className:"relative flex items-center",children:[D&&jsx("div",{className:"absolute left-3 pointer-events-none",children:D}),jsx("input",{ref:x,type:"text",inputMode:"decimal",value:R,onChange:N,onFocus:S,onBlur:H,disabled:b,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(If({size:t}),Xw[h],D&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...y}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Af.displayName="CurrencyInput";var zf=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"}}),el={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:"#####-####"}},Jw=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},rr=e=>["#","A","*"].includes(e),cs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];Jw(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},tl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},Of=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),eC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},Bf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in el?el[a].mask:a,[g,h]=X.useState(r),[b,v]=X.useState(""),[y,x]=X.useState(false),w=X.useRef(null),C=n!==void 0?n:g;X.useImperativeHandle(f,()=>w.current),X.useEffect(()=>{let k=cs(C,p,true);v(k);},[C,p]);let R=k=>{let P=k.target.value,E=k.target.selectionStart??0,N=P.replace(/[^\w]/g,""),S=cs(N,p,true),H=tl(S,p);v(S),n===void 0&&h(l?S:H),o?.(H,S),requestAnimationFrame(()=>{if(w.current){let D=eC(S,p,E);w.current.setSelectionRange(D,D);}});},T=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let P=w.current;if(!P)return;let E=P.selectionStart??0;if(k.key==="Backspace"&&E>0){let N=E-1;for(;N>0&&!rr(p[N]);)N--;let S=tl(b,p),H=0;for(let I=0;I<N&&I<p.length;I++)rr(p[I])&&H++;let D=S.slice(0,Math.max(0,H-1))+S.slice(H),L=cs(D,p,true);v(L),n===void 0&&h(l?L:D),o?.(D,L),k.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(N,N);});}},M=i?Of(p,s):d;return jsx("input",{ref:w,type:"text",value:b,onChange:R,onKeyDown:T,onFocus:()=>x(true),onBlur:()=>x(false),disabled:c,placeholder:M,className:u(zf({size:t}),e),style:{borderColor:y?"var(--color-foreground)":void 0},...m})});Bf.displayName="MaskedInput";var aC=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"}}),Kf=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],ds=(e,t)=>{let n=e.replace(/\D/g,""),r="",o=0;for(let a=0;a<t.length&&o<n.length;a++)t[a]==="#"?(r+=n[o],o++):r+=t[a];return r},sC=e=>e.replace(/#/g,"_"),$f=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Kf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,radius:p="md",...g},h)=>{let[b,v]=X.useState(r),[y,x]=X.useState(a??s),[w,C]=X.useState(false),[R,T]=X.useState(false),[M,k]=X.useState(false),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=n!==void 0?n:b,D=a??y,L=l.find(G=>G.code===D)??l[0],I=ds(H,L.format);X.useEffect(()=>{k(true);},[]),X.useEffect(()=>{if(R&&N.current){let G=N.current.getBoundingClientRect();E({top:G.bottom+4,left:G.left,width:Math.max(G.width,280)});}},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{N.current&&!N.current.contains(Y.target)&&S.current&&!S.current.contains(Y.target)&&T(false);};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{Y.key==="Escape"&&T(false);};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[R]);let V=G=>{let F=G.target.value.replace(/\D/g,"");n===void 0&&v(F);let z=ds(F,L.format),j=`${L.dialCode} ${z}`;o?.(F,j,L);},O=G=>{let Y=l.find(j=>j.code===G);if(!Y)return;a===void 0&&x(G),i?.(Y);let F=ds(H,Y.format),z=`${Y.dialCode} ${F}`;o?.(H,z,Y),T(false);},A=t==="sm"?"h-9":t==="lg"?"h-11":"h-10",K=w||R;return jsxs("div",{className:u("flex border bg-background transition-colors",{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}[p],m&&"cursor-not-allowed opacity-50"),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:N,type:"button",disabled:m,onClick:()=>T(!R),className:u("flex items-center justify-between bg-transparent px-3 py-2 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50","w-[100px] shrink-0 border-r",A),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",R&&"rotate-180")})]}),M&&R&&Ba.createPortal(jsx("div",{ref:S,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:P.top,left:P.left,minWidth:P.width},children:jsx(ke,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(G=>jsxs("div",{role:"option","aria-selected":G.code===D,onClick:()=>O(G.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.code===D&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:G.flag}),jsx("span",{className:"flex-1",children:G.name}),jsx("span",{className:"text-xs text-muted-foreground",children:G.dialCode})]})]},G.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:h,type:"tel",inputMode:"tel",value:I,onChange:V,onFocus:()=>C(true),onBlur:()=>C(false),disabled:m,placeholder:f??sC(L.format),className:u("flex h-10 w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",t==="sm"&&"h-8 px-2 text-xs",t==="lg"&&"h-12 px-4 text-base",d&&!c&&"pl-12",e),...g})]})]})});$f.displayName="PhoneInput";var Uf=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"bordered",size:"md",sticky:false}}),jf=X.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=X.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:l,className:u(Uf({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});jf.displayName="Navbar";var Wf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));Wf.displayName="NavbarBrand";var _f=X.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});_f.displayName="NavbarContent";var Yf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));Yf.displayName="NavbarItem";var Xf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));Xf.displayName="NavbarLink";var mC={none:"",hover:"hover:underline",always:"underline"},Zf=X.forwardRef(({className:e,underline:t="hover",isExternal:n,showExternalIcon:r=true,isDisabled:o,children:a,...s},i)=>{let l=n?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:i,className:u("inline-flex items-center gap-1 text-primary underline-offset-4 transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",mC[t],o&&"pointer-events-none opacity-50",e),"aria-disabled":o,...l,...s,children:[a,n&&r&&jsx(ExternalLink,{className:"h-3 w-3","aria-hidden":"true"})]})});Zf.displayName="Link";var Qf=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"}}),Jf=X.forwardRef(({className:e,position:t,threshold:n=400,icon:r,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=X.useState(false);X.useEffect(()=>{let y=c?.current||window,x=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return y.addEventListener("scroll",x,{passive:true}),x(),()=>{y.removeEventListener("scroll",x);}},[n,c,g,d]);let b=y=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(y);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(Qf({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:i,isIconOnly:true,radius:l,onClick:b,"aria-label":"Back to top",className:"shadow-lg",...f,children:r||jsx(ArrowUp,{className:v})})})});Jf.displayName="BackTop";var yC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),RC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),eg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ps=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),tg=X.createContext(null),ar=()=>{let e=X.useContext(tg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},ng=X.createContext(null),Qo=()=>{let e=X.useContext(ng);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},rl=X.createContext(null),rg=X.createContext(null),og=X.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=X.useState(null);return jsx(tg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",yC({radius:n}),e),...r,children:t})})});og.displayName="Menubar";var ag=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=X.useId(),o=X.useRef(null),a=t===r,s=X.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(ng.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};ag.displayName="MenubarMenu";var sg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));sg.displayName="MenubarGroup";var ig=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};ig.displayName="MenubarPortal";var lg=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(rl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};lg.displayName="MenubarSub";var cg=X.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(rg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));cg.displayName="MenubarRadioGroup";var dg=X.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Qo(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",RC({radius:i}),e),onClick:f,onMouseEnter:p,...r})});dg.displayName="MenubarTrigger";var ug=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=X.useContext(rl);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ps({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});ug.displayName="MenubarSubTrigger";var mg=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=X.useContext(rl);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let x=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=x.top,R=x.right+t;R+w.width>window.innerWidth&&(R=x.left-w.width-t),f({top:C,left:R});})();},[l,t,d]);let b=y=>{n?.(y),c(true);},v=y=>{r?.(y),c(false);};return !p||!l?null:Ba.createPortal(jsx("div",{ref:y=>{h.current=y,typeof a=="function"?a(y):a&&(a.current=y);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",eg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});mg.displayName="MenubarSubContent";var pg=X.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=Qo(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),x=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-y.width/2:t==="end"&&(w=v.right-y.width-n),f({top:x,left:w});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,n,r,l]),X.useEffect(()=>{if(!c)return;let b=v=>{let y=v.target;h.current&&!h.current.contains(y)&&l.current&&!l.current.contains(y)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),X.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:Ba.createPortal(jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",eg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});pg.displayName="MenubarContent";var fg=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});fg.displayName="MenubarItem";var gg=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=Qo(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});gg.displayName="MenubarCheckboxItem";var bg=X.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=X.useContext(rg),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});bg.displayName="MenubarRadioItem";var vg=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));vg.displayName="MenubarLabel";var hg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));hg.displayName="MenubarSeparator";var xg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});xg.displayName="MenubarShortcut";var yg=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"}}),Rg=X.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=X.Children.toArray(o);return jsx("div",{ref:s,className:u(yg({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>X.isValidElement(l)?X.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<r?"completed":c===r?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:n}):l)})});Rg.displayName="Steps";var wg=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"}}),CC=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"}}),TC=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"}}),Cg=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(wg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(CC({status:s,size:n})),children:s==="completed"?jsx(Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(TC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Cg.displayName="Step";var Mg=cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),Ng=cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),kg=X.createContext(null),DC=()=>{let e=X.useContext(kg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},HC=({checked:e,indeterminate:t,disabled:n,onClick:r})=>jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:n,onClick:o=>{o.stopPropagation(),n||r(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",n&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),Pg=({node:e,level:t,isLast:n=false,parentIsLastPath:r=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:y,handleDrop:x,allowDrop:w,onDragStart:C,onDragOver:R,onDragEnter:T,onDragLeave:M,onDragEnd:k,showLine:P,showIcon:E,showHandle:N,dragIcon:S,icon:H,leafIcon:D,folderIcon:L,folderOpenIcon:I,blockNode:V,disabled:O,size:A,getAllKeys:K}=DC(),$=e.children&&e.children.length>0,G=e.isLeaf??!$,Y=o.has(e.key),F=s.has(e.key),z=c.has(e.key),j=d.has(e.key),W=g?.key===e.key,B=b===e.key,Z=!!(O||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ce=X.useMemo(()=>Z?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Z]),Q=X.useMemo(()=>S!==void 0?S:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[S,p]),le=X.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:Y,isLeaf:G}):H:G?D:Y?I:L,[e.icon,H,Y,G,D,L,I]),Fe=q=>{if(!Ce)return;q.stopPropagation(),q.dataTransfer.effectAllowed="move";let De=q.currentTarget,de=De.cloneNode(true),je=document.documentElement.classList.contains("dark"),We=je?"#0a0a0a":"#ffffff",Gn=je?"#27272a":"#e4e4e7";de.style.cssText=`
|
|
44
44
|
position: fixed;
|
|
45
45
|
top: -9999px;
|
|
46
46
|
left: -9999px;
|
|
@@ -52,7 +52,7 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
52
52
|
width: ${De.offsetWidth}px;
|
|
53
53
|
opacity: 1;
|
|
54
54
|
z-index: 9999;
|
|
55
|
-
`,document.body.appendChild(de),q.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:q,node:e});},pe=q=>{if(q.preventDefault(),q.stopPropagation(),!g||g.key===e.key||Z)return;let De=q.currentTarget.getBoundingClientRect(),de=q.clientY-De.top,je=De.height,We;de<je*.25?We=-1:de>je*.75?We=1:We=0,!(w&&!w({dropNode:e,dropPosition:We,dragNode:g}))&&(y(e.key,We),R?.({event:q,node:e}));},Ct=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key)&&T?.({event:q,node:e,expandedKeys:K()});},bt=q=>{q.stopPropagation(),M?.({event:q,node:e});},yn=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key||Z)&&(v!==null&&x(e,v),h(null),y(null,null));},Ke=q=>{h(null),y(null,null),k?.({event:q,node:e});},on=q=>{Z||ue&&i(e.key,e,q);},Tt=q=>{q.stopPropagation(),!Z&&!G&&a(e.key,e);},_=X.useMemo(()=>{if(!B||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[B,v]),oe=[...r,n];return jsxs("div",{className:"relative",children:[P&&t>0&&jsxs(Fragment,{children:[r.map((q,De)=>!q&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${De} * var(--tree-indent) + 12px)`,top:0,bottom:0}},De)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":G?void 0:Y,"aria-selected":ue?F:void 0,"aria-disabled":Z,draggable:Ce,onDragStart:Fe,onDragOver:pe,onDragEnter:Ct,onDragLeave:bt,onDrop:yn,onDragEnd:Ke,onClick:on,className:u("relative",Eg({size:A,isSelected:F,isDragging:W,isDisabled:Z,isHoverable:ue&&!Z}),_,V&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ce&&N&&Q!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Q}),jsx("button",{type:"button",onClick:Tt,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",G&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",Y&&"rotate-90")})}),U&&jsx($C,{checked:z,indeterminate:j,disabled:Z,onClick:q=>m(e.key,e,q)}),E&&le&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:le}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",V&&"flex-none"),children:e.label})]}),$&&Y&&jsx("div",{role:"group",children:e.children.map((q,De)=>jsx(Sg,{node:q,level:t+1,isLast:De===e.children.length-1,parentIsLastPath:oe},q.key))})]})},GC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},UC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Dg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Dg(n,t))return true;return false},Hg=X.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:y=[],onCheck:x,showLine:w=false,showIcon:C=false,showHandle:R=true,dragIcon:T,icon:M,leafIcon:k=jsx(File,{className:"h-4 w-4"}),folderIcon:P=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:E=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,onDrop:I,blockNode:V=false,disabled:O=false,...A},K)=>{let $=X.useCallback(()=>l?new Set(GC(r)):new Set(i),[l,i,r]),[G,Y]=X.useState($),F=s!==void 0,z=F?new Set(s):G,j=X.useCallback((ve,Ye)=>{let Kt=new Set(z),ze=!Kt.has(ve);ze?Kt.add(ve):Kt.delete(ve),F||Y(Kt),c?.(Array.from(Kt),{expanded:ze,node:Ye});},[z,F,c]),[W,B]=X.useState(new Set(p)),Z=f!==void 0,ue=Z?new Set(f):W,U=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(ue),Rn=!ze.has(ve);m?Rn?ze.add(ve):ze.delete(ve):(ze.clear(),Rn&&ze.add(ve)),Z||B(ze);let Wr=[],zo=Ca=>{for(let _r of Ca)ze.has(_r.key)&&Wr.push(_r),_r.children&&zo(_r.children);};zo(r),g?.(Array.from(ze),{selected:Rn,selectedNodes:Wr,node:Ye,event:Kt});},[ue,m,Z,g,r]),[Ce,Q]=X.useState(new Set(y)),[le,Fe]=X.useState(new Set),pe=v!==void 0,Ct=pe?new Set(Array.isArray(v)?v:v.checked):Ce,bt=pe&&!Array.isArray(v)?new Set(v.halfChecked):le,yn=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(Ct),Rn=new Set(bt),Wr=!ze.has(ve);if(Wr?(ze.add(ve),Rn.delete(ve)):ze.delete(ve),!b&&Ye.children){let gi=UC(Ye);for(let Un of gi)Wr?(ze.add(Un),Rn.delete(Un)):ze.delete(Un);}pe||(Q(ze),Fe(Rn));let zo=[],Ca=gi=>{for(let Un of gi)ze.has(Un.key)&&zo.push(Un),Un.children&&Ca(Un.children);};Ca(r);let _r=b?{checked:Array.from(ze),halfChecked:Array.from(Rn)}:Array.from(ze);x?.(_r,{checked:Wr,checkedNodes:zo,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[Ct,bt,b,pe,x,r]),[Ke,on]=X.useState(null),[Tt,_]=X.useState(null),[oe,q]=X.useState(null),De=X.useCallback((ve,Ye)=>{_(ve),q(Ye);},[]),de=X.useCallback((ve,Ye)=>{!Ke||!I||Ye===0&&Dg(Ke,ve.key)||I({event:{},node:ve,dragNode:Ke,dropPosition:Ye,dropToGap:Ye!==0});},[Ke,I]),je=X.useCallback(()=>Array.from(z),[z]),We={expandedKeys:z,toggleExpand:j,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:Ct,halfCheckedKeys:bt,handleCheck:yn,checkable:h,checkStrictly:b,draggable:o,draggedNode:Ke,setDraggedNode:on,dragOverKey:Tt,dragOverPosition:oe,setDragOver:De,handleDrop:de,allowDrop:a,onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,showLine:w,showIcon:C,showHandle:R,dragIcon:T,icon:M,leafIcon:k,folderIcon:P,folderOpenIcon:E,blockNode:V,disabled:O,size:n,data:r,getAllKeys:je},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&De(null,null);};return jsx(Lg.Provider,{value:We,children:jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Pg({variant:t,size:n,className:e})),onDragLeave:Gn,...A,children:r.map((ve,Ye)=>jsx(Sg,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Hg.displayName="Tree";var Vg=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),qC=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsx(Fragment,{children:r.map((o,a)=>n.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},ZC=(e,t)=>{let[n,r]=X.useState(e);return X.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Ag=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:y,...x},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(r),[k,P]=X.useState([]),[E,N]=X.useState(false),[S,H]=X.useState(false),[D,L]=X.useState(0),I=X.useRef(null),V=X.useRef(null),O=n!==void 0?n:T,A=ZC(O,l);X.useEffect(()=>{let U=V.current;if(!U)return;let Ce=()=>{L(U.offsetWidth);};Ce();let Q=new ResizeObserver(Ce);return Q.observe(U),()=>{Q.disconnect();}},[]),X.useImperativeHandle(w,()=>I.current);let K=i?k:s,$=X.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(O.toLowerCase())),[K,O,i]);X.useEffect(()=>{if(!i)return;if(A.length<c){P([]);return}let U=false;return (async()=>{N(true);try{let Q=await i(A);U||P(Q);}catch{U||P([]);}finally{U||N(false);}})(),()=>{U=true;}},[A,i,c]);let G=U=>{n===void 0&&M(U),o?.(U);},Y=U=>{let Ce=U.target.value;G(Ce),Ce.length>=c&&R(true);},F=U=>{G(U.label),a?.(U),R(false);},z=()=>{G(""),I.current?.focus();},j=()=>{H(true),R(true);},W=()=>{H(false);},B=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&$.length>0&&R(true);},Z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&O?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:R,children:[jsxs(an,{ref:V,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:I,type:"text",value:O,onChange:Y,onFocus:j,onBlur:W,onKeyDown:B,disabled:y,placeholder:d,className:u(Vg({size:t,fullWidth:v}),ue,e),style:{borderColor:S?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...x}),p&&O&&!y&&jsx("button",{type:"button",onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X$1,{className:Z})})]}),jsx(at,{className:"p-0",align:"start",style:{width:D>0?D:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(ke,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:E?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Z,"animate-spin")}),f]}):$.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):$.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>F(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:u("mr-2 h-4 w-4 shrink-0",O===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(qC,{text:U.label,query:O}):U.label})]},U.value))})})})})]})});Ag.displayName="Autocomplete";var cl=X.createContext(null),dl=X.createContext(null),ul=()=>{let e=X.useContext(cl);if(!e)throw new Error("useFormContext must be used within a Form");return e},bs=()=>{let e=X.useContext(dl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},QC={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},zg=X.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=X.useState(e),[m,f]=X.useState({}),[p,g]=X.useState({}),[h,b]=X.useState({}),[v,y]=X.useState(false),x=X.useRef(new Map),w=X.useCallback((D,L)=>{x.current.set(D,L);},[]),C=X.useCallback(D=>{x.current.delete(D);},[]),R=X.useCallback(D=>{let L=x.current.get(D)||[],I=c[D];for(let V of L)if(!V.validate(I))return f(O=>({...O,[D]:V.message})),false;return f(V=>({...V,[D]:null})),true},[c]),T=X.useCallback(()=>{let D=true,L={};return x.current.forEach((I,V)=>{let O=c[V];for(let A of I)if(!A.validate(O)){L[V]=A.message,D=false;break}L[V]||(L[V]=null);}),f(L),D},[c]),M=X.useCallback((D,L)=>{d(I=>({...I,[D]:L})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{R(D);},0);},[o,R]),k=X.useCallback((D,L)=>{f(I=>({...I,[D]:L}));},[]),P=X.useCallback((D,L)=>{g(I=>({...I,[D]:L})),L&&r&&R(D);},[r,R]),E=X.useCallback(D=>({value:c[D],error:m[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,m,p,h]),N=X.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),S=async D=>{D.preventDefault();let L={};if(x.current.forEach((V,O)=>{L[O]=true;}),g(L),!T()){n?.(m);return}if(t){y(true);try{await t(c);}finally{y(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:M,setError:k,setTouched:P,validateField:R,validateAll:T,registerField:w,unregisterField:C,getFieldState:E,reset:N};return jsx(cl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:S,className:u("space-y-4",s),...i,children:a})})});zg.displayName="Form";var Og=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=ul(),a=X.useId();X.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(dl.Provider,{value:i,children:r})};Og.displayName="FormField";var Bg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));Bg.displayName="FormItem";var Fg=X.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=bs();return jsxs(Cr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Fg.displayName="FormLabel";var Kg=({children:e})=>{let{name:t,id:n,error:r,touched:o}=bs(),a=ul(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return X.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};Kg.displayName="FormControl";var $g=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));$g.displayName="FormDescription";var Gg=X.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=bs(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});Gg.displayName="FormMessage";var jg=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"}}),Wg=X.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u(jg({size:t,className:e})),...i,children:[jsxs(Tr,{"data-user-avatar":true,children:[o&&jsx(Jr,{src:o,alt:n}),jsx(Mr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});Wg.displayName="User";var Yg=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),Xg=X.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:u(Yg({variant:t,size:n,radius:r,className:e})),...o}));Xg.displayName="Code";function Jg(e){let[t,n]=useState(false);return useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var eb=X.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=Jg(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,y)=>jsxs("div",{...h({line:v}),children:[n&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:y+1}),v.map((x,w)=>jsx("span",{...b({token:x})},w))]},y))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});eb.displayName="CodeBlock";var tb=X.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=Jg(n)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((y,x)=>jsx("span",{...h({token:y})},x))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});tb.displayName="TabbedCodeBlock";var nb=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),rb=X.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=X.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(nb({variant:t,size:n,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:r}),o&&jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});rb.displayName="Snippet";var gl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ob=X.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=X.useState("loading");X.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(gl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(gl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Ha,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});ob.displayName="Image";var ib=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"}}),lb=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"}}),cb=X.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),db=X.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=X.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(cb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(ib({size:t,className:e})),...i,children:s})})});db.displayName="Listbox";var ub=X.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=X.useContext(cb),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(lb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});ub.displayName="ListboxItem";var pb=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"}}),fb=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 mT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=X.useState(null),[f,p]=X.useState(null),g=(x,w)=>{i||(m(w),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",String(w)));},h=(x,w)=>{x.preventDefault(),!(i||d===null||d===w)&&p(w);},b=()=>{p(null);},v=(x,w)=>{if(x.preventDefault(),i||d===null||d===w){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(w,0,R),o?.(C),m(null),p(null);},y=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(pb({variant:t,size:n,className:e})),...l,children:r.map((x,w)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,w),onDragOver:C=>h(C,w),onDragLeave:b,onDrop:C=>v(C,w),onDragEnd:y,className:u(fb({variant:t,size:n,isDragging:d===w,isDragOver:f===w}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(x,w)})]},x.id))})}var pT=X.forwardRef(mT);var vb=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}}),vT={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},hb=X.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(vb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(vT[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));hb.displayName="LoadingOverlay";var xb=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"}}),yb=X.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=X.useState(0),[c,d]=X.useState(false),m=X.useRef(null);return X.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(xb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});yb.displayName="NProgress";var Tb=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}}),Rb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},CT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Mb=X.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(CT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(Rb[n||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:u(Rb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(Tb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});Mb.displayName="Loading";var MT=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),NT=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),kT=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"}}),PT=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Ms={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},hl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},vl=(e,t)=>String(e).padStart(t,"0"),Nb=(e,t)=>{if(!e)return "";let n=vl(e.getDate(),2),r=vl(e.getMonth()+1,2),o=vl(e.getFullYear(),4),a=Ms[t],s=hl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},ws=(e,t)=>{let n=Ms[t],r=e.split(n);if(r.length!==3)return null;let o=hl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},ET=e=>{let t=Ms[e];return hl[e].map(r=>r==="year"?"####":"##").join(t)},na=(e,t)=>{if(!e?.from)return "";let n=Nb(e.from,t),r=e.to?Nb(e.to,t):"";return n&&r?`${n} - ${r}`:n},kb=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:y="text",fullWidth:x=false,numberOfMonths:w=2,align:C="start",disabled:R,placeholder:T,id:M,...k},P)=>{let E=X.useId(),N=M||E,S=`${N}-description`,H=`${N}-error`,[D,L]=X.useState(f),[I,V]=X.useState(""),[O,A]=X.useState(false),[K,$]=X.useState(false),G=m!==void 0?m:D,Y=a&&r,F=ET(b),z=Ms[b],j=" - ";X.useEffect(()=>{K||V(na(G,b));},[G,b,K]);let W=le=>{m===void 0&&L(le),p?.(le);},B=le=>{W(le),V(na(le,b)),le?.from&&le?.to&&A(false);},Z=le=>{let Fe=le.target.value;Fe=Fe.replace(new RegExp(`[^0-9\\${z}\\s-]`,"g"),"");let pe=`${F}${j}${F}`,Ct=Fe.replace(new RegExp(`[\\${z}\\s-]`,"g"),""),bt="",yn=0;for(let Ke=0;Ke<pe.length&&yn<Ct.length;Ke++)pe[Ke]==="#"?(bt+=Ct[yn],yn++):bt+=pe[Ke];if(V(bt),bt.length===pe.length){let Ke=bt.split(j);if(Ke.length===2){let on=ws(Ke[0].trim(),b),Tt=ws(Ke[1].trim(),b);if(on&&Tt){if(g&&(on<g||Tt<g)||h&&(on>h||Tt>h))return;on<=Tt&&W({from:on,to:Tt});}}}},ue=()=>{$(true);},U=()=>{$(false);let le=`${F}${j}${F}`;if(I.length!==le.length)V(na(G,b));else {let Fe=I.split(j);if(Fe.length!==2)V(na(G,b));else {let pe=ws(Fe[0].trim(),b),Ct=ws(Fe[1].trim(),b);(!pe||!Ct||pe>Ct)&&V(na(G,b));}}},Ce=()=>{R||A(true);},Q=()=>{!R&&y==="picker"&&v&&A(true);};return jsxs("div",{className:u(MT({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(PT({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&O,onOpenChange:A,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:P,id:N,type:"text",inputMode:y==="text"?"numeric":void 0,value:I,onChange:y==="text"?Z:void 0,onClick:Q,onFocus:ue,onBlur:U,readOnly:y==="picker","aria-invalid":a,"aria-describedby":Y?H:n?S:void 0,"aria-required":o,disabled:R,placeholder:T||`${b.toLowerCase()} - ${b.toLowerCase()}`,className:u(NT({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),y==="picker"&&v&&"cursor-pointer",l),style:{borderColor:K||v&&O?"var(--color-foreground)":void 0},...k}),v&&jsx("button",{type:"button",onClick:Ce,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(kT({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(to,{mode:"range",selected:G,onSelect:B,numberOfMonths:w,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:G?.from,showMonthAndYearPickers:true})})]}),n&&!Y&&jsx("p",{id:S,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),Y&&jsx("p",{id:H,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});kb.displayName="DateRangePicker";var uo=e=>String(e).padStart(2,"0"),Pb=X.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=X.useState(false),d=r?Array.from({length:24},(x,w)=>w):Array.from({length:12},(x,w)=>w+1),m=Array.from({length:Math.floor(60/o)},(x,w)=>w*o),f=x=>{if(!x)return n;if(r)return `${uo(x.hours)}:${uo(x.minutes)}`;let w=x.hours%12||12,C=x.hours>=12?"PM":"AM";return `${uo(w)}:${uo(x.minutes)} ${C}`},p=x=>{let w=e?.minutes??0,C=x;if(!r&&e){let R=e.hours>=12;R&&x!==12?C=x+12:!R&&x===12&&(C=0);}t?.({hours:C,minutes:w});},g=x=>{let w=e?.hours??0;t?.({hours:w,minutes:x});},h=x=>{if(!e)return;let w=e.hours;x==="AM"&&e.hours>=12?w=e.hours-12:x==="PM"&&e.hours<12&&(w=e.hours+12),t?.({hours:w,minutes:e.minutes});},b=()=>{let x=new Date;t?.({hours:x.getHours(),minutes:x.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,y=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ot,{open:l,onOpenChange:c,children:[jsxs(qn,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(at,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(x=>jsx(ae,{variant:y===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(x),children:uo(x)},x))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(x=>jsx(ae,{variant:e?.minutes===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(x),children:uo(x)},x))})})]}),!r&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Pb.displayName="TimePicker";var Eb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function DT({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=X.useRef(null),[p,g]=X.useState(0);X.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),y=Math.ceil(o/b)+2*a,x=Math.min(n.length-1,v+y),w=R=>{let T=R.currentTarget.scrollTop;g(T),c?.(T);},C=X.useMemo(()=>{let R=[];for(let T=v;T<=x;T++)n[T]!==void 0&&R.push({item:n[T],index:T,style:{position:"absolute",top:T*b,left:0,right:0,height:r}});return R},[n,v,x,b,r]);return jsx("div",{ref:f,className:u(Eb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:w,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:T,style:M})=>jsx("div",{style:M,children:s(R,T)},i?i(R,T):T))})})}var HT=X.forwardRef(DT);var yl=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Rl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Sb=X.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,scrollbarVisibility:f="visible",...p},g)=>{let h=X.useRef(null),b=X.useRef(null),v=X.useRef(false);X.useImperativeHandle(g,()=>h.current),X.useEffect(()=>{let w=b.current;if(!w)return;let C=new IntersectionObserver(R=>{let[T]=R;T.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:h.current,rootMargin:c||`${l}px`,threshold:0});return C.observe(w),()=>{C.disconnect();}},[a,s,o,l,c,d]);let y=jsx("div",{className:u(Rl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),x=jsxs(Fragment,{children:[r,jsx("div",{ref:b,className:"h-px w-full"}),s&&(i||y),!a&&!s&&m&&jsx("div",{className:u(Rl({size:n}),"text-muted-foreground text-sm"),children:m})]});return d?jsx("div",{ref:h,className:u(yl({variant:t,className:e})),...p,children:x}):jsx(ke,{ref:h,visibility:f,className:u(yl({variant:t,className:e})),...p,children:x})});Sb.displayName="InfiniteScroll";var WT=e=>e.map(t=>typeof t=="string"?{src:t}:t),wl=X.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=X.useMemo(()=>WT(e),[e]),[v,y]=X.useState(r),[x,w]=X.useState(1),[C,R]=X.useState(0),[T,M]=X.useState(false),[k,P]=X.useState(false),[E,N]=X.useState({x:0,y:0}),[S,H]=X.useState({x:0,y:0}),[D,L]=X.useState(false),I=X.useRef(null),V=b[v];X.useEffect(()=>{L(true);},[]),X.useEffect(()=>{y(r);},[r]),X.useEffect(()=>{o?.(v);},[v,o]),X.useEffect(()=>{w(1),R(0),N({x:0,y:0});},[v]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let O=X.useCallback(()=>{y(Q=>Q>0?Q-1:b.length-1);},[b.length]),A=X.useCallback(()=>{y(Q=>Q<b.length-1?Q+1:0);},[b.length]),K=()=>{w(Q=>Math.min(Q+.5,4));},$=()=>{w(Q=>{let le=Math.max(Q-.5,.5);return le===1&&N({x:0,y:0}),le});},G=()=>{R(Q=>(Q+90)%360);},Y=async()=>{if(V)try{let le=await(await fetch(V.src)).blob(),Fe=URL.createObjectURL(le),pe=document.createElement("a");pe.href=Fe,pe.download=V.alt||`image-${v+1}`,document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),URL.revokeObjectURL(Fe);}catch{window.open(V.src,"_blank");}},F=async()=>{if(I.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await I.current.requestFullscreen(),M(!0);}catch{}},z=Q=>{x>1&&(P(true),H({x:Q.clientX-E.x,y:Q.clientY-E.y}));},j=Q=>{k&&x>1&&N({x:Q.clientX-S.x,y:Q.clientY-S.y});},W=()=>{P(false);},B=()=>{n?.(false);},Z=Q=>{p&&Q.target===Q.currentTarget&&B();},ue=X.useCallback(Q=>{switch(Q.key){case "ArrowLeft":O();break;case "ArrowRight":A();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":$();break}},[O,A,n]);if(X.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),X.useEffect(()=>{let Q=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Q),()=>document.removeEventListener("fullscreenchange",Q)},[]),b.length===0)return null;let U=a?X.isValidElement(a)?X.cloneElement(a,{onClick:Q=>{a.props.onClick?.(Q),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!D||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Z}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+1," / ",b.length]}),V?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:V.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(x*100),"%"]}),jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:T?"Exit fullscreen":"Fullscreen",children:T?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X$1,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:z,onMouseMove:j,onMouseUp:W,onMouseLeave:W,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:O,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:A,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:V?.src,alt:V?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":x>1?"cursor-grab":""),style:{transform:`translate(${E.x}px, ${E.y}px) scale(${x}) rotate(${C}deg)`},draggable:false})]}),V?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:V.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((Q,le)=>jsx("button",{onClick:()=>y(le),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===le?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Q.src,alt:Q.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});wl.displayName="ImageViewer";var Hb=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=X.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsx(wl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Hb.displayName="ImageViewerTrigger";var Ib=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),YT={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},XT={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},qT=e=>{let t=e.toLowerCase();return YT[t]||e.toUpperCase()},oa=e=>{let t=e.toLowerCase();return XT[t]||t},ks=e=>{let t=oa(e);return ["meta","control","alt","shift"].includes(t)},Vb=X.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{X.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(ks).map(oa),p=m.filter(h=>!ks(h)).map(oa),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,y=f.includes("alt")===h.altKey,x=f.includes("shift")===h.shiftKey,w=p.length===0||p.includes(h.key.toLowerCase());b&&v&&y&&x&&w&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxs(X.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:qT(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(Ib({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Vb.displayName="Kbd";function ZT(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;X.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(ks).map(oa),i=a.filter(c=>!ks(c)).map(oa),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Ab=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),zb=X.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=X.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(n),m(!0),o?.(),setTimeout(()=>{m(!1);},r);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(Ab({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});zb.displayName="CopyButton";var Bb=cva("flex flex-col bg-background",{variants:{variant:{default:"border",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"md"}}),aM=[{value:"month",label:"Month"},{value:"week",label:"Week"},{value:"day",label:"Day"}],sM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],iM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function lM(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function cM(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function fo(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function po(e){return fo(e,new Date)}function Ob(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return fo(r,t)||fo(o,t)||r<t&&o>t})}var Fb=X.forwardRef(({className:e,variant:t,size:n,radius:r,events:o=[],view:a="month",onViewChange:s,viewOptions:i=aM,date:l,onDateChange:c,onEventClick:d,onSlotClick:m,weekStartsOn:f=0,locale:p="en-US",...g},h)=>{let[b,v]=X.useState(new Date),y=l??b,x=N=>{c?c(N):v(N);},w=f===1?iM:sM,C=()=>{let N=new Date(y);a==="month"?N.setMonth(N.getMonth()-1):a==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),x(N);},R=()=>{let N=new Date(y);a==="month"?N.setMonth(N.getMonth()+1):a==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),x(N);},T=()=>{x(new Date);},M=()=>a==="day"?y.toLocaleDateString(p,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):y.toLocaleDateString(p,{year:"numeric",month:"long"}),k=()=>{let N=lM(y.getFullYear(),y.getMonth(),f);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(S=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:S},S))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((S,H)=>{let D=Ob(o,S),L=S.getMonth()===y.getMonth(),I=fo(S,y);return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!L&&"bg-muted/30",I&&"bg-accent"),onClick:()=>m?.(S),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",po(S)&&"bg-primary text-primary-foreground",!L&&"text-muted-foreground"),children:S.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(V=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:O=>{O.stopPropagation(),d?.(V);},children:V.title},V.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},H)})})]})},P=()=>{let N=cM(y,f),S=Array.from({length:24},(H,D)=>D);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),N.map((H,D)=>{let L=fo(H,y);return jsxs("div",{className:u("p-2 text-center border-l cursor-pointer hover:bg-accent/50",po(H)&&"bg-primary/10",L&&!po(H)&&"bg-accent"),onClick:()=>m?.(H),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",po(H)&&"text-primary",L&&!po(H)&&"text-primary"),children:H.getDate()})]},D)})]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:S.map(H=>jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),N.map((D,L)=>{let I=new Date(D);I.setHours(H,0,0,0);let V=o.filter(O=>{let A=new Date(O.start);return fo(A,D)&&A.getHours()===H});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(I),children:V.map(O=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:O.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(O);},children:O.title},O.id))},L)})]},H))})})]})},E=()=>{let N=Array.from({length:24},(H,D)=>D),S=Ob(o,y);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",po(y)&&"bg-primary text-primary-foreground"),children:y.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(H=>{let D=new Date(y);D.setHours(H,0,0,0);let L=S.filter(I=>new Date(I.start).getHours()===H);return jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(D),children:L.map(I=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(I);},children:I.title},I.id))})]},H)})})})]})};return jsxs("div",{ref:h,className:u(Bb({variant:t,size:n,radius:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsx("h2",{className:"text-lg font-semibold",children:M()}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",radius:"md",onClick:T,children:"Today"}),jsx(Aa,{options:i,value:a,onValueChange:N=>s?.(N),size:"sm",radius:"md",className:"w-[120px]"}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:C,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),a==="month"&&k(),a==="week"&&P(),a==="day"&&E()]})});Fb.displayName="FullCalendar";var Ds=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),sa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),ia=["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%))"],Kb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(sa({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Kb.displayName="LineChart";var $b=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:n,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));$b.displayName="BarChart";var Gb=X.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=ia,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Ds,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Gb.displayName="PieChart";var Ub=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));Ub.displayName="AreaChart";var Pl={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"};function DM({card:e,columnId:t,radius:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),m={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:m,className:u("p-3 cursor-grab active:cursor-grabbing transition-all bg-background border shadow-sm hover:shadow-md",d&&"opacity-50 scale-[1.02] shadow-lg",Pl[n]),onClick:()=>o?.(e,t),...a,...s,children:r?r(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function Wb({column:e,radius:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,addCardLabel:s,columnHeight:i}){return jsxs("div",{className:u("flex flex-col min-w-[280px] w-[280px]",Pl[t]),style:{backgroundColor:e.backgroundColor||"transparent"},children:[jsx("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})]})}),jsx(ke,{style:{height:i},className:"flex-1",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(DM,{card:l,columnId:e.id,radius:t,renderCard:n,onCardClick:r},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"})]})}),a&&jsx("div",{className:"p-2 border-t",children:jsxs(ae,{variant:"light",size:"sm",className:"w-full justify-start",onClick:l=>{l.stopPropagation(),l.preventDefault(),o?.(e.id);},children:[jsx(Plus,{className:"h-4 w-4 mr-2"}),s]})})]})}var Yb=X.forwardRef(({className:e,columns:t,onCardMove:n,onCardClick:r,onAddCard:o,renderCard:a,showAddCard:s=true,addCardLabel:i="Add card",columnHeight:l=500,radius:c="md",...d},m)=>{let[f,p]=X.useState(false),[g,h]=X.useState(null),[b,v]=X.useState(null);X.useEffect(()=>{p(true);},[]);let y=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!f)return jsx("div",{ref:m,className:u("flex gap-4 overflow-x-auto p-4 bg-muted/30",e),...d,children:t.map(T=>jsx(Wb,{column:T,radius:c,renderCard:a,onCardClick:r,onAddCard:o,showAddCard:s,addCardLabel:i,columnHeight:l},T.id))});let x=T=>t.find(M=>M.cards.some(k=>k.id===T));return jsxs(DndContext,{sensors:y,collisionDetection:closestCorners,onDragStart:T=>{let{active:M}=T,k=x(M.id);if(k){let P=k.cards.find(E=>E.id===M.id);P&&(h(P),v(k.id));}},onDragOver:T=>{let{active:M,over:k}=T;if(!k)return;let P=M.id,E=k.id,N=x(P),S=x(E)||t.find(L=>L.id===E);if(!N||!S||N.id===S.id)return;let H=S.cards.findIndex(L=>L.id===E),D=H===-1?S.cards.length:H;n?.(P,N.id,S.id,D);},onDragEnd:T=>{let{active:M,over:k}=T;if(k&&M.id!==k.id){let P=x(M.id),E=x(k.id)||t.find(N=>N.id===k.id);if(P&&E){let N=E.cards.findIndex(H=>H.id===k.id),S=N===-1?E.cards.length:N;n?.(M.id,P.id,E.id,S);}}h(null),v(null);},children:[jsx("div",{ref:m,className:u("flex gap-4 overflow-x-auto p-4 bg-muted/30",e),...d,children:t.map(T=>jsx(Wb,{column:T,radius:c,renderCard:a,onCardClick:r,onAddCard:o,showAddCard:s,addCardLabel:i,columnHeight:l},T.id))}),jsx(DragOverlay,{children:g&&b&&jsx("div",{className:u("p-3 cursor-grab active:cursor-grabbing transition-all bg-background border shadow-lg opacity-50 scale-[1.02]",Pl[c]),children:a?a(g,b):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:g.title}),g.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:g.description})]})]})})})]})});Yb.displayName="KanbanBoard";var Xb=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),qb=X.createContext(null);function Is(){let e=X.useContext(qb);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Zb=X.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=HM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=X.useState(false),[h,b]=X.useState(false),[v,y]=X.useState(0),[x,w]=X.useState([]),C=X.useCallback(P=>{P&&(y(P.selectedScrollSnap()),g(P.canScrollPrev()),b(P.canScrollNext()));},[]),R=X.useCallback(()=>{f?.scrollPrev();},[f]),T=X.useCallback(()=>{f?.scrollNext();},[f]),M=X.useCallback(P=>{f?.scrollTo(P);},[f]),k=X.useCallback(P=>{P.key==="ArrowLeft"?(P.preventDefault(),R()):P.key==="ArrowRight"&&(P.preventDefault(),T());},[R,T]);return X.useEffect(()=>{!f||!l||l(f);},[f,l]),X.useEffect(()=>{if(f)return w(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(qb.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:T,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:x,scrollTo:M,orientation:a},children:jsxs("div",{ref:d,className:u(Xb({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(El,{}),jsx(Ll,{})]}),i&&x.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:x.map((P,E)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",E===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(E),"aria-label":`Go to slide ${E+1}`},E))})]})})});Zb.displayName="Carousel";var Qb=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex",e),...t}));Qb.displayName="CarouselContent";var Jb=X.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=Is();return jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});Jb.displayName="CarouselItem";var El=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollPrev:s,canScrollPrev:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});El.displayName="CarouselPrevious";var Ll=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollNext:s,canScrollNext:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Ll.displayName="CarouselNext";var ev=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Vs={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},Dl={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}"]},tv=X.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=X.useState(r.length>0?"recent":o),[m,f]=X.useState(""),g=m?Object.values(Dl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Dl[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:u(ev({size:t,className:e})),...i,children:[a&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Pa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx(ke,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(Vs).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:u("shrink-0 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:Vs[b].name,children:v},b))})}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Vs[c].name}),jsx(ke,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});tv.displayName="EmojiPicker";var nv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),uN=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"}}),mN=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Xe=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(_n,{children:[jsx(Yn,{children:jsx(ae,{type:"button",variant:n?"solid":"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Xn,{side:"top",className:"text-xs",children:t})]}),rv=X.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[$M.configure({heading:{levels:[1,2,3]}}),GM.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),UM,jM.configure({types:["heading","paragraph"]}),WM.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});X.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),X.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx(Wn,{children:jsxs("div",{ref:f,className:u(nv({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(uN({size:n})),children:[jsx(Xe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Xe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Xe,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Xe,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Xe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Xe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Xe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Xe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Xe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Xe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Xe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Xe,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:u(mN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});rv.displayName="RichTextEditor";var av=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function yN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function ov(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var sv=X.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=X.useRef(null),[h,b]=X.useState(),[v,y]=X.useState(),[x,w]=X.useState(1),[C,R]=X.useState(0),T=E=>{let{width:N,height:S}=E.currentTarget;if(r){let H=yN(N,S,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},M=E=>{b(E),o?.(E);},k=async E=>{if(y(E),a&&g.current&&E.width&&E.height){let N=await ov(g.current,E,C,x);a(N);}},P=()=>{R(E=>(E+90)%360);};return X.useEffect(()=>{v&&g.current&&a&&ov(g.current,v,C,x).then(E=>{a(E);});},[x,C,v,a]),jsxs("div",{ref:p,className:u(av({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(pN,{crop:h,onChange:M,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",crossOrigin:"anonymous",onLoad:T,style:{transform:`scale(${x}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx(Ua,{value:[x],onValueChange:([E])=>w(E),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"sm",isIconOnly:true,onClick:P,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});sv.displayName="ImageCropper";var Al=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"}}),CN={sm:96,md:128,lg:192},lv=X.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??CN[n??"md"];return r?jsx("div",{ref:h,className:u(Al({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(RN,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(Al({variant:t,size:n,className:e})),...g,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});lv.displayName="QRCode";var cv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});cv.displayName="ThemeProvider";var LN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),dv=X.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=X.useState(false);X.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(Cn,{children:[jsx(Tn,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(Mn,{align:"end",children:[jsxs($t,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs($t,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs($t,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});dv.displayName="ThemeToggle";var uv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),mv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-11 px-4 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),pv=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"}}),fv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=X.useId(),v=p||b,y=`${v}-description`,x=`${v}-error`,w=a&&r;return jsxs("div",{className:u(uv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(pv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":w?x:n?y:void 0,"aria-required":o,className:u(mv({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!w&&jsx("p",{id:y,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),w&&jsx("p",{id:x,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});fv.displayName="TextField";var vv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),HN=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}}),gv=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"}}),bv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),IN=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"}}),hv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:y,fullWidth:x=false,disabled:w,id:C,...R},T)=>{let M=X.useId(),k=C||M,P=`${k}-description`,E=`${k}-error`,[N,S]=X.useState(h),[H,D]=X.useState(false),L=g!==void 0?g:N,I=a&&r,V=X.useCallback(z=>{z!==void 0&&(m!==void 0&&z<m&&(z=m),f!==void 0&&z>f&&(z=f)),g===void 0&&S(z),b?.(z);},[g,m,f,b]),O=()=>{let z=(L??0)+p;V(z);},A=()=>{let z=(L??0)-p;V(z);},K=z=>{let j=z.target.value;if(j==="")V(void 0);else {let W=parseFloat(j);isNaN(W)||V(W);}},$=z=>{z.key==="ArrowUp"?(z.preventDefault(),O()):z.key==="ArrowDown"&&(z.preventDefault(),A());},G=X.useMemo(()=>L===void 0?"":y?new Intl.NumberFormat(void 0,y).format(L):L.toString(),[L,y]),Y=m!==void 0&&L!==void 0&&L<=m,F=f!==void 0&&L!==void 0&&L>=f;return jsxs("div",{className:u(vv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:u(IN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:A,disabled:w||Y,className:u(gv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(bv({size:s}))})}),jsx("input",{ref:T,id:k,type:"text",inputMode:"decimal",value:G,onChange:K,onKeyDown:$,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?E:n?P:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:w,className:u(HN({size:s,isInvalid:a,fullWidth:x}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsx("button",{type:"button",onClick:O,disabled:w||F,className:u(gv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(bv({size:s}))})})]}),n&&!I&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:E,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});hv.displayName="NumberField";var yv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),zN=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-11 pl-12 pr-12 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),xv=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"}}),ON=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),BN=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"}}),Rv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:y,placeholder:x="Search...",id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,[E,N]=X.useState(f),S=m!==void 0?m:E,H=a&&r,D=S.length>0,L=O=>{let A=O.target.value;m===void 0&&N(A),p?.(A);},I=()=>{m===void 0&&N(""),p?.(""),g?.();},V=O=>{O.key==="Enter"?(O.preventDefault(),h?.(S)):O.key==="Escape"&&D&&(O.preventDefault(),I());};return jsxs("div",{className:u(yv({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:u(ON({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(xv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:R,id:M,type:"search",value:S,onChange:L,onKeyDown:V,placeholder:x,"aria-invalid":a,"aria-describedby":H?P:n?k:void 0,"aria-required":o,disabled:y,className:u(zN({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!y&&jsx("button",{type:"button",onClick:I,className:u(BN({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:u(xv({size:s}))})})]}),n&&!H&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Rv.displayName="SearchField";var wv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),KN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),$N=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"}}),GN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Fs={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},Ul={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},$l=(e,t)=>String(e).padStart(t,"0"),ma=(e,t)=>{if(!e)return "";let n=$l(e.getDate(),2),r=$l(e.getMonth()+1,2),o=$l(e.getFullYear(),4),a=Fs[t],s=Ul[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},Gl=(e,t)=>{let n=Fs[t],r=e.split(n);if(r.length!==3)return null;let o=Ul[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},UN=e=>{let t=Fs[e];return Ul[e].map(r=>r==="year"?"####":"##").join(t)},Ks=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:y="text",fullWidth:x=false,disabled:w,placeholder:C,id:R,...T},M)=>{let k=X.useId(),P=R||k,E=`${P}-description`,N=`${P}-error`,[S,H]=X.useState(f??null),[D,L]=X.useState(""),[I,V]=X.useState(false),[O,A]=X.useState(false),K=m!==void 0?m:S,$=a&&r,G=Fs[b],Y=UN(b);X.useEffect(()=>{O||L(ma(K,b));},[K,b,O]);let F=U=>{m===void 0&&H(U),p?.(U);},z=U=>{let Ce=U??null;F(Ce),L(ma(Ce,b)),V(false);},j=U=>{let Ce=U.target.value;Ce=Ce.replace(new RegExp(`[^0-9\\${G}]`,"g"),"");let Q=Ce.replace(new RegExp(`\\${G}`,"g"),""),le="",Fe=0;for(let pe=0;pe<Y.length&&Fe<Q.length;pe++)Y[pe]==="#"?(le+=Q[Fe],Fe++):le+=Y[pe];if(L(le),le.length===Y.length){let pe=Gl(le,b);if(pe){if(g&&pe<g||h&&pe>h)return;F(pe);}}},W=()=>{A(true);},B=()=>{A(false),D.length!==Y.length?L(ma(K,b)):Gl(D,b)||L(ma(K,b));},Z=()=>{w||V(true);},ue=()=>{!w&&y==="picker"&&v&&V(true);};return jsxs("div",{className:u(wv({size:s}),e),children:[t&&jsxs("label",{htmlFor:P,className:u(GN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&I,onOpenChange:V,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:M,id:P,type:"text",inputMode:y==="text"?"numeric":void 0,value:D,onChange:y==="text"?j:void 0,onClick:ue,onFocus:W,onBlur:B,readOnly:y==="picker","aria-invalid":a,"aria-describedby":$?N:n?E:void 0,"aria-required":o,disabled:w,placeholder:C||b.toLowerCase(),className:u(KN({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),y==="picker"&&v&&"cursor-pointer",l),style:{borderColor:O||v&&I?"var(--color-foreground)":void 0},...T}),v&&jsx("button",{type:"button",onClick:Z,disabled:w,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u($N({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(to,{mode:"single",selected:K??void 0,onSelect:z,disabled:U=>!!(g&&U<g||h&&U>h),defaultMonth:K??void 0,showMonthAndYearPickers:true})})]}),n&&!$&&jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),$&&jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ks.displayName="DatePicker";var jN=Ks,WN=Ks;var Cv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),_N=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}}),YN=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"}}),Tv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:y,fullWidth:x=false,id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,E=X.useRef(null),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),[D,L]=X.useState(f??null),I=m!==void 0?m:D,V=a&&r,O=_=>v===24?_:_===0?12:_>12?_-12:_,A=_=>_>=12?"PM":"AM",K=(_,oe)=>oe==="AM"?_===12?0:_:_===12?12:_+12,[$,G]=X.useState(I?String(O(I.hour)).padStart(2,"0"):""),[Y,F]=X.useState(I?String(I.minute).padStart(2,"0"):""),[z,j]=X.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[W,B]=X.useState(I?A(I.hour):"AM"),[Z,ue]=X.useState(false);X.useEffect(()=>{m!==void 0&&(m?(G(String(O(m.hour)).padStart(2,"0")),F(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),B(A(m.hour))):(G(""),F(""),j("")));},[m,v]);let U=(_,oe,q,De)=>{let de=parseInt(_,10),je=parseInt(oe,10),We=b?parseInt(q,10):void 0;if(isNaN(de)||isNaN(je)||b&&isNaN(We)){m===void 0&&L(null),p?.(null);return}let ve={hour:v===12?K(de,De):de,minute:je,...b&&We!==void 0&&{second:We}};m===void 0&&L(ve),p?.(ve);},Ce=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);G(oe);let q=v===24?23:12,De=v===24?0:1;if(oe.length===2){let de=parseInt(oe,10);de>=De&&de<=q&&(N.current?.focus(),N.current?.select());}},Q=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);if(F(oe),oe.length===2){let q=parseInt(oe,10);q>=0&&q<=59&&(b?(S.current?.focus(),S.current?.select()):v===12&&H.current?.focus());}},le=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);j(oe),oe.length===2&&v===12&&H.current?.focus();},Fe=()=>{if($){let _=parseInt($,10),oe=v===24?23:12,De=Math.min(Math.max(_,v===24?0:1),oe),de=String(De).padStart(2,"0");G(de),U(de,Y,z,W);}},pe=()=>{if(Y){let _=parseInt(Y,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");F(q),U($,q,z,W);}},Ct=()=>{if(z){let _=parseInt(z,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");j(q),U($,Y,q,W);}},bt=()=>{let _=W==="AM"?"PM":"AM";B(_),U($,Y,z,_);},yn=_=>{let oe=_.key.toLowerCase();oe==="a"?(_.preventDefault(),W!=="AM"&&(B("AM"),U($,Y,z,"AM"))):oe==="p"?(_.preventDefault(),W!=="PM"&&(B("PM"),U($,Y,z,"PM"))):oe==="arrowup"||oe==="arrowdown"?(_.preventDefault(),bt()):oe==="arrowleft"&&(_.preventDefault(),b?(S.current?.focus(),S.current?.select()):(N.current?.focus(),N.current?.select()));},Ke=(_,oe)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let q=_.key==="ArrowUp"?1:-1;if(oe==="hour"){let De=parseInt($,10)||0,de=v===24?23:12,je=v===24?0:1,We=De+q;We>de&&(We=je),We<je&&(We=de);let Gn=String(We).padStart(2,"0");G(Gn),U(Gn,Y,z,W);}else if(oe==="minute"){let de=(parseInt(Y,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");F(je),U($,je,z,W);}else if(oe==="second"){let de=(parseInt(z,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");j(je),U($,Y,je,W);}}_.key==="ArrowRight"&&(_.preventDefault(),oe==="hour"?(N.current?.focus(),N.current?.select()):oe==="minute"&&b?(S.current?.focus(),S.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),oe==="minute"?(E.current?.focus(),E.current?.select()):oe==="second"&&(N.current?.focus(),N.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(oe==="minute"?E.current?.focus():oe==="second"&&N.current?.focus());},Tt=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",y&&"cursor-not-allowed");return jsxs("div",{ref:R,className:u(Cv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:M,className:u(YN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(_N({size:s,isInvalid:a,disabled:y,fullWidth:x}),l),style:{borderColor:Z?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||ue(false);},children:[jsx("input",{ref:E,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:$,onChange:Ce,onBlur:Fe,onKeyDown:_=>Ke(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":V?P:n?k:void 0,"aria-required":o,disabled:y,className:Tt}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:N,type:"text",inputMode:"numeric",placeholder:"mm",value:Y,onChange:Q,onBlur:pe,onKeyDown:_=>Ke(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:y,className:Tt}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"ss",value:z,onChange:le,onBlur:Ct,onKeyDown:_=>Ke(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:y,className:Tt})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:bt,onKeyDown:yn,disabled:y,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",y&&"cursor-not-allowed"),"aria-label":"AM/PM",children:W})]}),n&&!V&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Tv.displayName="TimeField";var Nv=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"}}),kv=X.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],y=(w,C)=>{C&&C(),l&&l(w);},x=w=>jsxs("button",{type:"button",disabled:i||w.isDisabled,onClick:()=>y(w.key,w.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:b),"aria-label":w.label,children:[w.icon&&jsx("span",{className:v,children:w.icon}),c&&jsx("span",{children:w.label})]},w.key);return jsxs("div",{ref:f,role:"group",className:u(Nv({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(w=>d?d(w):x(w)),g.length>0&&jsxs(Cn,{children:[jsx(Tn,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(Mn,{align:"end",children:g.map(w=>jsxs($t,{disabled:w.isDisabled,onClick:()=>y(w.key,w.onPress),children:[w.icon&&jsx("span",{className:u(v,"mr-2"),children:w.icon}),w.label]},w.key))})]})]})});kv.displayName="ActionGroup";var Sv=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"}}),QN=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}}),Dv=X.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(Sv({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:u(QN({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));Dv.displayName="StatusLight";var Hv=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"}}),Iv=X.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Hv({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(Nt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});Iv.displayName="ActionBar";var Vv=X.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));Vv.displayName="ActionBarButton";var Ov=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"}}),Bv=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 Fv({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),[h,b]=X.useState(null),[v,y]=X.useState(null),x=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),w=M=>{if(a==="none")return;let k;a==="single"?k=x.has(M)?new Set:new Set([M]):(k=new Set(x),k.has(M)?k.delete(M):k.add(M)),o||g(k),s?.(k);},C=(M,k)=>{b(k),M.dataTransfer.effectAllowed="move";},R=(M,k)=>{M.preventDefault(),h!==k&&y(k);},T=()=>{if(h&&v&&h!==v){let M=r.findIndex(N=>N.key===h),k=r.findIndex(N=>N.key===v),P=[...r],[E]=P.splice(M,1);P.splice(k,0,E),l?.(P);}b(null),y(null);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Ov({variant:t,size:n,className:e})),...f,children:r.map(M=>{let k=x.has(M.key),P=h===M.key,E=v===M.key;return d?jsx("div",{role:"option","aria-selected":k,onClick:()=>w(M.key),children:d(M,k)},M.key):jsxs("div",{role:"option","aria-selected":k,"aria-disabled":M.isDisabled,draggable:i&&!M.isDisabled,onDragStart:N=>C(N,M.key),onDragOver:N=>R(N,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&w(M.key),className:u(Bv({variant:t,size:n,isSelected:k,isDisabled:M.isDisabled}),P&&"opacity-50",E&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsx(Check,{className:"h-3 w-3"})}),M.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:M.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:M.label}),M.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:M.description})]})]},M.key)})})}Fv.displayName="ListView";var Kv=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"}}),ok=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"}}),ak=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),$v=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,y]=X.useState(o),x=r!==void 0,w=x?r:v,C=X.useRef(null),[R,T]=X.useState(false),[M,k]=X.useState(null),P=(A,K)=>{if(!C.current)return w[0];let $=C.current.getBoundingClientRect(),G;t==="horizontal"?G=(A-$.left)/$.width:G=1-(K-$.top)/$.height,G=Math.max(0,Math.min(1,G));let Y=i+G*(l-i),F=Math.round(Y/c)*c;return Math.max(i,Math.min(l,F))},E=(A,K)=>{let $=[...w];$[K]=A,K===0&&A>w[1]&&($[0]=w[1]),K===1&&A<w[0]&&($[1]=w[0]),x||y($),a?.($);},N=(A,K)=>{d||(A.preventDefault(),T(true),k(K),A.target.setPointerCapture(A.pointerId));},S=A=>{if(!R||M===null||d)return;let K=P(A.clientX,A.clientY);E(K,M);},H=()=>{R&&(T(false),k(null),s?.(w));},D=A=>{if(d)return;let K=P(A.clientX,A.clientY),$=Math.abs(w[0]-K),G=Math.abs(w[1]-K),Y=$<=G?0:1;E(K,Y);let F=[...w];F[Y]=K,s?.(F);},L=(A,K)=>{if(d)return;let $=w[K];switch(A.key){case "ArrowRight":case "ArrowUp":A.preventDefault(),$=Math.min(l,w[K]+c);break;case "ArrowLeft":case "ArrowDown":A.preventDefault(),$=Math.max(i,w[K]-c);break;case "Home":A.preventDefault(),$=i;break;case "End":A.preventDefault(),$=l;break;default:return}E($,K);let G=[...w];G[K]=$,s?.(G);},I=A=>(A-i)/(l-i)*100,V={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],O={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(w[0])}),jsx("span",{children:f(w[1])})]}),jsxs("div",{ref:b,className:u(Kv({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(ok({orientation:t,size:n})),onClick:D,children:jsx("div",{className:u("absolute rounded-full",V,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(w[0])}%`,right:`${100-I(w[1])}%`,top:0,bottom:0}:{bottom:`${I(w[0])}%`,top:`${100-I(w[1])}%`,left:0,right:0}})}),w.map((A,K)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":A,"aria-orientation":t||void 0,"aria-disabled":d,className:u(ak({size:n}),R&&M===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(A)}% - ${O/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(A)}% - ${O/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:$=>N($,K),onPointerMove:S,onPointerUp:H,onPointerCancel:H,onKeyDown:$=>L($,K)},K)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:w[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:w[1]})]})]})]})});$v.displayName="RangeSlider";var ql=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),dk=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"}}),uk={help:HelpCircle,info:Info,warning:AlertCircle},jv=X.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=X.useState(false),[b,v]=X.useState(false),[y,x]=X.useState({top:0,left:0}),w=X.useRef(null),C=X.useRef(null),R=i!==void 0?i:g,T=X.useCallback(E=>{i===void 0&&h(E),l?.(E);},[i,l]);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!R||!w.current)return;let E=()=>{let N=w.current.getBoundingClientRect(),S=C.current?.getBoundingClientRect(),H=S?.width||288,D=S?.height||100,L=8,I=0,V=0;switch(a){case "top":I=N.top-D-L,V=N.left+N.width/2-H/2;break;case "bottom":I=N.bottom+L,V=N.left+N.width/2-H/2;break;case "left":I=N.top+N.height/2-D/2,V=N.left-H-L;break;case "right":I=N.top+N.height/2-D/2,V=N.right+L;break}if(a==="top"||a==="bottom")switch(s){case "start":V=N.left;break;case "center":V=N.left+N.width/2-H/2;break;case "end":V=N.right-H;break}if(a==="left"||a==="right")switch(s){case "start":I=N.top;break;case "center":I=N.top+N.height/2-D/2;break;case "end":I=N.bottom-D;break}V=Math.max(8,Math.min(V,window.innerWidth-H-8)),I=Math.max(8,Math.min(I,window.innerHeight-D-8)),x({top:I,left:V});};return E(),requestAnimationFrame(E),window.addEventListener("resize",E),window.addEventListener("scroll",E,true),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true);}},[R,a,s]),X.useEffect(()=>{if(!R)return;let E=N=>{C.current&&!C.current.contains(N.target)&&w.current&&!w.current.contains(N.target)&&T(false);};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[R,T]),X.useEffect(()=>{if(!R)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[R,T]);let M=uk[e??"help"],k=()=>{T(!R);},P=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?X.isValidElement(o)?X.cloneElement(o,{ref:w,onClick:E=>{o.props.onClick?.(E),k();}}):jsx("button",{ref:w,type:"button",onClick:k,className:u(ql({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},type:"button",onClick:k,className:u(ql({variant:e,size:t}),m),"aria-label":"Help",children:jsx(M,{className:"h-full w-full"})}),b&&R&&Ba.createPortal(jsxs("div",{ref:C,className:u(dk({size:t}),f),style:{position:"fixed",top:y.top,left:y.left,transformOrigin:P()},role:"tooltip",children:[n&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});jv.displayName="ContextualHelp";var _v=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),Zl=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function Yv({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=X.useState(new Set),v=X.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),y=R=>{if(s==="none")return;let T;s==="single"?T=v.has(R)?new Set:new Set([R]):(T=new Set(v),T.has(R)?T.delete(R):T.add(R)),a||b(T),i?.(T);},x=(R,T)=>{T.stopPropagation(),c?.(R);},w=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxs("div",{role:"group","aria-label":d,className:u(_v({spacing:t}),e),...g,children:[w.map(R=>{let T=v.has(R.key),M=s!=="none";return jsxs("span",{role:M?"button":void 0,tabIndex:M&&!R.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!R.isDisabled&&y(R.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!R.isDisabled&&(k.preventDefault(),y(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(Zl({variant:R.color?void 0:n,size:r,isSelected:T,isDisabled:R.isDisabled}),M&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsx("button",{type:"button",onClick:k=>x(R.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxs("span",{className:u(Zl({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}Yv.displayName="TagGroup";var Zv=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"}}),Qv=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 Jv({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),h=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let y;a==="single"?y=h.has(v)?new Set:new Set([v]):(y=new Set(h),y.has(v)?y.delete(v):y.add(v)),o||g(y),s?.(y);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(Zv({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let y=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":y,onClick:()=>b(v.key),children:d(v,y)},v.key):jsxs("div",{role:"gridcell","aria-selected":y,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(Qv({variant:l,size:c,isSelected:y,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&y&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}Jv.displayName="GridList";var th=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),gk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),bk=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),Xs=X.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let y=(n-r)/(o-r),x=s!==void 0?(s-r)/(o-r):.25,w=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?y<=x?"bg-red-500":y<=w?"bg-yellow-500":"bg-green-500":y>=w?"bg-red-500":y>=x?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(th({size:t})),children:jsx("div",{className:u(gk({variant:f})),children:jsx("div",{className:u(bk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Xs.displayName="Meter";var nh=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));nh.displayName="DiskUsageMeter";var rh=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));rh.displayName="BatteryMeter";var oh=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Zs=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},ah=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},sh=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},ih=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),lh=X.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=X.useCallback(A=>{let K=sh(A);return K?ah(...K):[0,1,1]},[]),[v,y]=X.useState(()=>b(r||o)),x=e??v[0],w=t??v[1],C=n??v[2];X.useEffect(()=>{if(r){let A=b(r);y(A);}},[r,b]);let R=X.useCallback((A,K)=>{if(l||!p.current)return;let $=p.current.getBoundingClientRect(),G=Math.max(0,Math.min(1,(A-$.left)/$.width)),Y=Math.max(0,Math.min(1,(K-$.top)/$.height)),F=G,z=1-Y;t===void 0&&n===void 0&&y([x,F,z]),a?.({hue:x,saturation:F,brightness:z});let j=Zs(x,F,z);s?.(ih(...j));},[l,x,t,n,a,s]),T=A=>{l||(A.preventDefault(),h(true),A.target.setPointerCapture(A.pointerId),R(A.clientX,A.clientY));},M=A=>{g&&R(A.clientX,A.clientY);},k=A=>{h(false),A.target.releasePointerCapture(A.pointerId);},[P,E,N]=Zs(x,1,1),S=`rgb(${P}, ${E}, ${N})`,H=w*100,D=(1-C)*100,[L,I,V]=Zs(x,w,C),O=`rgb(${L}, ${I}, ${V})`;return jsx("div",{ref:f,className:u(oh({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:S},onPointerDown:T,onPointerMove:M,onPointerUp:k,onPointerLeave:k,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${D}% - ${c/2}px)`,backgroundColor:O,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});lh.displayName="ColorArea";var dh=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"}}),yk=`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")`,ch="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",uh=X.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,y]=X.useState(t??b()),x=e??v,w=r==="hue"?x/360:x,C=X.useCallback((S,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),L=a!=="vertical",I;L?I=Math.max(0,Math.min(1,(S-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let V=r==="hue"?I*360:I;e===void 0&&y(V),n?.(V);},[i,a,r,e,n]),R=S=>{i||(S.preventDefault(),h(true),S.target.setPointerCapture(S.pointerId),C(S.clientX,S.clientY));},T=S=>{g&&C(S.clientX,S.clientY);},M=S=>{h(false),S.target.releasePointerCapture(S.pointerId);},k=()=>{let S=a!=="vertical",H=S?"to right":"to top";switch(r){case "hue":return S?ch:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return ch}},P=()=>r==="hue"?`hsl(${x}, 100%, 50%)`:o,E=a!=="vertical",N=w*100;return jsx("div",{ref:f,className:u(dh({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?yk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...E?{left:`calc(${N}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${N}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:P(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});uh.displayName="ColorSlider";var mh=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"}}),Ck=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},ph=X.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=X.useRef(null),[f,p]=X.useState(false),[g,h]=X.useState(t),b=e??g,v=X.useCallback((R,T)=>{if(o||!m.current)return;let M=m.current.getBoundingClientRect(),k=M.width/2,P=R-M.left,E=T-M.top,N=Ck(P,E,k);e===void 0&&h(N),n?.(N);},[o,e,n]),y=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},x=R=>{f&&v(R.clientX,R.clientY);},w=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let T=0;T<=360;T+=30)R.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsx("div",{ref:d,className:u(mh({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:y,onPointerMove:x,onPointerUp:w,onPointerLeave:w,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(Tk,{hue:b,innerRadius:a,thumbSize:s})]})})});ph.displayName="ColorWheel";var Tk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var gh=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"}}),Nk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),kk=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}}),bh=X.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxs("div",{ref:h,className:u(gh({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:u(Nk({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsx("span",{className:u(kk({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});bh.displayName="LabeledValue";var vh=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"}}),hh=X.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:u(vh({orientation:t,gap:n,className:e})),...r}));hh.displayName="LabeledValueGroup";var wh=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),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"}}),Ch=X.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:y,...x},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(t),k=e!==void 0?e:T,P=X.useRef(null);X.useImperativeHandle(w,()=>P.current);let E=k.length>0,N=C&&(a.length>0||s.length>0||l.length>0||E),S=A=>{e===void 0&&M(A),n?.(A);},H=()=>{S(""),P.current?.focus();},D=A=>{A?.preventDefault(),k.trim()&&(r?.(k.trim()),R(false));},L=A=>{S(A.label),o?.(A),R(false);},I=A=>{S(A),r?.(A),R(false);},V=A=>{S(A),r?.(A),R(false);},O=X.useMemo(()=>{let A={};return a.forEach(K=>{let $=K.category||"Results";A[$]||(A[$]=[]),A[$].push(K);}),A},[a]);return jsxs(ot,{open:N,onOpenChange:R,children:[jsx(an,{children:jsxs("form",{onSubmit:D,className:u(wh({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(Mo({size:g}),"ml-3")}),jsx("input",{ref:P,type:"text",value:k,onChange:A=>S(A.target.value),onFocus:()=>R(true),placeholder:v,disabled:y,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...x}),d&&E&&!y&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Mo({size:g})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:A=>A.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!E&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((A,K)=>jsxs("button",{type:"button",onClick:()=>I(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A}),jsx(ArrowRight,{className:u(Mo({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!E&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((A,K)=>jsxs("button",{type:"button",onClick:()=>V(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A})]},K))]}),E&&jsx("div",{className:"p-2",children:c?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(O).map(([A,K])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A})}),K.map($=>jsxs("button",{type:"button",onClick:()=>L($),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[$.icon||jsx(Search,{className:u(Mo({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:$.label}),$.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:$.description})]})]},$.id))]},A)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Ch.displayName="SearchBar";var Th={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"})},kh=X.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=X.useState(""),g=X.useRef(null),[h,b]=X.useState(false);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{e||p("");},[e]),X.useEffect(()=>{if(!e)return;let R=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),X.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let v=X.useMemo(()=>{let R={};return n.forEach(T=>{let M=T.category||"Results";R[M]||(R[M]=[]),R[M].push(T);}),R},[n]),y=R=>{R.onSelect?.(),c?.(R),t?.(false);},x=()=>{t?.(false);},w=f.length>0,C=!w&&r.length>0;return !h||!e?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:x}),jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X$1,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[C&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(R=>jsxs(Command.Item,{value:R.label,onSelect:()=>y(R),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:R.icon||Th[R.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:R.label}),R.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((T,M)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},R.id))]}),w&&Object.entries(v).map(([R,T])=>jsxs(Command.Group,{heading:R,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),T.map(M=>jsxs(Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>y(M),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:M.icon||Th[R]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:M.label}),M.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:M.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},M.id))]},R)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});kh.displayName="SpotlightSearch";function Fk(e="k"){let[t,n]=X.useState(false);return X.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var Lh=X.createContext(null),Js=()=>{let e=X.useContext(Lh);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},Yk=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=X.useState([]),[a,s]=X.useState(false),i=X.useRef(null),l=t!==void 0,c=l?t:r,d=X.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=X.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=X.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=X.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=X.useCallback(()=>{d([]);},[d]);return jsx(Lh.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Sh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Sh.displayName="NotificationCenter";var Dh=X.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=Js(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Dh.displayName="NotificationCenterTrigger";var Hh=X.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=Js(),[p,g]=X.useState(false),h=X.useRef(null),[b,v]=X.useState({top:0,left:0});return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!i||!f.current||!h.current)return;let y=()=>{if(!f.current||!h.current)return;let x=f.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=x.bottom+n,R=x.left;t==="center"?R=x.left+x.width/2-w.width/2:t==="end"&&(R=x.right-w.width),R+w.width>window.innerWidth-16&&(R=window.innerWidth-w.width-16),R<16&&(R=16),v({top:C,left:R});};return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,true),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,true);}},[i,f,t,n]),X.useEffect(()=>{if(!i)return;let y=w=>{h.current&&!h.current.contains(w.target)&&f.current&&!f.current.contains(w.target)&&l(false);},x=w=>{w.key==="Escape"&&l(false);};return document.addEventListener("mousedown",y),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",x);}},[i,l,f]),!p||!i?null:Ba.createPortal(jsxs("div",{ref:y=>{h.current=y,typeof s=="function"?s(y):s&&(s.current=y);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X$1,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:r})]}):c.map(y=>jsx(nc,{notification:y},y.id)))})]}),document.body)});Hh.displayName="NotificationCenterContent";var Xk={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},qk={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},nc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=Js(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=qk[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let y=typeof v=="string"?new Date(v):v,w=new Date().getTime()-y.getTime(),C=Math.floor(w/6e4),R=Math.floor(w/36e5),T=Math.floor(w/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":T<7?T+"d ago":y.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",Xk[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};nc.displayName="NotificationItem";var Ih=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Ih.displayName="NotificationList";var Vh=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"}}),oP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Ah=X.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=X.useState(true),[v,y]=X.useState(false);X.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),X.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{x();},d);return ()=>clearTimeout(R)}},[d,h]);let x=()=>{y(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let w=oP[t],C=r?o!==void 0?o:w?jsx(w,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(Vh({variant:n,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:x,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});Ah.displayName="Banner";var fa=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:bg-primary hover:text-primary-foreground hover:border-primary"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),iP=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),oc=X.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,y]=X.useState(false),x=o&&o.length>0,w=k=>{x&&y(!v),p?.(k);},C=k=>{k.onClick?.(),y(false);},R={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},T=l==="rotate"&&v?"rotate-45":"",M=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&fa({position:m})),children:[x&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((k,P)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${P*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsx("a",{href:k.href,className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsx("button",{type:"button",onClick:()=>C(k),className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxs("button",{ref:b,type:"button",onClick:w,disabled:g,className:u(fa({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":x?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(iP({size:d}),T,M,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),x&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>y(false)})]})});oc.displayName="FloatingActionButton";var lP=oc;var Kh=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"}}),Oh=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),$h=X.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=X.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=x=>{x.disabled||(p||f(x.key),s?.(x.key));},b=x=>t==="filled"?x?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":x?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},y=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(Kh({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(x=>{let w=g===x.key,C=i==="all"||i==="active"&&w,R=w&&x.activeIcon?x.activeIcon:x.icon;if(l)return jsx("div",{onClick:()=>h(x),className:u(Oh({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:l(x,w)},x.key);let T=jsxs("div",{onClick:()=>!x.href&&h(x),className:u(Oh({variant:t}),b(w),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":w?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),h(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:R}),x.badge!==void 0&&x.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:x.badge>99?"99+":x.badge}),x.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&x.label&&jsx("span",{className:u(y(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsx("a",{href:x.href,onClick:()=>h(x),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(w)),children:T},x.key):T})})});$h.displayName="BottomNavigation";var dP="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",Uh=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),jh=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsx(Drawer.Trigger,{asChild:true,children:n}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:dP,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Uh({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});jh.displayName="ActionSheet";var _h=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),sc=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"}}),Yh=X.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=X.useRef(null),[p,g]=X.useState(0),[h,b]=X.useState(false),v=X.useRef(0),y=X.useRef(0),x=n.length*(o==="sm"?64:o==="lg"?96:80),w=r.length*(o==="sm"?64:o==="lg"?96:80),C=P=>{i||(b(true),v.current=P.touches[0].clientX,y.current=p);},R=P=>{if(!h||i)return;let N=P.touches[0].clientX-v.current,S=y.current+N;(S>0&&n.length===0||S<0&&r.length===0)&&(S=0),S>x?S=x+(S-x)*.3:S<-w&&(S=-w+(S+w)*.3),g(S);},T=()=>{if(!h)return;b(false);let P=f.current?.offsetWidth||0,E=Math.abs(p)/P;if(l&&E>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>x*a&&n.length>0?(g(x),s?.("right")):p<-w*a&&r.length>0?(g(-w),s?.("left")):g(0);},M=(P,E)=>{P.onAction?.(),s?.(E,P.key),g(0);},k=()=>{g(0);};return jsxs("div",{ref:m,className:u(_h({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:x},children:n.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"right"),className:u(sc({variant:P.variant,size:o})),style:{opacity:Math.min(1,p/x)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:w},children:r.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"left"),className:u(sc({variant:P.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/w)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:T,onClick:p!==0?k:void 0,children:c})]})});Yh.displayName="SwipeActions";var qh=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),pP=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"}}),Zh=X.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=X.useRef(null),[b,v]=X.useState(0),[y,x]=X.useState("idle"),w=X.useRef(0),C=X.useRef(false),R=()=>l||y==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,T=N=>{R()&&(w.current=N.touches[0].clientY,C.current=true);},M=N=>{if(!C.current||!R())return;let H=N.touches[0].clientY-w.current;if(H<0){v(0),x("idle");return}let L=Math.min(H*.5,o);v(L),x(L>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,y==="ready"){x("refreshing"),v(r*.6);try{await n();}finally{x("idle"),v(0);}}else x("idle"),v(0);},P={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],E=()=>{if(y==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(P,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let N=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(P,"text-muted-foreground transition-transform"),style:{transform:`rotate(${N}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:y==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(qh({variant:t,className:e})),...p,children:[jsx("div",{className:u(pP({size:i}),"z-10",y==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:E()}),jsx("div",{ref:h,className:u("transition-transform duration-200",y==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:k,children:f})]})});Zh.displayName="PullToRefresh";var Gr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),fP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Qh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:fP,custom:i,transition:Gr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});Qh.displayName="Fade";var gP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},Jh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=X.useMemo(()=>gP(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Jh.displayName="Slide";var bP={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"},vP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},ex=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:vP,custom:i,transition:Gr(n,r,o),className:u(a),style:{transformOrigin:bP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});ex.displayName="Scale";var tx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});tx.displayName="Collapse";var nx=X.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});nx.displayName="Expand";var rx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});rx.displayName="Rotate";var ox=X.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:r?180:0},transition:Gr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});ox.displayName="Flip";var ax=X.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=X.useState([]),l=X.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(y=>[...y,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});ax.displayName="Ripple";var sx=X.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});sx.displayName="Bounce";var yP={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]},ix=X.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:yP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ix.displayName="Shake";var RP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},lx=X.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:u(t&&RP[n],r),children:e}));lx.displayName="Pulse";var cx=X.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});cx.displayName="Wiggle";var dx=X.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=X.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});dx.displayName="Pop";var kP=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},ux=X.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=X.useRef(null),g=useInView(p,{once:true}),[h,b]=X.useState(!l);X.useEffect(()=>{if(l&&g){let x=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(x)}},[l,g,c]);let v=useMotionValue(t),y=useTransform(v,x=>kP(x,r,s,i));return X.useEffect(()=>{if(h){let x=animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>x.stop()}},[h,e,n,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:y}),a]})})});ux.displayName="Counter";var mx=X.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=X.useState(""),[b,v]=X.useState(0),[y,x]=X.useState(false),[w,C]=X.useState(false),R=X.useRef(null),T=useInView(R,{once:true}),[M,k]=X.useState(!l);return X.useEffect(()=>{if(l&&T){let P=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(P)}},[l,T,n]),X.useEffect(()=>{if(!M||w)return;let P=p[b],E;return y?g.length>0?E=setTimeout(()=>{h(g.slice(0,-1));},i):(x(false),v(N=>(N+1)%p.length)):g.length<P.length?E=setTimeout(()=>{h(P.slice(0,g.length+1));},t):b<p.length-1||s?E=setTimeout(()=>{x(true);},r):(C(true),m?.()),()=>clearTimeout(E)},[M,g,b,y,w,p,t,i,r,s,m]),jsxs("span",{ref:R,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});mx.displayName="Typewriter";var px=X.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=X.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,y)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&y<p.length-1&&"\xA0"]},y))})})});px.displayName="TextReveal";var fx=X.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=X.useState(0);X.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});fx.displayName="WordRotate";var hx=X.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=X.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});hx.displayName="ScrollReveal";var xx=X.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsx(EP,{progress:f,position:e})]})});xx.displayName="ScrollProgress";var EP=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=X.useState(0);return X.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},yx=X.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=X.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});yx.displayName="Parallax";var Cx=X.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsx("style",{children:`
|
|
55
|
+
`,document.body.appendChild(de),q.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:q,node:e});},pe=q=>{if(q.preventDefault(),q.stopPropagation(),!g||g.key===e.key||Z)return;let De=q.currentTarget.getBoundingClientRect(),de=q.clientY-De.top,je=De.height,We;de<je*.25?We=-1:de>je*.75?We=1:We=0,!(w&&!w({dropNode:e,dropPosition:We,dragNode:g}))&&(y(e.key,We),R?.({event:q,node:e}));},Ct=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key)&&T?.({event:q,node:e,expandedKeys:K()});},bt=q=>{q.stopPropagation(),M?.({event:q,node:e});},yn=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key||Z)&&(v!==null&&x(e,v),h(null),y(null,null));},Ke=q=>{h(null),y(null,null),k?.({event:q,node:e});},on=q=>{Z||ue&&i(e.key,e,q);},Tt=q=>{q.stopPropagation(),!Z&&!G&&a(e.key,e);},_=X.useMemo(()=>{if(!B||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[B,v]),oe=[...r,n];return jsxs("div",{className:"relative",children:[P&&t>0&&jsxs(Fragment,{children:[r.map((q,De)=>!q&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${De} * var(--tree-indent) + 12px)`,top:0,bottom:0}},De)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":G?void 0:Y,"aria-selected":ue?F:void 0,"aria-disabled":Z,draggable:Ce,onDragStart:Fe,onDragOver:pe,onDragEnter:Ct,onDragLeave:bt,onDrop:yn,onDragEnd:Ke,onClick:on,className:u("relative",Ng({size:A,isSelected:F,isDragging:W,isDisabled:Z,isHoverable:ue&&!Z}),_,V&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ce&&N&&Q!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Q}),jsx("button",{type:"button",onClick:Tt,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",G&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",Y&&"rotate-90")})}),U&&jsx(HC,{checked:z,indeterminate:j,disabled:Z,onClick:q=>m(e.key,e,q)}),E&&le&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:le}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",V&&"flex-none"),children:e.label})]}),$&&Y&&jsx("div",{role:"group",children:e.children.map((q,De)=>jsx(Pg,{node:q,level:t+1,isLast:De===e.children.length-1,parentIsLastPath:oe},q.key))})]})},IC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},VC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Eg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Eg(n,t))return true;return false},Lg=X.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:y=[],onCheck:x,showLine:w=false,showIcon:C=false,showHandle:R=true,dragIcon:T,icon:M,leafIcon:k=jsx(File,{className:"h-4 w-4"}),folderIcon:P=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:E=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,onDrop:I,blockNode:V=false,disabled:O=false,...A},K)=>{let $=X.useCallback(()=>l?new Set(IC(r)):new Set(i),[l,i,r]),[G,Y]=X.useState($),F=s!==void 0,z=F?new Set(s):G,j=X.useCallback((ve,Ye)=>{let Kt=new Set(z),ze=!Kt.has(ve);ze?Kt.add(ve):Kt.delete(ve),F||Y(Kt),c?.(Array.from(Kt),{expanded:ze,node:Ye});},[z,F,c]),[W,B]=X.useState(new Set(p)),Z=f!==void 0,ue=Z?new Set(f):W,U=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(ue),Rn=!ze.has(ve);m?Rn?ze.add(ve):ze.delete(ve):(ze.clear(),Rn&&ze.add(ve)),Z||B(ze);let Wr=[],zo=Ca=>{for(let _r of Ca)ze.has(_r.key)&&Wr.push(_r),_r.children&&zo(_r.children);};zo(r),g?.(Array.from(ze),{selected:Rn,selectedNodes:Wr,node:Ye,event:Kt});},[ue,m,Z,g,r]),[Ce,Q]=X.useState(new Set(y)),[le,Fe]=X.useState(new Set),pe=v!==void 0,Ct=pe?new Set(Array.isArray(v)?v:v.checked):Ce,bt=pe&&!Array.isArray(v)?new Set(v.halfChecked):le,yn=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(Ct),Rn=new Set(bt),Wr=!ze.has(ve);if(Wr?(ze.add(ve),Rn.delete(ve)):ze.delete(ve),!b&&Ye.children){let fi=VC(Ye);for(let Un of fi)Wr?(ze.add(Un),Rn.delete(Un)):ze.delete(Un);}pe||(Q(ze),Fe(Rn));let zo=[],Ca=fi=>{for(let Un of fi)ze.has(Un.key)&&zo.push(Un),Un.children&&Ca(Un.children);};Ca(r);let _r=b?{checked:Array.from(ze),halfChecked:Array.from(Rn)}:Array.from(ze);x?.(_r,{checked:Wr,checkedNodes:zo,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[Ct,bt,b,pe,x,r]),[Ke,on]=X.useState(null),[Tt,_]=X.useState(null),[oe,q]=X.useState(null),De=X.useCallback((ve,Ye)=>{_(ve),q(Ye);},[]),de=X.useCallback((ve,Ye)=>{!Ke||!I||Ye===0&&Eg(Ke,ve.key)||I({event:{},node:ve,dragNode:Ke,dropPosition:Ye,dropToGap:Ye!==0});},[Ke,I]),je=X.useCallback(()=>Array.from(z),[z]),We={expandedKeys:z,toggleExpand:j,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:Ct,halfCheckedKeys:bt,handleCheck:yn,checkable:h,checkStrictly:b,draggable:o,draggedNode:Ke,setDraggedNode:on,dragOverKey:Tt,dragOverPosition:oe,setDragOver:De,handleDrop:de,allowDrop:a,onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,showLine:w,showIcon:C,showHandle:R,dragIcon:T,icon:M,leafIcon:k,folderIcon:P,folderOpenIcon:E,blockNode:V,disabled:O,size:n,data:r,getAllKeys:je},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&De(null,null);};return jsx(kg.Provider,{value:We,children:jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Mg({variant:t,size:n,className:e})),onDragLeave:Gn,...A,children:r.map((ve,Ye)=>jsx(Pg,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Lg.displayName="Tree";var Dg=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),KC=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsx(Fragment,{children:r.map((o,a)=>n.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},$C=(e,t)=>{let[n,r]=X.useState(e);return X.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Hg=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:y,...x},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(r),[k,P]=X.useState([]),[E,N]=X.useState(false),[S,H]=X.useState(false),[D,L]=X.useState(0),I=X.useRef(null),V=X.useRef(null),O=n!==void 0?n:T,A=$C(O,l);X.useEffect(()=>{let U=V.current;if(!U)return;let Ce=()=>{L(U.offsetWidth);};Ce();let Q=new ResizeObserver(Ce);return Q.observe(U),()=>{Q.disconnect();}},[]),X.useImperativeHandle(w,()=>I.current);let K=i?k:s,$=X.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(O.toLowerCase())),[K,O,i]);X.useEffect(()=>{if(!i)return;if(A.length<c){P([]);return}let U=false;return (async()=>{N(true);try{let Q=await i(A);U||P(Q);}catch{U||P([]);}finally{U||N(false);}})(),()=>{U=true;}},[A,i,c]);let G=U=>{n===void 0&&M(U),o?.(U);},Y=U=>{let Ce=U.target.value;G(Ce),Ce.length>=c&&R(true);},F=U=>{G(U.label),a?.(U),R(false);},z=()=>{G(""),I.current?.focus();},j=()=>{H(true),R(true);},W=()=>{H(false);},B=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&$.length>0&&R(true);},Z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&O?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:R,children:[jsxs(an,{ref:V,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:I,type:"text",value:O,onChange:Y,onFocus:j,onBlur:W,onKeyDown:B,disabled:y,placeholder:d,className:u(Dg({size:t,fullWidth:v}),ue,e),style:{borderColor:S?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...x}),p&&O&&!y&&jsx("button",{type:"button",onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X$1,{className:Z})})]}),jsx(at,{className:"p-0",align:"start",style:{width:D>0?D:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(ke,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:E?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Z,"animate-spin")}),f]}):$.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):$.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>F(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:u("mr-2 h-4 w-4 shrink-0",O===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(KC,{text:U.label,query:O}):U.label})]},U.value))})})})})]})});Hg.displayName="Autocomplete";var ll=X.createContext(null),cl=X.createContext(null),dl=()=>{let e=X.useContext(ll);if(!e)throw new Error("useFormContext must be used within a Form");return e},bs=()=>{let e=X.useContext(cl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},GC={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},Ig=X.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=X.useState(e),[m,f]=X.useState({}),[p,g]=X.useState({}),[h,b]=X.useState({}),[v,y]=X.useState(false),x=X.useRef(new Map),w=X.useCallback((D,L)=>{x.current.set(D,L);},[]),C=X.useCallback(D=>{x.current.delete(D);},[]),R=X.useCallback(D=>{let L=x.current.get(D)||[],I=c[D];for(let V of L)if(!V.validate(I))return f(O=>({...O,[D]:V.message})),false;return f(V=>({...V,[D]:null})),true},[c]),T=X.useCallback(()=>{let D=true,L={};return x.current.forEach((I,V)=>{let O=c[V];for(let A of I)if(!A.validate(O)){L[V]=A.message,D=false;break}L[V]||(L[V]=null);}),f(L),D},[c]),M=X.useCallback((D,L)=>{d(I=>({...I,[D]:L})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{R(D);},0);},[o,R]),k=X.useCallback((D,L)=>{f(I=>({...I,[D]:L}));},[]),P=X.useCallback((D,L)=>{g(I=>({...I,[D]:L})),L&&r&&R(D);},[r,R]),E=X.useCallback(D=>({value:c[D],error:m[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,m,p,h]),N=X.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),S=async D=>{D.preventDefault();let L={};if(x.current.forEach((V,O)=>{L[O]=true;}),g(L),!T()){n?.(m);return}if(t){y(true);try{await t(c);}finally{y(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:M,setError:k,setTouched:P,validateField:R,validateAll:T,registerField:w,unregisterField:C,getFieldState:E,reset:N};return jsx(ll.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:S,className:u("space-y-4",s),...i,children:a})})});Ig.displayName="Form";var Vg=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=dl(),a=X.useId();X.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(cl.Provider,{value:i,children:r})};Vg.displayName="FormField";var Ag=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));Ag.displayName="FormItem";var zg=X.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=bs();return jsxs(Cr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});zg.displayName="FormLabel";var Og=({children:e})=>{let{name:t,id:n,error:r,touched:o}=bs(),a=dl(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return X.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};Og.displayName="FormControl";var Bg=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));Bg.displayName="FormDescription";var Fg=X.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=bs(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});Fg.displayName="FormMessage";var $g=cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),Gg=X.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u($g({size:t,className:e})),...i,children:[jsxs(Tr,{"data-user-avatar":true,children:[o&&jsx(Jr,{src:o,alt:n}),jsx(Mr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});Gg.displayName="User";var jg=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),Wg=X.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:u(jg({variant:t,size:n,radius:r,className:e})),...o}));Wg.displayName="Code";function qg(e){let[t,n]=useState(false);return useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var Zg=X.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=qg(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,y)=>jsxs("div",{...h({line:v}),children:[n&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:y+1}),v.map((x,w)=>jsx("span",{...b({token:x})},w))]},y))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});Zg.displayName="CodeBlock";var Qg=X.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=qg(n)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((y,x)=>jsx("span",{...h({token:y})},x))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});Qg.displayName="TabbedCodeBlock";var Jg=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),eb=X.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=X.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(Jg({variant:t,size:n,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:r}),o&&jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});eb.displayName="Snippet";var fl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"md"}}),tb=X.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=X.useState("loading");X.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(fl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(fl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Ha,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});tb.displayName="Image";var ob=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"}}),ab=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"}}),sb=X.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),ib=X.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=X.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(sb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(ob({size:t,className:e})),...i,children:s})})});ib.displayName="Listbox";var lb=X.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=X.useContext(sb),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(ab({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});lb.displayName="ListboxItem";var db=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"}}),ub=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 rT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=X.useState(null),[f,p]=X.useState(null),g=(x,w)=>{i||(m(w),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",String(w)));},h=(x,w)=>{x.preventDefault(),!(i||d===null||d===w)&&p(w);},b=()=>{p(null);},v=(x,w)=>{if(x.preventDefault(),i||d===null||d===w){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(w,0,R),o?.(C),m(null),p(null);},y=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(db({variant:t,size:n,className:e})),...l,children:r.map((x,w)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,w),onDragOver:C=>h(C,w),onDragLeave:b,onDrop:C=>v(C,w),onDragEnd:y,className:u(ub({variant:t,size:n,isDragging:d===w,isDragOver:f===w}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(x,w)})]},x.id))})}var oT=X.forwardRef(rT);var fb=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}}),lT={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},gb=X.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(fb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(lT[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));gb.displayName="LoadingOverlay";var bb=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"}}),vb=X.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=X.useState(0),[c,d]=X.useState(false),m=X.useRef(null);return X.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(bb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});vb.displayName="NProgress";var Rb=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}}),hb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},fT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},wb=X.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(fT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(hb[n||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:u(hb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(Rb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});wb.displayName="Loading";var bT=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),vT=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),hT=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"}}),xT=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Ms={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},vl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},bl=(e,t)=>String(e).padStart(t,"0"),Cb=(e,t)=>{if(!e)return "";let n=bl(e.getDate(),2),r=bl(e.getMonth()+1,2),o=bl(e.getFullYear(),4),a=Ms[t],s=vl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},ws=(e,t)=>{let n=Ms[t],r=e.split(n);if(r.length!==3)return null;let o=vl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},yT=e=>{let t=Ms[e];return vl[e].map(r=>r==="year"?"####":"##").join(t)},na=(e,t)=>{if(!e?.from)return "";let n=Cb(e.from,t),r=e.to?Cb(e.to,t):"";return n&&r?`${n} - ${r}`:n},Tb=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:y="text",fullWidth:x=false,numberOfMonths:w=2,align:C="start",disabled:R,placeholder:T,id:M,...k},P)=>{let E=X.useId(),N=M||E,S=`${N}-description`,H=`${N}-error`,[D,L]=X.useState(f),[I,V]=X.useState(""),[O,A]=X.useState(false),[K,$]=X.useState(false),G=m!==void 0?m:D,Y=a&&r,F=yT(b),z=Ms[b],j=" - ";X.useEffect(()=>{K||V(na(G,b));},[G,b,K]);let W=le=>{m===void 0&&L(le),p?.(le);},B=le=>{W(le),V(na(le,b)),le?.from&&le?.to&&A(false);},Z=le=>{let Fe=le.target.value;Fe=Fe.replace(new RegExp(`[^0-9\\${z}\\s-]`,"g"),"");let pe=`${F}${j}${F}`,Ct=Fe.replace(new RegExp(`[\\${z}\\s-]`,"g"),""),bt="",yn=0;for(let Ke=0;Ke<pe.length&&yn<Ct.length;Ke++)pe[Ke]==="#"?(bt+=Ct[yn],yn++):bt+=pe[Ke];if(V(bt),bt.length===pe.length){let Ke=bt.split(j);if(Ke.length===2){let on=ws(Ke[0].trim(),b),Tt=ws(Ke[1].trim(),b);if(on&&Tt){if(g&&(on<g||Tt<g)||h&&(on>h||Tt>h))return;on<=Tt&&W({from:on,to:Tt});}}}},ue=()=>{$(true);},U=()=>{$(false);let le=`${F}${j}${F}`;if(I.length!==le.length)V(na(G,b));else {let Fe=I.split(j);if(Fe.length!==2)V(na(G,b));else {let pe=ws(Fe[0].trim(),b),Ct=ws(Fe[1].trim(),b);(!pe||!Ct||pe>Ct)&&V(na(G,b));}}},Ce=()=>{R||A(true);},Q=()=>{!R&&y==="picker"&&v&&A(true);};return jsxs("div",{className:u(bT({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(xT({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&O,onOpenChange:A,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:P,id:N,type:"text",inputMode:y==="text"?"numeric":void 0,value:I,onChange:y==="text"?Z:void 0,onClick:Q,onFocus:ue,onBlur:U,readOnly:y==="picker","aria-invalid":a,"aria-describedby":Y?H:n?S:void 0,"aria-required":o,disabled:R,placeholder:T||`${b.toLowerCase()} - ${b.toLowerCase()}`,className:u(vT({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),y==="picker"&&v&&"cursor-pointer",l),style:{borderColor:K||v&&O?"var(--color-foreground)":void 0},...k}),v&&jsx("button",{type:"button",onClick:Ce,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(hT({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(to,{mode:"range",selected:G,onSelect:B,numberOfMonths:w,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:G?.from,showMonthAndYearPickers:true})})]}),n&&!Y&&jsx("p",{id:S,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),Y&&jsx("p",{id:H,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Tb.displayName="DateRangePicker";var uo=e=>String(e).padStart(2,"0"),Mb=X.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=X.useState(false),d=r?Array.from({length:24},(x,w)=>w):Array.from({length:12},(x,w)=>w+1),m=Array.from({length:Math.floor(60/o)},(x,w)=>w*o),f=x=>{if(!x)return n;if(r)return `${uo(x.hours)}:${uo(x.minutes)}`;let w=x.hours%12||12,C=x.hours>=12?"PM":"AM";return `${uo(w)}:${uo(x.minutes)} ${C}`},p=x=>{let w=e?.minutes??0,C=x;if(!r&&e){let R=e.hours>=12;R&&x!==12?C=x+12:!R&&x===12&&(C=0);}t?.({hours:C,minutes:w});},g=x=>{let w=e?.hours??0;t?.({hours:w,minutes:x});},h=x=>{if(!e)return;let w=e.hours;x==="AM"&&e.hours>=12?w=e.hours-12:x==="PM"&&e.hours<12&&(w=e.hours+12),t?.({hours:w,minutes:e.minutes});},b=()=>{let x=new Date;t?.({hours:x.getHours(),minutes:x.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,y=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ot,{open:l,onOpenChange:c,children:[jsxs(qn,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(at,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(x=>jsx(ae,{variant:y===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(x),children:uo(x)},x))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(x=>jsx(ae,{variant:e?.minutes===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(x),children:uo(x)},x))})})]}),!r&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Mb.displayName="TimePicker";var Nb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function CT({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=X.useRef(null),[p,g]=X.useState(0);X.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),y=Math.ceil(o/b)+2*a,x=Math.min(n.length-1,v+y),w=R=>{let T=R.currentTarget.scrollTop;g(T),c?.(T);},C=X.useMemo(()=>{let R=[];for(let T=v;T<=x;T++)n[T]!==void 0&&R.push({item:n[T],index:T,style:{position:"absolute",top:T*b,left:0,right:0,height:r}});return R},[n,v,x,b,r]);return jsx("div",{ref:f,className:u(Nb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:w,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:T,style:M})=>jsx("div",{style:M,children:s(R,T)},i?i(R,T):T))})})}var TT=X.forwardRef(CT);var xl=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),yl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Pb=X.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,scrollbarVisibility:f="visible",...p},g)=>{let h=X.useRef(null),b=X.useRef(null),v=X.useRef(false);X.useImperativeHandle(g,()=>h.current),X.useEffect(()=>{let w=b.current;if(!w)return;let C=new IntersectionObserver(R=>{let[T]=R;T.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:h.current,rootMargin:c||`${l}px`,threshold:0});return C.observe(w),()=>{C.disconnect();}},[a,s,o,l,c,d]);let y=jsx("div",{className:u(yl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),x=jsxs(Fragment,{children:[r,jsx("div",{ref:b,className:"h-px w-full"}),s&&(i||y),!a&&!s&&m&&jsx("div",{className:u(yl({size:n}),"text-muted-foreground text-sm"),children:m})]});return d?jsx("div",{ref:h,className:u(xl({variant:t,className:e})),...p,children:x}):jsx(ke,{ref:h,visibility:f,className:u(xl({variant:t,className:e})),...p,children:x})});Pb.displayName="InfiniteScroll";var zT=e=>e.map(t=>typeof t=="string"?{src:t}:t),Rl=X.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=X.useMemo(()=>zT(e),[e]),[v,y]=X.useState(r),[x,w]=X.useState(1),[C,R]=X.useState(0),[T,M]=X.useState(false),[k,P]=X.useState(false),[E,N]=X.useState({x:0,y:0}),[S,H]=X.useState({x:0,y:0}),[D,L]=X.useState(false),I=X.useRef(null),V=b[v];X.useEffect(()=>{L(true);},[]),X.useEffect(()=>{y(r);},[r]),X.useEffect(()=>{o?.(v);},[v,o]),X.useEffect(()=>{w(1),R(0),N({x:0,y:0});},[v]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let O=X.useCallback(()=>{y(Q=>Q>0?Q-1:b.length-1);},[b.length]),A=X.useCallback(()=>{y(Q=>Q<b.length-1?Q+1:0);},[b.length]),K=()=>{w(Q=>Math.min(Q+.5,4));},$=()=>{w(Q=>{let le=Math.max(Q-.5,.5);return le===1&&N({x:0,y:0}),le});},G=()=>{R(Q=>(Q+90)%360);},Y=async()=>{if(V)try{let le=await(await fetch(V.src)).blob(),Fe=URL.createObjectURL(le),pe=document.createElement("a");pe.href=Fe,pe.download=V.alt||`image-${v+1}`,document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),URL.revokeObjectURL(Fe);}catch{window.open(V.src,"_blank");}},F=async()=>{if(I.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await I.current.requestFullscreen(),M(!0);}catch{}},z=Q=>{x>1&&(P(true),H({x:Q.clientX-E.x,y:Q.clientY-E.y}));},j=Q=>{k&&x>1&&N({x:Q.clientX-S.x,y:Q.clientY-S.y});},W=()=>{P(false);},B=()=>{n?.(false);},Z=Q=>{p&&Q.target===Q.currentTarget&&B();},ue=X.useCallback(Q=>{switch(Q.key){case "ArrowLeft":O();break;case "ArrowRight":A();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":$();break}},[O,A,n]);if(X.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),X.useEffect(()=>{let Q=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Q),()=>document.removeEventListener("fullscreenchange",Q)},[]),b.length===0)return null;let U=a?X.isValidElement(a)?X.cloneElement(a,{onClick:Q=>{a.props.onClick?.(Q),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!D||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Z}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+1," / ",b.length]}),V?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:V.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(x*100),"%"]}),jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:T?"Exit fullscreen":"Fullscreen",children:T?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X$1,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:z,onMouseMove:j,onMouseUp:W,onMouseLeave:W,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:O,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:A,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:V?.src,alt:V?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":x>1?"cursor-grab":""),style:{transform:`translate(${E.x}px, ${E.y}px) scale(${x}) rotate(${C}deg)`},draggable:false})]}),V?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:V.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((Q,le)=>jsx("button",{onClick:()=>y(le),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===le?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Q.src,alt:Q.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});Rl.displayName="ImageViewer";var Lb=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=X.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsx(Rl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Lb.displayName="ImageViewerTrigger";var Sb=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),BT={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},FT={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},KT=e=>{let t=e.toLowerCase();return BT[t]||e.toUpperCase()},oa=e=>{let t=e.toLowerCase();return FT[t]||t},ks=e=>{let t=oa(e);return ["meta","control","alt","shift"].includes(t)},Db=X.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{X.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(ks).map(oa),p=m.filter(h=>!ks(h)).map(oa),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,y=f.includes("alt")===h.altKey,x=f.includes("shift")===h.shiftKey,w=p.length===0||p.includes(h.key.toLowerCase());b&&v&&y&&x&&w&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxs(X.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:KT(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(Sb({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Db.displayName="Kbd";function $T(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;X.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(ks).map(oa),i=a.filter(c=>!ks(c)).map(oa),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Hb=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Ib=X.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=X.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(n),m(!0),o?.(),setTimeout(()=>{m(!1);},r);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(Hb({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});Ib.displayName="CopyButton";var Ab=cva("flex flex-col bg-background",{variants:{variant:{default:"border",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"md"}}),qT=[{value:"month",label:"Month"},{value:"week",label:"Week"},{value:"day",label:"Day"}],ZT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],QT=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function JT(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function eM(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function fo(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function po(e){return fo(e,new Date)}function Vb(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return fo(r,t)||fo(o,t)||r<t&&o>t})}var zb=X.forwardRef(({className:e,variant:t,size:n,radius:r,events:o=[],view:a="month",onViewChange:s,viewOptions:i=qT,date:l,onDateChange:c,onEventClick:d,onSlotClick:m,weekStartsOn:f=0,locale:p="en-US",...g},h)=>{let[b,v]=X.useState(new Date),y=l??b,x=N=>{c?c(N):v(N);},w=f===1?QT:ZT,C=()=>{let N=new Date(y);a==="month"?N.setMonth(N.getMonth()-1):a==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),x(N);},R=()=>{let N=new Date(y);a==="month"?N.setMonth(N.getMonth()+1):a==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),x(N);},T=()=>{x(new Date);},M=()=>a==="day"?y.toLocaleDateString(p,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):y.toLocaleDateString(p,{year:"numeric",month:"long"}),k=()=>{let N=JT(y.getFullYear(),y.getMonth(),f);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(S=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:S},S))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((S,H)=>{let D=Vb(o,S),L=S.getMonth()===y.getMonth(),I=fo(S,y);return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!L&&"bg-muted/30",I&&"bg-accent"),onClick:()=>m?.(S),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",po(S)&&"bg-primary text-primary-foreground",!L&&"text-muted-foreground"),children:S.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(V=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:O=>{O.stopPropagation(),d?.(V);},children:V.title},V.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},H)})})]})},P=()=>{let N=eM(y,f),S=Array.from({length:24},(H,D)=>D);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),N.map((H,D)=>{let L=fo(H,y);return jsxs("div",{className:u("p-2 text-center border-l cursor-pointer hover:bg-accent/50",po(H)&&"bg-primary/10",L&&!po(H)&&"bg-accent"),onClick:()=>m?.(H),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",po(H)&&"text-primary",L&&!po(H)&&"text-primary"),children:H.getDate()})]},D)})]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:S.map(H=>jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),N.map((D,L)=>{let I=new Date(D);I.setHours(H,0,0,0);let V=o.filter(O=>{let A=new Date(O.start);return fo(A,D)&&A.getHours()===H});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(I),children:V.map(O=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:O.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(O);},children:O.title},O.id))},L)})]},H))})})]})},E=()=>{let N=Array.from({length:24},(H,D)=>D),S=Vb(o,y);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",po(y)&&"bg-primary text-primary-foreground"),children:y.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(H=>{let D=new Date(y);D.setHours(H,0,0,0);let L=S.filter(I=>new Date(I.start).getHours()===H);return jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(D),children:L.map(I=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(I);},children:I.title},I.id))})]},H)})})})]})};return jsxs("div",{ref:h,className:u(Ab({variant:t,size:n,radius:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsx("h2",{className:"text-lg font-semibold",children:M()}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",radius:"md",onClick:T,children:"Today"}),jsx(Aa,{options:i,value:a,onValueChange:N=>s?.(N),size:"sm",radius:"md",className:"w-[120px]"}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:C,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),a==="month"&&k(),a==="week"&&P(),a==="day"&&E()]})});zb.displayName="FullCalendar";var Ds=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),sa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),ia=["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%))"],Ob=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(sa({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Ob.displayName="LineChart";var Bb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:n,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Bb.displayName="BarChart";var Fb=X.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=ia,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Ds,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Fb.displayName="PieChart";var Kb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));Kb.displayName="AreaChart";var kl={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"};function CM({card:e,columnId:t,radius:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),m={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:m,className:u("p-3 cursor-grab active:cursor-grabbing transition-all bg-background border shadow-sm hover:shadow-md",d&&"opacity-50 scale-[1.02] shadow-lg",kl[n]),onClick:()=>o?.(e,t),...a,...s,children:r?r(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function Gb({column:e,radius:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,addCardLabel:s,columnHeight:i}){return jsxs("div",{className:u("flex flex-col min-w-[280px] w-[280px]",kl[t]),style:{backgroundColor:e.backgroundColor||"transparent"},children:[jsx("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})]})}),jsx(ke,{style:{height:i},className:"flex-1",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(CM,{card:l,columnId:e.id,radius:t,renderCard:n,onCardClick:r},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"})]})}),a&&jsx("div",{className:"p-2 border-t",children:jsxs(ae,{variant:"light",size:"sm",className:"w-full justify-start",onClick:l=>{l.stopPropagation(),l.preventDefault(),o?.(e.id);},children:[jsx(Plus,{className:"h-4 w-4 mr-2"}),s]})})]})}var jb=X.forwardRef(({className:e,columns:t,onCardMove:n,onCardClick:r,onAddCard:o,renderCard:a,showAddCard:s=true,addCardLabel:i="Add card",columnHeight:l=500,radius:c="md",...d},m)=>{let[f,p]=X.useState(false),[g,h]=X.useState(null),[b,v]=X.useState(null);X.useEffect(()=>{p(true);},[]);let y=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!f)return jsx("div",{ref:m,className:u("flex gap-4 overflow-x-auto p-4 bg-muted/30",e),...d,children:t.map(T=>jsx(Gb,{column:T,radius:c,renderCard:a,onCardClick:r,onAddCard:o,showAddCard:s,addCardLabel:i,columnHeight:l},T.id))});let x=T=>t.find(M=>M.cards.some(k=>k.id===T));return jsxs(DndContext,{sensors:y,collisionDetection:closestCorners,onDragStart:T=>{let{active:M}=T,k=x(M.id);if(k){let P=k.cards.find(E=>E.id===M.id);P&&(h(P),v(k.id));}},onDragOver:T=>{let{active:M,over:k}=T;if(!k)return;let P=M.id,E=k.id,N=x(P),S=x(E)||t.find(L=>L.id===E);if(!N||!S||N.id===S.id)return;let H=S.cards.findIndex(L=>L.id===E),D=H===-1?S.cards.length:H;n?.(P,N.id,S.id,D);},onDragEnd:T=>{let{active:M,over:k}=T;if(k&&M.id!==k.id){let P=x(M.id),E=x(k.id)||t.find(N=>N.id===k.id);if(P&&E){let N=E.cards.findIndex(H=>H.id===k.id),S=N===-1?E.cards.length:N;n?.(M.id,P.id,E.id,S);}}h(null),v(null);},children:[jsx("div",{ref:m,className:u("flex gap-4 overflow-x-auto p-4 bg-muted/30",e),...d,children:t.map(T=>jsx(Gb,{column:T,radius:c,renderCard:a,onCardClick:r,onAddCard:o,showAddCard:s,addCardLabel:i,columnHeight:l},T.id))}),jsx(DragOverlay,{children:g&&b&&jsx("div",{className:u("p-3 cursor-grab active:cursor-grabbing transition-all bg-background border shadow-lg opacity-50 scale-[1.02]",kl[c]),children:a?a(g,b):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:g.title}),g.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:g.description})]})]})})})]})});jb.displayName="KanbanBoard";var Wb=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),_b=X.createContext(null);function Is(){let e=X.useContext(_b);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Yb=X.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=TM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=X.useState(false),[h,b]=X.useState(false),[v,y]=X.useState(0),[x,w]=X.useState([]),C=X.useCallback(P=>{P&&(y(P.selectedScrollSnap()),g(P.canScrollPrev()),b(P.canScrollNext()));},[]),R=X.useCallback(()=>{f?.scrollPrev();},[f]),T=X.useCallback(()=>{f?.scrollNext();},[f]),M=X.useCallback(P=>{f?.scrollTo(P);},[f]),k=X.useCallback(P=>{P.key==="ArrowLeft"?(P.preventDefault(),R()):P.key==="ArrowRight"&&(P.preventDefault(),T());},[R,T]);return X.useEffect(()=>{!f||!l||l(f);},[f,l]),X.useEffect(()=>{if(f)return w(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(_b.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:T,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:x,scrollTo:M,orientation:a},children:jsxs("div",{ref:d,className:u(Wb({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(Pl,{}),jsx(El,{})]}),i&&x.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:x.map((P,E)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",E===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(E),"aria-label":`Go to slide ${E+1}`},E))})]})})});Yb.displayName="Carousel";var Xb=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex",e),...t}));Xb.displayName="CarouselContent";var qb=X.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=Is();return jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});qb.displayName="CarouselItem";var Pl=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollPrev:s,canScrollPrev:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Pl.displayName="CarouselPrevious";var El=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollNext:s,canScrollNext:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});El.displayName="CarouselNext";var Zb=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Vs={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},Sl={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}"]},Qb=X.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=X.useState(r.length>0?"recent":o),[m,f]=X.useState(""),g=m?Object.values(Sl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Sl[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:u(Zb({size:t,className:e})),...i,children:[a&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Pa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx(ke,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(Vs).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:u("shrink-0 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:Vs[b].name,children:v},b))})}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Vs[c].name}),jsx(ke,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Qb.displayName="EmojiPicker";var Jb=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),nN=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"}}),rN=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Xe=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(_n,{children:[jsx(Yn,{children:jsx(ae,{type:"button",variant:n?"solid":"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Xn,{side:"top",className:"text-xs",children:t})]}),ev=X.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[HM.configure({heading:{levels:[1,2,3]}}),IM.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),VM,AM.configure({types:["heading","paragraph"]}),zM.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});X.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),X.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx(Wn,{children:jsxs("div",{ref:f,className:u(Jb({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(nN({size:n})),children:[jsx(Xe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Xe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Xe,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Xe,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Xe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Xe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Xe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Xe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Xe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Xe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Xe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Xe,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:u(rN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});ev.displayName="RichTextEditor";var nv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function uN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function tv(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var rv=X.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=X.useRef(null),[h,b]=X.useState(),[v,y]=X.useState(),[x,w]=X.useState(1),[C,R]=X.useState(0),T=E=>{let{width:N,height:S}=E.currentTarget;if(r){let H=uN(N,S,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},M=E=>{b(E),o?.(E);},k=async E=>{if(y(E),a&&g.current&&E.width&&E.height){let N=await tv(g.current,E,C,x);a(N);}},P=()=>{R(E=>(E+90)%360);};return X.useEffect(()=>{v&&g.current&&a&&tv(g.current,v,C,x).then(E=>{a(E);});},[x,C,v,a]),jsxs("div",{ref:p,className:u(nv({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(oN,{crop:h,onChange:M,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",crossOrigin:"anonymous",onLoad:T,style:{transform:`scale(${x}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx(Ua,{value:[x],onValueChange:([E])=>w(E),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"sm",isIconOnly:true,onClick:P,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});rv.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"}}),fN={sm:96,md:128,lg:192},av=X.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??fN[n??"md"];return r?jsx("div",{ref:h,className:u(Vl({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(mN,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(Vl({variant:t,size:n,className:e})),...g,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});av.displayName="QRCode";var sv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});sv.displayName="ThemeProvider";var RN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),iv=X.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=X.useState(false);X.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(Cn,{children:[jsx(Tn,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(Mn,{align:"end",children:[jsxs($t,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs($t,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs($t,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});iv.displayName="ThemeToggle";var lv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),cv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-11 px-4 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),dv=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"}}),uv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=X.useId(),v=p||b,y=`${v}-description`,x=`${v}-error`,w=a&&r;return jsxs("div",{className:u(lv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(dv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":w?x:n?y:void 0,"aria-required":o,className:u(cv({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!w&&jsx("p",{id:y,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),w&&jsx("p",{id:x,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});uv.displayName="TextField";var fv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),TN=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}}),mv=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"}}),pv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),MN=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"}}),gv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:y,fullWidth:x=false,disabled:w,id:C,...R},T)=>{let M=X.useId(),k=C||M,P=`${k}-description`,E=`${k}-error`,[N,S]=X.useState(h),[H,D]=X.useState(false),L=g!==void 0?g:N,I=a&&r,V=X.useCallback(z=>{z!==void 0&&(m!==void 0&&z<m&&(z=m),f!==void 0&&z>f&&(z=f)),g===void 0&&S(z),b?.(z);},[g,m,f,b]),O=()=>{let z=(L??0)+p;V(z);},A=()=>{let z=(L??0)-p;V(z);},K=z=>{let j=z.target.value;if(j==="")V(void 0);else {let W=parseFloat(j);isNaN(W)||V(W);}},$=z=>{z.key==="ArrowUp"?(z.preventDefault(),O()):z.key==="ArrowDown"&&(z.preventDefault(),A());},G=X.useMemo(()=>L===void 0?"":y?new Intl.NumberFormat(void 0,y).format(L):L.toString(),[L,y]),Y=m!==void 0&&L!==void 0&&L<=m,F=f!==void 0&&L!==void 0&&L>=f;return jsxs("div",{className:u(fv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:u(MN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:A,disabled:w||Y,className:u(mv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(pv({size:s}))})}),jsx("input",{ref:T,id:k,type:"text",inputMode:"decimal",value:G,onChange:K,onKeyDown:$,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?E:n?P:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:w,className:u(TN({size:s,isInvalid:a,fullWidth:x}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsx("button",{type:"button",onClick:O,disabled:w||F,className:u(mv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(pv({size:s}))})})]}),n&&!I&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:E,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});gv.displayName="NumberField";var vv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),PN=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-11 pl-12 pr-12 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),bv=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"}}),EN=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"}}),LN=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"}}),hv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:y,placeholder:x="Search...",id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,[E,N]=X.useState(f),S=m!==void 0?m:E,H=a&&r,D=S.length>0,L=O=>{let A=O.target.value;m===void 0&&N(A),p?.(A);},I=()=>{m===void 0&&N(""),p?.(""),g?.();},V=O=>{O.key==="Enter"?(O.preventDefault(),h?.(S)):O.key==="Escape"&&D&&(O.preventDefault(),I());};return jsxs("div",{className:u(vv({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:u(EN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(bv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:R,id:M,type:"search",value:S,onChange:L,onKeyDown:V,placeholder:x,"aria-invalid":a,"aria-describedby":H?P:n?k:void 0,"aria-required":o,disabled:y,className:u(PN({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!y&&jsx("button",{type:"button",onClick:I,className:u(LN({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:u(bv({size:s}))})})]}),n&&!H&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});hv.displayName="SearchField";var xv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),DN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),HN=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"}}),IN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Fs={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},Gl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},Kl=(e,t)=>String(e).padStart(t,"0"),ma=(e,t)=>{if(!e)return "";let n=Kl(e.getDate(),2),r=Kl(e.getMonth()+1,2),o=Kl(e.getFullYear(),4),a=Fs[t],s=Gl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},$l=(e,t)=>{let n=Fs[t],r=e.split(n);if(r.length!==3)return null;let o=Gl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},VN=e=>{let t=Fs[e];return Gl[e].map(r=>r==="year"?"####":"##").join(t)},Ks=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:y="text",fullWidth:x=false,disabled:w,placeholder:C,id:R,...T},M)=>{let k=X.useId(),P=R||k,E=`${P}-description`,N=`${P}-error`,[S,H]=X.useState(f??null),[D,L]=X.useState(""),[I,V]=X.useState(false),[O,A]=X.useState(false),K=m!==void 0?m:S,$=a&&r,G=Fs[b],Y=VN(b);X.useEffect(()=>{O||L(ma(K,b));},[K,b,O]);let F=U=>{m===void 0&&H(U),p?.(U);},z=U=>{let Ce=U??null;F(Ce),L(ma(Ce,b)),V(false);},j=U=>{let Ce=U.target.value;Ce=Ce.replace(new RegExp(`[^0-9\\${G}]`,"g"),"");let Q=Ce.replace(new RegExp(`\\${G}`,"g"),""),le="",Fe=0;for(let pe=0;pe<Y.length&&Fe<Q.length;pe++)Y[pe]==="#"?(le+=Q[Fe],Fe++):le+=Y[pe];if(L(le),le.length===Y.length){let pe=$l(le,b);if(pe){if(g&&pe<g||h&&pe>h)return;F(pe);}}},W=()=>{A(true);},B=()=>{A(false),D.length!==Y.length?L(ma(K,b)):$l(D,b)||L(ma(K,b));},Z=()=>{w||V(true);},ue=()=>{!w&&y==="picker"&&v&&V(true);};return jsxs("div",{className:u(xv({size:s}),e),children:[t&&jsxs("label",{htmlFor:P,className:u(IN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&I,onOpenChange:V,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:M,id:P,type:"text",inputMode:y==="text"?"numeric":void 0,value:D,onChange:y==="text"?j:void 0,onClick:ue,onFocus:W,onBlur:B,readOnly:y==="picker","aria-invalid":a,"aria-describedby":$?N:n?E:void 0,"aria-required":o,disabled:w,placeholder:C||b.toLowerCase(),className:u(DN({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),y==="picker"&&v&&"cursor-pointer",l),style:{borderColor:O||v&&I?"var(--color-foreground)":void 0},...T}),v&&jsx("button",{type:"button",onClick:Z,disabled:w,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(HN({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(to,{mode:"single",selected:K??void 0,onSelect:z,disabled:U=>!!(g&&U<g||h&&U>h),defaultMonth:K??void 0,showMonthAndYearPickers:true})})]}),n&&!$&&jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),$&&jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ks.displayName="DatePicker";var AN=Ks,zN=Ks;var yv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ON=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}}),BN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Rv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:y,fullWidth:x=false,id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,E=X.useRef(null),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),[D,L]=X.useState(f??null),I=m!==void 0?m:D,V=a&&r,O=_=>v===24?_:_===0?12:_>12?_-12:_,A=_=>_>=12?"PM":"AM",K=(_,oe)=>oe==="AM"?_===12?0:_:_===12?12:_+12,[$,G]=X.useState(I?String(O(I.hour)).padStart(2,"0"):""),[Y,F]=X.useState(I?String(I.minute).padStart(2,"0"):""),[z,j]=X.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[W,B]=X.useState(I?A(I.hour):"AM"),[Z,ue]=X.useState(false);X.useEffect(()=>{m!==void 0&&(m?(G(String(O(m.hour)).padStart(2,"0")),F(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),B(A(m.hour))):(G(""),F(""),j("")));},[m,v]);let U=(_,oe,q,De)=>{let de=parseInt(_,10),je=parseInt(oe,10),We=b?parseInt(q,10):void 0;if(isNaN(de)||isNaN(je)||b&&isNaN(We)){m===void 0&&L(null),p?.(null);return}let ve={hour:v===12?K(de,De):de,minute:je,...b&&We!==void 0&&{second:We}};m===void 0&&L(ve),p?.(ve);},Ce=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);G(oe);let q=v===24?23:12,De=v===24?0:1;if(oe.length===2){let de=parseInt(oe,10);de>=De&&de<=q&&(N.current?.focus(),N.current?.select());}},Q=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);if(F(oe),oe.length===2){let q=parseInt(oe,10);q>=0&&q<=59&&(b?(S.current?.focus(),S.current?.select()):v===12&&H.current?.focus());}},le=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);j(oe),oe.length===2&&v===12&&H.current?.focus();},Fe=()=>{if($){let _=parseInt($,10),oe=v===24?23:12,De=Math.min(Math.max(_,v===24?0:1),oe),de=String(De).padStart(2,"0");G(de),U(de,Y,z,W);}},pe=()=>{if(Y){let _=parseInt(Y,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");F(q),U($,q,z,W);}},Ct=()=>{if(z){let _=parseInt(z,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");j(q),U($,Y,q,W);}},bt=()=>{let _=W==="AM"?"PM":"AM";B(_),U($,Y,z,_);},yn=_=>{let oe=_.key.toLowerCase();oe==="a"?(_.preventDefault(),W!=="AM"&&(B("AM"),U($,Y,z,"AM"))):oe==="p"?(_.preventDefault(),W!=="PM"&&(B("PM"),U($,Y,z,"PM"))):oe==="arrowup"||oe==="arrowdown"?(_.preventDefault(),bt()):oe==="arrowleft"&&(_.preventDefault(),b?(S.current?.focus(),S.current?.select()):(N.current?.focus(),N.current?.select()));},Ke=(_,oe)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let q=_.key==="ArrowUp"?1:-1;if(oe==="hour"){let De=parseInt($,10)||0,de=v===24?23:12,je=v===24?0:1,We=De+q;We>de&&(We=je),We<je&&(We=de);let Gn=String(We).padStart(2,"0");G(Gn),U(Gn,Y,z,W);}else if(oe==="minute"){let de=(parseInt(Y,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");F(je),U($,je,z,W);}else if(oe==="second"){let de=(parseInt(z,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");j(je),U($,Y,je,W);}}_.key==="ArrowRight"&&(_.preventDefault(),oe==="hour"?(N.current?.focus(),N.current?.select()):oe==="minute"&&b?(S.current?.focus(),S.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),oe==="minute"?(E.current?.focus(),E.current?.select()):oe==="second"&&(N.current?.focus(),N.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(oe==="minute"?E.current?.focus():oe==="second"&&N.current?.focus());},Tt=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",y&&"cursor-not-allowed");return jsxs("div",{ref:R,className:u(yv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:M,className:u(BN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(ON({size:s,isInvalid:a,disabled:y,fullWidth:x}),l),style:{borderColor:Z?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||ue(false);},children:[jsx("input",{ref:E,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:$,onChange:Ce,onBlur:Fe,onKeyDown:_=>Ke(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":V?P:n?k:void 0,"aria-required":o,disabled:y,className:Tt}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:N,type:"text",inputMode:"numeric",placeholder:"mm",value:Y,onChange:Q,onBlur:pe,onKeyDown:_=>Ke(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:y,className:Tt}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"ss",value:z,onChange:le,onBlur:Ct,onKeyDown:_=>Ke(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:y,className:Tt})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:bt,onKeyDown:yn,disabled:y,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",y&&"cursor-not-allowed"),"aria-label":"AM/PM",children:W})]}),n&&!V&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Rv.displayName="TimeField";var Cv=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"}}),Tv=X.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],y=(w,C)=>{C&&C(),l&&l(w);},x=w=>jsxs("button",{type:"button",disabled:i||w.isDisabled,onClick:()=>y(w.key,w.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:b),"aria-label":w.label,children:[w.icon&&jsx("span",{className:v,children:w.icon}),c&&jsx("span",{children:w.label})]},w.key);return jsxs("div",{ref:f,role:"group",className:u(Cv({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(w=>d?d(w):x(w)),g.length>0&&jsxs(Cn,{children:[jsx(Tn,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(Mn,{align:"end",children:g.map(w=>jsxs($t,{disabled:w.isDisabled,onClick:()=>y(w.key,w.onPress),children:[w.icon&&jsx("span",{className:u(v,"mr-2"),children:w.icon}),w.label]},w.key))})]})]})});Tv.displayName="ActionGroup";var Pv=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"}}),GN=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}}),Ev=X.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(Pv({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:u(GN({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));Ev.displayName="StatusLight";var Lv=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"}}),Sv=X.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Lv({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(Nt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});Sv.displayName="ActionBar";var Dv=X.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));Dv.displayName="ActionBarButton";var Vv=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"}}),Av=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 zv({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),[h,b]=X.useState(null),[v,y]=X.useState(null),x=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),w=M=>{if(a==="none")return;let k;a==="single"?k=x.has(M)?new Set:new Set([M]):(k=new Set(x),k.has(M)?k.delete(M):k.add(M)),o||g(k),s?.(k);},C=(M,k)=>{b(k),M.dataTransfer.effectAllowed="move";},R=(M,k)=>{M.preventDefault(),h!==k&&y(k);},T=()=>{if(h&&v&&h!==v){let M=r.findIndex(N=>N.key===h),k=r.findIndex(N=>N.key===v),P=[...r],[E]=P.splice(M,1);P.splice(k,0,E),l?.(P);}b(null),y(null);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Vv({variant:t,size:n,className:e})),...f,children:r.map(M=>{let k=x.has(M.key),P=h===M.key,E=v===M.key;return d?jsx("div",{role:"option","aria-selected":k,onClick:()=>w(M.key),children:d(M,k)},M.key):jsxs("div",{role:"option","aria-selected":k,"aria-disabled":M.isDisabled,draggable:i&&!M.isDisabled,onDragStart:N=>C(N,M.key),onDragOver:N=>R(N,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&w(M.key),className:u(Av({variant:t,size:n,isSelected:k,isDisabled:M.isDisabled}),P&&"opacity-50",E&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsx(Check,{className:"h-3 w-3"})}),M.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:M.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:M.label}),M.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:M.description})]})]},M.key)})})}zv.displayName="ListView";var Ov=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"}}),XN=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"}}),qN=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Bv=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,y]=X.useState(o),x=r!==void 0,w=x?r:v,C=X.useRef(null),[R,T]=X.useState(false),[M,k]=X.useState(null),P=(A,K)=>{if(!C.current)return w[0];let $=C.current.getBoundingClientRect(),G;t==="horizontal"?G=(A-$.left)/$.width:G=1-(K-$.top)/$.height,G=Math.max(0,Math.min(1,G));let Y=i+G*(l-i),F=Math.round(Y/c)*c;return Math.max(i,Math.min(l,F))},E=(A,K)=>{let $=[...w];$[K]=A,K===0&&A>w[1]&&($[0]=w[1]),K===1&&A<w[0]&&($[1]=w[0]),x||y($),a?.($);},N=(A,K)=>{d||(A.preventDefault(),T(true),k(K),A.target.setPointerCapture(A.pointerId));},S=A=>{if(!R||M===null||d)return;let K=P(A.clientX,A.clientY);E(K,M);},H=()=>{R&&(T(false),k(null),s?.(w));},D=A=>{if(d)return;let K=P(A.clientX,A.clientY),$=Math.abs(w[0]-K),G=Math.abs(w[1]-K),Y=$<=G?0:1;E(K,Y);let F=[...w];F[Y]=K,s?.(F);},L=(A,K)=>{if(d)return;let $=w[K];switch(A.key){case "ArrowRight":case "ArrowUp":A.preventDefault(),$=Math.min(l,w[K]+c);break;case "ArrowLeft":case "ArrowDown":A.preventDefault(),$=Math.max(i,w[K]-c);break;case "Home":A.preventDefault(),$=i;break;case "End":A.preventDefault(),$=l;break;default:return}E($,K);let G=[...w];G[K]=$,s?.(G);},I=A=>(A-i)/(l-i)*100,V={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],O={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(w[0])}),jsx("span",{children:f(w[1])})]}),jsxs("div",{ref:b,className:u(Ov({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(XN({orientation:t,size:n})),onClick:D,children:jsx("div",{className:u("absolute rounded-full",V,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(w[0])}%`,right:`${100-I(w[1])}%`,top:0,bottom:0}:{bottom:`${I(w[0])}%`,top:`${100-I(w[1])}%`,left:0,right:0}})}),w.map((A,K)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":A,"aria-orientation":t||void 0,"aria-disabled":d,className:u(qN({size:n}),R&&M===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(A)}% - ${O/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(A)}% - ${O/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:$=>N($,K),onPointerMove:S,onPointerUp:H,onPointerCancel:H,onKeyDown:$=>L($,K)},K)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:w[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:w[1]})]})]})]})});Bv.displayName="RangeSlider";var Xl=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"}}),tk=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"}}),nk={help:HelpCircle,info:Info,warning:AlertCircle},$v=X.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=X.useState(false),[b,v]=X.useState(false),[y,x]=X.useState({top:0,left:0}),w=X.useRef(null),C=X.useRef(null),R=i!==void 0?i:g,T=X.useCallback(E=>{i===void 0&&h(E),l?.(E);},[i,l]);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!R||!w.current)return;let E=()=>{let N=w.current.getBoundingClientRect(),S=C.current?.getBoundingClientRect(),H=S?.width||288,D=S?.height||100,L=8,I=0,V=0;switch(a){case "top":I=N.top-D-L,V=N.left+N.width/2-H/2;break;case "bottom":I=N.bottom+L,V=N.left+N.width/2-H/2;break;case "left":I=N.top+N.height/2-D/2,V=N.left-H-L;break;case "right":I=N.top+N.height/2-D/2,V=N.right+L;break}if(a==="top"||a==="bottom")switch(s){case "start":V=N.left;break;case "center":V=N.left+N.width/2-H/2;break;case "end":V=N.right-H;break}if(a==="left"||a==="right")switch(s){case "start":I=N.top;break;case "center":I=N.top+N.height/2-D/2;break;case "end":I=N.bottom-D;break}V=Math.max(8,Math.min(V,window.innerWidth-H-8)),I=Math.max(8,Math.min(I,window.innerHeight-D-8)),x({top:I,left:V});};return E(),requestAnimationFrame(E),window.addEventListener("resize",E),window.addEventListener("scroll",E,true),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true);}},[R,a,s]),X.useEffect(()=>{if(!R)return;let E=N=>{C.current&&!C.current.contains(N.target)&&w.current&&!w.current.contains(N.target)&&T(false);};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[R,T]),X.useEffect(()=>{if(!R)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[R,T]);let M=nk[e??"help"],k=()=>{T(!R);},P=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?X.isValidElement(o)?X.cloneElement(o,{ref:w,onClick:E=>{o.props.onClick?.(E),k();}}):jsx("button",{ref:w,type:"button",onClick:k,className:u(Xl({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},type:"button",onClick:k,className:u(Xl({variant:e,size:t}),m),"aria-label":"Help",children:jsx(M,{className:"h-full w-full"})}),b&&R&&Ba.createPortal(jsxs("div",{ref:C,className:u(tk({size:t}),f),style:{position:"fixed",top:y.top,left:y.left,transformOrigin:P()},role:"tooltip",children:[n&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});$v.displayName="ContextualHelp";var Uv=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),ql=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function jv({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=X.useState(new Set),v=X.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),y=R=>{if(s==="none")return;let T;s==="single"?T=v.has(R)?new Set:new Set([R]):(T=new Set(v),T.has(R)?T.delete(R):T.add(R)),a||b(T),i?.(T);},x=(R,T)=>{T.stopPropagation(),c?.(R);},w=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxs("div",{role:"group","aria-label":d,className:u(Uv({spacing:t}),e),...g,children:[w.map(R=>{let T=v.has(R.key),M=s!=="none";return jsxs("span",{role:M?"button":void 0,tabIndex:M&&!R.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!R.isDisabled&&y(R.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!R.isDisabled&&(k.preventDefault(),y(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(ql({variant:R.color?void 0:n,size:r,isSelected:T,isDisabled:R.isDisabled}),M&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsx("button",{type:"button",onClick:k=>x(R.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxs("span",{className:u(ql({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}jv.displayName="TagGroup";var Yv=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"}}),Xv=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 qv({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),h=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let y;a==="single"?y=h.has(v)?new Set:new Set([v]):(y=new Set(h),y.has(v)?y.delete(v):y.add(v)),o||g(y),s?.(y);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(Yv({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let y=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":y,onClick:()=>b(v.key),children:d(v,y)},v.key):jsxs("div",{role:"gridcell","aria-selected":y,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(Xv({variant:l,size:c,isSelected:y,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&y&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}qv.displayName="GridList";var Qv=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),sk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),ik=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),Xs=X.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let y=(n-r)/(o-r),x=s!==void 0?(s-r)/(o-r):.25,w=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?y<=x?"bg-red-500":y<=w?"bg-yellow-500":"bg-green-500":y>=w?"bg-red-500":y>=x?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(Qv({size:t})),children:jsx("div",{className:u(sk({variant:f})),children:jsx("div",{className:u(ik({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Xs.displayName="Meter";var Jv=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Jv.displayName="DiskUsageMeter";var eh=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));eh.displayName="BatteryMeter";var th=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Zs=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},nh=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},rh=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},oh=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),ah=X.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=X.useCallback(A=>{let K=rh(A);return K?nh(...K):[0,1,1]},[]),[v,y]=X.useState(()=>b(r||o)),x=e??v[0],w=t??v[1],C=n??v[2];X.useEffect(()=>{if(r){let A=b(r);y(A);}},[r,b]);let R=X.useCallback((A,K)=>{if(l||!p.current)return;let $=p.current.getBoundingClientRect(),G=Math.max(0,Math.min(1,(A-$.left)/$.width)),Y=Math.max(0,Math.min(1,(K-$.top)/$.height)),F=G,z=1-Y;t===void 0&&n===void 0&&y([x,F,z]),a?.({hue:x,saturation:F,brightness:z});let j=Zs(x,F,z);s?.(oh(...j));},[l,x,t,n,a,s]),T=A=>{l||(A.preventDefault(),h(true),A.target.setPointerCapture(A.pointerId),R(A.clientX,A.clientY));},M=A=>{g&&R(A.clientX,A.clientY);},k=A=>{h(false),A.target.releasePointerCapture(A.pointerId);},[P,E,N]=Zs(x,1,1),S=`rgb(${P}, ${E}, ${N})`,H=w*100,D=(1-C)*100,[L,I,V]=Zs(x,w,C),O=`rgb(${L}, ${I}, ${V})`;return jsx("div",{ref:f,className:u(th({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:S},onPointerDown:T,onPointerMove:M,onPointerUp:k,onPointerLeave:k,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${D}% - ${c/2}px)`,backgroundColor:O,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});ah.displayName="ColorArea";var ih=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"}}),uk=`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")`,sh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",lh=X.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,y]=X.useState(t??b()),x=e??v,w=r==="hue"?x/360:x,C=X.useCallback((S,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),L=a!=="vertical",I;L?I=Math.max(0,Math.min(1,(S-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let V=r==="hue"?I*360:I;e===void 0&&y(V),n?.(V);},[i,a,r,e,n]),R=S=>{i||(S.preventDefault(),h(true),S.target.setPointerCapture(S.pointerId),C(S.clientX,S.clientY));},T=S=>{g&&C(S.clientX,S.clientY);},M=S=>{h(false),S.target.releasePointerCapture(S.pointerId);},k=()=>{let S=a!=="vertical",H=S?"to right":"to top";switch(r){case "hue":return S?sh:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return sh}},P=()=>r==="hue"?`hsl(${x}, 100%, 50%)`:o,E=a!=="vertical",N=w*100;return jsx("div",{ref:f,className:u(ih({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?uk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...E?{left:`calc(${N}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${N}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:P(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});lh.displayName="ColorSlider";var ch=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"}}),fk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},dh=X.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=X.useRef(null),[f,p]=X.useState(false),[g,h]=X.useState(t),b=e??g,v=X.useCallback((R,T)=>{if(o||!m.current)return;let M=m.current.getBoundingClientRect(),k=M.width/2,P=R-M.left,E=T-M.top,N=fk(P,E,k);e===void 0&&h(N),n?.(N);},[o,e,n]),y=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},x=R=>{f&&v(R.clientX,R.clientY);},w=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let T=0;T<=360;T+=30)R.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsx("div",{ref:d,className:u(ch({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:y,onPointerMove:x,onPointerUp:w,onPointerLeave:w,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(gk,{hue:b,innerRadius:a,thumbSize:s})]})})});dh.displayName="ColorWheel";var gk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var ph=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),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"}}),fh=X.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:y,...x},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(t),k=e!==void 0?e:T,P=X.useRef(null);X.useImperativeHandle(w,()=>P.current);let E=k.length>0,N=C&&(a.length>0||s.length>0||l.length>0||E),S=A=>{e===void 0&&M(A),n?.(A);},H=()=>{S(""),P.current?.focus();},D=A=>{A?.preventDefault(),k.trim()&&(r?.(k.trim()),R(false));},L=A=>{S(A.label),o?.(A),R(false);},I=A=>{S(A),r?.(A),R(false);},V=A=>{S(A),r?.(A),R(false);},O=X.useMemo(()=>{let A={};return a.forEach(K=>{let $=K.category||"Results";A[$]||(A[$]=[]),A[$].push(K);}),A},[a]);return jsxs(ot,{open:N,onOpenChange:R,children:[jsx(an,{children:jsxs("form",{onSubmit:D,className:u(ph({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(Mo({size:g}),"ml-3")}),jsx("input",{ref:P,type:"text",value:k,onChange:A=>S(A.target.value),onFocus:()=>R(true),placeholder:v,disabled:y,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...x}),d&&E&&!y&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Mo({size:g})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:A=>A.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!E&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((A,K)=>jsxs("button",{type:"button",onClick:()=>I(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A}),jsx(ArrowRight,{className:u(Mo({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!E&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((A,K)=>jsxs("button",{type:"button",onClick:()=>V(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A})]},K))]}),E&&jsx("div",{className:"p-2",children:c?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(O).map(([A,K])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A})}),K.map($=>jsxs("button",{type:"button",onClick:()=>L($),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[$.icon||jsx(Search,{className:u(Mo({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:$.label}),$.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:$.description})]})]},$.id))]},A)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});fh.displayName="SearchBar";var gh={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"})},hh=X.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=X.useState(""),g=X.useRef(null),[h,b]=X.useState(false);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{e||p("");},[e]),X.useEffect(()=>{if(!e)return;let R=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),X.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let v=X.useMemo(()=>{let R={};return n.forEach(T=>{let M=T.category||"Results";R[M]||(R[M]=[]),R[M].push(T);}),R},[n]),y=R=>{R.onSelect?.(),c?.(R),t?.(false);},x=()=>{t?.(false);},w=f.length>0,C=!w&&r.length>0;return !h||!e?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:x}),jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X$1,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[C&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(R=>jsxs(Command.Item,{value:R.label,onSelect:()=>y(R),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:R.icon||gh[R.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:R.label}),R.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((T,M)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},R.id))]}),w&&Object.entries(v).map(([R,T])=>jsxs(Command.Group,{heading:R,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),T.map(M=>jsxs(Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>y(M),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:M.icon||gh[R]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:M.label}),M.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:M.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},M.id))]},R)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});hh.displayName="SpotlightSearch";function Ek(e="k"){let[t,n]=X.useState(false);return X.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var Rh=X.createContext(null),Qs=()=>{let e=X.useContext(Rh);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},zk=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=X.useState([]),[a,s]=X.useState(false),i=X.useRef(null),l=t!==void 0,c=l?t:r,d=X.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=X.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=X.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=X.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=X.useCallback(()=>{d([]);},[d]);return jsx(Rh.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},wh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));wh.displayName="NotificationCenter";var Ch=X.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=Qs(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Ch.displayName="NotificationCenterTrigger";var Th=X.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=Qs(),[p,g]=X.useState(false),h=X.useRef(null),[b,v]=X.useState({top:0,left:0});return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!i||!f.current||!h.current)return;let y=()=>{if(!f.current||!h.current)return;let x=f.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=x.bottom+n,R=x.left;t==="center"?R=x.left+x.width/2-w.width/2:t==="end"&&(R=x.right-w.width),R+w.width>window.innerWidth-16&&(R=window.innerWidth-w.width-16),R<16&&(R=16),v({top:C,left:R});};return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,true),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,true);}},[i,f,t,n]),X.useEffect(()=>{if(!i)return;let y=w=>{h.current&&!h.current.contains(w.target)&&f.current&&!f.current.contains(w.target)&&l(false);},x=w=>{w.key==="Escape"&&l(false);};return document.addEventListener("mousedown",y),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",x);}},[i,l,f]),!p||!i?null:Ba.createPortal(jsxs("div",{ref:y=>{h.current=y,typeof s=="function"?s(y):s&&(s.current=y);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X$1,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:r})]}):c.map(y=>jsx(ec,{notification:y},y.id)))})]}),document.body)});Th.displayName="NotificationCenterContent";var Ok={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},Bk={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},ec=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=Qs(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=Bk[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let y=typeof v=="string"?new Date(v):v,w=new Date().getTime()-y.getTime(),C=Math.floor(w/6e4),R=Math.floor(w/36e5),T=Math.floor(w/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":T<7?T+"d ago":y.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",Ok[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};ec.displayName="NotificationItem";var Mh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Mh.displayName="NotificationList";var Nh=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"}}),_k={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},kh=X.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=X.useState(true),[v,y]=X.useState(false);X.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),X.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{x();},d);return ()=>clearTimeout(R)}},[d,h]);let x=()=>{y(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let w=_k[t],C=r?o!==void 0?o:w?jsx(w,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(Nh({variant:n,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:x,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});kh.displayName="Banner";var fa=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:bg-primary hover:text-primary-foreground hover:border-primary"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),qk=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),nc=X.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,y]=X.useState(false),x=o&&o.length>0,w=k=>{x&&y(!v),p?.(k);},C=k=>{k.onClick?.(),y(false);},R={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},T=l==="rotate"&&v?"rotate-45":"",M=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&fa({position:m})),children:[x&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((k,P)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${P*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsx("a",{href:k.href,className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsx("button",{type:"button",onClick:()=>C(k),className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxs("button",{ref:b,type:"button",onClick:w,disabled:g,className:u(fa({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":x?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(qk({size:d}),T,M,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),x&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>y(false)})]})});nc.displayName="FloatingActionButton";var Zk=nc;var Dh=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"}}),Eh=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Hh=X.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=X.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=x=>{x.disabled||(p||f(x.key),s?.(x.key));},b=x=>t==="filled"?x?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":x?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},y=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(Dh({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(x=>{let w=g===x.key,C=i==="all"||i==="active"&&w,R=w&&x.activeIcon?x.activeIcon:x.icon;if(l)return jsx("div",{onClick:()=>h(x),className:u(Eh({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:l(x,w)},x.key);let T=jsxs("div",{onClick:()=>!x.href&&h(x),className:u(Eh({variant:t}),b(w),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":w?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),h(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:R}),x.badge!==void 0&&x.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:x.badge>99?"99+":x.badge}),x.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&x.label&&jsx("span",{className:u(y(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsx("a",{href:x.href,onClick:()=>h(x),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(w)),children:T},x.key):T})})});Hh.displayName="BottomNavigation";var Jk="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",Vh=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Ah=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsx(Drawer.Trigger,{asChild:true,children:n}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:Jk,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Vh({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Ah.displayName="ActionSheet";var Oh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),oc=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"}}),Bh=X.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=X.useRef(null),[p,g]=X.useState(0),[h,b]=X.useState(false),v=X.useRef(0),y=X.useRef(0),x=n.length*(o==="sm"?64:o==="lg"?96:80),w=r.length*(o==="sm"?64:o==="lg"?96:80),C=P=>{i||(b(true),v.current=P.touches[0].clientX,y.current=p);},R=P=>{if(!h||i)return;let N=P.touches[0].clientX-v.current,S=y.current+N;(S>0&&n.length===0||S<0&&r.length===0)&&(S=0),S>x?S=x+(S-x)*.3:S<-w&&(S=-w+(S+w)*.3),g(S);},T=()=>{if(!h)return;b(false);let P=f.current?.offsetWidth||0,E=Math.abs(p)/P;if(l&&E>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>x*a&&n.length>0?(g(x),s?.("right")):p<-w*a&&r.length>0?(g(-w),s?.("left")):g(0);},M=(P,E)=>{P.onAction?.(),s?.(E,P.key),g(0);},k=()=>{g(0);};return jsxs("div",{ref:m,className:u(Oh({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:x},children:n.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"right"),className:u(oc({variant:P.variant,size:o})),style:{opacity:Math.min(1,p/x)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:w},children:r.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"left"),className:u(oc({variant:P.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/w)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:T,onClick:p!==0?k:void 0,children:c})]})});Bh.displayName="SwipeActions";var Kh=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),nP=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"}}),$h=X.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=X.useRef(null),[b,v]=X.useState(0),[y,x]=X.useState("idle"),w=X.useRef(0),C=X.useRef(false),R=()=>l||y==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,T=N=>{R()&&(w.current=N.touches[0].clientY,C.current=true);},M=N=>{if(!C.current||!R())return;let H=N.touches[0].clientY-w.current;if(H<0){v(0),x("idle");return}let L=Math.min(H*.5,o);v(L),x(L>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,y==="ready"){x("refreshing"),v(r*.6);try{await n();}finally{x("idle"),v(0);}}else x("idle"),v(0);},P={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],E=()=>{if(y==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(P,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let N=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(P,"text-muted-foreground transition-transform"),style:{transform:`rotate(${N}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:y==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(Kh({variant:t,className:e})),...p,children:[jsx("div",{className:u(nP({size:i}),"z-10",y==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:E()}),jsx("div",{ref:h,className:u("transition-transform duration-200",y==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:k,children:f})]})});$h.displayName="PullToRefresh";var Gr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),rP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Gh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:rP,custom:i,transition:Gr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});Gh.displayName="Fade";var oP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},Uh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=X.useMemo(()=>oP(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Uh.displayName="Slide";var aP={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"},sP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},jh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:sP,custom:i,transition:Gr(n,r,o),className:u(a),style:{transformOrigin:aP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});jh.displayName="Scale";var Wh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Wh.displayName="Collapse";var _h=X.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});_h.displayName="Expand";var Yh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Yh.displayName="Rotate";var Xh=X.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:r?180:0},transition:Gr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});Xh.displayName="Flip";var qh=X.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=X.useState([]),l=X.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(y=>[...y,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});qh.displayName="Ripple";var Zh=X.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Zh.displayName="Bounce";var cP={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},Qh=X.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:cP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Qh.displayName="Shake";var dP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},Jh=X.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:u(t&&dP[n],r),children:e}));Jh.displayName="Pulse";var ex=X.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ex.displayName="Wiggle";var tx=X.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=X.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});tx.displayName="Pop";var bP=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},nx=X.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=X.useRef(null),g=useInView(p,{once:true}),[h,b]=X.useState(!l);X.useEffect(()=>{if(l&&g){let x=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(x)}},[l,g,c]);let v=useMotionValue(t),y=useTransform(v,x=>bP(x,r,s,i));return X.useEffect(()=>{if(h){let x=animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>x.stop()}},[h,e,n,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:y}),a]})})});nx.displayName="Counter";var rx=X.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=X.useState(""),[b,v]=X.useState(0),[y,x]=X.useState(false),[w,C]=X.useState(false),R=X.useRef(null),T=useInView(R,{once:true}),[M,k]=X.useState(!l);return X.useEffect(()=>{if(l&&T){let P=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(P)}},[l,T,n]),X.useEffect(()=>{if(!M||w)return;let P=p[b],E;return y?g.length>0?E=setTimeout(()=>{h(g.slice(0,-1));},i):(x(false),v(N=>(N+1)%p.length)):g.length<P.length?E=setTimeout(()=>{h(P.slice(0,g.length+1));},t):b<p.length-1||s?E=setTimeout(()=>{x(true);},r):(C(true),m?.()),()=>clearTimeout(E)},[M,g,b,y,w,p,t,i,r,s,m]),jsxs("span",{ref:R,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});rx.displayName="Typewriter";var ox=X.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=X.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,y)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&y<p.length-1&&"\xA0"]},y))})})});ox.displayName="TextReveal";var ax=X.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=X.useState(0);X.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});ax.displayName="WordRotate";var cx=X.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=X.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});cx.displayName="ScrollReveal";var dx=X.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsx(hP,{progress:f,position:e})]})});dx.displayName="ScrollProgress";var hP=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=X.useState(0);return X.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},ux=X.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=X.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});ux.displayName="Parallax";var fx=X.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsx("style",{children:`
|
|
56
56
|
@keyframes shimmer-right {
|
|
57
57
|
0% { transform: translateX(-100%); }
|
|
58
58
|
100% { transform: translateX(100%); }
|
|
@@ -69,5 +69,5 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
69
69
|
0% { transform: translateY(-100%); }
|
|
70
70
|
100% { transform: translateY(100%); }
|
|
71
71
|
}
|
|
72
|
-
`})]})});Cx.displayName="Shimmer";var LP={sm:24,md:40,lg:56,xl:80},SP={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"}},Tx=X.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=LP[t],d=SP[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});Tx.displayName="Checkmark";var Do={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},Mx=X.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=X.useCallback(()=>{let i={...Do,...n};So(i),o?.();},[n,o]);return X.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});Mx.displayName="Confetti";var DP=()=>{let e=X.useCallback(r=>{let o={...Do,...r};So(o);},[]),t=X.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);So({...Do,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),So({...Do,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=X.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&So({...Do,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&So({...Do,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},Nx=X.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});Nx.displayName="Glow";var wx=(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}),kx=X.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=X.useState([]);return X.useEffect(()=>{let d=Array.from({length:t},()=>wx(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=wx(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});kx.displayName="Sparkles";var Px=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));Px.displayName="H1";var Ex=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));Ex.displayName="H2";var Lx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Lx.displayName="H3";var Sx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));Sx.displayName="H4";var Dx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Dx.displayName="Paragraph";var Hx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Hx.displayName="Blockquote";var Ix=X.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));Ix.displayName="InlineCode";var Vx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));Vx.displayName="Lead";var Ax=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));Ax.displayName="Large";var zx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));zx.displayName="Small";var Ox=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));Ox.displayName="Muted";var Bx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));Bx.displayName="UL";function Ho(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function AP(){return Ho("(max-width: 767px)")}function zP(){return Ho("(min-width: 768px) and (max-width: 1023px)")}function OP(){return Ho("(min-width: 1024px)")}function BP(){return Ho("(prefers-color-scheme: dark)")?"dark":"light"}function FP(){return Ho("(prefers-reduced-motion: reduce)")}function ha(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function jP(){let{width:e}=ha();return e}function WP(){let{height:e}=ha();return e}function _P(e){let{width:t}=ha();return t>=e}function YP(){let{width:e}=ha();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function ZP(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function JP(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function nE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function rE(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function oE(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function iE(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function lE(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function dE(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function uE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function mE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function pE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function Kx(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function $x(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function fE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=Kx(e);useEffect(()=>{if(!r)return;let c=m=>{$x(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function gE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:Kx(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if($x(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function bE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function vE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function hE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function xE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function yE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function RE(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function wE(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function CE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function TE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function NE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function kE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function PE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var jx=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function EE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(jx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function LE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(jx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function SE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function DE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function Zx(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function HE(e=true){let{lock:t,unlock:n}=Zx();useEffect(()=>{e?t():n();},[e,t,n]);}function ey(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function VE(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function AE(e="200px"){let{ref:t,isIntersecting:n}=ey({rootMargin:e,once:true});return {ref:t,isVisible:n}}function zE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function OE(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function BE(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function FE(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function KE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function oy(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function UE(e){return oy({...e,defaultOpen:true})}function jE(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function WE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function _E(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function XE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function qE(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function ZE(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function QE(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function JE(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function nL(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(T=>{let M=[...T];return M.splice(C,0,R),M});},[]),i=useCallback((C,R)=>{n(T=>{let M=[...T];return M[C]=R,M});},[]),l=useCallback(C=>{n(R=>R.filter((T,M)=>M!==C));},[]),c=useCallback(C=>{n(R=>{let T=R.indexOf(C);return T===-1?R:R.filter((M,k)=>k!==T)});},[]),d=useCallback(C=>{n(R=>R.filter(T=>!C(T)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(T=>{let M=[...T],[k]=M.splice(C,1);return M.splice(R,0,k),M});},[]),v=useCallback((C,R)=>{n(T=>{let M=[...T];return [M[C],M[R]]=[M[R],M[C]],M});},[]),y=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:y,find:x,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,y,x,w])}function rL(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function oL(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function dy(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function sL(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=dy(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function iL(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function lL(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function fy(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function dL(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...fy(s,false),retryCount:r}}var vy=new Map,uL=300*1e3;function mL(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=vy.get(h);if(b&&Date.now()-b.timestamp<uL){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let y=await v.json(),x=o?o(y):y;vy.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let y=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:y,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function pL(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function pi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function gL(e,t){let[n,r]=useState(false);pi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function bL(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;pi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function vL(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);pi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function yy(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function hL(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function xL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function yL(e,t=true){let[n,r]=useState(false);return yy(()=>{r(true);},t?e:null),n}function RL(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let y=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(y,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function wL(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function CL(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var Ty=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function TL(e,t={}){let{events:n=Ty,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function ML(e,t,n,r={}){let{events:o=Ty,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function Ny(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function PL(){return Ny()==="visible"}function EL(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function LL(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function SL(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function Ly(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function VL(){let e=useRef(null),t=Ly(e);return {ref:e,...t}}function OL(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function BL(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function FL(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function KL(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function $L(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function UL(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let y=new SpeechSynthesisUtterance(v);y.voice=t,y.rate=n,y.pitch=r,y.volume=o,y.lang=a,y.onstart=()=>i(true),y.onend=()=>{i(false),c(false);},y.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(y);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function jL(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let x=new p;return x.lang=t,x.continuous=n,x.interimResults=r,x.onstart=()=>{a(true),m(null);},x.onend=()=>{a(false);},x.onerror=w=>{m(new Error(w.error)),a(false);},x.onresult=w=>{let C="",R="";for(let T=w.resultIndex;T<w.results.length;T++){let M=w.results[T];M.isFinal?R+=M[0].transcript:C+=M[0].transcript;}R&&i(T=>T+R),c(C);},f.current=x,()=>{x.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),y=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:y}}export{Lu as Accordion,Su as AccordionItem,Iv as ActionBar,Vv as ActionBarButton,kv as ActionGroup,jh as ActionSheet,Ky as Alert,Gy as AlertDescription,$y as AlertTitle,Ub as AreaChart,rm as AspectRatio,Ag as Autocomplete,Tr as Avatar,Mr as AvatarFallback,Sp as AvatarGroup,Jr as AvatarImage,ng as BackTop,_y as Badge,Ah as Banner,$b as BarChart,rh as BatteryMeter,Hx as Blockquote,$h as BottomNavigation,sx as Bounce,Yu as Breadcrumb,em as BreadcrumbEllipsis,qu as BreadcrumbItem,Zu as BreadcrumbLink,Xu as BreadcrumbList,Qu as BreadcrumbPage,Ju as BreadcrumbSeparator,ae as Button,Jc as ButtonGroup,Gf as COUNTRIES,to as Calendar,od as Card,ld as CardContent,id as CardDescription,cd as CardFooter,ad as CardHeader,sd as CardTitle,Zb as Carousel,Qb as CarouselContent,Jb as CarouselItem,Ll as CarouselNext,El as CarouselPrevious,Oo as Checkbox,Tx as Checkmark,Ap as Chip,$p as CircularProgress,Nt as CloseButton,Xg as Code,eb as CodeBlock,tx as Collapse,zu as Collapsible,Ou as CollapsibleContent,Ii as CollapsibleTrigger,lh as ColorArea,Hf as ColorPicker,uh as ColorSlider,qo as ColorSwatch,Sf as ColorSwatchPicker,ph as ColorWheel,Wi as Command,jR as CommandDialog,xp as CommandEmpty,yp as CommandGroup,vp as CommandInput,wp as CommandItem,hp as CommandList,Rp as CommandSeparator,Cp as CommandShortcut,Mx as Confetti,su as ContextMenu,gu as ContextMenuCheckboxItem,uu as ContextMenuContent,lu as ContextMenuGroup,fu as ContextMenuItem,cu as ContextMenuPortal,bu as ContextMenuSection,vu as ContextMenuSeparator,hu as ContextMenuShortcut,du as ContextMenuSub,pu as ContextMenuSubContent,mu as ContextMenuSubTrigger,iu as ContextMenuTrigger,jv as ContextualHelp,zb as CopyButton,ux as Counter,Of as CurrencyInput,ia as DEFAULT_COLORS,ER as DataTable,WN as DateField,jN as DateInput,Ks as DatePicker,kb as DateRangePicker,nh as DiskUsageMeter,Oi as Drawer,km as DrawerBody,Sm as DrawerClose,Mm as DrawerContent,Lm as DrawerDescription,Pm as DrawerFooter,Om as DrawerGroup,Bm as DrawerGroupLabel,Nm as DrawerHeader,Fm as DrawerInset,Im as DrawerMenu,zm as DrawerMenuButton,Vm as DrawerMenuItem,wR as DrawerProvider,Hm as DrawerSeparator,Cm as DrawerSidebar,Em as DrawerTitle,Dm as DrawerToggle,Tm as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,Id as DropdownGroup,$t as DropdownItem,E0 as DropdownLabel,Ti as DropdownSection,Dd as DropdownSeparator,Hd as DropdownShortcut,Vd as DropdownSub,zd as DropdownSubContent,Ad as DropdownSubTrigger,Tn as DropdownTrigger,Dl as EMOJIS,Vs as EMOJI_CATEGORIES,tv as EmojiPicker,tf as EmptyState,nx as Expand,lP as FAB,Qh as Fade,dl as FieldContext,kf as FileUpload,ox as Flip,oc as FloatingActionButton,zg as Form,cl as FormContext,Kg as FormControl,$g as FormDescription,Og as FormField,Bg as FormItem,Fg as FormLabel,Gg as FormMessage,Fb as FullCalendar,Nx as Glow,Jv as GridList,Px as H1,Ex as H2,Lx as H3,Sx as H4,Uu as HoverCard,Wu as HoverCardContent,ju as HoverCardTrigger,ob as Image,sv as ImageCropper,wl as ImageViewer,Hb as ImageViewerTrigger,Sb as InfiniteScroll,Ix as InlineCode,Pa as Input,jp as InputOTP,Wp as InputOTPGroup,Yp as InputOTPSeparator,_p as InputOTPSlot,Yb as KanbanBoard,Vb as Kbd,Cr as Label,bh as LabeledValue,hh as LabeledValueGroup,Ax as Large,Vx as Lead,Kb as LineChart,eg as Link,zw as List,lf as ListItem,cf as ListItemText,Fv as ListView,db as Listbox,ub as ListboxItem,Mb as Loading,hb as LoadingOverlay,tl as MASK_PRESETS,Kf as MaskedInput,ig as Menubar,hg as MenubarCheckboxItem,bg as MenubarContent,cg as MenubarGroup,vg as MenubarItem,yg as MenubarLabel,lg as MenubarMenu,dg as MenubarPortal,mg as MenubarRadioGroup,xg as MenubarRadioItem,Rg as MenubarSeparator,wg as MenubarShortcut,ug as MenubarSub,gg as MenubarSubContent,fg as MenubarSubTrigger,pg as MenubarTrigger,Xs as Meter,cp as Modal,pp as ModalBody,up as ModalClose,ts as ModalContent,bp as ModalDescription,fp as ModalFooter,mp as ModalHeader,ji as ModalOverlay,Ui as ModalPortal,es as ModalRoot,gp as ModalTitle,dp as ModalTrigger,Ox as Muted,yb as NProgress,_f as Navbar,Yf as NavbarBrand,Xf as NavbarContent,qf as NavbarItem,Zf as NavbarLink,cm as NavigationMenu,fm as NavigationMenuContent,vm as NavigationMenuIndicator,um as NavigationMenuItem,bm as NavigationMenuLink,dm as NavigationMenuList,pm as NavigationMenuTrigger,zi as NavigationMenuViewport,Sh as NotificationCenter,Hh as NotificationCenterContent,Yk as NotificationCenterProvider,Dh as NotificationCenterTrigger,nc as NotificationItem,Ih as NotificationList,hv as NumberField,Np as NumberInput,Jm as Pagination,ep as PaginationContent,op as PaginationEllipsis,tp as PaginationItem,Za as PaginationLink,rp as PaginationNext,np as PaginationPrevious,Dx as Paragraph,yx as Parallax,Mp as PasswordInput,Uf as PhoneInput,Gb as PieChart,dx as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,_a as Progress,Zh as PullToRefresh,lx as Pulse,lv as QRCode,Ru as RadioGroup,wu as RadioGroupItem,$v as RangeSlider,Hp as Rating,vw as ResizableHandle,bw as ResizablePanel,gw as ResizablePanelGroup,rv as RichTextEditor,ax as Ripple,rx as Rotate,ex as Scale,ke as ScrollArea,xx as ScrollProgress,hx as ScrollReveal,Ch as SearchBar,Rv as SearchField,wf as SegmentedControl,Cf as SegmentedControlItem,Aa as Select,jn as Separator,ix as Shake,Xd as Sheet,Zd as SheetClose,eu as SheetContent,ou as SheetDescription,nu as SheetFooter,tu as SheetHeader,Qd as SheetOverlay,Li as SheetPortal,ru as SheetTitle,qd as SheetTrigger,Cx as Shimmer,Ha as Skeleton,Jh as Slide,Ua as Slider,zx as Small,rb as Snippet,pT as SortableList,kx as Sparkles,Na as Spinner,kh as SpotlightSearch,of as StatCard,Dv as StatusLight,Ng as Step,Tg as Steps,Yh as SwipeActions,fd as Switch,tb as TabbedCodeBlock,$m as Table,Um as TableBody,Xm as TableCaption,Ym as TableCell,jm as TableFooter,_m as TableHead,Gm as TableHeader,Wm as TableRow,$d as Tabs,jd as TabsContent,Gd as TabsList,Ud as TabsTrigger,Yv as TagGroup,Qp as TagInput,Xy as TextBadge,fv as TextField,px as TextReveal,gd as Textarea,cv as ThemeProvider,dv as ThemeToggle,Tv as TimeField,Vf as TimeInput,Pb as TimePicker,pf as Timeline,bf as TimelineContent,gf as TimelineItem,vf as TimelineOpposite,B0 as Toaster,Cu as Toggle,Mu as ToggleGroup,Nu as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,Wn as TooltipProvider,Yn as TooltipTrigger,Hg as Tree,mx as Typewriter,Bx as UL,Wg as User,HT as VirtualList,cx as Wiggle,fx as WordRotate,Hv as actionBarVariants,Nv as actionGroupVariants,Uh as actionSheetItemVariants,By as alertVariants,cs as applyMask,Vg as autocompleteInputVariants,Lp as avatarGroupVariants,tg as backTopVariants,Uy as badgeIndicatorVariants,Vh as bannerVariants,Kh as bottomNavigationVariants,Zc as buttonGroupVariants,qr as buttonVariants,S0 as calculatePasswordStrength,rd as cardVariants,Xb as carouselVariants,sa as chartContainerVariants,Vp as chipVariants,Kp as circularProgressVariants,Rm as closeButtonVariants,u as cn,Yg as codeVariants,oh as colorAreaVariants,dh as colorSliderVariants,Lf as colorSwatchPickerVariants,Ef as colorSwatchVariants,mh as colorWheelVariants,ql as contextualHelpTriggerVariants,Ab as copyButtonVariants,Af as currencyInputVariants,wv as datePickerVariants,Wd as defaultPasswordRequirements,Am as drawerMenuButtonVariants,ev as emojiPickerVariants,ef as emptyStateVariants,fa as fabVariants,Tf as fileUploadVariants,el as formatCurrency,ma as formatDate,is as formatFileSize,ds as formatPhoneNumber,Bb as fullCalendarVariants,Mf as getFileIcon,Ff as getMaskPlaceholder,D0 as getPasswordStrengthColor,H0 as getPasswordStrengthLabel,Qv as gridListItemVariants,Zv as gridListVariants,sh as hexToRgb,Zs as hsvToRgb,av as imageCropperVariants,gl as imageVariants,Rl as infiniteScrollLoaderVariants,yl as infiniteScrollVariants,Up as inputOTPVariants,mv as inputSizeVariants,Ib as kbdVariants,pv as labelSizeVariants,vh as labeledValueGroupVariants,gh as labeledValueVariants,Jf as linkVariants,sf as listItemVariants,qi as listVariants,Bv as listViewItemVariants,Ov as listViewVariants,lb as listboxItemVariants,ib as listboxVariants,vb as loadingOverlayVariants,Tb as loadingVariants,Bf as maskedInputVariants,th as meterVariants,Gi as modalContentVariants,Wf as navbarVariants,gm as navigationMenuLinkStyle,mm as navigationMenuTriggerStyle,xb as nprogressVariants,vv as numberFieldVariants,Gl as parseDate,zf as parseFormattedValue,fC as phoneInputVariants,qh as pullToRefreshVariants,Al as qrCodeVariants,Kv as rangeSliderVariants,Dp as ratingVariants,ih as rgbToHex,ah as rgbToHsv,nv as richTextEditorVariants,wh as searchBarVariants,yv as searchFieldVariants,yf as segmentedControlItemVariants,xf as segmentedControlVariants,Pd as selectVariants,Jd as sheetVariants,vd as skeletonVariants,nb as snippetVariants,fb as sortableItemVariants,pb as sortableListVariants,Xc as spinnerVariants,rf as statCardVariants,Sv as statusLightVariants,Mg as stepVariants,Cg as stepsVariants,sc as swipeActionVariants,_h as swipeActionsVariants,La as switchColors,Zl as tagGroupItemVariants,_v as tagGroupVariants,Zp as tagVariants,Yy as textBadgeVariants,uv as textFieldVariants,LN as themeToggleVariants,Cv as timeFieldVariants,If as timeInputVariants,ff as timelineItemVariants,mf as timelineVariants,$a as toggleVariants,Eg as treeItemVariants,Pg as treeVariants,nl as unmask,wL as useAnimatedValue,fy as useAsync,dL as useAsyncRetry,HE as useBodyScrollLock,_E as useBooleanToggle,_P as useBreakpoint,YP as useBreakpoints,vi as useButtonGroup,Is as useCarousel,dE as useClickOutside,uE as useClickOutsideMultiple,DP as useConfetti,pE as useCopy,mE as useCopyToClipboard,bL as useCountdown,XE as useCounter,WE as useCycle,nE as useDebounce,rE as useDebouncedCallback,oE as useDebouncedCallbackWithControls,xL as useDelayedValue,oy as useDisclosure,UE as useDisclosureOpen,BL as useDistance,PL as useDocumentIsVisible,Ny as useDocumentVisibility,EL as useDocumentVisibilityCallback,fR as useDrawer,KE as useElementSize,vE as useEventListener,hE as useEventListenerRef,mL as useFetch,bs as useFieldContext,EE as useFocusTrap,LE as useFocusTrapRef,ul as useFormContext,Ly as useFullscreen,VL as useFullscreenRef,OL as useGeolocation,fE as useHotkeys,gE as useHotkeysMap,RE as useHover,TE as useHoverDelay,CE as useHoverProps,wE as useHoverRef,TL as useIdle,ML as useIdleCallback,qE as useIncrementCounter,ey as useIntersectionObserver,VE as useIntersectionObserverRef,pi as useInterval,gL as useIntervalControls,OP as useIsDesktop,AP as useIsMobile,zP as useIsTablet,xE as useKeyPress,bE as useKeyPressed,ZT as useKeyboardShortcut,AE as useLazyLoad,nL as useList,ZP as useLocalStorage,yE as useLongPress,rL as useMap,$L as useMediaPermission,Ho as useMediaQuery,NE as useMouse,kE as useMouseElement,PE as useMouseElementRef,pL as useMutation,zE as useMutationObserver,OE as useMutationObserverRef,Js as useNotificationCenter,KL as useNotificationPermission,LL as useOnlineStatus,SL as useOnlineStatusCallback,FL as usePermission,BP as usePrefersColorScheme,FP as usePrefersReducedMotion,ZE as usePrevious,JE as usePreviousDistinct,QE as usePreviousWithInitial,iL as useQueue,RL as useRafLoop,oL as useRecord,BE as useResizeObserver,FE as useResizeObserverRef,Zx as useScrollLock,SE as useScrollPosition,sL as useSelection,JP as useSessionStorage,dy as useSet,jL as useSpeechRecognition,UL as useSpeechSynthesis,Fk as useSpotlight,CL as useSpringValue,lL as useStack,iE as useThrottle,lE as useThrottledCallback,yy as useTimeout,hL as useTimeoutControls,yL as useTimeoutFlag,vL as useTimer,jE as useToggle,WP as useWindowHeight,DE as useWindowScroll,ha as useWindowSize,jP as useWindowWidth,jg as userVariants,Nf as validateFile,QC as validators,Eb as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
72
|
+
`})]})});fx.displayName="Shimmer";var xP={sm:24,md:40,lg:56,xl:80},yP={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"}},gx=X.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=xP[t],d=yP[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});gx.displayName="Checkmark";var Do={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},bx=X.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=X.useCallback(()=>{let i={...Do,...n};So(i),o?.();},[n,o]);return X.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});bx.displayName="Confetti";var RP=()=>{let e=X.useCallback(r=>{let o={...Do,...r};So(o);},[]),t=X.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);So({...Do,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),So({...Do,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=X.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&So({...Do,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&So({...Do,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},vx=X.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});vx.displayName="Glow";var px=(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}),hx=X.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=X.useState([]);return X.useEffect(()=>{let d=Array.from({length:t},()=>px(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=px(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});hx.displayName="Sparkles";var xx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));xx.displayName="H1";var yx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));yx.displayName="H2";var Rx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Rx.displayName="H3";var wx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));wx.displayName="H4";var Cx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Cx.displayName="Paragraph";var Tx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Tx.displayName="Blockquote";var Mx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));Mx.displayName="InlineCode";var Nx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));Nx.displayName="Lead";var kx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));kx.displayName="Large";var Px=X.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));Px.displayName="Small";var Ex=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));Ex.displayName="Muted";var Lx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));Lx.displayName="UL";function Ho(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function MP(){return Ho("(max-width: 767px)")}function NP(){return Ho("(min-width: 768px) and (max-width: 1023px)")}function kP(){return Ho("(min-width: 1024px)")}function PP(){return Ho("(prefers-color-scheme: dark)")?"dark":"light"}function EP(){return Ho("(prefers-reduced-motion: reduce)")}function ha(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function IP(){let{width:e}=ha();return e}function VP(){let{height:e}=ha();return e}function AP(e){let{width:t}=ha();return t>=e}function zP(){let{width:e}=ha();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function FP(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function $P(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function jP(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function WP(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function _P(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function qP(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function ZP(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function JP(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function eE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function tE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function nE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function Dx(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function Hx(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function rE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=Dx(e);useEffect(()=>{if(!r)return;let c=m=>{Hx(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function oE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:Dx(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(Hx(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function aE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function sE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function iE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function lE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function cE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function dE(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function uE(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function mE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function pE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function gE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function bE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function vE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var Ax=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function hE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(Ax)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function xE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(Ax)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function yE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function RE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function $x(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function wE(e=true){let{lock:t,unlock:n}=$x();useEffect(()=>{e?t():n();},[e,t,n]);}function jx(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function TE(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function ME(e="200px"){let{ref:t,isIntersecting:n}=jx({rootMargin:e,once:true});return {ref:t,isVisible:n}}function NE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function kE(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function PE(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function EE(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function LE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function Xx(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function HE(e){return Xx({...e,defaultOpen:true})}function IE(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function VE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function AE(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function OE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function BE(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function FE(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function KE(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function $E(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function jE(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(T=>{let M=[...T];return M.splice(C,0,R),M});},[]),i=useCallback((C,R)=>{n(T=>{let M=[...T];return M[C]=R,M});},[]),l=useCallback(C=>{n(R=>R.filter((T,M)=>M!==C));},[]),c=useCallback(C=>{n(R=>{let T=R.indexOf(C);return T===-1?R:R.filter((M,k)=>k!==T)});},[]),d=useCallback(C=>{n(R=>R.filter(T=>!C(T)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(T=>{let M=[...T],[k]=M.splice(C,1);return M.splice(R,0,k),M});},[]),v=useCallback((C,R)=>{n(T=>{let M=[...T];return [M[C],M[R]]=[M[R],M[C]],M});},[]),y=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:y,find:x,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,y,x,w])}function WE(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function _E(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function ty(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function XE(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=ty(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function qE(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function ZE(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function ay(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function JE(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...ay(s,false),retryCount:r}}var ly=new Map,eL=300*1e3;function tL(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=ly.get(h);if(b&&Date.now()-b.timestamp<eL){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let y=await v.json(),x=o?o(y):y;ly.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let y=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:y,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function nL(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function mi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function oL(e,t){let[n,r]=useState(false);mi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function aL(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;mi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function sL(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);mi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function uy(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function iL(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function lL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function cL(e,t=true){let[n,r]=useState(false);return uy(()=>{r(true);},t?e:null),n}function dL(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let y=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(y,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function uL(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function mL(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var gy=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function pL(e,t={}){let{events:n=gy,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function fL(e,t,n,r={}){let{events:o=gy,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function vy(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function vL(){return vy()==="visible"}function hL(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function xL(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function yL(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function Ry(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function TL(){let e=useRef(null),t=Ry(e);return {ref:e,...t}}function kL(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function PL(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function EL(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function LL(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function SL(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function HL(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let y=new SpeechSynthesisUtterance(v);y.voice=t,y.rate=n,y.pitch=r,y.volume=o,y.lang=a,y.onstart=()=>i(true),y.onend=()=>{i(false),c(false);},y.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(y);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function IL(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let x=new p;return x.lang=t,x.continuous=n,x.interimResults=r,x.onstart=()=>{a(true),m(null);},x.onend=()=>{a(false);},x.onerror=w=>{m(new Error(w.error)),a(false);},x.onresult=w=>{let C="",R="";for(let T=w.resultIndex;T<w.results.length;T++){let M=w.results[T];M.isFinal?R+=M[0].transcript:C+=M[0].transcript;}R&&i(T=>T+R),c(C);},f.current=x,()=>{x.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),y=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:y}}export{Pu as Accordion,Eu as AccordionItem,Sv as ActionBar,Dv as ActionBarButton,Tv as ActionGroup,Ah as ActionSheet,Dy as Alert,Iy as AlertDescription,Hy as AlertTitle,Kb as AreaChart,tm as AspectRatio,Hg as Autocomplete,Tr as Avatar,Mr as AvatarFallback,Ep as AvatarGroup,Jr as AvatarImage,Jf as BackTop,Oy as Badge,kh as Banner,Bb as BarChart,eh as BatteryMeter,Tx as Blockquote,Hh as BottomNavigation,Zh as Bounce,Wu as Breadcrumb,Qu as BreadcrumbEllipsis,Yu as BreadcrumbItem,Xu as BreadcrumbLink,_u as BreadcrumbList,qu as BreadcrumbPage,Zu as BreadcrumbSeparator,ae as Button,Zc as ButtonGroup,Kf as COUNTRIES,to as Calendar,nd as Card,sd as CardContent,ad as CardDescription,id as CardFooter,rd as CardHeader,od as CardTitle,Yb as Carousel,Xb as CarouselContent,qb as CarouselItem,El as CarouselNext,Pl as CarouselPrevious,Oo as Checkbox,gx as Checkmark,Ip as Chip,Fp as CircularProgress,Nt as CloseButton,Wg as Code,Zg as CodeBlock,Wh as Collapse,Vu as Collapsible,Au as CollapsibleContent,Hi as CollapsibleTrigger,ah as ColorArea,Sf as ColorPicker,lh as ColorSlider,qo as ColorSwatch,Ef as ColorSwatchPicker,dh as ColorWheel,ji as Command,AR as CommandDialog,vp as CommandEmpty,hp as CommandGroup,gp as CommandInput,yp as CommandItem,bp as CommandList,xp as CommandSeparator,Rp as CommandShortcut,bx as Confetti,ou as ContextMenu,pu as ContextMenuCheckboxItem,cu as ContextMenuContent,su as ContextMenuGroup,mu as ContextMenuItem,iu as ContextMenuPortal,fu as ContextMenuSection,gu as ContextMenuSeparator,bu as ContextMenuShortcut,lu as ContextMenuSub,uu as ContextMenuSubContent,du as ContextMenuSubTrigger,au as ContextMenuTrigger,$v as ContextualHelp,Ib as CopyButton,nx as Counter,Af as CurrencyInput,ia as DEFAULT_COLORS,yR as DataTable,zN as DateField,AN as DateInput,Ks as DatePicker,Tb as DateRangePicker,Jv as DiskUsageMeter,zi as Drawer,Mm as DrawerBody,Em as DrawerClose,Cm as DrawerContent,Pm as DrawerDescription,Nm as DrawerFooter,Am as DrawerGroup,zm as DrawerGroupLabel,Tm as DrawerHeader,Om as DrawerInset,Dm as DrawerMenu,Vm as DrawerMenuButton,Hm as DrawerMenuItem,pR as DrawerProvider,Sm as DrawerSeparator,Rm as DrawerSidebar,km as DrawerTitle,Lm as DrawerToggle,wm as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,Dd as DropdownGroup,$t as DropdownItem,y0 as DropdownLabel,Ci as DropdownSection,Ld as DropdownSeparator,Sd as DropdownShortcut,Hd as DropdownSub,Vd as DropdownSubContent,Id as DropdownSubTrigger,Tn as DropdownTrigger,Sl as EMOJIS,Vs as EMOJI_CATEGORIES,Qb as EmojiPicker,Jp as EmptyState,_h as Expand,Zk as FAB,Gh as Fade,cl as FieldContext,Mf as FileUpload,Xh as Flip,nc as FloatingActionButton,Ig as Form,ll as FormContext,Og as FormControl,Bg as FormDescription,Vg as FormField,Ag as FormItem,zg as FormLabel,Fg as FormMessage,zb as FullCalendar,vx as Glow,qv as GridList,xx as H1,yx as H2,Rx as H3,wx as H4,$u as HoverCard,Uu as HoverCardContent,Gu as HoverCardTrigger,tb as Image,rv as ImageCropper,Rl as ImageViewer,Lb as ImageViewerTrigger,Pb as InfiniteScroll,Mx as InlineCode,Pa as Input,Gp as InputOTP,Up as InputOTPGroup,Wp as InputOTPSeparator,jp as InputOTPSlot,jb as KanbanBoard,Db as Kbd,Cr as Label,kx as Large,Nx as Lead,Ob as LineChart,Zf as Link,Pw as List,af as ListItem,sf as ListItemText,zv as ListView,ib as Listbox,lb as ListboxItem,wb as Loading,gb as LoadingOverlay,el as MASK_PRESETS,Bf as MaskedInput,og as Menubar,gg as MenubarCheckboxItem,pg as MenubarContent,sg as MenubarGroup,fg as MenubarItem,vg as MenubarLabel,ag as MenubarMenu,ig as MenubarPortal,cg as MenubarRadioGroup,bg as MenubarRadioItem,hg as MenubarSeparator,xg as MenubarShortcut,lg as MenubarSub,mg as MenubarSubContent,ug as MenubarSubTrigger,dg as MenubarTrigger,Xs as Meter,ip as Modal,up as ModalBody,cp as ModalClose,ts as ModalContent,fp as ModalDescription,mp as ModalFooter,dp as ModalHeader,Ui as ModalOverlay,Gi as ModalPortal,es as ModalRoot,pp as ModalTitle,lp as ModalTrigger,Ex as Muted,vb as NProgress,jf as Navbar,Wf as NavbarBrand,_f as NavbarContent,Yf as NavbarItem,Xf as NavbarLink,im as NavigationMenu,mm as NavigationMenuContent,gm as NavigationMenuIndicator,cm as NavigationMenuItem,fm as NavigationMenuLink,lm as NavigationMenuList,um as NavigationMenuTrigger,Ai as NavigationMenuViewport,wh as NotificationCenter,Th as NotificationCenterContent,zk as NotificationCenterProvider,Ch as NotificationCenterTrigger,ec as NotificationItem,Mh as NotificationList,gv as NumberField,Tp as NumberInput,Zm as Pagination,Qm as PaginationContent,np as PaginationEllipsis,Jm as PaginationItem,Za as PaginationLink,tp as PaginationNext,ep as PaginationPrevious,Cx as Paragraph,ux as Parallax,Cp as PasswordInput,$f as PhoneInput,Fb as PieChart,tx as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,_a as Progress,$h as PullToRefresh,Jh as Pulse,av as QRCode,xu as RadioGroup,yu as RadioGroupItem,Bv as RangeSlider,Sp as Rating,lw as ResizableHandle,iw as ResizablePanel,sw as ResizablePanelGroup,ev as RichTextEditor,qh as Ripple,Yh as Rotate,jh as Scale,ke as ScrollArea,dx as ScrollProgress,cx as ScrollReveal,fh as SearchBar,hv as SearchField,yf as SegmentedControl,Rf as SegmentedControlItem,Aa as Select,jn as Separator,Qh as Shake,_d as Sheet,Xd as SheetClose,Qd as SheetContent,nu as SheetDescription,eu as SheetFooter,Jd as SheetHeader,qd as SheetOverlay,Ei as SheetPortal,tu as SheetTitle,Yd as SheetTrigger,fx as Shimmer,Ha as Skeleton,Uh as Slide,Ua as Slider,Px as Small,eb as Snippet,oT as SortableList,hx as Sparkles,Na as Spinner,hh as SpotlightSearch,nf as StatCard,Ev as StatusLight,Cg as Step,Rg as Steps,Bh as SwipeActions,md as Switch,Qg as TabbedCodeBlock,Fm as Table,$m as TableBody,_m as TableCaption,Wm as TableCell,Gm as TableFooter,jm as TableHead,Km as TableHeader,Um as TableRow,Fd as Tabs,Gd as TabsContent,Kd as TabsList,$d as TabsTrigger,jv as TagGroup,qp as TagInput,Fy as TextBadge,uv as TextField,ox as TextReveal,pd as Textarea,sv as ThemeProvider,iv as ThemeToggle,Rv as TimeField,Hf as TimeInput,Mb as TimePicker,uf as Timeline,ff as TimelineContent,pf as TimelineItem,gf as TimelineOpposite,L0 as Toaster,Ru as Toggle,Cu as ToggleGroup,Tu as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,Wn as TooltipProvider,Yn as TooltipTrigger,Lg as Tree,rx as Typewriter,Lx as UL,Gg as User,TT as VirtualList,ex as Wiggle,ax as WordRotate,Lv as actionBarVariants,Cv as actionGroupVariants,Vh as actionSheetItemVariants,Ly as alertVariants,cs as applyMask,Dg as autocompleteInputVariants,Pp as avatarGroupVariants,Qf as backTopVariants,Vy as badgeIndicatorVariants,Nh as bannerVariants,Dh as bottomNavigationVariants,Xc as buttonGroupVariants,qr as buttonVariants,w0 as calculatePasswordStrength,td as cardVariants,Wb as carouselVariants,sa as chartContainerVariants,Hp as chipVariants,Bp as circularProgressVariants,xm as closeButtonVariants,u as cn,jg as codeVariants,th as colorAreaVariants,ih as colorSliderVariants,Pf as colorSwatchPickerVariants,kf as colorSwatchVariants,ch as colorWheelVariants,Xl as contextualHelpTriggerVariants,Hb as copyButtonVariants,If as currencyInputVariants,xv as datePickerVariants,Ud as defaultPasswordRequirements,Im as drawerMenuButtonVariants,Zb as emojiPickerVariants,Qp as emptyStateVariants,fa as fabVariants,wf as fileUploadVariants,Ji as formatCurrency,ma as formatDate,is as formatFileSize,ds as formatPhoneNumber,Ab as fullCalendarVariants,Cf as getFileIcon,Of as getMaskPlaceholder,C0 as getPasswordStrengthColor,T0 as getPasswordStrengthLabel,Xv as gridListItemVariants,Yv as gridListVariants,rh as hexToRgb,Zs as hsvToRgb,nv as imageCropperVariants,fl as imageVariants,yl as infiniteScrollLoaderVariants,xl as infiniteScrollVariants,$p as inputOTPVariants,cv as inputSizeVariants,Sb as kbdVariants,dv as labelSizeVariants,of as listItemVariants,Xi as listVariants,Av as listViewItemVariants,Vv as listViewVariants,ab as listboxItemVariants,ob as listboxVariants,fb as loadingOverlayVariants,Rb as loadingVariants,zf as maskedInputVariants,Qv as meterVariants,$i as modalContentVariants,Uf as navbarVariants,pm as navigationMenuLinkStyle,dm as navigationMenuTriggerStyle,bb as nprogressVariants,fv as numberFieldVariants,$l as parseDate,Vf as parseFormattedValue,aC as phoneInputVariants,Kh as pullToRefreshVariants,Vl as qrCodeVariants,Ov as rangeSliderVariants,Lp as ratingVariants,oh as rgbToHex,nh as rgbToHsv,Jb as richTextEditorVariants,ph as searchBarVariants,vv as searchFieldVariants,hf as segmentedControlItemVariants,vf as segmentedControlVariants,Nd as selectVariants,Zd as sheetVariants,gd as skeletonVariants,Jg as snippetVariants,ub as sortableItemVariants,db as sortableListVariants,_c as spinnerVariants,tf as statCardVariants,Pv as statusLightVariants,wg as stepVariants,yg as stepsVariants,oc as swipeActionVariants,Oh as swipeActionsVariants,La as switchColors,ql as tagGroupItemVariants,Uv as tagGroupVariants,Xp as tagVariants,By as textBadgeVariants,lv as textFieldVariants,RN as themeToggleVariants,yv as timeFieldVariants,Df as timeInputVariants,mf as timelineItemVariants,df as timelineVariants,$a as toggleVariants,Ng as treeItemVariants,Mg as treeVariants,tl as unmask,uL as useAnimatedValue,ay as useAsync,JE as useAsyncRetry,wE as useBodyScrollLock,AE as useBooleanToggle,AP as useBreakpoint,zP as useBreakpoints,bi as useButtonGroup,Is as useCarousel,JP as useClickOutside,eE as useClickOutsideMultiple,RP as useConfetti,nE as useCopy,tE as useCopyToClipboard,aL as useCountdown,OE as useCounter,VE as useCycle,jP as useDebounce,WP as useDebouncedCallback,_P as useDebouncedCallbackWithControls,lL as useDelayedValue,Xx as useDisclosure,HE as useDisclosureOpen,PL as useDistance,vL as useDocumentIsVisible,vy as useDocumentVisibility,hL as useDocumentVisibilityCallback,aR as useDrawer,LE as useElementSize,sE as useEventListener,iE as useEventListenerRef,tL as useFetch,bs as useFieldContext,hE as useFocusTrap,xE as useFocusTrapRef,dl as useFormContext,Ry as useFullscreen,TL as useFullscreenRef,kL as useGeolocation,rE as useHotkeys,oE as useHotkeysMap,dE as useHover,pE as useHoverDelay,mE as useHoverProps,uE as useHoverRef,pL as useIdle,fL as useIdleCallback,BE as useIncrementCounter,jx as useIntersectionObserver,TE as useIntersectionObserverRef,mi as useInterval,oL as useIntervalControls,kP as useIsDesktop,MP as useIsMobile,NP as useIsTablet,lE as useKeyPress,aE as useKeyPressed,$T as useKeyboardShortcut,ME as useLazyLoad,jE as useList,FP as useLocalStorage,cE as useLongPress,WE as useMap,SL as useMediaPermission,Ho as useMediaQuery,gE as useMouse,bE as useMouseElement,vE as useMouseElementRef,nL as useMutation,NE as useMutationObserver,kE as useMutationObserverRef,Qs as useNotificationCenter,LL as useNotificationPermission,xL as useOnlineStatus,yL as useOnlineStatusCallback,EL as usePermission,PP as usePrefersColorScheme,EP as usePrefersReducedMotion,FE as usePrevious,$E as usePreviousDistinct,KE as usePreviousWithInitial,qE as useQueue,dL as useRafLoop,_E as useRecord,PE as useResizeObserver,EE as useResizeObserverRef,$x as useScrollLock,yE as useScrollPosition,XE as useSelection,$P as useSessionStorage,ty as useSet,IL as useSpeechRecognition,HL as useSpeechSynthesis,Ek as useSpotlight,mL as useSpringValue,ZE as useStack,qP as useThrottle,ZP as useThrottledCallback,uy as useTimeout,iL as useTimeoutControls,cL as useTimeoutFlag,sL as useTimer,IE as useToggle,VP as useWindowHeight,RE as useWindowScroll,ha as useWindowSize,IP as useWindowWidth,$g as userVariants,Tf as validateFile,GC as validators,Nb as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
73
73
|
//# sourceMappingURL=index.js.map
|