@reeverdev/ui 0.2.99 → 0.2.101
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.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 W from'react';import {createContext,useContext,useCallback,useState,useEffect,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Calendar,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,RefreshCw,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,XCircle,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Xa from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {format,getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {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 AN from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import _N from'@tiptap/starter-kit';import WN from'@tiptap/extension-link';import jN from'@tiptap/extension-underline';import YN from'@tiptap/extension-text-align';import XN from'@tiptap/extension-placeholder';import bE,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import TE 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 Io from'canvas-confetti';function m(...e){return twMerge(clsx(e))}var HR=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"}}),IR={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},VR=W.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=IR[n],u=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:m(HR({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[u&&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})]})});VR.displayName="Alert";var AR=W.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));AR.displayName="AlertTitle";var zR=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("text-sm [&_p]:leading-relaxed",e),...t}));zR.displayName="AlertDescription";var OR=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),BR={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},FR=W.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,...l},c)=>jsxs("div",{ref:c,className:m("relative inline-flex",e),...l,children:[t,jsx("span",{className:m(OR({variant:r,color:o,size:i?void 0:a,placement:s}),i&&BR[a||"md"],i&&"min-w-0 p-0"),children:!i&&n})]}));FR.displayName="Badge";var KR=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"}}),GR=W.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:m(KR({color:t,size:n}),e),...r}));GR.displayName="TextBadge";var ud=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"}}),_R={sm:"text-xs",md:"text-sm",lg:"text-base"},Ia=W.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:m(ud({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:m("inline-flex",e),...i,children:c});let d=jsx("span",{className:m("text-muted-foreground",_R[t]),children:o}),u=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:m("inline-flex items-center",u?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(u?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Ia.displayName="Spinner";var tn=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border-2 border-current bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border-2 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 border-zinc-900 hover:bg-zinc-900 hover:text-white dark:text-white dark:border-white dark:hover:bg-white dark:hover:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 border-green-600 hover:bg-green-600 hover:text-white dark:text-green-500 dark:border-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 border-amber-600 hover:bg-amber-600 hover:text-white dark:text-amber-500 dark:border-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 border-red-600 hover:bg-red-600 hover:text-white dark:text-red-500 dark:border-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 border-blue-600 hover:bg-blue-600 hover:text-white dark:text-blue-500 dark:border-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),Va=W.forwardRef(({children:e,...t},n)=>W.isValidElement(e)?W.cloneElement(e,{...t,...e.props,ref:n,className:m(t.className,e.props.className),style:{...t.style,...e.props.style}}):null);Va.displayName="Slot";var te=W.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,asChild:a=false,href:s,loading:i=false,startContent:l,endContent:c,children:d,disabled:u,style:f,...p},g)=>{let h=u||i,v=t==="bordered"?{borderColor:"currentColor",...f}:f,w=i?jsxs(Fragment,{children:[jsx(Ia,{size:"sm",color:t==="solid"?"white":"default"}),d]}):jsxs(Fragment,{children:[l,d,c]});return a?jsx(Va,{className:m(tn({variant:t,color:n,size:r,radius:o,className:e})),ref:g,style:v,...p,children:w}):s?h?jsx("span",{role:"link","aria-disabled":"true",className:m(tn({variant:t,color:n,size:r,radius:o,className:e}),"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:s,className:m(tn({variant:t,color:n,size:r,radius:o,className:e})),style:v,...p,children:w}):jsx("button",{type:"button",className:m(tn({variant:t,color:n,size:r,radius:o,className:e})),ref:g,disabled:h,style:v,...p,children:w})});te.displayName="Button";var fd=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),gd=W.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:m(fd({radius:t,className:e})),...n}));gd.displayName="Card";var bd=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex flex-col space-y-1.5 p-6",e),...t}));bd.displayName="CardHeader";var vd=W.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:m("text-2xl font-semibold leading-none tracking-tight",e),...t}));vd.displayName="CardTitle";var hd=W.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));hd.displayName="CardDescription";var xd=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("p-6 pt-0",e),...t}));xd.displayName="CardContent";var yd=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center p-6 pt-0",e),...t}));yd.displayName="CardFooter";var $o=W.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,...u},f)=>{let[p,g]=W.useState(n),h=t!==void 0,b=h?t:p,[v,R]=W.useState(false),w=W.useId(),x=()=>{if(o)return;let E=b==="indeterminate"?true:!b;h||g(E),r?.(E);},C=E=>{E.key==="Enter"&&E.preventDefault(),d?.(E);},y=b===true,M=b==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?w:void 0,"aria-checked":M?"mixed":y,"aria-required":a,disabled:o,ref:f,className:m("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",y&&"bg-primary text-primary-foreground",M&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:x,onKeyDown:C,onFocus:()=>R(true),onBlur:()=>R(false),...u,children:(y||M)&&jsx("span",{className:"flex items-center justify-center text-current",children:M?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:y,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:m("flex items-start gap-2",e),children:[T,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:w,className:m("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):T});$o.displayName="Checkbox";var Uo=0,ki=null;function ct(){Uo===0&&(ki=document.body.style.overflow,document.body.style.overflow="hidden"),Uo++;}function dt(){Uo--,Uo<=0&&(Uo=0,document.body.style.overflow=ki??"",ki=null);}var wd=W.createContext(null),Qr=()=>{let e=W.useContext(wd);if(!e)throw new Error("Dialog components must be used within a Dialog");return e},Aa=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W.useState(n),s=t!==void 0,i=s?t:o,l=W.useId(),c=W.useId(),d=W.useId(),u=W.useCallback(f=>{s||a(f),r?.(f);},[s,r]);return jsx(wd.Provider,{value:{open:i,onOpenChange:u,contentId:l,titleId:c,descriptionId:d},children:e})};Aa.displayName="Dialog";var Cd=W.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Qr(),s=i=>{n?.(i),a(true);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(true);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Cd.displayName="DialogTrigger";var Td=W.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Qr(),s=i=>{n?.(i),a(false);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(false);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Td.displayName="DialogClose";var Li=({children:e,container:t})=>{let[n,r]=W.useState(false);return W.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Li.displayName="DialogPortal";var Si=W.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Qr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:m("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});Si.displayName="DialogOverlay";var za=W.forwardRef(({className:e,children:t,onEscapeKeyDown:n,onInteractOutside:r,...o},a)=>{let{open:s,onOpenChange:i,contentId:l,titleId:c,descriptionId:d}=Qr(),[u,f]=W.useState(false);return W.useEffect(()=>{f(true);},[]),W.useEffect(()=>{if(s)return ct(),()=>dt()},[s]),W.useEffect(()=>{if(!s)return;let p=g=>{g.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[s,i,n]),!u||!s?null:jsxs(Li,{children:[jsx(Si,{}),jsxs("div",{ref:a,id:l,role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-describedby":d,"data-state":s?"open":"closed",className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,jsxs("button",{type:"button",onClick:()=>i(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,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]})});za.displayName="DialogContent";var Md=({className:e,...t})=>jsx("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Md.displayName="DialogHeader";var Nd=({className:e,...t})=>jsx("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Nd.displayName="DialogFooter";var Ed=W.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Qr();return jsx("h2",{ref:n,id:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t})});Ed.displayName="DialogTitle";var kd=W.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Qr();return jsx("p",{ref:n,id:r,className:m("text-sm text-muted-foreground",e),...t})});kd.displayName="DialogDescription";var JR=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Oa=W.forwardRef(({className:e,type:t,radius:n,label:r,isRequired:o,description:a,errorMessage:s,isInvalid:i,onFocus:l,onBlur:c,style:d,...u},f)=>{let[p,g]=W.useState(false),h=W.useId(),b=u.id||h,v=i||!!s,R=jsx("input",{id:b,type:t,className:m(JR({radius:n}),v&&"border-danger focus:border-danger",!r&&e),ref:f,required:o,"aria-invalid":v,"aria-describedby":a||s?`${b}-description`:void 0,style:{...d,borderColor:v?void 0:p?"var(--color-foreground)":void 0},onFocus:w=>{g(true),l?.(w);},onBlur:w=>{g(false),c?.(w);},...u});return !r&&!a&&!s?R:jsxs("div",{className:m("flex flex-col gap-1.5",e),children:[r&&jsxs("label",{htmlFor:b,className:"text-sm font-medium leading-none",children:[r,o&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),R,(a||s)&&jsx("p",{id:`${b}-description`,className:m("text-xs",v?"text-danger":"text-muted-foreground"),children:s||a})]})});Oa.displayName="Input";var t0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wr=W.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:m(t0(),e),...t}));wr.displayName="Label";var Gn=W.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:m("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:m("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});Gn.displayName="Separator";var o0="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",Fa={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"},Dd={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"}},Hd=W.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:u,style:f,...p},g)=>{let[h,b]=W.useState(a),v=o!==void 0,R=v?o:h,w=()=>{if(i)return;let M=!R;v||b(M),s?.(M);},x=M=>{M.key==="Enter"&&M.preventDefault(),u?.(M);},C=t&&Fa[t]?Fa[t]:Fa.default,y=Dd[n]||Dd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":R,"aria-required":l,"data-state":R?"checked":"unchecked",disabled:i,ref:g,className:m(o0,y.track,R?r?"":C:"bg-input",e),style:r&&R?{backgroundColor:r,...f}:f,onClick:w,onKeyDown:x,...p,children:jsx("span",{className:m("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",y.thumb,R?y.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:R,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});Hd.displayName="Switch";var l0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),Id=W.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=W.useState(false);return jsx("textarea",{className:m(l0({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})});Id.displayName="Textarea";var Ad=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),$a=W.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:m(Ad({variant:t,className:e})),...n}));$a.displayName="Skeleton";var p0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),zd=W.createContext(null),Od=()=>{let e=W.useContext(zd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Cr=W.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=W.useState("idle");return jsx(zd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:m(p0({size:t,radius:n,className:e})),...r})})});Cr.displayName="Avatar";var eo=W.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=Od();return W.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:m("aspect-square h-full w-full object-cover",e),...o})});eo.displayName="AvatarImage";var Tr=W.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=Od(),[s,i]=W.useState(t===0);return W.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:m("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Tr.displayName="AvatarFallback";var Fd=W.createContext({delayDuration:700,skipDelayDuration:300}),$n=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(Fd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});$n.displayName="TooltipProvider";var Kd=W.createContext(null),Gd=()=>{let e=W.useContext(Kd);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},Un=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=W.useContext(Fd),[s,i]=W.useState(n),l=t!==void 0,c=l?t:s,d=W.useRef(null),u=W.useId(),f=W.useRef(null),p=o??a.delayDuration,g=W.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 W.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(Kd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:u},children:e})};Un.displayName="Tooltip";var _n=W.forwardRef(({asChild:e,children:t,onMouseEnter:n,onMouseLeave:r,onFocus:o,onBlur:a,...s},i)=>{let{onOpenChange:l,triggerRef:c,contentId:d,open:u}=Gd(),f=b=>{n?.(b),l(true);},p=b=>{r?.(b),l(false);},g=b=>{o?.(b),l(true);},h=b=>{a?.(b),l(false);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:b=>{c.current=b,typeof i=="function"?i(b):i&&(i.current=b);},onMouseEnter:f,onMouseLeave:p,onFocus:g,onBlur:h,"aria-describedby":u?d:void 0,...s}):jsx("button",{ref:b=>{c.current=b,typeof i=="function"?i(b):i&&(i.current=b);},type:"button","aria-describedby":u?d:void 0,onMouseEnter:f,onMouseLeave:p,onFocus:g,onBlur:h,...s,children:t})});_n.displayName="TooltipTrigger";var Wn=W.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}=Gd(),[u,f]=W.useState({top:0,left:0}),[p,g]=W.useState(false),h=W.useRef(null);if(W.useEffect(()=>{g(true);},[]),W.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),w=0,x=0;switch(t){case "top":w=v.top-R.height-n;break;case "bottom":w=v.bottom+n;break;case "left":x=v.left-R.width-n;break;case "right":x=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":x=v.left+o;break;case "center":x=v.left+v.width/2-R.width/2;break;case "end":x=v.right-R.width-o;break}else switch(r){case "start":w=v.top+o;break;case "center":w=v.top+v.height/2-R.height/2;break;case "end":w=v.bottom-R.height-o;break}f({top:w,left:x});},[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 Xa.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:m("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:u.top,left:u.left},...s,children:a}),document.body)});Wn.displayName="TooltipContent";var Ue=W.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",children:r,style:o,...a},s)=>{let[i,l]=W.useState(false),c=W.useId().replace(/:/g,""),d=n==="visible"||n==="hover"&&i,u=d?"rgba(0,0,0,0.3)":"transparent",f=d?"rgba(255,255,255,0.3)":"transparent",p=`
|
|
1
|
+
import*as j from'react';import {createContext,useContext,useCallback,useState,useEffect,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Calendar,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,RefreshCw,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,XCircle,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Xa from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {format,getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {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 AN from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import WN from'@tiptap/starter-kit';import jN from'@tiptap/extension-link';import _N from'@tiptap/extension-underline';import YN from'@tiptap/extension-text-align';import XN from'@tiptap/extension-placeholder';import bE,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import TE 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 Io from'canvas-confetti';function m(...e){return twMerge(clsx(e))}var HR=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"}}),IR={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},VR=j.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=IR[n],u=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:m(HR({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[u&&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})]})});VR.displayName="Alert";var AR=j.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));AR.displayName="AlertTitle";var zR=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("text-sm [&_p]:leading-relaxed",e),...t}));zR.displayName="AlertDescription";var OR=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),BR={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},FR=j.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,...l},c)=>jsxs("div",{ref:c,className:m("relative inline-flex",e),...l,children:[t,jsx("span",{className:m(OR({variant:r,color:o,size:i?void 0:a,placement:s}),i&&BR[a||"md"],i&&"min-w-0 p-0"),children:!i&&n})]}));FR.displayName="Badge";var KR=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"}}),GR=j.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:m(KR({color:t,size:n}),e),...r}));GR.displayName="TextBadge";var ud=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"}}),WR={sm:"text-xs",md:"text-sm",lg:"text-base"},Ia=j.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:m(ud({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:m("inline-flex",e),...i,children:c});let d=jsx("span",{className:m("text-muted-foreground",WR[t]),children:o}),u=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:m("inline-flex items-center",u?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(u?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Ia.displayName="Spinner";var tn=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border-2 border-current bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border-2 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 border-zinc-900 hover:bg-zinc-900 hover:text-white dark:text-white dark:border-white dark:hover:bg-white dark:hover:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 border-green-600 hover:bg-green-600 hover:text-white dark:text-green-500 dark:border-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 border-amber-600 hover:bg-amber-600 hover:text-white dark:text-amber-500 dark:border-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 border-red-600 hover:bg-red-600 hover:text-white dark:text-red-500 dark:border-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 border-blue-600 hover:bg-blue-600 hover:text-white dark:text-blue-500 dark:border-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),Va=j.forwardRef(({children:e,...t},n)=>j.isValidElement(e)?j.cloneElement(e,{...t,...e.props,ref:n,className:m(t.className,e.props.className),style:{...t.style,...e.props.style}}):null);Va.displayName="Slot";var te=j.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,asChild:a=false,href:s,loading:i=false,startContent:l,endContent:c,children:d,disabled:u,style:f,...p},g)=>{let h=u||i,v=t==="bordered"?{borderColor:"currentColor",...f}:f,w=i?jsxs(Fragment,{children:[jsx(Ia,{size:"sm",color:t==="solid"?"white":"default"}),d]}):jsxs(Fragment,{children:[l,d,c]});return a?jsx(Va,{className:m(tn({variant:t,color:n,size:r,radius:o,className:e})),ref:g,style:v,...p,children:w}):s?h?jsx("span",{role:"link","aria-disabled":"true",className:m(tn({variant:t,color:n,size:r,radius:o,className:e}),"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:s,className:m(tn({variant:t,color:n,size:r,radius:o,className:e})),style:v,...p,children:w}):jsx("button",{type:"button",className:m(tn({variant:t,color:n,size:r,radius:o,className:e})),ref:g,disabled:h,style:v,...p,children:w})});te.displayName="Button";var fd=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),gd=j.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:m(fd({radius:t,className:e})),...n}));gd.displayName="Card";var bd=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex flex-col space-y-1.5 p-6",e),...t}));bd.displayName="CardHeader";var vd=j.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:m("text-2xl font-semibold leading-none tracking-tight",e),...t}));vd.displayName="CardTitle";var hd=j.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));hd.displayName="CardDescription";var xd=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("p-6 pt-0",e),...t}));xd.displayName="CardContent";var yd=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center p-6 pt-0",e),...t}));yd.displayName="CardFooter";var $o=j.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,...u},f)=>{let[p,g]=j.useState(n),h=t!==void 0,b=h?t:p,[v,R]=j.useState(false),w=j.useId(),x=()=>{if(o)return;let E=b==="indeterminate"?true:!b;h||g(E),r?.(E);},C=E=>{E.key==="Enter"&&E.preventDefault(),d?.(E);},y=b===true,M=b==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?w:void 0,"aria-checked":M?"mixed":y,"aria-required":a,disabled:o,ref:f,className:m("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",y&&"bg-primary text-primary-foreground",M&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:x,onKeyDown:C,onFocus:()=>R(true),onBlur:()=>R(false),...u,children:(y||M)&&jsx("span",{className:"flex items-center justify-center text-current",children:M?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:y,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:m("flex items-start gap-2",e),children:[T,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:w,className:m("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):T});$o.displayName="Checkbox";var Uo=0,ki=null;function ct(){Uo===0&&(ki=document.body.style.overflow,document.body.style.overflow="hidden"),Uo++;}function dt(){Uo--,Uo<=0&&(Uo=0,document.body.style.overflow=ki??"",ki=null);}var wd=j.createContext(null),Qr=()=>{let e=j.useContext(wd);if(!e)throw new Error("Dialog components must be used within a Dialog");return e},Aa=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=j.useState(n),s=t!==void 0,i=s?t:o,l=j.useId(),c=j.useId(),d=j.useId(),u=j.useCallback(f=>{s||a(f),r?.(f);},[s,r]);return jsx(wd.Provider,{value:{open:i,onOpenChange:u,contentId:l,titleId:c,descriptionId:d},children:e})};Aa.displayName="Dialog";var Cd=j.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Qr(),s=i=>{n?.(i),a(true);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(true);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Cd.displayName="DialogTrigger";var Td=j.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Qr(),s=i=>{n?.(i),a(false);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(false);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Td.displayName="DialogClose";var Li=({children:e,container:t})=>{let[n,r]=j.useState(false);return j.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Li.displayName="DialogPortal";var Si=j.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Qr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:m("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});Si.displayName="DialogOverlay";var za=j.forwardRef(({className:e,children:t,onEscapeKeyDown:n,onInteractOutside:r,...o},a)=>{let{open:s,onOpenChange:i,contentId:l,titleId:c,descriptionId:d}=Qr(),[u,f]=j.useState(false);return j.useEffect(()=>{f(true);},[]),j.useEffect(()=>{if(s)return ct(),()=>dt()},[s]),j.useEffect(()=>{if(!s)return;let p=g=>{g.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[s,i,n]),!u||!s?null:jsxs(Li,{children:[jsx(Si,{}),jsxs("div",{ref:a,id:l,role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-describedby":d,"data-state":s?"open":"closed",className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,jsxs("button",{type:"button",onClick:()=>i(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,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]})});za.displayName="DialogContent";var Md=({className:e,...t})=>jsx("div",{className:m("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Md.displayName="DialogHeader";var Nd=({className:e,...t})=>jsx("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Nd.displayName="DialogFooter";var Ed=j.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Qr();return jsx("h2",{ref:n,id:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t})});Ed.displayName="DialogTitle";var kd=j.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Qr();return jsx("p",{ref:n,id:r,className:m("text-sm text-muted-foreground",e),...t})});kd.displayName="DialogDescription";var JR=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Oa=j.forwardRef(({className:e,type:t,radius:n,label:r,isRequired:o,description:a,errorMessage:s,isInvalid:i,onFocus:l,onBlur:c,style:d,...u},f)=>{let[p,g]=j.useState(false),h=j.useId(),b=u.id||h,v=i||!!s,R=jsx("input",{id:b,type:t,className:m(JR({radius:n}),v&&"border-danger focus:border-danger",!r&&e),ref:f,required:o,"aria-invalid":v,"aria-describedby":a||s?`${b}-description`:void 0,style:{...d,borderColor:v?void 0:p?"var(--color-foreground)":void 0},onFocus:w=>{g(true),l?.(w);},onBlur:w=>{g(false),c?.(w);},...u});return !r&&!a&&!s?R:jsxs("div",{className:m("flex flex-col gap-1.5",e),children:[r&&jsxs("label",{htmlFor:b,className:"text-sm font-medium leading-none",children:[r,o&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),R,(a||s)&&jsx("p",{id:`${b}-description`,className:m("text-xs",v?"text-danger":"text-muted-foreground"),children:s||a})]})});Oa.displayName="Input";var t0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wr=j.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:m(t0(),e),...t}));wr.displayName="Label";var Gn=j.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:m("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:m("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});Gn.displayName="Separator";var o0="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",Fa={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"},Dd={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"}},Hd=j.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:u,style:f,...p},g)=>{let[h,b]=j.useState(a),v=o!==void 0,R=v?o:h,w=()=>{if(i)return;let M=!R;v||b(M),s?.(M);},x=M=>{M.key==="Enter"&&M.preventDefault(),u?.(M);},C=t&&Fa[t]?Fa[t]:Fa.default,y=Dd[n]||Dd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":R,"aria-required":l,"data-state":R?"checked":"unchecked",disabled:i,ref:g,className:m(o0,y.track,R?r?"":C:"bg-input",e),style:r&&R?{backgroundColor:r,...f}:f,onClick:w,onKeyDown:x,...p,children:jsx("span",{className:m("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",y.thumb,R?y.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:R,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});Hd.displayName="Switch";var l0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),Id=j.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=j.useState(false);return jsx("textarea",{className:m(l0({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})});Id.displayName="Textarea";var Ad=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),$a=j.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:m(Ad({variant:t,className:e})),...n}));$a.displayName="Skeleton";var p0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),zd=j.createContext(null),Od=()=>{let e=j.useContext(zd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Cr=j.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=j.useState("idle");return jsx(zd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:m(p0({size:t,radius:n,className:e})),...r})})});Cr.displayName="Avatar";var eo=j.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=Od();return j.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:m("aspect-square h-full w-full object-cover",e),...o})});eo.displayName="AvatarImage";var Tr=j.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=Od(),[s,i]=j.useState(t===0);return j.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:m("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Tr.displayName="AvatarFallback";var Fd=j.createContext({delayDuration:700,skipDelayDuration:300}),$n=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(Fd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});$n.displayName="TooltipProvider";var Kd=j.createContext(null),Gd=()=>{let e=j.useContext(Kd);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},Un=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=j.useContext(Fd),[s,i]=j.useState(n),l=t!==void 0,c=l?t:s,d=j.useRef(null),u=j.useId(),f=j.useRef(null),p=o??a.delayDuration,g=j.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 j.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(Kd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:u},children:e})};Un.displayName="Tooltip";var Wn=j.forwardRef(({asChild:e,children:t,onMouseEnter:n,onMouseLeave:r,onFocus:o,onBlur:a,...s},i)=>{let{onOpenChange:l,triggerRef:c,contentId:d,open:u}=Gd(),f=b=>{n?.(b),l(true);},p=b=>{r?.(b),l(false);},g=b=>{o?.(b),l(true);},h=b=>{a?.(b),l(false);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:b=>{c.current=b,typeof i=="function"?i(b):i&&(i.current=b);},onMouseEnter:f,onMouseLeave:p,onFocus:g,onBlur:h,"aria-describedby":u?d:void 0,...s}):jsx("button",{ref:b=>{c.current=b,typeof i=="function"?i(b):i&&(i.current=b);},type:"button","aria-describedby":u?d:void 0,onMouseEnter:f,onMouseLeave:p,onFocus:g,onBlur:h,...s,children:t})});Wn.displayName="TooltipTrigger";var jn=j.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}=Gd(),[u,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);if(j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),w=0,x=0;switch(t){case "top":w=v.top-R.height-n;break;case "bottom":w=v.bottom+n;break;case "left":x=v.left-R.width-n;break;case "right":x=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":x=v.left+o;break;case "center":x=v.left+v.width/2-R.width/2;break;case "end":x=v.right-R.width-o;break}else switch(r){case "start":w=v.top+o;break;case "center":w=v.top+v.height/2-R.height/2;break;case "end":w=v.bottom-R.height-o;break}f({top:w,left:x});},[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 Xa.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:m("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:u.top,left:u.left},...s,children:a}),document.body)});jn.displayName="TooltipContent";var Ue=j.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",children:r,style:o,...a},s)=>{let[i,l]=j.useState(false),c=j.useId().replace(/:/g,""),d=n==="visible"||n==="hover"&&i,u=d?"rgba(0,0,0,0.3)":"transparent",f=d?"rgba(255,255,255,0.3)":"transparent",p=`
|
|
2
2
|
#${c} {
|
|
3
3
|
scrollbar-width: thin;
|
|
4
4
|
scrollbar-color: ${u} transparent;
|
|
@@ -40,7 +40,7 @@ import*as W from'react';import {createContext,useContext,useCallback,useState,us
|
|
|
40
40
|
scrollbar-width: none;
|
|
41
41
|
}
|
|
42
42
|
`:""}
|
|
43
|
-
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,className:m("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...a,children:r})]})});Ue.displayName="ScrollArea";var jd=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Yd=W.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:u=3,maxDropdownHeight:f=240,radius:p,className:g,...h},b)=>{let[v,R]=W.useState(false),[w,x]=W.useState(""),[C,y]=W.useState(r||""),[M,T]=W.useState(r||[]),[E,N]=W.useState({top:0,left:0,width:0}),k=W.useRef(null),P=W.useRef(null),L=W.useRef(null),H=W.useRef(null),D=n!==void 0?n:C,S=n!==void 0?n:M,I=n!==void 0,z=A=>{d&&D===A?(I||y(""),o?.("")):(I||y(A),o?.(A)),R(false),x("");},G=A=>{let j=S.includes(A)?S.filter(U=>U!==A):[...S,A];I||T(j),o?.(j);},V=(A,j)=>{j.stopPropagation();let U=S.filter(he=>he!==A);I||T(U),o?.(U);},F=A=>{A.stopPropagation(),t?(I||T([]),o?.([])):(I||y(""),o?.(""));},B=e.find(A=>A.value===D),Q=e.filter(A=>S.includes(A.value)),ne=Q.slice(0,u),K=Q.length-u,O=s?e.filter(A=>A.label.toLowerCase().includes(w.toLowerCase())):e;W.useEffect(()=>{if(v&&P.current){let A=P.current.getBoundingClientRect();N({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||x("");},[v,s]),W.useEffect(()=>{let A=j=>{let U=j.target,he=k.current&&!k.current.contains(U),me=L.current&&!L.current.contains(U);he&&me&&(R(false),x(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),W.useEffect(()=>{if(!v)return;let A=j=>{L.current?.contains(j.target)||(R(false),x(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[v]);let _=t?S.length>0:!!D;return jsxs("div",{ref:k,className:m("relative",g),...h,children:[jsxs("div",{ref:A=>{P.current=A,typeof b=="function"?b(A):b&&(b.current=A);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&R(!v),className:m(jd({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:m(!B&&"text-muted-foreground"),children:B?B.label:a}),t&&jsx(Fragment,{children:Q.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[ne.map(A=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsx("span",{role:"button",tabIndex:0,onClick:j=>V(A.value,j),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&V(A.value,j);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X,{className:"h-3 w-3"})})]},A.value)),K>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",K," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&_&&jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&F(A);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:m("h-4 w-4 opacity-50 transition-transform",v&&"rotate-180")})]})]}),v&&!c&&typeof document<"u"&&Xa.createPortal(jsxs("div",{ref:L,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:E.top,left:E.left,minWidth:E.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:H,type:"text",value:w,onChange:A=>x(A.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(Ue,{style:{maxHeight:f},onWheel:A=>A.stopPropagation(),children:jsx("div",{className:"p-1",children:O.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(A=>{let j=t?S.includes(A.value):D===A.value;return jsxs("div",{role:"option","aria-selected":j,onClick:()=>{A.disabled||(t?G(A.value):z(A.value));},className:m("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:j&&jsx(Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});Yd.displayName="Select";var Xd=W.createContext(null),_o=()=>{let e=W.useContext(Xd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Vi=W.createContext(null),no=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W.useState(n),[s,i]=W.useState(-1),l=t!==void 0,c=l?t:o,d=W.useRef(null),u=W.useRef(null),f=W.useId(),p=W.useRef(new Map),g=W.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=W.useCallback((v,R)=>{p.current.set(v,R);},[]),b=W.useCallback(v=>{p.current.delete(v);},[]);return jsx(Xd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:u,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};no.displayName="Dropdown";var ro=W.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=_o();return jsx("div",{ref:u=>{i.current=u,typeof o=="function"?o(u):o&&(o.current=u);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:u=>{t?.(u),s(!a);},onKeyDown:u=>{n?.(u),(u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),s(true)),(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});ro.displayName="DropdownTrigger";var oo=W.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,children:c,...d},u)=>{let{open:f,onOpenChange:p,triggerRef:g,contentRef:h,contentId:b,activeIndex:v,setActiveIndex:R,items:w}=_o(),[x,C]=W.useState({top:0,left:0}),[y,M]=W.useState(t),[T,E]=W.useState(false),N=W.useRef(0);if(W.useEffect(()=>{E(true);},[]),W.useEffect(()=>{f&&(N.current=w.current.size);},[f,w]),W.useEffect(()=>{if(!f||!g.current||!h.current)return;let P=()=>{if(!g.current||!h.current)return;let L=g.current.getBoundingClientRect(),H=h.current.getBoundingClientRect(),D=window.innerWidth,S=window.innerHeight,I=0,z=0,G=t;switch(t){case "top":I=L.top-H.height-n,I<a&&(I=L.bottom+n,G="bottom");break;case "bottom":I=L.bottom+n,I+H.height>S-a&&(I=L.top-H.height-n,G="top");break;case "left":z=L.left-H.width-n,z<a&&(z=L.right+n,G="right");break;case "right":z=L.right+n,z+H.width>D-a&&(z=L.left-H.width-n,G="left");break}if(G==="top"||G==="bottom"){switch(r){case "start":z=L.left+o;break;case "center":z=L.left+L.width/2-H.width/2;break;case "end":z=L.right-H.width-o;break}z<a?z=a:z+H.width>D-a&&(z=D-H.width-a);}else {switch(r){case "start":I=L.top+o;break;case "center":I=L.top+L.height/2-H.height/2;break;case "end":I=L.bottom-H.height-o;break}I<a?I=a:I+H.height>S-a&&(I=S-H.height-a);}C({top:I,left:z}),M(G);};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[f,t,n,r,o,a,g]),W.useEffect(()=>{if(!f)return;let P=L=>{let H=L.target;h.current&&!h.current.contains(H)&&g.current&&!g.current.contains(H)&&(s?.(),p(false));};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[f,p,s,g,h]),W.useEffect(()=>{if(!f)return;let P=L=>{let H=Array.from(w.current.entries()).sort(([S],[I])=>S-I).map(([,S])=>S),D=H.length;if(D!==0)switch(L.key){case "Escape":L.preventDefault(),i?.(),p(false),g.current?.focus();break;case "ArrowDown":L.preventDefault(),v===-1||v>=D-1?R(l?0:Math.min(v+1,D-1)):R(v+1);break;case "ArrowUp":L.preventDefault(),v<=0?R(l?D-1:0):R(v-1);break;case "Home":L.preventDefault(),R(0);break;case "End":L.preventDefault(),R(D-1);break;case "Enter":case " ":L.preventDefault(),v>=0&&v<D&&H[v]?.click();break;case "Tab":p(false);break}};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[f,p,i,v,R,w,l,g]),W.useEffect(()=>{f&&v>=0&&Array.from(w.current.entries()).sort(([L],[H])=>L-H).map(([,L])=>L)[v]?.focus();},[f,v,w]),!T||!f)return null;let k={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"}[y];return Xa.createPortal(jsx("div",{ref:P=>{h.current=P,typeof u=="function"?u(P):u&&(u.current=P);},id:b,role:"menu","aria-orientation":"vertical","data-state":f?"open":"closed","data-side":y,className:m("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none",k,e),style:{top:x.top,left:x.left},...d,children:c}),document.body)});oo.displayName="DropdownContent";var qd=0,jn=W.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:u,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=_o(),[b]=W.useState(()=>qd++),v=W.useRef(null);W.useEffect(()=>(!n&&v.current&&g(b,v.current),()=>{h(b);}),[n,b,g,h]);let R=C=>{if(n){C.preventDefault();return}o?.(C),r?.(),u(false);},w=C=>{a?.(C),n||p(b);};return jsxs("div",{ref:C=>{v.current=C,typeof d=="function"?d(C):d&&(d.current=C);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===b?"":void 0,className:m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0",t&&"pl-8",!n&&"cursor-pointer",e),onClick:R,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});jn.displayName="DropdownItem";var Ai=W.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ai.displayName="DropdownSection";var Zd=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-muted",e),...t}));Zd.displayName="DropdownSeparator";var Qd=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest opacity-60",e),...t});Qd.displayName="DropdownShortcut";var Jd=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Jd.displayName="DropdownGroup";var eu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W.useState(n),{contentRef:s}=_o(),i=t!==void 0,l=i?t:o,c=W.useRef(null),d=W.useCallback(u=>{i||a(u),r?.(u);},[i,r]);return jsx(Vi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};eu.displayName="DropdownSub";var tu=W.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=W.useContext(Vi),{setActiveIndex:d,registerItem:u,unregisterItem:f}=_o(),[p]=W.useState(()=>qd++),g=W.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:h,onOpenChange:b,triggerRef:v}=c;W.useEffect(()=>(!n&&g.current&&u(p,g.current),()=>{f(p);}),[n,p,u,f]);let R=C=>{o?.(C),n||(d(p),b(true));},w=C=>{a?.(C);},x=C=>{s?.(C),(C.key==="ArrowRight"||C.key==="Enter"||C.key===" ")&&(C.preventDefault(),b(true));};return jsxs("div",{ref:C=>{g.current=C,v.current=C,typeof l=="function"?l(C):l&&(l.current=C);},role:"menuitem","aria-haspopup":"menu","aria-expanded":h,tabIndex:n?-1:0,"aria-disabled":n,"data-state":h?"open":"closed","data-disabled":n?"":void 0,className:m("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:R,onMouseLeave:w,onKeyDown:x,...i,children:[r,jsx(ChevronRight,{className:"ml-auto"})]})});tu.displayName="DropdownSubTrigger";var nu=W.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=W.useContext(Vi);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:u,parentMenuRef:f}=l,[p,g]=W.useState({top:0,left:0}),[h,b]=W.useState(false),v=W.useRef(null),R=W.useRef(null);W.useEffect(()=>{b(true);},[]),W.useEffect(()=>{if(!c||!u.current||!v.current)return;(()=>{if(!u.current||!v.current)return;let y=u.current.getBoundingClientRect(),M=v.current.getBoundingClientRect(),T=window.innerWidth,E=window.innerHeight,N=y.top+n,k=y.right+t;k+M.width>T-r&&(k=y.left-M.width-t),N+M.height>E-r&&(N=E-M.height-r),N<r&&(N=r),g({top:N,left:k});})();},[c,t,n,r,u]);let w=C=>{o?.(C),R.current&&(clearTimeout(R.current),R.current=null),d(true);},x=C=>{a?.(C);let y=C.relatedTarget;u.current?.contains(y)||f?.current?.contains(y)||(R.current=setTimeout(()=>{d(false);},100));};return W.useEffect(()=>()=>{R.current&&clearTimeout(R.current);},[]),!h||!c?null:Xa.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:m("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:w,onMouseLeave:x,...s}),document.body)});nu.displayName="DropdownSubContent";var R0=Ai;var au=W.createContext(null),zi=()=>{let e=W.useContext(au);if(!e)throw new Error("Popover components must be used within a Popover");return e},nt=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W.useState(n),s=t!==void 0,i=s?t:o,l=W.useRef(null),c=W.useId(),d=W.useCallback(u=>{s||a(u),r?.(u);},[s,r]);return jsx(au.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};nt.displayName="Popover";var ht=W.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=zi(),c=d=>{n?.(d),s(!a);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:d=>{i.current=d,typeof o=="function"?o(d):o&&(o.current=d);},onClick:d=>{t.props.onClick?.(d),s(!a);},"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,...r}):jsx("button",{ref:d=>{i.current=d,typeof o=="function"?o(d):o&&(o.current=d);},type:"button","aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r,children:t})});ht.displayName="PopoverTrigger";var Wa=W.forwardRef(({asChild:e,children:t,...n},r)=>{let{triggerRef:o}=zi();return e&&W.isValidElement(t)?W.cloneElement(t,{ref:a=>{o.current=a,typeof r=="function"?r(a):r&&(r.current=a);},...n}):jsx("div",{ref:a=>{o.current=a,typeof r=="function"?r(a):r&&(r.current=a);},...n,children:t})});Wa.displayName="PopoverAnchor";var rt=W.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onInteractOutside:a,onEscapeKeyDown:s,onOpenAutoFocus:i,onCloseAutoFocus:l,children:c,...d},u)=>{let{open:f,onOpenChange:p,triggerRef:g,contentId:h}=zi(),[b,v]=W.useState({top:0,left:0}),[R,w]=W.useState(false),x=W.useRef(null);if(W.useEffect(()=>{w(true);},[]),W.useEffect(()=>{if(!f||!g.current||!x.current)return;let y=()=>{if(!g.current||!x.current)return;let M=g.current.getBoundingClientRect(),T=x.current.getBoundingClientRect(),E=0,N=0;switch(t){case "top":E=M.top-T.height-n;break;case "bottom":E=M.bottom+n;break;case "left":N=M.left-T.width-n;break;case "right":N=M.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":N=M.left+o;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-o;break}else switch(r){case "start":E=M.top+o;break;case "center":E=M.top+M.height/2-T.height/2;break;case "end":E=M.bottom-T.height-o;break}v({top:E,left:N});};return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,true),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,true);}},[f,t,n,r,o,g]),W.useEffect(()=>{if(!f)return;let y=M=>{let T=M.target;x.current&&!x.current.contains(T)&&g.current&&!g.current.contains(T)&&(a?.(),p(false));};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[f,p,a,g]),W.useEffect(()=>{if(!f)return;let y=M=>{M.key==="Escape"&&(s?.(),p(false));};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[f,p,s]),!R||!f)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 Xa.createPortal(jsx("div",{ref:y=>{x.current=y,typeof u=="function"?u(y):u&&(u.current=y);},id:h,role:"dialog","data-state":f?"open":"closed","data-side":t,className:m("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:b.top,left:b.left},...d,children:c}),document.body)});rt.displayName="PopoverContent";var su=W.createContext(null),Bi=()=>{let e=W.useContext(su);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},iu=W.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,u]=W.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||u(h),r?.(h);};return jsx(su.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:m(s==="vertical"&&"flex gap-4",e),...l,children:i})})});iu.displayName="Tabs";var Oi={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"}},lu=W.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Bi(),l=W.useRef(null),[c,d]=W.useState({opacity:0});W.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let R=g.getBoundingClientRect(),w=v.getBoundingClientRect(),x=s==="vertical";o==="underline"?d(x?{width:2,height:w.height,transform:`translateY(${w.top-R.top}px)`,opacity:1}:{width:w.width,height:2,transform:`translateX(${w.left-R.left}px)`,opacity:1}):o==="solid"&&d(x?{width:w.width,height:w.height,transform:`translateY(${w.top-R.top}px)`,opacity:1}:{width:w.width,height:w.height,transform:`translateX(${w.left-R.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let u={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",outline:"bg-transparent p-0 gap-1 !rounded-none"},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:m("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Oi[a].list,u[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:m("absolute transition-all duration-200 ease-out",Oi[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});lu.displayName="TabsList";var cu=W.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Bi(),d=s===t,u={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",outline:"border border-transparent data-[state=active]:border-border data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:m("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",Oi[c].trigger,u[l],e),onClick:f=>{r?.(f),i(t);},...o})});cu.displayName="TabsTrigger";var du=W.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Bi(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:m("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});du.displayName="TabsContent";var uu=[{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 C0(e,t=uu){return e?t.filter(r=>r.test(e)).length/t.length:0}function T0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function M0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var pu=W.createContext(null),Ya=()=>{let e=W.useContext(pu);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},fu=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=W.useState(t),s=e!==void 0,i=s?e:o,l=W.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(pu.Provider,{value:{open:i,onOpenChange:l},children:r})};fu.displayName="Sheet";var gu=W.forwardRef(({asChild:e,onClick:t,children:n,...r},o)=>{let{onOpenChange:a}=Ya(),s=i=>{t?.(i),a(true);};return e&&W.isValidElement(n)?W.cloneElement(n,{onClick:i=>{n.props.onClick?.(i),a(true);}}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:n})});gu.displayName="SheetTrigger";var bu=W.forwardRef(({asChild:e,onClick:t,children:n,...r},o)=>{let{onOpenChange:a}=Ya(),s=i=>{t?.(i),a(false);};return e&&W.isValidElement(n)?W.cloneElement(n,{onClick:i=>{n.props.onClick?.(i),a(false);}}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:n})});bu.displayName="SheetClose";var Ki=({children:e,container:t})=>{let[n,r]=W.useState(false);return W.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Ki.displayName="SheetPortal";var vu=W.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ya();return r?jsx("div",{ref:n,className:m("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});vu.displayName="SheetOverlay";var hu=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],xu=W.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Ya(),[d,u]=W.useState(false),[,f]=W.useState(false);return W.useEffect(()=>{if(l)u(true),f(true),ct();else {f(true);let p=setTimeout(()=>{u(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{dt();}},[l]),W.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(Ki,{children:[jsx("div",{className:m("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:m(hu({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,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});xu.displayName="SheetContent";var yu=({className:e,...t})=>jsx("div",{className:m("flex flex-col space-y-2 text-center sm:text-left",e),...t});yu.displayName="SheetHeader";var Ru=({className:e,...t})=>jsx("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ru.displayName="SheetFooter";var wu=W.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:m("text-lg font-semibold text-foreground",e),...t}));wu.displayName="SheetTitle";var Cu=W.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));Cu.displayName="SheetDescription";var S0=({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 Tu=W.createContext(null),jo=()=>{let e=W.useContext(Tu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Gi=W.createContext(null),Mu=W.createContext(null),Nu=({children:e,onOpenChange:t})=>{let[n,r]=W.useState(false),[o,a]=W.useState({x:0,y:0}),s=W.useId(),i=W.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(Tu.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};Nu.displayName="ContextMenu";var Eu=W.forwardRef(({asChild:e,children:t,onContextMenu:n,...r},o)=>{let{onOpenChange:a,setPosition:s}=jo(),i=l=>{l.preventDefault(),s({x:l.clientX,y:l.clientY}),a(true);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:o,onContextMenu:l=>{l.preventDefault(),t.props.onContextMenu?.(l),s({x:l.clientX,y:l.clientY}),a(true);},...r}):jsx("div",{ref:o,onContextMenu:l=>{n?.(l),i(l);},...r,children:t})});Eu.displayName="ContextMenuTrigger";var ku=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));ku.displayName="ContextMenuGroup";var Pu=({children:e,container:t})=>{let[n,r]=W.useState(false);return W.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Pu.displayName="ContextMenuPortal";var Lu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W.useState(n),s=t!==void 0,i=s?t:o,l=W.useRef(null),c=W.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Gi.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Lu.displayName="ContextMenuSub";var Su=W.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(Mu.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));Su.displayName="ContextMenuRadioGroup";var Du=W.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=jo(),[d,u]=W.useState(false),[f,p]=W.useState(l),g=W.useRef(null);return W.useEffect(()=>{u(true);},[]),W.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:R}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),R+b.height>window.innerHeight&&(R=window.innerHeight-b.height-8),p({x:v,y:R});},[s,l]),W.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),W.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:Xa.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:m("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)});Du.displayName="ContextMenuContent";var Hu=W.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=W.useContext(Gi);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,u=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:m("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:u,onMouseLeave:f,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Hu.displayName="ContextMenuSubTrigger";var Iu=W.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=W.useContext(Gi);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,u]=W.useState({top:0,left:0}),[f,p]=W.useState(false),g=W.useRef(null);W.useEffect(()=>{p(true);},[]),W.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let R=c.current.getBoundingClientRect(),w=g.current.getBoundingClientRect(),x=R.top,C=R.right+t;C+w.width>window.innerWidth&&(C=R.left-w.width-t),u({top:x,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:Xa.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:m("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)});Iu.displayName="ContextMenuSubContent";var Vu=W.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=jo(),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:m("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})});Vu.displayName="ContextMenuItem";var Au=W.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=jo(),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:m("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]})});Au.displayName="ContextMenuCheckboxItem";var zu=W.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{onOpenChange:i}=jo(),l=W.useContext(Mu),c=l?.value===n,d=u=>{if(r){u.preventDefault();return}o?.(u),l?.onValueChange(n),i(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":c,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":c?"checked":"unchecked",className:m("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:d,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c&&jsx(Circle,{className:"h-4 w-4 fill-current"})}),t]})});zu.displayName="ContextMenuRadioItem";var Ou=W.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));Ou.displayName="ContextMenuLabel";var Bu=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-border",e),...t}));Bu.displayName="ContextMenuSeparator";var Fu=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Fu.displayName="ContextMenuShortcut";var Ku=W.createContext(null),z0=()=>{let e=W.useContext(Ku);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Gu=W.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[u,f]=W.useState(n),p=t!==void 0,g=p?t:u,h=W.useId(),b=v=>{p||f(v),r?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:m(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(Ku.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});Gu.displayName="RadioGroup";var $u=W.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=z0(),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:m("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}})]})});$u.displayName="RadioGroupItem";var Za=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",outline:"border border-input bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),Uu=W.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,u]=W.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let b=!p;f||u(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:m(Za({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Uu.displayName="Toggle";var _u=W.createContext(null),G0=()=>{let e=W.useContext(_u);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Wu=W.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[u,f]=W.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:u,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(R=>R!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:m("flex items-center justify-center gap-1",e),...c,children:jsx(_u.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Wu.displayName="ToggleGroup";var ju=W.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=G0(),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:m(Za({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});ju.displayName="ToggleGroupItem";var Ja=W.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,...u},f)=>{let[p,g]=W.useState(n),h=t!==void 0,b=h?t:p,v=W.useRef(null),[R,w]=W.useState(false),[x,C]=W.useState(null),y=(H,D)=>{if(!v.current)return b[0];let S=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-S.left)/S.width:I=1-(D-S.top)/S.height,I=Math.max(0,Math.min(1,I));let z=a+I*(s-a),G=Math.round(z/i)*i;return Math.max(a,Math.min(s,G))},M=(H,D)=>{let S=[...b];S[D]=H,D>0&&H<b[D-1]&&(S[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(S[D]=b[D+1]),h||g(S),r?.(S);},T=(H,D)=>{l||(H.preventDefault(),w(true),C(D),H.target.setPointerCapture(H.pointerId));},E=H=>{if(!R||x===null||l)return;let D=y(H.clientX,H.clientY);M(D,x);},N=()=>{R&&(w(false),C(null),o?.(b));},k=H=>{if(l)return;let D=y(H.clientX,H.clientY),S=0,I=Math.abs(b[0]-D);for(let z=1;z<b.length;z++){let G=Math.abs(b[z]-D);G<I&&(I=G,S=z);}M(D,S),o?.([...b.slice(0,S),D,...b.slice(S+1)]);},P=(H,D)=>{if(l)return;let S=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}M(S,D),o?.([...b.slice(0,D),S,...b.slice(D+1)]);},L=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:m("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...u,children:[jsx("div",{ref:v,className:m("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:k,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${L(b[0])}%`:0,right:`${100-L(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${L(b[0])}%`:0,top:`${100-L(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:m("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",R&&x===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${L(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${L(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:S=>T(S,D),onPointerMove:E,onPointerUp:N,onPointerCancel:N,onKeyDown:S=>P(S,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ja.displayName="Slider";var Yu=W.createContext(null),Xu=()=>{let e=W.useContext(Yu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},_i=W.createContext(null),qu=()=>{let e=W.useContext(_i);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Zu=W.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,u]=W.useState(()=>t==="single"?r?[r]:[]:r||[]),f=W.useRef(new Map),p=W.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=x=>{if(t==="single"){let y=h.includes(x)&&a?[]:[x];g||u(y),o?.(y[0]||"");}else {let C=h.includes(x)?h.filter(y=>y!==x):[...h,x];g||u(C),o?.(C);}},v=W.useCallback((x,C)=>{f.current.set(x,C),p.current.includes(x)||p.current.push(x);},[]),R=W.useCallback(x=>{f.current.delete(x),p.current=p.current.filter(C=>C!==x);},[]),w=W.useCallback(x=>{let C=p.current;if(C.length===0)return;let y=document.activeElement,M;f.current.forEach((P,L)=>{P===y&&(M=L);});let T=M?C.indexOf(M):-1,E;switch(x){case "first":E=0;break;case "last":E=C.length-1;break;case "next":E=T===-1?0:(T+1)%C.length;break;case "prev":E=T===-1?C.length-1:(T-1+C.length)%C.length;break}let N=C[E];f.current.get(N)?.focus();},[]);return jsx(Yu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:R,focusTrigger:w},children:jsx("div",{ref:c,"data-orientation":"vertical",className:m("w-full",e),...l,children:i})})});Zu.displayName="Accordion";var Qu=W.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Xu(),d=c.value.includes(t),u=n||c.disabled||false,f=W.useId(),p=W.useId();return r!==void 0?jsx(_i.Provider,{value:{value:t,isOpen:d,isDisabled:u,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":u?"":void 0,className:m("border-b",u&&"opacity-50",e),...i,children:[jsx(Ju,{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(em,{children:s})]})}):jsx(_i.Provider,{value:{value:t,isOpen:d,isDisabled:u,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":u?"":void 0,className:m("border-b",u&&"opacity-50",e),...i,children:s})})});Qu.displayName="AccordionItem";var Ju=W.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Xu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:u}=qu(),f=W.useRef(null);W.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:u,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:m("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"})]})})});Ju.displayName="AccordionTrigger";var em=W.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=qu();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:m("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})})})});em.displayName="AccordionContent";var nm=W.createContext(null),rm=()=>{let e=W.useContext(nm);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},om=W.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=W.useState(n),u=t!==void 0,f=u?t:c,p=W.useId(),g=W.useId(),h=b=>{o||(u||d(b),r?.(b));};return jsx(nm.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:m("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(Wi,{})]}),s]})})});om.displayName="Collapsible";var Wi=W.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=rm();return jsx("button",{ref:o,type:"button",id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,className:m("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e),onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:"h-4 w-4"})})});Wi.displayName="CollapsibleTrigger";var am=W.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=rm(),c=W.useRef(null),[d,u]=W.useState(void 0),[f,p]=W.useState(false),[g,h]=W.useState(a);W.useEffect(()=>{a?(h(true),p(true),requestAnimationFrame(()=>{c.current&&u(c.current.scrollHeight);})):(p(true),u(0));},[a]);let b=()=>{p(false),a||h(false),u(void 0);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:m("overflow-hidden",e),style:{...n,height:f?d!==void 0?d:"auto":a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,children:t})}):null});am.displayName="CollapsibleContent";var ns=W.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:m("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:m("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}%)`}})})]})});ns.displayName="Progress";var cm=W.createContext(null),dm=()=>{let e=W.useContext(cm);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},um=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=W.useState(n),c=t!==void 0,d=c?t:i,u=W.useRef(null),f=W.useId(),p=W.useRef(null),g=W.useRef(null),h=W.useCallback(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return W.useEffect(()=>{if(!s||!d)return;let b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,r]),W.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(cm.Provider,{value:{open:d,onOpenChange:h,triggerRef:u,contentId:f},children:e})};um.displayName="HoverCard";var mm=W.forwardRef(({asChild:e,children:t,onMouseEnter:n,onMouseLeave:r,onFocus:o,onBlur:a,...s},i)=>{let{onOpenChange:l,triggerRef:c}=dm(),d=g=>{n?.(g),l(true);},u=g=>{r?.(g),l(false);},f=g=>{o?.(g),l(true);},p=g=>{a?.(g),l(false);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:g=>{c.current=g,typeof i=="function"?i(g):i&&(i.current=g);},onMouseEnter:d,onMouseLeave:u,onFocus:f,onBlur:p,...s}):jsx("a",{ref:g=>{c.current=g,typeof i=="function"?i(g):i&&(i.current=g);},onMouseEnter:d,onMouseLeave:u,onFocus:f,onBlur:p,...s,children:t})});mm.displayName="HoverCardTrigger";var pm=W.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:u,triggerRef:f,contentId:p}=dm(),[g,h]=W.useState({top:0,left:0}),[b,v]=W.useState(false),R=W.useRef(null);W.useEffect(()=>{v(true);},[]),W.useEffect(()=>{if(!d||!f.current||!R.current)return;(()=>{if(!f.current||!R.current)return;let M=f.current.getBoundingClientRect(),T=R.current.getBoundingClientRect(),E=0,N=0;switch(t){case "top":E=M.top-T.height-n;break;case "bottom":E=M.bottom+n;break;case "left":N=M.left-T.width-n;break;case "right":N=M.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":N=M.left+o;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-o;break}else switch(r){case "start":E=M.top+o;break;case "center":E=M.top+M.height/2-T.height/2;break;case "end":E=M.bottom-T.height-o;break}h({top:E,left:N});})();},[d,t,n,r,o,f]);let w=y=>{a?.(y),u(true);},x=y=>{s?.(y),u(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 Xa.createPortal(jsx("div",{ref:y=>{R.current=y,typeof c=="function"?c(y):c&&(c.current=y);},id:p,"data-state":d?"open":"closed","data-side":t,className:m("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:w,onMouseLeave:x,...l,children:i}),document.body)});pm.displayName="HoverCardContent";var fm=W.createContext({size:"md",variant:"default",radius:"md"}),os=()=>W.useContext(fm);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var Y0=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),X0=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"}}),q0=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"}}),gm=W.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(fm.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));gm.displayName="Breadcrumb";var bm=W.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=os();return jsx("ol",{ref:n,className:m(Y0({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});bm.displayName="BreadcrumbList";var vm=W.forwardRef(({className:e,...t},n)=>{let{size:r}=os();return jsx("li",{ref:n,className:m("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});vm.displayName="BreadcrumbItem";var hm=W.forwardRef(({asChild:e,className:t,...n},r)=>jsx(e?Va:"a",{ref:r,className:m("transition-colors hover:text-foreground cursor-pointer",t),...n}));hm.displayName="BreadcrumbLink";var xm=W.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-medium text-foreground",e),...t}));xm.displayName="BreadcrumbPage";var ym=({children:e,className:t,...n})=>{let{size:r}=os();return jsx("li",{role:"presentation","aria-hidden":"true",className:m(X0({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};ym.displayName="BreadcrumbSeparator";var Rm=({className:e,...t})=>{let{size:n}=os();return jsxs("span",{role:"presentation","aria-hidden":"true",className:m(q0({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};Rm.displayName="BreadcrumbEllipsis";var Tm=W.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:m("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));Tm.displayName="AspectRatio";var Em=W.createContext(null),Yi=()=>{let e=W.useContext(Em);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},km=W.createContext(null),Pm=()=>{let e=W.useContext(km);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},Lm=W.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=W.useState(null);return jsx(Em.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:m("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(Xi,{})]})})});Lm.displayName="NavigationMenu";var Sm=W.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Yi();return jsx("ul",{ref:n,className:m("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});Sm.displayName="NavigationMenuList";var Dm=W.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Yi(),s=W.useId(),i=W.useRef(null),l=o===s,c=W.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(km.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:m("relative",e),...n,children:t})})});Dm.displayName="NavigationMenuItem";var Hm=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"),Im=W.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=Pm(),c=u=>{n?.(u),l(true);},d=u=>{r?.(u),l(!i);};return jsxs("button",{ref:u=>{s.current=u,typeof a=="function"?a(u):a&&(a.current=u);},type:"button","data-state":i?"open":"closed",className:m(Hm(),"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"})]})});Im.displayName="NavigationMenuTrigger";var Vm=W.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=Pm(),l=W.useRef(null),[c,d]=W.useState({top:0,left:0});W.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 u=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?Xa.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:m("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:u,onMouseLeave:f,...r}),document.body):null});Vm.displayName="NavigationMenuContent";var Am=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"),zm=W.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:m(Am(),t&&"bg-accent text-accent-foreground",e),...n}));zm.displayName="NavigationMenuLink";var Xi=W.forwardRef((e,t)=>null);Xi.displayName="NavigationMenuViewport";var Om=W.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Yi();return r?jsx("div",{ref:n,className:m("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});Om.displayName="NavigationMenuIndicator";var Gm=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",light:"hover:bg-muted/50",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),hn=W.forwardRef(({className:e,variant:t,size:n,iconSize:r,...o},a)=>{let i=r??{sm:14,md:16,lg:20}[n??"md"];return jsx("button",{ref:a,type:"button",className:m(Gm({variant:t,size:n}),e),"aria-label":"Close",...o,children:jsx(X,{style:{width:i,height:i}})})});hn.displayName="CloseButton";var as=W.createContext(null);function iw(){let e=W.useContext(as);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Xn(){return W.useContext(as)}var lw="16rem",cw="18rem",dw="3rem",uw="b",mw={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},pw={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},qi=W.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:u,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,R]=W.useState(false),[w,x]=W.useState(false),[C,y]=W.useState(e),M=t??C,T=W.useCallback(P=>{let L=typeof P=="function"?P(M):P;n?n(L):y(L);},[n,M]);W.useEffect(()=>{let P=()=>{R(window.innerWidth<768);};return P(),window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[]);let E=W.useCallback(()=>b?T(P=>!P):v?x(P=>!P):T(P=>!P),[v,T,x,b]);W.useEffect(()=>{if(b)return;let P=L=>{L.key===uw&&(L.metaKey||L.ctrlKey)&&(L.preventDefault(),E());};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[E,b]);let N=M?"expanded":"collapsed",k=W.useMemo(()=>({placement:r,state:N,open:M,setOpen:T,isMobile:v,openMobile:w,setOpenMobile:x,toggleDrawer:E,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,N,M,T,v,w,x,E,l,h,o,a,s,i]);return b?jsx(as.Provider,{value:k,children:jsx(Drawer.Root,{open:M,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsx(as.Provider,{value:k,children:jsx($n,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":lw,"--drawer-width-icon":dw,...u},className:m("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});qi.displayName="Drawer";var Um=W.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=Xn();if(!s)return jsx("div",{ref:a,className:m("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:u,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:r});if(l==="none")return jsx("div",{ref:a,className:m("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(fw,{open:u,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:m("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:m("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:m("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:m("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:m("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:m("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})})]})});Um.displayName="DrawerSidebar";var fw=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=W.useState(false);return W.useEffect(()=>{a(true);},[]),W.useEffect(()=>{if(t)return ct(),()=>dt()},[t]),!o||!t?null:Xa.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:m("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":cw},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},_m=W.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Xn();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:m("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"})]})});_m.displayName="DrawerTrigger";var Wm=W.forwardRef(({className:e,children:t,...n},r)=>{let o=Xn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque",c=o?.hideCloseButton||false;if(a){let d=s==="top"||s==="bottom",u=s==="left"||s==="right",f=u?mw[i]:pw[i],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},g={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:m("fixed inset-0 z-50",p[l])}),jsxs(Drawer.Content,{ref:r,className:m("fixed z-50 flex flex-col border bg-background",g[s],e),style:{...u?{width:f,height:"100%"}:{},...d?{maxHeight:f}:{},...n.style},...n,children:[u&&!c&&jsx(Drawer.Close,{asChild:true,children:jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10"})}),d&&jsx("div",{className:m("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:m("flex flex-col h-full",e),...n,children:t})});Wm.displayName="DrawerContent";var jm=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"header",className:m("flex flex-col gap-2 p-4",e),...t}));jm.displayName="DrawerHeader";var Ym=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"body",className:m("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));Ym.displayName="DrawerBody";var Xm=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:m("flex flex-col gap-2 p-4 mt-auto",e),...t}));Xm.displayName="DrawerFooter";var qm=W.forwardRef(({className:e,...t},n)=>Xn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));qm.displayName="DrawerTitle";var Zm=W.forwardRef(({className:e,...t},n)=>Xn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:m("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));Zm.displayName="DrawerDescription";var Qm=W.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Xn();return o?.mode==="overlay"?jsx(Drawer.Close,{ref:r,className:e,onClick:t,...n}):jsx(hn,{ref:r,variant:"light",className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...n})});Qm.displayName="DrawerClose";var Jm=W.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=Xn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",u=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:m("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(u,{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"})]})});Jm.displayName="DrawerToggle";var ep=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:m("mx-4 h-px bg-border",e),...t}));ep.displayName="DrawerSeparator";var tp=W.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:m("flex w-full min-w-0 flex-col gap-1",e),...t}));tp.displayName="DrawerMenu";var np=W.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:m("group/menu-item relative",e),...t}));np.displayName="DrawerMenuItem";var rp=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",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--border))] 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"}}),op=W.forwardRef(({asChild:e=false,isActive:t=false,variant:n="default",size:r="md",tooltip:o,className:a,children:s,...i},l)=>{let c=Xn(),d=c?.isMobile??false,u=c?.state??"expanded",f=jsx("button",{ref:l,type:"button","data-drawer":"menu-button","data-size":r,"data-active":t,className:m(rp({variant:n,size:r}),a),...i,children:s});return o?jsxs(Un,{children:[jsx(_n,{asChild:true,children:f}),jsx(Wn,{side:"right",align:"center",hidden:u!=="collapsed"||d,...typeof o=="string"?{children:o}:o})]}):f});op.displayName="DrawerMenuButton";var ap=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:m("relative flex w-full min-w-0 flex-col p-2",e),...t}));ap.displayName="DrawerGroup";var sp=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group-label",className:m("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}));sp.displayName="DrawerGroupLabel";var ip=W.forwardRef(({className:e,...t},n)=>jsx("main",{ref:n,className:m("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}));ip.displayName="DrawerInset";var gw=qi;var cp=W.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:m("w-full caption-bottom text-sm",e),...t})}));cp.displayName="Table";var dp=W.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:m("[&_tr]:border-b",e),...t}));dp.displayName="TableHeader";var up=W.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:m("[&_tr:last-child]:border-0",e),...t}));up.displayName="TableBody";var mp=W.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:m("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));mp.displayName="TableFooter";var pp=W.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:m("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));pp.displayName="TableRow";var fp=W.forwardRef(({className:e,...t},n)=>jsx("th",{ref:n,className:m("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));fp.displayName="TableHead";var gp=W.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:m("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));gp.displayName="TableCell";var bp=W.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:m("mt-4 text-sm text-muted-foreground",e),...t}));bp.displayName="TableCaption";function Rw({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(x,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:u=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...R},w){let[x,C]=W.useState(new Set),[y,M]=W.useState({columnId:null,direction:null}),[T,E]=W.useState({pageIndex:0,pageSize:u[0]||10}),N=o??x,k=l??y,P=f??T,L=K=>{a?a(K):C(K);},H=K=>{c?c(K):M(K);},D=K=>{p?p(K):E(K);},S=W.useMemo(()=>{if(!k.columnId||!k.direction)return t;let K=n.find(O=>O.id===k.columnId);return K?[...t].sort((O,_)=>{let A=K.accessor(O),j=K.accessor(_);if(A===j)return 0;if(A==null)return 1;if(j==null)return -1;let U=String(A).localeCompare(String(j),void 0,{numeric:true});return k.direction==="asc"?U:-U}):t},[t,k,n]),I=W.useMemo(()=>{if(!d)return S;let K=P.pageIndex*P.pageSize;return S.slice(K,K+P.pageSize)},[S,d,P]),z=Math.ceil(S.length/P.pageSize),G=K=>{if(K===true){let O=new Set(I.map((_,A)=>s(_,A)));L(O);}else L(new Set);},V=(K,O)=>{let _=new Set(N);O?_.add(K):_.delete(K),L(_);},F=I.length>0&&I.every((K,O)=>N.has(s(K,O))),B=I.some((K,O)=>N.has(s(K,O))),Q=K=>{if(!n.find(A=>A.id===K)?.sortable&&!i)return;let _="asc";k.columnId===K&&(k.direction==="asc"?_="desc":k.direction==="desc"&&(_=null)),H({columnId:_?K:null,direction:_});},ne=K=>k.columnId!==K?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):k.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:w,className:m("w-full",e),...R,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx($o,{checked:F?true:B?"indeterminate":false,onCheckedChange:G,"aria-label":"Select all"})}),n.map(K=>{let O=K.sortable??i;return jsx("th",{className:m("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:K.width},onClick:()=>O&&Q(K.id),children:jsxs("div",{className:"flex items-center gap-2",children:[K.header,O&&ne(K.id)]})},K.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((K,O)=>{let _=s(K,O),A=N.has(_);return jsxs("tr",{className:m("border-b transition-colors",v&&"hover:bg-muted/50",b&&O%2===1&&"bg-muted/30",A&&"bg-muted"),"data-state":A?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx($o,{checked:A,onCheckedChange:j=>V(_,!!j),"aria-label":`Select row ${O+1}`})}),n.map(j=>jsx("td",{className:"p-4 align-middle",children:j.cell?j.cell(K,O):j.accessor(K)},j.id))]},_)})})]})}),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:P.pageSize,onChange:K=>D({pageIndex:0,pageSize:Number(K.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:u.map(K=>jsx("option",{value:K,children:K},K))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",P.pageIndex+1," of ",z||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(te,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>D({...P,pageIndex:P.pageIndex-1}),disabled:P.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(te,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>D({...P,pageIndex:P.pageIndex+1}),disabled:P.pageIndex>=z-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var ww=W.forwardRef(Rw);var Zi=["January","February","March","April","May","June","July","August","September","October","November","December"];function Pw({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let[o,a]=W.useState(false),[s,i]=W.useState(false),l=W.useRef(null),c=W.useRef(null),d=getMonth(e),u=getYear(e);W.useEffect(()=>{function h(b){l.current&&!l.current.contains(b.target)&&a(false),c.current&&!c.current.contains(b.target)&&i(false);}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);let f=h=>{let b=setMonth(e,h);t(b),a(false);},p=h=>{let b=setYear(e,h);t(b),i(false);},g=W.useMemo(()=>{let h=[];for(let b=r;b>=n;b--)h.push(b);return h},[n,r]);return jsxs("div",{className:"flex items-center gap-2",children:[jsxs("div",{ref:l,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{a(!o),i(false);},className:m("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[120px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",o&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:Zi[d]}),jsx(ChevronDown,{className:m("h-4 w-4 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[140px] rounded-md border border-border bg-background shadow-lg",children:jsx(Ue,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Zi.map((h,b)=>jsx("button",{type:"button",onClick:()=>f(b),className:m("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",d===b&&"bg-primary/10 text-primary font-medium"),children:h},h))})})})]}),jsxs("div",{ref:c,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{i(!s),a(false);},className:m("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",s&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:u}),jsx(ChevronDown,{className:m("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),s&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[100px] rounded-md border border-border bg-background shadow-lg",children:jsx(Ue,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:g.map(h=>jsx("button",{type:"button",onClick:()=>p(h),className:m("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",u===h&&"bg-primary/10 text-primary font-medium"),children:h},h))})})})]})]})}function Lw(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-2 h-10 mb-2",children:[jsx(Pw,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:m("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:m("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]});let l=Zi[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:m("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:m("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 so({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=W.useMemo(()=>Lw(r,o,a),[r,o,a]);return jsx(DayPicker,{showOutsideDays:n,className:m("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-10 font-normal text-xs text-center",week:"flex w-full mt-1",day:m("relative h-10 w-10 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:m("size-10 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10 hover:text-primary","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:m("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:bg-transparent [&.outside-day]:text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0},outside:{backgroundColor:"transparent"}},components:{...s,MonthCaption:l},...i})}so.displayName="Calendar";var yp=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:m("mx-auto flex w-full justify-center",e),...t});yp.displayName="Pagination";var Rp=W.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:m("flex flex-row items-center gap-1",e),...t}));Rp.displayName="PaginationContent";var wp=W.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:m("",e),...t}));wp.displayName="PaginationItem";var ss=({className:e,isActive:t,size:n="icon",...r})=>jsx("a",{"aria-current":t?"page":void 0,className:m(tn({variant:t?"solid":"light",size:n}),e),...r});ss.displayName="PaginationLink";var Cp=({className:e,...t})=>jsxs(ss,{"aria-label":"Go to previous page",size:"md",className:m("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});Cp.displayName="PaginationPrevious";var Tp=({className:e,...t})=>jsxs(ss,{"aria-label":"Go to next page",size:"md",className:m("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});Tp.displayName="PaginationNext";var Mp=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:m("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"})]});Mp.displayName="PaginationEllipsis";var el=W.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:m("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));el.displayName=Command.displayName;var Vw=({children:e,...t})=>jsx(Aa,{...t,children:jsx(za,{className:"overflow-hidden p-0 shadow-lg",children:jsx(el,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Np=W.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:m("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})]}));Np.displayName=Command.Input.displayName;var Ep=W.forwardRef(({className:e,...t},n)=>jsx(Command.List,{ref:n,className:m("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ep.displayName=Command.List.displayName;var kp=W.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));kp.displayName=Command.Empty.displayName;var Pp=W.forwardRef(({className:e,...t},n)=>jsx(Command.Group,{ref:n,className:m("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}));Pp.displayName=Command.Group.displayName;var Lp=W.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:m("-mx-1 h-px bg-border",e),...t}));Lp.displayName=Command.Separator.displayName;var Sp=W.forwardRef(({className:e,...t},n)=>jsx(Command.Item,{ref:n,className:m("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Sp.displayName=Command.Item.displayName;var Dp=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Dp.displayName="CommandShortcut";var Hp=W.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,...s},i)=>{let[l,c]=W.useState(false),[d,u]=W.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:l?"text":"password",className:m("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:n,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{u(true),r?.(f);},onBlur:f=>{u(false),o?.(f);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:n,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Hp.displayName="PasswordInput";var Ip=W.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[u,f]=W.useState(s),[p,g]=W.useState(false),h=a!==void 0,b=h?a:u,v=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},R=()=>{v((b??0)+n);},w=()=>{v((b??0)-n);},x=T=>{let E=T.target.value;if(E==="")v(void 0);else {let N=parseFloat(E);isNaN(N)||v(N);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),R()):T.key==="ArrowDown"&&(T.preventDefault(),w());},y=r===void 0||(b??0)>r,M=o===void 0||(b??0)<o;return t?jsxs("div",{className:m("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:b??"",onChange:x,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:R,disabled:l||!M,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:m("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:b??"",onChange:x,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Ip.displayName="NumberInput";var Ap=W.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date",dateFormat:o="PPP",disabled:a=false,minDate:s,maxDate:i,className:l},c)=>{let[d,u]=W.useState(false),[f,p]=W.useState(t),g=e!==void 0,h=g?e:f,b=v=>{g||p(v),n?.(v),u(false);};return jsxs(nt,{open:d,onOpenChange:u,children:[jsx(ht,{asChild:true,children:jsxs(te,{ref:c,variant:"bordered",disabled:a,className:m("w-full justify-start text-left font-normal",!h&&"text-muted-foreground",l),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),h?format(h,o):r]})}),jsx(rt,{className:"w-auto p-0",align:"start",children:jsx(so,{mode:"single",selected:h,onSelect:b,disabled:v=>!!(s&&v<s||i&&v>i),initialFocus:true})})]})});Ap.displayName="DatePicker";var Fp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),zp=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"}}),Kp=W.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=(u,f)=>{let p=jsxs(Cr,{className:m(zp({size:r})),children:[u.src&&jsx(eo,{src:u.src,alt:u.alt||""}),jsx(Tr,{className:"text-xs",children:u.fallback||u.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&u.alt?jsxs(Un,{children:[jsx(_n,{asChild:true,children:p}),jsx(Wn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:u.alt})]},f):p},d=jsxs("div",{ref:s,className:m(Fp({size:r,className:e})),...a,children:[i.map((u,f)=>c(u,f)),l>0&&jsx(Cr,{className:m(zp({size:r})),children:jsxs(Tr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx($n,{delayDuration:300,children:d}):d});Kp.displayName="AvatarGroup";var Gp=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"}}),$p=W.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:u,...f},p)=>{let[g,h]=W.useState(n),[b,v]=W.useState(null),R=t!==void 0,w=R?t:g,x=b!==null?b:w,C=L=>{l||c||(R||h(L),r?.(L));},y=(L,H=false)=>{let D=i&&H?L+.5:L+1;C(D);},M=(L,H)=>{if(l||c)return;let D=L.currentTarget.getBoundingClientRect(),S=i&&L.clientX<D.left+D.width/2;v(S?H+.5:H+1);},T=()=>{v(null);},E=s==="heart"?Heart:Star,N=L=>x>=L+1?"full":x>=L+.5?"half":"empty",k=d?{color:d,fill:d}:{},P=u?{color:u}:{};return jsx("div",{ref:p,className:m(Gp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(L,H)=>{let D=N(H);return jsxs("button",{type:"button",className:m("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:S=>{let I=S.currentTarget.getBoundingClientRect(),z=i&&S.clientX<I.left+I.width/2;y(H,z);},onMouseMove:S=>M(S,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":w===H+1,children:[jsx(E,{className:m("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?P:void 0}),D!=="empty"&&jsx(E,{className:m("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...k,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});$p.displayName="Rating";var Wp=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),qw=cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),jp=W.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,avatar:u,children:f,onClick:p,...g},h)=>{let b=a||!!p,v=R=>{R.stopPropagation(),c?.();};return jsxs("div",{ref:h,role:b?"button":void 0,tabIndex:b&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:p,onKeyDown:b&&!d?R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p?.(R));}:void 0,className:m(Wp({variant:t,color:n,size:r,radius:o,clickable:b}),d&&"opacity-50 cursor-not-allowed",e),...g,children:[u&&jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:u}),s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:f}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx("button",{type:"button","aria-label":"Remove",onClick:v,disabled:d,className:m(qw({size:r})),children:jsx(X,{})})]})});jp.displayName="Chip";var Yp=createContext({direction:"horizontal"}),oC=({className:e,direction:t="horizontal",children:n,...r})=>jsx(Yp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:m("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),aC=Panel,sC=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(Yp),o=r==="vertical";return jsx(Separator,{className:m("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:m("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 Qp=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"}}),lC={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"}},Xp={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)"},Jp=W.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)),u=lC[t],f=(u.size-u.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:m(Qp({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:u.size,height:u.size,viewBox:`0 0 ${u.size} ${u.size}`,fill:"none",children:[jsx("circle",{className:m("stroke-muted",i),cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none"}),jsx("circle",{cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Xp[n]||Xp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:m("absolute font-medium text-foreground",u.fontSize),children:s(d)})]})});Jp.displayName="CircularProgress";var ef=W.createContext(null),uC=()=>{let e=W.useContext(ef);if(!e)throw new Error("OTP components must be used within InputOTP");return e},tf=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"}}),nf=W.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...u},f)=>{let[p,g]=W.useState(o),[h,b]=W.useState(0),[v,R]=W.useState(false),w=W.useRef(null),x=r!==void 0?r:p;W.useImperativeHandle(f,()=>w.current),W.useEffect(()=>{b(Math.min(x.length,n-1));},[x,n]),W.useEffect(()=>{x.length===n&&s&&s(x);},[x,n,s]);let C=k=>{let P=k.target.value;if(i&&P){let L=new RegExp(i.replace("^","").replace("$","").replace("+",""));P=P.split("").filter(H=>L.test(H)).join("");}P=P.slice(0,n),r===void 0&&g(P),a?.(P);},y=k=>{k.key==="ArrowLeft"?b(P=>Math.max(0,P-1)):k.key==="ArrowRight"&&b(P=>Math.min(x.length,n-1,P+1));},M=()=>{w.current?.focus();},T=()=>{R(true),b(Math.min(x.length,n-1));},E=()=>{R(false);},N={value:x,activeIndex:v?h:-1,maxLength:n,disabled:l};return jsx(ef.Provider,{value:N,children:jsxs("div",{className:m(tf({size:c}),t),onClick:M,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:x,onChange:C,onKeyDown:y,onFocus:T,onBlur:E,disabled:l,maxLength:n,className:m("absolute opacity-0 pointer-events-none w-0 h-0",e),...u}),d]})})});nf.displayName="InputOTP";var rf=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center",e),...t}));rf.displayName="InputOTPGroup";var of=W.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=uC(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":l,"data-filled":!!i,className:m("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[i,c&&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"})})]})});of.displayName="InputOTPSlot";var af=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));af.displayName="InputOTPSeparator";var cf=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),df=W.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:u,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=W.useState(""),R=W.useRef(null);W.useImperativeHandle(h,()=>R.current);let w=N=>{let k=N.trim();if(k.length<i||k.length>l||s&&r.length>=s||!d&&r.some(L=>L.text.toLowerCase()===k.toLowerCase()))return;let P={id:crypto.randomUUID(),text:k};o?.([...r,P]),v("");},x=N=>{u||f||o?.(r.filter(k=>k.id!==N));},C=N=>{if(c.includes(N.key)){if(N.key==="Tab"&&!b)return;N.preventDefault(),w(b);}N.key==="Backspace"&&!b&&r.length>0&&x(r[r.length-1].id);},y=N=>{let k=N.target.value;if(k.includes(",")){k.split(",").forEach(L=>{L.trim()&&w(L);});return}v(k);},M=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(L=>{w(L);});},T=()=>{R.current?.focus();},E=s?r.length>=s:false;return jsxs("div",{className:m("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",u&&"cursor-not-allowed opacity-50",e),onClick:T,children:[r.map(N=>p?p(N,()=>x(N.id)):jsxs("span",{className:m(cf({variant:t,size:n})),children:[N.text,!u&&!f&&jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),x(N.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${N.text}`,children:jsx(X,{className:"h-3 w-3"})})]},N.id)),!E&&!f&&jsx("input",{ref:R,type:"text",value:b,onChange:y,onKeyDown:C,onPaste:M,placeholder:r.length===0?a:"",disabled:u,className:m("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});df.displayName="TagInput";var mf=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"}}),pf=W.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:m(mf({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]}));pf.displayName="EmptyState";var gf=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),bf=W.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let u=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:m(gf({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:m("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:m("[&>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:m("flex items-center gap-0.5 text-sm",f),children:[jsx(u,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:m("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});bf.displayName="StatCard";var ol=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"}}),wC=({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:m("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 CC({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:u,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:R,...w},x){let[C,y]=W.useState(null),[M,T]=W.useState(null),[E,N]=W.useState(new Set(f)),k=u!==void 0,P=k?new Set(u):E,[L,H]=W.useState(new Set(b)),D=h!==void 0,S=D?new Set(h):L,I=(O,_)=>{y(_),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(_));},z=(O,_)=>{O.preventDefault(),!(C===null||C===_)&&T(_);},G=()=>{T(null);},V=(O,_)=>{if(O.preventDefault(),!r||C===null||C===_){y(null),T(null);return}let A=[...r],[j]=A.splice(C,1);A.splice(_,0,j),s?.(A),y(null),T(null);},F=()=>{y(null),T(null);},B=W.useCallback((O,_)=>{if(!r)return;let A=new Set(P),j=!A.has(O.id);d?j?A.add(O.id):A.delete(O.id):(A.clear(),j&&A.add(O.id)),k||N(A);let U=r.filter(he=>A.has(he.id));p?.(Array.from(A),{selected:j,selectedItems:U,item:O,event:_});},[r,P,d,k,p]),Q=W.useCallback((O,_)=>{if(!r)return;let A=new Set(S),j=!A.has(O.id);j?A.add(O.id):A.delete(O.id),D||H(A);let U=r.filter(he=>A.has(he.id));v?.(Array.from(A),{checked:j,checkedItems:U,item:O,event:_});},[r,S,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:x,role:"list",className:m(ol({variant:t,size:n,className:e})),...w,children:r.map((O,_)=>{let A=P.has(O.id),j=S.has(O.id);return jsxs("div",{role:"listitem","aria-selected":c?A:void 0,draggable:a,onDragStart:a?me=>I(me,_):void 0,onDragOver:a?me=>z(me,_):void 0,onDragLeave:a?G:void 0,onDrop:a?me=>V(me,_):void 0,onDragEnd:a?F:void 0,onClick:c&&!g?me=>B(O,me):void 0,className:m("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===_&&"opacity-50 scale-[1.02] z-10",M===_&&"border-primary border-dashed border rounded-md",A&&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(wC,{checked:j,onClick:me=>Q(O,me)}),jsx("div",{className:"flex-1 min-w-0",children:o(O,_)})]},O.id)})}):jsx("div",{ref:x,role:"list",className:m(ol({variant:t,size:n,className:e})),...w,children:R})}var TC=W.forwardRef(CC),hf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),xf=W.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:m(hf({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})]}));xf.displayName="ListItem";var yf=W.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:m("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]}));yf.displayName="ListItemText";var Cf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Tf=W.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:m(Cf({position:t,className:e})),...n}));Tf.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"}}),Nf=W.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:m(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]}));Nf.displayName="TimelineItem";var Ef=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex-1 pt-0.5",e),...t}));Ef.displayName="TimelineContent";var kf=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));kf.displayName="TimelineOpposite";var Lf=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}}),Sf=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}}),Df=W.createContext({}),Hf=W.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,u]=W.useState(a),f=o!==void 0?o:d,p=W.useCallback(g=>{o===void 0&&u(g),s?.(g);},[o,s]);return jsx(Df.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:m(Lf({size:t,fullWidth:n,className:e})),...l,children:r})})});Hf.displayName="SegmentedControl";var If=W.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=W.useContext(Df),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:m(Sf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});If.displayName="SegmentedControlItem";var Vf=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"}}),Af=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},ms=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]},zf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${ms(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},Of=W.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:u=true,disabled:f,...p},g)=>{let[h,b]=W.useState(false),[v,R]=W.useState(false),[w,x]=W.useState([]),C=W.useRef(null),y=W.useCallback(S=>{if(!S||S.length===0)return;let I=Array.from(S),z=[],G=[];(u?I:[I[0]]).forEach(F=>{let B=zf(F,c,d);B.length>0?G.push({file:F,errors:B}):z.push(F);}),x(G),z.length>0&&r?.(z),G.length>0&&o?.(G);},[c,d,u,r,o]),M=W.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!f&&(b(true),S.dataTransfer.items)){let z=Array.from(S.dataTransfer.items).some(G=>{if(G.kind!=="file")return true;if(d&&d.length>0){let V=G.type;return !d.some(F=>F.endsWith("/*")?V.startsWith(F.slice(0,-2)):V===F)}return false});R(z);}},[f,d]),T=W.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!f&&(S.dataTransfer.dropEffect="copy");},[f]),E=W.useCallback(S=>{S.preventDefault(),S.stopPropagation();let I=S.currentTarget.getBoundingClientRect(),z=S.clientX,G=S.clientY;(z<I.left||z>I.right||G<I.top||G>I.bottom)&&(b(false),R(false));},[]),N=W.useCallback(S=>{S.preventDefault(),S.stopPropagation(),b(false),R(false),!f&&y(S.dataTransfer.files);},[f,y]),k=W.useCallback(()=>{f||C.current?.click();},[f]),P=W.useCallback(S=>{y(S.target.files),S.target.value="";},[y]),L=W.useCallback(S=>{f||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:m("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:M,onDragOver:T,onDragLeave:E,onDrop:N,onClick:k,onKeyDown:L,className:m(Vf({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:u,disabled:f,onChange:P,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 ${ms(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),w.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:w.map(({file:S,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:S.name}),":"," ",I.map(z=>z.message).join(", ")]},S.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(S=>{let I=Af(S.file);return jsxs("div",{className:m("flex items-center gap-3 rounded-lg border p-3",S.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:S.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[ms(S.file.size),S.error&&jsx("span",{className:"ml-2 text-danger",children:S.error})]}),S.progress!==void 0&&S.progress<100&&jsx(ns,{value:S.progress,className:"mt-2 h-1"})]}),jsxs(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:z=>{z.stopPropagation(),a?.(S.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},S.id)})})]})});Of.displayName="FileUpload";var IC=`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")`,Ff=cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),na=W.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,...d},u)=>jsx("button",{ref:u,type:"button",disabled:c,onClick:g=>{l?.(g),r?.(e);},className:m(Ff({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-ring ring-offset-2",i),style:{backgroundImage:n?IC:void 0,backgroundSize:n?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...d,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));na.displayName="ColorSwatch";var Kf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Gf=W.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,className:c,style:d,...u},f)=>{let[p,g]=W.useState(t),h=e??p,b=W.useCallback(R=>{l||(e===void 0&&g(R),n?.(R));},[e,n,l]),v=R=>R.toLowerCase();return jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:m(Kf({layout:r}),c),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...d},...u,children:a.map(R=>{let w=h?v(h)===v(R):false;return jsx(na,{role:"option",color:R,size:s,shape:i,isSelected:w,onSelect:b,disabled:l,"aria-selected":w},R)})})});Gf.displayName="ColorSwatchPicker";var zC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],$f={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Uf=W.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=zC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,u]=W.useState(e??t),f=W.useId();W.useEffect(()=>{e!==void 0&&u(e);},[e]);let p=b=>{u(b),n?.(b);},g=b=>{u(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();u(v),n?.(v);};return l==="simple"?jsxs("label",{className:m("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",$f[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(nt,{children:[jsx(ht,{asChild:true,children:jsx("button",{ref:c,disabled:r,className:m("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",$f[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`})}),jsx(rt,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(na,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Uf.displayName="ColorPicker";var _f=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"}}),il=e=>String(e).padStart(2,"0"),GC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},$C=(e,t)=>`${il(e)}:${il(t)}`,Wf=W.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},u)=>{let[f,p]=W.useState(n??""),[g,h]=W.useState(false);W.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=GC(f||"00:00"),R=E=>{let N=E.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&r?.(N);},w=(E,N)=>{let k=Math.max(0,Math.min(23,E)),P=Math.max(0,Math.min(59,N)),L=$C(k,P);p(L),r?.(L);},x=()=>w(b+1,v),C=()=>w(b-1,v),y=()=>w(b,v+a),M=()=>w(b,v-a),T=({value:E,onIncrement:N,onDecrement:k})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:N,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:il(E)}),jsx(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:k,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:u,type:"time",value:f,onChange:R,disabled:c,className:m(_f({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(nt,{open:g,onOpenChange:h,children:[jsx(ht,{asChild:true,children:jsxs(te,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxs(rt,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(T,{value:b,onIncrement:x,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:v,onIncrement:y,onDecrement:M,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(te,{variant:"bordered",size:"sm",onClick:()=>{let E=new Date;w(E.getHours(),E.getMinutes());},children:"Now"}),jsx(te,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Wf.displayName="TimeInput";var jf=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"}}),_C=(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}},ll=(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},Yf=(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},Xf=W.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:u="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",disabled:h,placeholder:b,...v},R)=>{let[w,x]=W.useState(r),[C,y]=W.useState(""),[M,T]=W.useState(false),E=n!==void 0?n:w,N=f??_C(a,s);W.useEffect(()=>{!M&&E!==void 0&&y(ll(E,i,p,g));},[E,i,p,g,M]);let k=S=>{let I=S.target.value;if(!I){y(""),n===void 0&&x(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(I))return;y(I);let G=Yf(I,p,g);if(G!==void 0){let V=G;l!==void 0&&G<l&&(V=l),c!==void 0&&G>c&&(V=c),n===void 0&&x(V),o?.(V);}},P=()=>{T(true),E!==void 0&&y(E.toString().replace(".",g));},L=()=>{T(false),y(E!==void 0?ll(E,i,p,g):"");},H=d&&u==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:N}),D=d&&u==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:N});return jsxs("div",{className:"relative flex items-center",children:[H&&jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsx("input",{ref:R,type:"text",inputMode:"decimal",value:C,onChange:k,onFocus:P,onBlur:L,disabled:h,placeholder:b??`0${g}${"0".repeat(i)}`,className:m(jf({size:t}),H&&"pl-8",D&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...v}),D&&jsx("div",{className:"absolute right-3 pointer-events-none",children:D})]})});Xf.displayName="CurrencyInput";var qf=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"}}),cl={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:"#####-####"}},YC=(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}},er=e=>["#","A","*"].includes(e),fs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(er(s)){if(o<e.length){let i=e[o];YC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},dl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];er(o)&&(n+=e[r]);}return n},Zf=(e,t)=>e.split("").map(n=>er(n)?t:n).join(""),XC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)er(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,er(t[i])&&s++;for(;a<t.length&&!er(t[a]);)a++;return Math.min(a,e.length)},Qf=W.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,...u},f)=>{let p=typeof a=="string"&&a in cl?cl[a].mask:a,[g,h]=W.useState(r),[b,v]=W.useState(""),[R,w]=W.useState(false),x=W.useRef(null),C=n!==void 0?n:g;W.useImperativeHandle(f,()=>x.current),W.useEffect(()=>{let E=fs(C,p,true);v(E);},[C,p]);let y=E=>{let N=E.target.value,k=E.target.selectionStart??0,P=N.replace(/[^\w]/g,""),L=fs(P,p,true),H=dl(L,p);v(L),n===void 0&&h(l?L:H),o?.(H,L),requestAnimationFrame(()=>{if(x.current){let D=XC(L,p,k);x.current.setSelectionRange(D,D);}});},M=E=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(E.key)||E.ctrlKey||E.metaKey)return;let N=x.current;if(!N)return;let k=N.selectionStart??0;if(E.key==="Backspace"&&k>0){let P=k-1;for(;P>0&&!er(p[P]);)P--;let L=dl(b,p),H=0;for(let I=0;I<P&&I<p.length;I++)er(p[I])&&H++;let D=L.slice(0,Math.max(0,H-1))+L.slice(H),S=fs(D,p,true);v(S),n===void 0&&h(l?S:D),o?.(D,S),E.preventDefault(),requestAnimationFrame(()=>{x.current&&x.current.setSelectionRange(P,P);});}},T=i?Zf(p,s):d;return jsx("input",{ref:x,type:"text",value:b,onChange:y,onKeyDown:M,onFocus:()=>w(true),onBlur:()=>w(false),disabled:c,placeholder:T,className:m(qf({size:t}),e),style:{borderColor:R?"var(--color-foreground)":void 0},...u})});Qf.displayName="MaskedInput";var Jf=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"}}),vs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},ml={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},ul=(e,t)=>String(e).padStart(t,"0"),bs=(e,t)=>{let n=ul(e.getDate(),2),r=ul(e.getMonth()+1,2),o=ul(e.getFullYear(),4),a=vs[t],s=ml[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},eg=(e,t)=>{let n=vs[t],r=e.split(n);if(r.length!==3)return null;let o=ml[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},JC=e=>e.toLowerCase(),eT=e=>{let t=vs[e];return ml[e].map(r=>r==="year"?"####":"##").join(t)},tg=W.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,format:a="DD/MM/YYYY",minDate:s,maxDate:i,showIcon:l=true,disabled:c,placeholder:d,...u},f)=>{let[p,g]=W.useState(r??null),[h,b]=W.useState(""),[v,R]=W.useState(null),w=W.useRef(null),x=n!==void 0?n:p;W.useImperativeHandle(f,()=>w.current),W.useEffect(()=>{x?(b(bs(x,a)),R(null)):b("");},[x,a]);let C=vs[a],y=eT(a),M=N=>{let k=N.target.value;k=k.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let P=k.replace(new RegExp(`\\${C}`,"g"),""),L="",H=0;for(let D=0;D<y.length&&H<P.length;D++)y[D]==="#"?(L+=P[H],H++):L+=y[D];if(b(L),L.length===y.length){let D=eg(L,a);if(D){if(s&&D<s){R(`Date must be after ${bs(s,a)}`);return}if(i&&D>i){R(`Date must be before ${bs(i,a)}`);return}R(null),n===void 0&&g(D),o?.(D);}else R("Invalid date");}else n===void 0&&g(null),o?.(null),R(null);},T=()=>{h&&h.length!==y.length&&(b(""),R(null),n===void 0&&g(null),o?.(null));},E=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxs("div",{className:"relative",children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",value:h,onChange:M,onBlur:T,disabled:c,placeholder:d??JC(a),className:m(Jf({size:t}),l&&"pr-10",v&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!v,"aria-describedby":v?"date-error":void 0,...u}),l&&jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsx(Calendar,{className:m(E,"text-muted-foreground")})}),v&&jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});tg.displayName="DateInput";var rg=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"}}),og=[{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:"(###) ###-####"}],hs=(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},aT=e=>e.replace(/#/g,"_"),ag=W.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=og,showCountrySelect:c=true,showDialCode:d=false,disabled:u,placeholder:f,...p},g)=>{let[h,b]=W.useState(r),[v,R]=W.useState(a??s),[w,x]=W.useState(false),[C,y]=W.useState(false),[M,T]=W.useState(false),[E,N]=W.useState({top:0,left:0,width:0}),k=W.useRef(null),P=W.useRef(null),L=n!==void 0?n:h,H=a??v,D=l.find(V=>V.code===H)??l[0],S=hs(L,D.format);W.useEffect(()=>{T(true);},[]),W.useEffect(()=>{if(C&&k.current){let V=k.current.getBoundingClientRect();N({top:V.bottom+4,left:V.left,width:Math.max(V.width,280)});}},[C]),W.useEffect(()=>{if(!C)return;let V=F=>{k.current&&!k.current.contains(F.target)&&P.current&&!P.current.contains(F.target)&&y(false);};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]),W.useEffect(()=>{if(!C)return;let V=F=>{F.key==="Escape"&&y(false);};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[C]);let I=V=>{let B=V.target.value.replace(/\D/g,"");n===void 0&&b(B);let Q=hs(B,D.format),ne=`${D.dialCode} ${Q}`;o?.(B,ne,D);},z=V=>{let F=l.find(ne=>ne.code===V);if(!F)return;a===void 0&&R(V),i?.(F);let B=hs(L,F.format),Q=`${F.dialCode} ${B}`;o?.(L,Q,F),y(false);};return jsxs("div",{className:"flex",children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:k,type:"button",disabled:u,onClick:()=>y(!C),className:m("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:D.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:D.dialCode})]}),jsx(ChevronDown,{className:m("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),M&&C&&Xa.createPortal(jsx("div",{ref:P,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:E.top,left:E.left,minWidth:E.width},children:jsx(Ue,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(V=>jsxs("div",{role:"option","aria-selected":V.code===H,onClick:()=>z(V.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:V.code===H&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:V.flag}),jsx("span",{className:"flex-1",children:V.name}),jsx("span",{className:"text-xs text-muted-foreground",children:V.dialCode})]})]},V.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:D.dialCode}),jsx("input",{ref:g,type:"tel",inputMode:"tel",value:S,onChange:I,onFocus:()=>x(true),onBlur:()=>x(false),disabled:u,placeholder:f??aT(D.format),className:m(rg({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:w?"var(--color-foreground)":void 0},...p})]})]})});ag.displayName="PhoneInput";var ig=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"outline",size:"md",sticky:false}}),lg=W.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=W.useState(false),u={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:m(ig({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:m("items-center gap-4 flex-1 justify-end",u),children:a}),jsx("button",{type:"button",className:m("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,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:m("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})]})});lg.displayName="Navbar";var cg=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center gap-2 font-semibold text-lg",e),...t}));cg.displayName="NavbarBrand";var dg=W.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:m("flex items-center gap-4",o,e),...n})});dg.displayName="NavbarContent";var ug=W.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:m("flex items-center",t&&"text-primary font-medium",e),...n}));ug.displayName="NavbarItem";var mg=W.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:m("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));mg.displayName="NavbarLink";var fg=cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",outline:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"outline",size:"md",underline:"hover"}}),gg=W.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:m(fg({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"})]})});gg.displayName="Link";var bg=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"}}),vg=W.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:u,...f},p)=>{let[g,h]=W.useState(false);W.useEffect(()=>{let R=c?.current||window,w=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return R.addEventListener("scroll",w,{passive:true}),w(),()=>{R.removeEventListener("scroll",w);}},[n,c,g,d]);let b=R=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),u?.(R);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:m(bg({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(te,{ref:p,type:"button",variant:a,color:s,size:"icon",radius:l,onClick:b,"aria-label":"Back to top",className:m("shadow-lg",i==="sm"&&"h-9 w-9",i==="md"&&"h-10 w-10",i==="lg"&&"h-12 w-12"),...f,children:r||jsx(ArrowUp,{className:v})})})});vg.displayName="BackTop";var xT=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),yT=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),hg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),Rs=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),xg=W.createContext(null),nr=()=>{let e=W.useContext(xg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},yg=W.createContext(null),oa=()=>{let e=W.useContext(yg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},fl=W.createContext(null),Rg=W.createContext(null),wg=W.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=W.useState(null);return jsx(xg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:m("flex h-10 items-center space-x-1 border bg-background p-1",xT({radius:n}),e),...r,children:t})})});wg.displayName="Menubar";var Cg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=nr(),r=W.useId(),o=W.useRef(null),a=t===r,s=W.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(yg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};Cg.displayName="MenubarMenu";var Tg=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Tg.displayName="MenubarGroup";var Mg=({children:e,container:t})=>{let[n,r]=W.useState(false);return W.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Mg.displayName="MenubarPortal";var Ng=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=W.useState(n),s=t!==void 0,i=s?t:o,l=W.useRef(null),c=W.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(fl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ng.displayName="MenubarSub";var Eg=W.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})}));Eg.displayName="MenubarRadioGroup";var kg=W.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=nr(),{menuId:l,triggerRef:c,open:d,onOpenChange:u}=oa(),f=g=>{t?.(g),u(!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:m("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",yT({radius:i}),e),onClick:f,onMouseEnter:p,...r})});kg.displayName="MenubarTrigger";var Pg=W.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=nr(),l=W.useContext(fl);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:u}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{u.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:m("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",Rs({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Pg.displayName="MenubarSubTrigger";var Lg=W.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=nr(),i=W.useContext(fl);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[u,f]=W.useState({top:0,left:0}),[p,g]=W.useState(false),h=W.useRef(null);W.useEffect(()=>{g(true);},[]),W.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let w=d.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),C=w.top,y=w.right+t;y+x.width>window.innerWidth&&(y=w.left-x.width-t),f({top:C,left:y});})();},[l,t,d]);let b=R=>{n?.(R),c(true);},v=R=>{r?.(R),c(false);};return !p||!l?null:Xa.createPortal(jsx("div",{ref:R=>{h.current=R,typeof a=="function"?a(R):a&&(a.current=R);},role:"menu","data-state":l?"open":"closed",className:m("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",hg({radius:s}),e),style:{top:u.top,left:u.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});Lg.displayName="MenubarSubContent";var Sg=W.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=nr(),{triggerRef:l,open:c,onOpenChange:d}=oa(),[u,f]=W.useState({top:0,left:0}),[p,g]=W.useState(false),h=W.useRef(null);return W.useEffect(()=>{g(true);},[]),W.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),w=v.bottom+r,x=v.left+n;t==="center"?x=v.left+v.width/2-R.width/2:t==="end"&&(x=v.right-R.width-n),f({top:w,left:x});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,n,r,l]),W.useEffect(()=>{if(!c)return;let b=v=>{let R=v.target;h.current&&!h.current.contains(R)&&l.current&&!l.current.contains(R)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),W.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:Xa.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:m("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",hg({radius:i}),e),style:{top:u.top,left:u.left},...a,children:o}),document.body)});Sg.displayName="MenubarContent";var Dg=W.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=nr(),{onOpenChange:l}=oa(),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:m("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",Rs({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Dg.displayName="MenubarItem";var Hg=W.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=nr(),{onOpenChange:c}=oa(),d=u=>{if(o){u.preventDefault();return}a?.(u),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:m("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",Rs({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 Ig=W.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=nr(),{onOpenChange:l}=oa(),c=W.useContext(Rg),d=c?.value===n,u=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:m("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",Rs({radius:i}),!r&&"cursor-pointer",e),onClick:u,...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]})});Ig.displayName="MenubarRadioItem";var Vg=W.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Vg.displayName="MenubarLabel";var Ag=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-muted",e),...t}));Ag.displayName="MenubarSeparator";var zg=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});zg.displayName="MenubarShortcut";var Og=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"}}),Bg=W.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=W.Children.toArray(o);return jsx("div",{ref:s,className:m(Og({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>W.isValidElement(l)?W.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)})});Bg.displayName="Steps";var Fg=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"}}),wT=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"}}),CT=cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),Kg=W.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:m(Fg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:m("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:m(wT({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:m("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:m("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:m(CT({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Kg.displayName="Step";var $g=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"}}),Ug=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}}),_g=W.createContext(null),ST=()=>{let e=W.useContext(_g);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},DT=({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:m("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"})})}),Wg=({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:u,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:R,handleDrop:w,allowDrop:x,onDragStart:C,onDragOver:y,onDragEnter:M,onDragLeave:T,onDragEnd:E,showLine:N,showIcon:k,showHandle:P,dragIcon:L,icon:H,leafIcon:D,folderIcon:S,folderOpenIcon:I,blockNode:z,disabled:G,size:V,getAllKeys:F}=ST(),B=e.children&&e.children.length>0,Q=e.isLeaf??!B,ne=o.has(e.key),K=s.has(e.key),O=c.has(e.key),_=d.has(e.key),A=g?.key===e.key,j=b===e.key,U=!!(G||e.disabled),he=l&&e.selectable!==false,me=f&&e.checkable!==false,zn=W.useMemo(()=>U?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,U]),oe=W.useMemo(()=>L!==void 0?L:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[L,p]),tt=W.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:ne,isLeaf:Q}):H:Q?D:ne?I:S,[e.icon,H,ne,Q,D,S,I]),On=Y=>{if(!zn)return;Y.stopPropagation(),Y.dataTransfer.effectAllowed="move";let Se=Y.currentTarget,ie=Se.cloneNode(true),Fe=document.documentElement.classList.contains("dark"),Ke=Fe?"#0a0a0a":"#ffffff",Fn=Fe?"#27272a":"#e4e4e7";ie.style.cssText=`
|
|
43
|
+
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,className:m("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...a,children:r})]})});Ue.displayName="ScrollArea";var _d=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Yd=j.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:u=3,maxDropdownHeight:f=240,radius:p,className:g,...h},b)=>{let[v,R]=j.useState(false),[w,x]=j.useState(""),[C,y]=j.useState(r||""),[M,T]=j.useState(r||[]),[E,N]=j.useState({top:0,left:0,width:0}),k=j.useRef(null),P=j.useRef(null),L=j.useRef(null),H=j.useRef(null),D=n!==void 0?n:C,S=n!==void 0?n:M,I=n!==void 0,z=A=>{d&&D===A?(I||y(""),o?.("")):(I||y(A),o?.(A)),R(false),x("");},G=A=>{let _=S.includes(A)?S.filter(U=>U!==A):[...S,A];I||T(_),o?.(_);},V=(A,_)=>{_.stopPropagation();let U=S.filter(he=>he!==A);I||T(U),o?.(U);},F=A=>{A.stopPropagation(),t?(I||T([]),o?.([])):(I||y(""),o?.(""));},B=e.find(A=>A.value===D),Q=e.filter(A=>S.includes(A.value)),ne=Q.slice(0,u),K=Q.length-u,O=s?e.filter(A=>A.label.toLowerCase().includes(w.toLowerCase())):e;j.useEffect(()=>{if(v&&P.current){let A=P.current.getBoundingClientRect();N({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||x("");},[v,s]),j.useEffect(()=>{let A=_=>{let U=_.target,he=k.current&&!k.current.contains(U),me=L.current&&!L.current.contains(U);he&&me&&(R(false),x(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),j.useEffect(()=>{if(!v)return;let A=_=>{L.current?.contains(_.target)||(R(false),x(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[v]);let W=t?S.length>0:!!D;return jsxs("div",{ref:k,className:m("relative",g),...h,children:[jsxs("div",{ref:A=>{P.current=A,typeof b=="function"?b(A):b&&(b.current=A);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&R(!v),className:m(_d({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:m(!B&&"text-muted-foreground"),children:B?B.label:a}),t&&jsx(Fragment,{children:Q.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[ne.map(A=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsx("span",{role:"button",tabIndex:0,onClick:_=>V(A.value,_),onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&V(A.value,_);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X,{className:"h-3 w-3"})})]},A.value)),K>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",K," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&F(A);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:m("h-4 w-4 opacity-50 transition-transform",v&&"rotate-180")})]})]}),v&&!c&&typeof document<"u"&&Xa.createPortal(jsxs("div",{ref:L,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:E.top,left:E.left,minWidth:E.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:H,type:"text",value:w,onChange:A=>x(A.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(Ue,{style:{maxHeight:f},onWheel:A=>A.stopPropagation(),children:jsx("div",{className:"p-1",children:O.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(A=>{let _=t?S.includes(A.value):D===A.value;return jsxs("div",{role:"option","aria-selected":_,onClick:()=>{A.disabled||(t?G(A.value):z(A.value));},className:m("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_&&jsx(Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});Yd.displayName="Select";var Xd=j.createContext(null),Wo=()=>{let e=j.useContext(Xd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Vi=j.createContext(null),no=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=j.useState(n),[s,i]=j.useState(-1),l=t!==void 0,c=l?t:o,d=j.useRef(null),u=j.useRef(null),f=j.useId(),p=j.useRef(new Map),g=j.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=j.useCallback((v,R)=>{p.current.set(v,R);},[]),b=j.useCallback(v=>{p.current.delete(v);},[]);return jsx(Xd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:u,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};no.displayName="Dropdown";var ro=j.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Wo();return jsx("div",{ref:u=>{i.current=u,typeof o=="function"?o(u):o&&(o.current=u);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:u=>{t?.(u),s(!a);},onKeyDown:u=>{n?.(u),(u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),s(true)),(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});ro.displayName="DropdownTrigger";var oo=j.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,children:c,...d},u)=>{let{open:f,onOpenChange:p,triggerRef:g,contentRef:h,contentId:b,activeIndex:v,setActiveIndex:R,items:w}=Wo(),[x,C]=j.useState({top:0,left:0}),[y,M]=j.useState(t),[T,E]=j.useState(false),N=j.useRef(0);if(j.useEffect(()=>{E(true);},[]),j.useEffect(()=>{f&&(N.current=w.current.size);},[f,w]),j.useEffect(()=>{if(!f||!g.current||!h.current)return;let P=()=>{if(!g.current||!h.current)return;let L=g.current.getBoundingClientRect(),H=h.current.getBoundingClientRect(),D=window.innerWidth,S=window.innerHeight,I=0,z=0,G=t;switch(t){case "top":I=L.top-H.height-n,I<a&&(I=L.bottom+n,G="bottom");break;case "bottom":I=L.bottom+n,I+H.height>S-a&&(I=L.top-H.height-n,G="top");break;case "left":z=L.left-H.width-n,z<a&&(z=L.right+n,G="right");break;case "right":z=L.right+n,z+H.width>D-a&&(z=L.left-H.width-n,G="left");break}if(G==="top"||G==="bottom"){switch(r){case "start":z=L.left+o;break;case "center":z=L.left+L.width/2-H.width/2;break;case "end":z=L.right-H.width-o;break}z<a?z=a:z+H.width>D-a&&(z=D-H.width-a);}else {switch(r){case "start":I=L.top+o;break;case "center":I=L.top+L.height/2-H.height/2;break;case "end":I=L.bottom-H.height-o;break}I<a?I=a:I+H.height>S-a&&(I=S-H.height-a);}C({top:I,left:z}),M(G);};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[f,t,n,r,o,a,g]),j.useEffect(()=>{if(!f)return;let P=L=>{let H=L.target;h.current&&!h.current.contains(H)&&g.current&&!g.current.contains(H)&&(s?.(),p(false));};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[f,p,s,g,h]),j.useEffect(()=>{if(!f)return;let P=L=>{let H=Array.from(w.current.entries()).sort(([S],[I])=>S-I).map(([,S])=>S),D=H.length;if(D!==0)switch(L.key){case "Escape":L.preventDefault(),i?.(),p(false),g.current?.focus();break;case "ArrowDown":L.preventDefault(),v===-1||v>=D-1?R(l?0:Math.min(v+1,D-1)):R(v+1);break;case "ArrowUp":L.preventDefault(),v<=0?R(l?D-1:0):R(v-1);break;case "Home":L.preventDefault(),R(0);break;case "End":L.preventDefault(),R(D-1);break;case "Enter":case " ":L.preventDefault(),v>=0&&v<D&&H[v]?.click();break;case "Tab":p(false);break}};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[f,p,i,v,R,w,l,g]),j.useEffect(()=>{f&&v>=0&&Array.from(w.current.entries()).sort(([L],[H])=>L-H).map(([,L])=>L)[v]?.focus();},[f,v,w]),!T||!f)return null;let k={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"}[y];return Xa.createPortal(jsx("div",{ref:P=>{h.current=P,typeof u=="function"?u(P):u&&(u.current=P);},id:b,role:"menu","aria-orientation":"vertical","data-state":f?"open":"closed","data-side":y,className:m("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none",k,e),style:{top:x.top,left:x.left},...d,children:c}),document.body)});oo.displayName="DropdownContent";var qd=0,_n=j.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:u,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Wo(),[b]=j.useState(()=>qd++),v=j.useRef(null);j.useEffect(()=>(!n&&v.current&&g(b,v.current),()=>{h(b);}),[n,b,g,h]);let R=C=>{if(n){C.preventDefault();return}o?.(C),r?.(),u(false);},w=C=>{a?.(C),n||p(b);};return jsxs("div",{ref:C=>{v.current=C,typeof d=="function"?d(C):d&&(d.current=C);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===b?"":void 0,className:m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",!n&&"cursor-pointer",e),onClick:R,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});_n.displayName="DropdownItem";var Ai=j.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ai.displayName="DropdownSection";var Zd=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-muted",e),...t}));Zd.displayName="DropdownSeparator";var Qd=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest opacity-60",e),...t});Qd.displayName="DropdownShortcut";var Jd=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Jd.displayName="DropdownGroup";var eu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=j.useState(n),{contentRef:s}=Wo(),i=t!==void 0,l=i?t:o,c=j.useRef(null),d=j.useCallback(u=>{i||a(u),r?.(u);},[i,r]);return jsx(Vi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};eu.displayName="DropdownSub";var tu=j.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=j.useContext(Vi),{setActiveIndex:d,registerItem:u,unregisterItem:f}=Wo(),[p]=j.useState(()=>qd++),g=j.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:h,onOpenChange:b,triggerRef:v}=c;j.useEffect(()=>(!n&&g.current&&u(p,g.current),()=>{f(p);}),[n,p,u,f]);let R=C=>{o?.(C),n||(d(p),b(true));},w=C=>{a?.(C);},x=C=>{s?.(C),(C.key==="ArrowRight"||C.key==="Enter"||C.key===" ")&&(C.preventDefault(),b(true));};return jsxs("div",{ref:C=>{g.current=C,v.current=C,typeof l=="function"?l(C):l&&(l.current=C);},role:"menuitem","aria-haspopup":"menu","aria-expanded":h,tabIndex:n?-1:0,"aria-disabled":n,"data-state":h?"open":"closed","data-disabled":n?"":void 0,className:m("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:R,onMouseLeave:w,onKeyDown:x,...i,children:[r,jsx(ChevronRight,{className:"ml-auto"})]})});tu.displayName="DropdownSubTrigger";var nu=j.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=j.useContext(Vi);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:u,parentMenuRef:f}=l,[p,g]=j.useState({top:0,left:0}),[h,b]=j.useState(false),v=j.useRef(null),R=j.useRef(null);j.useEffect(()=>{b(true);},[]),j.useEffect(()=>{if(!c||!u.current||!v.current)return;(()=>{if(!u.current||!v.current)return;let y=u.current.getBoundingClientRect(),M=v.current.getBoundingClientRect(),T=window.innerWidth,E=window.innerHeight,N=y.top+n,k=y.right+t;k+M.width>T-r&&(k=y.left-M.width-t),N+M.height>E-r&&(N=E-M.height-r),N<r&&(N=r),g({top:N,left:k});})();},[c,t,n,r,u]);let w=C=>{o?.(C),R.current&&(clearTimeout(R.current),R.current=null),d(true);},x=C=>{a?.(C);let y=C.relatedTarget;u.current?.contains(y)||f?.current?.contains(y)||(R.current=setTimeout(()=>{d(false);},100));};return j.useEffect(()=>()=>{R.current&&clearTimeout(R.current);},[]),!h||!c?null:Xa.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:m("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:w,onMouseLeave:x,...s}),document.body)});nu.displayName="DropdownSubContent";var R0=Ai;var au=j.createContext(null),zi=()=>{let e=j.useContext(au);if(!e)throw new Error("Popover components must be used within a Popover");return e},nt=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=j.useState(n),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useId(),d=j.useCallback(u=>{s||a(u),r?.(u);},[s,r]);return jsx(au.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};nt.displayName="Popover";var ht=j.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=zi(),c=d=>{n?.(d),s(!a);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:d=>{i.current=d,typeof o=="function"?o(d):o&&(o.current=d);},onClick:d=>{t.props.onClick?.(d),s(!a);},"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,...r}):jsx("button",{ref:d=>{i.current=d,typeof o=="function"?o(d):o&&(o.current=d);},type:"button","aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r,children:t})});ht.displayName="PopoverTrigger";var ja=j.forwardRef(({asChild:e,children:t,...n},r)=>{let{triggerRef:o}=zi();return e&&j.isValidElement(t)?j.cloneElement(t,{ref:a=>{o.current=a,typeof r=="function"?r(a):r&&(r.current=a);},...n}):jsx("div",{ref:a=>{o.current=a,typeof r=="function"?r(a):r&&(r.current=a);},...n,children:t})});ja.displayName="PopoverAnchor";var rt=j.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onInteractOutside:a,onEscapeKeyDown:s,onOpenAutoFocus:i,onCloseAutoFocus:l,children:c,...d},u)=>{let{open:f,onOpenChange:p,triggerRef:g,contentId:h}=zi(),[b,v]=j.useState({top:0,left:0}),[R,w]=j.useState(false),x=j.useRef(null);if(j.useEffect(()=>{w(true);},[]),j.useEffect(()=>{if(!f||!g.current||!x.current)return;let y=()=>{if(!g.current||!x.current)return;let M=g.current.getBoundingClientRect(),T=x.current.getBoundingClientRect(),E=0,N=0;switch(t){case "top":E=M.top-T.height-n;break;case "bottom":E=M.bottom+n;break;case "left":N=M.left-T.width-n;break;case "right":N=M.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":N=M.left+o;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-o;break}else switch(r){case "start":E=M.top+o;break;case "center":E=M.top+M.height/2-T.height/2;break;case "end":E=M.bottom-T.height-o;break}v({top:E,left:N});};return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,true),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,true);}},[f,t,n,r,o,g]),j.useEffect(()=>{if(!f)return;let y=M=>{let T=M.target;x.current&&!x.current.contains(T)&&g.current&&!g.current.contains(T)&&(a?.(),p(false));};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[f,p,a,g]),j.useEffect(()=>{if(!f)return;let y=M=>{M.key==="Escape"&&(s?.(),p(false));};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[f,p,s]),!R||!f)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 Xa.createPortal(jsx("div",{ref:y=>{x.current=y,typeof u=="function"?u(y):u&&(u.current=y);},id:h,role:"dialog","data-state":f?"open":"closed","data-side":t,className:m("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:b.top,left:b.left},...d,children:c}),document.body)});rt.displayName="PopoverContent";var su=j.createContext(null),Bi=()=>{let e=j.useContext(su);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},iu=j.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,u]=j.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||u(h),r?.(h);};return jsx(su.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:m(s==="vertical"&&"flex gap-4",e),...l,children:i})})});iu.displayName="Tabs";var Oi={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"}},lu=j.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Bi(),l=j.useRef(null),[c,d]=j.useState({opacity:0});j.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let R=g.getBoundingClientRect(),w=v.getBoundingClientRect(),x=s==="vertical";o==="underline"?d(x?{width:2,height:w.height,transform:`translateY(${w.top-R.top}px)`,opacity:1}:{width:w.width,height:2,transform:`translateX(${w.left-R.left}px)`,opacity:1}):o==="solid"&&d(x?{width:w.width,height:w.height,transform:`translateY(${w.top-R.top}px)`,opacity:1}:{width:w.width,height:w.height,transform:`translateX(${w.left-R.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let u={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",outline:"bg-transparent p-0 gap-1 !rounded-none"},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:m("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Oi[a].list,u[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:m("absolute transition-all duration-200 ease-out",Oi[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});lu.displayName="TabsList";var cu=j.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Bi(),d=s===t,u={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",outline:"border border-transparent data-[state=active]:border-border data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:m("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",Oi[c].trigger,u[l],e),onClick:f=>{r?.(f),i(t);},...o})});cu.displayName="TabsTrigger";var du=j.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Bi(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:m("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});du.displayName="TabsContent";var uu=[{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 C0(e,t=uu){return e?t.filter(r=>r.test(e)).length/t.length:0}function T0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function M0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var pu=j.createContext(null),Ya=()=>{let e=j.useContext(pu);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},fu=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=j.useState(t),s=e!==void 0,i=s?e:o,l=j.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(pu.Provider,{value:{open:i,onOpenChange:l},children:r})};fu.displayName="Sheet";var gu=j.forwardRef(({asChild:e,onClick:t,children:n,...r},o)=>{let{onOpenChange:a}=Ya(),s=i=>{t?.(i),a(true);};return e&&j.isValidElement(n)?j.cloneElement(n,{onClick:i=>{n.props.onClick?.(i),a(true);}}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:n})});gu.displayName="SheetTrigger";var bu=j.forwardRef(({asChild:e,onClick:t,children:n,...r},o)=>{let{onOpenChange:a}=Ya(),s=i=>{t?.(i),a(false);};return e&&j.isValidElement(n)?j.cloneElement(n,{onClick:i=>{n.props.onClick?.(i),a(false);}}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:n})});bu.displayName="SheetClose";var Ki=({children:e,container:t})=>{let[n,r]=j.useState(false);return j.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Ki.displayName="SheetPortal";var vu=j.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ya();return r?jsx("div",{ref:n,className:m("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});vu.displayName="SheetOverlay";var hu=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],xu=j.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Ya(),[d,u]=j.useState(false),[,f]=j.useState(false);return j.useEffect(()=>{if(l)u(true),f(true),ct();else {f(true);let p=setTimeout(()=>{u(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{dt();}},[l]),j.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(Ki,{children:[jsx("div",{className:m("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:m(hu({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,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});xu.displayName="SheetContent";var yu=({className:e,...t})=>jsx("div",{className:m("flex flex-col space-y-2 text-center sm:text-left",e),...t});yu.displayName="SheetHeader";var Ru=({className:e,...t})=>jsx("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ru.displayName="SheetFooter";var wu=j.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:m("text-lg font-semibold text-foreground",e),...t}));wu.displayName="SheetTitle";var Cu=j.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));Cu.displayName="SheetDescription";var S0=({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 Tu=j.createContext(null),_o=()=>{let e=j.useContext(Tu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Gi=j.createContext(null),Mu=j.createContext(null),Nu=({children:e,onOpenChange:t})=>{let[n,r]=j.useState(false),[o,a]=j.useState({x:0,y:0}),s=j.useId(),i=j.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(Tu.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};Nu.displayName="ContextMenu";var Eu=j.forwardRef(({asChild:e,children:t,onContextMenu:n,...r},o)=>{let{onOpenChange:a,setPosition:s}=_o(),i=l=>{l.preventDefault(),s({x:l.clientX,y:l.clientY}),a(true);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:o,onContextMenu:l=>{l.preventDefault(),t.props.onContextMenu?.(l),s({x:l.clientX,y:l.clientY}),a(true);},...r}):jsx("div",{ref:o,onContextMenu:l=>{n?.(l),i(l);},...r,children:t})});Eu.displayName="ContextMenuTrigger";var ku=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));ku.displayName="ContextMenuGroup";var Pu=({children:e,container:t})=>{let[n,r]=j.useState(false);return j.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Pu.displayName="ContextMenuPortal";var Lu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=j.useState(n),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Gi.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Lu.displayName="ContextMenuSub";var Su=j.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(Mu.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));Su.displayName="ContextMenuRadioGroup";var Du=j.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=_o(),[d,u]=j.useState(false),[f,p]=j.useState(l),g=j.useRef(null);return j.useEffect(()=>{u(true);},[]),j.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:R}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),R+b.height>window.innerHeight&&(R=window.innerHeight-b.height-8),p({x:v,y:R});},[s,l]),j.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]),j.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:Xa.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:m("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)});Du.displayName="ContextMenuContent";var Hu=j.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=j.useContext(Gi);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,u=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:m("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:u,onMouseLeave:f,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Hu.displayName="ContextMenuSubTrigger";var Iu=j.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=j.useContext(Gi);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,u]=j.useState({top:0,left:0}),[f,p]=j.useState(false),g=j.useRef(null);j.useEffect(()=>{p(true);},[]),j.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let R=c.current.getBoundingClientRect(),w=g.current.getBoundingClientRect(),x=R.top,C=R.right+t;C+w.width>window.innerWidth&&(C=R.left-w.width-t),u({top:x,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:Xa.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:m("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)});Iu.displayName="ContextMenuSubContent";var Vu=j.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=_o(),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:m("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})});Vu.displayName="ContextMenuItem";var Au=j.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=_o(),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:m("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]})});Au.displayName="ContextMenuCheckboxItem";var zu=j.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{onOpenChange:i}=_o(),l=j.useContext(Mu),c=l?.value===n,d=u=>{if(r){u.preventDefault();return}o?.(u),l?.onValueChange(n),i(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":c,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":c?"checked":"unchecked",className:m("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:d,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c&&jsx(Circle,{className:"h-4 w-4 fill-current"})}),t]})});zu.displayName="ContextMenuRadioItem";var Ou=j.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));Ou.displayName="ContextMenuLabel";var Bu=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-border",e),...t}));Bu.displayName="ContextMenuSeparator";var Fu=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Fu.displayName="ContextMenuShortcut";var Ku=j.createContext(null),z0=()=>{let e=j.useContext(Ku);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Gu=j.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[u,f]=j.useState(n),p=t!==void 0,g=p?t:u,h=j.useId(),b=v=>{p||f(v),r?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:m(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(Ku.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});Gu.displayName="RadioGroup";var $u=j.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=z0(),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:m("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}})]})});$u.displayName="RadioGroupItem";var Za=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",outline:"border border-input bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),Uu=j.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,u]=j.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let b=!p;f||u(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:m(Za({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Uu.displayName="Toggle";var Wu=j.createContext(null),G0=()=>{let e=j.useContext(Wu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},ju=j.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[u,f]=j.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:u,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(R=>R!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:m("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})})});ju.displayName="ToggleGroup";var _u=j.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=G0(),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:m(Za({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});_u.displayName="ToggleGroupItem";var Ja=j.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,...u},f)=>{let[p,g]=j.useState(n),h=t!==void 0,b=h?t:p,v=j.useRef(null),[R,w]=j.useState(false),[x,C]=j.useState(null),y=(H,D)=>{if(!v.current)return b[0];let S=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-S.left)/S.width:I=1-(D-S.top)/S.height,I=Math.max(0,Math.min(1,I));let z=a+I*(s-a),G=Math.round(z/i)*i;return Math.max(a,Math.min(s,G))},M=(H,D)=>{let S=[...b];S[D]=H,D>0&&H<b[D-1]&&(S[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(S[D]=b[D+1]),h||g(S),r?.(S);},T=(H,D)=>{l||(H.preventDefault(),w(true),C(D),H.target.setPointerCapture(H.pointerId));},E=H=>{if(!R||x===null||l)return;let D=y(H.clientX,H.clientY);M(D,x);},N=()=>{R&&(w(false),C(null),o?.(b));},k=H=>{if(l)return;let D=y(H.clientX,H.clientY),S=0,I=Math.abs(b[0]-D);for(let z=1;z<b.length;z++){let G=Math.abs(b[z]-D);G<I&&(I=G,S=z);}M(D,S),o?.([...b.slice(0,S),D,...b.slice(S+1)]);},P=(H,D)=>{if(l)return;let S=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}M(S,D),o?.([...b.slice(0,D),S,...b.slice(D+1)]);},L=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:m("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...u,children:[jsx("div",{ref:v,className:m("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:k,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${L(b[0])}%`:0,right:`${100-L(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${L(b[0])}%`:0,top:`${100-L(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:m("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",R&&x===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${L(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${L(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:S=>T(S,D),onPointerMove:E,onPointerUp:N,onPointerCancel:N,onKeyDown:S=>P(S,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ja.displayName="Slider";var Yu=j.createContext(null),Xu=()=>{let e=j.useContext(Yu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Wi=j.createContext(null),qu=()=>{let e=j.useContext(Wi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Zu=j.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,u]=j.useState(()=>t==="single"?r?[r]:[]:r||[]),f=j.useRef(new Map),p=j.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=x=>{if(t==="single"){let y=h.includes(x)&&a?[]:[x];g||u(y),o?.(y[0]||"");}else {let C=h.includes(x)?h.filter(y=>y!==x):[...h,x];g||u(C),o?.(C);}},v=j.useCallback((x,C)=>{f.current.set(x,C),p.current.includes(x)||p.current.push(x);},[]),R=j.useCallback(x=>{f.current.delete(x),p.current=p.current.filter(C=>C!==x);},[]),w=j.useCallback(x=>{let C=p.current;if(C.length===0)return;let y=document.activeElement,M;f.current.forEach((P,L)=>{P===y&&(M=L);});let T=M?C.indexOf(M):-1,E;switch(x){case "first":E=0;break;case "last":E=C.length-1;break;case "next":E=T===-1?0:(T+1)%C.length;break;case "prev":E=T===-1?C.length-1:(T-1+C.length)%C.length;break}let N=C[E];f.current.get(N)?.focus();},[]);return jsx(Yu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:R,focusTrigger:w},children:jsx("div",{ref:c,"data-orientation":"vertical",className:m("w-full",e),...l,children:i})})});Zu.displayName="Accordion";var Qu=j.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Xu(),d=c.value.includes(t),u=n||c.disabled||false,f=j.useId(),p=j.useId();return r!==void 0?jsx(Wi.Provider,{value:{value:t,isOpen:d,isDisabled:u,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":u?"":void 0,className:m("border-b",u&&"opacity-50",e),...i,children:[jsx(Ju,{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(em,{children:s})]})}):jsx(Wi.Provider,{value:{value:t,isOpen:d,isDisabled:u,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":u?"":void 0,className:m("border-b",u&&"opacity-50",e),...i,children:s})})});Qu.displayName="AccordionItem";var Ju=j.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Xu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:u}=qu(),f=j.useRef(null);j.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:u,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:m("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"})]})})});Ju.displayName="AccordionTrigger";var em=j.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=qu();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:m("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})})})});em.displayName="AccordionContent";var nm=j.createContext(null),rm=()=>{let e=j.useContext(nm);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},om=j.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=j.useState(n),u=t!==void 0,f=u?t:c,p=j.useId(),g=j.useId(),h=b=>{o||(u||d(b),r?.(b));};return jsx(nm.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:m("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(ji,{})]}),s]})})});om.displayName="Collapsible";var ji=j.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=rm();return jsx("button",{ref:o,type:"button",id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,className:m("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e),onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:"h-4 w-4"})})});ji.displayName="CollapsibleTrigger";var am=j.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=rm(),c=j.useRef(null),[d,u]=j.useState(void 0),[f,p]=j.useState(false),[g,h]=j.useState(a);j.useEffect(()=>{a?(h(true),p(true),requestAnimationFrame(()=>{c.current&&u(c.current.scrollHeight);})):(p(true),u(0));},[a]);let b=()=>{p(false),a||h(false),u(void 0);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:m("overflow-hidden",e),style:{...n,height:f?d!==void 0?d:"auto":a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,children:t})}):null});am.displayName="CollapsibleContent";var ns=j.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:m("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:m("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}%)`}})})]})});ns.displayName="Progress";var cm=j.createContext(null),dm=()=>{let e=j.useContext(cm);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},um=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=j.useState(n),c=t!==void 0,d=c?t:i,u=j.useRef(null),f=j.useId(),p=j.useRef(null),g=j.useRef(null),h=j.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 j.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]),j.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(cm.Provider,{value:{open:d,onOpenChange:h,triggerRef:u,contentId:f},children:e})};um.displayName="HoverCard";var mm=j.forwardRef(({asChild:e,children:t,onMouseEnter:n,onMouseLeave:r,onFocus:o,onBlur:a,...s},i)=>{let{onOpenChange:l,triggerRef:c}=dm(),d=g=>{n?.(g),l(true);},u=g=>{r?.(g),l(false);},f=g=>{o?.(g),l(true);},p=g=>{a?.(g),l(false);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:g=>{c.current=g,typeof i=="function"?i(g):i&&(i.current=g);},onMouseEnter:d,onMouseLeave:u,onFocus:f,onBlur:p,...s}):jsx("a",{ref:g=>{c.current=g,typeof i=="function"?i(g):i&&(i.current=g);},onMouseEnter:d,onMouseLeave:u,onFocus:f,onBlur:p,...s,children:t})});mm.displayName="HoverCardTrigger";var pm=j.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:u,triggerRef:f,contentId:p}=dm(),[g,h]=j.useState({top:0,left:0}),[b,v]=j.useState(false),R=j.useRef(null);j.useEffect(()=>{v(true);},[]),j.useEffect(()=>{if(!d||!f.current||!R.current)return;(()=>{if(!f.current||!R.current)return;let M=f.current.getBoundingClientRect(),T=R.current.getBoundingClientRect(),E=0,N=0;switch(t){case "top":E=M.top-T.height-n;break;case "bottom":E=M.bottom+n;break;case "left":N=M.left-T.width-n;break;case "right":N=M.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":N=M.left+o;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-o;break}else switch(r){case "start":E=M.top+o;break;case "center":E=M.top+M.height/2-T.height/2;break;case "end":E=M.bottom-T.height-o;break}h({top:E,left:N});})();},[d,t,n,r,o,f]);let w=y=>{a?.(y),u(true);},x=y=>{s?.(y),u(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 Xa.createPortal(jsx("div",{ref:y=>{R.current=y,typeof c=="function"?c(y):c&&(c.current=y);},id:p,"data-state":d?"open":"closed","data-side":t,className:m("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:w,onMouseLeave:x,...l,children:i}),document.body)});pm.displayName="HoverCardContent";var fm=j.createContext({size:"md",variant:"default",radius:"md"}),os=()=>j.useContext(fm);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var Y0=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),X0=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"}}),q0=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"}}),gm=j.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(fm.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));gm.displayName="Breadcrumb";var bm=j.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=os();return jsx("ol",{ref:n,className:m(Y0({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});bm.displayName="BreadcrumbList";var vm=j.forwardRef(({className:e,...t},n)=>{let{size:r}=os();return jsx("li",{ref:n,className:m("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});vm.displayName="BreadcrumbItem";var hm=j.forwardRef(({asChild:e,className:t,...n},r)=>jsx(e?Va:"a",{ref:r,className:m("transition-colors hover:text-foreground cursor-pointer",t),...n}));hm.displayName="BreadcrumbLink";var xm=j.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-medium text-foreground",e),...t}));xm.displayName="BreadcrumbPage";var ym=({children:e,className:t,...n})=>{let{size:r}=os();return jsx("li",{role:"presentation","aria-hidden":"true",className:m(X0({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};ym.displayName="BreadcrumbSeparator";var Rm=({className:e,...t})=>{let{size:n}=os();return jsxs("span",{role:"presentation","aria-hidden":"true",className:m(q0({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};Rm.displayName="BreadcrumbEllipsis";var Tm=j.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:m("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));Tm.displayName="AspectRatio";var Em=j.createContext(null),Yi=()=>{let e=j.useContext(Em);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},km=j.createContext(null),Pm=()=>{let e=j.useContext(km);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},Lm=j.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=j.useState(null);return jsx(Em.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:m("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(Xi,{})]})})});Lm.displayName="NavigationMenu";var Sm=j.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Yi();return jsx("ul",{ref:n,className:m("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});Sm.displayName="NavigationMenuList";var Dm=j.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Yi(),s=j.useId(),i=j.useRef(null),l=o===s,c=j.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(km.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:m("relative",e),...n,children:t})})});Dm.displayName="NavigationMenuItem";var Hm=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"),Im=j.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=Pm(),c=u=>{n?.(u),l(true);},d=u=>{r?.(u),l(!i);};return jsxs("button",{ref:u=>{s.current=u,typeof a=="function"?a(u):a&&(a.current=u);},type:"button","data-state":i?"open":"closed",className:m(Hm(),"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"})]})});Im.displayName="NavigationMenuTrigger";var Vm=j.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=Pm(),l=j.useRef(null),[c,d]=j.useState({top:0,left:0});j.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 u=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?Xa.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:m("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:u,onMouseLeave:f,...r}),document.body):null});Vm.displayName="NavigationMenuContent";var Am=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"),zm=j.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:m(Am(),t&&"bg-accent text-accent-foreground",e),...n}));zm.displayName="NavigationMenuLink";var Xi=j.forwardRef((e,t)=>null);Xi.displayName="NavigationMenuViewport";var Om=j.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Yi();return r?jsx("div",{ref:n,className:m("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});Om.displayName="NavigationMenuIndicator";var Gm=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",light:"hover:bg-muted/50",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),hn=j.forwardRef(({className:e,variant:t,size:n,iconSize:r,...o},a)=>{let i=r??{sm:14,md:16,lg:20}[n??"md"];return jsx("button",{ref:a,type:"button",className:m(Gm({variant:t,size:n}),e),"aria-label":"Close",...o,children:jsx(X,{style:{width:i,height:i}})})});hn.displayName="CloseButton";var as=j.createContext(null);function iw(){let e=j.useContext(as);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Xn(){return j.useContext(as)}var lw="16rem",cw="18rem",dw="3rem",uw="b",mw={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},pw={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},qi=j.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:u,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,R]=j.useState(false),[w,x]=j.useState(false),[C,y]=j.useState(e),M=t??C,T=j.useCallback(P=>{let L=typeof P=="function"?P(M):P;n?n(L):y(L);},[n,M]);j.useEffect(()=>{let P=()=>{R(window.innerWidth<768);};return P(),window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[]);let E=j.useCallback(()=>b?T(P=>!P):v?x(P=>!P):T(P=>!P),[v,T,x,b]);j.useEffect(()=>{if(b)return;let P=L=>{L.key===uw&&(L.metaKey||L.ctrlKey)&&(L.preventDefault(),E());};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[E,b]);let N=M?"expanded":"collapsed",k=j.useMemo(()=>({placement:r,state:N,open:M,setOpen:T,isMobile:v,openMobile:w,setOpenMobile:x,toggleDrawer:E,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,N,M,T,v,w,x,E,l,h,o,a,s,i]);return b?jsx(as.Provider,{value:k,children:jsx(Drawer.Root,{open:M,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsx(as.Provider,{value:k,children:jsx($n,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":lw,"--drawer-width-icon":dw,...u},className:m("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});qi.displayName="Drawer";var Um=j.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=Xn();if(!s)return jsx("div",{ref:a,className:m("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:u,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:r});if(l==="none")return jsx("div",{ref:a,className:m("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(fw,{open:u,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:m("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:m("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:m("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:m("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:m("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:m("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})})]})});Um.displayName="DrawerSidebar";var fw=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=j.useState(false);return j.useEffect(()=>{a(true);},[]),j.useEffect(()=>{if(t)return ct(),()=>dt()},[t]),!o||!t?null:Xa.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:m("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":cw},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Wm=j.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Xn();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:m("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 jm=j.forwardRef(({className:e,children:t,...n},r)=>{let o=Xn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque",c=o?.hideCloseButton||false;if(a){let d=s==="top"||s==="bottom",u=s==="left"||s==="right",f=u?mw[i]:pw[i],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},g={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:m("fixed inset-0 z-50",p[l])}),jsxs(Drawer.Content,{ref:r,className:m("fixed z-50 flex flex-col border bg-background",g[s],e),style:{...u?{width:f,height:"100%"}:{},...d?{maxHeight:f}:{},...n.style},...n,children:[u&&!c&&jsx(Drawer.Close,{asChild:true,children:jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10"})}),d&&jsx("div",{className:m("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:m("flex flex-col h-full",e),...n,children:t})});jm.displayName="DrawerContent";var _m=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"header",className:m("flex flex-col gap-2 p-4",e),...t}));_m.displayName="DrawerHeader";var Ym=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"body",className:m("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));Ym.displayName="DrawerBody";var Xm=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:m("flex flex-col gap-2 p-4 mt-auto",e),...t}));Xm.displayName="DrawerFooter";var qm=j.forwardRef(({className:e,...t},n)=>Xn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));qm.displayName="DrawerTitle";var Zm=j.forwardRef(({className:e,...t},n)=>Xn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:m("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));Zm.displayName="DrawerDescription";var Qm=j.forwardRef(({className:e,onClick:t,...n},r)=>{let o=Xn();return o?.mode==="overlay"?jsx(Drawer.Close,{ref:r,className:e,onClick:t,...n}):jsx(hn,{ref:r,variant:"light",className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...n})});Qm.displayName="DrawerClose";var Jm=j.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=Xn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",u=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:m("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(u,{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"})]})});Jm.displayName="DrawerToggle";var ep=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:m("mx-4 h-px bg-border",e),...t}));ep.displayName="DrawerSeparator";var tp=j.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:m("flex w-full min-w-0 flex-col gap-1",e),...t}));tp.displayName="DrawerMenu";var np=j.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:m("group/menu-item relative",e),...t}));np.displayName="DrawerMenuItem";var rp=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",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--border))] 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"}}),op=j.forwardRef(({asChild:e=false,isActive:t=false,variant:n="default",size:r="md",tooltip:o,className:a,children:s,...i},l)=>{let c=Xn(),d=c?.isMobile??false,u=c?.state??"expanded",f=jsx("button",{ref:l,type:"button","data-drawer":"menu-button","data-size":r,"data-active":t,className:m(rp({variant:n,size:r}),a),...i,children:s});return o?jsxs(Un,{children:[jsx(Wn,{asChild:true,children:f}),jsx(jn,{side:"right",align:"center",hidden:u!=="collapsed"||d,...typeof o=="string"?{children:o}:o})]}):f});op.displayName="DrawerMenuButton";var ap=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:m("relative flex w-full min-w-0 flex-col p-2",e),...t}));ap.displayName="DrawerGroup";var sp=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group-label",className:m("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}));sp.displayName="DrawerGroupLabel";var ip=j.forwardRef(({className:e,...t},n)=>jsx("main",{ref:n,className:m("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}));ip.displayName="DrawerInset";var gw=qi;var cp=j.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:m("w-full caption-bottom text-sm",e),...t})}));cp.displayName="Table";var dp=j.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:m("[&_tr]:border-b",e),...t}));dp.displayName="TableHeader";var up=j.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:m("[&_tr:last-child]:border-0",e),...t}));up.displayName="TableBody";var mp=j.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:m("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));mp.displayName="TableFooter";var pp=j.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:m("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));pp.displayName="TableRow";var fp=j.forwardRef(({className:e,...t},n)=>jsx("th",{ref:n,className:m("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));fp.displayName="TableHead";var gp=j.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:m("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));gp.displayName="TableCell";var bp=j.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:m("mt-4 text-sm text-muted-foreground",e),...t}));bp.displayName="TableCaption";function Rw({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(x,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:u=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...R},w){let[x,C]=j.useState(new Set),[y,M]=j.useState({columnId:null,direction:null}),[T,E]=j.useState({pageIndex:0,pageSize:u[0]||10}),N=o??x,k=l??y,P=f??T,L=K=>{a?a(K):C(K);},H=K=>{c?c(K):M(K);},D=K=>{p?p(K):E(K);},S=j.useMemo(()=>{if(!k.columnId||!k.direction)return t;let K=n.find(O=>O.id===k.columnId);return K?[...t].sort((O,W)=>{let A=K.accessor(O),_=K.accessor(W);if(A===_)return 0;if(A==null)return 1;if(_==null)return -1;let U=String(A).localeCompare(String(_),void 0,{numeric:true});return k.direction==="asc"?U:-U}):t},[t,k,n]),I=j.useMemo(()=>{if(!d)return S;let K=P.pageIndex*P.pageSize;return S.slice(K,K+P.pageSize)},[S,d,P]),z=Math.ceil(S.length/P.pageSize),G=K=>{if(K===true){let O=new Set(I.map((W,A)=>s(W,A)));L(O);}else L(new Set);},V=(K,O)=>{let W=new Set(N);O?W.add(K):W.delete(K),L(W);},F=I.length>0&&I.every((K,O)=>N.has(s(K,O))),B=I.some((K,O)=>N.has(s(K,O))),Q=K=>{if(!n.find(A=>A.id===K)?.sortable&&!i)return;let W="asc";k.columnId===K&&(k.direction==="asc"?W="desc":k.direction==="desc"&&(W=null)),H({columnId:W?K:null,direction:W});},ne=K=>k.columnId!==K?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):k.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:w,className:m("w-full",e),...R,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx($o,{checked:F?true:B?"indeterminate":false,onCheckedChange:G,"aria-label":"Select all"})}),n.map(K=>{let O=K.sortable??i;return jsx("th",{className:m("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:K.width},onClick:()=>O&&Q(K.id),children:jsxs("div",{className:"flex items-center gap-2",children:[K.header,O&&ne(K.id)]})},K.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((K,O)=>{let W=s(K,O),A=N.has(W);return jsxs("tr",{className:m("border-b transition-colors",v&&"hover:bg-muted/50",b&&O%2===1&&"bg-muted/30",A&&"bg-muted"),"data-state":A?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx($o,{checked:A,onCheckedChange:_=>V(W,!!_),"aria-label":`Select row ${O+1}`})}),n.map(_=>jsx("td",{className:"p-4 align-middle",children:_.cell?_.cell(K,O):_.accessor(K)},_.id))]},W)})})]})}),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:P.pageSize,onChange:K=>D({pageIndex:0,pageSize:Number(K.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:u.map(K=>jsx("option",{value:K,children:K},K))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",P.pageIndex+1," of ",z||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(te,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>D({...P,pageIndex:P.pageIndex-1}),disabled:P.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(te,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>D({...P,pageIndex:P.pageIndex+1}),disabled:P.pageIndex>=z-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var ww=j.forwardRef(Rw);var Zi=["January","February","March","April","May","June","July","August","September","October","November","December"];function Pw({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let[o,a]=j.useState(false),[s,i]=j.useState(false),l=j.useRef(null),c=j.useRef(null),d=getMonth(e),u=getYear(e);j.useEffect(()=>{function h(b){l.current&&!l.current.contains(b.target)&&a(false),c.current&&!c.current.contains(b.target)&&i(false);}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);let f=h=>{let b=setMonth(e,h);t(b),a(false);},p=h=>{let b=setYear(e,h);t(b),i(false);},g=j.useMemo(()=>{let h=[];for(let b=r;b>=n;b--)h.push(b);return h},[n,r]);return jsxs("div",{className:"flex items-center gap-2",children:[jsxs("div",{ref:l,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{a(!o),i(false);},className:m("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[120px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",o&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:Zi[d]}),jsx(ChevronDown,{className:m("h-4 w-4 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[140px] rounded-md border border-border bg-background shadow-lg",children:jsx(Ue,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Zi.map((h,b)=>jsx("button",{type:"button",onClick:()=>f(b),className:m("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",d===b&&"bg-primary/10 text-primary font-medium"),children:h},h))})})})]}),jsxs("div",{ref:c,className:"relative",children:[jsxs("button",{type:"button",onClick:()=>{i(!s),a(false);},className:m("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",s&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsx("span",{children:u}),jsx(ChevronDown,{className:m("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),s&&jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[100px] rounded-md border border-border bg-background shadow-lg",children:jsx(Ue,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:g.map(h=>jsx("button",{type:"button",onClick:()=>p(h),className:m("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",u===h&&"bg-primary/10 text-primary font-medium"),children:h},h))})})})]})]})}function Lw(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-2 h-10 mb-2",children:[jsx(Pw,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:m("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:m("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]});let l=Zi[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:m("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:m("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 so({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=j.useMemo(()=>Lw(r,o,a),[r,o,a]);return jsx(DayPicker,{showOutsideDays:n,className:m("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-10 font-normal text-xs text-center",week:"flex w-full mt-1",day:m("relative h-10 w-10 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:m("size-10 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10 hover:text-primary","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:m("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:bg-transparent [&.outside-day]:text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0},outside:{backgroundColor:"transparent"}},components:{...s,MonthCaption:l},...i})}so.displayName="Calendar";var yp=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:m("mx-auto flex w-full justify-center",e),...t});yp.displayName="Pagination";var Rp=j.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:m("flex flex-row items-center gap-1",e),...t}));Rp.displayName="PaginationContent";var wp=j.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:m("",e),...t}));wp.displayName="PaginationItem";var ss=({className:e,isActive:t,size:n="icon",...r})=>jsx("a",{"aria-current":t?"page":void 0,className:m(tn({variant:t?"solid":"light",size:n}),e),...r});ss.displayName="PaginationLink";var Cp=({className:e,...t})=>jsxs(ss,{"aria-label":"Go to previous page",size:"md",className:m("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});Cp.displayName="PaginationPrevious";var Tp=({className:e,...t})=>jsxs(ss,{"aria-label":"Go to next page",size:"md",className:m("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});Tp.displayName="PaginationNext";var Mp=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:m("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"})]});Mp.displayName="PaginationEllipsis";var el=j.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:m("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));el.displayName=Command.displayName;var Vw=({children:e,...t})=>jsx(Aa,{...t,children:jsx(za,{className:"overflow-hidden p-0 shadow-lg",children:jsx(el,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Np=j.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:m("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})]}));Np.displayName=Command.Input.displayName;var Ep=j.forwardRef(({className:e,...t},n)=>jsx(Command.List,{ref:n,className:m("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ep.displayName=Command.List.displayName;var kp=j.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));kp.displayName=Command.Empty.displayName;var Pp=j.forwardRef(({className:e,...t},n)=>jsx(Command.Group,{ref:n,className:m("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}));Pp.displayName=Command.Group.displayName;var Lp=j.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:m("-mx-1 h-px bg-border",e),...t}));Lp.displayName=Command.Separator.displayName;var Sp=j.forwardRef(({className:e,...t},n)=>jsx(Command.Item,{ref:n,className:m("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Sp.displayName=Command.Item.displayName;var Dp=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Dp.displayName="CommandShortcut";var Hp=j.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,...s},i)=>{let[l,c]=j.useState(false),[d,u]=j.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:l?"text":"password",className:m("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:n,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{u(true),r?.(f);},onBlur:f=>{u(false),o?.(f);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:n,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Hp.displayName="PasswordInput";var Ip=j.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[u,f]=j.useState(s),[p,g]=j.useState(false),h=a!==void 0,b=h?a:u,v=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},R=()=>{v((b??0)+n);},w=()=>{v((b??0)-n);},x=T=>{let E=T.target.value;if(E==="")v(void 0);else {let N=parseFloat(E);isNaN(N)||v(N);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),R()):T.key==="ArrowDown"&&(T.preventDefault(),w());},y=r===void 0||(b??0)>r,M=o===void 0||(b??0)<o;return t?jsxs("div",{className:m("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:b??"",onChange:x,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:R,disabled:l||!M,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:m("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:b??"",onChange:x,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Ip.displayName="NumberInput";var Ap=j.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date",dateFormat:o="PPP",disabled:a=false,minDate:s,maxDate:i,className:l},c)=>{let[d,u]=j.useState(false),[f,p]=j.useState(t),g=e!==void 0,h=g?e:f,b=v=>{g||p(v),n?.(v),u(false);};return jsxs(nt,{open:d,onOpenChange:u,children:[jsx(ht,{asChild:true,children:jsxs(te,{ref:c,variant:"bordered",disabled:a,className:m("w-full justify-start text-left font-normal",!h&&"text-muted-foreground",l),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),h?format(h,o):r]})}),jsx(rt,{className:"w-auto p-0",align:"start",children:jsx(so,{mode:"single",selected:h,onSelect:b,disabled:v=>!!(s&&v<s||i&&v>i),initialFocus:true})})]})});Ap.displayName="DatePicker";var Fp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),zp=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"}}),Kp=j.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=(u,f)=>{let p=jsxs(Cr,{className:m(zp({size:r})),children:[u.src&&jsx(eo,{src:u.src,alt:u.alt||""}),jsx(Tr,{className:"text-xs",children:u.fallback||u.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&u.alt?jsxs(Un,{children:[jsx(Wn,{asChild:true,children:p}),jsx(jn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:u.alt})]},f):p},d=jsxs("div",{ref:s,className:m(Fp({size:r,className:e})),...a,children:[i.map((u,f)=>c(u,f)),l>0&&jsx(Cr,{className:m(zp({size:r})),children:jsxs(Tr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx($n,{delayDuration:300,children:d}):d});Kp.displayName="AvatarGroup";var Gp=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"}}),$p=j.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:u,...f},p)=>{let[g,h]=j.useState(n),[b,v]=j.useState(null),R=t!==void 0,w=R?t:g,x=b!==null?b:w,C=L=>{l||c||(R||h(L),r?.(L));},y=(L,H=false)=>{let D=i&&H?L+.5:L+1;C(D);},M=(L,H)=>{if(l||c)return;let D=L.currentTarget.getBoundingClientRect(),S=i&&L.clientX<D.left+D.width/2;v(S?H+.5:H+1);},T=()=>{v(null);},E=s==="heart"?Heart:Star,N=L=>x>=L+1?"full":x>=L+.5?"half":"empty",k=d?{color:d,fill:d}:{},P=u?{color:u}:{};return jsx("div",{ref:p,className:m(Gp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(L,H)=>{let D=N(H);return jsxs("button",{type:"button",className:m("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:S=>{let I=S.currentTarget.getBoundingClientRect(),z=i&&S.clientX<I.left+I.width/2;y(H,z);},onMouseMove:S=>M(S,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":w===H+1,children:[jsx(E,{className:m("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?P:void 0}),D!=="empty"&&jsx(E,{className:m("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...k,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});$p.displayName="Rating";var jp=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),qw=cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),_p=j.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,avatar:u,children:f,onClick:p,...g},h)=>{let b=a||!!p,v=R=>{R.stopPropagation(),c?.();};return jsxs("div",{ref:h,role:b?"button":void 0,tabIndex:b&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:p,onKeyDown:b&&!d?R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p?.(R));}:void 0,className:m(jp({variant:t,color:n,size:r,radius:o,clickable:b}),d&&"opacity-50 cursor-not-allowed",e),...g,children:[u&&jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:u}),s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:f}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx("button",{type:"button","aria-label":"Remove",onClick:v,disabled:d,className:m(qw({size:r})),children:jsx(X,{})})]})});_p.displayName="Chip";var Yp=createContext({direction:"horizontal"}),oC=({className:e,direction:t="horizontal",children:n,...r})=>jsx(Yp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:m("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),aC=Panel,sC=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(Yp),o=r==="vertical";return jsx(Separator,{className:m("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:m("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 Qp=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"}}),lC={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"}},Xp={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)"},Jp=j.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)),u=lC[t],f=(u.size-u.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:m(Qp({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:u.size,height:u.size,viewBox:`0 0 ${u.size} ${u.size}`,fill:"none",children:[jsx("circle",{className:m("stroke-muted",i),cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none"}),jsx("circle",{cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Xp[n]||Xp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:m("absolute font-medium text-foreground",u.fontSize),children:s(d)})]})});Jp.displayName="CircularProgress";var ef=j.createContext(null),uC=()=>{let e=j.useContext(ef);if(!e)throw new Error("OTP components must be used within InputOTP");return e},tf=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"}}),nf=j.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...u},f)=>{let[p,g]=j.useState(o),[h,b]=j.useState(0),[v,R]=j.useState(false),w=j.useRef(null),x=r!==void 0?r:p;j.useImperativeHandle(f,()=>w.current),j.useEffect(()=>{b(Math.min(x.length,n-1));},[x,n]),j.useEffect(()=>{x.length===n&&s&&s(x);},[x,n,s]);let C=k=>{let P=k.target.value;if(i&&P){let L=new RegExp(i.replace("^","").replace("$","").replace("+",""));P=P.split("").filter(H=>L.test(H)).join("");}P=P.slice(0,n),r===void 0&&g(P),a?.(P);},y=k=>{k.key==="ArrowLeft"?b(P=>Math.max(0,P-1)):k.key==="ArrowRight"&&b(P=>Math.min(x.length,n-1,P+1));},M=()=>{w.current?.focus();},T=()=>{R(true),b(Math.min(x.length,n-1));},E=()=>{R(false);},N={value:x,activeIndex:v?h:-1,maxLength:n,disabled:l};return jsx(ef.Provider,{value:N,children:jsxs("div",{className:m(tf({size:c}),t),onClick:M,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:x,onChange:C,onKeyDown:y,onFocus:T,onBlur:E,disabled:l,maxLength:n,className:m("absolute opacity-0 pointer-events-none w-0 h-0",e),...u}),d]})})});nf.displayName="InputOTP";var rf=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center",e),...t}));rf.displayName="InputOTPGroup";var of=j.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=uC(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":l,"data-filled":!!i,className:m("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[i,c&&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"})})]})});of.displayName="InputOTPSlot";var af=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));af.displayName="InputOTPSeparator";var cf=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),df=j.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:u,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=j.useState(""),R=j.useRef(null);j.useImperativeHandle(h,()=>R.current);let w=N=>{let k=N.trim();if(k.length<i||k.length>l||s&&r.length>=s||!d&&r.some(L=>L.text.toLowerCase()===k.toLowerCase()))return;let P={id:crypto.randomUUID(),text:k};o?.([...r,P]),v("");},x=N=>{u||f||o?.(r.filter(k=>k.id!==N));},C=N=>{if(c.includes(N.key)){if(N.key==="Tab"&&!b)return;N.preventDefault(),w(b);}N.key==="Backspace"&&!b&&r.length>0&&x(r[r.length-1].id);},y=N=>{let k=N.target.value;if(k.includes(",")){k.split(",").forEach(L=>{L.trim()&&w(L);});return}v(k);},M=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(L=>{w(L);});},T=()=>{R.current?.focus();},E=s?r.length>=s:false;return jsxs("div",{className:m("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",u&&"cursor-not-allowed opacity-50",e),onClick:T,children:[r.map(N=>p?p(N,()=>x(N.id)):jsxs("span",{className:m(cf({variant:t,size:n})),children:[N.text,!u&&!f&&jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),x(N.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${N.text}`,children:jsx(X,{className:"h-3 w-3"})})]},N.id)),!E&&!f&&jsx("input",{ref:R,type:"text",value:b,onChange:y,onKeyDown:C,onPaste:M,placeholder:r.length===0?a:"",disabled:u,className:m("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});df.displayName="TagInput";var mf=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"}}),pf=j.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:m(mf({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]}));pf.displayName="EmptyState";var gf=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),bf=j.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let u=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:m(gf({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:m("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:m("[&>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:m("flex items-center gap-0.5 text-sm",f),children:[jsx(u,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:m("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});bf.displayName="StatCard";var ol=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"}}),wC=({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:m("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 CC({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:u,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:R,...w},x){let[C,y]=j.useState(null),[M,T]=j.useState(null),[E,N]=j.useState(new Set(f)),k=u!==void 0,P=k?new Set(u):E,[L,H]=j.useState(new Set(b)),D=h!==void 0,S=D?new Set(h):L,I=(O,W)=>{y(W),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(W));},z=(O,W)=>{O.preventDefault(),!(C===null||C===W)&&T(W);},G=()=>{T(null);},V=(O,W)=>{if(O.preventDefault(),!r||C===null||C===W){y(null),T(null);return}let A=[...r],[_]=A.splice(C,1);A.splice(W,0,_),s?.(A),y(null),T(null);},F=()=>{y(null),T(null);},B=j.useCallback((O,W)=>{if(!r)return;let A=new Set(P),_=!A.has(O.id);d?_?A.add(O.id):A.delete(O.id):(A.clear(),_&&A.add(O.id)),k||N(A);let U=r.filter(he=>A.has(he.id));p?.(Array.from(A),{selected:_,selectedItems:U,item:O,event:W});},[r,P,d,k,p]),Q=j.useCallback((O,W)=>{if(!r)return;let A=new Set(S),_=!A.has(O.id);_?A.add(O.id):A.delete(O.id),D||H(A);let U=r.filter(he=>A.has(he.id));v?.(Array.from(A),{checked:_,checkedItems:U,item:O,event:W});},[r,S,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:x,role:"list",className:m(ol({variant:t,size:n,className:e})),...w,children:r.map((O,W)=>{let A=P.has(O.id),_=S.has(O.id);return jsxs("div",{role:"listitem","aria-selected":c?A:void 0,draggable:a,onDragStart:a?me=>I(me,W):void 0,onDragOver:a?me=>z(me,W):void 0,onDragLeave:a?G:void 0,onDrop:a?me=>V(me,W):void 0,onDragEnd:a?F:void 0,onClick:c&&!g?me=>B(O,me):void 0,className:m("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===W&&"opacity-50 scale-[1.02] z-10",M===W&&"border-primary border-dashed border rounded-md",A&&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(wC,{checked:_,onClick:me=>Q(O,me)}),jsx("div",{className:"flex-1 min-w-0",children:o(O,W)})]},O.id)})}):jsx("div",{ref:x,role:"list",className:m(ol({variant:t,size:n,className:e})),...w,children:R})}var TC=j.forwardRef(CC),hf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),xf=j.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:m(hf({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})]}));xf.displayName="ListItem";var yf=j.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:m("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]}));yf.displayName="ListItemText";var Cf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Tf=j.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:m(Cf({position:t,className:e})),...n}));Tf.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"}}),Nf=j.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:m(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]}));Nf.displayName="TimelineItem";var Ef=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex-1 pt-0.5",e),...t}));Ef.displayName="TimelineContent";var kf=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));kf.displayName="TimelineOpposite";var Lf=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}}),Sf=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}}),Df=j.createContext({}),Hf=j.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,u]=j.useState(a),f=o!==void 0?o:d,p=j.useCallback(g=>{o===void 0&&u(g),s?.(g);},[o,s]);return jsx(Df.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:m(Lf({size:t,fullWidth:n,className:e})),...l,children:r})})});Hf.displayName="SegmentedControl";var If=j.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=j.useContext(Df),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:m(Sf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});If.displayName="SegmentedControlItem";var Vf=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"}}),Af=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},ms=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]},zf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${ms(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},Of=j.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:u=true,disabled:f,...p},g)=>{let[h,b]=j.useState(false),[v,R]=j.useState(false),[w,x]=j.useState([]),C=j.useRef(null),y=j.useCallback(S=>{if(!S||S.length===0)return;let I=Array.from(S),z=[],G=[];(u?I:[I[0]]).forEach(F=>{let B=zf(F,c,d);B.length>0?G.push({file:F,errors:B}):z.push(F);}),x(G),z.length>0&&r?.(z),G.length>0&&o?.(G);},[c,d,u,r,o]),M=j.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!f&&(b(true),S.dataTransfer.items)){let z=Array.from(S.dataTransfer.items).some(G=>{if(G.kind!=="file")return true;if(d&&d.length>0){let V=G.type;return !d.some(F=>F.endsWith("/*")?V.startsWith(F.slice(0,-2)):V===F)}return false});R(z);}},[f,d]),T=j.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!f&&(S.dataTransfer.dropEffect="copy");},[f]),E=j.useCallback(S=>{S.preventDefault(),S.stopPropagation();let I=S.currentTarget.getBoundingClientRect(),z=S.clientX,G=S.clientY;(z<I.left||z>I.right||G<I.top||G>I.bottom)&&(b(false),R(false));},[]),N=j.useCallback(S=>{S.preventDefault(),S.stopPropagation(),b(false),R(false),!f&&y(S.dataTransfer.files);},[f,y]),k=j.useCallback(()=>{f||C.current?.click();},[f]),P=j.useCallback(S=>{y(S.target.files),S.target.value="";},[y]),L=j.useCallback(S=>{f||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:m("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:M,onDragOver:T,onDragLeave:E,onDrop:N,onClick:k,onKeyDown:L,className:m(Vf({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:u,disabled:f,onChange:P,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 ${ms(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),w.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:w.map(({file:S,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:S.name}),":"," ",I.map(z=>z.message).join(", ")]},S.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(S=>{let I=Af(S.file);return jsxs("div",{className:m("flex items-center gap-3 rounded-lg border p-3",S.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:S.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[ms(S.file.size),S.error&&jsx("span",{className:"ml-2 text-danger",children:S.error})]}),S.progress!==void 0&&S.progress<100&&jsx(ns,{value:S.progress,className:"mt-2 h-1"})]}),jsxs(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:z=>{z.stopPropagation(),a?.(S.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},S.id)})})]})});Of.displayName="FileUpload";var IC=`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")`,Ff=cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),na=j.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,...d},u)=>jsx("button",{ref:u,type:"button",disabled:c,onClick:g=>{l?.(g),r?.(e);},className:m(Ff({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-ring ring-offset-2",i),style:{backgroundImage:n?IC:void 0,backgroundSize:n?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...d,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));na.displayName="ColorSwatch";var Kf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Gf=j.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,className:c,style:d,...u},f)=>{let[p,g]=j.useState(t),h=e??p,b=j.useCallback(R=>{l||(e===void 0&&g(R),n?.(R));},[e,n,l]),v=R=>R.toLowerCase();return jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:m(Kf({layout:r}),c),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...d},...u,children:a.map(R=>{let w=h?v(h)===v(R):false;return jsx(na,{role:"option",color:R,size:s,shape:i,isSelected:w,onSelect:b,disabled:l,"aria-selected":w},R)})})});Gf.displayName="ColorSwatchPicker";var zC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],$f={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Uf=j.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=zC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,u]=j.useState(e??t),f=j.useId();j.useEffect(()=>{e!==void 0&&u(e);},[e]);let p=b=>{u(b),n?.(b);},g=b=>{u(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();u(v),n?.(v);};return l==="simple"?jsxs("label",{className:m("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",$f[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(nt,{children:[jsx(ht,{asChild:true,children:jsx("button",{ref:c,disabled:r,className:m("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",$f[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`})}),jsx(rt,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(wr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(na,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Uf.displayName="ColorPicker";var Wf=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"}}),il=e=>String(e).padStart(2,"0"),GC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},$C=(e,t)=>`${il(e)}:${il(t)}`,jf=j.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},u)=>{let[f,p]=j.useState(n??""),[g,h]=j.useState(false);j.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=GC(f||"00:00"),R=E=>{let N=E.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&r?.(N);},w=(E,N)=>{let k=Math.max(0,Math.min(23,E)),P=Math.max(0,Math.min(59,N)),L=$C(k,P);p(L),r?.(L);},x=()=>w(b+1,v),C=()=>w(b-1,v),y=()=>w(b,v+a),M=()=>w(b,v-a),T=({value:E,onIncrement:N,onDecrement:k})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:N,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:il(E)}),jsx(te,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:k,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:u,type:"time",value:f,onChange:R,disabled:c,className:m(Wf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(nt,{open:g,onOpenChange:h,children:[jsx(ht,{asChild:true,children:jsxs(te,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxs(rt,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(T,{value:b,onIncrement:x,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:v,onIncrement:y,onDecrement:M,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(te,{variant:"bordered",size:"sm",onClick:()=>{let E=new Date;w(E.getHours(),E.getMinutes());},children:"Now"}),jsx(te,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});jf.displayName="TimeInput";var _f=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"}}),WC=(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}},ll=(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},Yf=(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},Xf=j.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:u="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",disabled:h,placeholder:b,...v},R)=>{let[w,x]=j.useState(r),[C,y]=j.useState(""),[M,T]=j.useState(false),E=n!==void 0?n:w,N=f??WC(a,s);j.useEffect(()=>{!M&&E!==void 0&&y(ll(E,i,p,g));},[E,i,p,g,M]);let k=S=>{let I=S.target.value;if(!I){y(""),n===void 0&&x(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(I))return;y(I);let G=Yf(I,p,g);if(G!==void 0){let V=G;l!==void 0&&G<l&&(V=l),c!==void 0&&G>c&&(V=c),n===void 0&&x(V),o?.(V);}},P=()=>{T(true),E!==void 0&&y(E.toString().replace(".",g));},L=()=>{T(false),y(E!==void 0?ll(E,i,p,g):"");},H=d&&u==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:N}),D=d&&u==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:N});return jsxs("div",{className:"relative flex items-center",children:[H&&jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsx("input",{ref:R,type:"text",inputMode:"decimal",value:C,onChange:k,onFocus:P,onBlur:L,disabled:h,placeholder:b??`0${g}${"0".repeat(i)}`,className:m(_f({size:t}),H&&"pl-8",D&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...v}),D&&jsx("div",{className:"absolute right-3 pointer-events-none",children:D})]})});Xf.displayName="CurrencyInput";var qf=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"}}),cl={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:"#####-####"}},YC=(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}},er=e=>["#","A","*"].includes(e),fs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(er(s)){if(o<e.length){let i=e[o];YC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},dl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];er(o)&&(n+=e[r]);}return n},Zf=(e,t)=>e.split("").map(n=>er(n)?t:n).join(""),XC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)er(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,er(t[i])&&s++;for(;a<t.length&&!er(t[a]);)a++;return Math.min(a,e.length)},Qf=j.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,...u},f)=>{let p=typeof a=="string"&&a in cl?cl[a].mask:a,[g,h]=j.useState(r),[b,v]=j.useState(""),[R,w]=j.useState(false),x=j.useRef(null),C=n!==void 0?n:g;j.useImperativeHandle(f,()=>x.current),j.useEffect(()=>{let E=fs(C,p,true);v(E);},[C,p]);let y=E=>{let N=E.target.value,k=E.target.selectionStart??0,P=N.replace(/[^\w]/g,""),L=fs(P,p,true),H=dl(L,p);v(L),n===void 0&&h(l?L:H),o?.(H,L),requestAnimationFrame(()=>{if(x.current){let D=XC(L,p,k);x.current.setSelectionRange(D,D);}});},M=E=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(E.key)||E.ctrlKey||E.metaKey)return;let N=x.current;if(!N)return;let k=N.selectionStart??0;if(E.key==="Backspace"&&k>0){let P=k-1;for(;P>0&&!er(p[P]);)P--;let L=dl(b,p),H=0;for(let I=0;I<P&&I<p.length;I++)er(p[I])&&H++;let D=L.slice(0,Math.max(0,H-1))+L.slice(H),S=fs(D,p,true);v(S),n===void 0&&h(l?S:D),o?.(D,S),E.preventDefault(),requestAnimationFrame(()=>{x.current&&x.current.setSelectionRange(P,P);});}},T=i?Zf(p,s):d;return jsx("input",{ref:x,type:"text",value:b,onChange:y,onKeyDown:M,onFocus:()=>w(true),onBlur:()=>w(false),disabled:c,placeholder:T,className:m(qf({size:t}),e),style:{borderColor:R?"var(--color-foreground)":void 0},...u})});Qf.displayName="MaskedInput";var Jf=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"}}),vs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},ml={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},ul=(e,t)=>String(e).padStart(t,"0"),bs=(e,t)=>{let n=ul(e.getDate(),2),r=ul(e.getMonth()+1,2),o=ul(e.getFullYear(),4),a=vs[t],s=ml[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},eg=(e,t)=>{let n=vs[t],r=e.split(n);if(r.length!==3)return null;let o=ml[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},JC=e=>e.toLowerCase(),eT=e=>{let t=vs[e];return ml[e].map(r=>r==="year"?"####":"##").join(t)},tg=j.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,format:a="DD/MM/YYYY",minDate:s,maxDate:i,showIcon:l=true,disabled:c,placeholder:d,...u},f)=>{let[p,g]=j.useState(r??null),[h,b]=j.useState(""),[v,R]=j.useState(null),w=j.useRef(null),x=n!==void 0?n:p;j.useImperativeHandle(f,()=>w.current),j.useEffect(()=>{x?(b(bs(x,a)),R(null)):b("");},[x,a]);let C=vs[a],y=eT(a),M=N=>{let k=N.target.value;k=k.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let P=k.replace(new RegExp(`\\${C}`,"g"),""),L="",H=0;for(let D=0;D<y.length&&H<P.length;D++)y[D]==="#"?(L+=P[H],H++):L+=y[D];if(b(L),L.length===y.length){let D=eg(L,a);if(D){if(s&&D<s){R(`Date must be after ${bs(s,a)}`);return}if(i&&D>i){R(`Date must be before ${bs(i,a)}`);return}R(null),n===void 0&&g(D),o?.(D);}else R("Invalid date");}else n===void 0&&g(null),o?.(null),R(null);},T=()=>{h&&h.length!==y.length&&(b(""),R(null),n===void 0&&g(null),o?.(null));},E=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxs("div",{className:"relative",children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",value:h,onChange:M,onBlur:T,disabled:c,placeholder:d??JC(a),className:m(Jf({size:t}),l&&"pr-10",v&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!v,"aria-describedby":v?"date-error":void 0,...u}),l&&jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsx(Calendar,{className:m(E,"text-muted-foreground")})}),v&&jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});tg.displayName="DateInput";var rg=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"}}),og=[{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:"(###) ###-####"}],hs=(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},aT=e=>e.replace(/#/g,"_"),ag=j.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=og,showCountrySelect:c=true,showDialCode:d=false,disabled:u,placeholder:f,...p},g)=>{let[h,b]=j.useState(r),[v,R]=j.useState(a??s),[w,x]=j.useState(false),[C,y]=j.useState(false),[M,T]=j.useState(false),[E,N]=j.useState({top:0,left:0,width:0}),k=j.useRef(null),P=j.useRef(null),L=n!==void 0?n:h,H=a??v,D=l.find(V=>V.code===H)??l[0],S=hs(L,D.format);j.useEffect(()=>{T(true);},[]),j.useEffect(()=>{if(C&&k.current){let V=k.current.getBoundingClientRect();N({top:V.bottom+4,left:V.left,width:Math.max(V.width,280)});}},[C]),j.useEffect(()=>{if(!C)return;let V=F=>{k.current&&!k.current.contains(F.target)&&P.current&&!P.current.contains(F.target)&&y(false);};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]),j.useEffect(()=>{if(!C)return;let V=F=>{F.key==="Escape"&&y(false);};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[C]);let I=V=>{let B=V.target.value.replace(/\D/g,"");n===void 0&&b(B);let Q=hs(B,D.format),ne=`${D.dialCode} ${Q}`;o?.(B,ne,D);},z=V=>{let F=l.find(ne=>ne.code===V);if(!F)return;a===void 0&&R(V),i?.(F);let B=hs(L,F.format),Q=`${F.dialCode} ${B}`;o?.(L,Q,F),y(false);};return jsxs("div",{className:"flex",children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:k,type:"button",disabled:u,onClick:()=>y(!C),className:m("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:D.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:D.dialCode})]}),jsx(ChevronDown,{className:m("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),M&&C&&Xa.createPortal(jsx("div",{ref:P,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:E.top,left:E.left,minWidth:E.width},children:jsx(Ue,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(V=>jsxs("div",{role:"option","aria-selected":V.code===H,onClick:()=>z(V.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:V.code===H&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:V.flag}),jsx("span",{className:"flex-1",children:V.name}),jsx("span",{className:"text-xs text-muted-foreground",children:V.dialCode})]})]},V.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:D.dialCode}),jsx("input",{ref:g,type:"tel",inputMode:"tel",value:S,onChange:I,onFocus:()=>x(true),onBlur:()=>x(false),disabled:u,placeholder:f??aT(D.format),className:m(rg({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:w?"var(--color-foreground)":void 0},...p})]})]})});ag.displayName="PhoneInput";var ig=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"outline",size:"md",sticky:false}}),lg=j.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=j.useState(false),u={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:m(ig({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:m("items-center gap-4 flex-1 justify-end",u),children:a}),jsx("button",{type:"button",className:m("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,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:m("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})]})});lg.displayName="Navbar";var cg=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center gap-2 font-semibold text-lg",e),...t}));cg.displayName="NavbarBrand";var dg=j.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:m("flex items-center gap-4",o,e),...n})});dg.displayName="NavbarContent";var ug=j.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:m("flex items-center",t&&"text-primary font-medium",e),...n}));ug.displayName="NavbarItem";var mg=j.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:m("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));mg.displayName="NavbarLink";var fg=cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",outline:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"outline",size:"md",underline:"hover"}}),gg=j.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:m(fg({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"})]})});gg.displayName="Link";var bg=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"}}),vg=j.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:u,...f},p)=>{let[g,h]=j.useState(false);j.useEffect(()=>{let R=c?.current||window,w=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return R.addEventListener("scroll",w,{passive:true}),w(),()=>{R.removeEventListener("scroll",w);}},[n,c,g,d]);let b=R=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),u?.(R);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:m(bg({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(te,{ref:p,type:"button",variant:a,color:s,size:"icon",radius:l,onClick:b,"aria-label":"Back to top",className:m("shadow-lg",i==="sm"&&"h-9 w-9",i==="md"&&"h-10 w-10",i==="lg"&&"h-12 w-12"),...f,children:r||jsx(ArrowUp,{className:v})})})});vg.displayName="BackTop";var xT=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),yT=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),hg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),Rs=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),xg=j.createContext(null),nr=()=>{let e=j.useContext(xg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},yg=j.createContext(null),oa=()=>{let e=j.useContext(yg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},fl=j.createContext(null),Rg=j.createContext(null),wg=j.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=j.useState(null);return jsx(xg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:m("flex h-10 items-center space-x-1 border bg-background p-1",xT({radius:n}),e),...r,children:t})})});wg.displayName="Menubar";var Cg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=nr(),r=j.useId(),o=j.useRef(null),a=t===r,s=j.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(yg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};Cg.displayName="MenubarMenu";var Tg=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Tg.displayName="MenubarGroup";var Mg=({children:e,container:t})=>{let[n,r]=j.useState(false);return j.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Mg.displayName="MenubarPortal";var Ng=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=j.useState(n),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(fl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Ng.displayName="MenubarSub";var Eg=j.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})}));Eg.displayName="MenubarRadioGroup";var kg=j.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=nr(),{menuId:l,triggerRef:c,open:d,onOpenChange:u}=oa(),f=g=>{t?.(g),u(!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:m("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",yT({radius:i}),e),onClick:f,onMouseEnter:p,...r})});kg.displayName="MenubarTrigger";var Pg=j.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=nr(),l=j.useContext(fl);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:u}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{u.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:m("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",Rs({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Pg.displayName="MenubarSubTrigger";var Lg=j.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=nr(),i=j.useContext(fl);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[u,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let w=d.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),C=w.top,y=w.right+t;y+x.width>window.innerWidth&&(y=w.left-x.width-t),f({top:C,left:y});})();},[l,t,d]);let b=R=>{n?.(R),c(true);},v=R=>{r?.(R),c(false);};return !p||!l?null:Xa.createPortal(jsx("div",{ref:R=>{h.current=R,typeof a=="function"?a(R):a&&(a.current=R);},role:"menu","data-state":l?"open":"closed",className:m("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",hg({radius:s}),e),style:{top:u.top,left:u.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});Lg.displayName="MenubarSubContent";var Sg=j.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=nr(),{triggerRef:l,open:c,onOpenChange:d}=oa(),[u,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);return j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),w=v.bottom+r,x=v.left+n;t==="center"?x=v.left+v.width/2-R.width/2:t==="end"&&(x=v.right-R.width-n),f({top:w,left:x});};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]),j.useEffect(()=>{if(!c)return;let b=v=>{let R=v.target;h.current&&!h.current.contains(R)&&l.current&&!l.current.contains(R)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),j.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:Xa.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:m("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",hg({radius:i}),e),style:{top:u.top,left:u.left},...a,children:o}),document.body)});Sg.displayName="MenubarContent";var Dg=j.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=nr(),{onOpenChange:l}=oa(),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:m("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",Rs({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Dg.displayName="MenubarItem";var Hg=j.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=nr(),{onOpenChange:c}=oa(),d=u=>{if(o){u.preventDefault();return}a?.(u),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:m("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",Rs({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 Ig=j.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=nr(),{onOpenChange:l}=oa(),c=j.useContext(Rg),d=c?.value===n,u=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:m("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",Rs({radius:i}),!r&&"cursor-pointer",e),onClick:u,...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]})});Ig.displayName="MenubarRadioItem";var Vg=j.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Vg.displayName="MenubarLabel";var Ag=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-muted",e),...t}));Ag.displayName="MenubarSeparator";var zg=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});zg.displayName="MenubarShortcut";var Og=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"}}),Bg=j.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=j.Children.toArray(o);return jsx("div",{ref:s,className:m(Og({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>j.isValidElement(l)?j.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)})});Bg.displayName="Steps";var Fg=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"}}),wT=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"}}),CT=cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),Kg=j.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:m(Fg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:m("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:m(wT({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:m("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:m("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:m(CT({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Kg.displayName="Step";var $g=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"}}),Ug=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}}),Wg=j.createContext(null),ST=()=>{let e=j.useContext(Wg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},DT=({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:m("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"})})}),jg=({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:u,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:R,handleDrop:w,allowDrop:x,onDragStart:C,onDragOver:y,onDragEnter:M,onDragLeave:T,onDragEnd:E,showLine:N,showIcon:k,showHandle:P,dragIcon:L,icon:H,leafIcon:D,folderIcon:S,folderOpenIcon:I,blockNode:z,disabled:G,size:V,getAllKeys:F}=ST(),B=e.children&&e.children.length>0,Q=e.isLeaf??!B,ne=o.has(e.key),K=s.has(e.key),O=c.has(e.key),W=d.has(e.key),A=g?.key===e.key,_=b===e.key,U=!!(G||e.disabled),he=l&&e.selectable!==false,me=f&&e.checkable!==false,zn=j.useMemo(()=>U?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,U]),oe=j.useMemo(()=>L!==void 0?L:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[L,p]),tt=j.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:ne,isLeaf:Q}):H:Q?D:ne?I:S,[e.icon,H,ne,Q,D,S,I]),On=Y=>{if(!zn)return;Y.stopPropagation(),Y.dataTransfer.effectAllowed="move";let Se=Y.currentTarget,ie=Se.cloneNode(true),Fe=document.documentElement.classList.contains("dark"),Ke=Fe?"#0a0a0a":"#ffffff",Fn=Fe?"#27272a":"#e4e4e7";ie.style.cssText=`
|
|
44
44
|
position: fixed;
|
|
45
45
|
top: -9999px;
|
|
46
46
|
left: -9999px;
|
|
@@ -52,7 +52,7 @@ import*as W from'react';import {createContext,useContext,useCallback,useState,us
|
|
|
52
52
|
width: ${Se.offsetWidth}px;
|
|
53
53
|
opacity: 1;
|
|
54
54
|
z-index: 9999;
|
|
55
|
-
`,document.body.appendChild(ie),Y.dataTransfer.setDragImage(ie,20,15),setTimeout(()=>{document.body.removeChild(ie);},0),h(e),C?.({event:Y,node:e});},bt=Y=>{if(Y.preventDefault(),Y.stopPropagation(),!g||g.key===e.key||U)return;let Se=Y.currentTarget.getBoundingClientRect(),ie=Y.clientY-Se.top,Fe=Se.height,Ke;ie<Fe*.25?Ke=-1:ie>Fe*.75?Ke=1:Ke=0,!(x&&!x({dropNode:e,dropPosition:Ke,dragNode:g}))&&(R(e.key,Ke),y?.({event:Y,node:e}));},br=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key)&&M?.({event:Y,node:e,expandedKeys:F()});},Bn=Y=>{Y.stopPropagation(),T?.({event:Y,node:e});},Fo=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key||U)&&(v!==null&&w(e,v),h(null),R(null,null));},Bt=Y=>{h(null),R(null,null),E?.({event:Y,node:e});},La=Y=>{U||he&&i(e.key,e,Y);},vr=Y=>{Y.stopPropagation(),!U&&!Q&&a(e.key,e);},$=W.useMemo(()=>{if(!j||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 ""}},[j,v]),re=[...r,n];return jsxs("div",{className:"relative",children:[N&&t>0&&jsxs(Fragment,{children:[r.map((Y,Se)=>!Y&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Se} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Se)),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":Q?void 0:ne,"aria-selected":he?K:void 0,"aria-disabled":U,draggable:zn,onDragStart:On,onDragOver:bt,onDragEnter:br,onDragLeave:Bn,onDrop:Fo,onDragEnd:Bt,onClick:La,className:m("relative",Ug({size:V,isSelected:K,isDragging:A,isDisabled:U,isHoverable:he&&!U}),$,z&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[zn&&P&&oe!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:oe}),jsx("button",{type:"button",onClick:vr,className:m("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Q&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:m("h-4 w-4 transition-transform duration-200",ne&&"rotate-90")})}),me&&jsx(DT,{checked:O,indeterminate:_,disabled:U,onClick:Y=>u(e.key,e,Y)}),k&&tt&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:tt}),jsx("div",{className:m("flex-1 min-w-0 truncate ml-1",z&&"flex-none"),children:e.label})]}),B&&ne&&jsx("div",{role:"group",children:e.children.map((Y,Se)=>jsx(Wg,{node:Y,level:t+1,isLast:Se===e.children.length-1,parentIsLastPath:re},Y.key))})]})},HT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},IT=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},jg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||jg(n,t))return true;return false},Yg=W.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:u=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:R=[],onCheck:w,showLine:x=false,showIcon:C=false,showHandle:y=true,dragIcon:M,icon:T,leafIcon:E=jsx(File,{className:"h-4 w-4"}),folderIcon:N=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:k=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:P,onDragEnter:L,onDragOver:H,onDragLeave:D,onDragEnd:S,onDrop:I,blockNode:z=false,disabled:G=false,...V},F)=>{let B=W.useCallback(()=>l?new Set(HT(r)):new Set(i),[l,i,r]),[Q,ne]=W.useState(B),K=s!==void 0,O=K?new Set(s):Q,_=W.useCallback((xe,$e)=>{let Ft=new Set(O),Ve=!Ft.has(xe);Ve?Ft.add(xe):Ft.delete(xe),K||ne(Ft),c?.(Array.from(Ft),{expanded:Ve,node:$e});},[O,K,c]),[A,j]=W.useState(new Set(p)),U=f!==void 0,he=U?new Set(f):A,me=W.useCallback((xe,$e,Ft)=>{let Ve=new Set(he),gn=!Ve.has(xe);u?gn?Ve.add(xe):Ve.delete(xe):(Ve.clear(),gn&&Ve.add(xe)),U||j(Ve);let Yr=[],Ko=Sa=>{for(let Xr of Sa)Ve.has(Xr.key)&&Yr.push(Xr),Xr.children&&Ko(Xr.children);};Ko(r),g?.(Array.from(Ve),{selected:gn,selectedNodes:Yr,node:$e,event:Ft});},[he,u,U,g,r]),[zn,oe]=W.useState(new Set(R)),[tt,On]=W.useState(new Set),bt=v!==void 0,br=bt?new Set(Array.isArray(v)?v:v.checked):zn,Bn=bt&&!Array.isArray(v)?new Set(v.halfChecked):tt,Fo=W.useCallback((xe,$e,Ft)=>{let Ve=new Set(br),gn=new Set(Bn),Yr=!Ve.has(xe);if(Yr?(Ve.add(xe),gn.delete(xe)):Ve.delete(xe),!b&&$e.children){let Mi=IT($e);for(let Kn of Mi)Yr?(Ve.add(Kn),gn.delete(Kn)):Ve.delete(Kn);}bt||(oe(Ve),On(gn));let Ko=[],Sa=Mi=>{for(let Kn of Mi)Ve.has(Kn.key)&&Ko.push(Kn),Kn.children&&Sa(Kn.children);};Sa(r);let Xr=b?{checked:Array.from(Ve),halfChecked:Array.from(gn)}:Array.from(Ve);w?.(Xr,{checked:Yr,checkedNodes:Ko,node:$e,event:Ft,halfCheckedKeys:Array.from(gn)});},[br,Bn,b,bt,w,r]),[Bt,La]=W.useState(null),[vr,$]=W.useState(null),[re,Y]=W.useState(null),Se=W.useCallback((xe,$e)=>{$(xe),Y($e);},[]),ie=W.useCallback((xe,$e)=>{!Bt||!I||$e===0&&jg(Bt,xe.key)||I({event:{},node:xe,dragNode:Bt,dropPosition:$e,dropToGap:$e!==0});},[Bt,I]),Fe=W.useCallback(()=>Array.from(O),[O]),Ke={expandedKeys:O,toggleExpand:_,selectedKeys:he,handleSelect:me,selectable:d,multiple:u,checkedKeys:br,halfCheckedKeys:Bn,handleCheck:Fo,checkable:h,checkStrictly:b,draggable:o,draggedNode:Bt,setDraggedNode:La,dragOverKey:vr,dragOverPosition:re,setDragOver:Se,handleDrop:ie,allowDrop:a,onDragStart:P,onDragEnter:L,onDragOver:H,onDragLeave:D,onDragEnd:S,showLine:x,showIcon:C,showHandle:y,dragIcon:M,icon:T,leafIcon:E,folderIcon:N,folderOpenIcon:k,blockNode:z,disabled:G,size:n,data:r,getAllKeys:Fe},Fn=xe=>{let $e=xe.relatedTarget,Ft=xe.currentTarget;(!$e||!Ft.contains($e))&&Se(null,null);};return jsx(_g.Provider,{value:Ke,children:jsx("div",{ref:F,role:"tree","aria-multiselectable":u||h,className:m($g({variant:t,size:n,className:e})),onDragLeave:Fn,...V,children:r.map((xe,$e)=>jsx(Wg,{node:xe,level:0,isLast:$e===r.length-1},xe.key))})})});Yg.displayName="Tree";var qg=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),FT=({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))})},KT=(e,t)=>{let[n,r]=W.useState(e);return W.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Zg=W.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:u="No results found.",loadingText:f="Loading...",clearable:p=false,freeSolo:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:R,...w},x)=>{let[C,y]=W.useState(false),[M,T]=W.useState(r),[E,N]=W.useState([]),[k,P]=W.useState(false),[L,H]=W.useState(false),D=W.useRef(null),S=n!==void 0?n:M,I=KT(S,l);W.useImperativeHandle(x,()=>D.current);let z=i?E:s,G=W.useMemo(()=>i?z:z.filter(U=>U.label.toLowerCase().includes(S.toLowerCase())),[z,S,i]);W.useEffect(()=>{if(!i)return;if(I.length<c){N([]);return}let U=false;return (async()=>{P(true);try{let me=await i(I);U||N(me);}catch{U||N([]);}finally{U||P(false);}})(),()=>{U=true;}},[I,i,c]);let V=U=>{n===void 0&&T(U),o?.(U);},F=U=>{let he=U.target.value;V(he),he.length>=c&&y(true);},B=U=>{V(U.label),a?.(U),y(false);},Q=()=>{V(""),D.current?.focus();},ne=()=>{H(true),S.length>=c&&(G.length>0||k)&&y(true);},K=()=>{H(false);},O=U=>{U.key==="Escape"&&y(false),U.key==="ArrowDown"&&!C&&G.length>0&&y(true);},_=C&&S.length>=c,A=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",j=p&&S?"pr-8":"pr-3";return jsxs(nt,{open:_,onOpenChange:y,children:[jsx(Wa,{asChild:true,children:jsxs("div",{className:m("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:D,type:"text",value:S,onChange:F,onFocus:ne,onBlur:K,onKeyDown:O,disabled:R,placeholder:d,className:m(qg({size:t,fullWidth:v}),j,e),style:{borderColor:L?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":_,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...w}),p&&S&&!R&&jsx("button",{type:"button",onClick:Q,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:A})})]})}),jsx(rt,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:h},children:k?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:m(A,"animate-spin")}),f]}):G.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):G.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>B(U),className:m("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:m("mr-2 h-4 w-4 shrink-0",S===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(FT,{text:U.label,query:S}):U.label})]},U.value))})})})]})});Zg.displayName="Autocomplete";var xl=W.createContext(null),yl=W.createContext(null),Rl=()=>{let e=W.useContext(xl);if(!e)throw new Error("useFormContext must be used within a Form");return e},Ts=()=>{let e=W.useContext(yl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},GT={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})},Qg=W.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=W.useState(e),[u,f]=W.useState({}),[p,g]=W.useState({}),[h,b]=W.useState({}),[v,R]=W.useState(false),w=W.useRef(new Map),x=W.useCallback((D,S)=>{w.current.set(D,S);},[]),C=W.useCallback(D=>{w.current.delete(D);},[]),y=W.useCallback(D=>{let S=w.current.get(D)||[],I=c[D];for(let z of S)if(!z.validate(I))return f(G=>({...G,[D]:z.message})),false;return f(z=>({...z,[D]:null})),true},[c]),M=W.useCallback(()=>{let D=true,S={};return w.current.forEach((I,z)=>{let G=c[z];for(let V of I)if(!V.validate(G)){S[z]=V.message,D=false;break}S[z]||(S[z]=null);}),f(S),D},[c]),T=W.useCallback((D,S)=>{d(I=>({...I,[D]:S})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{y(D);},0);},[o,y]),E=W.useCallback((D,S)=>{f(I=>({...I,[D]:S}));},[]),N=W.useCallback((D,S)=>{g(I=>({...I,[D]:S})),S&&r&&y(D);},[r,y]),k=W.useCallback(D=>({value:c[D],error:u[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,u,p,h]),P=W.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),L=async D=>{D.preventDefault();let S={};if(w.current.forEach((z,G)=>{S[G]=true;}),g(S),!M()){n?.(u);return}if(t){R(true);try{await t(c);}finally{R(false);}}},H={values:c,errors:u,touched:p,dirty:h,isSubmitting:v,setValue:T,setError:E,setTouched:N,validateField:y,validateAll:M,registerField:x,unregisterField:C,getFieldState:k,reset:P};return jsx(xl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:L,className:m("space-y-4",s),...i,children:a})})});Qg.displayName="Form";var Jg=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=Rl(),a=W.useId();W.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(yl.Provider,{value:i,children:r})};Jg.displayName="FormField";var eb=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("space-y-1.5",e),...t}));eb.displayName="FormItem";var tb=W.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=Ts();return jsxs(wr,{ref:o,htmlFor:a,className:m(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});tb.displayName="FormLabel";var nb=({children:e})=>{let{name:t,id:n,error:r,touched:o}=Ts(),a=Rl(),s=a.getFieldState(t),i=c=>{let d=c.target,u=d.type==="checkbox"?d.checked:d.value;a.setValue(t,u);},l=()=>{a.setTouched(t,true);};return W.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})};nb.displayName="FormControl";var rb=W.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-xs text-muted-foreground",e),...t}));rb.displayName="FormDescription";var ob=W.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=Ts(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:m("text-xs text-danger",e),role:"alert",...n,children:i}):null});ob.displayName="FormMessage";var sb=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"}}),ib=W.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:m(sb({size:t,className:e})),...i,children:[jsxs(Cr,{"data-user-avatar":true,children:[o&&jsx(eo,{src:o,alt:n}),jsx(Tr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});ib.displayName="User";var cb=cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),db=W.forwardRef(({className:e,variant:t,size:n,...r},o)=>jsx("code",{ref:o,className:m(cb({variant:t,size:n,className:e})),...r}));db.displayName="Code";var ub=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),mb=W.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[u,f]=W.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:m(ub({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:m("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":u?"Copied":a,children:u?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});mb.displayName="Snippet";var Tl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),pb=W.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,...u},f)=>{let[p,g]=W.useState("loading");W.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:m(Tl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:m(Tl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx($a,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:m("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...u})]})});pb.displayName="Image";var bb=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"}}),vb=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"}}),hb=W.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),xb=W.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=W.useState(r),u=n??c,f=p=>{let g;if(a){let h=Array.isArray(u)?u:[u].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(hb.Provider,{value:{value:u,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:m(bb({size:t,className:e})),...i,children:s})})});xb.displayName="Listbox";var yb=W.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:u}=W.useContext(hb),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:m(vb({size:u}),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"})]})});yb.displayName="ListboxItem";var wb=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"}}),Cb=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 tM({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,u]=W.useState(null),[f,p]=W.useState(null),g=(w,x)=>{i||(u(x),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",String(x)));},h=(w,x)=>{w.preventDefault(),!(i||d===null||d===x)&&p(x);},b=()=>{p(null);},v=(w,x)=>{if(w.preventDefault(),i||d===null||d===x){u(null),p(null);return}let C=[...r],[y]=C.splice(d,1);C.splice(x,0,y),o?.(C),u(null),p(null);},R=()=>{u(null),p(null);};return jsx("div",{ref:c,className:m(wb({variant:t,size:n,className:e})),...l,children:r.map((w,x)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,x),onDragOver:C=>h(C,x),onDragLeave:b,onDrop:C=>v(C,x),onDragEnd:R,className:m(Cb({variant:t,size:n,isDragging:d===x,isDragOver:f===x}),!i&&"cursor-move"),children:[s&&jsx("div",{className:m("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(w,x)})]},w.id))})}var nM=W.forwardRef(tM);var Nb=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}}),sM={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Eb=W.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:m("relative",e),...i,children:[s,jsx("div",{className:m(Nb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:m(sM[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Eb.displayName="LoadingOverlay";var kb=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"}}),Pb=W.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=W.useState(0),[c,d]=W.useState(false),u=W.useRef(null);return W.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),u.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)),()=>{u.current&&clearInterval(u.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:m(kb({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:m("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")})})]})});Pb.displayName="NProgress";var Hb=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}}),Lb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},mM={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Ib=W.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:m(mM[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:m(Lb[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:m(Lb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:m(Hb({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:m("text-sm",l),children:o})]})})});Ib.displayName="Loading";var El=class extends W.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,n){this.props.onError?.(t,n);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,o)=>r!==t.resetKeys?.[o])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(kl,{error:this.state.error,onReset:this.reset}):this.props.children}},kl=W.forwardRef(({error:e,onReset:t,className:n},r)=>jsxs("div",{ref:r,className:m("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",n),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));kl.displayName="DefaultErrorFallback";var gM=El;var Ab=W.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},u)=>{let[f,p]=W.useState(false),[g,h]=W.useState(t),b=e!==void 0,v=b?e:g,R=x=>{b||h(x),n?.(x);},w=x=>{if(!x)return r;let{from:C,to:y}=x;return C&&y?`${format(C,o)} - ${format(y,o)}`:C?format(C,o):r};return jsxs(nt,{open:f,onOpenChange:p,children:[jsx(ht,{asChild:true,children:jsxs(te,{ref:u,variant:"bordered",disabled:a,className:m("w-full justify-start text-left font-normal",!v?.from&&"text-muted-foreground",c),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),w(v)]})}),jsx(rt,{className:"w-auto p-0",align:d,children:jsx(so,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:R,numberOfMonths:l,disabled:x=>!!(s&&x<s||i&&x>i),initialFocus:true})})]})});Ab.displayName="DateRangePicker";var bo=e=>String(e).padStart(2,"0"),zb=W.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=W.useState(false),d=r?Array.from({length:24},(w,x)=>x):Array.from({length:12},(w,x)=>x+1),u=Array.from({length:Math.floor(60/o)},(w,x)=>x*o),f=w=>{if(!w)return n;if(r)return `${bo(w.hours)}:${bo(w.minutes)}`;let x=w.hours%12||12,C=w.hours>=12?"PM":"AM";return `${bo(x)}:${bo(w.minutes)} ${C}`},p=w=>{let x=e?.minutes??0,C=w;if(!r&&e){let y=e.hours>=12;y&&w!==12?C=w+12:!y&&w===12&&(C=0);}t?.({hours:C,minutes:x});},g=w=>{let x=e?.hours??0;t?.({hours:x,minutes:w});},h=w=>{if(!e)return;let x=e.hours;w==="AM"&&e.hours>=12?x=e.hours-12:w==="PM"&&e.hours<12&&(x=e.hours+12),t?.({hours:x,minutes:e.minutes});},b=()=>{let w=new Date;t?.({hours:w.getHours(),minutes:w.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,R=e?r?e.hours:e.hours%12||12:void 0;return jsxs(nt,{open:l,onOpenChange:c,children:[jsx(ht,{asChild:true,children:jsxs(te,{ref:i,variant:"bordered",disabled:a,className:m("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsx(Clock,{className:"mr-2 h-4 w-4"}),f(e)]})}),jsxs(rt,{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(Ue,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(w=>jsx(te,{variant:R===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(w),children:bo(w)},w))})})]}),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(Ue,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:u.map(w=>jsx(te,{variant:e?.minutes===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(w),children:bo(w)},w))})})]}),!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(te,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(te,{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(te,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(te,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});zb.displayName="TimePicker";var Ob=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function xM({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},u){let f=W.useRef(null),[p,g]=W.useState(0);W.useImperativeHandle(u,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),R=Math.ceil(o/b)+2*a,w=Math.min(n.length-1,v+R),x=y=>{let M=y.currentTarget.scrollTop;g(M),c?.(M);},C=W.useMemo(()=>{let y=[];for(let M=v;M<=w;M++)n[M]!==void 0&&y.push({item:n[M],index:M,style:{position:"absolute",top:M*b,left:0,right:0,height:r}});return y},[n,v,w,b,r]);return jsx("div",{ref:f,className:m(Ob({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:x,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:y,index:M,style:T})=>jsx("div",{style:T,children:s(y,M)},i?i(y,M):M))})})}var yM=W.forwardRef(xM);var Fb=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Sl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Kb=W.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:u,...f},p)=>{let g=W.useRef(null),h=W.useRef(null),b=W.useRef(false);W.useImperativeHandle(p,()=>g.current),W.useEffect(()=>{let R=h.current;if(!R)return;let w=new IntersectionObserver(x=>{let[C]=x;C.isIntersecting&&a&&!s&&!b.current&&(b.current=true,Promise.resolve(o()).finally(()=>{b.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return w.observe(R),()=>{w.disconnect();}},[a,s,o,l,c,d]);let v=jsx("div",{className:m(Sl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:g,className:m(Fb({variant:t,className:e})),...f,children:[r,jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||v),!a&&!s&&u&&jsx("div",{className:m(Sl({size:n}),"text-muted-foreground text-sm"),children:u})]})});Kb.displayName="InfiniteScroll";var ca=W.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:m("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));ca.displayName="VisuallyHidden";var $b={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},TM={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"},Ub=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"),Dl=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Hs=W.createContext(null),Ir=()=>{let e=W.useContext(Hs);if(!e)throw new Error("Modal components must be used within a Modal");return e},Wb=W.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:u,className:f},p)=>{let[g,h]=W.useState(false),b=e!==void 0,v=b?e:g,[R,w]=W.useState(false),x=W.useRef(null),C=W.useId(),y=W.useId();W.useEffect(()=>{w(true);},[]);let M=W.useCallback(k=>{b||h(k),t?.(k);},[b,t]);W.useEffect(()=>{if(v)return ct(),()=>dt()},[v]),W.useEffect(()=>{if(!v||i)return;let k=P=>{P.key==="Escape"&&M(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[v,i,M]);let T=k=>{s&&k.target===k.currentTarget&&M(false);},E=n?W.isValidElement(n)?W.cloneElement(n,{onClick:k=>{n.props.onClick?.(k),M(true);}}):jsx("button",{type:"button",onClick:()=>M(true),children:n}):null,N=()=>!R||!v?null:d==="outside"?Xa.createPortal(jsx("div",{"data-state":v?"open":"closed",className:m(Ub(),$b[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:m("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",u==="xs"&&"w-full max-w-xs",u==="sm"&&"w-full max-w-sm",u==="md"&&"w-full max-w-md",u==="lg"&&"w-full max-w-lg",u==="xl"&&"w-full max-w-xl",u==="2xl"&&"w-full max-w-2xl",u==="3xl"&&"w-full max-w-3xl",u==="4xl"&&"w-full max-w-4xl",u==="5xl"&&"w-full max-w-5xl",u==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!u&&"w-full max-w-md",f),children:[jsx(ca,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>M(false)})]})}),document.body):Xa.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:m(Ub(),$b[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:m(Dl({size:u}),TM[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(ca,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>M(false)})]})]}),document.body);return jsxs(Hs.Provider,{value:{open:v,onOpenChange:M,scrollBehavior:d,titleId:C,descriptionId:y},children:[E,N()]})});Wb.displayName="Modal";var jb=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=W.useState(n),i=t!==void 0,l=i?t:a,c=W.useId(),d=W.useId(),u=W.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Hs.Provider,{value:{open:l,onOpenChange:u,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};jb.displayName="ModalRoot";var Yb=W.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(true);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(true);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Yb.displayName="ModalTrigger";var Hl=({children:e,container:t})=>{let[n,r]=W.useState(false);return W.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Hl.displayName="ModalPortal";var Il=W.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ir();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:m("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});Il.displayName="ModalOverlay";var Vl=W.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(false);};return e&&W.isValidElement(t)?W.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(false);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Vl.displayName="ModalClose";var Xb=W.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:u}=Ir(),[f,p]=W.useState(false);return W.useEffect(()=>{p(true);},[]),W.useEffect(()=>{if(l)return ct(),()=>dt()},[l]),W.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(Hl,{children:[jsx(Il,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":u,"data-state":l?"open":"closed",className:m(Dl({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Vl,{asChild:true,children:jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10"})})]})]})});Xb.displayName="ModalContent";var qb=({className:e,...t})=>jsx("div",{className:m("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});qb.displayName="ModalHeader";var Zb=({className:e,children:t})=>(W.useContext(Hs)?.scrollBehavior??"inside")==="inside"?jsx(Ue,{className:m("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:m(e),children:t});Zb.displayName="ModalBody";var Qb=({className:e,children:t,...n})=>{let{onOpenChange:r}=Ir();return jsx("div",{className:m("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:W.Children.map(t,o=>W.isValidElement(o)?W.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};Qb.displayName="ModalFooter";var Jb=W.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Ir();return jsx("h2",{ref:n,id:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t})});Jb.displayName="ModalTitle";var ev=W.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Ir();return jsx("p",{ref:n,id:r,className:m("text-sm text-muted-foreground",e),...t})});ev.displayName="ModalDescription";var rv=cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),SM=cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),DM=W.createContext(null),HM={default:HelpCircle,danger:XCircle,warning:AlertTriangle,success:CheckCircle,info:Info},Al=W.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,confirmText:a="Confirm",cancelText:s="Cancel",onConfirm:i,onCancel:l,showIcon:c=true,icon:d,variant:u="default",loading:f=false,disabled:p=false,className:g},h)=>{let[b,v]=W.useState(false),[R,w]=W.useState(false),[x,C]=W.useState(false),y=e!==void 0,M=y?e:b,T=HM[u||"default"],E=W.useId(),N=W.useId();W.useEffect(()=>{C(true);},[]);let k=W.useCallback(I=>{y||v(I),t?.(I);},[y,t]);W.useEffect(()=>{if(M)return ct(),()=>dt()},[M]);let P=async()=>{if(i){let I=i();if(I instanceof Promise){w(true);try{await I;}finally{w(false);}}}k(false);},L=()=>{l?.(),k(false);},H=f||R,D=n?W.isValidElement(n)?W.cloneElement(n,{onClick:I=>{n.props.onClick?.(I),k(true);}}):jsx("button",{type:"button",onClick:()=>k(true),children:n}):null,S=()=>!x||!M?null:Xa.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":M?"open":"closed",className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","aria-hidden":"true"}),jsxs("div",{ref:h,role:"alertdialog","aria-modal":"true","aria-labelledby":E,"aria-describedby":o?N:void 0,"data-state":M?"open":"closed",className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",g),children:[jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[c&&jsx("div",{className:m(rv({variant:u})),children:d||jsx(T,{className:"h-6 w-6"})}),jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsx("h2",{id:E,className:"text-lg font-semibold",children:r}),o&&jsx("p",{id:N,className:"text-sm text-muted-foreground",children:o})]})]}),jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsx("button",{type:"button",className:m(tn({variant:"bordered"})),onClick:L,disabled:H,children:s}),jsx("button",{type:"button",className:m(tn(),SM({variant:u}),H&&"opacity-50 cursor-not-allowed"),onClick:P,disabled:p||H,children:H?jsxs("span",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):a})]})]})]}),document.body);return jsxs(DM.Provider,{value:{open:M,onOpenChange:k,titleId:E,descriptionId:N},children:[D,S()]})});Al.displayName="ConfirmDialog";function IM(){let[e,t]=W.useState({open:false,options:null,resolve:null}),n=W.useCallback(i=>new Promise(l=>{t({open:true,options:i,resolve:l});}),[]),r=W.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),o=W.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),a=W.useCallback(i=>{i||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=W.useMemo(()=>e.options?jsx(Al,{open:e.open,onOpenChange:a,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:o}):null,[e,r,o,a]);return {confirm:n,ConfirmDialog:s}}var _M=e=>e.map(t=>typeof t=="string"?{src:t}:t),zl=W.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:u=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=W.useMemo(()=>_M(e),[e]),[v,R]=W.useState(r),[w,x]=W.useState(1),[C,y]=W.useState(0),[M,T]=W.useState(false),[E,N]=W.useState(false),[k,P]=W.useState({x:0,y:0}),[L,H]=W.useState({x:0,y:0}),[D,S]=W.useState(false),I=W.useRef(null),z=b[v];W.useEffect(()=>{S(true);},[]),W.useEffect(()=>{R(r);},[r]),W.useEffect(()=>{o?.(v);},[v,o]),W.useEffect(()=>{x(1),y(0),P({x:0,y:0});},[v]),W.useEffect(()=>{if(t)return ct(),()=>dt()},[t]);let G=W.useCallback(()=>{R(oe=>oe>0?oe-1:b.length-1);},[b.length]),V=W.useCallback(()=>{R(oe=>oe<b.length-1?oe+1:0);},[b.length]),F=()=>{x(oe=>Math.min(oe+.5,4));},B=()=>{x(oe=>{let tt=Math.max(oe-.5,.5);return tt===1&&P({x:0,y:0}),tt});},Q=()=>{y(oe=>(oe+90)%360);},ne=async()=>{if(z)try{let tt=await(await fetch(z.src)).blob(),On=URL.createObjectURL(tt),bt=document.createElement("a");bt.href=On,bt.download=z.alt||`image-${v+1}`,document.body.appendChild(bt),bt.click(),document.body.removeChild(bt),URL.revokeObjectURL(On);}catch{window.open(z.src,"_blank");}},K=async()=>{if(I.current)if(M)try{await document.exitFullscreen(),T(!1);}catch{}else try{await I.current.requestFullscreen(),T(!0);}catch{}},O=oe=>{w>1&&(N(true),H({x:oe.clientX-k.x,y:oe.clientY-k.y}));},_=oe=>{E&&w>1&&P({x:oe.clientX-L.x,y:oe.clientY-L.y});},A=()=>{N(false);},j=()=>{n?.(false);},U=oe=>{p&&oe.target===oe.currentTarget&&j();},he=W.useCallback(oe=>{switch(oe.key){case "ArrowLeft":G();break;case "ArrowRight":V();break;case "Escape":n?.(false);break;case "+":case "=":F();break;case "-":B();break}},[G,V,n]);if(W.useEffect(()=>{if(t)return window.addEventListener("keydown",he),()=>window.removeEventListener("keydown",he)},[t,he]),W.useEffect(()=>{let oe=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",oe),()=>document.removeEventListener("fullscreenchange",oe)},[]),b.length===0)return null;let me=a?W.isValidElement(a)?W.cloneElement(a,{onClick:oe=>{a.props.onClick?.(oe),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[me,!D||!t?null:Xa.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:U}),jsxs("div",{ref:h,className:m("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]}),z?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:z.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:B,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(w*100),"%"]}),jsx("button",{onClick:F,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:Q,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:ne,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:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:M?"Exit fullscreen":"Fullscreen",children:M?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:j,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{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:O,onMouseMove:_,onMouseUp:A,onMouseLeave:A,children:[u&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:G,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:V,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:z?.src,alt:z?.alt||"",className:m("max-h-full max-w-full object-contain transition-transform duration-200",E?"cursor-grabbing":w>1?"cursor-grab":""),style:{transform:`translate(${k.x}px, ${k.y}px) scale(${w}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((oe,tt)=>jsx("button",{onClick:()=>R(tt),className:m("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===tt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:oe.src,alt:oe.alt||`Thumbnail ${tt+1}`,className:"h-full w-full object-cover"})},tt))})]})]}),document.body)]})});zl.displayName="ImageViewer";var av=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=W.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:m("cursor-zoom-in",r),children:e}),jsx(zl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};av.displayName="ImageViewerTrigger";var sv=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),iv=W.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let u=a!=null;return jsxs("span",{ref:d,className:m(sv({color:t,size:u?void 0:n,position:r,ping:o}),u&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsx("span",{className:m("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});iv.displayName="Indicator";var lv=W.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("relative inline-flex",e),...n,children:t}));lv.displayName="IndicatorWrapper";var dv=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),uv=W.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=W.useRef(null),[c,d]=W.useState({top:false,bottom:false,left:false,right:false});W.useImperativeHandle(i,()=>l.current);let u=W.useCallback(()=>{let v=l.current;if(!v)return;let{scrollTop:R,scrollLeft:w,scrollHeight:x,scrollWidth:C,clientHeight:y,clientWidth:M}=v;d({top:R>0,bottom:R<x-y-1,left:w>0,right:w<C-M-1});},[]);W.useEffect(()=>{let v=l.current;if(v)return u(),v.addEventListener("scroll",u),window.addEventListener("resize",u),()=>{v.removeEventListener("scroll",u),window.removeEventListener("resize",u);}},[u]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",b={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:l,className:m(dv({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:a})});uv.displayName="ScrollShadow";var mv=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",outline:"rounded border border-border text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),ZM={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"},QM={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"},JM=e=>{let t=e.toLowerCase();return ZM[t]||e.toUpperCase()},ua=e=>{let t=e.toLowerCase();return QM[t]||t},Is=e=>{let t=ua(e);return ["meta","control","alt","shift"].includes(t)},pv=W.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{W.useEffect(()=>{if(!a||!r||s)return;let u=Array.isArray(r)?r:[r],f=u.filter(Is).map(ua),p=u.filter(h=>!Is(h)).map(ua),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,R=f.includes("alt")===h.altKey,w=f.includes("shift")===h.shiftKey,x=p.length===0||p.includes(h.key.toLowerCase());b&&v&&R&&w&&x&&(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(W.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:JM(f)})]},p)):o;return jsx("kbd",{ref:c,className:m(mv({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});pv.displayName="Kbd";function eN(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;W.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(Is).map(ua),i=a.filter(c=>!Is(c)).map(ua),l=c=>{let d=s.includes("meta")===c.metaKey,u=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&&u&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var fv=cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),gv=W.forwardRef(({className:e,variant:t,size:n,value:r,successDuration:o=2e3,onCopySuccess:a,onCopyError:s,copyIcon:i,successIcon:l,...c},d)=>{let[u,f]=W.useState(false),p={sm:14,md:16,lg:20}[n??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),f(!0),a?.(),setTimeout(()=>{f(!1);},o);}catch(h){s?.(h);}};return jsx("button",{ref:d,type:"button",className:m(fv({variant:t,size:n}),e),onClick:g,"aria-label":u?"Copied":"Copy to clipboard",...c,children:u?l??jsx(Check,{className:"text-success",style:{width:p,height:p}}):i??jsx(Copy,{style:{width:p,height:p}})})});gv.displayName="CopyButton";var vv=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),lN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],cN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function dN(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 uN(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function zs(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function As(e){return zs(e,new Date)}function bv(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return zs(r,t)||zs(o,t)||r<t&&o>t})}var hv=W.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:u="en-US",...f},p)=>{let[g,h]=W.useState(new Date),b=s??g,v=N=>{i?i(N):h(N);},R=d===1?cN:lN,w=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()-1):o==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),v(N);},x=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()+1):o==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),v(N);},C=()=>{v(new Date);},y=()=>o==="day"?b.toLocaleDateString(u,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(u,{year:"numeric",month:"long"}),M=()=>{let N=dN(b.getFullYear(),b.getMonth(),d);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:R.map(k=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:k},k))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((k,P)=>{let L=bv(r,k),H=k.getMonth()===b.getMonth();return jsxs("div",{className:m("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(k),children:[jsx("div",{className:m("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",As(k)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:k.getDate()}),jsxs("div",{className:"space-y-0.5",children:[L.slice(0,3).map(D=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:D.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(D);},children:D.title},D.id)),L.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",L.length-3," more"]})]})]},P)})})]})},T=()=>{let N=uN(b,d),k=Array.from({length:24},(P,L)=>L);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),N.map((P,L)=>jsxs("div",{className:m("p-2 text-center border-l",As(P)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:R[L]}),jsx("div",{className:m("text-lg font-semibold",As(P)&&"text-primary"),children:P.getDate()})]},L))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:k.map(P=>jsxs(W.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[P.toString().padStart(2,"0"),":00"]}),N.map((L,H)=>{let D=new Date(L);D.setHours(P,0,0,0);let S=r.filter(I=>{let z=new Date(I.start);return zs(z,L)&&z.getHours()===P});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:S.map(I=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),l?.(I);},children:I.title},I.id))},H)})]},P))})})]})},E=()=>{let N=Array.from({length:24},(P,L)=>L),k=bv(r,b);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:m("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",As(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(P=>{let L=new Date(b);L.setHours(P,0,0,0);let H=k.filter(D=>new Date(D.start).getHours()===P);return jsxs(W.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[P.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(L),children:H.map(D=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:D.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(D);},children:D.title},D.id))})]},P)})})})]})};return jsxs("div",{ref:p,className:m(vv({variant:t,size:n,className:e})),...f,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(te,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsx(te,{variant:"ghost",size:"icon",onClick:w,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(te,{variant:"ghost",size:"icon",onClick:x,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:y()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsx(te,{variant:o===N?"solid":"ghost",size:"sm",onClick:()=>a?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),o==="month"&&M(),o==="week"&&T(),o==="day"&&E()]})});hv.displayName="FullCalendar";var pa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),fa=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],xv=W.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},u)=>jsx("div",{ref:u,className:m(pa({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,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),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))]})})}));xv.displayName="LineChart";var yv=W.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...u},f)=>jsx("div",{ref:f,className:m(pa({size:t,className:e})),...u,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,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),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))]})})}));yv.displayName="BarChart";var Rv=W.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=fa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...u},f)=>jsx("div",{ref:f,className:m(pa({size:t,className:e})),...u,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),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}`))})]})})}));Rv.displayName="PieChart";var wv=W.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...u},f)=>jsx("div",{ref:f,className:m(pa({size:t,className:e})),...u,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,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),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))]})})}));wv.displayName="AreaChart";var Mv=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),Nv=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),_l=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function IN({card:e,columnId:t,variant:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),u={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:u,className:m(_l({variant:n,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:r?r(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function VN({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxs("div",{className:m(Nv({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsx(te,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(Ue,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(i=>i.id),strategy:verticalListSortingStrategy,children:e.cards.map(i=>jsx(IN,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Ev=W.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[u,f]=W.useState(null),[p,g]=W.useState(null),h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=x=>n.find(C=>C.cards.some(y=>y.id===x));return jsxs(DndContext,{sensors:h,collisionDetection:closestCorners,onDragStart:x=>{let{active:C}=x,y=b(C.id);if(y){let M=y.cards.find(T=>T.id===C.id);M&&(f(M),g(y.id));}},onDragOver:x=>{let{active:C,over:y}=x;if(!y)return;let M=C.id,T=y.id,E=b(M),N=b(T)||n.find(L=>L.id===T);if(!E||!N||E.id===N.id)return;let k=N.cards.findIndex(L=>L.id===T),P=k===-1?N.cards.length:k;r?.(M,E.id,N.id,P);},onDragEnd:x=>{let{active:C,over:y}=x;if(y&&C.id!==y.id){let M=b(C.id),T=b(y.id)||n.find(E=>E.id===y.id);if(M&&T){let E=T.cards.findIndex(k=>k.id===y.id),N=E===-1?T.cards.length:E;r?.(C.id,M.id,T.id,N);}}f(null),g(null);},children:[jsx("div",{ref:d,className:m(Mv({variant:t,className:e})),...c,children:n.map(x=>jsx(VN,{column:x,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},x.id))}),jsx(DragOverlay,{children:u&&p&&jsx("div",{className:m(_l({variant:t,isDragging:true})),children:s?s(u,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:u.title}),u.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:u.description})]})]})})})]})});Ev.displayName="KanbanBoard";var kv=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Pv=W.createContext(null);function Wl(){let e=W.useContext(Pv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Lv=W.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[u,f]=AN({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=W.useState(false),[h,b]=W.useState(false),[v,R]=W.useState(0),[w,x]=W.useState([]),C=W.useCallback(N=>{N&&(R(N.selectedScrollSnap()),g(N.canScrollPrev()),b(N.canScrollNext()));},[]),y=W.useCallback(()=>{f?.scrollPrev();},[f]),M=W.useCallback(()=>{f?.scrollNext();},[f]),T=W.useCallback(N=>{f?.scrollTo(N);},[f]),E=W.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),y()):N.key==="ArrowRight"&&(N.preventDefault(),M());},[y,M]);return W.useEffect(()=>{!f||!l||l(f);},[f,l]),W.useEffect(()=>{if(f)return x(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(Pv.Provider,{value:{carouselRef:u,api:f,scrollPrev:y,scrollNext:M,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:w,scrollTo:T},children:jsxs("div",{ref:d,className:m(kv({variant:t,className:e})),onKeyDownCapture:E,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:u,className:"overflow-hidden",children:jsx("div",{className:m("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(jl,{}),jsx(Yl,{})]}),i&&w.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:w.map((N,k)=>jsx("button",{className:m("w-2 h-2 rounded-full transition-all",k===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(k),"aria-label":`Go to slide ${k+1}`},k))})]})})});Lv.displayName="Carousel";var Sv=W.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex",e),...t}));Sv.displayName="CarouselContent";var Dv=W.forwardRef(({className:e,basis:t="basis-full",...n},r)=>jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:m("min-w-0 shrink-0 grow-0 pl-4",t,e),...n}));Dv.displayName="CarouselItem";var jl=W.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollPrev:a,canScrollPrev:s}=Wl();return jsxs(te,{ref:o,variant:t,size:n,className:m("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});jl.displayName="CarouselPrevious";var Yl=W.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollNext:a,canScrollNext:s}=Wl();return jsxs(te,{ref:o,variant:t,size:n,className:m("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Yl.displayName="CarouselNext";var Hv=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"}}),$s={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"}},ql={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}"]},Iv=W.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=W.useState(r.length>0?"recent":o),[u,f]=W.useState(""),g=u?Object.values(ql).flat().filter(b=>b.toLowerCase().includes(u.toLowerCase())):c==="recent"?r:ql[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:m(Hv({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(Oa,{placeholder:"Search emojis...",value:u,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!u&&jsx("div",{className:"flex border-b px-1",children:Object.entries($s).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:m("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:$s[b].name,children:v},b))}),!u&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:$s[c].name}),jsx(Ue,{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"})]})})]})});Iv.displayName="EmojiPicker";var Vv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),fE=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"}}),gE=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"}}),We=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(Un,{children:[jsx(_n,{asChild:true,children:jsx(te,{type:"button",variant:n?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Wn,{side:"top",className:"text-xs",children:t})]}),Av=W.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,...u},f)=>{let p=useEditor({extensions:[_N.configure({heading:{levels:[1,2,3]}}),WN.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),jN,YN.configure({types:["heading","paragraph"]}),XN.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});W.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),W.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($n,{children:jsxs("div",{ref:f,className:m(Vv({variant:t,size:n,className:e})),...u,children:[i&&!s&&jsxs("div",{className:m(fE({size:n})),children:[jsx(We,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(We,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(We,{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(We,{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(We,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(We,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(We,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(We,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(We,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(We,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(We,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(We,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(We,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(We,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(We,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(We,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(We,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(We,{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:m(gE({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});Av.displayName="RichTextEditor";var Ov=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function CE(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function zv(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,u=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(u),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 Bv=W.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:u,...f},p)=>{let g=W.useRef(null),[h,b]=W.useState(),[v,R]=W.useState(),[w,x]=W.useState(1),[C,y]=W.useState(0),M=k=>{let{width:P,height:L}=k.currentTarget;if(r){let H=CE(P,L,r);b(H);}else b(u||{unit:"%",x:10,y:10,width:80,height:80});},T=k=>{b(k),o?.(k);},E=async k=>{if(R(k),a&&g.current&&k.width&&k.height){let P=await zv(g.current,k,C,w);a(P);}},N=()=>{y(k=>(k+90)%360);};return W.useEffect(()=>{v&&g.current&&a&&zv(g.current,v,C,w).then(k=>{a(k);});},[w,C,v,a]),jsxs("div",{ref:p,className:m(Ov({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(bE,{crop:h,onChange:T,onComplete:E,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:M,style:{transform:`scale(${w}) 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(Ja,{value:[w],onValueChange:([k])=>x(k),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(te,{variant:"bordered",size:"icon",onClick:N,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});Bv.displayName="ImageCropper";var ec=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"}}),NE={sm:96,md:128,lg:192},Kv=W.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:u=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??NE[n??"md"];return r?jsx("div",{ref:h,className:m(ec({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(TE,{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:u,height:u,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:m(ec({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"})})});Kv.displayName="QRCode";var Gv=({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});Gv.displayName="ThemeProvider";var HE=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),$v=W.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=W.useState(false);W.useEffect(()=>{c(true);},[]);let d=()=>{let u=["light","dark","system"],p=(u.indexOf(a||"system")+1)%u.length;s(u[p]);};return l?r==="cycle"?jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:m("h-9 w-9",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(no,{children:[jsx(ro,{children:jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:m("h-9 w-9",e),children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(oo,{align:"end",children:[jsxs(jn,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs(jn,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs(jn,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:m("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});$v.displayName="ThemeToggle";var Uv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),_v=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Wv=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"}}),jv=W.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:u,endContent:f,id:p,...g},h)=>{let b=W.useId(),v=p||b,R=`${v}-description`,w=`${v}-error`,x=a&&r;return jsxs("div",{className:m(Uv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:m(Wv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[u&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":x?w:n?R:void 0,"aria-required":o,className:m(_v({size:s,isInvalid:a}),u&&"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&&!x&&jsx("p",{id:R,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),x&&jsx("p",{id:w,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});jv.displayName="TextField";var qv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),AE=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}}),Yv=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Xv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),zE=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"}}),Zv=W.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:u,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:R,fullWidth:w=false,disabled:x,id:C,...y},M)=>{let T=W.useId(),E=C||T,N=`${E}-description`,k=`${E}-error`,[P,L]=W.useState(h),[H,D]=W.useState(false),S=g!==void 0?g:P,I=a&&r,z=W.useCallback(O=>{O!==void 0&&(u!==void 0&&O<u&&(O=u),f!==void 0&&O>f&&(O=f)),g===void 0&&L(O),b?.(O);},[g,u,f,b]),G=()=>{let O=(S??0)+p;z(O);},V=()=>{let O=(S??0)-p;z(O);},F=O=>{let _=O.target.value;if(_==="")z(void 0);else {let A=parseFloat(_);isNaN(A)||z(A);}},B=O=>{O.key==="ArrowUp"?(O.preventDefault(),G()):O.key==="ArrowDown"&&(O.preventDefault(),V());},Q=W.useMemo(()=>S===void 0?"":R?new Intl.NumberFormat(void 0,R).format(S):S.toString(),[S,R]),ne=u!==void 0&&S!==void 0&&S<=u,K=f!==void 0&&S!==void 0&&S>=f;return jsxs("div",{className:m(qv({size:s}),e),children:[t&&jsxs("label",{htmlFor:E,className:m(zE({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:V,disabled:x||ne,className:m(Yv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:m(Xv({size:s}))})}),jsx("input",{ref:M,id:E,type:"text",inputMode:"decimal",value:Q,onChange:F,onKeyDown:B,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?k:n?N:void 0,"aria-required":o,"aria-valuemin":u,"aria-valuemax":f,"aria-valuenow":S,disabled:x,className:m(AE({size:s,isInvalid:a,fullWidth:w}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),v&&jsx("button",{type:"button",onClick:G,disabled:x||K,className:m(Yv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:m(Xv({size:s}))})})]}),n&&!I&&jsx("p",{id:N,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:k,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Zv.displayName="NumberField";var Jv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),FE=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Qv=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"}}),KE=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"}}),GE=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"}}),eh=W.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:R,placeholder:w="Search...",id:x,...C},y)=>{let M=W.useId(),T=x||M,E=`${T}-description`,N=`${T}-error`,[k,P]=W.useState(f),L=u!==void 0?u:k,H=a&&r,D=L.length>0,S=G=>{let V=G.target.value;u===void 0&&P(V),p?.(V);},I=()=>{u===void 0&&P(""),p?.(""),g?.();},z=G=>{G.key==="Enter"?(G.preventDefault(),h?.(L)):G.key==="Escape"&&D&&(G.preventDefault(),I());};return jsxs("div",{className:m(Jv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:m(KE({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:m(Qv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:y,id:T,type:"search",value:L,onChange:S,onKeyDown:z,placeholder:w,"aria-invalid":a,"aria-describedby":H?N:n?E:void 0,"aria-required":o,disabled:R,className:m(FE({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!R&&jsx("button",{type:"button",onClick:I,className:m(GE({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:m(Qv({size:s}))})})]}),n&&!H&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});eh.displayName="SearchField";var th=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),UE=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),_E=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"}}),WE=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"}}),sc=(e,t="yyyy-MM-dd")=>{if(!e)return "";let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(n)).replace("MM",r).replace("dd",o)},jE=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},nh=W.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="yyyy-MM-dd",showIcon:v=true,fullWidth:R=false,disabled:w,id:x,...C},y)=>{let M=W.useId(),T=x||M,E=`${T}-description`,N=`${T}-error`,k=W.useRef(null),P=y||k,[L,H]=W.useState(f??null),[D,S]=W.useState(false),I=()=>{!w&&P.current&&P.current.showPicker?.();},z=u!==void 0?u:L,G=a&&r,V=ne=>{let K=jE(ne.target.value);u===void 0&&H(K),p?.(K);},F=z?sc(z,"yyyy-MM-dd"):"",B=g?sc(g,"yyyy-MM-dd"):void 0,Q=h?sc(h,"yyyy-MM-dd"):void 0;return jsxs("div",{className:m(th({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:m(WE({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:m("relative",R?"w-full":"w-fit"),children:[jsx("input",{ref:P,id:T,type:"date",value:F,onChange:V,onFocus:()=>S(true),onBlur:()=>S(false),min:B,max:Q,"aria-invalid":a,"aria-describedby":G?N:n?E:void 0,"aria-required":o,disabled:w,className:m(UE({size:s,isInvalid:a,fullWidth:R}),!v&&"pr-3",l),style:{borderColor:D?"var(--color-foreground)":void 0},...C}),v&&jsx("button",{type:"button",onClick:I,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:m(_E({size:s}))})})]}),n&&!G&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),G&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});nh.displayName="DateField";var rh=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),YE=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}}),XE=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"}}),oh=W.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:R,fullWidth:w=false,id:x,...C},y)=>{let M=W.useId(),T=x||M,E=`${T}-description`,N=`${T}-error`,k=W.useRef(null),P=W.useRef(null),L=W.useRef(null),H=W.useRef(null),[D,S]=W.useState(f??null),I=u!==void 0?u:D,z=a&&r,G=$=>v===24?$:$===0?12:$>12?$-12:$,V=$=>$>=12?"PM":"AM",F=($,re)=>re==="AM"?$===12?0:$:$===12?12:$+12,[B,Q]=W.useState(I?String(G(I.hour)).padStart(2,"0"):""),[ne,K]=W.useState(I?String(I.minute).padStart(2,"0"):""),[O,_]=W.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[A,j]=W.useState(I?V(I.hour):"AM"),[U,he]=W.useState(false);W.useEffect(()=>{u!==void 0&&(u?(Q(String(G(u.hour)).padStart(2,"0")),K(String(u.minute).padStart(2,"0")),u.second!==void 0&&_(String(u.second).padStart(2,"0")),j(V(u.hour))):(Q(""),K(""),_("")));},[u,v]);let me=($,re,Y,Se)=>{let ie=parseInt($,10),Fe=parseInt(re,10),Ke=b?parseInt(Y,10):void 0;if(isNaN(ie)||isNaN(Fe)||b&&isNaN(Ke)){u===void 0&&S(null),p?.(null);return}let xe={hour:v===12?F(ie,Se):ie,minute:Fe,...b&&Ke!==void 0&&{second:Ke}};u===void 0&&S(xe),p?.(xe);},zn=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);Q(re);let Y=v===24?23:12,Se=v===24?0:1;if(re.length===2){let ie=parseInt(re,10);ie>=Se&&ie<=Y&&(P.current?.focus(),P.current?.select());}},oe=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);if(K(re),re.length===2){let Y=parseInt(re,10);Y>=0&&Y<=59&&(b?(L.current?.focus(),L.current?.select()):v===12&&H.current?.focus());}},tt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);_(re),re.length===2&&v===12&&H.current?.focus();},On=()=>{if(B){let $=parseInt(B,10),re=v===24?23:12,Se=Math.min(Math.max($,v===24?0:1),re),ie=String(Se).padStart(2,"0");Q(ie),me(ie,ne,O,A);}},bt=()=>{if(ne){let $=parseInt(ne,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");K(Y),me(B,Y,O,A);}},br=()=>{if(O){let $=parseInt(O,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");_(Y),me(B,ne,Y,A);}},Bn=()=>{let $=A==="AM"?"PM":"AM";j($),me(B,ne,O,$);},Fo=$=>{let re=$.key.toLowerCase();re==="a"?($.preventDefault(),A!=="AM"&&(j("AM"),me(B,ne,O,"AM"))):re==="p"?($.preventDefault(),A!=="PM"&&(j("PM"),me(B,ne,O,"PM"))):re==="arrowup"||re==="arrowdown"?($.preventDefault(),Bn()):re==="arrowleft"&&($.preventDefault(),b?(L.current?.focus(),L.current?.select()):(P.current?.focus(),P.current?.select()));},Bt=($,re)=>{if($.key==="ArrowUp"||$.key==="ArrowDown"){$.preventDefault();let Y=$.key==="ArrowUp"?1:-1;if(re==="hour"){let Se=parseInt(B,10)||0,ie=v===24?23:12,Fe=v===24?0:1,Ke=Se+Y;Ke>ie&&(Ke=Fe),Ke<Fe&&(Ke=ie);let Fn=String(Ke).padStart(2,"0");Q(Fn),me(Fn,ne,O,A);}else if(re==="minute"){let ie=(parseInt(ne,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Fe=String(ie).padStart(2,"0");K(Fe),me(B,Fe,O,A);}else if(re==="second"){let ie=(parseInt(O,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Fe=String(ie).padStart(2,"0");_(Fe),me(B,ne,Fe,A);}}$.key==="ArrowRight"&&($.preventDefault(),re==="hour"?(P.current?.focus(),P.current?.select()):re==="minute"&&b?(L.current?.focus(),L.current?.select()):(re==="minute"&&!b&&v===12||re==="second"&&v===12)&&H.current?.focus()),$.key==="ArrowLeft"&&($.preventDefault(),re==="minute"?(k.current?.focus(),k.current?.select()):re==="second"&&(P.current?.focus(),P.current?.select())),$.key==="Backspace"&&$.currentTarget.value===""&&(re==="minute"?k.current?.focus():re==="second"&&P.current?.focus());},vr=m((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",R&&"cursor-not-allowed");return jsxs("div",{ref:y,className:m(rh({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:m(XE({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:m(YE({size:s,isInvalid:a,disabled:R,fullWidth:w}),l),style:{borderColor:U?"var(--color-foreground)":void 0},onFocus:()=>he(true),onBlur:$=>{$.currentTarget.contains($.relatedTarget)||he(false);},children:[jsx("input",{ref:k,id:T,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:B,onChange:zn,onBlur:On,onKeyDown:$=>Bt($,"hour"),onFocus:$=>$.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":z?N:n?E:void 0,"aria-required":o,disabled:R,className:vr}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:P,type:"text",inputMode:"numeric",placeholder:"mm",value:ne,onChange:oe,onBlur:bt,onKeyDown:$=>Bt($,"minute"),onFocus:$=>$.target.select(),"aria-label":"Minute",disabled:R,className:vr}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:L,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:tt,onBlur:br,onKeyDown:$=>Bt($,"second"),onFocus:$=>$.target.select(),"aria-label":"Second",disabled:R,className:vr})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:Bn,onKeyDown:Fo,disabled:R,className:m("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",R&&"cursor-not-allowed"),"aria-label":"AM/PM",children:A})]}),n&&!z&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),z&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});oh.displayName="TimeField";var sh=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZE=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),QE=cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),JE=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"}}),ah=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),ek=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),ih=W.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f="#000000",onChange:p,showSwatch:g=true,showPicker:h=true,allowAlpha:b=false,fullWidth:v=false,disabled:R,id:w,...x},C)=>{let y=W.useId(),M=w||y,T=`${M}-picker`,E=`${M}-description`,N=`${M}-error`,[k,P]=W.useState(f),[L,H]=W.useState(false),D=u!==void 0?u:k,S=a&&r,I=F=>{let B=F.target.value;B&&!B.startsWith("#")&&(B="#"+B),u===void 0&&P(B),p?.(B);},z=F=>{let B=F.target.value.toUpperCase();u===void 0&&P(B),p?.(B);},G=()=>{if(D&&ah(D)){let F=ek(D);F!==D&&(u===void 0&&P(F),p?.(F));}},V=ah(D)?D:"#000000";return jsxs("div",{className:m(sh({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:m(JE({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[g&&jsx("div",{className:m(QE({size:s})),children:h?jsxs("label",{htmlFor:T,className:"block h-full w-full cursor-pointer",children:[jsx("input",{id:T,type:"color",value:V,onChange:z,disabled:R,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})]}):jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})}),jsx("input",{ref:C,id:M,type:"text",value:D,onChange:I,onFocus:()=>H(true),onBlur:()=>{H(false),G();},placeholder:"#000000",maxLength:b?9:7,"aria-invalid":a,"aria-describedby":S?N:n?E:void 0,"aria-required":o,disabled:R,className:m(ZE({size:s,isInvalid:a,fullWidth:v}),!g&&"pl-3",l),style:{borderColor:L?"var(--color-foreground)":void 0},...x})]}),n&&!S&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),S&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});ih.displayName="ColorField";var ch=cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),dh=W.createContext({});function nk(){return W.useContext(dh)}var uh=W.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(dh.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:m(ch({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));uh.displayName="ButtonGroup";var ph=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"}}),fh=W.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...u},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"],R=(x,C)=>{C&&C(),l&&l(x);},w=x=>jsxs("button",{type:"button",disabled:i||x.isDisabled,onClick:()=>R(x.key,x.onPress),className:m("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":x.label,children:[x.icon&&jsx("span",{className:v,children:x.icon}),c&&jsx("span",{children:x.label})]},x.key);return jsxs("div",{ref:f,role:"group",className:m(ph({variant:t,orientation:n,size:r,density:o,className:e})),...u,children:[p.map(x=>d?d(x):w(x)),g.length>0&&jsxs(no,{children:[jsx(ro,{"aria-label":"More actions",className:m("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(oo,{align:"end",children:g.map(x=>jsxs(jn,{disabled:x.isDisabled,onClick:()=>R(x.key,x.onPress),children:[x.icon&&jsx("span",{className:m(v,"mr-2"),children:x.icon}),x.label]},x.key))})]})]})});fh.displayName="ActionGroup";var hh=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"}}),ak=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}}),xh=W.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:m(hh({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:m(ak({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));xh.displayName="StatusLight";var Rh=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),ik=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),lk=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),ck=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),wh=W.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxs("div",{ref:i,className:m(Rh({size:t,className:e})),...s,children:[n&&jsx("div",{className:m(ik({size:t})),"aria-hidden":"true",children:n}),r&&jsx("h3",{className:m(lk({size:t})),children:r}),o&&jsx("p",{className:m(ck({size:t})),children:o}),a&&jsx("div",{className:"mt-2",children:a})]}));wh.displayName="IllustratedMessage";var Mh=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),bk={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Nh=W.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[u,f]=W.useState(true);if(!u)return null;let p=bk[t??"info"],g=()=>{f(false),s?.();};return jsxs("div",{ref:d,role:"alert",className:m(Mh({variant:t,className:e})),...c,children:[!o&&jsx("div",{className:"flex-shrink-0",children:r||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsx("div",{className:"font-medium",children:n}),l&&jsx("div",{className:"opacity-90",children:l}),i&&jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});Nh.displayName="InlineAlert";var Eh=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),kh=W.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 u=()=>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:m(Eh({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:u()}),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("button",{type:"button",onClick:a,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsx(X,{className:"h-4 w-4"})})]})]})});kh.displayName="ActionBar";var Ph=W.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:m("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]}));Ph.displayName="ActionBarButton";var Dh=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"}}),Hh=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 Ih({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:u,...f}){let[p,g]=W.useState(new Set),[h,b]=W.useState(null),[v,R]=W.useState(null),w=W.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),x=T=>{if(a==="none")return;let E;a==="single"?E=w.has(T)?new Set:new Set([T]):(E=new Set(w),E.has(T)?E.delete(T):E.add(T)),o||g(E),s?.(E);},C=(T,E)=>{b(E),T.dataTransfer.effectAllowed="move";},y=(T,E)=>{T.preventDefault(),h!==E&&R(E);},M=()=>{if(h&&v&&h!==v){let T=r.findIndex(P=>P.key===h),E=r.findIndex(P=>P.key===v),N=[...r],[k]=N.splice(T,1);N.splice(E,0,k),l?.(N);}b(null),R(null);};return r.length===0?jsx("div",{className:m("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:m(Dh({variant:t,size:n,className:e})),...f,children:r.map(T=>{let E=w.has(T.key),N=h===T.key,k=v===T.key;return d?jsx("div",{role:"option","aria-selected":E,onClick:()=>x(T.key),children:d(T,E)},T.key):jsxs("div",{role:"option","aria-selected":E,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:P=>C(P,T.key),onDragOver:P=>y(P,T.key),onDragEnd:M,onClick:()=>!T.isDisabled&&x(T.key),className:m(Hh({variant:t,size:n,isSelected:E,isDisabled:T.isDisabled}),N&&"opacity-50",k&&"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:m("flex h-4 w-4 items-center justify-center rounded border",E?"bg-primary border-primary text-primary-foreground":"border-input"),children:E&&jsx(Check,{className:"h-3 w-3"})}),T.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:T.label}),T.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}Ih.displayName="ListView";var Vh=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"}}),wk=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Ck=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Ah=W.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:u=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,R]=W.useState(o),w=r!==void 0,x=w?r:v,C=W.useRef(null),[y,M]=W.useState(false),[T,E]=W.useState(null),N=(V,F)=>{if(!C.current)return x[0];let B=C.current.getBoundingClientRect(),Q;t==="horizontal"?Q=(V-B.left)/B.width:Q=1-(F-B.top)/B.height,Q=Math.max(0,Math.min(1,Q));let ne=i+Q*(l-i),K=Math.round(ne/c)*c;return Math.max(i,Math.min(l,K))},k=(V,F)=>{let B=[...x];B[F]=V,F===0&&V>x[1]&&(B[0]=x[1]),F===1&&V<x[0]&&(B[1]=x[0]),w||R(B),a?.(B);},P=(V,F)=>{d||(V.preventDefault(),M(true),E(F),V.target.setPointerCapture(V.pointerId));},L=V=>{if(!y||T===null||d)return;let F=N(V.clientX,V.clientY);k(F,T);},H=()=>{y&&(M(false),E(null),s?.(x));},D=V=>{if(d)return;let F=N(V.clientX,V.clientY),B=Math.abs(x[0]-F),Q=Math.abs(x[1]-F),ne=B<=Q?0:1;k(F,ne);let K=[...x];K[ne]=F,s?.(K);},S=(V,F)=>{if(d)return;let B=x[F];switch(V.key){case "ArrowRight":case "ArrowUp":V.preventDefault(),B=Math.min(l,x[F]+c);break;case "ArrowLeft":case "ArrowDown":V.preventDefault(),B=Math.max(i,x[F]-c);break;case "Home":V.preventDefault(),B=i;break;case "End":V.preventDefault(),B=l;break;default:return}k(B,F);let Q=[...x];Q[F]=B,s?.(Q);},I=V=>(V-i)/(l-i)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],G={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[u&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(x[0])}),jsx("span",{children:f(x[1])})]}),jsxs("div",{ref:b,className:m(Vh({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:m(wk({orientation:t,size:n})),onClick:D,children:jsx("div",{className:m("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(x[0])}%`,right:`${100-I(x[1])}%`,top:0,bottom:0}:{bottom:`${I(x[0])}%`,top:`${100-I(x[1])}%`,left:0,right:0}})}),x.map((V,F)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":V,"aria-orientation":t||void 0,"aria-disabled":d,className:m(Ck({size:n}),y&&T===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(V)}% - ${G/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(V)}% - ${G/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:B=>P(B,F),onPointerMove:L,onPointerUp:H,onPointerCancel:H,onKeyDown:B=>S(B,F)},F)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:x[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:x[1]})]})]})]})});Ah.displayName="RangeSlider";var pc=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"}}),kk=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"}}),Pk={help:HelpCircle,info:Info,warning:AlertCircle},Bh=W.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:u,contentClassName:f},p)=>{let[g,h]=W.useState(false),[b,v]=W.useState(false),[R,w]=W.useState({top:0,left:0}),x=W.useRef(null),C=W.useRef(null),y=i!==void 0?i:g,M=W.useCallback(k=>{i===void 0&&h(k),l?.(k);},[i,l]);W.useEffect(()=>{v(true);},[]),W.useEffect(()=>{if(!y||!x.current)return;let k=()=>{let P=x.current.getBoundingClientRect(),L=288,H=8,D=0,S=0;switch(a){case "top":D=P.top-H,S=P.left+P.width/2;break;case "bottom":D=P.bottom+H,S=P.left+P.width/2;break;case "left":D=P.top+P.height/2,S=P.left-H;break;case "right":D=P.top+P.height/2,S=P.right+H;break}if(a==="top"||a==="bottom")switch(s){case "start":S=P.left;break;case "center":S=P.left+P.width/2-L/2;break;case "end":S=P.right-L;break}S=Math.max(8,Math.min(S,window.innerWidth-L-8)),w({top:D,left:S});};return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,true),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true);}},[y,a,s]),W.useEffect(()=>{if(!y)return;let k=P=>{C.current&&!C.current.contains(P.target)&&x.current&&!x.current.contains(P.target)&&M(false);};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[y,M]),W.useEffect(()=>{if(!y)return;let k=P=>{P.key==="Escape"&&M(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[y,M]);let T=Pk[e??"help"],E=()=>{M(!y);},N=()=>{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?W.isValidElement(o)?W.cloneElement(o,{ref:x,onClick:k=>{o.props.onClick?.(k),E();}}):jsx("button",{ref:x,type:"button",onClick:E,className:m(pc({variant:e,size:t}),u),"aria-label":"Help",children:o}):jsx("button",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},type:"button",onClick:E,className:m(pc({variant:e,size:t}),u),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),b&&y&&Xa.createPortal(jsxs("div",{ref:C,className:m(kk({size:t}),f),style:{position:"fixed",top:R.top,left:R.left,transformOrigin:N()},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)]})});Bh.displayName="ContextualHelp";var Kh=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),fc=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"outline",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function Gh({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:u,errorMessage:f,maxTags:p,...g}){let[h,b]=W.useState(new Set),v=W.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),R=y=>{if(s==="none")return;let M;s==="single"?M=v.has(y)?new Set:new Set([y]):(M=new Set(v),M.has(y)?M.delete(y):M.add(y)),a||b(M),i?.(M);},w=(y,M)=>{M.stopPropagation(),c?.(y);},x=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}),u&&jsx("span",{className:"text-sm text-muted-foreground",children:u}),jsxs("div",{role:"group","aria-label":d,className:m(Kh({spacing:t}),e),...g,children:[x.map(y=>{let M=v.has(y.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!y.isDisabled?0:void 0,"aria-pressed":T?M:void 0,onClick:()=>!y.isDisabled&&R(y.key),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&!y.isDisabled&&(E.preventDefault(),R(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:m(fc({variant:y.color?void 0:n,size:r,isSelected:M,isDisabled:y.isDisabled}),T&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,l&&!y.isDisabled&&jsx("button",{type:"button",onClick:E=>w(y.key,E),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsx(X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxs("span",{className:m(fc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}Gh.displayName="TagGroup";var _h=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"}}),Wh=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 jh({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:u,...f}){let[p,g]=W.useState(new Set),h=W.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let R;a==="single"?R=h.has(v)?new Set:new Set([v]):(R=new Set(h),R.has(v)?R.delete(v):R.add(v)),o||g(R),s?.(R);};return r.length===0?jsx("div",{className:m("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:m(_h({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let R=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":R,onClick:()=>b(v.key),children:d(v,R)},v.key):jsxs("div",{role:"gridcell","aria-selected":R,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:m(Wh({variant:l,size:c,isSelected:R,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&R&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),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)})})}jh.displayName="GridList";var Xh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),Hk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),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}}),ai=W.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:u="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(u!=="auto")return "";let R=(n-r)/(o-r),w=s!==void 0?(s-r)/(o-r):.25,x=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?R<=w?"bg-red-500":R<=x?"bg-yellow-500":"bg-green-500":R>=x?"bg-red-500":R>=w?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:m("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:m(Xh({size:t})),children:jsx("div",{className:m(Hk({variant:f})),children:jsx("div",{className:m(Ik({color:u==="auto"?void 0:u,rounded:h>=100}),u==="auto"&&b()),style:{width:`${h}%`}})})})]})});ai.displayName="Meter";var qh=W.forwardRef((e,t)=>jsx(ai,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));qh.displayName="DiskUsageMeter";var Zh=W.forwardRef((e,t)=>jsx(ai,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Zh.displayName="BatteryMeter";var Qh=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"}}),ii=(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)]},Jh=(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]},ex=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},tx=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),nx=W.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,...u},f)=>{let p=W.useRef(null),[g,h]=W.useState(false),b=W.useCallback(V=>{let F=ex(V);return F?Jh(...F):[0,1,1]},[]),[v,R]=W.useState(()=>b(r||o)),w=e??v[0],x=t??v[1],C=n??v[2];W.useEffect(()=>{if(r){let V=b(r);R(V);}},[r,b]);let y=W.useCallback((V,F)=>{if(l||!p.current)return;let B=p.current.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(V-B.left)/B.width)),ne=Math.max(0,Math.min(1,(F-B.top)/B.height)),K=Q,O=1-ne;t===void 0&&n===void 0&&R([w,K,O]),a?.({hue:w,saturation:K,brightness:O});let _=ii(w,K,O);s?.(tx(..._));},[l,w,t,n,a,s]),M=V=>{l||(V.preventDefault(),h(true),V.target.setPointerCapture(V.pointerId),y(V.clientX,V.clientY));},T=V=>{g&&y(V.clientX,V.clientY);},E=V=>{h(false),V.target.releasePointerCapture(V.pointerId);},[N,k,P]=ii(w,1,1),L=`rgb(${N}, ${k}, ${P})`,H=x*100,D=(1-C)*100,[S,I,z]=ii(w,x,C),G=`rgb(${S}, ${I}, ${z})`;return jsx("div",{ref:f,className:m(Qh({size:i}),l&&"cursor-not-allowed opacity-50",d),...u,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:L},onPointerDown:M,onPointerMove:T,onPointerUp:E,onPointerLeave:E,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:G,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});nx.displayName="ColorArea";var ox=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"}}),Ok=`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")`,rx="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",ax=W.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,...u},f)=>{let p=W.useRef(null),[g,h]=W.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,R]=W.useState(t??b()),w=e??v,x=r==="hue"?w/360:w,C=W.useCallback((L,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),S=a!=="vertical",I;S?I=Math.max(0,Math.min(1,(L-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let z=r==="hue"?I*360:I;e===void 0&&R(z),n?.(z);},[i,a,r,e,n]),y=L=>{i||(L.preventDefault(),h(true),L.target.setPointerCapture(L.pointerId),C(L.clientX,L.clientY));},M=L=>{g&&C(L.clientX,L.clientY);},T=L=>{h(false),L.target.releasePointerCapture(L.pointerId);},E=()=>{let L=a!=="vertical",H=L?"to right":"to top";switch(r){case "hue":return L?rx:"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 rx}},N=()=>r==="hue"?`hsl(${w}, 100%, 50%)`:o,k=a!=="vertical",P=x*100;return jsx("div",{ref:f,className:m(ox({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...u,children:jsxs("div",{ref:p,className:m("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?Ok:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:M,onPointerUp:T,onPointerLeave:T,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:E()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...k?{left:`calc(${P}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${P}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:N(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});ax.displayName="ColorSlider";var sx=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),Kk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},ix=W.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 u=W.useRef(null),[f,p]=W.useState(false),[g,h]=W.useState(t),b=e??g,v=W.useCallback((y,M)=>{if(o||!u.current)return;let T=u.current.getBoundingClientRect(),E=T.width/2,N=y-T.left,k=M-T.top,P=Kk(N,k,E);e===void 0&&h(P),n?.(P);},[o,e,n]),R=y=>{o||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),v(y.clientX,y.clientY));},w=y=>{f&&v(y.clientX,y.clientY);},x=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let M=0;M<=360;M+=30)y.push(`hsl(${M}, 100%, 50%) ${M}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsx("div",{ref:d,className:m(sx({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:u,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:R,onPointerMove:w,onPointerUp:x,onPointerLeave:x,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})]})})});ix.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 cx=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"}}),Uk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),_k=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}}),dx=W.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:u=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:m(cx({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:m(Uk({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,u&&":"]}),jsx("span",{className:m(_k({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})]})});dx.displayName="LabeledValue";var ux=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),mx=W.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:m(ux({orientation:t,gap:n,className:e})),...r}));mx.displayName="LabeledValueGroup";var bx=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),ko=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"}}),vx=W.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:u=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:R,...w},x)=>{let[C,y]=W.useState(false),[M,T]=W.useState(t),E=e!==void 0?e:M,N=W.useRef(null);W.useImperativeHandle(x,()=>N.current);let k=E.length>0,P=C&&(a.length>0||s.length>0||l.length>0||k),L=V=>{e===void 0&&T(V),n?.(V);},H=()=>{L(""),N.current?.focus();},D=V=>{V?.preventDefault(),E.trim()&&(r?.(E.trim()),y(false));},S=V=>{L(V.label),o?.(V),y(false);},I=V=>{L(V),r?.(V),y(false);},z=V=>{L(V),r?.(V),y(false);},G=W.useMemo(()=>{let V={};return a.forEach(F=>{let B=F.category||"Results";V[B]||(V[B]=[]),V[B].push(F);}),V},[a]);return jsxs(nt,{open:P,onOpenChange:y,children:[jsx(ht,{asChild:true,children:jsxs("form",{onSubmit:D,className:m(bx({size:g,variant:h}),b),children:[u&&jsx(Search,{className:m(ko({size:g}),"ml-3")}),jsx("input",{ref:N,type:"text",value:E,onChange:V=>L(V.target.value),onFocus:()=>y(true),placeholder:v,disabled:R,className:m("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!u&&"pl-3"),...w}),d&&k&&!R&&jsx("button",{type:"button",onClick:H,className:m("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",ko({size:g})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(rt,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:V=>V.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!k&&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((V,F)=>jsxs("button",{type:"button",onClick:()=>I(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:m(ko({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:V}),jsx(ArrowRight,{className:m(ko({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!k&&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((V,F)=>jsxs("button",{type:"button",onClick:()=>z(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:m(ko({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:V})]},F))]}),k&&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(G).map(([V,F])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:V})}),F.map(B=>jsxs("button",{type:"button",onClick:()=>S(B),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[B.icon||jsx(Search,{className:m(ko({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:B.label}),B.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:B.description})]})]},B.id))]},V)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});vx.displayName="SearchBar";var hx={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"})},Rx=W.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},u)=>{let[f,p]=W.useState(""),g=W.useRef(null),[h,b]=W.useState(false);W.useEffect(()=>{b(true);},[]),W.useEffect(()=>{e||p("");},[e]),W.useEffect(()=>{if(!e)return;let y=M=>{M.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),W.useEffect(()=>{if(e)return ct(),()=>dt()},[e]);let v=W.useMemo(()=>{let y={};return n.forEach(M=>{let T=M.category||"Results";y[T]||(y[T]=[]),y[T].push(M);}),y},[n]),R=y=>{y.onSelect?.(),c?.(y),t?.(false);},w=()=>{t?.(false);},x=f.length>0,C=!x&&r.length>0;return !h||!e?null:Xa.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:w}),jsx("div",{ref:u,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,{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(y=>jsxs(Command.Item,{value:y.label,onSelect:()=>R(y),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:y.icon||hx[y.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((M,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:M},T))})]},y.id))]}),x&&Object.entries(v).map(([y,M])=>jsxs(Command.Group,{heading:y,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),M.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>R(T),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:T.icon||hx[y]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},y)),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)});Rx.displayName="SpotlightSearch";function oP(e="k"){let[t,n]=W.useState(false);return W.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 Tx=W.createContext(null),ci=()=>{let e=W.useContext(Tx);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},mP=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=W.useState([]),[a,s]=W.useState(false),i=W.useRef(null),l=t!==void 0,c=l?t:r,d=W.useCallback(b=>{l?n?.(b):o(b);},[l,n]),u=c.filter(b=>!b.read).length,f=W.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=W.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=W.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=W.useCallback(()=>{d([]);},[d]);return jsx(Tx.Provider,{value:{notifications:c,unreadCount:u,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Mx=W.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("relative inline-block",e),...n,children:t}));Mx.displayName="NotificationCenter";var Nx=W.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=ci(),d=f=>{r?.(f),l(!i);},u=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:m("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:u})]})});Nx.displayName="NotificationCenterTrigger";var Ex=W.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:u,triggerRef:f}=ci(),[p,g]=W.useState(false),h=W.useRef(null),[b,v]=W.useState({top:0,left:0});return W.useEffect(()=>{g(true);},[]),W.useEffect(()=>{if(!i||!f.current||!h.current)return;let R=()=>{if(!f.current||!h.current)return;let w=f.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),C=w.bottom+n,y=w.left;t==="center"?y=w.left+w.width/2-x.width/2:t==="end"&&(y=w.right-x.width),y+x.width>window.innerWidth-16&&(y=window.innerWidth-x.width-16),y<16&&(y=16),v({top:C,left:y});};return R(),window.addEventListener("resize",R),window.addEventListener("scroll",R,true),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R,true);}},[i,f,t,n]),W.useEffect(()=>{if(!i)return;let R=x=>{h.current&&!h.current.contains(x.target)&&f.current&&!f.current.contains(x.target)&&l(false);},w=x=>{x.key==="Escape"&&l(false);};return document.addEventListener("mousedown",R),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("keydown",w);}},[i,l,f]),!p||!i?null:Xa.createPortal(jsxs("div",{ref:R=>{h.current=R,typeof s=="function"?s(R):s&&(s.current=R);},className:m("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:u,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,{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(R=>jsx(xc,{notification:R},R.id)))})]}),document.body)});Ex.displayName="NotificationCenterContent";var pP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},fP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},xc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=ci(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:u,action:f}=e,p=fP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let R=typeof v=="string"?new Date(v):v,x=new Date().getTime()-R.getTime(),C=Math.floor(x/6e4),y=Math.floor(x/36e5),M=Math.floor(x/864e5);return C<1?"Just now":C<60?C+"m ago":y<24?y+"h ago":M<7?M+"d ago":R.toLocaleDateString()};return jsxs("div",{className:m("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",pP[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:u||jsx("div",{className:m("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:m("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"})})]})})]})};xc.displayName="NotificationItem";var kx=W.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("divide-y",e),...n,children:t}));kx.displayName="NotificationList";var Px=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"}}),wP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Lx=W.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:u,className:f,...p},g)=>{let[h,b]=W.useState(true),[v,R]=W.useState(false);W.useEffect(()=>{u&&localStorage.getItem(`banner-${u}`)==="true"&&b(false);},[u]),W.useEffect(()=>{if(d&&h){let y=setTimeout(()=>{w();},d);return ()=>clearTimeout(y)}},[d,h]);let w=()=>{R(true),setTimeout(()=>{b(false),u&&localStorage.setItem(`banner-${u}`,"true"),s?.();},200);};if(!h)return null;let x=wP[t],C=r?o!==void 0?o:x?jsx(x,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:m(Px({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:w,className:m("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,{className:"h-4 w-4"})})]})});Lx.displayName="Banner";var Ra=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-primary bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),MP=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"}}),Rc=W.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:u,className:f,onClick:p,disabled:g,...h},b)=>{let[v,R]=W.useState(false),w=o&&o.length>0,x=E=>{w&&R(!v),p?.(E);},C=E=>{E.onClick?.(),R(false);},y={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},M=l==="rotate"&&v?"rotate-45":"",T=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:m("relative z-50",u!=="relative"&&u&&Ra({position:u})),children:[w&&v&&jsx("div",{className:m("absolute left-1/2 -translate-x-1/2 flex items-center",y[a].container),children:o.map((E,N)=>jsxs("div",{className:m("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*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:E.label}),E.href?jsx("a",{href:E.href,className:m(Ra({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.icon}):jsx("button",{type:"button",onClick:()=>C(E),className:m(Ra({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.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:E.label})]},E.id))}),jsxs("button",{ref:b,type:"button",onClick:x,disabled:g,className:m(Ra({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":w?v:void 0,...h,children:[v&&i?i:jsx("span",{className:m(MP({size:d}),M,T,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),w&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>R(false)})]})});Rc.displayName="FloatingActionButton";var NP=Rc;var Vx=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"}}),Dx=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Ax=W.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,hideLabels:i=false,showActiveLabel:l=false,renderItem:c,...d},u)=>{let[f,p]=W.useState(a||r[0]?.key),g=o!==void 0,h=g?o:f,b=x=>{x.disabled||(g||p(x.key),s?.(x.key));},v=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",R=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:u,className:m(Vx({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...d,children:r.map(x=>{let C=h===x.key,y=!i&&(l?C:true),M=C&&x.activeIcon?x.activeIcon:x.icon;if(c)return jsx("div",{onClick:()=>b(x),className:m(Dx({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:c(x,C)},x.key);let T=jsxs("div",{onClick:()=>!x.href&&b(x),className:m(Dx({variant:t}),v(C),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":C?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),b(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:m(R(),"[&>svg]:h-full [&>svg]:w-full"),children:M}),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"})]}),y&&x.label&&jsx("span",{className:m(w(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsx("a",{href:x.href,onClick:()=>b(x),className:m("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(C)),children:T},x.key):T})})});Ax.displayName="BottomNavigation";var kP="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",Ox=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"}}),Bx=W.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:u},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),u?.(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:kP,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:m(Ox({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})})})]})]})]})});Bx.displayName="ActionSheet";var Kx=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Cc=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"}}),Gx=W.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},u)=>{let f=W.useRef(null),[p,g]=W.useState(0),[h,b]=W.useState(false),v=W.useRef(0),R=W.useRef(0),w=n.length*(o==="sm"?64:o==="lg"?96:80),x=r.length*(o==="sm"?64:o==="lg"?96:80),C=N=>{i||(b(true),v.current=N.touches[0].clientX,R.current=p);},y=N=>{if(!h||i)return;let P=N.touches[0].clientX-v.current,L=R.current+P;(L>0&&n.length===0||L<0&&r.length===0)&&(L=0),L>w?L=w+(L-w)*.3:L<-x&&(L=-x+(L+x)*.3),g(L);},M=()=>{if(!h)return;b(false);let N=f.current?.offsetWidth||0,k=Math.abs(p)/N;if(l&&k>.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>w*a&&n.length>0?(g(w),s?.("right")):p<-x*a&&r.length>0?(g(-x),s?.("left")):g(0);},T=(N,k)=>{N.onAction?.(),s?.(k,N.key),g(0);},E=()=>{g(0);};return jsxs("div",{ref:u,className:m(Kx({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:w},children:n.map(N=>jsxs("button",{type:"button",onClick:()=>T(N,"right"),className:m(Cc({variant:N.variant,size:o})),style:{opacity:Math.min(1,p/w)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:x},children:r.map(N=>jsxs("button",{type:"button",onClick:()=>T(N,"left"),className:m(Cc({variant:N.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/x)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),jsx("div",{ref:f,className:m("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:M,onClick:p!==0?E:void 0,children:c})]})});Gx.displayName="SwipeActions";var Ux=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),SP=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"}}),_x=W.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:u="Refreshing...",children:f,...p},g)=>{let h=W.useRef(null),[b,v]=W.useState(0),[R,w]=W.useState("idle"),x=W.useRef(0),C=W.useRef(false),y=()=>l||R==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,M=P=>{y()&&(x.current=P.touches[0].clientY,C.current=true);},T=P=>{if(!C.current||!y())return;let H=P.touches[0].clientY-x.current;if(H<0){v(0),w("idle");return}let S=Math.min(H*.5,o);v(S),w(S>=r?"ready":"pulling");},E=async()=>{if(C.current)if(C.current=false,R==="ready"){w("refreshing"),v(r*.6);try{await n();}finally{w("idle"),v(0);}}else w("idle"),v(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],k=()=>{if(R==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:m(N,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:u})]});let P=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:m(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${P}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:R==="ready"?d:c})]})};return jsxs("div",{ref:g,className:m(Ux({variant:t,className:e})),...p,children:[jsx("div",{className:m(SP({size:i}),"z-10",R==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:k()}),jsx("div",{ref:h,className:m("transition-transform duration-200",R==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:M,onTouchMove:T,onTouchEnd:E,children:f})]})});_x.displayName="PullToRefresh";var _r=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),DP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Wx=W.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 u=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:DP,custom:i,transition:_r(n,r,o),className:m(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&u}):u});Wx.displayName="Fade";var HP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},jx=W.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},u)=>{let f=W.useMemo(()=>HP(i,l),[i,l]),p=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:_r(n,r,o),className:m(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});jx.displayName="Slide";var IP={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})},Yx=W.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},u)=>{let f=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:VP,custom:i,transition:_r(n,r,o),className:m(a),style:{transformOrigin:IP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});Yx.displayName="Scale";var Xx=W.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},u)=>{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:u,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:_r(n,r,o),className:m("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Xx.displayName="Collapse";var qx=W.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},u)=>{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:u,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:_r(n,r,o),className:m("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});qx.displayName="Expand";var Zx=W.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},u)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:_r(n,r,o),className:m(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Zx.displayName="Rotate";var Qx=W.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 u=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:m("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[u]:r?180:0},transition:_r(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${u}(180deg)`},children:t})]})})});Qx.displayName="Flip";var Jx=W.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=W.useState([]),l=W.useRef(null),c=u=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=u.clientX-p.left,h=u.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(R=>[...R,v]);},d=u=>{i(f=>f.filter(p=>p.id!==u));};return jsxs("div",{ref:a,className:m("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(u=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(u.id),className:"pointer-events-none absolute rounded-full",style:{left:u.x-u.size/2,top:u.y-u.size/2,width:u.size,height:u.size,backgroundColor:e}},u.id))})]})});Jx.displayName="Ripple";var ey=W.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W.useState(false),d=s?l:t,u={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:u,initial:"idle",animate:d?"bounce":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ey.displayName="Bounce";var OP={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]},ty=W.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W.useState(false),d=s?l:t,u={idle:{x:0},shake:{x:OP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:u,initial:"idle",animate:d?"shake":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ty.displayName="Shake";var BP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},ny=W.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:m(t&&BP[n],r),children:e}));ny.displayName="Pulse";var ry=W.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W.useState(false),d=s?l:t,u={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:u,initial:"idle",animate:d?"wiggle":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ry.displayName="Wiggle";var oy=W.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=W.useState(false),d=t||l,u={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:u,className:m(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});oy.displayName="Pop";var _P=(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},ay=W.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:u},f)=>{let p=W.useRef(null),g=useInView(p,{once:true}),[h,b]=W.useState(!l);W.useEffect(()=>{if(l&&g){let w=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(w)}},[l,g,c]);let v=useMotionValue(t),R=useTransform(v,w=>_P(w,r,s,i));return W.useEffect(()=>{if(h){let w=animate(v,e,{duration:n,ease:"easeOut",onComplete:u});return ()=>w.stop()}},[h,e,n,v,u]),jsx("span",{ref:p,className:m(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:R}),a]})})});ay.displayName="Counter";var sy=W.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:u},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=W.useState(""),[b,v]=W.useState(0),[R,w]=W.useState(false),[x,C]=W.useState(false),y=W.useRef(null),M=useInView(y,{once:true}),[T,E]=W.useState(!l);return W.useEffect(()=>{if(l&&M){let N=setTimeout(()=>E(true),n*1e3);return ()=>clearTimeout(N)}},[l,M,n]),W.useEffect(()=>{if(!T||x)return;let N=p[b],k;return R?g.length>0?k=setTimeout(()=>{h(g.slice(0,-1));},i):(w(false),v(P=>(P+1)%p.length)):g.length<N.length?k=setTimeout(()=>{h(N.slice(0,g.length+1));},t):b<p.length-1||s?k=setTimeout(()=>{w(true);},r):(C(true),u?.()),()=>clearTimeout(k)},[T,g,b,R,x,p,t,i,r,s,u]),jsxs("span",{ref:y,className:m(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:m("ml-0.5",d),children:a})]})});sy.displayName="Typewriter";var iy=W.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=W.useRef(null),d=useInView(c,{once:true,amount:.5}),u=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:m("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:u?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,R)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&R<p.length-1&&"\xA0"]},R))})})});iy.displayName="TextReveal";var ly=W.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=W.useState(0);W.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(u=>(u+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:m("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])})})});ly.displayName="WordRotate";var my=W.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:u=[.4,0,.2,1]},f)=>{let p=W.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:u}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:m(i),children:e})})});my.displayName="ScrollReveal";var py=W.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}),u=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?u: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:m("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(jP,{progress:f,position:e})]})});py.displayName="ScrollProgress";var jP=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=W.useState(0);return W.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:m("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,"%"]})},fy=W.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=W.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}),u=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:m("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:u,y:f},children:e})})});fy.displayName="Parallax";var vy=W.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 u={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:m("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(${u[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsx("style",{children:`
|
|
55
|
+
`,document.body.appendChild(ie),Y.dataTransfer.setDragImage(ie,20,15),setTimeout(()=>{document.body.removeChild(ie);},0),h(e),C?.({event:Y,node:e});},bt=Y=>{if(Y.preventDefault(),Y.stopPropagation(),!g||g.key===e.key||U)return;let Se=Y.currentTarget.getBoundingClientRect(),ie=Y.clientY-Se.top,Fe=Se.height,Ke;ie<Fe*.25?Ke=-1:ie>Fe*.75?Ke=1:Ke=0,!(x&&!x({dropNode:e,dropPosition:Ke,dragNode:g}))&&(R(e.key,Ke),y?.({event:Y,node:e}));},br=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key)&&M?.({event:Y,node:e,expandedKeys:F()});},Bn=Y=>{Y.stopPropagation(),T?.({event:Y,node:e});},Fo=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key||U)&&(v!==null&&w(e,v),h(null),R(null,null));},Bt=Y=>{h(null),R(null,null),E?.({event:Y,node:e});},La=Y=>{U||he&&i(e.key,e,Y);},vr=Y=>{Y.stopPropagation(),!U&&!Q&&a(e.key,e);},$=j.useMemo(()=>{if(!_||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 ""}},[_,v]),re=[...r,n];return jsxs("div",{className:"relative",children:[N&&t>0&&jsxs(Fragment,{children:[r.map((Y,Se)=>!Y&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Se} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Se)),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":Q?void 0:ne,"aria-selected":he?K:void 0,"aria-disabled":U,draggable:zn,onDragStart:On,onDragOver:bt,onDragEnter:br,onDragLeave:Bn,onDrop:Fo,onDragEnd:Bt,onClick:La,className:m("relative",Ug({size:V,isSelected:K,isDragging:A,isDisabled:U,isHoverable:he&&!U}),$,z&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[zn&&P&&oe!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:oe}),jsx("button",{type:"button",onClick:vr,className:m("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Q&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:m("h-4 w-4 transition-transform duration-200",ne&&"rotate-90")})}),me&&jsx(DT,{checked:O,indeterminate:W,disabled:U,onClick:Y=>u(e.key,e,Y)}),k&&tt&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:tt}),jsx("div",{className:m("flex-1 min-w-0 truncate ml-1",z&&"flex-none"),children:e.label})]}),B&&ne&&jsx("div",{role:"group",children:e.children.map((Y,Se)=>jsx(jg,{node:Y,level:t+1,isLast:Se===e.children.length-1,parentIsLastPath:re},Y.key))})]})},HT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},IT=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},_g=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||_g(n,t))return true;return false},Yg=j.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:u=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:R=[],onCheck:w,showLine:x=false,showIcon:C=false,showHandle:y=true,dragIcon:M,icon:T,leafIcon:E=jsx(File,{className:"h-4 w-4"}),folderIcon:N=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:k=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:P,onDragEnter:L,onDragOver:H,onDragLeave:D,onDragEnd:S,onDrop:I,blockNode:z=false,disabled:G=false,...V},F)=>{let B=j.useCallback(()=>l?new Set(HT(r)):new Set(i),[l,i,r]),[Q,ne]=j.useState(B),K=s!==void 0,O=K?new Set(s):Q,W=j.useCallback((xe,$e)=>{let Ft=new Set(O),Ve=!Ft.has(xe);Ve?Ft.add(xe):Ft.delete(xe),K||ne(Ft),c?.(Array.from(Ft),{expanded:Ve,node:$e});},[O,K,c]),[A,_]=j.useState(new Set(p)),U=f!==void 0,he=U?new Set(f):A,me=j.useCallback((xe,$e,Ft)=>{let Ve=new Set(he),gn=!Ve.has(xe);u?gn?Ve.add(xe):Ve.delete(xe):(Ve.clear(),gn&&Ve.add(xe)),U||_(Ve);let Yr=[],Ko=Sa=>{for(let Xr of Sa)Ve.has(Xr.key)&&Yr.push(Xr),Xr.children&&Ko(Xr.children);};Ko(r),g?.(Array.from(Ve),{selected:gn,selectedNodes:Yr,node:$e,event:Ft});},[he,u,U,g,r]),[zn,oe]=j.useState(new Set(R)),[tt,On]=j.useState(new Set),bt=v!==void 0,br=bt?new Set(Array.isArray(v)?v:v.checked):zn,Bn=bt&&!Array.isArray(v)?new Set(v.halfChecked):tt,Fo=j.useCallback((xe,$e,Ft)=>{let Ve=new Set(br),gn=new Set(Bn),Yr=!Ve.has(xe);if(Yr?(Ve.add(xe),gn.delete(xe)):Ve.delete(xe),!b&&$e.children){let Mi=IT($e);for(let Kn of Mi)Yr?(Ve.add(Kn),gn.delete(Kn)):Ve.delete(Kn);}bt||(oe(Ve),On(gn));let Ko=[],Sa=Mi=>{for(let Kn of Mi)Ve.has(Kn.key)&&Ko.push(Kn),Kn.children&&Sa(Kn.children);};Sa(r);let Xr=b?{checked:Array.from(Ve),halfChecked:Array.from(gn)}:Array.from(Ve);w?.(Xr,{checked:Yr,checkedNodes:Ko,node:$e,event:Ft,halfCheckedKeys:Array.from(gn)});},[br,Bn,b,bt,w,r]),[Bt,La]=j.useState(null),[vr,$]=j.useState(null),[re,Y]=j.useState(null),Se=j.useCallback((xe,$e)=>{$(xe),Y($e);},[]),ie=j.useCallback((xe,$e)=>{!Bt||!I||$e===0&&_g(Bt,xe.key)||I({event:{},node:xe,dragNode:Bt,dropPosition:$e,dropToGap:$e!==0});},[Bt,I]),Fe=j.useCallback(()=>Array.from(O),[O]),Ke={expandedKeys:O,toggleExpand:W,selectedKeys:he,handleSelect:me,selectable:d,multiple:u,checkedKeys:br,halfCheckedKeys:Bn,handleCheck:Fo,checkable:h,checkStrictly:b,draggable:o,draggedNode:Bt,setDraggedNode:La,dragOverKey:vr,dragOverPosition:re,setDragOver:Se,handleDrop:ie,allowDrop:a,onDragStart:P,onDragEnter:L,onDragOver:H,onDragLeave:D,onDragEnd:S,showLine:x,showIcon:C,showHandle:y,dragIcon:M,icon:T,leafIcon:E,folderIcon:N,folderOpenIcon:k,blockNode:z,disabled:G,size:n,data:r,getAllKeys:Fe},Fn=xe=>{let $e=xe.relatedTarget,Ft=xe.currentTarget;(!$e||!Ft.contains($e))&&Se(null,null);};return jsx(Wg.Provider,{value:Ke,children:jsx("div",{ref:F,role:"tree","aria-multiselectable":u||h,className:m($g({variant:t,size:n,className:e})),onDragLeave:Fn,...V,children:r.map((xe,$e)=>jsx(jg,{node:xe,level:0,isLast:$e===r.length-1},xe.key))})})});Yg.displayName="Tree";var qg=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),FT=({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))})},KT=(e,t)=>{let[n,r]=j.useState(e);return j.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Zg=j.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:u="No results found.",loadingText:f="Loading...",clearable:p=false,freeSolo:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:R,...w},x)=>{let[C,y]=j.useState(false),[M,T]=j.useState(r),[E,N]=j.useState([]),[k,P]=j.useState(false),[L,H]=j.useState(false),D=j.useRef(null),S=n!==void 0?n:M,I=KT(S,l);j.useImperativeHandle(x,()=>D.current);let z=i?E:s,G=j.useMemo(()=>i?z:z.filter(U=>U.label.toLowerCase().includes(S.toLowerCase())),[z,S,i]);j.useEffect(()=>{if(!i)return;if(I.length<c){N([]);return}let U=false;return (async()=>{P(true);try{let me=await i(I);U||N(me);}catch{U||N([]);}finally{U||P(false);}})(),()=>{U=true;}},[I,i,c]);let V=U=>{n===void 0&&T(U),o?.(U);},F=U=>{let he=U.target.value;V(he),he.length>=c&&y(true);},B=U=>{V(U.label),a?.(U),y(false);},Q=()=>{V(""),D.current?.focus();},ne=()=>{H(true),S.length>=c&&(G.length>0||k)&&y(true);},K=()=>{H(false);},O=U=>{U.key==="Escape"&&y(false),U.key==="ArrowDown"&&!C&&G.length>0&&y(true);},W=C&&S.length>=c,A=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",_=p&&S?"pr-8":"pr-3";return jsxs(nt,{open:W,onOpenChange:y,children:[jsx(ja,{asChild:true,children:jsxs("div",{className:m("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:D,type:"text",value:S,onChange:F,onFocus:ne,onBlur:K,onKeyDown:O,disabled:R,placeholder:d,className:m(qg({size:t,fullWidth:v}),_,e),style:{borderColor:L?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":W,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...w}),p&&S&&!R&&jsx("button",{type:"button",onClick:Q,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:A})})]})}),jsx(rt,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:h},children:k?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:m(A,"animate-spin")}),f]}):G.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):G.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>B(U),className:m("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:m("mr-2 h-4 w-4 shrink-0",S===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(FT,{text:U.label,query:S}):U.label})]},U.value))})})})]})});Zg.displayName="Autocomplete";var xl=j.createContext(null),yl=j.createContext(null),Rl=()=>{let e=j.useContext(xl);if(!e)throw new Error("useFormContext must be used within a Form");return e},Ts=()=>{let e=j.useContext(yl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},GT={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})},Qg=j.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=j.useState(e),[u,f]=j.useState({}),[p,g]=j.useState({}),[h,b]=j.useState({}),[v,R]=j.useState(false),w=j.useRef(new Map),x=j.useCallback((D,S)=>{w.current.set(D,S);},[]),C=j.useCallback(D=>{w.current.delete(D);},[]),y=j.useCallback(D=>{let S=w.current.get(D)||[],I=c[D];for(let z of S)if(!z.validate(I))return f(G=>({...G,[D]:z.message})),false;return f(z=>({...z,[D]:null})),true},[c]),M=j.useCallback(()=>{let D=true,S={};return w.current.forEach((I,z)=>{let G=c[z];for(let V of I)if(!V.validate(G)){S[z]=V.message,D=false;break}S[z]||(S[z]=null);}),f(S),D},[c]),T=j.useCallback((D,S)=>{d(I=>({...I,[D]:S})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{y(D);},0);},[o,y]),E=j.useCallback((D,S)=>{f(I=>({...I,[D]:S}));},[]),N=j.useCallback((D,S)=>{g(I=>({...I,[D]:S})),S&&r&&y(D);},[r,y]),k=j.useCallback(D=>({value:c[D],error:u[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,u,p,h]),P=j.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),L=async D=>{D.preventDefault();let S={};if(w.current.forEach((z,G)=>{S[G]=true;}),g(S),!M()){n?.(u);return}if(t){R(true);try{await t(c);}finally{R(false);}}},H={values:c,errors:u,touched:p,dirty:h,isSubmitting:v,setValue:T,setError:E,setTouched:N,validateField:y,validateAll:M,registerField:x,unregisterField:C,getFieldState:k,reset:P};return jsx(xl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:L,className:m("space-y-4",s),...i,children:a})})});Qg.displayName="Form";var Jg=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=Rl(),a=j.useId();j.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(yl.Provider,{value:i,children:r})};Jg.displayName="FormField";var eb=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("space-y-1.5",e),...t}));eb.displayName="FormItem";var tb=j.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=Ts();return jsxs(wr,{ref:o,htmlFor:a,className:m(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});tb.displayName="FormLabel";var nb=({children:e})=>{let{name:t,id:n,error:r,touched:o}=Ts(),a=Rl(),s=a.getFieldState(t),i=c=>{let d=c.target,u=d.type==="checkbox"?d.checked:d.value;a.setValue(t,u);},l=()=>{a.setTouched(t,true);};return j.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})};nb.displayName="FormControl";var rb=j.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-xs text-muted-foreground",e),...t}));rb.displayName="FormDescription";var ob=j.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=Ts(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:m("text-xs text-danger",e),role:"alert",...n,children:i}):null});ob.displayName="FormMessage";var sb=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"}}),ib=j.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:m(sb({size:t,className:e})),...i,children:[jsxs(Cr,{"data-user-avatar":true,children:[o&&jsx(eo,{src:o,alt:n}),jsx(Tr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});ib.displayName="User";var cb=cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),db=j.forwardRef(({className:e,variant:t,size:n,...r},o)=>jsx("code",{ref:o,className:m(cb({variant:t,size:n,className:e})),...r}));db.displayName="Code";var ub=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),mb=j.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[u,f]=j.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:m(ub({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:m("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":u?"Copied":a,children:u?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});mb.displayName="Snippet";var Tl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),pb=j.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,...u},f)=>{let[p,g]=j.useState("loading");j.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:m(Tl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:m(Tl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx($a,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:m("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...u})]})});pb.displayName="Image";var bb=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"}}),vb=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"}}),hb=j.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),xb=j.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=j.useState(r),u=n??c,f=p=>{let g;if(a){let h=Array.isArray(u)?u:[u].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(hb.Provider,{value:{value:u,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:m(bb({size:t,className:e})),...i,children:s})})});xb.displayName="Listbox";var yb=j.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:u}=j.useContext(hb),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:m(vb({size:u}),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"})]})});yb.displayName="ListboxItem";var wb=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"}}),Cb=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 tM({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,u]=j.useState(null),[f,p]=j.useState(null),g=(w,x)=>{i||(u(x),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",String(x)));},h=(w,x)=>{w.preventDefault(),!(i||d===null||d===x)&&p(x);},b=()=>{p(null);},v=(w,x)=>{if(w.preventDefault(),i||d===null||d===x){u(null),p(null);return}let C=[...r],[y]=C.splice(d,1);C.splice(x,0,y),o?.(C),u(null),p(null);},R=()=>{u(null),p(null);};return jsx("div",{ref:c,className:m(wb({variant:t,size:n,className:e})),...l,children:r.map((w,x)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,x),onDragOver:C=>h(C,x),onDragLeave:b,onDrop:C=>v(C,x),onDragEnd:R,className:m(Cb({variant:t,size:n,isDragging:d===x,isDragOver:f===x}),!i&&"cursor-move"),children:[s&&jsx("div",{className:m("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(w,x)})]},w.id))})}var nM=j.forwardRef(tM);var Nb=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}}),sM={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Eb=j.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:m("relative",e),...i,children:[s,jsx("div",{className:m(Nb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:m(sM[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Eb.displayName="LoadingOverlay";var kb=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"}}),Pb=j.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=j.useState(0),[c,d]=j.useState(false),u=j.useRef(null);return j.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),u.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)),()=>{u.current&&clearInterval(u.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:m(kb({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:m("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")})})]})});Pb.displayName="NProgress";var Hb=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}}),Lb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},mM={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Ib=j.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:m(mM[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:m(Lb[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:m(Lb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:m(Hb({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:m("text-sm",l),children:o})]})})});Ib.displayName="Loading";var El=class extends j.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,n){this.props.onError?.(t,n);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,o)=>r!==t.resetKeys?.[o])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(kl,{error:this.state.error,onReset:this.reset}):this.props.children}},kl=j.forwardRef(({error:e,onReset:t,className:n},r)=>jsxs("div",{ref:r,className:m("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",n),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));kl.displayName="DefaultErrorFallback";var gM=El;var Ab=j.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},u)=>{let[f,p]=j.useState(false),[g,h]=j.useState(t),b=e!==void 0,v=b?e:g,R=x=>{b||h(x),n?.(x);},w=x=>{if(!x)return r;let{from:C,to:y}=x;return C&&y?`${format(C,o)} - ${format(y,o)}`:C?format(C,o):r};return jsxs(nt,{open:f,onOpenChange:p,children:[jsx(ht,{asChild:true,children:jsxs(te,{ref:u,variant:"bordered",disabled:a,className:m("w-full justify-start text-left font-normal",!v?.from&&"text-muted-foreground",c),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),w(v)]})}),jsx(rt,{className:"w-auto p-0",align:d,children:jsx(so,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:R,numberOfMonths:l,disabled:x=>!!(s&&x<s||i&&x>i),initialFocus:true})})]})});Ab.displayName="DateRangePicker";var bo=e=>String(e).padStart(2,"0"),zb=j.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]=j.useState(false),d=r?Array.from({length:24},(w,x)=>x):Array.from({length:12},(w,x)=>x+1),u=Array.from({length:Math.floor(60/o)},(w,x)=>x*o),f=w=>{if(!w)return n;if(r)return `${bo(w.hours)}:${bo(w.minutes)}`;let x=w.hours%12||12,C=w.hours>=12?"PM":"AM";return `${bo(x)}:${bo(w.minutes)} ${C}`},p=w=>{let x=e?.minutes??0,C=w;if(!r&&e){let y=e.hours>=12;y&&w!==12?C=w+12:!y&&w===12&&(C=0);}t?.({hours:C,minutes:x});},g=w=>{let x=e?.hours??0;t?.({hours:x,minutes:w});},h=w=>{if(!e)return;let x=e.hours;w==="AM"&&e.hours>=12?x=e.hours-12:w==="PM"&&e.hours<12&&(x=e.hours+12),t?.({hours:x,minutes:e.minutes});},b=()=>{let w=new Date;t?.({hours:w.getHours(),minutes:w.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,R=e?r?e.hours:e.hours%12||12:void 0;return jsxs(nt,{open:l,onOpenChange:c,children:[jsx(ht,{asChild:true,children:jsxs(te,{ref:i,variant:"bordered",disabled:a,className:m("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsx(Clock,{className:"mr-2 h-4 w-4"}),f(e)]})}),jsxs(rt,{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(Ue,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(w=>jsx(te,{variant:R===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(w),children:bo(w)},w))})})]}),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(Ue,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:u.map(w=>jsx(te,{variant:e?.minutes===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(w),children:bo(w)},w))})})]}),!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(te,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(te,{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(te,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(te,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});zb.displayName="TimePicker";var Ob=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function xM({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},u){let f=j.useRef(null),[p,g]=j.useState(0);j.useImperativeHandle(u,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),R=Math.ceil(o/b)+2*a,w=Math.min(n.length-1,v+R),x=y=>{let M=y.currentTarget.scrollTop;g(M),c?.(M);},C=j.useMemo(()=>{let y=[];for(let M=v;M<=w;M++)n[M]!==void 0&&y.push({item:n[M],index:M,style:{position:"absolute",top:M*b,left:0,right:0,height:r}});return y},[n,v,w,b,r]);return jsx("div",{ref:f,className:m(Ob({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:x,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:y,index:M,style:T})=>jsx("div",{style:T,children:s(y,M)},i?i(y,M):M))})})}var yM=j.forwardRef(xM);var Fb=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Sl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Kb=j.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:u,...f},p)=>{let g=j.useRef(null),h=j.useRef(null),b=j.useRef(false);j.useImperativeHandle(p,()=>g.current),j.useEffect(()=>{let R=h.current;if(!R)return;let w=new IntersectionObserver(x=>{let[C]=x;C.isIntersecting&&a&&!s&&!b.current&&(b.current=true,Promise.resolve(o()).finally(()=>{b.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return w.observe(R),()=>{w.disconnect();}},[a,s,o,l,c,d]);let v=jsx("div",{className:m(Sl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:g,className:m(Fb({variant:t,className:e})),...f,children:[r,jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||v),!a&&!s&&u&&jsx("div",{className:m(Sl({size:n}),"text-muted-foreground text-sm"),children:u})]})});Kb.displayName="InfiniteScroll";var ca=j.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:m("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));ca.displayName="VisuallyHidden";var $b={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},TM={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"},Ub=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"),Dl=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Hs=j.createContext(null),Ir=()=>{let e=j.useContext(Hs);if(!e)throw new Error("Modal components must be used within a Modal");return e},jb=j.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:u,className:f},p)=>{let[g,h]=j.useState(false),b=e!==void 0,v=b?e:g,[R,w]=j.useState(false),x=j.useRef(null),C=j.useId(),y=j.useId();j.useEffect(()=>{w(true);},[]);let M=j.useCallback(k=>{b||h(k),t?.(k);},[b,t]);j.useEffect(()=>{if(v)return ct(),()=>dt()},[v]),j.useEffect(()=>{if(!v||i)return;let k=P=>{P.key==="Escape"&&M(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[v,i,M]);let T=k=>{s&&k.target===k.currentTarget&&M(false);},E=n?j.isValidElement(n)?j.cloneElement(n,{onClick:k=>{n.props.onClick?.(k),M(true);}}):jsx("button",{type:"button",onClick:()=>M(true),children:n}):null,N=()=>!R||!v?null:d==="outside"?Xa.createPortal(jsx("div",{"data-state":v?"open":"closed",className:m(Ub(),$b[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:m("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",u==="xs"&&"w-full max-w-xs",u==="sm"&&"w-full max-w-sm",u==="md"&&"w-full max-w-md",u==="lg"&&"w-full max-w-lg",u==="xl"&&"w-full max-w-xl",u==="2xl"&&"w-full max-w-2xl",u==="3xl"&&"w-full max-w-3xl",u==="4xl"&&"w-full max-w-4xl",u==="5xl"&&"w-full max-w-5xl",u==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!u&&"w-full max-w-md",f),children:[jsx(ca,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>M(false)})]})}),document.body):Xa.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:m(Ub(),$b[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:m(Dl({size:u}),TM[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(ca,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>M(false)})]})]}),document.body);return jsxs(Hs.Provider,{value:{open:v,onOpenChange:M,scrollBehavior:d,titleId:C,descriptionId:y},children:[E,N()]})});jb.displayName="Modal";var _b=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=j.useState(n),i=t!==void 0,l=i?t:a,c=j.useId(),d=j.useId(),u=j.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Hs.Provider,{value:{open:l,onOpenChange:u,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};_b.displayName="ModalRoot";var Yb=j.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(true);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(true);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Yb.displayName="ModalTrigger";var Hl=({children:e,container:t})=>{let[n,r]=j.useState(false);return j.useEffect(()=>{r(true);},[]),n?Xa.createPortal(e,t||document.body):null};Hl.displayName="ModalPortal";var Il=j.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ir();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:m("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});Il.displayName="ModalOverlay";var Vl=j.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(false);};return e&&j.isValidElement(t)?j.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(false);},...r}):jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Vl.displayName="ModalClose";var Xb=j.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:u}=Ir(),[f,p]=j.useState(false);return j.useEffect(()=>{p(true);},[]),j.useEffect(()=>{if(l)return ct(),()=>dt()},[l]),j.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(Hl,{children:[jsx(Il,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":u,"data-state":l?"open":"closed",className:m(Dl({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Vl,{asChild:true,children:jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10"})})]})]})});Xb.displayName="ModalContent";var qb=({className:e,...t})=>jsx("div",{className:m("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});qb.displayName="ModalHeader";var Zb=({className:e,children:t})=>(j.useContext(Hs)?.scrollBehavior??"inside")==="inside"?jsx(Ue,{className:m("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:m(e),children:t});Zb.displayName="ModalBody";var Qb=({className:e,children:t,...n})=>{let{onOpenChange:r}=Ir();return jsx("div",{className:m("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:j.Children.map(t,o=>j.isValidElement(o)?j.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};Qb.displayName="ModalFooter";var Jb=j.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Ir();return jsx("h2",{ref:n,id:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t})});Jb.displayName="ModalTitle";var ev=j.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Ir();return jsx("p",{ref:n,id:r,className:m("text-sm text-muted-foreground",e),...t})});ev.displayName="ModalDescription";var rv=cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),SM=cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),DM=j.createContext(null),HM={default:HelpCircle,danger:XCircle,warning:AlertTriangle,success:CheckCircle,info:Info},Al=j.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,confirmText:a="Confirm",cancelText:s="Cancel",onConfirm:i,onCancel:l,showIcon:c=true,icon:d,variant:u="default",loading:f=false,disabled:p=false,className:g},h)=>{let[b,v]=j.useState(false),[R,w]=j.useState(false),[x,C]=j.useState(false),y=e!==void 0,M=y?e:b,T=HM[u||"default"],E=j.useId(),N=j.useId();j.useEffect(()=>{C(true);},[]);let k=j.useCallback(I=>{y||v(I),t?.(I);},[y,t]);j.useEffect(()=>{if(M)return ct(),()=>dt()},[M]);let P=async()=>{if(i){let I=i();if(I instanceof Promise){w(true);try{await I;}finally{w(false);}}}k(false);},L=()=>{l?.(),k(false);},H=f||R,D=n?j.isValidElement(n)?j.cloneElement(n,{onClick:I=>{n.props.onClick?.(I),k(true);}}):jsx("button",{type:"button",onClick:()=>k(true),children:n}):null,S=()=>!x||!M?null:Xa.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":M?"open":"closed",className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","aria-hidden":"true"}),jsxs("div",{ref:h,role:"alertdialog","aria-modal":"true","aria-labelledby":E,"aria-describedby":o?N:void 0,"data-state":M?"open":"closed",className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",g),children:[jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[c&&jsx("div",{className:m(rv({variant:u})),children:d||jsx(T,{className:"h-6 w-6"})}),jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsx("h2",{id:E,className:"text-lg font-semibold",children:r}),o&&jsx("p",{id:N,className:"text-sm text-muted-foreground",children:o})]})]}),jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsx("button",{type:"button",className:m(tn({variant:"bordered"})),onClick:L,disabled:H,children:s}),jsx("button",{type:"button",className:m(tn(),SM({variant:u}),H&&"opacity-50 cursor-not-allowed"),onClick:P,disabled:p||H,children:H?jsxs("span",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):a})]})]})]}),document.body);return jsxs(DM.Provider,{value:{open:M,onOpenChange:k,titleId:E,descriptionId:N},children:[D,S()]})});Al.displayName="ConfirmDialog";function IM(){let[e,t]=j.useState({open:false,options:null,resolve:null}),n=j.useCallback(i=>new Promise(l=>{t({open:true,options:i,resolve:l});}),[]),r=j.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),o=j.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),a=j.useCallback(i=>{i||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=j.useMemo(()=>e.options?jsx(Al,{open:e.open,onOpenChange:a,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:o}):null,[e,r,o,a]);return {confirm:n,ConfirmDialog:s}}var WM=e=>e.map(t=>typeof t=="string"?{src:t}:t),zl=j.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:u=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=j.useMemo(()=>WM(e),[e]),[v,R]=j.useState(r),[w,x]=j.useState(1),[C,y]=j.useState(0),[M,T]=j.useState(false),[E,N]=j.useState(false),[k,P]=j.useState({x:0,y:0}),[L,H]=j.useState({x:0,y:0}),[D,S]=j.useState(false),I=j.useRef(null),z=b[v];j.useEffect(()=>{S(true);},[]),j.useEffect(()=>{R(r);},[r]),j.useEffect(()=>{o?.(v);},[v,o]),j.useEffect(()=>{x(1),y(0),P({x:0,y:0});},[v]),j.useEffect(()=>{if(t)return ct(),()=>dt()},[t]);let G=j.useCallback(()=>{R(oe=>oe>0?oe-1:b.length-1);},[b.length]),V=j.useCallback(()=>{R(oe=>oe<b.length-1?oe+1:0);},[b.length]),F=()=>{x(oe=>Math.min(oe+.5,4));},B=()=>{x(oe=>{let tt=Math.max(oe-.5,.5);return tt===1&&P({x:0,y:0}),tt});},Q=()=>{y(oe=>(oe+90)%360);},ne=async()=>{if(z)try{let tt=await(await fetch(z.src)).blob(),On=URL.createObjectURL(tt),bt=document.createElement("a");bt.href=On,bt.download=z.alt||`image-${v+1}`,document.body.appendChild(bt),bt.click(),document.body.removeChild(bt),URL.revokeObjectURL(On);}catch{window.open(z.src,"_blank");}},K=async()=>{if(I.current)if(M)try{await document.exitFullscreen(),T(!1);}catch{}else try{await I.current.requestFullscreen(),T(!0);}catch{}},O=oe=>{w>1&&(N(true),H({x:oe.clientX-k.x,y:oe.clientY-k.y}));},W=oe=>{E&&w>1&&P({x:oe.clientX-L.x,y:oe.clientY-L.y});},A=()=>{N(false);},_=()=>{n?.(false);},U=oe=>{p&&oe.target===oe.currentTarget&&_();},he=j.useCallback(oe=>{switch(oe.key){case "ArrowLeft":G();break;case "ArrowRight":V();break;case "Escape":n?.(false);break;case "+":case "=":F();break;case "-":B();break}},[G,V,n]);if(j.useEffect(()=>{if(t)return window.addEventListener("keydown",he),()=>window.removeEventListener("keydown",he)},[t,he]),j.useEffect(()=>{let oe=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",oe),()=>document.removeEventListener("fullscreenchange",oe)},[]),b.length===0)return null;let me=a?j.isValidElement(a)?j.cloneElement(a,{onClick:oe=>{a.props.onClick?.(oe),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[me,!D||!t?null:Xa.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:U}),jsxs("div",{ref:h,className:m("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]}),z?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:z.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:B,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(w*100),"%"]}),jsx("button",{onClick:F,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:Q,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:ne,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:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:M?"Exit fullscreen":"Fullscreen",children:M?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:_,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{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:O,onMouseMove:W,onMouseUp:A,onMouseLeave:A,children:[u&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:G,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:V,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:z?.src,alt:z?.alt||"",className:m("max-h-full max-w-full object-contain transition-transform duration-200",E?"cursor-grabbing":w>1?"cursor-grab":""),style:{transform:`translate(${k.x}px, ${k.y}px) scale(${w}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((oe,tt)=>jsx("button",{onClick:()=>R(tt),className:m("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===tt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:oe.src,alt:oe.alt||`Thumbnail ${tt+1}`,className:"h-full w-full object-cover"})},tt))})]})]}),document.body)]})});zl.displayName="ImageViewer";var av=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=j.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:m("cursor-zoom-in",r),children:e}),jsx(zl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};av.displayName="ImageViewerTrigger";var sv=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),iv=j.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let u=a!=null;return jsxs("span",{ref:d,className:m(sv({color:t,size:u?void 0:n,position:r,ping:o}),u&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsx("span",{className:m("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});iv.displayName="Indicator";var lv=j.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("relative inline-flex",e),...n,children:t}));lv.displayName="IndicatorWrapper";var dv=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),uv=j.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=j.useRef(null),[c,d]=j.useState({top:false,bottom:false,left:false,right:false});j.useImperativeHandle(i,()=>l.current);let u=j.useCallback(()=>{let v=l.current;if(!v)return;let{scrollTop:R,scrollLeft:w,scrollHeight:x,scrollWidth:C,clientHeight:y,clientWidth:M}=v;d({top:R>0,bottom:R<x-y-1,left:w>0,right:w<C-M-1});},[]);j.useEffect(()=>{let v=l.current;if(v)return u(),v.addEventListener("scroll",u),window.addEventListener("resize",u),()=>{v.removeEventListener("scroll",u),window.removeEventListener("resize",u);}},[u]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",b={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:l,className:m(dv({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:a})});uv.displayName="ScrollShadow";var mv=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",outline:"rounded border border-border text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),ZM={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"},QM={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"},JM=e=>{let t=e.toLowerCase();return ZM[t]||e.toUpperCase()},ua=e=>{let t=e.toLowerCase();return QM[t]||t},Is=e=>{let t=ua(e);return ["meta","control","alt","shift"].includes(t)},pv=j.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{j.useEffect(()=>{if(!a||!r||s)return;let u=Array.isArray(r)?r:[r],f=u.filter(Is).map(ua),p=u.filter(h=>!Is(h)).map(ua),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,R=f.includes("alt")===h.altKey,w=f.includes("shift")===h.shiftKey,x=p.length===0||p.includes(h.key.toLowerCase());b&&v&&R&&w&&x&&(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(j.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:JM(f)})]},p)):o;return jsx("kbd",{ref:c,className:m(mv({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});pv.displayName="Kbd";function eN(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;j.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(Is).map(ua),i=a.filter(c=>!Is(c)).map(ua),l=c=>{let d=s.includes("meta")===c.metaKey,u=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&&u&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var fv=cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),gv=j.forwardRef(({className:e,variant:t,size:n,value:r,successDuration:o=2e3,onCopySuccess:a,onCopyError:s,copyIcon:i,successIcon:l,...c},d)=>{let[u,f]=j.useState(false),p={sm:14,md:16,lg:20}[n??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),f(!0),a?.(),setTimeout(()=>{f(!1);},o);}catch(h){s?.(h);}};return jsx("button",{ref:d,type:"button",className:m(fv({variant:t,size:n}),e),onClick:g,"aria-label":u?"Copied":"Copy to clipboard",...c,children:u?l??jsx(Check,{className:"text-success",style:{width:p,height:p}}):i??jsx(Copy,{style:{width:p,height:p}})})});gv.displayName="CopyButton";var vv=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),lN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],cN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function dN(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 uN(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function zs(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function As(e){return zs(e,new Date)}function bv(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return zs(r,t)||zs(o,t)||r<t&&o>t})}var hv=j.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:u="en-US",...f},p)=>{let[g,h]=j.useState(new Date),b=s??g,v=N=>{i?i(N):h(N);},R=d===1?cN:lN,w=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()-1):o==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),v(N);},x=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()+1):o==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),v(N);},C=()=>{v(new Date);},y=()=>o==="day"?b.toLocaleDateString(u,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(u,{year:"numeric",month:"long"}),M=()=>{let N=dN(b.getFullYear(),b.getMonth(),d);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:R.map(k=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:k},k))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((k,P)=>{let L=bv(r,k),H=k.getMonth()===b.getMonth();return jsxs("div",{className:m("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(k),children:[jsx("div",{className:m("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",As(k)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:k.getDate()}),jsxs("div",{className:"space-y-0.5",children:[L.slice(0,3).map(D=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:D.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(D);},children:D.title},D.id)),L.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",L.length-3," more"]})]})]},P)})})]})},T=()=>{let N=uN(b,d),k=Array.from({length:24},(P,L)=>L);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),N.map((P,L)=>jsxs("div",{className:m("p-2 text-center border-l",As(P)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:R[L]}),jsx("div",{className:m("text-lg font-semibold",As(P)&&"text-primary"),children:P.getDate()})]},L))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:k.map(P=>jsxs(j.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[P.toString().padStart(2,"0"),":00"]}),N.map((L,H)=>{let D=new Date(L);D.setHours(P,0,0,0);let S=r.filter(I=>{let z=new Date(I.start);return zs(z,L)&&z.getHours()===P});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:S.map(I=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),l?.(I);},children:I.title},I.id))},H)})]},P))})})]})},E=()=>{let N=Array.from({length:24},(P,L)=>L),k=bv(r,b);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:m("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",As(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(P=>{let L=new Date(b);L.setHours(P,0,0,0);let H=k.filter(D=>new Date(D.start).getHours()===P);return jsxs(j.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[P.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(L),children:H.map(D=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:D.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(D);},children:D.title},D.id))})]},P)})})})]})};return jsxs("div",{ref:p,className:m(vv({variant:t,size:n,className:e})),...f,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(te,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsx(te,{variant:"ghost",size:"icon",onClick:w,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(te,{variant:"ghost",size:"icon",onClick:x,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:y()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsx(te,{variant:o===N?"solid":"ghost",size:"sm",onClick:()=>a?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),o==="month"&&M(),o==="week"&&T(),o==="day"&&E()]})});hv.displayName="FullCalendar";var pa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),fa=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],xv=j.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},u)=>jsx("div",{ref:u,className:m(pa({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,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),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))]})})}));xv.displayName="LineChart";var yv=j.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...u},f)=>jsx("div",{ref:f,className:m(pa({size:t,className:e})),...u,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,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),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))]})})}));yv.displayName="BarChart";var Rv=j.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=fa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...u},f)=>jsx("div",{ref:f,className:m(pa({size:t,className:e})),...u,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),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}`))})]})})}));Rv.displayName="PieChart";var wv=j.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...u},f)=>jsx("div",{ref:f,className:m(pa({size:t,className:e})),...u,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,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),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))]})})}));wv.displayName="AreaChart";var Mv=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),Nv=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Wl=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function IN({card:e,columnId:t,variant:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),u={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:u,className:m(Wl({variant:n,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:r?r(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function VN({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxs("div",{className:m(Nv({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsx(te,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(Ue,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(i=>i.id),strategy:verticalListSortingStrategy,children:e.cards.map(i=>jsx(IN,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Ev=j.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[u,f]=j.useState(null),[p,g]=j.useState(null),h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=x=>n.find(C=>C.cards.some(y=>y.id===x));return jsxs(DndContext,{sensors:h,collisionDetection:closestCorners,onDragStart:x=>{let{active:C}=x,y=b(C.id);if(y){let M=y.cards.find(T=>T.id===C.id);M&&(f(M),g(y.id));}},onDragOver:x=>{let{active:C,over:y}=x;if(!y)return;let M=C.id,T=y.id,E=b(M),N=b(T)||n.find(L=>L.id===T);if(!E||!N||E.id===N.id)return;let k=N.cards.findIndex(L=>L.id===T),P=k===-1?N.cards.length:k;r?.(M,E.id,N.id,P);},onDragEnd:x=>{let{active:C,over:y}=x;if(y&&C.id!==y.id){let M=b(C.id),T=b(y.id)||n.find(E=>E.id===y.id);if(M&&T){let E=T.cards.findIndex(k=>k.id===y.id),N=E===-1?T.cards.length:E;r?.(C.id,M.id,T.id,N);}}f(null),g(null);},children:[jsx("div",{ref:d,className:m(Mv({variant:t,className:e})),...c,children:n.map(x=>jsx(VN,{column:x,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},x.id))}),jsx(DragOverlay,{children:u&&p&&jsx("div",{className:m(Wl({variant:t,isDragging:true})),children:s?s(u,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:u.title}),u.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:u.description})]})]})})})]})});Ev.displayName="KanbanBoard";var kv=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Pv=j.createContext(null);function jl(){let e=j.useContext(Pv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Lv=j.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[u,f]=AN({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=j.useState(false),[h,b]=j.useState(false),[v,R]=j.useState(0),[w,x]=j.useState([]),C=j.useCallback(N=>{N&&(R(N.selectedScrollSnap()),g(N.canScrollPrev()),b(N.canScrollNext()));},[]),y=j.useCallback(()=>{f?.scrollPrev();},[f]),M=j.useCallback(()=>{f?.scrollNext();},[f]),T=j.useCallback(N=>{f?.scrollTo(N);},[f]),E=j.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),y()):N.key==="ArrowRight"&&(N.preventDefault(),M());},[y,M]);return j.useEffect(()=>{!f||!l||l(f);},[f,l]),j.useEffect(()=>{if(f)return x(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(Pv.Provider,{value:{carouselRef:u,api:f,scrollPrev:y,scrollNext:M,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:w,scrollTo:T},children:jsxs("div",{ref:d,className:m(kv({variant:t,className:e})),onKeyDownCapture:E,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:u,className:"overflow-hidden",children:jsx("div",{className:m("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(_l,{}),jsx(Yl,{})]}),i&&w.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:w.map((N,k)=>jsx("button",{className:m("w-2 h-2 rounded-full transition-all",k===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(k),"aria-label":`Go to slide ${k+1}`},k))})]})})});Lv.displayName="Carousel";var Sv=j.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex",e),...t}));Sv.displayName="CarouselContent";var Dv=j.forwardRef(({className:e,basis:t="basis-full",...n},r)=>jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:m("min-w-0 shrink-0 grow-0 pl-4",t,e),...n}));Dv.displayName="CarouselItem";var _l=j.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollPrev:a,canScrollPrev:s}=jl();return jsxs(te,{ref:o,variant:t,size:n,className:m("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});_l.displayName="CarouselPrevious";var Yl=j.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollNext:a,canScrollNext:s}=jl();return jsxs(te,{ref:o,variant:t,size:n,className:m("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Yl.displayName="CarouselNext";var Hv=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"}}),$s={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"}},ql={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}"]},Iv=j.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=j.useState(r.length>0?"recent":o),[u,f]=j.useState(""),g=u?Object.values(ql).flat().filter(b=>b.toLowerCase().includes(u.toLowerCase())):c==="recent"?r:ql[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:m(Hv({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(Oa,{placeholder:"Search emojis...",value:u,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!u&&jsx("div",{className:"flex border-b px-1",children:Object.entries($s).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:m("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:$s[b].name,children:v},b))}),!u&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:$s[c].name}),jsx(Ue,{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"})]})})]})});Iv.displayName="EmojiPicker";var Vv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),fE=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"}}),gE=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),je=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(Un,{children:[jsx(Wn,{asChild:true,children:jsx(te,{type:"button",variant:n?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(jn,{side:"top",className:"text-xs",children:t})]}),Av=j.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,...u},f)=>{let p=useEditor({extensions:[WN.configure({heading:{levels:[1,2,3]}}),jN.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),_N,YN.configure({types:["heading","paragraph"]}),XN.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});j.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),j.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($n,{children:jsxs("div",{ref:f,className:m(Vv({variant:t,size:n,className:e})),...u,children:[i&&!s&&jsxs("div",{className:m(fE({size:n})),children:[jsx(je,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(je,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(je,{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(je,{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(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(je,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(je,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(je,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(je,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(je,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(je,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(je,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(je,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(je,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(je,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(je,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(je,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(je,{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:m(gE({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});Av.displayName="RichTextEditor";var Ov=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function CE(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function zv(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,u=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(u),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 Bv=j.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:u,...f},p)=>{let g=j.useRef(null),[h,b]=j.useState(),[v,R]=j.useState(),[w,x]=j.useState(1),[C,y]=j.useState(0),M=k=>{let{width:P,height:L}=k.currentTarget;if(r){let H=CE(P,L,r);b(H);}else b(u||{unit:"%",x:10,y:10,width:80,height:80});},T=k=>{b(k),o?.(k);},E=async k=>{if(R(k),a&&g.current&&k.width&&k.height){let P=await zv(g.current,k,C,w);a(P);}},N=()=>{y(k=>(k+90)%360);};return j.useEffect(()=>{v&&g.current&&a&&zv(g.current,v,C,w).then(k=>{a(k);});},[w,C,v,a]),jsxs("div",{ref:p,className:m(Ov({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(bE,{crop:h,onChange:T,onComplete:E,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:M,style:{transform:`scale(${w}) 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(Ja,{value:[w],onValueChange:([k])=>x(k),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(te,{variant:"bordered",size:"icon",onClick:N,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});Bv.displayName="ImageCropper";var ec=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"}}),NE={sm:96,md:128,lg:192},Kv=j.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:u=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??NE[n??"md"];return r?jsx("div",{ref:h,className:m(ec({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(TE,{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:u,height:u,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:m(ec({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"})})});Kv.displayName="QRCode";var Gv=({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});Gv.displayName="ThemeProvider";var HE=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),$v=j.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=j.useState(false);j.useEffect(()=>{c(true);},[]);let d=()=>{let u=["light","dark","system"],p=(u.indexOf(a||"system")+1)%u.length;s(u[p]);};return l?r==="cycle"?jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:m("h-9 w-9",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(no,{children:[jsx(ro,{children:jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:m("h-9 w-9",e),children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(oo,{align:"end",children:[jsxs(_n,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs(_n,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs(_n,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:m("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});$v.displayName="ThemeToggle";var Uv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Wv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),jv=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"}}),_v=j.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:u,endContent:f,id:p,...g},h)=>{let b=j.useId(),v=p||b,R=`${v}-description`,w=`${v}-error`,x=a&&r;return jsxs("div",{className:m(Uv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:m(jv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[u&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":x?w:n?R:void 0,"aria-required":o,className:m(Wv({size:s,isInvalid:a}),u&&"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&&!x&&jsx("p",{id:R,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),x&&jsx("p",{id:w,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});_v.displayName="TextField";var qv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),AE=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}}),Yv=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Xv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),zE=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"}}),Zv=j.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:u,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:R,fullWidth:w=false,disabled:x,id:C,...y},M)=>{let T=j.useId(),E=C||T,N=`${E}-description`,k=`${E}-error`,[P,L]=j.useState(h),[H,D]=j.useState(false),S=g!==void 0?g:P,I=a&&r,z=j.useCallback(O=>{O!==void 0&&(u!==void 0&&O<u&&(O=u),f!==void 0&&O>f&&(O=f)),g===void 0&&L(O),b?.(O);},[g,u,f,b]),G=()=>{let O=(S??0)+p;z(O);},V=()=>{let O=(S??0)-p;z(O);},F=O=>{let W=O.target.value;if(W==="")z(void 0);else {let A=parseFloat(W);isNaN(A)||z(A);}},B=O=>{O.key==="ArrowUp"?(O.preventDefault(),G()):O.key==="ArrowDown"&&(O.preventDefault(),V());},Q=j.useMemo(()=>S===void 0?"":R?new Intl.NumberFormat(void 0,R).format(S):S.toString(),[S,R]),ne=u!==void 0&&S!==void 0&&S<=u,K=f!==void 0&&S!==void 0&&S>=f;return jsxs("div",{className:m(qv({size:s}),e),children:[t&&jsxs("label",{htmlFor:E,className:m(zE({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:V,disabled:x||ne,className:m(Yv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:m(Xv({size:s}))})}),jsx("input",{ref:M,id:E,type:"text",inputMode:"decimal",value:Q,onChange:F,onKeyDown:B,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?k:n?N:void 0,"aria-required":o,"aria-valuemin":u,"aria-valuemax":f,"aria-valuenow":S,disabled:x,className:m(AE({size:s,isInvalid:a,fullWidth:w}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),v&&jsx("button",{type:"button",onClick:G,disabled:x||K,className:m(Yv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:m(Xv({size:s}))})})]}),n&&!I&&jsx("p",{id:N,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:k,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Zv.displayName="NumberField";var Jv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),FE=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Qv=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"}}),KE=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"}}),GE=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"}}),eh=j.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:R,placeholder:w="Search...",id:x,...C},y)=>{let M=j.useId(),T=x||M,E=`${T}-description`,N=`${T}-error`,[k,P]=j.useState(f),L=u!==void 0?u:k,H=a&&r,D=L.length>0,S=G=>{let V=G.target.value;u===void 0&&P(V),p?.(V);},I=()=>{u===void 0&&P(""),p?.(""),g?.();},z=G=>{G.key==="Enter"?(G.preventDefault(),h?.(L)):G.key==="Escape"&&D&&(G.preventDefault(),I());};return jsxs("div",{className:m(Jv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:m(KE({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:m(Qv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:y,id:T,type:"search",value:L,onChange:S,onKeyDown:z,placeholder:w,"aria-invalid":a,"aria-describedby":H?N:n?E:void 0,"aria-required":o,disabled:R,className:m(FE({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!R&&jsx("button",{type:"button",onClick:I,className:m(GE({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:m(Qv({size:s}))})})]}),n&&!H&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});eh.displayName="SearchField";var th=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),UE=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),WE=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"}}),jE=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"}}),sc=(e,t="yyyy-MM-dd")=>{if(!e)return "";let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(n)).replace("MM",r).replace("dd",o)},_E=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},nh=j.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="yyyy-MM-dd",showIcon:v=true,fullWidth:R=false,disabled:w,id:x,...C},y)=>{let M=j.useId(),T=x||M,E=`${T}-description`,N=`${T}-error`,k=j.useRef(null),P=y||k,[L,H]=j.useState(f??null),[D,S]=j.useState(false),I=()=>{!w&&P.current&&P.current.showPicker?.();},z=u!==void 0?u:L,G=a&&r,V=ne=>{let K=_E(ne.target.value);u===void 0&&H(K),p?.(K);},F=z?sc(z,"yyyy-MM-dd"):"",B=g?sc(g,"yyyy-MM-dd"):void 0,Q=h?sc(h,"yyyy-MM-dd"):void 0;return jsxs("div",{className:m(th({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:m(jE({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:m("relative",R?"w-full":"w-fit"),children:[jsx("input",{ref:P,id:T,type:"date",value:F,onChange:V,onFocus:()=>S(true),onBlur:()=>S(false),min:B,max:Q,"aria-invalid":a,"aria-describedby":G?N:n?E:void 0,"aria-required":o,disabled:w,className:m(UE({size:s,isInvalid:a,fullWidth:R}),!v&&"pr-3",l),style:{borderColor:D?"var(--color-foreground)":void 0},...C}),v&&jsx("button",{type:"button",onClick:I,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:m(WE({size:s}))})})]}),n&&!G&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),G&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});nh.displayName="DateField";var rh=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),YE=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}}),XE=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"}}),oh=j.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:R,fullWidth:w=false,id:x,...C},y)=>{let M=j.useId(),T=x||M,E=`${T}-description`,N=`${T}-error`,k=j.useRef(null),P=j.useRef(null),L=j.useRef(null),H=j.useRef(null),[D,S]=j.useState(f??null),I=u!==void 0?u:D,z=a&&r,G=$=>v===24?$:$===0?12:$>12?$-12:$,V=$=>$>=12?"PM":"AM",F=($,re)=>re==="AM"?$===12?0:$:$===12?12:$+12,[B,Q]=j.useState(I?String(G(I.hour)).padStart(2,"0"):""),[ne,K]=j.useState(I?String(I.minute).padStart(2,"0"):""),[O,W]=j.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[A,_]=j.useState(I?V(I.hour):"AM"),[U,he]=j.useState(false);j.useEffect(()=>{u!==void 0&&(u?(Q(String(G(u.hour)).padStart(2,"0")),K(String(u.minute).padStart(2,"0")),u.second!==void 0&&W(String(u.second).padStart(2,"0")),_(V(u.hour))):(Q(""),K(""),W("")));},[u,v]);let me=($,re,Y,Se)=>{let ie=parseInt($,10),Fe=parseInt(re,10),Ke=b?parseInt(Y,10):void 0;if(isNaN(ie)||isNaN(Fe)||b&&isNaN(Ke)){u===void 0&&S(null),p?.(null);return}let xe={hour:v===12?F(ie,Se):ie,minute:Fe,...b&&Ke!==void 0&&{second:Ke}};u===void 0&&S(xe),p?.(xe);},zn=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);Q(re);let Y=v===24?23:12,Se=v===24?0:1;if(re.length===2){let ie=parseInt(re,10);ie>=Se&&ie<=Y&&(P.current?.focus(),P.current?.select());}},oe=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);if(K(re),re.length===2){let Y=parseInt(re,10);Y>=0&&Y<=59&&(b?(L.current?.focus(),L.current?.select()):v===12&&H.current?.focus());}},tt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);W(re),re.length===2&&v===12&&H.current?.focus();},On=()=>{if(B){let $=parseInt(B,10),re=v===24?23:12,Se=Math.min(Math.max($,v===24?0:1),re),ie=String(Se).padStart(2,"0");Q(ie),me(ie,ne,O,A);}},bt=()=>{if(ne){let $=parseInt(ne,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");K(Y),me(B,Y,O,A);}},br=()=>{if(O){let $=parseInt(O,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");W(Y),me(B,ne,Y,A);}},Bn=()=>{let $=A==="AM"?"PM":"AM";_($),me(B,ne,O,$);},Fo=$=>{let re=$.key.toLowerCase();re==="a"?($.preventDefault(),A!=="AM"&&(_("AM"),me(B,ne,O,"AM"))):re==="p"?($.preventDefault(),A!=="PM"&&(_("PM"),me(B,ne,O,"PM"))):re==="arrowup"||re==="arrowdown"?($.preventDefault(),Bn()):re==="arrowleft"&&($.preventDefault(),b?(L.current?.focus(),L.current?.select()):(P.current?.focus(),P.current?.select()));},Bt=($,re)=>{if($.key==="ArrowUp"||$.key==="ArrowDown"){$.preventDefault();let Y=$.key==="ArrowUp"?1:-1;if(re==="hour"){let Se=parseInt(B,10)||0,ie=v===24?23:12,Fe=v===24?0:1,Ke=Se+Y;Ke>ie&&(Ke=Fe),Ke<Fe&&(Ke=ie);let Fn=String(Ke).padStart(2,"0");Q(Fn),me(Fn,ne,O,A);}else if(re==="minute"){let ie=(parseInt(ne,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Fe=String(ie).padStart(2,"0");K(Fe),me(B,Fe,O,A);}else if(re==="second"){let ie=(parseInt(O,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Fe=String(ie).padStart(2,"0");W(Fe),me(B,ne,Fe,A);}}$.key==="ArrowRight"&&($.preventDefault(),re==="hour"?(P.current?.focus(),P.current?.select()):re==="minute"&&b?(L.current?.focus(),L.current?.select()):(re==="minute"&&!b&&v===12||re==="second"&&v===12)&&H.current?.focus()),$.key==="ArrowLeft"&&($.preventDefault(),re==="minute"?(k.current?.focus(),k.current?.select()):re==="second"&&(P.current?.focus(),P.current?.select())),$.key==="Backspace"&&$.currentTarget.value===""&&(re==="minute"?k.current?.focus():re==="second"&&P.current?.focus());},vr=m((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",R&&"cursor-not-allowed");return jsxs("div",{ref:y,className:m(rh({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:m(XE({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:m(YE({size:s,isInvalid:a,disabled:R,fullWidth:w}),l),style:{borderColor:U?"var(--color-foreground)":void 0},onFocus:()=>he(true),onBlur:$=>{$.currentTarget.contains($.relatedTarget)||he(false);},children:[jsx("input",{ref:k,id:T,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:B,onChange:zn,onBlur:On,onKeyDown:$=>Bt($,"hour"),onFocus:$=>$.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":z?N:n?E:void 0,"aria-required":o,disabled:R,className:vr}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:P,type:"text",inputMode:"numeric",placeholder:"mm",value:ne,onChange:oe,onBlur:bt,onKeyDown:$=>Bt($,"minute"),onFocus:$=>$.target.select(),"aria-label":"Minute",disabled:R,className:vr}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:L,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:tt,onBlur:br,onKeyDown:$=>Bt($,"second"),onFocus:$=>$.target.select(),"aria-label":"Second",disabled:R,className:vr})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:Bn,onKeyDown:Fo,disabled:R,className:m("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",R&&"cursor-not-allowed"),"aria-label":"AM/PM",children:A})]}),n&&!z&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),z&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});oh.displayName="TimeField";var sh=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZE=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),QE=cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),JE=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"}}),ah=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),ek=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),ih=j.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f="#000000",onChange:p,showSwatch:g=true,showPicker:h=true,allowAlpha:b=false,fullWidth:v=false,disabled:R,id:w,...x},C)=>{let y=j.useId(),M=w||y,T=`${M}-picker`,E=`${M}-description`,N=`${M}-error`,[k,P]=j.useState(f),[L,H]=j.useState(false),D=u!==void 0?u:k,S=a&&r,I=F=>{let B=F.target.value;B&&!B.startsWith("#")&&(B="#"+B),u===void 0&&P(B),p?.(B);},z=F=>{let B=F.target.value.toUpperCase();u===void 0&&P(B),p?.(B);},G=()=>{if(D&&ah(D)){let F=ek(D);F!==D&&(u===void 0&&P(F),p?.(F));}},V=ah(D)?D:"#000000";return jsxs("div",{className:m(sh({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:m(JE({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[g&&jsx("div",{className:m(QE({size:s})),children:h?jsxs("label",{htmlFor:T,className:"block h-full w-full cursor-pointer",children:[jsx("input",{id:T,type:"color",value:V,onChange:z,disabled:R,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})]}):jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})}),jsx("input",{ref:C,id:M,type:"text",value:D,onChange:I,onFocus:()=>H(true),onBlur:()=>{H(false),G();},placeholder:"#000000",maxLength:b?9:7,"aria-invalid":a,"aria-describedby":S?N:n?E:void 0,"aria-required":o,disabled:R,className:m(ZE({size:s,isInvalid:a,fullWidth:v}),!g&&"pl-3",l),style:{borderColor:L?"var(--color-foreground)":void 0},...x})]}),n&&!S&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),S&&jsx("p",{id:N,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});ih.displayName="ColorField";var ch=cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),dh=j.createContext({});function nk(){return j.useContext(dh)}var uh=j.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(dh.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:m(ch({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));uh.displayName="ButtonGroup";var ph=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"}}),fh=j.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...u},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"],R=(x,C)=>{C&&C(),l&&l(x);},w=x=>jsxs("button",{type:"button",disabled:i||x.isDisabled,onClick:()=>R(x.key,x.onPress),className:m("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":x.label,children:[x.icon&&jsx("span",{className:v,children:x.icon}),c&&jsx("span",{children:x.label})]},x.key);return jsxs("div",{ref:f,role:"group",className:m(ph({variant:t,orientation:n,size:r,density:o,className:e})),...u,children:[p.map(x=>d?d(x):w(x)),g.length>0&&jsxs(no,{children:[jsx(ro,{"aria-label":"More actions",className:m("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(oo,{align:"end",children:g.map(x=>jsxs(_n,{disabled:x.isDisabled,onClick:()=>R(x.key,x.onPress),children:[x.icon&&jsx("span",{className:m(v,"mr-2"),children:x.icon}),x.label]},x.key))})]})]})});fh.displayName="ActionGroup";var hh=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"}}),ak=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}}),xh=j.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:m(hh({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:m(ak({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));xh.displayName="StatusLight";var Rh=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),ik=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),lk=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),ck=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),wh=j.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxs("div",{ref:i,className:m(Rh({size:t,className:e})),...s,children:[n&&jsx("div",{className:m(ik({size:t})),"aria-hidden":"true",children:n}),r&&jsx("h3",{className:m(lk({size:t})),children:r}),o&&jsx("p",{className:m(ck({size:t})),children:o}),a&&jsx("div",{className:"mt-2",children:a})]}));wh.displayName="IllustratedMessage";var Mh=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),bk={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Nh=j.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[u,f]=j.useState(true);if(!u)return null;let p=bk[t??"info"],g=()=>{f(false),s?.();};return jsxs("div",{ref:d,role:"alert",className:m(Mh({variant:t,className:e})),...c,children:[!o&&jsx("div",{className:"flex-shrink-0",children:r||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsx("div",{className:"font-medium",children:n}),l&&jsx("div",{className:"opacity-90",children:l}),i&&jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});Nh.displayName="InlineAlert";var Eh=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),kh=j.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 u=()=>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:m(Eh({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:u()}),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("button",{type:"button",onClick:a,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsx(X,{className:"h-4 w-4"})})]})]})});kh.displayName="ActionBar";var Ph=j.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:m("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]}));Ph.displayName="ActionBarButton";var Dh=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"}}),Hh=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 Ih({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:u,...f}){let[p,g]=j.useState(new Set),[h,b]=j.useState(null),[v,R]=j.useState(null),w=j.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),x=T=>{if(a==="none")return;let E;a==="single"?E=w.has(T)?new Set:new Set([T]):(E=new Set(w),E.has(T)?E.delete(T):E.add(T)),o||g(E),s?.(E);},C=(T,E)=>{b(E),T.dataTransfer.effectAllowed="move";},y=(T,E)=>{T.preventDefault(),h!==E&&R(E);},M=()=>{if(h&&v&&h!==v){let T=r.findIndex(P=>P.key===h),E=r.findIndex(P=>P.key===v),N=[...r],[k]=N.splice(T,1);N.splice(E,0,k),l?.(N);}b(null),R(null);};return r.length===0?jsx("div",{className:m("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:m(Dh({variant:t,size:n,className:e})),...f,children:r.map(T=>{let E=w.has(T.key),N=h===T.key,k=v===T.key;return d?jsx("div",{role:"option","aria-selected":E,onClick:()=>x(T.key),children:d(T,E)},T.key):jsxs("div",{role:"option","aria-selected":E,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:P=>C(P,T.key),onDragOver:P=>y(P,T.key),onDragEnd:M,onClick:()=>!T.isDisabled&&x(T.key),className:m(Hh({variant:t,size:n,isSelected:E,isDisabled:T.isDisabled}),N&&"opacity-50",k&&"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:m("flex h-4 w-4 items-center justify-center rounded border",E?"bg-primary border-primary text-primary-foreground":"border-input"),children:E&&jsx(Check,{className:"h-3 w-3"})}),T.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:T.label}),T.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}Ih.displayName="ListView";var Vh=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"}}),wk=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Ck=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Ah=j.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:u=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,R]=j.useState(o),w=r!==void 0,x=w?r:v,C=j.useRef(null),[y,M]=j.useState(false),[T,E]=j.useState(null),N=(V,F)=>{if(!C.current)return x[0];let B=C.current.getBoundingClientRect(),Q;t==="horizontal"?Q=(V-B.left)/B.width:Q=1-(F-B.top)/B.height,Q=Math.max(0,Math.min(1,Q));let ne=i+Q*(l-i),K=Math.round(ne/c)*c;return Math.max(i,Math.min(l,K))},k=(V,F)=>{let B=[...x];B[F]=V,F===0&&V>x[1]&&(B[0]=x[1]),F===1&&V<x[0]&&(B[1]=x[0]),w||R(B),a?.(B);},P=(V,F)=>{d||(V.preventDefault(),M(true),E(F),V.target.setPointerCapture(V.pointerId));},L=V=>{if(!y||T===null||d)return;let F=N(V.clientX,V.clientY);k(F,T);},H=()=>{y&&(M(false),E(null),s?.(x));},D=V=>{if(d)return;let F=N(V.clientX,V.clientY),B=Math.abs(x[0]-F),Q=Math.abs(x[1]-F),ne=B<=Q?0:1;k(F,ne);let K=[...x];K[ne]=F,s?.(K);},S=(V,F)=>{if(d)return;let B=x[F];switch(V.key){case "ArrowRight":case "ArrowUp":V.preventDefault(),B=Math.min(l,x[F]+c);break;case "ArrowLeft":case "ArrowDown":V.preventDefault(),B=Math.max(i,x[F]-c);break;case "Home":V.preventDefault(),B=i;break;case "End":V.preventDefault(),B=l;break;default:return}k(B,F);let Q=[...x];Q[F]=B,s?.(Q);},I=V=>(V-i)/(l-i)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],G={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[u&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(x[0])}),jsx("span",{children:f(x[1])})]}),jsxs("div",{ref:b,className:m(Vh({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:m(wk({orientation:t,size:n})),onClick:D,children:jsx("div",{className:m("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(x[0])}%`,right:`${100-I(x[1])}%`,top:0,bottom:0}:{bottom:`${I(x[0])}%`,top:`${100-I(x[1])}%`,left:0,right:0}})}),x.map((V,F)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":V,"aria-orientation":t||void 0,"aria-disabled":d,className:m(Ck({size:n}),y&&T===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(V)}% - ${G/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(V)}% - ${G/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:B=>P(B,F),onPointerMove:L,onPointerUp:H,onPointerCancel:H,onKeyDown:B=>S(B,F)},F)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:x[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:x[1]})]})]})]})});Ah.displayName="RangeSlider";var pc=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"}}),kk=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"}}),Pk={help:HelpCircle,info:Info,warning:AlertCircle},Bh=j.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:u,contentClassName:f},p)=>{let[g,h]=j.useState(false),[b,v]=j.useState(false),[R,w]=j.useState({top:0,left:0}),x=j.useRef(null),C=j.useRef(null),y=i!==void 0?i:g,M=j.useCallback(k=>{i===void 0&&h(k),l?.(k);},[i,l]);j.useEffect(()=>{v(true);},[]),j.useEffect(()=>{if(!y||!x.current)return;let k=()=>{let P=x.current.getBoundingClientRect(),L=288,H=8,D=0,S=0;switch(a){case "top":D=P.top-H,S=P.left+P.width/2;break;case "bottom":D=P.bottom+H,S=P.left+P.width/2;break;case "left":D=P.top+P.height/2,S=P.left-H;break;case "right":D=P.top+P.height/2,S=P.right+H;break}if(a==="top"||a==="bottom")switch(s){case "start":S=P.left;break;case "center":S=P.left+P.width/2-L/2;break;case "end":S=P.right-L;break}S=Math.max(8,Math.min(S,window.innerWidth-L-8)),w({top:D,left:S});};return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,true),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true);}},[y,a,s]),j.useEffect(()=>{if(!y)return;let k=P=>{C.current&&!C.current.contains(P.target)&&x.current&&!x.current.contains(P.target)&&M(false);};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[y,M]),j.useEffect(()=>{if(!y)return;let k=P=>{P.key==="Escape"&&M(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[y,M]);let T=Pk[e??"help"],E=()=>{M(!y);},N=()=>{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?j.isValidElement(o)?j.cloneElement(o,{ref:x,onClick:k=>{o.props.onClick?.(k),E();}}):jsx("button",{ref:x,type:"button",onClick:E,className:m(pc({variant:e,size:t}),u),"aria-label":"Help",children:o}):jsx("button",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},type:"button",onClick:E,className:m(pc({variant:e,size:t}),u),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),b&&y&&Xa.createPortal(jsxs("div",{ref:C,className:m(kk({size:t}),f),style:{position:"fixed",top:R.top,left:R.left,transformOrigin:N()},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)]})});Bh.displayName="ContextualHelp";var Kh=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),fc=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"outline",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function Gh({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:u,errorMessage:f,maxTags:p,...g}){let[h,b]=j.useState(new Set),v=j.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),R=y=>{if(s==="none")return;let M;s==="single"?M=v.has(y)?new Set:new Set([y]):(M=new Set(v),M.has(y)?M.delete(y):M.add(y)),a||b(M),i?.(M);},w=(y,M)=>{M.stopPropagation(),c?.(y);},x=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}),u&&jsx("span",{className:"text-sm text-muted-foreground",children:u}),jsxs("div",{role:"group","aria-label":d,className:m(Kh({spacing:t}),e),...g,children:[x.map(y=>{let M=v.has(y.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!y.isDisabled?0:void 0,"aria-pressed":T?M:void 0,onClick:()=>!y.isDisabled&&R(y.key),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&!y.isDisabled&&(E.preventDefault(),R(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:m(fc({variant:y.color?void 0:n,size:r,isSelected:M,isDisabled:y.isDisabled}),T&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,l&&!y.isDisabled&&jsx("button",{type:"button",onClick:E=>w(y.key,E),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsx(X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxs("span",{className:m(fc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}Gh.displayName="TagGroup";var Wh=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"}}),jh=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 _h({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:u,...f}){let[p,g]=j.useState(new Set),h=j.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let R;a==="single"?R=h.has(v)?new Set:new Set([v]):(R=new Set(h),R.has(v)?R.delete(v):R.add(v)),o||g(R),s?.(R);};return r.length===0?jsx("div",{className:m("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:m(Wh({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let R=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":R,onClick:()=>b(v.key),children:d(v,R)},v.key):jsxs("div",{role:"gridcell","aria-selected":R,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:m(jh({variant:l,size:c,isSelected:R,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&R&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),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)})})}_h.displayName="GridList";var Xh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),Hk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),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}}),ai=j.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:u="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(u!=="auto")return "";let R=(n-r)/(o-r),w=s!==void 0?(s-r)/(o-r):.25,x=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?R<=w?"bg-red-500":R<=x?"bg-yellow-500":"bg-green-500":R>=x?"bg-red-500":R>=w?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:m("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:m(Xh({size:t})),children:jsx("div",{className:m(Hk({variant:f})),children:jsx("div",{className:m(Ik({color:u==="auto"?void 0:u,rounded:h>=100}),u==="auto"&&b()),style:{width:`${h}%`}})})})]})});ai.displayName="Meter";var qh=j.forwardRef((e,t)=>jsx(ai,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));qh.displayName="DiskUsageMeter";var Zh=j.forwardRef((e,t)=>jsx(ai,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Zh.displayName="BatteryMeter";var Qh=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"}}),ii=(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)]},Jh=(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]},ex=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},tx=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),nx=j.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,...u},f)=>{let p=j.useRef(null),[g,h]=j.useState(false),b=j.useCallback(V=>{let F=ex(V);return F?Jh(...F):[0,1,1]},[]),[v,R]=j.useState(()=>b(r||o)),w=e??v[0],x=t??v[1],C=n??v[2];j.useEffect(()=>{if(r){let V=b(r);R(V);}},[r,b]);let y=j.useCallback((V,F)=>{if(l||!p.current)return;let B=p.current.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(V-B.left)/B.width)),ne=Math.max(0,Math.min(1,(F-B.top)/B.height)),K=Q,O=1-ne;t===void 0&&n===void 0&&R([w,K,O]),a?.({hue:w,saturation:K,brightness:O});let W=ii(w,K,O);s?.(tx(...W));},[l,w,t,n,a,s]),M=V=>{l||(V.preventDefault(),h(true),V.target.setPointerCapture(V.pointerId),y(V.clientX,V.clientY));},T=V=>{g&&y(V.clientX,V.clientY);},E=V=>{h(false),V.target.releasePointerCapture(V.pointerId);},[N,k,P]=ii(w,1,1),L=`rgb(${N}, ${k}, ${P})`,H=x*100,D=(1-C)*100,[S,I,z]=ii(w,x,C),G=`rgb(${S}, ${I}, ${z})`;return jsx("div",{ref:f,className:m(Qh({size:i}),l&&"cursor-not-allowed opacity-50",d),...u,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:L},onPointerDown:M,onPointerMove:T,onPointerUp:E,onPointerLeave:E,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:G,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});nx.displayName="ColorArea";var ox=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"}}),Ok=`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")`,rx="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",ax=j.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,...u},f)=>{let p=j.useRef(null),[g,h]=j.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,R]=j.useState(t??b()),w=e??v,x=r==="hue"?w/360:w,C=j.useCallback((L,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),S=a!=="vertical",I;S?I=Math.max(0,Math.min(1,(L-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let z=r==="hue"?I*360:I;e===void 0&&R(z),n?.(z);},[i,a,r,e,n]),y=L=>{i||(L.preventDefault(),h(true),L.target.setPointerCapture(L.pointerId),C(L.clientX,L.clientY));},M=L=>{g&&C(L.clientX,L.clientY);},T=L=>{h(false),L.target.releasePointerCapture(L.pointerId);},E=()=>{let L=a!=="vertical",H=L?"to right":"to top";switch(r){case "hue":return L?rx:"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 rx}},N=()=>r==="hue"?`hsl(${w}, 100%, 50%)`:o,k=a!=="vertical",P=x*100;return jsx("div",{ref:f,className:m(ox({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...u,children:jsxs("div",{ref:p,className:m("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?Ok:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:M,onPointerUp:T,onPointerLeave:T,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:E()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...k?{left:`calc(${P}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${P}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:N(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});ax.displayName="ColorSlider";var sx=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),Kk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},ix=j.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 u=j.useRef(null),[f,p]=j.useState(false),[g,h]=j.useState(t),b=e??g,v=j.useCallback((y,M)=>{if(o||!u.current)return;let T=u.current.getBoundingClientRect(),E=T.width/2,N=y-T.left,k=M-T.top,P=Kk(N,k,E);e===void 0&&h(P),n?.(P);},[o,e,n]),R=y=>{o||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),v(y.clientX,y.clientY));},w=y=>{f&&v(y.clientX,y.clientY);},x=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let M=0;M<=360;M+=30)y.push(`hsl(${M}, 100%, 50%) ${M}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsx("div",{ref:d,className:m(sx({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:u,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:R,onPointerMove:w,onPointerUp:x,onPointerLeave:x,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})]})})});ix.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 cx=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"}}),Uk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Wk=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}}),dx=j.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:u=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:m(cx({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:m(Uk({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,u&&":"]}),jsx("span",{className:m(Wk({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})]})});dx.displayName="LabeledValue";var ux=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),mx=j.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:m(ux({orientation:t,gap:n,className:e})),...r}));mx.displayName="LabeledValueGroup";var bx=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),ko=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"}}),vx=j.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:u=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:R,...w},x)=>{let[C,y]=j.useState(false),[M,T]=j.useState(t),E=e!==void 0?e:M,N=j.useRef(null);j.useImperativeHandle(x,()=>N.current);let k=E.length>0,P=C&&(a.length>0||s.length>0||l.length>0||k),L=V=>{e===void 0&&T(V),n?.(V);},H=()=>{L(""),N.current?.focus();},D=V=>{V?.preventDefault(),E.trim()&&(r?.(E.trim()),y(false));},S=V=>{L(V.label),o?.(V),y(false);},I=V=>{L(V),r?.(V),y(false);},z=V=>{L(V),r?.(V),y(false);},G=j.useMemo(()=>{let V={};return a.forEach(F=>{let B=F.category||"Results";V[B]||(V[B]=[]),V[B].push(F);}),V},[a]);return jsxs(nt,{open:P,onOpenChange:y,children:[jsx(ht,{asChild:true,children:jsxs("form",{onSubmit:D,className:m(bx({size:g,variant:h}),b),children:[u&&jsx(Search,{className:m(ko({size:g}),"ml-3")}),jsx("input",{ref:N,type:"text",value:E,onChange:V=>L(V.target.value),onFocus:()=>y(true),placeholder:v,disabled:R,className:m("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!u&&"pl-3"),...w}),d&&k&&!R&&jsx("button",{type:"button",onClick:H,className:m("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",ko({size:g})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(rt,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:V=>V.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!k&&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((V,F)=>jsxs("button",{type:"button",onClick:()=>I(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:m(ko({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:V}),jsx(ArrowRight,{className:m(ko({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!k&&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((V,F)=>jsxs("button",{type:"button",onClick:()=>z(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:m(ko({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:V})]},F))]}),k&&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(G).map(([V,F])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:V})}),F.map(B=>jsxs("button",{type:"button",onClick:()=>S(B),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[B.icon||jsx(Search,{className:m(ko({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:B.label}),B.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:B.description})]})]},B.id))]},V)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});vx.displayName="SearchBar";var hx={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"})},Rx=j.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},u)=>{let[f,p]=j.useState(""),g=j.useRef(null),[h,b]=j.useState(false);j.useEffect(()=>{b(true);},[]),j.useEffect(()=>{e||p("");},[e]),j.useEffect(()=>{if(!e)return;let y=M=>{M.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),j.useEffect(()=>{if(e)return ct(),()=>dt()},[e]);let v=j.useMemo(()=>{let y={};return n.forEach(M=>{let T=M.category||"Results";y[T]||(y[T]=[]),y[T].push(M);}),y},[n]),R=y=>{y.onSelect?.(),c?.(y),t?.(false);},w=()=>{t?.(false);},x=f.length>0,C=!x&&r.length>0;return !h||!e?null:Xa.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:w}),jsx("div",{ref:u,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,{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(y=>jsxs(Command.Item,{value:y.label,onSelect:()=>R(y),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:y.icon||hx[y.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((M,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:M},T))})]},y.id))]}),x&&Object.entries(v).map(([y,M])=>jsxs(Command.Group,{heading:y,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),M.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>R(T),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:T.icon||hx[y]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},y)),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)});Rx.displayName="SpotlightSearch";function oP(e="k"){let[t,n]=j.useState(false);return j.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 Tx=j.createContext(null),ci=()=>{let e=j.useContext(Tx);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},mP=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=j.useState([]),[a,s]=j.useState(false),i=j.useRef(null),l=t!==void 0,c=l?t:r,d=j.useCallback(b=>{l?n?.(b):o(b);},[l,n]),u=c.filter(b=>!b.read).length,f=j.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=j.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=j.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=j.useCallback(()=>{d([]);},[d]);return jsx(Tx.Provider,{value:{notifications:c,unreadCount:u,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Mx=j.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("relative inline-block",e),...n,children:t}));Mx.displayName="NotificationCenter";var Nx=j.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=ci(),d=f=>{r?.(f),l(!i);},u=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:m("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:u})]})});Nx.displayName="NotificationCenterTrigger";var Ex=j.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:u,triggerRef:f}=ci(),[p,g]=j.useState(false),h=j.useRef(null),[b,v]=j.useState({top:0,left:0});return j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!i||!f.current||!h.current)return;let R=()=>{if(!f.current||!h.current)return;let w=f.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),C=w.bottom+n,y=w.left;t==="center"?y=w.left+w.width/2-x.width/2:t==="end"&&(y=w.right-x.width),y+x.width>window.innerWidth-16&&(y=window.innerWidth-x.width-16),y<16&&(y=16),v({top:C,left:y});};return R(),window.addEventListener("resize",R),window.addEventListener("scroll",R,true),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R,true);}},[i,f,t,n]),j.useEffect(()=>{if(!i)return;let R=x=>{h.current&&!h.current.contains(x.target)&&f.current&&!f.current.contains(x.target)&&l(false);},w=x=>{x.key==="Escape"&&l(false);};return document.addEventListener("mousedown",R),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("keydown",w);}},[i,l,f]),!p||!i?null:Xa.createPortal(jsxs("div",{ref:R=>{h.current=R,typeof s=="function"?s(R):s&&(s.current=R);},className:m("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:u,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,{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(R=>jsx(xc,{notification:R},R.id)))})]}),document.body)});Ex.displayName="NotificationCenterContent";var pP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},fP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},xc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=ci(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:u,action:f}=e,p=fP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let R=typeof v=="string"?new Date(v):v,x=new Date().getTime()-R.getTime(),C=Math.floor(x/6e4),y=Math.floor(x/36e5),M=Math.floor(x/864e5);return C<1?"Just now":C<60?C+"m ago":y<24?y+"h ago":M<7?M+"d ago":R.toLocaleDateString()};return jsxs("div",{className:m("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",pP[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:u||jsx("div",{className:m("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:m("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"})})]})})]})};xc.displayName="NotificationItem";var kx=j.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("divide-y",e),...n,children:t}));kx.displayName="NotificationList";var Px=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"}}),wP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Lx=j.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:u,className:f,...p},g)=>{let[h,b]=j.useState(true),[v,R]=j.useState(false);j.useEffect(()=>{u&&localStorage.getItem(`banner-${u}`)==="true"&&b(false);},[u]),j.useEffect(()=>{if(d&&h){let y=setTimeout(()=>{w();},d);return ()=>clearTimeout(y)}},[d,h]);let w=()=>{R(true),setTimeout(()=>{b(false),u&&localStorage.setItem(`banner-${u}`,"true"),s?.();},200);};if(!h)return null;let x=wP[t],C=r?o!==void 0?o:x?jsx(x,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:m(Px({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:w,className:m("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,{className:"h-4 w-4"})})]})});Lx.displayName="Banner";var Ra=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-primary bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),MP=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"}}),Rc=j.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:u,className:f,onClick:p,disabled:g,...h},b)=>{let[v,R]=j.useState(false),w=o&&o.length>0,x=E=>{w&&R(!v),p?.(E);},C=E=>{E.onClick?.(),R(false);},y={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},M=l==="rotate"&&v?"rotate-45":"",T=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:m("relative z-50",u!=="relative"&&u&&Ra({position:u})),children:[w&&v&&jsx("div",{className:m("absolute left-1/2 -translate-x-1/2 flex items-center",y[a].container),children:o.map((E,N)=>jsxs("div",{className:m("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*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:E.label}),E.href?jsx("a",{href:E.href,className:m(Ra({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.icon}):jsx("button",{type:"button",onClick:()=>C(E),className:m(Ra({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.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:E.label})]},E.id))}),jsxs("button",{ref:b,type:"button",onClick:x,disabled:g,className:m(Ra({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":w?v:void 0,...h,children:[v&&i?i:jsx("span",{className:m(MP({size:d}),M,T,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),w&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>R(false)})]})});Rc.displayName="FloatingActionButton";var NP=Rc;var Vx=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"}}),Dx=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Ax=j.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,hideLabels:i=false,showActiveLabel:l=false,renderItem:c,...d},u)=>{let[f,p]=j.useState(a||r[0]?.key),g=o!==void 0,h=g?o:f,b=x=>{x.disabled||(g||p(x.key),s?.(x.key));},v=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",R=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:u,className:m(Vx({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...d,children:r.map(x=>{let C=h===x.key,y=!i&&(l?C:true),M=C&&x.activeIcon?x.activeIcon:x.icon;if(c)return jsx("div",{onClick:()=>b(x),className:m(Dx({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:c(x,C)},x.key);let T=jsxs("div",{onClick:()=>!x.href&&b(x),className:m(Dx({variant:t}),v(C),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":C?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),b(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:m(R(),"[&>svg]:h-full [&>svg]:w-full"),children:M}),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"})]}),y&&x.label&&jsx("span",{className:m(w(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsx("a",{href:x.href,onClick:()=>b(x),className:m("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(C)),children:T},x.key):T})})});Ax.displayName="BottomNavigation";var kP="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",Ox=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"}}),Bx=j.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:u},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),u?.(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:kP,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:m(Ox({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})})})]})]})]})});Bx.displayName="ActionSheet";var Kx=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Cc=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"}}),Gx=j.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},u)=>{let f=j.useRef(null),[p,g]=j.useState(0),[h,b]=j.useState(false),v=j.useRef(0),R=j.useRef(0),w=n.length*(o==="sm"?64:o==="lg"?96:80),x=r.length*(o==="sm"?64:o==="lg"?96:80),C=N=>{i||(b(true),v.current=N.touches[0].clientX,R.current=p);},y=N=>{if(!h||i)return;let P=N.touches[0].clientX-v.current,L=R.current+P;(L>0&&n.length===0||L<0&&r.length===0)&&(L=0),L>w?L=w+(L-w)*.3:L<-x&&(L=-x+(L+x)*.3),g(L);},M=()=>{if(!h)return;b(false);let N=f.current?.offsetWidth||0,k=Math.abs(p)/N;if(l&&k>.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>w*a&&n.length>0?(g(w),s?.("right")):p<-x*a&&r.length>0?(g(-x),s?.("left")):g(0);},T=(N,k)=>{N.onAction?.(),s?.(k,N.key),g(0);},E=()=>{g(0);};return jsxs("div",{ref:u,className:m(Kx({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:w},children:n.map(N=>jsxs("button",{type:"button",onClick:()=>T(N,"right"),className:m(Cc({variant:N.variant,size:o})),style:{opacity:Math.min(1,p/w)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:x},children:r.map(N=>jsxs("button",{type:"button",onClick:()=>T(N,"left"),className:m(Cc({variant:N.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/x)},children:[N.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),jsx("div",{ref:f,className:m("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:M,onClick:p!==0?E:void 0,children:c})]})});Gx.displayName="SwipeActions";var Ux=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),SP=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"}}),Wx=j.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:u="Refreshing...",children:f,...p},g)=>{let h=j.useRef(null),[b,v]=j.useState(0),[R,w]=j.useState("idle"),x=j.useRef(0),C=j.useRef(false),y=()=>l||R==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,M=P=>{y()&&(x.current=P.touches[0].clientY,C.current=true);},T=P=>{if(!C.current||!y())return;let H=P.touches[0].clientY-x.current;if(H<0){v(0),w("idle");return}let S=Math.min(H*.5,o);v(S),w(S>=r?"ready":"pulling");},E=async()=>{if(C.current)if(C.current=false,R==="ready"){w("refreshing"),v(r*.6);try{await n();}finally{w("idle"),v(0);}}else w("idle"),v(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],k=()=>{if(R==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:m(N,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:u})]});let P=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:m(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${P}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:R==="ready"?d:c})]})};return jsxs("div",{ref:g,className:m(Ux({variant:t,className:e})),...p,children:[jsx("div",{className:m(SP({size:i}),"z-10",R==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:k()}),jsx("div",{ref:h,className:m("transition-transform duration-200",R==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:M,onTouchMove:T,onTouchEnd:E,children:f})]})});Wx.displayName="PullToRefresh";var Wr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),DP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},jx=j.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 u=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:DP,custom:i,transition:Wr(n,r,o),className:m(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&u}):u});jx.displayName="Fade";var HP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},_x=j.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},u)=>{let f=j.useMemo(()=>HP(i,l),[i,l]),p=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Wr(n,r,o),className:m(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});_x.displayName="Slide";var IP={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})},Yx=j.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},u)=>{let f=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:VP,custom:i,transition:Wr(n,r,o),className:m(a),style:{transformOrigin:IP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});Yx.displayName="Scale";var Xx=j.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},u)=>{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:u,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Wr(n,r,o),className:m("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Xx.displayName="Collapse";var qx=j.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},u)=>{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:u,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Wr(n,r,o),className:m("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});qx.displayName="Expand";var Zx=j.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},u)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Wr(n,r,o),className:m(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Zx.displayName="Rotate";var Qx=j.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 u=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:m("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[u]:r?180:0},transition:Wr(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:`${u}(180deg)`},children:t})]})})});Qx.displayName="Flip";var Jx=j.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=j.useState([]),l=j.useRef(null),c=u=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=u.clientX-p.left,h=u.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(R=>[...R,v]);},d=u=>{i(f=>f.filter(p=>p.id!==u));};return jsxs("div",{ref:a,className:m("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(u=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(u.id),className:"pointer-events-none absolute rounded-full",style:{left:u.x-u.size/2,top:u.y-u.size/2,width:u.size,height:u.size,backgroundColor:e}},u.id))})]})});Jx.displayName="Ripple";var ey=j.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,u={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:u,initial:"idle",animate:d?"bounce":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ey.displayName="Bounce";var OP={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]},ty=j.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,u={idle:{x:0},shake:{x:OP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:u,initial:"idle",animate:d?"shake":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ty.displayName="Shake";var BP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},ny=j.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:m(t&&BP[n],r),children:e}));ny.displayName="Pulse";var ry=j.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,u={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:u,initial:"idle",animate:d?"wiggle":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ry.displayName="Wiggle";var oy=j.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]=j.useState(false),d=t||l,u={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:u,className:m(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});oy.displayName="Pop";var WP=(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},ay=j.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:u},f)=>{let p=j.useRef(null),g=useInView(p,{once:true}),[h,b]=j.useState(!l);j.useEffect(()=>{if(l&&g){let w=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(w)}},[l,g,c]);let v=useMotionValue(t),R=useTransform(v,w=>WP(w,r,s,i));return j.useEffect(()=>{if(h){let w=animate(v,e,{duration:n,ease:"easeOut",onComplete:u});return ()=>w.stop()}},[h,e,n,v,u]),jsx("span",{ref:p,className:m(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:R}),a]})})});ay.displayName="Counter";var sy=j.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:u},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=j.useState(""),[b,v]=j.useState(0),[R,w]=j.useState(false),[x,C]=j.useState(false),y=j.useRef(null),M=useInView(y,{once:true}),[T,E]=j.useState(!l);return j.useEffect(()=>{if(l&&M){let N=setTimeout(()=>E(true),n*1e3);return ()=>clearTimeout(N)}},[l,M,n]),j.useEffect(()=>{if(!T||x)return;let N=p[b],k;return R?g.length>0?k=setTimeout(()=>{h(g.slice(0,-1));},i):(w(false),v(P=>(P+1)%p.length)):g.length<N.length?k=setTimeout(()=>{h(N.slice(0,g.length+1));},t):b<p.length-1||s?k=setTimeout(()=>{w(true);},r):(C(true),u?.()),()=>clearTimeout(k)},[T,g,b,R,x,p,t,i,r,s,u]),jsxs("span",{ref:y,className:m(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:m("ml-0.5",d),children:a})]})});sy.displayName="Typewriter";var iy=j.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=j.useRef(null),d=useInView(c,{once:true,amount:.5}),u=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:m("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:u?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,R)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&R<p.length-1&&"\xA0"]},R))})})});iy.displayName="TextReveal";var ly=j.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=j.useState(0);j.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(u=>(u+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:m("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])})})});ly.displayName="WordRotate";var my=j.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:u=[.4,0,.2,1]},f)=>{let p=j.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:u}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:m(i),children:e})})});my.displayName="ScrollReveal";var py=j.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}),u=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?u: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:m("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(_P,{progress:f,position:e})]})});py.displayName="ScrollProgress";var _P=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=j.useState(0);return j.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:m("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,"%"]})},fy=j.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=j.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}),u=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:m("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:u,y:f},children:e})})});fy.displayName="Parallax";var vy=j.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 u={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:m("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(${u[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 W from'react';import {createContext,useContext,useCallback,useState,us
|
|
|
69
69
|
0% { transform: translateY(-100%); }
|
|
70
70
|
100% { transform: translateY(100%); }
|
|
71
71
|
}
|
|
72
|
-
`})]})});vy.displayName="Shimmer";var YP={sm:24,md:40,lg:56,xl:80},XP={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"}},hy=W.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=YP[t],d=XP[n],u={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:m(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:u,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?.()})]})});hy.displayName="Checkmark";var Vo={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},xy=W.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=W.useCallback(()=>{let i={...Vo,...n};Io(i),o?.();},[n,o]);return W.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});xy.displayName="Confetti";var qP=()=>{let e=W.useCallback(r=>{let o={...Vo,...r};Io(o);},[]),t=W.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Io({...Vo,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Io({...Vo,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=W.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Io({...Vo,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Io({...Vo,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},yy=W.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:m("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:m("rounded-[inherit]",s),style:l,children:e})});yy.displayName="Glow";var by=(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}),Ry=W.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]=W.useState([]);return W.useEffect(()=>{let d=Array.from({length:t},()=>by(r,o));c(d);let u=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=by(r,o),p});},a*500);return ()=>clearInterval(u)},[t,r,o,a]),jsxs("div",{ref:i,className:m("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))]})});Ry.displayName="Sparkles";var wy=W.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:m("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));wy.displayName="H1";var Cy=W.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:m("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));Cy.displayName="H2";var Ty=W.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:m("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Ty.displayName="H3";var My=W.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:m("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));My.displayName="H4";var Ny=W.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Ny.displayName="Paragraph";var Ey=W.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:m("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Ey.displayName="Blockquote";var ky=W.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:m("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));ky.displayName="InlineCode";var Py=W.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("text-xl text-muted-foreground",e),...n,children:t}));Py.displayName="Lead";var Ly=W.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("text-lg font-semibold",e),...n,children:t}));Ly.displayName="Large";var Sy=W.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:m("text-sm font-medium leading-none",e),...n,children:t}));Sy.displayName="Small";var Dy=W.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("text-sm text-muted-foreground",e),...n,children:t}));Dy.displayName="Muted";var Hy=W.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:m("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));Hy.displayName="UL";function Ao(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 eL(){return Ao("(max-width: 767px)")}function tL(){return Ao("(min-width: 768px) and (max-width: 1023px)")}function nL(){return Ao("(min-width: 1024px)")}function rL(){return Ao("(prefers-color-scheme: dark)")?"dark":"light"}function oL(){return Ao("(prefers-reduced-motion: reduce)")}function Ma(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 cL(){let{width:e}=Ma();return e}function dL(){let{height:e}=Ma();return e}function uL(e){let{width:t}=Ma();return t>=e}function mL(){let{width:e}=Ma();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function gL(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 vL(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 yL(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function RL(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 wL(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 ML(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 NL(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 kL(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 PL(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 LL(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 SL(){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 Vy(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 Ay(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 DL(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=Vy(e);useEffect(()=>{if(!r)return;let c=u=>{Ay(u,l)&&(o&&u.preventDefault(),a&&u.stopPropagation(),i.current(u));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function HL(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:Vy(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:u,handler:f}of i)if(Ay(d,u)){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 IL(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 VL(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 AL(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 zL(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 OL(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(u=>{a&&(l.current=u,i.current=false,r?.(u),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(u=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(u),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function BL(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 FL(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 KL(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function GL(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 UL(){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 _L(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 WL(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 By=["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 jL(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(By)).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 u=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===u&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),u.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 YL(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(By)).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 u=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===u&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),u.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 XL(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]),u=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",u,{passive:true}),d(),()=>{f.removeEventListener("scroll",u);}},[r,u,d]),o}function qL(){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 _y(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 ZL(e=true){let{lock:t,unlock:n}=_y();useEffect(()=>{e?t():n();},[e,t,n]);}function Yy(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(([u])=>{l({isIntersecting:u.isIntersecting,entry:u}),o&&u.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function JL(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(([u])=>{l({isIntersecting:u.isIntersecting,entry:u}),a&&u.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function eS(e="200px"){let{ref:t,isIntersecting:n}=Yy({rootMargin:e,once:true});return {ref:t,isVisible:n}}function tS(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),u=useRef(e);return u.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{u.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 nS(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,u=useRef(t);u.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{u.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 rS(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 u,f;n==="border-box"&&d.borderBoxSize?.[0]?(u=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(u=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(u=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:u,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 u=c.getBoundingClientRect();return s({width:u.width,height:u.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function oS(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 u,f;r==="border-box"&&d.borderBoxSize?.[0]?(u=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(u=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(u=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:u,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 u=c.getBoundingClientRect();return s({width:u.width,height:u.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function aS(){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 Qy(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,u=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():u();},[d,u,f]),g=useCallback(v=>{v?u():f();},[u,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:u,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,u,f,p,g,h,b])}function lS(e){return Qy({...e,defaultOpen:true})}function cS(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function dS(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 uS(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 pS(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]),u=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:u,isMin:f,isMax:p}),[s,l,c,d,u,f,p])}function fS(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function gS(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function bS(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function vS(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 yS(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(y=>[...y,C]);},[]),a=useCallback(C=>{n(y=>[...y,...C]);},[]),s=useCallback((C,y)=>{n(M=>{let T=[...M];return T.splice(C,0,y),T});},[]),i=useCallback((C,y)=>{n(M=>{let T=[...M];return T[C]=y,T});},[]),l=useCallback(C=>{n(y=>y.filter((M,T)=>T!==C));},[]),c=useCallback(C=>{n(y=>{let M=y.indexOf(C);return M===-1?y:y.filter((T,E)=>E!==M)});},[]),d=useCallback(C=>{n(y=>y.filter(M=>!C(M)));},[]),u=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[0],y.slice(1))),C},[]),f=useCallback(C=>{n(y=>[C,...y]);},[]),p=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[y.length-1],y.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,y)=>{n(M=>{let T=[...M],[E]=T.splice(C,1);return T.splice(y,0,E),T});},[]),v=useCallback((C,y)=>{n(M=>{let T=[...M];return [T[C],T[y]]=[T[y],T[C]],T});},[]),R=useCallback(C=>t.filter(C),[t]),w=useCallback(C=>t.find(C),[t]),x=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:u,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:R,find:w,includes:x,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,u,f,p,g,h,b,v,R,w,x])}function RS(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]),u=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:u,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,u,f])}function wS(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,u)=>{n(f=>({...f,[d]:u}));},[]),a=useCallback(d=>{n(u=>({...u,...d}));},[]),s=useCallback(d=>{n(u=>{let{[d]:f,...p}=u;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 oR(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(u=>{n(f=>{let p=new Set(f);return p.add(u),p});},[]),o=useCallback(u=>{n(f=>{let p=new Set(f);return u.forEach(g=>p.add(g)),p});},[]),a=useCallback(u=>{n(f=>{let p=new Set(f);return p.delete(u),p});},[]),s=useCallback(u=>t.has(u),[t]),i=useCallback(u=>{n(f=>{let p=new Set(f);return p.has(u)?p.delete(u):p.add(u),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 TS(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=oR(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 MS(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 NS(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 lR(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 kS(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(u){c=u instanceof Error?u:new Error(String(u)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...lR(s,false),retryCount:r}}var uR=new Map,PS=300*1e3;function LS(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}),u=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=uR.get(h);if(b&&Date.now()-b.timestamp<PS){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}u.current&&u.current.abort(),u.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:u.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let R=await v.json(),w=o?o(R):R;uR.set(h,{data:w,timestamp:Date.now()}),f.current&&d({data:w,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let R=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:R,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{u.current&&u.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 SS(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(),u=n?n(d):d;return a({data:u,error:null,isLoading:!1,isSuccess:!0,isError:!1}),u}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 Ci(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 HS(e,t){let[n,r]=useState(false);Ci(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 IS(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;Ci(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let u=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:u,pause:f,reset:p}}function VS(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);Ci(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),u=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:u}}function fR(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 AS(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 zS(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function OS(e,t=true){let[n,r]=useState(false);return fR(()=>{r(true);},t?e:null),n}function BS(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),u=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let R=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),u.current++,i(u.current),l.current(R,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 FS(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=u=>{i.current===null&&(i.current=u);let f=u-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 KS(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=u=>{c.current===null&&(c.current=u);let f=Math.min((u-c.current)/1e3,.064);c.current=u;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 hR=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function GS(e,t={}){let{events:n=hR,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 $S(e,t,n,r={}){let{events:o=hR,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),u=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 u(),o.forEach(f=>{window.addEventListener(f,u);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,u);});}},[s,o,u]),i}function yR(){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 WS(){return yR()==="visible"}function jS(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function YS(){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 XS(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 TR(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 JS(){let e=useRef(null),t=TR(e);return {ref:e,...t}}function nD(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}));},[]),u=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&&u(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,u,c,d,r,o,a]),{...s,getCurrentPosition:u,isSupported:l}}function rD(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 oD(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 aD(){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 sD(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 u=d instanceof Error?d:new Error(String(d));return o(u),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 lD(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,u]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{u(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 R=new SpeechSynthesisUtterance(v);R.voice=t,R.rate=n,R.pitch=r,R.volume=o,R.lang=a,R.onstart=()=>i(true),R.onend=()=>{i(false),c(false);},R.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(R);},[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 cD(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,u]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let w=new p;return w.lang=t,w.continuous=n,w.interimResults=r,w.onstart=()=>{a(true),u(null);},w.onend=()=>{a(false);},w.onerror=x=>{u(new Error(x.error)),a(false);},w.onresult=x=>{let C="",y="";for(let M=x.resultIndex;M<x.results.length;M++){let T=x.results[M];T.isFinal?y+=T[0].transcript:C+=T[0].transcript;}y&&i(M=>M+y),c(C);},f.current=w,()=>{w.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();},[]),R=useCallback(()=>{i(""),c(""),u(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:R}}export{Zu as Accordion,Qu as AccordionItem,kh as ActionBar,Ph as ActionBarButton,fh as ActionGroup,Bx as ActionSheet,VR as Alert,zR as AlertDescription,AR as AlertTitle,wv as AreaChart,Tm as AspectRatio,Zg as Autocomplete,Cr as Avatar,Tr as AvatarFallback,Kp as AvatarGroup,eo as AvatarImage,vg as BackTop,FR as Badge,Lx as Banner,yv as BarChart,Zh as BatteryMeter,Ey as Blockquote,Ax as BottomNavigation,ey as Bounce,gm as Breadcrumb,Rm as BreadcrumbEllipsis,vm as BreadcrumbItem,hm as BreadcrumbLink,bm as BreadcrumbList,xm as BreadcrumbPage,ym as BreadcrumbSeparator,te as Button,uh as ButtonGroup,og as COUNTRIES,so as Calendar,gd as Card,xd as CardContent,hd as CardDescription,yd as CardFooter,bd as CardHeader,vd as CardTitle,Lv as Carousel,Sv as CarouselContent,Dv as CarouselItem,Yl as CarouselNext,jl as CarouselPrevious,$o as Checkbox,hy as Checkmark,jp as Chip,Jp as CircularProgress,hn as CloseButton,db as Code,Xx as Collapse,om as Collapsible,am as CollapsibleContent,Wi as CollapsibleTrigger,nx as ColorArea,ih as ColorField,Uf as ColorPicker,ax as ColorSlider,na as ColorSwatch,Gf as ColorSwatchPicker,ix as ColorWheel,el as Command,Vw as CommandDialog,kp as CommandEmpty,Pp as CommandGroup,Np as CommandInput,Sp as CommandItem,Ep as CommandList,Lp as CommandSeparator,Dp as CommandShortcut,xy as Confetti,Al as ConfirmDialog,Nu as ContextMenu,Au as ContextMenuCheckboxItem,Du as ContextMenuContent,ku as ContextMenuGroup,Vu as ContextMenuItem,Ou as ContextMenuLabel,Pu as ContextMenuPortal,Su as ContextMenuRadioGroup,zu as ContextMenuRadioItem,Bu as ContextMenuSeparator,Fu as ContextMenuShortcut,Lu as ContextMenuSub,Iu as ContextMenuSubContent,Hu as ContextMenuSubTrigger,Eu as ContextMenuTrigger,Bh as ContextualHelp,gv as CopyButton,ay as Counter,Xf as CurrencyInput,fa as DEFAULT_COLORS,ww as DataTable,nh as DateField,tg as DateInput,Ap as DatePicker,Ab as DateRangePicker,kl as DefaultErrorFallback,Aa as Dialog,Td as DialogClose,za as DialogContent,kd as DialogDescription,Nd as DialogFooter,Md as DialogHeader,Si as DialogOverlay,Li as DialogPortal,Ed as DialogTitle,Cd as DialogTrigger,qh as DiskUsageMeter,qi as Drawer,Ym as DrawerBody,Qm as DrawerClose,Wm as DrawerContent,Zm as DrawerDescription,Xm as DrawerFooter,ap as DrawerGroup,sp as DrawerGroupLabel,jm as DrawerHeader,ip as DrawerInset,tp as DrawerMenu,op as DrawerMenuButton,np as DrawerMenuItem,gw as DrawerProvider,ep as DrawerSeparator,Um as DrawerSidebar,qm as DrawerTitle,Jm as DrawerToggle,_m as DrawerTrigger,no as Dropdown,oo as DropdownContent,Jd as DropdownGroup,jn as DropdownItem,R0 as DropdownLabel,Ai as DropdownSection,Zd as DropdownSeparator,Qd as DropdownShortcut,eu as DropdownSub,nu as DropdownSubContent,tu as DropdownSubTrigger,ro as DropdownTrigger,ql as EMOJIS,$s as EMOJI_CATEGORIES,Iv as EmojiPicker,pf as EmptyState,gM as ErrorBoundary,qx as Expand,NP as FAB,Wx as Fade,yl as FieldContext,Of as FileUpload,Qx as Flip,Rc as FloatingActionButton,Qg as Form,xl as FormContext,nb as FormControl,rb as FormDescription,Jg as FormField,eb as FormItem,tb as FormLabel,ob as FormMessage,hv as FullCalendar,yy as Glow,jh as GridList,wy as H1,Cy as H2,Ty as H3,My as H4,um as HoverCard,pm as HoverCardContent,mm as HoverCardTrigger,wh as IllustratedMessage,pb as Image,Bv as ImageCropper,zl as ImageViewer,av as ImageViewerTrigger,iv as Indicator,lv as IndicatorWrapper,Kb as InfiniteScroll,Nh as InlineAlert,ky as InlineCode,Oa as Input,nf as InputOTP,rf as InputOTPGroup,af as InputOTPSeparator,of as InputOTPSlot,Ev as KanbanBoard,pv as Kbd,wr as Label,dx as LabeledValue,mx as LabeledValueGroup,Ly as Large,Py as Lead,xv as LineChart,gg as Link,TC as List,xf as ListItem,yf as ListItemText,Ih as ListView,xb as Listbox,yb as ListboxItem,Ib as Loading,Eb as LoadingOverlay,cl as MASK_PRESETS,Qf as MaskedInput,wg as Menubar,Hg as MenubarCheckboxItem,Sg as MenubarContent,Tg as MenubarGroup,Dg as MenubarItem,Vg as MenubarLabel,Cg as MenubarMenu,Mg as MenubarPortal,Eg as MenubarRadioGroup,Ig as MenubarRadioItem,Ag as MenubarSeparator,zg as MenubarShortcut,Ng as MenubarSub,Lg as MenubarSubContent,Pg as MenubarSubTrigger,kg as MenubarTrigger,ai as Meter,Wb as Modal,Zb as ModalBody,Vl as ModalClose,Xb as ModalContent,ev as ModalDescription,Qb as ModalFooter,qb as ModalHeader,Il as ModalOverlay,Hl as ModalPortal,jb as ModalRoot,Jb as ModalTitle,Yb as ModalTrigger,Dy as Muted,Pb as NProgress,lg as Navbar,cg as NavbarBrand,dg as NavbarContent,ug as NavbarItem,mg as NavbarLink,Lm as NavigationMenu,Vm as NavigationMenuContent,Om as NavigationMenuIndicator,Dm as NavigationMenuItem,zm as NavigationMenuLink,Sm as NavigationMenuList,Im as NavigationMenuTrigger,Xi as NavigationMenuViewport,Mx as NotificationCenter,Ex as NotificationCenterContent,mP as NotificationCenterProvider,Nx as NotificationCenterTrigger,xc as NotificationItem,kx as NotificationList,Zv as NumberField,Ip as NumberInput,yp as Pagination,Rp as PaginationContent,Mp as PaginationEllipsis,wp as PaginationItem,ss as PaginationLink,Tp as PaginationNext,Cp as PaginationPrevious,Ny as Paragraph,fy as Parallax,Hp as PasswordInput,ag as PhoneInput,Rv as PieChart,oy as Pop,nt as Popover,Wa as PopoverAnchor,rt as PopoverContent,ht as PopoverTrigger,ns as Progress,_x as PullToRefresh,ny as Pulse,Kv as QRCode,Gu as RadioGroup,$u as RadioGroupItem,Ah as RangeSlider,$p as Rating,sC as ResizableHandle,aC as ResizablePanel,oC as ResizablePanelGroup,Av as RichTextEditor,Jx as Ripple,Zx as Rotate,Yx as Scale,Ue as ScrollArea,py as ScrollProgress,my as ScrollReveal,uv as ScrollShadow,vx as SearchBar,eh as SearchField,Hf as SegmentedControl,If as SegmentedControlItem,Yd as Select,Gn as Separator,ty as Shake,fu as Sheet,bu as SheetClose,xu as SheetContent,Cu as SheetDescription,Ru as SheetFooter,yu as SheetHeader,vu as SheetOverlay,Ki as SheetPortal,wu as SheetTitle,gu as SheetTrigger,vy as Shimmer,$a as Skeleton,jx as Slide,Ja as Slider,Sy as Small,mb as Snippet,nM as SortableList,Ry as Sparkles,Ia as Spinner,Rx as SpotlightSearch,bf as StatCard,xh as StatusLight,Kg as Step,Bg as Steps,Gx as SwipeActions,Hd as Switch,cp as Table,up as TableBody,bp as TableCaption,gp as TableCell,mp as TableFooter,fp as TableHead,dp as TableHeader,pp as TableRow,iu as Tabs,du as TabsContent,lu as TabsList,cu as TabsTrigger,Gh as TagGroup,df as TagInput,GR as TextBadge,jv as TextField,iy as TextReveal,Id as Textarea,Gv as ThemeProvider,$v as ThemeToggle,oh as TimeField,Wf as TimeInput,zb as TimePicker,Tf as Timeline,Ef as TimelineContent,Nf as TimelineItem,kf as TimelineOpposite,S0 as Toaster,Uu as Toggle,Wu as ToggleGroup,ju as ToggleGroupItem,Un as Tooltip,Wn as TooltipContent,$n as TooltipProvider,_n as TooltipTrigger,Yg as Tree,sy as Typewriter,Hy as UL,ib as User,yM as VirtualList,ry as Wiggle,ly as WordRotate,Eh as actionBarVariants,ph as actionGroupVariants,Ox as actionSheetItemVariants,HR as alertVariants,fs as applyMask,qg as autocompleteInputVariants,Fp as avatarGroupVariants,bg as backTopVariants,OR as badgeIndicatorVariants,Px as bannerVariants,Vx as bottomNavigationVariants,ch as buttonGroupVariants,tn as buttonVariants,C0 as calculatePasswordStrength,fd as cardVariants,kv as carouselVariants,pa as chartContainerVariants,Wp as chipVariants,Qp as circularProgressVariants,Gm as closeButtonVariants,m as cn,cb as codeVariants,Qh as colorAreaVariants,sh as colorFieldVariants,ox as colorSliderVariants,Kf as colorSwatchPickerVariants,Ff as colorSwatchVariants,sx as colorWheelVariants,rv as confirmDialogIconVariants,pc as contextualHelpTriggerVariants,fv as copyButtonVariants,jf as currencyInputVariants,th as dateFieldVariants,Jf as dateInputVariants,uu as defaultPasswordRequirements,rp as drawerMenuButtonVariants,Hv as emojiPickerVariants,mf as emptyStateVariants,Ra as fabVariants,Vf as fileUploadVariants,ll as formatCurrency,bs as formatDate,ms as formatFileSize,hs as formatPhoneNumber,vv as fullCalendarVariants,Af as getFileIcon,Zf as getMaskPlaceholder,T0 as getPasswordStrengthColor,M0 as getPasswordStrengthLabel,Wh as gridListItemVariants,_h as gridListVariants,ex as hexToRgb,ii as hsvToRgb,Rh as illustratedMessageVariants,Ov as imageCropperVariants,Tl as imageVariants,sv as indicatorVariants,Sl as infiniteScrollLoaderVariants,Fb as infiniteScrollVariants,Mh as inlineAlertVariants,tf as inputOTPVariants,_v as inputSizeVariants,Mv as kanbanBoardVariants,_l as kanbanCardVariants,Nv as kanbanColumnVariants,mv as kbdVariants,Wv as labelSizeVariants,ux as labeledValueGroupVariants,cx as labeledValueVariants,fg as linkVariants,hf as listItemVariants,ol as listVariants,Hh as listViewItemVariants,Dh as listViewVariants,vb as listboxItemVariants,bb as listboxVariants,Nb as loadingOverlayVariants,Hb as loadingVariants,qf as maskedInputVariants,Xh as meterVariants,Dl as modalContentVariants,ig as navbarVariants,Am as navigationMenuLinkStyle,Hm as navigationMenuTriggerStyle,kb as nprogressVariants,qv as numberFieldVariants,eg as parseDate,Yf as parseFormattedValue,rg as phoneInputVariants,Ux as pullToRefreshVariants,ec as qrCodeVariants,Vh as rangeSliderVariants,Gp as ratingVariants,tx as rgbToHex,Jh as rgbToHsv,Vv as richTextEditorVariants,dv as scrollShadowVariants,bx as searchBarVariants,Jv as searchFieldVariants,Sf as segmentedControlItemVariants,Lf as segmentedControlVariants,jd as selectVariants,hu as sheetVariants,Ad as skeletonVariants,ub as snippetVariants,Cb as sortableItemVariants,wb as sortableListVariants,ud as spinnerVariants,gf as statCardVariants,hh as statusLightVariants,Fg as stepVariants,Og as stepsVariants,Cc as swipeActionVariants,Kx as swipeActionsVariants,Fa as switchColors,fc as tagGroupItemVariants,Kh as tagGroupVariants,cf as tagVariants,KR as textBadgeVariants,Uv as textFieldVariants,HE as themeToggleVariants,rh as timeFieldVariants,_f as timeInputVariants,Mf as timelineItemVariants,Cf as timelineVariants,Za as toggleVariants,Ug as treeItemVariants,$g as treeVariants,dl as unmask,FS as useAnimatedValue,lR as useAsync,kS as useAsyncRetry,ZL as useBodyScrollLock,uS as useBooleanToggle,uL as useBreakpoint,mL as useBreakpoints,nk as useButtonGroup,Wl as useCarousel,kL as useClickOutside,PL as useClickOutsideMultiple,qP as useConfetti,IM as useConfirmDialog,SL as useCopy,LL as useCopyToClipboard,IS as useCountdown,pS as useCounter,dS as useCycle,yL as useDebounce,RL as useDebouncedCallback,wL as useDebouncedCallbackWithControls,zS as useDelayedValue,Qy as useDisclosure,lS as useDisclosureOpen,rD as useDistance,WS as useDocumentIsVisible,yR as useDocumentVisibility,jS as useDocumentVisibilityCallback,iw as useDrawer,aS as useElementSize,VL as useEventListener,AL as useEventListenerRef,LS as useFetch,Ts as useFieldContext,jL as useFocusTrap,YL as useFocusTrapRef,Rl as useFormContext,TR as useFullscreen,JS as useFullscreenRef,nD as useGeolocation,DL as useHotkeys,HL as useHotkeysMap,BL as useHover,GL as useHoverDelay,KL as useHoverProps,FL as useHoverRef,GS as useIdle,$S as useIdleCallback,fS as useIncrementCounter,Yy as useIntersectionObserver,JL as useIntersectionObserverRef,Ci as useInterval,HS as useIntervalControls,nL as useIsDesktop,eL as useIsMobile,tL as useIsTablet,zL as useKeyPress,IL as useKeyPressed,eN as useKeyboardShortcut,eS as useLazyLoad,yS as useList,gL as useLocalStorage,OL as useLongPress,RS as useMap,sD as useMediaPermission,Ao as useMediaQuery,UL as useMouse,_L as useMouseElement,WL as useMouseElementRef,SS as useMutation,tS as useMutationObserver,nS as useMutationObserverRef,ci as useNotificationCenter,aD as useNotificationPermission,YS as useOnlineStatus,XS as useOnlineStatusCallback,oD as usePermission,rL as usePrefersColorScheme,oL as usePrefersReducedMotion,gS as usePrevious,vS as usePreviousDistinct,bS as usePreviousWithInitial,MS as useQueue,BS as useRafLoop,wS as useRecord,rS as useResizeObserver,oS as useResizeObserverRef,_y as useScrollLock,XL as useScrollPosition,TS as useSelection,vL as useSessionStorage,oR as useSet,cD as useSpeechRecognition,lD as useSpeechSynthesis,oP as useSpotlight,KS as useSpringValue,NS as useStack,ML as useThrottle,NL as useThrottledCallback,fR as useTimeout,AS as useTimeoutControls,OS as useTimeoutFlag,VS as useTimer,cS as useToggle,dL as useWindowHeight,qL as useWindowScroll,Ma as useWindowSize,cL as useWindowWidth,sb as userVariants,zf as validateFile,GT as validators,Ob as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
72
|
+
`})]})});vy.displayName="Shimmer";var YP={sm:24,md:40,lg:56,xl:80},XP={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"}},hy=j.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=YP[t],d=XP[n],u={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:m(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:u,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?.()})]})});hy.displayName="Checkmark";var Vo={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},xy=j.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=j.useCallback(()=>{let i={...Vo,...n};Io(i),o?.();},[n,o]);return j.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});xy.displayName="Confetti";var qP=()=>{let e=j.useCallback(r=>{let o={...Vo,...r};Io(o);},[]),t=j.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Io({...Vo,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Io({...Vo,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=j.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Io({...Vo,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Io({...Vo,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},yy=j.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:m("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:m("rounded-[inherit]",s),style:l,children:e})});yy.displayName="Glow";var by=(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}),Ry=j.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]=j.useState([]);return j.useEffect(()=>{let d=Array.from({length:t},()=>by(r,o));c(d);let u=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=by(r,o),p});},a*500);return ()=>clearInterval(u)},[t,r,o,a]),jsxs("div",{ref:i,className:m("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))]})});Ry.displayName="Sparkles";var wy=j.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:m("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));wy.displayName="H1";var Cy=j.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:m("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));Cy.displayName="H2";var Ty=j.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:m("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Ty.displayName="H3";var My=j.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:m("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));My.displayName="H4";var Ny=j.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Ny.displayName="Paragraph";var Ey=j.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:m("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Ey.displayName="Blockquote";var ky=j.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:m("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));ky.displayName="InlineCode";var Py=j.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("text-xl text-muted-foreground",e),...n,children:t}));Py.displayName="Lead";var Ly=j.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("text-lg font-semibold",e),...n,children:t}));Ly.displayName="Large";var Sy=j.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:m("text-sm font-medium leading-none",e),...n,children:t}));Sy.displayName="Small";var Dy=j.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("text-sm text-muted-foreground",e),...n,children:t}));Dy.displayName="Muted";var Hy=j.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:m("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));Hy.displayName="UL";function Ao(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 eL(){return Ao("(max-width: 767px)")}function tL(){return Ao("(min-width: 768px) and (max-width: 1023px)")}function nL(){return Ao("(min-width: 1024px)")}function rL(){return Ao("(prefers-color-scheme: dark)")?"dark":"light"}function oL(){return Ao("(prefers-reduced-motion: reduce)")}function Ma(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 cL(){let{width:e}=Ma();return e}function dL(){let{height:e}=Ma();return e}function uL(e){let{width:t}=Ma();return t>=e}function mL(){let{width:e}=Ma();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function gL(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 vL(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 yL(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function RL(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 wL(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 ML(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 NL(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 kL(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 PL(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 LL(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 SL(){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 Vy(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 Ay(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 DL(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=Vy(e);useEffect(()=>{if(!r)return;let c=u=>{Ay(u,l)&&(o&&u.preventDefault(),a&&u.stopPropagation(),i.current(u));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function HL(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:Vy(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:u,handler:f}of i)if(Ay(d,u)){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 IL(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 VL(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 AL(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 zL(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 OL(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(u=>{a&&(l.current=u,i.current=false,r?.(u),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(u=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(u),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function BL(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 FL(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 KL(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function GL(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 UL(){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 WL(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 jL(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 By=["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 _L(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(By)).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 u=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===u&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),u.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 YL(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(By)).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 u=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===u&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),u.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 XL(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]),u=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",u,{passive:true}),d(),()=>{f.removeEventListener("scroll",u);}},[r,u,d]),o}function qL(){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 Wy(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 ZL(e=true){let{lock:t,unlock:n}=Wy();useEffect(()=>{e?t():n();},[e,t,n]);}function Yy(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(([u])=>{l({isIntersecting:u.isIntersecting,entry:u}),o&&u.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function JL(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(([u])=>{l({isIntersecting:u.isIntersecting,entry:u}),a&&u.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function eS(e="200px"){let{ref:t,isIntersecting:n}=Yy({rootMargin:e,once:true});return {ref:t,isVisible:n}}function tS(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),u=useRef(e);return u.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{u.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 nS(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,u=useRef(t);u.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{u.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 rS(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 u,f;n==="border-box"&&d.borderBoxSize?.[0]?(u=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(u=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(u=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:u,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 u=c.getBoundingClientRect();return s({width:u.width,height:u.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function oS(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 u,f;r==="border-box"&&d.borderBoxSize?.[0]?(u=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(u=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(u=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:u,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 u=c.getBoundingClientRect();return s({width:u.width,height:u.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function aS(){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 Qy(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,u=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():u();},[d,u,f]),g=useCallback(v=>{v?u():f();},[u,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:u,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,u,f,p,g,h,b])}function lS(e){return Qy({...e,defaultOpen:true})}function cS(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function dS(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 uS(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 pS(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]),u=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:u,isMin:f,isMax:p}),[s,l,c,d,u,f,p])}function fS(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function gS(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function bS(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function vS(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 yS(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(y=>[...y,C]);},[]),a=useCallback(C=>{n(y=>[...y,...C]);},[]),s=useCallback((C,y)=>{n(M=>{let T=[...M];return T.splice(C,0,y),T});},[]),i=useCallback((C,y)=>{n(M=>{let T=[...M];return T[C]=y,T});},[]),l=useCallback(C=>{n(y=>y.filter((M,T)=>T!==C));},[]),c=useCallback(C=>{n(y=>{let M=y.indexOf(C);return M===-1?y:y.filter((T,E)=>E!==M)});},[]),d=useCallback(C=>{n(y=>y.filter(M=>!C(M)));},[]),u=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[0],y.slice(1))),C},[]),f=useCallback(C=>{n(y=>[C,...y]);},[]),p=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[y.length-1],y.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,y)=>{n(M=>{let T=[...M],[E]=T.splice(C,1);return T.splice(y,0,E),T});},[]),v=useCallback((C,y)=>{n(M=>{let T=[...M];return [T[C],T[y]]=[T[y],T[C]],T});},[]),R=useCallback(C=>t.filter(C),[t]),w=useCallback(C=>t.find(C),[t]),x=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:u,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:R,find:w,includes:x,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,u,f,p,g,h,b,v,R,w,x])}function RS(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]),u=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:u,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,u,f])}function wS(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,u)=>{n(f=>({...f,[d]:u}));},[]),a=useCallback(d=>{n(u=>({...u,...d}));},[]),s=useCallback(d=>{n(u=>{let{[d]:f,...p}=u;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 oR(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(u=>{n(f=>{let p=new Set(f);return p.add(u),p});},[]),o=useCallback(u=>{n(f=>{let p=new Set(f);return u.forEach(g=>p.add(g)),p});},[]),a=useCallback(u=>{n(f=>{let p=new Set(f);return p.delete(u),p});},[]),s=useCallback(u=>t.has(u),[t]),i=useCallback(u=>{n(f=>{let p=new Set(f);return p.has(u)?p.delete(u):p.add(u),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 TS(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=oR(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 MS(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 NS(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 lR(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 kS(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(u){c=u instanceof Error?u:new Error(String(u)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...lR(s,false),retryCount:r}}var uR=new Map,PS=300*1e3;function LS(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}),u=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=uR.get(h);if(b&&Date.now()-b.timestamp<PS){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}u.current&&u.current.abort(),u.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:u.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let R=await v.json(),w=o?o(R):R;uR.set(h,{data:w,timestamp:Date.now()}),f.current&&d({data:w,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let R=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:R,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{u.current&&u.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 SS(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(),u=n?n(d):d;return a({data:u,error:null,isLoading:!1,isSuccess:!0,isError:!1}),u}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 Ci(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 HS(e,t){let[n,r]=useState(false);Ci(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 IS(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;Ci(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let u=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:u,pause:f,reset:p}}function VS(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);Ci(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),u=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:u}}function fR(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 AS(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 zS(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function OS(e,t=true){let[n,r]=useState(false);return fR(()=>{r(true);},t?e:null),n}function BS(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),u=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let R=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),u.current++,i(u.current),l.current(R,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 FS(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=u=>{i.current===null&&(i.current=u);let f=u-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 KS(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=u=>{c.current===null&&(c.current=u);let f=Math.min((u-c.current)/1e3,.064);c.current=u;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 hR=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function GS(e,t={}){let{events:n=hR,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 $S(e,t,n,r={}){let{events:o=hR,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),u=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 u(),o.forEach(f=>{window.addEventListener(f,u);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,u);});}},[s,o,u]),i}function yR(){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 jS(){return yR()==="visible"}function _S(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function YS(){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 XS(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 TR(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 JS(){let e=useRef(null),t=TR(e);return {ref:e,...t}}function nD(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}));},[]),u=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&&u(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,u,c,d,r,o,a]),{...s,getCurrentPosition:u,isSupported:l}}function rD(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 oD(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 aD(){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 sD(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 u=d instanceof Error?d:new Error(String(d));return o(u),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 lD(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,u]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{u(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 R=new SpeechSynthesisUtterance(v);R.voice=t,R.rate=n,R.pitch=r,R.volume=o,R.lang=a,R.onstart=()=>i(true),R.onend=()=>{i(false),c(false);},R.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(R);},[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 cD(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,u]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let w=new p;return w.lang=t,w.continuous=n,w.interimResults=r,w.onstart=()=>{a(true),u(null);},w.onend=()=>{a(false);},w.onerror=x=>{u(new Error(x.error)),a(false);},w.onresult=x=>{let C="",y="";for(let M=x.resultIndex;M<x.results.length;M++){let T=x.results[M];T.isFinal?y+=T[0].transcript:C+=T[0].transcript;}y&&i(M=>M+y),c(C);},f.current=w,()=>{w.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();},[]),R=useCallback(()=>{i(""),c(""),u(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:R}}export{Zu as Accordion,Qu as AccordionItem,kh as ActionBar,Ph as ActionBarButton,fh as ActionGroup,Bx as ActionSheet,VR as Alert,zR as AlertDescription,AR as AlertTitle,wv as AreaChart,Tm as AspectRatio,Zg as Autocomplete,Cr as Avatar,Tr as AvatarFallback,Kp as AvatarGroup,eo as AvatarImage,vg as BackTop,FR as Badge,Lx as Banner,yv as BarChart,Zh as BatteryMeter,Ey as Blockquote,Ax as BottomNavigation,ey as Bounce,gm as Breadcrumb,Rm as BreadcrumbEllipsis,vm as BreadcrumbItem,hm as BreadcrumbLink,bm as BreadcrumbList,xm as BreadcrumbPage,ym as BreadcrumbSeparator,te as Button,uh as ButtonGroup,og as COUNTRIES,so as Calendar,gd as Card,xd as CardContent,hd as CardDescription,yd as CardFooter,bd as CardHeader,vd as CardTitle,Lv as Carousel,Sv as CarouselContent,Dv as CarouselItem,Yl as CarouselNext,_l as CarouselPrevious,$o as Checkbox,hy as Checkmark,_p as Chip,Jp as CircularProgress,hn as CloseButton,db as Code,Xx as Collapse,om as Collapsible,am as CollapsibleContent,ji as CollapsibleTrigger,nx as ColorArea,ih as ColorField,Uf as ColorPicker,ax as ColorSlider,na as ColorSwatch,Gf as ColorSwatchPicker,ix as ColorWheel,el as Command,Vw as CommandDialog,kp as CommandEmpty,Pp as CommandGroup,Np as CommandInput,Sp as CommandItem,Ep as CommandList,Lp as CommandSeparator,Dp as CommandShortcut,xy as Confetti,Al as ConfirmDialog,Nu as ContextMenu,Au as ContextMenuCheckboxItem,Du as ContextMenuContent,ku as ContextMenuGroup,Vu as ContextMenuItem,Ou as ContextMenuLabel,Pu as ContextMenuPortal,Su as ContextMenuRadioGroup,zu as ContextMenuRadioItem,Bu as ContextMenuSeparator,Fu as ContextMenuShortcut,Lu as ContextMenuSub,Iu as ContextMenuSubContent,Hu as ContextMenuSubTrigger,Eu as ContextMenuTrigger,Bh as ContextualHelp,gv as CopyButton,ay as Counter,Xf as CurrencyInput,fa as DEFAULT_COLORS,ww as DataTable,nh as DateField,tg as DateInput,Ap as DatePicker,Ab as DateRangePicker,kl as DefaultErrorFallback,Aa as Dialog,Td as DialogClose,za as DialogContent,kd as DialogDescription,Nd as DialogFooter,Md as DialogHeader,Si as DialogOverlay,Li as DialogPortal,Ed as DialogTitle,Cd as DialogTrigger,qh as DiskUsageMeter,qi as Drawer,Ym as DrawerBody,Qm as DrawerClose,jm as DrawerContent,Zm as DrawerDescription,Xm as DrawerFooter,ap as DrawerGroup,sp as DrawerGroupLabel,_m as DrawerHeader,ip as DrawerInset,tp as DrawerMenu,op as DrawerMenuButton,np as DrawerMenuItem,gw as DrawerProvider,ep as DrawerSeparator,Um as DrawerSidebar,qm as DrawerTitle,Jm as DrawerToggle,Wm as DrawerTrigger,no as Dropdown,oo as DropdownContent,Jd as DropdownGroup,_n as DropdownItem,R0 as DropdownLabel,Ai as DropdownSection,Zd as DropdownSeparator,Qd as DropdownShortcut,eu as DropdownSub,nu as DropdownSubContent,tu as DropdownSubTrigger,ro as DropdownTrigger,ql as EMOJIS,$s as EMOJI_CATEGORIES,Iv as EmojiPicker,pf as EmptyState,gM as ErrorBoundary,qx as Expand,NP as FAB,jx as Fade,yl as FieldContext,Of as FileUpload,Qx as Flip,Rc as FloatingActionButton,Qg as Form,xl as FormContext,nb as FormControl,rb as FormDescription,Jg as FormField,eb as FormItem,tb as FormLabel,ob as FormMessage,hv as FullCalendar,yy as Glow,_h as GridList,wy as H1,Cy as H2,Ty as H3,My as H4,um as HoverCard,pm as HoverCardContent,mm as HoverCardTrigger,wh as IllustratedMessage,pb as Image,Bv as ImageCropper,zl as ImageViewer,av as ImageViewerTrigger,iv as Indicator,lv as IndicatorWrapper,Kb as InfiniteScroll,Nh as InlineAlert,ky as InlineCode,Oa as Input,nf as InputOTP,rf as InputOTPGroup,af as InputOTPSeparator,of as InputOTPSlot,Ev as KanbanBoard,pv as Kbd,wr as Label,dx as LabeledValue,mx as LabeledValueGroup,Ly as Large,Py as Lead,xv as LineChart,gg as Link,TC as List,xf as ListItem,yf as ListItemText,Ih as ListView,xb as Listbox,yb as ListboxItem,Ib as Loading,Eb as LoadingOverlay,cl as MASK_PRESETS,Qf as MaskedInput,wg as Menubar,Hg as MenubarCheckboxItem,Sg as MenubarContent,Tg as MenubarGroup,Dg as MenubarItem,Vg as MenubarLabel,Cg as MenubarMenu,Mg as MenubarPortal,Eg as MenubarRadioGroup,Ig as MenubarRadioItem,Ag as MenubarSeparator,zg as MenubarShortcut,Ng as MenubarSub,Lg as MenubarSubContent,Pg as MenubarSubTrigger,kg as MenubarTrigger,ai as Meter,jb as Modal,Zb as ModalBody,Vl as ModalClose,Xb as ModalContent,ev as ModalDescription,Qb as ModalFooter,qb as ModalHeader,Il as ModalOverlay,Hl as ModalPortal,_b as ModalRoot,Jb as ModalTitle,Yb as ModalTrigger,Dy as Muted,Pb as NProgress,lg as Navbar,cg as NavbarBrand,dg as NavbarContent,ug as NavbarItem,mg as NavbarLink,Lm as NavigationMenu,Vm as NavigationMenuContent,Om as NavigationMenuIndicator,Dm as NavigationMenuItem,zm as NavigationMenuLink,Sm as NavigationMenuList,Im as NavigationMenuTrigger,Xi as NavigationMenuViewport,Mx as NotificationCenter,Ex as NotificationCenterContent,mP as NotificationCenterProvider,Nx as NotificationCenterTrigger,xc as NotificationItem,kx as NotificationList,Zv as NumberField,Ip as NumberInput,yp as Pagination,Rp as PaginationContent,Mp as PaginationEllipsis,wp as PaginationItem,ss as PaginationLink,Tp as PaginationNext,Cp as PaginationPrevious,Ny as Paragraph,fy as Parallax,Hp as PasswordInput,ag as PhoneInput,Rv as PieChart,oy as Pop,nt as Popover,ja as PopoverAnchor,rt as PopoverContent,ht as PopoverTrigger,ns as Progress,Wx as PullToRefresh,ny as Pulse,Kv as QRCode,Gu as RadioGroup,$u as RadioGroupItem,Ah as RangeSlider,$p as Rating,sC as ResizableHandle,aC as ResizablePanel,oC as ResizablePanelGroup,Av as RichTextEditor,Jx as Ripple,Zx as Rotate,Yx as Scale,Ue as ScrollArea,py as ScrollProgress,my as ScrollReveal,uv as ScrollShadow,vx as SearchBar,eh as SearchField,Hf as SegmentedControl,If as SegmentedControlItem,Yd as Select,Gn as Separator,ty as Shake,fu as Sheet,bu as SheetClose,xu as SheetContent,Cu as SheetDescription,Ru as SheetFooter,yu as SheetHeader,vu as SheetOverlay,Ki as SheetPortal,wu as SheetTitle,gu as SheetTrigger,vy as Shimmer,$a as Skeleton,_x as Slide,Ja as Slider,Sy as Small,mb as Snippet,nM as SortableList,Ry as Sparkles,Ia as Spinner,Rx as SpotlightSearch,bf as StatCard,xh as StatusLight,Kg as Step,Bg as Steps,Gx as SwipeActions,Hd as Switch,cp as Table,up as TableBody,bp as TableCaption,gp as TableCell,mp as TableFooter,fp as TableHead,dp as TableHeader,pp as TableRow,iu as Tabs,du as TabsContent,lu as TabsList,cu as TabsTrigger,Gh as TagGroup,df as TagInput,GR as TextBadge,_v as TextField,iy as TextReveal,Id as Textarea,Gv as ThemeProvider,$v as ThemeToggle,oh as TimeField,jf as TimeInput,zb as TimePicker,Tf as Timeline,Ef as TimelineContent,Nf as TimelineItem,kf as TimelineOpposite,S0 as Toaster,Uu as Toggle,ju as ToggleGroup,_u as ToggleGroupItem,Un as Tooltip,jn as TooltipContent,$n as TooltipProvider,Wn as TooltipTrigger,Yg as Tree,sy as Typewriter,Hy as UL,ib as User,yM as VirtualList,ry as Wiggle,ly as WordRotate,Eh as actionBarVariants,ph as actionGroupVariants,Ox as actionSheetItemVariants,HR as alertVariants,fs as applyMask,qg as autocompleteInputVariants,Fp as avatarGroupVariants,bg as backTopVariants,OR as badgeIndicatorVariants,Px as bannerVariants,Vx as bottomNavigationVariants,ch as buttonGroupVariants,tn as buttonVariants,C0 as calculatePasswordStrength,fd as cardVariants,kv as carouselVariants,pa as chartContainerVariants,jp as chipVariants,Qp as circularProgressVariants,Gm as closeButtonVariants,m as cn,cb as codeVariants,Qh as colorAreaVariants,sh as colorFieldVariants,ox as colorSliderVariants,Kf as colorSwatchPickerVariants,Ff as colorSwatchVariants,sx as colorWheelVariants,rv as confirmDialogIconVariants,pc as contextualHelpTriggerVariants,fv as copyButtonVariants,_f as currencyInputVariants,th as dateFieldVariants,Jf as dateInputVariants,uu as defaultPasswordRequirements,rp as drawerMenuButtonVariants,Hv as emojiPickerVariants,mf as emptyStateVariants,Ra as fabVariants,Vf as fileUploadVariants,ll as formatCurrency,bs as formatDate,ms as formatFileSize,hs as formatPhoneNumber,vv as fullCalendarVariants,Af as getFileIcon,Zf as getMaskPlaceholder,T0 as getPasswordStrengthColor,M0 as getPasswordStrengthLabel,jh as gridListItemVariants,Wh as gridListVariants,ex as hexToRgb,ii as hsvToRgb,Rh as illustratedMessageVariants,Ov as imageCropperVariants,Tl as imageVariants,sv as indicatorVariants,Sl as infiniteScrollLoaderVariants,Fb as infiniteScrollVariants,Mh as inlineAlertVariants,tf as inputOTPVariants,Wv as inputSizeVariants,Mv as kanbanBoardVariants,Wl as kanbanCardVariants,Nv as kanbanColumnVariants,mv as kbdVariants,jv as labelSizeVariants,ux as labeledValueGroupVariants,cx as labeledValueVariants,fg as linkVariants,hf as listItemVariants,ol as listVariants,Hh as listViewItemVariants,Dh as listViewVariants,vb as listboxItemVariants,bb as listboxVariants,Nb as loadingOverlayVariants,Hb as loadingVariants,qf as maskedInputVariants,Xh as meterVariants,Dl as modalContentVariants,ig as navbarVariants,Am as navigationMenuLinkStyle,Hm as navigationMenuTriggerStyle,kb as nprogressVariants,qv as numberFieldVariants,eg as parseDate,Yf as parseFormattedValue,rg as phoneInputVariants,Ux as pullToRefreshVariants,ec as qrCodeVariants,Vh as rangeSliderVariants,Gp as ratingVariants,tx as rgbToHex,Jh as rgbToHsv,Vv as richTextEditorVariants,dv as scrollShadowVariants,bx as searchBarVariants,Jv as searchFieldVariants,Sf as segmentedControlItemVariants,Lf as segmentedControlVariants,_d as selectVariants,hu as sheetVariants,Ad as skeletonVariants,ub as snippetVariants,Cb as sortableItemVariants,wb as sortableListVariants,ud as spinnerVariants,gf as statCardVariants,hh as statusLightVariants,Fg as stepVariants,Og as stepsVariants,Cc as swipeActionVariants,Kx as swipeActionsVariants,Fa as switchColors,fc as tagGroupItemVariants,Kh as tagGroupVariants,cf as tagVariants,KR as textBadgeVariants,Uv as textFieldVariants,HE as themeToggleVariants,rh as timeFieldVariants,Wf as timeInputVariants,Mf as timelineItemVariants,Cf as timelineVariants,Za as toggleVariants,Ug as treeItemVariants,$g as treeVariants,dl as unmask,FS as useAnimatedValue,lR as useAsync,kS as useAsyncRetry,ZL as useBodyScrollLock,uS as useBooleanToggle,uL as useBreakpoint,mL as useBreakpoints,nk as useButtonGroup,jl as useCarousel,kL as useClickOutside,PL as useClickOutsideMultiple,qP as useConfetti,IM as useConfirmDialog,SL as useCopy,LL as useCopyToClipboard,IS as useCountdown,pS as useCounter,dS as useCycle,yL as useDebounce,RL as useDebouncedCallback,wL as useDebouncedCallbackWithControls,zS as useDelayedValue,Qy as useDisclosure,lS as useDisclosureOpen,rD as useDistance,jS as useDocumentIsVisible,yR as useDocumentVisibility,_S as useDocumentVisibilityCallback,iw as useDrawer,aS as useElementSize,VL as useEventListener,AL as useEventListenerRef,LS as useFetch,Ts as useFieldContext,_L as useFocusTrap,YL as useFocusTrapRef,Rl as useFormContext,TR as useFullscreen,JS as useFullscreenRef,nD as useGeolocation,DL as useHotkeys,HL as useHotkeysMap,BL as useHover,GL as useHoverDelay,KL as useHoverProps,FL as useHoverRef,GS as useIdle,$S as useIdleCallback,fS as useIncrementCounter,Yy as useIntersectionObserver,JL as useIntersectionObserverRef,Ci as useInterval,HS as useIntervalControls,nL as useIsDesktop,eL as useIsMobile,tL as useIsTablet,zL as useKeyPress,IL as useKeyPressed,eN as useKeyboardShortcut,eS as useLazyLoad,yS as useList,gL as useLocalStorage,OL as useLongPress,RS as useMap,sD as useMediaPermission,Ao as useMediaQuery,UL as useMouse,WL as useMouseElement,jL as useMouseElementRef,SS as useMutation,tS as useMutationObserver,nS as useMutationObserverRef,ci as useNotificationCenter,aD as useNotificationPermission,YS as useOnlineStatus,XS as useOnlineStatusCallback,oD as usePermission,rL as usePrefersColorScheme,oL as usePrefersReducedMotion,gS as usePrevious,vS as usePreviousDistinct,bS as usePreviousWithInitial,MS as useQueue,BS as useRafLoop,wS as useRecord,rS as useResizeObserver,oS as useResizeObserverRef,Wy as useScrollLock,XL as useScrollPosition,TS as useSelection,vL as useSessionStorage,oR as useSet,cD as useSpeechRecognition,lD as useSpeechSynthesis,oP as useSpotlight,KS as useSpringValue,NS as useStack,ML as useThrottle,NL as useThrottledCallback,fR as useTimeout,AS as useTimeoutControls,OS as useTimeoutFlag,VS as useTimer,cS as useToggle,dL as useWindowHeight,qL as useWindowScroll,Ma as useWindowSize,cL as useWindowWidth,sb as userVariants,zf as validateFile,GT as validators,Ob as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
73
73
|
//# sourceMappingURL=index.js.map
|