'use strict';

var chunk7Z5LLJ3A_js = require('./chunk-7Z5LLJ3A.js');
var React23 = require('react');
var reactSlot = require('@radix-ui/react-slot');
var classVarianceAuthority = require('class-variance-authority');
var LabelPrimitive = require('@radix-ui/react-label');
var TabsPrimitive = require('@radix-ui/react-tabs');
var DialogPrimitive = require('@radix-ui/react-dialog');
var lucideReact = require('lucide-react');
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
var PopoverPrimitive = require('@radix-ui/react-popover');
var ProgressPrimitive = require('@radix-ui/react-progress');
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
var SelectPrimitive = require('@radix-ui/react-select');
var SeparatorPrimitive = require('@radix-ui/react-separator');
var TooltipPrimitive = require('@radix-ui/react-tooltip');
var AvatarPrimitive = require('@radix-ui/react-avatar');
var navigation = require('next/navigation');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var React23__namespace = /*#__PURE__*/_interopNamespace(React23);
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);

var buttonVariants = classVarianceAuthority.cva(
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
        destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
        outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
        secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
        ghost: "hover:bg-accent hover:text-accent-foreground",
        link: "text-primary underline-offset-4 hover:underline"
      },
      size: {
        default: "h-9 px-4 py-2",
        sm: "h-8 rounded-md px-3 text-xs",
        lg: "h-10 rounded-md px-8",
        icon: "h-9 w-9"
      }
    },
    defaultVariants: {
      variant: "default",
      size: "default"
    }
  }
);
var Button = React23__namespace.forwardRef(
  ({ className, variant = "default", size = "default", asChild = false, ...props }, ref) => {
    const Comp = asChild ? reactSlot.Slot : "button";
    return /* @__PURE__ */ React23__namespace.createElement(
      Comp,
      {
        className: chunk7Z5LLJ3A_js.cn(buttonVariants({ variant, size, className })),
        ref,
        ...props
      }
    );
  }
);
Button.displayName = "Button";
var Card = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "rounded-xl border bg-card text-card-foreground shadow",
      className
    ),
    ...props
  }
));
Card.displayName = "Card";
var CardHeader = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("flex flex-col space-y-1.5 p-6", className),
    ...props
  }
));
CardHeader.displayName = "CardHeader";
var CardTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("font-semibold leading-none tracking-tight", className),
    ...props
  }
));
CardTitle.displayName = "CardTitle";
var CardDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
    ...props
  }
));
CardDescription.displayName = "CardDescription";
var CardContent = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement("div", { ref, className: chunk7Z5LLJ3A_js.cn("p-6 pt-0", className), ...props }));
CardContent.displayName = "CardContent";
var CardFooter = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("flex items-center p-6 pt-0", className),
    ...props
  }
));
CardFooter.displayName = "CardFooter";
var badgeVariants = classVarianceAuthority.cva(
  "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
  {
    variants: {
      variant: {
        default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
        secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
        destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
        outline: "text-foreground"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
function Badge({ className, variant, ...props }) {
  return /* @__PURE__ */ React23__namespace.createElement("div", { className: chunk7Z5LLJ3A_js.cn(badgeVariants({ variant }), className), ...props });
}
var Input = React23__namespace.forwardRef(
  ({ className, type, ...props }, ref) => {
    return /* @__PURE__ */ React23__namespace.createElement(
      "input",
      {
        type,
        className: chunk7Z5LLJ3A_js.cn(
          "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
          className
        ),
        ref,
        ...props
      }
    );
  }
);
Input.displayName = "Input";
var labelVariants = classVarianceAuthority.cva(
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
);
var Label = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  LabelPrimitive__namespace.Root,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(labelVariants(), className),
    ...props
  }
));
Label.displayName = LabelPrimitive__namespace.Root.displayName;
var Tabs = TabsPrimitive__namespace.Root;
var TabsList = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  TabsPrimitive__namespace.List,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
      className
    ),
    ...props
  }
));
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
var TabsTrigger = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  TabsPrimitive__namespace.Trigger,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
      className
    ),
    ...props
  }
));
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
var TabsContent = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  TabsPrimitive__namespace.Content,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
      className
    ),
    ...props
  }
));
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
var Dialog = DialogPrimitive__namespace.Root;
var DialogTrigger = DialogPrimitive__namespace.Trigger;
var DialogPortal = DialogPrimitive__namespace.Portal;
var DialogClose = DialogPrimitive__namespace.Close;
var DialogOverlay = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Overlay,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "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",
      className
    ),
    ...props
  }
));
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
var DialogContent = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(DialogPortal, null, /* @__PURE__ */ React23__namespace.createElement(DialogOverlay, null), /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Content,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "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",
      className
    ),
    ...props
  },
  children,
  /* @__PURE__ */ React23__namespace.createElement(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, /* @__PURE__ */ React23__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React23__namespace.createElement("span", { className: "sr-only" }, "Close"))
)));
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
var DialogHeader = ({
  className,
  ...props
}) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    className: chunk7Z5LLJ3A_js.cn(
      "flex flex-col space-y-1.5 text-center sm:text-left",
      className
    ),
    ...props
  }
);
DialogHeader.displayName = "DialogHeader";
var DialogFooter = ({
  className,
  ...props
}) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    className: chunk7Z5LLJ3A_js.cn(
      "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
      className
    ),
    ...props
  }
);
DialogFooter.displayName = "DialogFooter";
var DialogTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Title,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "text-lg font-semibold leading-none tracking-tight",
      className
    ),
    ...props
  }
));
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
var DialogDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Description,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
    ...props
  }
));
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
var AlertDialog = AlertDialogPrimitive__namespace.Root;
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
var AlertDialogOverlay = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AlertDialogPrimitive__namespace.Overlay,
  {
    className: chunk7Z5LLJ3A_js.cn(
      "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",
      className
    ),
    ...props,
    ref
  }
));
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
var AlertDialogContent = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(AlertDialogPortal, null, /* @__PURE__ */ React23__namespace.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React23__namespace.createElement(
  AlertDialogPrimitive__namespace.Content,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "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",
      className
    ),
    ...props
  }
)));
AlertDialogContent.displayName = AlertDialogPrimitive__namespace.Content.displayName;
var AlertDialogHeader = ({
  className,
  ...props
}) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    className: chunk7Z5LLJ3A_js.cn(
      "flex flex-col space-y-2 text-center sm:text-left",
      className
    ),
    ...props
  }
);
AlertDialogHeader.displayName = "AlertDialogHeader";
var AlertDialogFooter = ({
  className,
  ...props
}) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    className: chunk7Z5LLJ3A_js.cn(
      "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
      className
    ),
    ...props
  }
);
AlertDialogFooter.displayName = "AlertDialogFooter";
var AlertDialogTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AlertDialogPrimitive__namespace.Title,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("text-lg font-semibold", className),
    ...props
  }
));
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
var AlertDialogDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AlertDialogPrimitive__namespace.Description,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
    ...props
  }
));
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
var AlertDialogAction = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AlertDialogPrimitive__namespace.Action,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(buttonVariants(), className),
    ...props
  }
));
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
var AlertDialogCancel = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AlertDialogPrimitive__namespace.Cancel,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      buttonVariants({ variant: "outline" }),
      "mt-2 sm:mt-0",
      className
    ),
    ...props
  }
));
AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
var DropdownMenuSubTrigger = React23__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.SubTrigger,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
      inset && "pl-8",
      className
    ),
    ...props
  },
  children,
  /* @__PURE__ */ React23__namespace.createElement(lucideReact.ChevronRight, { className: "ml-auto" })
));
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
var DropdownMenuSubContent = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.SubContent,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
      className
    ),
    ...props
  }
));
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
var DropdownMenuContent = React23__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(DropdownMenuPrimitive__namespace.Portal, null, /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.Content,
  {
    ref,
    sideOffset,
    className: chunk7Z5LLJ3A_js.cn(
      "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
      "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
      className
    ),
    ...props
  }
)));
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
var DropdownMenuItem = React23__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.Item,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
      inset && "pl-8",
      className
    ),
    ...props
  }
));
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
var DropdownMenuCheckboxItem = React23__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.CheckboxItem,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      className
    ),
    checked,
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React23__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React23__namespace.createElement(lucideReact.Check, { className: "h-4 w-4" }))),
  children
));
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
var DropdownMenuRadioItem = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.RadioItem,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      className
    ),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React23__namespace.createElement(DropdownMenuPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React23__namespace.createElement(lucideReact.Circle, { className: "h-2 w-2 fill-current" }))),
  children
));
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
var DropdownMenuLabel = React23__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.Label,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "px-2 py-1.5 text-sm font-semibold",
      inset && "pl-8",
      className
    ),
    ...props
  }
));
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
var DropdownMenuSeparator = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DropdownMenuPrimitive__namespace.Separator,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("-mx-1 my-1 h-px bg-muted", className),
    ...props
  }
));
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
var DropdownMenuShortcut = ({
  className,
  ...props
}) => {
  return /* @__PURE__ */ React23__namespace.createElement(
    "span",
    {
      className: chunk7Z5LLJ3A_js.cn("ml-auto text-xs tracking-widest opacity-60", className),
      ...props
    }
  );
};
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
var Popover = PopoverPrimitive__namespace.Root;
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
var PopoverContent = React23__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(PopoverPrimitive__namespace.Portal, null, /* @__PURE__ */ React23__namespace.createElement(
  PopoverPrimitive__namespace.Content,
  {
    ref,
    align,
    sideOffset,
    className: chunk7Z5LLJ3A_js.cn(
      "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
      className
    ),
    ...props
  }
)));
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
var Progress = React23__namespace.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  ProgressPrimitive__namespace.Root,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
      className
    ),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement(
    ProgressPrimitive__namespace.Indicator,
    {
      className: "h-full w-full flex-1 bg-primary transition-all",
      style: { transform: `translateX(-${100 - (value || 0)}%)` }
    }
  )
));
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
var ScrollArea = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  ScrollAreaPrimitive__namespace.Root,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("relative overflow-hidden", className),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement(ScrollAreaPrimitive__namespace.Viewport, { className: "h-full w-full rounded-[inherit]" }, children),
  /* @__PURE__ */ React23__namespace.createElement(ScrollBar, null),
  /* @__PURE__ */ React23__namespace.createElement(ScrollAreaPrimitive__namespace.Corner, null)
));
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
var ScrollBar = React23__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
  {
    ref,
    orientation,
    className: chunk7Z5LLJ3A_js.cn(
      "flex touch-none select-none transition-colors",
      orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
      orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
      className
    ),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
));
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
var Select = SelectPrimitive__namespace.Root;
var SelectGroup = SelectPrimitive__namespace.Group;
var SelectValue = SelectPrimitive__namespace.Value;
var SelectTrigger = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  SelectPrimitive__namespace.Trigger,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
      className
    ),
    ...props
  },
  children,
  /* @__PURE__ */ React23__namespace.createElement(SelectPrimitive__namespace.Icon, { asChild: true }, /* @__PURE__ */ React23__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }))
));
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
var SelectScrollUpButton = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  SelectPrimitive__namespace.ScrollUpButton,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "flex cursor-default items-center justify-center py-1",
      className
    ),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement(lucideReact.ChevronUp, { className: "h-4 w-4" })
));
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
var SelectScrollDownButton = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  SelectPrimitive__namespace.ScrollDownButton,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "flex cursor-default items-center justify-center py-1",
      className
    ),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4" })
));
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
var SelectContent = React23__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(SelectPrimitive__namespace.Portal, null, /* @__PURE__ */ React23__namespace.createElement(
  SelectPrimitive__namespace.Content,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
      position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
      className
    ),
    position,
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement(SelectScrollUpButton, null),
  /* @__PURE__ */ React23__namespace.createElement(
    SelectPrimitive__namespace.Viewport,
    {
      className: chunk7Z5LLJ3A_js.cn(
        "p-1",
        position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
      )
    },
    children
  ),
  /* @__PURE__ */ React23__namespace.createElement(SelectScrollDownButton, null)
)));
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
var SelectLabel = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  SelectPrimitive__namespace.Label,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("px-2 py-1.5 text-sm font-semibold", className),
    ...props
  }
));
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
var SelectItem = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  SelectPrimitive__namespace.Item,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      className
    ),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React23__namespace.createElement(SelectPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React23__namespace.createElement(lucideReact.Check, { className: "h-4 w-4" }))),
  /* @__PURE__ */ React23__namespace.createElement(SelectPrimitive__namespace.ItemText, null, children)
));
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
var SelectSeparator = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  SelectPrimitive__namespace.Separator,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("-mx-1 my-1 h-px bg-muted", className),
    ...props
  }
));
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
var Separator3 = React23__namespace.forwardRef(
  ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
    SeparatorPrimitive__namespace.Root,
    {
      ref,
      decorative,
      orientation,
      className: chunk7Z5LLJ3A_js.cn(
        "shrink-0 bg-border",
        orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
        className
      ),
      ...props
    }
  )
);
Separator3.displayName = SeparatorPrimitive__namespace.Root.displayName;
var Sheet = DialogPrimitive__namespace.Root;
var SheetTrigger = DialogPrimitive__namespace.Trigger;
var SheetClose = DialogPrimitive__namespace.Close;
var SheetPortal = DialogPrimitive__namespace.Portal;
var SheetOverlay = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Overlay,
  {
    className: chunk7Z5LLJ3A_js.cn(
      "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",
      className
    ),
    ...props,
    ref
  }
));
SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
var sheetVariants = classVarianceAuthority.cva(
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
  {
    variants: {
      side: {
        top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
        bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
        left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
        right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
      }
    },
    defaultVariants: {
      side: "right"
    }
  }
);
var SheetContent = React23__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(SheetPortal, null, /* @__PURE__ */ React23__namespace.createElement(SheetOverlay, null), /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Content,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(sheetVariants({ side }), className),
    ...props
  },
  /* @__PURE__ */ React23__namespace.createElement(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary" }, /* @__PURE__ */ React23__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React23__namespace.createElement("span", { className: "sr-only" }, "Close")),
  children
)));
SheetContent.displayName = DialogPrimitive__namespace.Content.displayName;
var SheetHeader = ({
  className,
  ...props
}) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    className: chunk7Z5LLJ3A_js.cn(
      "flex flex-col space-y-2 text-center sm:text-left",
      className
    ),
    ...props
  }
);
SheetHeader.displayName = "SheetHeader";
var SheetFooter = ({
  className,
  ...props
}) => /* @__PURE__ */ React23__namespace.createElement(
  "div",
  {
    className: chunk7Z5LLJ3A_js.cn(
      "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
      className
    ),
    ...props
  }
);
SheetFooter.displayName = "SheetFooter";
var SheetTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Title,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("text-lg font-semibold text-foreground", className),
    ...props
  }
));
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
var SheetDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  DialogPrimitive__namespace.Description,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("text-sm text-muted-foreground", className),
    ...props
  }
));
SheetDescription.displayName = DialogPrimitive__namespace.Description.displayName;
var Textarea = React23__namespace.forwardRef(({ className, ...props }, ref) => {
  return /* @__PURE__ */ React23__namespace.createElement(
    "textarea",
    {
      className: chunk7Z5LLJ3A_js.cn(
        "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
        className
      ),
      ref,
      ...props
    }
  );
});
Textarea.displayName = "Textarea";
var TooltipProvider = TooltipPrimitive__namespace.Provider;
var Tooltip = TooltipPrimitive__namespace.Root;
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
var TooltipContent = React23__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(TooltipPrimitive__namespace.Portal, null, /* @__PURE__ */ React23__namespace.createElement(
  TooltipPrimitive__namespace.Content,
  {
    ref,
    sideOffset,
    className: chunk7Z5LLJ3A_js.cn(
      "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
      className
    ),
    ...props
  }
)));
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
var Avatar = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AvatarPrimitive__namespace.Root,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
      className
    ),
    ...props
  }
));
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
var AvatarImage = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AvatarPrimitive__namespace.Image,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn("aspect-square h-full w-full", className),
    ...props
  }
));
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
var AvatarFallback = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23__namespace.createElement(
  AvatarPrimitive__namespace.Fallback,
  {
    ref,
    className: chunk7Z5LLJ3A_js.cn(
      "flex h-full w-full items-center justify-center rounded-full bg-muted",
      className
    ),
    ...props
  }
));
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
function buildGridColsClasses(columns) {
  return [
    "grid-cols-1",
    // 默认单列
    columns.sm ? `sm:grid-cols-${columns.sm}` : "",
    columns.md ? `md:grid-cols-${columns.md}` : "md:grid-cols-2",
    columns.lg ? `lg:grid-cols-${columns.lg}` : "lg:grid-cols-3",
    columns.xl ? `xl:grid-cols-${columns.xl}` : ""
  ].filter(Boolean).join(" ");
}
function getGapClassName(gap) {
  const gapClasses = {
    sm: "gap-3",
    md: "gap-6",
    lg: "gap-8",
    xl: "gap-10"
  };
  return gapClasses[gap];
}
function Grid({
  items,
  renderItem,
  columns = { md: 2, lg: 3 },
  gap = "md",
  className = "",
  style
}) {
  const gridColsClasses = buildGridColsClasses(columns);
  const gapClass = getGapClassName(gap);
  return /* @__PURE__ */ React23__namespace.default.createElement(
    "div",
    {
      className: `grid ${gridColsClasses} ${gapClass} ${className}`.trim(),
      style
    },
    items.map((item, index) => /* @__PURE__ */ React23__namespace.default.createElement("div", { key: item.id }, renderItem(item, index)))
  );
}
var SearchBox = ({
  searchQuery,
  onSearchChange,
  placeholder = "\u641C\u7D22\u5B9E\u9A8C\u9879\u76EE\u7684\u6807\u9898\u3001\u63CF\u8FF0\u6216\u6807\u7B7E...",
  size = "large"
}) => {
  const getSizeStyles = () => {
    switch (size) {
      case "small":
        return {
          container: "h-10",
          input: "pl-10 pr-10 text-sm",
          icon: "w-4 h-4",
          iconPosition: "left-3",
          clearButton: "right-2 w-6 h-6",
          clearIcon: "w-3 h-3"
        };
      case "medium":
        return {
          container: "h-12",
          input: "pl-12 pr-12 text-base",
          icon: "w-5 h-5",
          iconPosition: "left-3",
          clearButton: "right-3 w-7 h-7",
          clearIcon: "w-4 h-4"
        };
      case "large":
      default:
        return {
          container: "h-16",
          input: "pl-6 pr-16 text-lg",
          icon: "w-6 h-6",
          iconPosition: "left-6",
          clearButton: "right-4 w-8 h-8",
          clearIcon: "w-4 h-4"
        };
    }
  };
  const styles = getSizeStyles();
  const isLarge = size === "large";
  return /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "relative group w-full" }, /* @__PURE__ */ React23__namespace.default.createElement(
    "input",
    {
      type: "text",
      placeholder,
      value: searchQuery,
      onChange: (e) => onSearchChange(e.target.value),
      className: `
          w-full ${styles.container} ${styles.input}
          ${isLarge ? "border-2 border-gray-200 rounded-2xl shadow-lg" : "border border-gray-300 rounded-lg shadow-sm"}
          bg-white 
          focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 
          hover:border-gray-400 ${isLarge ? "hover:shadow-xl" : "hover:shadow-md"}
          transition-all duration-300 ease-out
          text-gray-800 placeholder-gray-500
          ${isLarge ? "font-medium" : "font-normal"}
        `
    }
  ), searchQuery && /* @__PURE__ */ React23__namespace.default.createElement(
    "button",
    {
      onClick: () => onSearchChange(""),
      className: `
            absolute top-1/2 ${styles.clearButton} transform -translate-y-1/2
            z-10 group/clear
          `
    },
    /* @__PURE__ */ React23__namespace.default.createElement("div", { className: `
            ${styles.clearButton} flex items-center justify-center
            rounded-full 
            bg-gray-100 hover:bg-gray-200 
            transition-all duration-200 
            group-hover/clear:scale-105
          ` }, /* @__PURE__ */ React23__namespace.default.createElement(
      "svg",
      {
        className: `${styles.clearIcon} text-gray-500 group-hover/clear:text-gray-700`,
        fill: "none",
        stroke: "currentColor",
        viewBox: "0 0 24 24"
      },
      /* @__PURE__ */ React23__namespace.default.createElement(
        "path",
        {
          strokeLinecap: "round",
          strokeLinejoin: "round",
          strokeWidth: 2,
          d: "M6 18L18 6M6 6l12 12"
        }
      )
    ))
  ));
};
var Timeline = ({ items = [] }) => {
  if (!items || items.length === 0) {
    return null;
  }
  return /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200" }), items.map((item, index) => /* @__PURE__ */ React23__namespace.default.createElement("div", { key: index, className: "relative pl-12 pb-8" }, /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "absolute left-0 w-8 h-8 rounded-full bg-blue-500 border-4 border-white shadow-md flex items-center justify-center" }, /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "w-2 h-2 rounded-full bg-white" })), /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "bg-white rounded-lg p-4 shadow-md" }, /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "text-sm text-gray-500 mb-2" }, item.date), /* @__PURE__ */ React23__namespace.default.createElement("h4", { className: "text-lg font-semibold mb-2" }, item.title), /* @__PURE__ */ React23__namespace.default.createElement("p", { className: "text-gray-600" }, item.description)))));
};
var CollisionBalls = ({
  collisionBallsConfig: {
    balls,
    width,
    height
  }
}) => {
  const canvasRef = React23.useRef(null);
  const containerRef = React23.useRef(null);
  const ballsRef = React23.useRef([]);
  const [isShaking, setIsShaking] = React23.useState(false);
  const [draggedBall, setDraggedBall] = React23.useState(null);
  const [mousePos, setMousePos] = React23.useState({ x: 0, y: 0 });
  const animationRef = React23.useRef(null);
  const updateCanvasSize = () => {
    const container = containerRef.current;
    const canvas = canvasRef.current;
    if (!container || !canvas) {
      console.error("Container or canvas not found");
      return;
    }
    const containerWidth = container.clientWidth;
    const containerHeight = container.clientHeight;
    console.log("Container size:", { containerWidth, containerHeight });
    canvas.width = containerWidth;
    canvas.height = containerHeight;
    canvas.style.width = `${containerWidth}px`;
    canvas.style.height = `${containerHeight}px`;
    console.log("Canvas size updated:", {
      width: canvas.width,
      height: canvas.height,
      containerWidth,
      containerHeight
    });
  };
  const initBalls = () => {
    const canvas = canvasRef.current;
    if (!canvas) {
      console.error("Canvas not found during ball initialization");
      return [];
    }
    console.log("Initializing balls with canvas size:", {
      width: canvas.width,
      height: canvas.height
    });
    return balls.map((ballConfig) => ({
      x: Math.random() * (canvas.width - 100) + 50,
      y: Math.random() * (canvas.height - 100) + 50,
      vx: (Math.random() - 0.5) * 4,
      vy: (Math.random() - 0.5) * 4,
      radius: ballConfig.size,
      color: ballConfig.color,
      text: ballConfig.label,
      isDragging: false
    }));
  };
  React23.useEffect(() => {
    const handleResize = () => {
      console.log("Window resized");
      updateCanvasSize();
    };
    if (typeof window !== "undefined") {
      window.addEventListener("resize", handleResize);
      updateCanvasSize();
    }
    return () => {
      if (typeof window !== "undefined") {
        window.removeEventListener("resize", handleResize);
      }
    };
  }, []);
  React23.useEffect(() => {
    const canvas = canvasRef.current;
    if (!canvas) {
      console.error("Canvas element not found");
      return;
    }
    const ctx = canvas.getContext("2d");
    if (!ctx) {
      console.error("Failed to get canvas context");
      return;
    }
    console.log("Starting animation setup...");
    updateCanvasSize();
    ballsRef.current = initBalls();
    console.log("Balls initialized:", ballsRef.current);
    let lastTime = performance.now();
    let frameCount = 0;
    const animate = (currentTime) => {
      try {
        frameCount++;
        if (currentTime - lastTime >= 1e3) {
          console.log(`FPS: ${frameCount}`);
          frameCount = 0;
          lastTime = currentTime;
        }
        ctx.clearRect(0, 0, canvas.width, canvas.height);
        ballsRef.current.forEach((ball) => {
          if (!ball.isDragging) {
            updatePosition(ball, canvas.width, canvas.height);
          }
          for (let i = 0; i < ballsRef.current.length; i++) {
            for (let j = i + 1; j < ballsRef.current.length; j++) {
              const ball1 = ballsRef.current[i];
              const ball2 = ballsRef.current[j];
              if (ball1 && ball2) {
                checkCollision(ball1, ball2);
              }
            }
          }
          draw(ctx, ball);
        });
        animationRef.current = requestAnimationFrame(animate);
      } catch (error) {
        console.error("Animation error:", error);
      }
    };
    console.log("Starting animation loop...");
    animationRef.current = requestAnimationFrame(animate);
    return () => {
      console.log("Cleaning up animation...");
      if (animationRef.current) {
        cancelAnimationFrame(animationRef.current);
        animationRef.current = null;
      }
    };
  }, []);
  const shake = () => {
    setIsShaking(true);
    ballsRef.current.forEach((ball) => {
      ball.vx = (Math.random() - 0.5) * 10;
      ball.vy = (Math.random() - 0.5) * 10;
    });
    setTimeout(() => setIsShaking(false), 200);
  };
  const slowdown = () => {
    setIsShaking(true);
    ballsRef.current.forEach((ball) => {
      ball.vx = ball.vx * 0.5;
      ball.vy = ball.vy * 0.5;
    });
    setTimeout(() => setIsShaking(false), 200);
  };
  const checkCollision = (ball1, ball2) => {
    const dx = ball2.x - ball1.x;
    const dy = ball2.y - ball1.y;
    const distance = Math.sqrt(dx * dx + dy * dy);
    if (distance < ball1.radius + ball2.radius) {
      const angle = Math.atan2(dy, dx);
      const overlap = (ball1.radius + ball2.radius - distance) / 2;
      if (ball1.isDragging || ball2.isDragging) {
        const draggedBall2 = ball1.isDragging ? ball1 : ball2;
        const otherBall = ball1.isDragging ? ball2 : ball1;
        otherBall.x += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.cos(angle);
        otherBall.y += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.sin(angle);
        const pushForce = 2;
        otherBall.vx = (draggedBall2 === ball1 ? -1 : 1) * Math.cos(angle) * pushForce;
        otherBall.vy = (draggedBall2 === ball1 ? -1 : 1) * Math.sin(angle) * pushForce;
        return;
      }
      const sin = Math.sin(angle);
      const cos = Math.cos(angle);
      const vx1 = ball1.vx * cos + ball1.vy * sin;
      const vy1 = ball1.vy * cos - ball1.vx * sin;
      const vx2 = ball2.vx * cos + ball2.vy * sin;
      const vy2 = ball2.vy * cos - ball2.vx * sin;
      const newVx1 = vx2;
      const newVx2 = vx1;
      ball1.vx = newVx1 * cos - vy1 * sin;
      ball1.vy = vy1 * cos + newVx1 * sin;
      ball2.vx = newVx2 * cos - vy2 * sin;
      ball2.vy = vy2 * cos + newVx2 * sin;
      ball1.x -= overlap * Math.cos(angle);
      ball1.y -= overlap * Math.sin(angle);
      ball2.x += overlap * Math.cos(angle);
      ball2.y += overlap * Math.sin(angle);
    }
  };
  const updatePosition = (ball, width2, height2) => {
    const handleBoundaryCollision = (velocity, position, boundary, radius) => {
      let newVelocity = velocity;
      let newPosition = position;
      if (position - radius < 0) {
        newPosition = radius;
        newVelocity = Math.abs(velocity);
      } else if (position + radius > boundary) {
        newPosition = boundary - radius;
        newVelocity = -Math.abs(velocity);
      }
      return [newVelocity, newPosition];
    };
    const [newVx, newX] = handleBoundaryCollision(
      ball.vx,
      ball.x,
      width2,
      ball.radius
    );
    const [newVy, newY] = handleBoundaryCollision(
      ball.vy,
      ball.y,
      height2,
      ball.radius
    );
    ball.vx = newVx;
    ball.vy = newVy;
    ball.x = newX;
    ball.y = newY;
  };
  const draw = (ctx, ball) => {
    ctx.beginPath();
    ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
    ctx.fillStyle = ball.color;
    ctx.fill();
    ctx.closePath();
    if (ball.text) {
      ctx.font = "14px Arial";
      ctx.fillStyle = "#fff";
      ctx.textAlign = "center";
      ctx.textBaseline = "middle";
      ctx.fillText(ball.text, ball.x, ball.y);
    }
  };
  const handleMouseDown = (event) => {
    const mousePos2 = getMousePos(event);
    const ball = ballsRef.current.find((b) => {
      const dx = b.x - mousePos2.x;
      const dy = b.y - mousePos2.y;
      return Math.sqrt(dx * dx + dy * dy) < b.radius;
    });
    if (ball) {
      ball.isDragging = true;
      setDraggedBall(ball);
    }
  };
  const handleMouseMove = (event) => {
    const mousePos2 = getMousePos(event);
    setMousePos(mousePos2);
    if (draggedBall) {
      draggedBall.x = mousePos2.x;
      draggedBall.y = mousePos2.y;
      draggedBall.vx = 0;
      draggedBall.vy = 0;
    }
  };
  const handleMouseUp = () => {
    if (draggedBall) {
      draggedBall.isDragging = false;
      setDraggedBall(null);
    }
  };
  const getMousePos = (event) => {
    const canvas = canvasRef.current;
    if (!canvas) return { x: 0, y: 0 };
    const rect = canvas.getBoundingClientRect();
    const scaleX = canvas.width / rect.width;
    const scaleY = canvas.height / rect.height;
    return {
      x: (event.clientX - rect.left) * scaleX,
      y: (event.clientY - rect.top) * scaleY
    };
  };
  return /* @__PURE__ */ React23__namespace.default.createElement("div", { style: { width: "100%", height: "100%", position: "relative", backgroundColor: "#f9fafb", borderRadius: "0.5rem" } }, /* @__PURE__ */ React23__namespace.default.createElement("div", { ref: containerRef, style: { width: "100%", height: "100%", position: "absolute", top: 0, left: 0 } }, /* @__PURE__ */ React23__namespace.default.createElement(
    "canvas",
    {
      ref: canvasRef,
      style: {
        width: "100%",
        height: "100%",
        display: "block"
        // 确保canvas正确显示
      },
      onMouseDown: handleMouseDown,
      onMouseMove: handleMouseMove,
      onMouseUp: handleMouseUp,
      onMouseLeave: handleMouseUp
    }
  )), /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "absolute bottom-4 right-4 flex gap-2" }, /* @__PURE__ */ React23__namespace.default.createElement(
    "button",
    {
      onClick: shake,
      className: `px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors ${isShaking ? "animate-pulse" : ""}`
    },
    "\u6447\u4E00\u6447"
  ), /* @__PURE__ */ React23__namespace.default.createElement(
    "button",
    {
      onClick: slowdown,
      className: `px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors ${isShaking ? "animate-pulse" : ""}`
    },
    "\u51CF\u901F"
  )));
};
function GenericOrderManager({
  operations,
  renderItem,
  className = "",
  title = "\u987A\u5E8F\u7BA1\u7406",
  description = "\u62D6\u62FD\u6216\u4F7F\u7528\u6309\u94AE\u8C03\u6574\u663E\u793A\u987A\u5E8F",
  onOrderChanged,
  emptyMessage = "\u6682\u65E0\u6570\u636E",
  loadingMessage = "\u52A0\u8F7D\u6570\u636E..."
}) {
  const [items, setItems] = React23.useState([]);
  const [originalOrder, setOriginalOrder] = React23.useState([]);
  const [loading, setLoading] = React23.useState(true);
  const [saving, setSaving] = React23.useState(false);
  const [error, setError] = React23.useState(null);
  const [hasChanges, setHasChanges] = React23.useState(false);
  const [draggedItem, setDraggedItem] = React23.useState(null);
  const loadItems = React23.useCallback(async () => {
    try {
      setLoading(true);
      setError(null);
      const data = await operations.loadItems();
      setItems(data);
      setOriginalOrder([...data]);
      setHasChanges(false);
    } catch (err) {
      console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u52A0\u8F7D\u6570\u636E\u9519\u8BEF:", err);
      setError(err instanceof Error ? err.message : "\u52A0\u8F7D\u6570\u636E\u5931\u8D25");
    } finally {
      setLoading(false);
    }
  }, [operations]);
  React23.useEffect(() => {
    loadItems();
  }, [loadItems]);
  React23.useEffect(() => {
    const hasOrderChanged = items.some(
      (item, index) => originalOrder[index]?.id !== item.id
    );
    setHasChanges(hasOrderChanged);
  }, [items, originalOrder]);
  const handleMoveUp = async (itemId) => {
    try {
      setError(null);
      const currentIndex = items.findIndex((item) => item.id === itemId);
      if (currentIndex === -1) {
        setError("\u9879\u76EE\u4E0D\u5B58\u5728");
        return;
      }
      if (currentIndex === 0) {
        setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u524D\u9762\uFF0C\u65E0\u6CD5\u4E0A\u79FB");
        return;
      }
      await operations.moveItemUp(itemId);
      await loadItems();
      onOrderChanged?.();
    } catch (err) {
      console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0A\u79FB\u9879\u76EE\u9519\u8BEF:", err);
      setError(err instanceof Error ? err.message : "\u4E0A\u79FB\u5931\u8D25");
    }
  };
  const handleMoveDown = async (itemId) => {
    try {
      setError(null);
      const currentIndex = items.findIndex((item) => item.id === itemId);
      if (currentIndex === -1) {
        setError("\u9879\u76EE\u4E0D\u5B58\u5728");
        return;
      }
      if (currentIndex === items.length - 1) {
        setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u540E\u9762\uFF0C\u65E0\u6CD5\u4E0B\u79FB");
        return;
      }
      await operations.moveItemDown(itemId);
      await loadItems();
      onOrderChanged?.();
    } catch (err) {
      console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0B\u79FB\u9879\u76EE\u9519\u8BEF:", err);
      setError(err instanceof Error ? err.message : "\u4E0B\u79FB\u5931\u8D25");
    }
  };
  const handleDragStart = (e, index) => {
    setDraggedItem(index);
    e.dataTransfer.effectAllowed = "move";
  };
  const handleDragOver = (e, _index) => {
    e.preventDefault();
    e.dataTransfer.dropEffect = "move";
  };
  const handleDrop = async (e, dropIndex) => {
    e.preventDefault();
    if (draggedItem === null || draggedItem === dropIndex) {
      setDraggedItem(null);
      return;
    }
    try {
      setError(null);
      const newItems = [...items];
      const draggedItemData = newItems[draggedItem];
      if (!draggedItemData) return;
      newItems.splice(draggedItem, 1);
      newItems.splice(dropIndex, 0, draggedItemData);
      const itemOrders = newItems.map((item, index) => ({
        id: item.id,
        order: index
      }));
      await operations.updateItemOrder(itemOrders);
      await loadItems();
      onOrderChanged?.();
    } catch (err) {
      console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u62D6\u62FD\u6392\u5E8F\u9519\u8BEF:", err);
      setError(err instanceof Error ? err.message : "\u6392\u5E8F\u5931\u8D25");
    } finally {
      setDraggedItem(null);
    }
  };
  const handleSaveOrder = async () => {
    try {
      setSaving(true);
      setError(null);
      const itemOrders = items.map((item, index) => ({
        id: item.id,
        order: index
      }));
      await operations.updateItemOrder(itemOrders);
      setOriginalOrder([...items]);
      setHasChanges(false);
      onOrderChanged?.();
    } catch (err) {
      console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4FDD\u5B58\u987A\u5E8F\u9519\u8BEF:", err);
      setError(err instanceof Error ? err.message : "\u4FDD\u5B58\u5931\u8D25");
      await loadItems();
    } finally {
      setSaving(false);
    }
  };
  const handleResetOrder = () => {
    setItems([...originalOrder]);
  };
  if (loading) {
    return /* @__PURE__ */ React23__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("flex flex-col items-center justify-center p-12 text-gray-500", className) }, /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "w-6 h-6 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin mb-2" }), /* @__PURE__ */ React23__namespace.default.createElement("span", null, loadingMessage));
  }
  return /* @__PURE__ */ React23__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("bg-white rounded-xl p-6 shadow-md border-2 border-gray-100", className) }, /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex items-center justify-between mb-4 pb-3 border-b border-gray-100 sm:flex-row flex-col sm:items-center items-start gap-4" }, /* @__PURE__ */ React23__namespace.default.createElement("h3", { className: "m-0 text-gray-900 text-lg font-semibold" }, title), /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex gap-3 w-full sm:w-auto" }, hasChanges && /* @__PURE__ */ React23__namespace.default.createElement(React23__namespace.default.Fragment, null, /* @__PURE__ */ React23__namespace.default.createElement(
    "button",
    {
      onClick: handleResetOrder,
      className: "flex items-center gap-2 bg-amber-500 hover:bg-amber-600 text-white px-4 py-2 rounded-lg font-medium transition-colors",
      title: "\u91CD\u7F6E\u4E3A\u539F\u59CB\u987A\u5E8F"
    },
    /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.RotateCcw, { size: 16 }),
    "\u91CD\u7F6E"
  ), /* @__PURE__ */ React23__namespace.default.createElement(
    "button",
    {
      onClick: handleSaveOrder,
      disabled: saving,
      className: "flex items-center gap-2 bg-blue-500 hover:bg-blue-600 disabled:opacity-50 disabled:cursor-not-allowed text-white px-4 py-2 rounded-lg font-medium transition-colors",
      title: "\u4FDD\u5B58\u65B0\u987A\u5E8F"
    },
    /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.Save, { size: 16 }),
    saving ? "\u4FDD\u5B58\u4E2D..." : "\u4FDD\u5B58\u987A\u5E8F"
  )))), error && /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex items-center gap-2 bg-red-50 text-red-600 p-3 rounded-lg mb-4 border border-red-200" }, /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.AlertCircle, { size: 16 }), /* @__PURE__ */ React23__namespace.default.createElement("span", null, error)), /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "bg-slate-50 border border-slate-200 rounded-lg p-4 mb-6" }, /* @__PURE__ */ React23__namespace.default.createElement("p", { className: "m-0 mb-2 color-slate-500 text-sm" }, description), /* @__PURE__ */ React23__namespace.default.createElement("ul", { className: "m-0 pl-6 color-slate-500 text-sm list-disc" }, /* @__PURE__ */ React23__namespace.default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u62D6\u62FD\uFF1A\u70B9\u51FB\u5E76\u62D6\u52A8 ", /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.GripVertical, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u56FE\u6807"), /* @__PURE__ */ React23__namespace.default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u6309\u94AE\uFF1A\u70B9\u51FB ", /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.ChevronUp, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6216 ", /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.ChevronDown, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6309\u94AE"), /* @__PURE__ */ React23__namespace.default.createElement("li", null, '\u5B8C\u6210\u8C03\u6574\u540E\uFF0C\u70B9\u51FB"\u4FDD\u5B58\u987A\u5E8F"\u6309\u94AE\u4FDD\u5B58\u66F4\u6539'))), /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex flex-col gap-3" }, items.map((item, index) => /* @__PURE__ */ React23__namespace.default.createElement(
    "div",
    {
      key: item.id,
      className: chunk7Z5LLJ3A_js.cn(
        "flex items-center gap-3 p-4 bg-gray-50 border-2 border-gray-200 rounded-lg transition-all hover:border-gray-300 hover:shadow-sm",
        draggedItem === index && "opacity-50 rotate-2 border-blue-500"
      ),
      draggable: true,
      onDragStart: (e) => handleDragStart(e, index),
      onDragOver: (e) => handleDragOver(e),
      onDrop: (e) => handleDrop(e, index)
    },
    /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex items-center cursor-grab active:cursor-grabbing text-gray-400 p-1 rounded hover:text-gray-500 hover:bg-gray-100 transition-colors" }, /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.GripVertical, { size: 20 })),
    /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex-1 min-w-0" }, renderItem(item, index, index === 0, index === items.length - 1)),
    /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex items-center mx-3" }, /* @__PURE__ */ React23__namespace.default.createElement("span", { className: "flex items-center justify-center w-8 h-8 bg-blue-500 text-white text-sm font-semibold rounded-full sm:w-8 sm:h-8 w-7 h-7 sm:text-sm text-xs" }, "#", index + 1)),
    /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex flex-col gap-1 sm:flex-col flex-row" }, /* @__PURE__ */ React23__namespace.default.createElement(
      "button",
      {
        onClick: () => handleMoveUp(item.id),
        disabled: index === 0,
        className: "flex items-center justify-center w-8 h-8 p-0 border border-gray-300 bg-white text-gray-500 rounded cursor-pointer transition-all hover:bg-gray-100 hover:border-gray-400 hover:text-gray-700 disabled:opacity-40 disabled:cursor-not-allowed disabled:bg-gray-50 sm:w-8 sm:h-8 w-7 h-7",
        title: "\u4E0A\u79FB"
      },
      /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.ChevronUp, { size: 18 })
    ), /* @__PURE__ */ React23__namespace.default.createElement(
      "button",
      {
        onClick: () => handleMoveDown(item.id),
        disabled: index === items.length - 1,
        className: "flex items-center justify-center w-8 h-8 p-0 border border-gray-300 bg-white text-gray-500 rounded cursor-pointer transition-all hover:bg-gray-100 hover:border-gray-400 hover:text-gray-700 disabled:opacity-40 disabled:cursor-not-allowed disabled:bg-gray-50 sm:w-8 sm:h-8 w-7 h-7",
        title: "\u4E0B\u79FB"
      },
      /* @__PURE__ */ React23__namespace.default.createElement(lucideReact.ChevronDown, { size: 18 })
    ))
  ))), items.length === 0 && /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "text-center p-12 text-gray-400 italic" }, /* @__PURE__ */ React23__namespace.default.createElement("p", { className: "m-0" }, emptyMessage)));
}
var BackButton = ({ href, className = "" }) => {
  const router = navigation.useRouter();
  const handleClick = () => {
    if (href) {
      router.push(href);
    } else {
      router.back();
    }
  };
  return /* @__PURE__ */ React23__namespace.default.createElement(
    "button",
    {
      onClick: handleClick,
      className: chunk7Z5LLJ3A_js.cn(
        "inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors",
        className
      )
    },
    /* @__PURE__ */ React23__namespace.default.createElement(
      "svg",
      {
        className: "w-5 h-5 mr-2",
        fill: "none",
        stroke: "currentColor",
        viewBox: "0 0 24 24"
      },
      /* @__PURE__ */ React23__namespace.default.createElement(
        "path",
        {
          strokeLinecap: "round",
          strokeLinejoin: "round",
          strokeWidth: 2,
          d: "M10 19l-7-7m0 0l7-7m-7 7h18"
        }
      )
    ),
    "\u8FD4\u56DE"
  );
};
function getColorValue(bgClass) {
  const colorMap = {
    "bg-blue-500": "#3b82f6",
    "bg-green-500": "#10b981",
    "bg-red-500": "#ef4444",
    "bg-purple-500": "#8b5cf6",
    "bg-slate-500": "#64748b",
    "bg-emerald-500": "#10b981",
    "bg-orange-500": "#f97316"
  };
  return colorMap[bgClass] || "#3b82f6";
}
function FilterButtonGroup({
  label,
  value,
  options,
  onChange,
  className
}) {
  return /* @__PURE__ */ React23__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("space-y-4", className) }, /* @__PURE__ */ React23__namespace.default.createElement("h3", { className: "text-lg font-semibold text-gray-800" }, label), /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex gap-3" }, options.map((option) => {
    const isActive = value === option.value;
    return /* @__PURE__ */ React23__namespace.default.createElement(
      "button",
      {
        key: option.value,
        onClick: () => onChange(option.value),
        style: isActive ? { backgroundColor: getColorValue(option.activeColor.bg) } : void 0,
        className: chunk7Z5LLJ3A_js.cn(
          "flex-1 h-12 rounded-lg font-medium text-sm transition-all duration-200 ease-out focus:outline-none focus:ring-2 focus:ring-opacity-50 border",
          isActive ? "text-white border-transparent shadow-md focus:ring-white" : "bg-white text-gray-700 border-gray-200 shadow-sm hover:bg-gray-50 hover:border-gray-300 hover:shadow focus:ring-blue-300"
        )
      },
      /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "flex items-center justify-center space-x-2" }, /* @__PURE__ */ React23__namespace.default.createElement("span", { className: "text-lg" }, option.icon), /* @__PURE__ */ React23__namespace.default.createElement("span", null, option.label), option.showCount && option.count !== void 0 && /* @__PURE__ */ React23__namespace.default.createElement("span", { className: chunk7Z5LLJ3A_js.cn(
        "text-xs font-semibold px-2 py-0.5 rounded-full min-w-[1.25rem] text-center",
        isActive ? "bg-white/20 text-white" : "bg-gray-100 text-gray-600"
      ) }, option.count))
    );
  })));
}
function SearchResultHint({ searchQuery, resultCount, className }) {
  if (!searchQuery) return null;
  return /* @__PURE__ */ React23__namespace.default.createElement("div", { className: chunk7Z5LLJ3A_js.cn("mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg", className) }, /* @__PURE__ */ React23__namespace.default.createElement("p", { className: "text-sm text-blue-700" }, '\u641C\u7D22 "', /* @__PURE__ */ React23__namespace.default.createElement("span", { className: "font-medium" }, searchQuery), '" \u627E\u5230 ', resultCount, " \u4E2A\u7ED3\u679C"));
}
var Modal = ({
  isOpen,
  onClose,
  title,
  width,
  className,
  maskClosable = true,
  children
}) => {
  return /* @__PURE__ */ React23__namespace.default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => {
    if (!open) {
      if (maskClosable) {
        onClose();
      }
    }
  } }, /* @__PURE__ */ React23__namespace.default.createElement(
    DialogContent,
    {
      className: chunk7Z5LLJ3A_js.cn("sm:max-w-[425px]", className),
      onPointerDownOutside: (e) => {
        if (!maskClosable) e.preventDefault();
      },
      onEscapeKeyDown: (e) => {
        if (!maskClosable) e.preventDefault();
      },
      style: width ? { maxWidth: typeof width === "number" ? `${width}px` : width } : void 0
    },
    title ? /* @__PURE__ */ React23__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React23__namespace.default.createElement(DialogTitle, null, title)) : (
      // 无障碍性：始终需要 DialogTitle，使用 sr-only 对视觉隐藏但对屏幕阅读器可见
      /* @__PURE__ */ React23__namespace.default.createElement(DialogTitle, { className: "sr-only" }, "\u5F39\u7A97")
    ),
    /* @__PURE__ */ React23__namespace.default.createElement("div", { className: "py-4" }, children)
  ));
};
var ConfirmModal = ({
  isOpen,
  onClose,
  onConfirm,
  title = "\u786E\u8BA4\u64CD\u4F5C",
  message,
  confirmText = "\u786E\u8BA4",
  cancelText = "\u53D6\u6D88",
  isLoading = false
}) => {
  return /* @__PURE__ */ React23__namespace.default.createElement(AlertDialog, { open: isOpen, onOpenChange: (open) => !open && onClose() }, /* @__PURE__ */ React23__namespace.default.createElement(AlertDialogContent, null, /* @__PURE__ */ React23__namespace.default.createElement(AlertDialogHeader, null, /* @__PURE__ */ React23__namespace.default.createElement(AlertDialogTitle, null, title), /* @__PURE__ */ React23__namespace.default.createElement(AlertDialogDescription, null, message)), /* @__PURE__ */ React23__namespace.default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React23__namespace.default.createElement(AlertDialogCancel, { disabled: isLoading }, cancelText), /* @__PURE__ */ React23__namespace.default.createElement(
    AlertDialogAction,
    {
      onClick: (e) => {
        e.preventDefault();
        onConfirm();
      },
      disabled: isLoading,
      className: "bg-destructive text-destructive-foreground hover:bg-destructive/90"
    },
    isLoading ? "\u5904\u7406\u4E2D..." : confirmText
  ))));
};

exports.AlertDialog = AlertDialog;
exports.AlertDialogAction = AlertDialogAction;
exports.AlertDialogCancel = AlertDialogCancel;
exports.AlertDialogContent = AlertDialogContent;
exports.AlertDialogDescription = AlertDialogDescription;
exports.AlertDialogFooter = AlertDialogFooter;
exports.AlertDialogHeader = AlertDialogHeader;
exports.AlertDialogOverlay = AlertDialogOverlay;
exports.AlertDialogPortal = AlertDialogPortal;
exports.AlertDialogTitle = AlertDialogTitle;
exports.AlertDialogTrigger = AlertDialogTrigger;
exports.Avatar = Avatar;
exports.AvatarFallback = AvatarFallback;
exports.AvatarImage = AvatarImage;
exports.BackButton = BackButton;
exports.Badge = Badge;
exports.Button = Button;
exports.Card = Card;
exports.CardContent = CardContent;
exports.CardDescription = CardDescription;
exports.CardFooter = CardFooter;
exports.CardHeader = CardHeader;
exports.CardTitle = CardTitle;
exports.CollisionBalls = CollisionBalls;
exports.ConfirmModal = ConfirmModal;
exports.Dialog = Dialog;
exports.DialogClose = DialogClose;
exports.DialogContent = DialogContent;
exports.DialogDescription = DialogDescription;
exports.DialogFooter = DialogFooter;
exports.DialogHeader = DialogHeader;
exports.DialogOverlay = DialogOverlay;
exports.DialogPortal = DialogPortal;
exports.DialogTitle = DialogTitle;
exports.DialogTrigger = DialogTrigger;
exports.DropdownMenu = DropdownMenu;
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
exports.DropdownMenuContent = DropdownMenuContent;
exports.DropdownMenuGroup = DropdownMenuGroup;
exports.DropdownMenuItem = DropdownMenuItem;
exports.DropdownMenuLabel = DropdownMenuLabel;
exports.DropdownMenuPortal = DropdownMenuPortal;
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
exports.DropdownMenuSeparator = DropdownMenuSeparator;
exports.DropdownMenuShortcut = DropdownMenuShortcut;
exports.DropdownMenuSub = DropdownMenuSub;
exports.DropdownMenuSubContent = DropdownMenuSubContent;
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
exports.DropdownMenuTrigger = DropdownMenuTrigger;
exports.FilterButtonGroup = FilterButtonGroup;
exports.GenericOrderManager = GenericOrderManager;
exports.Grid = Grid;
exports.Input = Input;
exports.Label = Label;
exports.Modal = Modal;
exports.Popover = Popover;
exports.PopoverAnchor = PopoverAnchor;
exports.PopoverContent = PopoverContent;
exports.PopoverTrigger = PopoverTrigger;
exports.Progress = Progress;
exports.ScrollArea = ScrollArea;
exports.ScrollBar = ScrollBar;
exports.SearchBox = SearchBox;
exports.SearchResultHint = SearchResultHint;
exports.Select = Select;
exports.SelectContent = SelectContent;
exports.SelectGroup = SelectGroup;
exports.SelectItem = SelectItem;
exports.SelectLabel = SelectLabel;
exports.SelectScrollDownButton = SelectScrollDownButton;
exports.SelectScrollUpButton = SelectScrollUpButton;
exports.SelectSeparator = SelectSeparator;
exports.SelectTrigger = SelectTrigger;
exports.SelectValue = SelectValue;
exports.Separator = Separator3;
exports.Sheet = Sheet;
exports.SheetClose = SheetClose;
exports.SheetContent = SheetContent;
exports.SheetDescription = SheetDescription;
exports.SheetFooter = SheetFooter;
exports.SheetHeader = SheetHeader;
exports.SheetOverlay = SheetOverlay;
exports.SheetPortal = SheetPortal;
exports.SheetTitle = SheetTitle;
exports.SheetTrigger = SheetTrigger;
exports.Tabs = Tabs;
exports.TabsContent = TabsContent;
exports.TabsList = TabsList;
exports.TabsTrigger = TabsTrigger;
exports.Textarea = Textarea;
exports.Timeline = Timeline;
exports.Tooltip = Tooltip;
exports.TooltipContent = TooltipContent;
exports.TooltipProvider = TooltipProvider;
exports.TooltipTrigger = TooltipTrigger;
exports.badgeVariants = badgeVariants;
exports.buttonVariants = buttonVariants;
//# sourceMappingURL=chunk-PXVELWYK.js.map
//# sourceMappingURL=chunk-PXVELWYK.js.map