sa2kit 1.6.30 → 1.6.32

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.
Files changed (251) hide show
  1. package/dist/AliyunOSSProvider-4W47OFEK.mjs +6 -0
  2. package/dist/{AliyunOSSProvider-KJYRIZES.mjs.map → AliyunOSSProvider-4W47OFEK.mjs.map} +1 -1
  3. package/dist/AliyunOSSProvider-HCNGDJL7.js +15 -0
  4. package/dist/{AliyunOSSProvider-FWAKUB2T.js.map → AliyunOSSProvider-HCNGDJL7.js.map} +1 -1
  5. package/dist/ConfigService-3DIC6C3Q.js +21 -0
  6. package/dist/{ConfigService-7MEZXKJ5.js.map → ConfigService-3DIC6C3Q.js.map} +1 -1
  7. package/dist/ConfigService-V6ZK273Z.mjs +4 -0
  8. package/dist/{ConfigService-BV57YYFW.mjs.map → ConfigService-V6ZK273Z.mjs.map} +1 -1
  9. package/dist/LocalStorageProvider-3RVPCQB3.mjs +6 -0
  10. package/dist/{LocalStorageProvider-RTPMUOZ2.mjs.map → LocalStorageProvider-3RVPCQB3.mjs.map} +1 -1
  11. package/dist/LocalStorageProvider-PP7MA5OT.js +15 -0
  12. package/dist/{LocalStorageProvider-XSRCUXOU.js.map → LocalStorageProvider-PP7MA5OT.js.map} +1 -1
  13. package/dist/PMXParser-2VTA737I.js +13 -0
  14. package/dist/{PMXParser-YBS3B6HM.js.map → PMXParser-2VTA737I.js.map} +1 -1
  15. package/dist/PMXParser-RNVQL76A.mjs +4 -0
  16. package/dist/{PMXParser-L6IWHL4I.mjs.map → PMXParser-RNVQL76A.mjs.map} +1 -1
  17. package/dist/analytics/index.js +46 -45
  18. package/dist/analytics/index.js.map +1 -1
  19. package/dist/analytics/index.mjs +45 -44
  20. package/dist/analytics/index.mjs.map +1 -1
  21. package/dist/analytics/server/index.js +4 -4
  22. package/dist/analytics/server/index.js.map +1 -1
  23. package/dist/analytics/server/index.mjs +4 -4
  24. package/dist/analytics/server/index.mjs.map +1 -1
  25. package/dist/api/index.js +5 -5
  26. package/dist/api/index.js.map +1 -1
  27. package/dist/api/index.mjs +5 -5
  28. package/dist/api/index.mjs.map +1 -1
  29. package/dist/audioDetection/index.js +17 -16
  30. package/dist/audioDetection/index.js.map +1 -1
  31. package/dist/audioDetection/index.mjs +17 -16
  32. package/dist/audioDetection/index.mjs.map +1 -1
  33. package/dist/auth/client/index.js +4 -4
  34. package/dist/auth/client/index.mjs +1 -1
  35. package/dist/auth/components/index.js +3 -3
  36. package/dist/auth/components/index.js.map +1 -1
  37. package/dist/auth/components/index.mjs +3 -3
  38. package/dist/auth/components/index.mjs.map +1 -1
  39. package/dist/auth/index.js +29 -29
  40. package/dist/auth/index.mjs +5 -5
  41. package/dist/auth/middleware/index.js +3 -3
  42. package/dist/auth/middleware/index.mjs +2 -2
  43. package/dist/auth/routes/index.js +14 -14
  44. package/dist/auth/routes/index.mjs +2 -2
  45. package/dist/auth/services/index.js +7 -7
  46. package/dist/auth/services/index.mjs +1 -1
  47. package/dist/calendar/index.js +146 -182
  48. package/dist/calendar/index.js.map +1 -1
  49. package/dist/calendar/index.mjs +139 -175
  50. package/dist/calendar/index.mjs.map +1 -1
  51. package/dist/calendar/routes/index.js +1 -1
  52. package/dist/calendar/routes/index.js.map +1 -1
  53. package/dist/calendar/routes/index.mjs +1 -1
  54. package/dist/calendar/routes/index.mjs.map +1 -1
  55. package/dist/{chunk-5YQ5B7IZ.js → chunk-24HGREE6.js} +5 -5
  56. package/dist/{chunk-5YQ5B7IZ.js.map → chunk-24HGREE6.js.map} +1 -1
  57. package/dist/{chunk-6PRFP5EG.js → chunk-25OFOKNF.js} +6 -6
  58. package/dist/chunk-25OFOKNF.js.map +1 -0
  59. package/dist/{chunk-KQGP6BTS.mjs → chunk-3DXPQ4YV.mjs} +6 -6
  60. package/dist/chunk-3DXPQ4YV.mjs.map +1 -0
  61. package/dist/{chunk-3BGPZN4X.mjs → chunk-3NHAT7D4.mjs} +12 -12
  62. package/dist/chunk-3NHAT7D4.mjs.map +1 -0
  63. package/dist/{chunk-MW4BCIZC.mjs → chunk-4HC6M7FK.mjs} +3 -3
  64. package/dist/chunk-4HC6M7FK.mjs.map +1 -0
  65. package/dist/{chunk-ESRCX5TQ.mjs → chunk-52TN2QSS.mjs} +3 -3
  66. package/dist/{chunk-ESRCX5TQ.mjs.map → chunk-52TN2QSS.mjs.map} +1 -1
  67. package/dist/{chunk-CNTILN5J.mjs → chunk-5YQ62BKX.mjs} +20 -19
  68. package/dist/chunk-5YQ62BKX.mjs.map +1 -0
  69. package/dist/{chunk-6W5BMXJG.js → chunk-6OWNMJKG.js} +4 -4
  70. package/dist/{chunk-6W5BMXJG.js.map → chunk-6OWNMJKG.js.map} +1 -1
  71. package/dist/{chunk-DUHZ7VZP.js → chunk-7VRT55ZD.js} +3 -3
  72. package/dist/chunk-7VRT55ZD.js.map +1 -0
  73. package/dist/{chunk-3WOAPLEG.mjs → chunk-EB4NR623.mjs} +27 -26
  74. package/dist/chunk-EB4NR623.mjs.map +1 -0
  75. package/dist/chunk-EI27JKND.mjs +1988 -0
  76. package/dist/chunk-EI27JKND.mjs.map +1 -0
  77. package/dist/{chunk-CD77U7LZ.js → chunk-GBPLX42J.js} +9 -9
  78. package/dist/chunk-GBPLX42J.js.map +1 -0
  79. package/dist/{chunk-TFQF2HDO.mjs → chunk-HDEOCX2L.mjs} +12 -12
  80. package/dist/chunk-HDEOCX2L.mjs.map +1 -0
  81. package/dist/{chunk-TV3VKRJK.mjs → chunk-HDMIOOZY.mjs} +38 -68
  82. package/dist/chunk-HDMIOOZY.mjs.map +1 -0
  83. package/dist/{chunk-OPPF3326.js → chunk-HJ6MH7J7.js} +39 -69
  84. package/dist/chunk-HJ6MH7J7.js.map +1 -0
  85. package/dist/chunk-KO73EBUT.js +80 -0
  86. package/dist/chunk-KO73EBUT.js.map +1 -0
  87. package/dist/{chunk-6YKMCPQI.mjs → chunk-KZKIH4AS.mjs} +4 -4
  88. package/dist/chunk-KZKIH4AS.mjs.map +1 -0
  89. package/dist/{chunk-LX4XX6W7.js → chunk-L47ZOYHL.js} +15 -89
  90. package/dist/chunk-L47ZOYHL.js.map +1 -0
  91. package/dist/{chunk-6MQUBPKB.mjs → chunk-LJ4CCSSY.mjs} +3 -3
  92. package/dist/{chunk-6MQUBPKB.mjs.map → chunk-LJ4CCSSY.mjs.map} +1 -1
  93. package/dist/{chunk-TOC5FSHP.js → chunk-NJ2SNXBJ.js} +12 -12
  94. package/dist/chunk-NJ2SNXBJ.js.map +1 -0
  95. package/dist/{chunk-OCR5DS4C.mjs → chunk-PE5EAHZK.mjs} +3 -3
  96. package/dist/chunk-PE5EAHZK.mjs.map +1 -0
  97. package/dist/{chunk-LZHMNOED.js → chunk-Q5EDCKQA.js} +26 -26
  98. package/dist/chunk-Q5EDCKQA.js.map +1 -0
  99. package/dist/{chunk-CLKKZSPZ.js → chunk-RBKGYWME.js} +20 -19
  100. package/dist/chunk-RBKGYWME.js.map +1 -0
  101. package/dist/{chunk-VRTRSEEH.mjs → chunk-RSJSZ7QH.mjs} +11 -11
  102. package/dist/chunk-RSJSZ7QH.mjs.map +1 -0
  103. package/dist/{chunk-E7RGBAYJ.js → chunk-TDCDEBGP.js} +30 -29
  104. package/dist/chunk-TDCDEBGP.js.map +1 -0
  105. package/dist/{chunk-JZXJQMVE.js → chunk-UIFFDRTE.js} +11 -11
  106. package/dist/chunk-UIFFDRTE.js.map +1 -0
  107. package/dist/{chunk-T5OZHYVM.mjs → chunk-UKT3PLON.mjs} +13 -85
  108. package/dist/chunk-UKT3PLON.mjs.map +1 -0
  109. package/dist/{chunk-UOFTHYIH.js → chunk-UL6XJGUZ.js} +4 -4
  110. package/dist/chunk-UL6XJGUZ.js.map +1 -0
  111. package/dist/chunk-VVWQTO4Y.mjs +77 -0
  112. package/dist/chunk-VVWQTO4Y.mjs.map +1 -0
  113. package/dist/{chunk-A3UP56MS.js → chunk-WA67GZSZ.js} +3 -3
  114. package/dist/chunk-WA67GZSZ.js.map +1 -0
  115. package/dist/{chunk-OLHGZXN3.mjs → chunk-WEEXCPSE.mjs} +5 -5
  116. package/dist/chunk-WEEXCPSE.mjs.map +1 -0
  117. package/dist/chunk-XGBE4SUV.js +2093 -0
  118. package/dist/chunk-XGBE4SUV.js.map +1 -0
  119. package/dist/{chunk-QU5OT4DF.js → chunk-XJ7ZAGC5.js} +5 -5
  120. package/dist/chunk-XJ7ZAGC5.js.map +1 -0
  121. package/dist/{chunk-ZI25QCHD.mjs → chunk-YOTQG4NP.mjs} +25 -25
  122. package/dist/chunk-YOTQG4NP.mjs.map +1 -0
  123. package/dist/{chunk-QAT2RWAO.mjs → chunk-Z36R3P62.mjs} +7 -7
  124. package/dist/chunk-Z36R3P62.mjs.map +1 -0
  125. package/dist/{chunk-7Z5LLJ3A.js → chunk-ZWQJSZEY.js} +13 -13
  126. package/dist/chunk-ZWQJSZEY.js.map +1 -0
  127. package/dist/config/index.js +6 -6
  128. package/dist/config/index.js.map +1 -1
  129. package/dist/config/index.mjs +6 -6
  130. package/dist/config/index.mjs.map +1 -1
  131. package/dist/config/server/index.js +37 -37
  132. package/dist/config/server/index.js.map +1 -1
  133. package/dist/config/server/index.mjs +37 -37
  134. package/dist/config/server/index.mjs.map +1 -1
  135. package/dist/i18n/index.d.mts +2 -2
  136. package/dist/i18n/index.d.ts +2 -2
  137. package/dist/i18n/index.js +16 -17
  138. package/dist/i18n/index.js.map +1 -1
  139. package/dist/i18n/index.mjs +16 -17
  140. package/dist/i18n/index.mjs.map +1 -1
  141. package/dist/imageCrop/index.js +11 -10
  142. package/dist/imageCrop/index.js.map +1 -1
  143. package/dist/imageCrop/index.mjs +11 -10
  144. package/dist/imageCrop/index.mjs.map +1 -1
  145. package/dist/index.d.mts +185 -100
  146. package/dist/index.d.ts +185 -100
  147. package/dist/index.js +225 -249
  148. package/dist/index.js.map +1 -1
  149. package/dist/index.mjs +80 -104
  150. package/dist/index.mjs.map +1 -1
  151. package/dist/logger/index.js +6 -6
  152. package/dist/logger/index.mjs +1 -1
  153. package/dist/mikuFusionGame/index.d.mts +112 -0
  154. package/dist/mikuFusionGame/index.d.ts +112 -0
  155. package/dist/mikuFusionGame/index.js +680 -0
  156. package/dist/mikuFusionGame/index.js.map +1 -0
  157. package/dist/mikuFusionGame/index.mjs +667 -0
  158. package/dist/mikuFusionGame/index.mjs.map +1 -0
  159. package/dist/mmd/admin/index.js +11 -10
  160. package/dist/mmd/admin/index.js.map +1 -1
  161. package/dist/mmd/admin/index.mjs +11 -10
  162. package/dist/mmd/admin/index.mjs.map +1 -1
  163. package/dist/mmd/index.js +223 -241
  164. package/dist/mmd/index.js.map +1 -1
  165. package/dist/mmd/index.mjs +220 -238
  166. package/dist/mmd/index.mjs.map +1 -1
  167. package/dist/mmd/server/index.js +6 -6
  168. package/dist/mmd/server/index.js.map +1 -1
  169. package/dist/mmd/server/index.mjs +6 -6
  170. package/dist/mmd/server/index.mjs.map +1 -1
  171. package/dist/music/index.js +16 -16
  172. package/dist/music/index.mjs +2 -2
  173. package/dist/music/server/index.js +8 -8
  174. package/dist/music/server/index.mjs +1 -1
  175. package/dist/request/index.js +2 -2
  176. package/dist/request/index.js.map +1 -1
  177. package/dist/request/index.mjs +2 -2
  178. package/dist/request/index.mjs.map +1 -1
  179. package/dist/storage/index.js +15 -14
  180. package/dist/storage/index.mjs +3 -2
  181. package/dist/testYourself/admin/index.js +3 -3
  182. package/dist/testYourself/admin/index.mjs +1 -1
  183. package/dist/testYourself/index.js +22 -22
  184. package/dist/testYourself/index.js.map +1 -1
  185. package/dist/testYourself/index.mjs +14 -14
  186. package/dist/testYourself/index.mjs.map +1 -1
  187. package/dist/testYourself/server/index.js +4 -4
  188. package/dist/testYourself/server/index.mjs +1 -1
  189. package/dist/universalExport/index.d.mts +3 -3
  190. package/dist/universalExport/index.d.ts +3 -3
  191. package/dist/universalExport/index.js +48 -47
  192. package/dist/universalExport/index.js.map +1 -1
  193. package/dist/universalExport/index.mjs +48 -47
  194. package/dist/universalExport/index.mjs.map +1 -1
  195. package/dist/universalExport/server/index.js +29 -29
  196. package/dist/universalExport/server/index.js.map +1 -1
  197. package/dist/universalExport/server/index.mjs +28 -28
  198. package/dist/universalExport/server/index.mjs.map +1 -1
  199. package/dist/universalFile/index.d.mts +3 -3
  200. package/dist/universalFile/index.d.ts +3 -3
  201. package/dist/universalFile/index.js +73 -72
  202. package/dist/universalFile/index.js.map +1 -1
  203. package/dist/universalFile/index.mjs +73 -72
  204. package/dist/universalFile/index.mjs.map +1 -1
  205. package/dist/universalFile/server/index.js +258 -260
  206. package/dist/universalFile/server/index.js.map +1 -1
  207. package/dist/universalFile/server/index.mjs +244 -246
  208. package/dist/universalFile/server/index.mjs.map +1 -1
  209. package/dist/utils/index.js +11 -11
  210. package/dist/utils/index.mjs +2 -2
  211. package/package.json +25 -31
  212. package/dist/AliyunOSSProvider-FWAKUB2T.js +0 -15
  213. package/dist/AliyunOSSProvider-KJYRIZES.mjs +0 -6
  214. package/dist/ConfigService-7MEZXKJ5.js +0 -21
  215. package/dist/ConfigService-BV57YYFW.mjs +0 -4
  216. package/dist/LocalStorageProvider-RTPMUOZ2.mjs +0 -6
  217. package/dist/LocalStorageProvider-XSRCUXOU.js +0 -15
  218. package/dist/PMXParser-L6IWHL4I.mjs +0 -4
  219. package/dist/PMXParser-YBS3B6HM.js +0 -13
  220. package/dist/chunk-3BGPZN4X.mjs.map +0 -1
  221. package/dist/chunk-3WOAPLEG.mjs.map +0 -1
  222. package/dist/chunk-6PRFP5EG.js.map +0 -1
  223. package/dist/chunk-6YKMCPQI.mjs.map +0 -1
  224. package/dist/chunk-7Z5LLJ3A.js.map +0 -1
  225. package/dist/chunk-A3UP56MS.js.map +0 -1
  226. package/dist/chunk-CD77U7LZ.js.map +0 -1
  227. package/dist/chunk-CLKKZSPZ.js.map +0 -1
  228. package/dist/chunk-CNTILN5J.mjs.map +0 -1
  229. package/dist/chunk-DUHZ7VZP.js.map +0 -1
  230. package/dist/chunk-DW2ZTOCV.js +0 -1727
  231. package/dist/chunk-DW2ZTOCV.js.map +0 -1
  232. package/dist/chunk-E7RGBAYJ.js.map +0 -1
  233. package/dist/chunk-JZXJQMVE.js.map +0 -1
  234. package/dist/chunk-KQGP6BTS.mjs.map +0 -1
  235. package/dist/chunk-LFG6FPM5.mjs +0 -1597
  236. package/dist/chunk-LFG6FPM5.mjs.map +0 -1
  237. package/dist/chunk-LX4XX6W7.js.map +0 -1
  238. package/dist/chunk-LZHMNOED.js.map +0 -1
  239. package/dist/chunk-MW4BCIZC.mjs.map +0 -1
  240. package/dist/chunk-OCR5DS4C.mjs.map +0 -1
  241. package/dist/chunk-OLHGZXN3.mjs.map +0 -1
  242. package/dist/chunk-OPPF3326.js.map +0 -1
  243. package/dist/chunk-QAT2RWAO.mjs.map +0 -1
  244. package/dist/chunk-QU5OT4DF.js.map +0 -1
  245. package/dist/chunk-T5OZHYVM.mjs.map +0 -1
  246. package/dist/chunk-TFQF2HDO.mjs.map +0 -1
  247. package/dist/chunk-TOC5FSHP.js.map +0 -1
  248. package/dist/chunk-TV3VKRJK.mjs.map +0 -1
  249. package/dist/chunk-UOFTHYIH.js.map +0 -1
  250. package/dist/chunk-VRTRSEEH.mjs.map +0 -1
  251. package/dist/chunk-ZI25QCHD.mjs.map +0 -1
@@ -1,1597 +0,0 @@
1
- import { cn } from './chunk-3BGPZN4X.mjs';
2
- import * as React23 from 'react';
3
- import React23__default, { useRef, useState, useEffect, useCallback } from 'react';
4
- import { Slot } from '@radix-ui/react-slot';
5
- import { cva } from 'class-variance-authority';
6
- import * as LabelPrimitive from '@radix-ui/react-label';
7
- import * as TabsPrimitive from '@radix-ui/react-tabs';
8
- import * as DialogPrimitive from '@radix-ui/react-dialog';
9
- import { X, ChevronRight, Check, Circle, ChevronDown, ChevronUp, RotateCcw, Save, AlertCircle, GripVertical } from 'lucide-react';
10
- import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
11
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
12
- import * as PopoverPrimitive from '@radix-ui/react-popover';
13
- import * as ProgressPrimitive from '@radix-ui/react-progress';
14
- import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
15
- import * as SelectPrimitive from '@radix-ui/react-select';
16
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
17
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
18
- import * as AvatarPrimitive from '@radix-ui/react-avatar';
19
- import { useRouter } from 'next/navigation';
20
-
21
- var buttonVariants = cva(
22
- "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",
23
- {
24
- variants: {
25
- variant: {
26
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
27
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
28
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
29
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
30
- ghost: "hover:bg-accent hover:text-accent-foreground",
31
- link: "text-primary underline-offset-4 hover:underline"
32
- },
33
- size: {
34
- default: "h-9 px-4 py-2",
35
- sm: "h-8 rounded-md px-3 text-xs",
36
- lg: "h-10 rounded-md px-8",
37
- icon: "h-9 w-9"
38
- }
39
- },
40
- defaultVariants: {
41
- variant: "default",
42
- size: "default"
43
- }
44
- }
45
- );
46
- var Button = React23.forwardRef(
47
- ({ className, variant = "default", size = "default", asChild = false, ...props }, ref) => {
48
- const Comp = asChild ? Slot : "button";
49
- return /* @__PURE__ */ React23.createElement(
50
- Comp,
51
- {
52
- className: cn(buttonVariants({ variant, size, className })),
53
- ref,
54
- ...props
55
- }
56
- );
57
- }
58
- );
59
- Button.displayName = "Button";
60
- var Card = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
61
- "div",
62
- {
63
- ref,
64
- className: cn(
65
- "rounded-xl border bg-card text-card-foreground shadow",
66
- className
67
- ),
68
- ...props
69
- }
70
- ));
71
- Card.displayName = "Card";
72
- var CardHeader = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
73
- "div",
74
- {
75
- ref,
76
- className: cn("flex flex-col space-y-1.5 p-6", className),
77
- ...props
78
- }
79
- ));
80
- CardHeader.displayName = "CardHeader";
81
- var CardTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
82
- "div",
83
- {
84
- ref,
85
- className: cn("font-semibold leading-none tracking-tight", className),
86
- ...props
87
- }
88
- ));
89
- CardTitle.displayName = "CardTitle";
90
- var CardDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
91
- "div",
92
- {
93
- ref,
94
- className: cn("text-sm text-muted-foreground", className),
95
- ...props
96
- }
97
- ));
98
- CardDescription.displayName = "CardDescription";
99
- var CardContent = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement("div", { ref, className: cn("p-6 pt-0", className), ...props }));
100
- CardContent.displayName = "CardContent";
101
- var CardFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
102
- "div",
103
- {
104
- ref,
105
- className: cn("flex items-center p-6 pt-0", className),
106
- ...props
107
- }
108
- ));
109
- CardFooter.displayName = "CardFooter";
110
- var badgeVariants = cva(
111
- "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",
112
- {
113
- variants: {
114
- variant: {
115
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
116
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
117
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
118
- outline: "text-foreground"
119
- }
120
- },
121
- defaultVariants: {
122
- variant: "default"
123
- }
124
- }
125
- );
126
- function Badge({ className, variant, ...props }) {
127
- return /* @__PURE__ */ React23.createElement("div", { className: cn(badgeVariants({ variant }), className), ...props });
128
- }
129
- var Input = React23.forwardRef(
130
- ({ className, type, ...props }, ref) => {
131
- return /* @__PURE__ */ React23.createElement(
132
- "input",
133
- {
134
- type,
135
- className: cn(
136
- "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",
137
- className
138
- ),
139
- ref,
140
- ...props
141
- }
142
- );
143
- }
144
- );
145
- Input.displayName = "Input";
146
- var labelVariants = cva(
147
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
148
- );
149
- var Label = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
150
- LabelPrimitive.Root,
151
- {
152
- ref,
153
- className: cn(labelVariants(), className),
154
- ...props
155
- }
156
- ));
157
- Label.displayName = LabelPrimitive.Root.displayName;
158
- var Tabs = TabsPrimitive.Root;
159
- var TabsList = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
160
- TabsPrimitive.List,
161
- {
162
- ref,
163
- className: cn(
164
- "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
165
- className
166
- ),
167
- ...props
168
- }
169
- ));
170
- TabsList.displayName = TabsPrimitive.List.displayName;
171
- var TabsTrigger = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
172
- TabsPrimitive.Trigger,
173
- {
174
- ref,
175
- className: cn(
176
- "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",
177
- className
178
- ),
179
- ...props
180
- }
181
- ));
182
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
183
- var TabsContent = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
184
- TabsPrimitive.Content,
185
- {
186
- ref,
187
- className: cn(
188
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
189
- className
190
- ),
191
- ...props
192
- }
193
- ));
194
- TabsContent.displayName = TabsPrimitive.Content.displayName;
195
- var Dialog = DialogPrimitive.Root;
196
- var DialogTrigger = DialogPrimitive.Trigger;
197
- var DialogPortal = DialogPrimitive.Portal;
198
- var DialogClose = DialogPrimitive.Close;
199
- var DialogOverlay = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
200
- DialogPrimitive.Overlay,
201
- {
202
- ref,
203
- className: cn(
204
- "fixed inset-0 z-[9999] 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",
205
- className
206
- ),
207
- ...props
208
- }
209
- ));
210
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
211
- var DialogContent = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(DialogPortal, null, /* @__PURE__ */ React23.createElement(DialogOverlay, null), /* @__PURE__ */ React23.createElement(
212
- DialogPrimitive.Content,
213
- {
214
- ref,
215
- className: cn(
216
- "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",
217
- className
218
- ),
219
- ...props
220
- },
221
- children,
222
- /* @__PURE__ */ React23.createElement(DialogPrimitive.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.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React23.createElement("span", { className: "sr-only" }, "Close"))
223
- )));
224
- DialogContent.displayName = DialogPrimitive.Content.displayName;
225
- var DialogHeader = ({
226
- className,
227
- ...props
228
- }) => /* @__PURE__ */ React23.createElement(
229
- "div",
230
- {
231
- className: cn(
232
- "flex flex-col space-y-1.5 text-center sm:text-left",
233
- className
234
- ),
235
- ...props
236
- }
237
- );
238
- DialogHeader.displayName = "DialogHeader";
239
- var DialogFooter = ({
240
- className,
241
- ...props
242
- }) => /* @__PURE__ */ React23.createElement(
243
- "div",
244
- {
245
- className: cn(
246
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
247
- className
248
- ),
249
- ...props
250
- }
251
- );
252
- DialogFooter.displayName = "DialogFooter";
253
- var DialogTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
254
- DialogPrimitive.Title,
255
- {
256
- ref,
257
- className: cn(
258
- "text-lg font-semibold leading-none tracking-tight",
259
- className
260
- ),
261
- ...props
262
- }
263
- ));
264
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
265
- var DialogDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
266
- DialogPrimitive.Description,
267
- {
268
- ref,
269
- className: cn("text-sm text-muted-foreground", className),
270
- ...props
271
- }
272
- ));
273
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
274
- var AlertDialog = AlertDialogPrimitive.Root;
275
- var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
276
- var AlertDialogPortal = AlertDialogPrimitive.Portal;
277
- var AlertDialogOverlay = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
278
- AlertDialogPrimitive.Overlay,
279
- {
280
- className: cn(
281
- "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",
282
- className
283
- ),
284
- ...props,
285
- ref
286
- }
287
- ));
288
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
289
- var AlertDialogContent = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(AlertDialogPortal, null, /* @__PURE__ */ React23.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React23.createElement(
290
- AlertDialogPrimitive.Content,
291
- {
292
- ref,
293
- className: cn(
294
- "fixed left-[50%] top-[50%] z-[9999] 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",
295
- className
296
- ),
297
- ...props
298
- }
299
- )));
300
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
301
- var AlertDialogHeader = ({
302
- className,
303
- ...props
304
- }) => /* @__PURE__ */ React23.createElement(
305
- "div",
306
- {
307
- className: cn(
308
- "flex flex-col space-y-2 text-center sm:text-left",
309
- className
310
- ),
311
- ...props
312
- }
313
- );
314
- AlertDialogHeader.displayName = "AlertDialogHeader";
315
- var AlertDialogFooter = ({
316
- className,
317
- ...props
318
- }) => /* @__PURE__ */ React23.createElement(
319
- "div",
320
- {
321
- className: cn(
322
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
323
- className
324
- ),
325
- ...props
326
- }
327
- );
328
- AlertDialogFooter.displayName = "AlertDialogFooter";
329
- var AlertDialogTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
330
- AlertDialogPrimitive.Title,
331
- {
332
- ref,
333
- className: cn("text-lg font-semibold", className),
334
- ...props
335
- }
336
- ));
337
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
338
- var AlertDialogDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
339
- AlertDialogPrimitive.Description,
340
- {
341
- ref,
342
- className: cn("text-sm text-muted-foreground", className),
343
- ...props
344
- }
345
- ));
346
- AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
347
- var AlertDialogAction = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
348
- AlertDialogPrimitive.Action,
349
- {
350
- ref,
351
- className: cn(buttonVariants(), className),
352
- ...props
353
- }
354
- ));
355
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
356
- var AlertDialogCancel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
357
- AlertDialogPrimitive.Cancel,
358
- {
359
- ref,
360
- className: cn(
361
- buttonVariants({ variant: "outline" }),
362
- "mt-2 sm:mt-0",
363
- className
364
- ),
365
- ...props
366
- }
367
- ));
368
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
369
- var DropdownMenu = DropdownMenuPrimitive.Root;
370
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
371
- var DropdownMenuGroup = DropdownMenuPrimitive.Group;
372
- var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
373
- var DropdownMenuSub = DropdownMenuPrimitive.Sub;
374
- var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
375
- var DropdownMenuSubTrigger = React23.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(
376
- DropdownMenuPrimitive.SubTrigger,
377
- {
378
- ref,
379
- className: cn(
380
- "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",
381
- inset && "pl-8",
382
- className
383
- ),
384
- ...props
385
- },
386
- children,
387
- /* @__PURE__ */ React23.createElement(ChevronRight, { className: "ml-auto" })
388
- ));
389
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
390
- var DropdownMenuSubContent = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
391
- DropdownMenuPrimitive.SubContent,
392
- {
393
- ref,
394
- className: cn(
395
- "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]",
396
- className
397
- ),
398
- ...props
399
- }
400
- ));
401
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
402
- var DropdownMenuContent = React23.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React23.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React23.createElement(
403
- DropdownMenuPrimitive.Content,
404
- {
405
- ref,
406
- sideOffset,
407
- className: cn(
408
- "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",
409
- "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]",
410
- className
411
- ),
412
- ...props
413
- }
414
- )));
415
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
416
- var DropdownMenuItem = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React23.createElement(
417
- DropdownMenuPrimitive.Item,
418
- {
419
- ref,
420
- className: cn(
421
- "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",
422
- inset && "pl-8",
423
- className
424
- ),
425
- ...props
426
- }
427
- ));
428
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
429
- var DropdownMenuCheckboxItem = React23.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React23.createElement(
430
- DropdownMenuPrimitive.CheckboxItem,
431
- {
432
- ref,
433
- className: cn(
434
- "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",
435
- className
436
- ),
437
- checked,
438
- ...props
439
- },
440
- /* @__PURE__ */ React23.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React23.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React23.createElement(Check, { className: "h-4 w-4" }))),
441
- children
442
- ));
443
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
444
- var DropdownMenuRadioItem = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(
445
- DropdownMenuPrimitive.RadioItem,
446
- {
447
- ref,
448
- className: cn(
449
- "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",
450
- className
451
- ),
452
- ...props
453
- },
454
- /* @__PURE__ */ React23.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React23.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React23.createElement(Circle, { className: "h-2 w-2 fill-current" }))),
455
- children
456
- ));
457
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
458
- var DropdownMenuLabel = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React23.createElement(
459
- DropdownMenuPrimitive.Label,
460
- {
461
- ref,
462
- className: cn(
463
- "px-2 py-1.5 text-sm font-semibold",
464
- inset && "pl-8",
465
- className
466
- ),
467
- ...props
468
- }
469
- ));
470
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
471
- var DropdownMenuSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
472
- DropdownMenuPrimitive.Separator,
473
- {
474
- ref,
475
- className: cn("-mx-1 my-1 h-px bg-muted", className),
476
- ...props
477
- }
478
- ));
479
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
480
- var DropdownMenuShortcut = ({
481
- className,
482
- ...props
483
- }) => {
484
- return /* @__PURE__ */ React23.createElement(
485
- "span",
486
- {
487
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
488
- ...props
489
- }
490
- );
491
- };
492
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
493
- var Popover = PopoverPrimitive.Root;
494
- var PopoverTrigger = PopoverPrimitive.Trigger;
495
- var PopoverAnchor = PopoverPrimitive.Anchor;
496
- var PopoverContent = React23.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React23.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React23.createElement(
497
- PopoverPrimitive.Content,
498
- {
499
- ref,
500
- align,
501
- sideOffset,
502
- className: cn(
503
- "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]",
504
- className
505
- ),
506
- ...props
507
- }
508
- )));
509
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
510
- var Progress = React23.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React23.createElement(
511
- ProgressPrimitive.Root,
512
- {
513
- ref,
514
- className: cn(
515
- "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
516
- className
517
- ),
518
- ...props
519
- },
520
- /* @__PURE__ */ React23.createElement(
521
- ProgressPrimitive.Indicator,
522
- {
523
- className: "h-full w-full flex-1 bg-primary transition-all",
524
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
525
- }
526
- )
527
- ));
528
- Progress.displayName = ProgressPrimitive.Root.displayName;
529
- var ScrollArea = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(
530
- ScrollAreaPrimitive.Root,
531
- {
532
- ref,
533
- className: cn("relative overflow-hidden", className),
534
- ...props
535
- },
536
- /* @__PURE__ */ React23.createElement(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]" }, children),
537
- /* @__PURE__ */ React23.createElement(ScrollBar, null),
538
- /* @__PURE__ */ React23.createElement(ScrollAreaPrimitive.Corner, null)
539
- ));
540
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
541
- var ScrollBar = React23.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React23.createElement(
542
- ScrollAreaPrimitive.ScrollAreaScrollbar,
543
- {
544
- ref,
545
- orientation,
546
- className: cn(
547
- "flex touch-none select-none transition-colors",
548
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
549
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
550
- className
551
- ),
552
- ...props
553
- },
554
- /* @__PURE__ */ React23.createElement(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
555
- ));
556
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
557
- var Select = SelectPrimitive.Root;
558
- var SelectGroup = SelectPrimitive.Group;
559
- var SelectValue = SelectPrimitive.Value;
560
- var SelectTrigger = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(
561
- SelectPrimitive.Trigger,
562
- {
563
- ref,
564
- className: cn(
565
- "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",
566
- className
567
- ),
568
- ...props
569
- },
570
- children,
571
- /* @__PURE__ */ React23.createElement(SelectPrimitive.Icon, { asChild: true }, /* @__PURE__ */ React23.createElement(ChevronDown, { className: "h-4 w-4 opacity-50" }))
572
- ));
573
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
574
- var SelectScrollUpButton = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
575
- SelectPrimitive.ScrollUpButton,
576
- {
577
- ref,
578
- className: cn(
579
- "flex cursor-default items-center justify-center py-1",
580
- className
581
- ),
582
- ...props
583
- },
584
- /* @__PURE__ */ React23.createElement(ChevronUp, { className: "h-4 w-4" })
585
- ));
586
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
587
- var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
588
- SelectPrimitive.ScrollDownButton,
589
- {
590
- ref,
591
- className: cn(
592
- "flex cursor-default items-center justify-center py-1",
593
- className
594
- ),
595
- ...props
596
- },
597
- /* @__PURE__ */ React23.createElement(ChevronDown, { className: "h-4 w-4" })
598
- ));
599
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
600
- var SelectContent = React23.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ React23.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React23.createElement(
601
- SelectPrimitive.Content,
602
- {
603
- ref,
604
- className: cn(
605
- "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]",
606
- 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",
607
- className
608
- ),
609
- position,
610
- ...props
611
- },
612
- /* @__PURE__ */ React23.createElement(SelectScrollUpButton, null),
613
- /* @__PURE__ */ React23.createElement(
614
- SelectPrimitive.Viewport,
615
- {
616
- className: cn(
617
- "p-1",
618
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
619
- )
620
- },
621
- children
622
- ),
623
- /* @__PURE__ */ React23.createElement(SelectScrollDownButton, null)
624
- )));
625
- SelectContent.displayName = SelectPrimitive.Content.displayName;
626
- var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
627
- SelectPrimitive.Label,
628
- {
629
- ref,
630
- className: cn("px-2 py-1.5 text-sm font-semibold", className),
631
- ...props
632
- }
633
- ));
634
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
635
- var SelectItem = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(
636
- SelectPrimitive.Item,
637
- {
638
- ref,
639
- className: cn(
640
- "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",
641
- className
642
- ),
643
- ...props
644
- },
645
- /* @__PURE__ */ React23.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React23.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React23.createElement(Check, { className: "h-4 w-4" }))),
646
- /* @__PURE__ */ React23.createElement(SelectPrimitive.ItemText, null, children)
647
- ));
648
- SelectItem.displayName = SelectPrimitive.Item.displayName;
649
- var SelectSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
650
- SelectPrimitive.Separator,
651
- {
652
- ref,
653
- className: cn("-mx-1 my-1 h-px bg-muted", className),
654
- ...props
655
- }
656
- ));
657
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
658
- var Separator3 = React23.forwardRef(
659
- ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React23.createElement(
660
- SeparatorPrimitive.Root,
661
- {
662
- ref,
663
- decorative,
664
- orientation,
665
- className: cn(
666
- "shrink-0 bg-border",
667
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
668
- className
669
- ),
670
- ...props
671
- }
672
- )
673
- );
674
- Separator3.displayName = SeparatorPrimitive.Root.displayName;
675
- var Sheet = DialogPrimitive.Root;
676
- var SheetTrigger = DialogPrimitive.Trigger;
677
- var SheetClose = DialogPrimitive.Close;
678
- var SheetPortal = DialogPrimitive.Portal;
679
- var SheetOverlay = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
680
- DialogPrimitive.Overlay,
681
- {
682
- className: cn(
683
- "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",
684
- className
685
- ),
686
- ...props,
687
- ref
688
- }
689
- ));
690
- SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
691
- var sheetVariants = cva(
692
- "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",
693
- {
694
- variants: {
695
- side: {
696
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
697
- bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
698
- 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",
699
- 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"
700
- }
701
- },
702
- defaultVariants: {
703
- side: "right"
704
- }
705
- }
706
- );
707
- var SheetContent = React23.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(SheetPortal, null, /* @__PURE__ */ React23.createElement(SheetOverlay, null), /* @__PURE__ */ React23.createElement(
708
- DialogPrimitive.Content,
709
- {
710
- ref,
711
- className: cn(sheetVariants({ side }), className),
712
- ...props
713
- },
714
- /* @__PURE__ */ React23.createElement(DialogPrimitive.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.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React23.createElement("span", { className: "sr-only" }, "Close")),
715
- children
716
- )));
717
- SheetContent.displayName = DialogPrimitive.Content.displayName;
718
- var SheetHeader = ({
719
- className,
720
- ...props
721
- }) => /* @__PURE__ */ React23.createElement(
722
- "div",
723
- {
724
- className: cn(
725
- "flex flex-col space-y-2 text-center sm:text-left",
726
- className
727
- ),
728
- ...props
729
- }
730
- );
731
- SheetHeader.displayName = "SheetHeader";
732
- var SheetFooter = ({
733
- className,
734
- ...props
735
- }) => /* @__PURE__ */ React23.createElement(
736
- "div",
737
- {
738
- className: cn(
739
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
740
- className
741
- ),
742
- ...props
743
- }
744
- );
745
- SheetFooter.displayName = "SheetFooter";
746
- var SheetTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
747
- DialogPrimitive.Title,
748
- {
749
- ref,
750
- className: cn("text-lg font-semibold text-foreground", className),
751
- ...props
752
- }
753
- ));
754
- SheetTitle.displayName = DialogPrimitive.Title.displayName;
755
- var SheetDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
756
- DialogPrimitive.Description,
757
- {
758
- ref,
759
- className: cn("text-sm text-muted-foreground", className),
760
- ...props
761
- }
762
- ));
763
- SheetDescription.displayName = DialogPrimitive.Description.displayName;
764
- var Textarea = React23.forwardRef(({ className, ...props }, ref) => {
765
- return /* @__PURE__ */ React23.createElement(
766
- "textarea",
767
- {
768
- className: cn(
769
- "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",
770
- className
771
- ),
772
- ref,
773
- ...props
774
- }
775
- );
776
- });
777
- Textarea.displayName = "Textarea";
778
- var TooltipProvider = TooltipPrimitive.Provider;
779
- var Tooltip = TooltipPrimitive.Root;
780
- var TooltipTrigger = TooltipPrimitive.Trigger;
781
- var TooltipContent = React23.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React23.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React23.createElement(
782
- TooltipPrimitive.Content,
783
- {
784
- ref,
785
- sideOffset,
786
- className: cn(
787
- "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]",
788
- className
789
- ),
790
- ...props
791
- }
792
- )));
793
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
794
- var Avatar = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
795
- AvatarPrimitive.Root,
796
- {
797
- ref,
798
- className: cn(
799
- "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
800
- className
801
- ),
802
- ...props
803
- }
804
- ));
805
- Avatar.displayName = AvatarPrimitive.Root.displayName;
806
- var AvatarImage = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
807
- AvatarPrimitive.Image,
808
- {
809
- ref,
810
- className: cn("aspect-square h-full w-full", className),
811
- ...props
812
- }
813
- ));
814
- AvatarImage.displayName = AvatarPrimitive.Image.displayName;
815
- var AvatarFallback = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
816
- AvatarPrimitive.Fallback,
817
- {
818
- ref,
819
- className: cn(
820
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
821
- className
822
- ),
823
- ...props
824
- }
825
- ));
826
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
827
- function buildGridColsClasses(columns) {
828
- return [
829
- "grid-cols-1",
830
- // 默认单列
831
- columns.sm ? `sm:grid-cols-${columns.sm}` : "",
832
- columns.md ? `md:grid-cols-${columns.md}` : "md:grid-cols-2",
833
- columns.lg ? `lg:grid-cols-${columns.lg}` : "lg:grid-cols-3",
834
- columns.xl ? `xl:grid-cols-${columns.xl}` : ""
835
- ].filter(Boolean).join(" ");
836
- }
837
- function getGapClassName(gap) {
838
- const gapClasses = {
839
- sm: "gap-3",
840
- md: "gap-6",
841
- lg: "gap-8",
842
- xl: "gap-10"
843
- };
844
- return gapClasses[gap];
845
- }
846
- function Grid({
847
- items,
848
- renderItem,
849
- columns = { md: 2, lg: 3 },
850
- gap = "md",
851
- className = "",
852
- style
853
- }) {
854
- const gridColsClasses = buildGridColsClasses(columns);
855
- const gapClass = getGapClassName(gap);
856
- return /* @__PURE__ */ React23__default.createElement(
857
- "div",
858
- {
859
- className: `grid ${gridColsClasses} ${gapClass} ${className}`.trim(),
860
- style
861
- },
862
- items.map((item, index) => /* @__PURE__ */ React23__default.createElement("div", { key: item.id }, renderItem(item, index)))
863
- );
864
- }
865
- var SearchBox = ({
866
- searchQuery,
867
- onSearchChange,
868
- placeholder = "\u641C\u7D22\u5B9E\u9A8C\u9879\u76EE\u7684\u6807\u9898\u3001\u63CF\u8FF0\u6216\u6807\u7B7E...",
869
- size = "large"
870
- }) => {
871
- const getSizeStyles = () => {
872
- switch (size) {
873
- case "small":
874
- return {
875
- container: "h-10",
876
- input: "pl-10 pr-10 text-sm",
877
- icon: "w-4 h-4",
878
- iconPosition: "left-3",
879
- clearButton: "right-2 w-6 h-6",
880
- clearIcon: "w-3 h-3"
881
- };
882
- case "medium":
883
- return {
884
- container: "h-12",
885
- input: "pl-12 pr-12 text-base",
886
- icon: "w-5 h-5",
887
- iconPosition: "left-3",
888
- clearButton: "right-3 w-7 h-7",
889
- clearIcon: "w-4 h-4"
890
- };
891
- case "large":
892
- default:
893
- return {
894
- container: "h-16",
895
- input: "pl-6 pr-16 text-lg",
896
- icon: "w-6 h-6",
897
- iconPosition: "left-6",
898
- clearButton: "right-4 w-8 h-8",
899
- clearIcon: "w-4 h-4"
900
- };
901
- }
902
- };
903
- const styles = getSizeStyles();
904
- const isLarge = size === "large";
905
- return /* @__PURE__ */ React23__default.createElement("div", { className: "relative group w-full" }, /* @__PURE__ */ React23__default.createElement(
906
- "input",
907
- {
908
- type: "text",
909
- placeholder,
910
- value: searchQuery,
911
- onChange: (e) => onSearchChange(e.target.value),
912
- className: `
913
- w-full ${styles.container} ${styles.input}
914
- ${isLarge ? "border-2 border-gray-200 rounded-2xl shadow-lg" : "border border-gray-300 rounded-lg shadow-sm"}
915
- bg-white
916
- focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500
917
- hover:border-gray-400 ${isLarge ? "hover:shadow-xl" : "hover:shadow-md"}
918
- transition-all duration-300 ease-out
919
- text-gray-800 placeholder-gray-500
920
- ${isLarge ? "font-medium" : "font-normal"}
921
- `
922
- }
923
- ), searchQuery && /* @__PURE__ */ React23__default.createElement(
924
- "button",
925
- {
926
- onClick: () => onSearchChange(""),
927
- className: `
928
- absolute top-1/2 ${styles.clearButton} transform -translate-y-1/2
929
- z-10 group/clear
930
- `
931
- },
932
- /* @__PURE__ */ React23__default.createElement("div", { className: `
933
- ${styles.clearButton} flex items-center justify-center
934
- rounded-full
935
- bg-gray-100 hover:bg-gray-200
936
- transition-all duration-200
937
- group-hover/clear:scale-105
938
- ` }, /* @__PURE__ */ React23__default.createElement(
939
- "svg",
940
- {
941
- className: `${styles.clearIcon} text-gray-500 group-hover/clear:text-gray-700`,
942
- fill: "none",
943
- stroke: "currentColor",
944
- viewBox: "0 0 24 24"
945
- },
946
- /* @__PURE__ */ React23__default.createElement(
947
- "path",
948
- {
949
- strokeLinecap: "round",
950
- strokeLinejoin: "round",
951
- strokeWidth: 2,
952
- d: "M6 18L18 6M6 6l12 12"
953
- }
954
- )
955
- ))
956
- ));
957
- };
958
- var Timeline = ({ items = [] }) => {
959
- if (!items || items.length === 0) {
960
- return null;
961
- }
962
- return /* @__PURE__ */ React23__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React23__default.createElement("div", { className: "absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200" }), items.map((item, index) => /* @__PURE__ */ React23__default.createElement("div", { key: index, className: "relative pl-12 pb-8" }, /* @__PURE__ */ React23__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__default.createElement("div", { className: "w-2 h-2 rounded-full bg-white" })), /* @__PURE__ */ React23__default.createElement("div", { className: "bg-white rounded-lg p-4 shadow-md" }, /* @__PURE__ */ React23__default.createElement("div", { className: "text-sm text-gray-500 mb-2" }, item.date), /* @__PURE__ */ React23__default.createElement("h4", { className: "text-lg font-semibold mb-2" }, item.title), /* @__PURE__ */ React23__default.createElement("p", { className: "text-gray-600" }, item.description)))));
963
- };
964
- var CollisionBalls = ({
965
- collisionBallsConfig: {
966
- balls,
967
- width,
968
- height
969
- }
970
- }) => {
971
- const canvasRef = useRef(null);
972
- const containerRef = useRef(null);
973
- const ballsRef = useRef([]);
974
- const [isShaking, setIsShaking] = useState(false);
975
- const [draggedBall, setDraggedBall] = useState(null);
976
- const [mousePos, setMousePos] = useState({ x: 0, y: 0 });
977
- const animationRef = useRef(null);
978
- const updateCanvasSize = () => {
979
- const container = containerRef.current;
980
- const canvas = canvasRef.current;
981
- if (!container || !canvas) {
982
- console.error("Container or canvas not found");
983
- return;
984
- }
985
- const containerWidth = container.clientWidth;
986
- const containerHeight = container.clientHeight;
987
- console.log("Container size:", { containerWidth, containerHeight });
988
- canvas.width = containerWidth;
989
- canvas.height = containerHeight;
990
- canvas.style.width = `${containerWidth}px`;
991
- canvas.style.height = `${containerHeight}px`;
992
- console.log("Canvas size updated:", {
993
- width: canvas.width,
994
- height: canvas.height,
995
- containerWidth,
996
- containerHeight
997
- });
998
- };
999
- const initBalls = () => {
1000
- const canvas = canvasRef.current;
1001
- if (!canvas) {
1002
- console.error("Canvas not found during ball initialization");
1003
- return [];
1004
- }
1005
- console.log("Initializing balls with canvas size:", {
1006
- width: canvas.width,
1007
- height: canvas.height
1008
- });
1009
- return balls.map((ballConfig) => ({
1010
- x: Math.random() * (canvas.width - 100) + 50,
1011
- y: Math.random() * (canvas.height - 100) + 50,
1012
- vx: (Math.random() - 0.5) * 4,
1013
- vy: (Math.random() - 0.5) * 4,
1014
- radius: ballConfig.size,
1015
- color: ballConfig.color,
1016
- text: ballConfig.label,
1017
- isDragging: false
1018
- }));
1019
- };
1020
- useEffect(() => {
1021
- const handleResize = () => {
1022
- console.log("Window resized");
1023
- updateCanvasSize();
1024
- };
1025
- if (typeof window !== "undefined") {
1026
- window.addEventListener("resize", handleResize);
1027
- updateCanvasSize();
1028
- }
1029
- return () => {
1030
- if (typeof window !== "undefined") {
1031
- window.removeEventListener("resize", handleResize);
1032
- }
1033
- };
1034
- }, []);
1035
- useEffect(() => {
1036
- const canvas = canvasRef.current;
1037
- if (!canvas) {
1038
- console.error("Canvas element not found");
1039
- return;
1040
- }
1041
- const ctx = canvas.getContext("2d");
1042
- if (!ctx) {
1043
- console.error("Failed to get canvas context");
1044
- return;
1045
- }
1046
- console.log("Starting animation setup...");
1047
- updateCanvasSize();
1048
- ballsRef.current = initBalls();
1049
- console.log("Balls initialized:", ballsRef.current);
1050
- let lastTime = performance.now();
1051
- let frameCount = 0;
1052
- const animate = (currentTime) => {
1053
- try {
1054
- frameCount++;
1055
- if (currentTime - lastTime >= 1e3) {
1056
- console.log(`FPS: ${frameCount}`);
1057
- frameCount = 0;
1058
- lastTime = currentTime;
1059
- }
1060
- ctx.clearRect(0, 0, canvas.width, canvas.height);
1061
- ballsRef.current.forEach((ball) => {
1062
- if (!ball.isDragging) {
1063
- updatePosition(ball, canvas.width, canvas.height);
1064
- }
1065
- for (let i = 0; i < ballsRef.current.length; i++) {
1066
- for (let j = i + 1; j < ballsRef.current.length; j++) {
1067
- const ball1 = ballsRef.current[i];
1068
- const ball2 = ballsRef.current[j];
1069
- if (ball1 && ball2) {
1070
- checkCollision(ball1, ball2);
1071
- }
1072
- }
1073
- }
1074
- draw(ctx, ball);
1075
- });
1076
- animationRef.current = requestAnimationFrame(animate);
1077
- } catch (error) {
1078
- console.error("Animation error:", error);
1079
- }
1080
- };
1081
- console.log("Starting animation loop...");
1082
- animationRef.current = requestAnimationFrame(animate);
1083
- return () => {
1084
- console.log("Cleaning up animation...");
1085
- if (animationRef.current) {
1086
- cancelAnimationFrame(animationRef.current);
1087
- animationRef.current = null;
1088
- }
1089
- };
1090
- }, []);
1091
- const shake = () => {
1092
- setIsShaking(true);
1093
- ballsRef.current.forEach((ball) => {
1094
- ball.vx = (Math.random() - 0.5) * 10;
1095
- ball.vy = (Math.random() - 0.5) * 10;
1096
- });
1097
- setTimeout(() => setIsShaking(false), 200);
1098
- };
1099
- const slowdown = () => {
1100
- setIsShaking(true);
1101
- ballsRef.current.forEach((ball) => {
1102
- ball.vx = ball.vx * 0.5;
1103
- ball.vy = ball.vy * 0.5;
1104
- });
1105
- setTimeout(() => setIsShaking(false), 200);
1106
- };
1107
- const checkCollision = (ball1, ball2) => {
1108
- const dx = ball2.x - ball1.x;
1109
- const dy = ball2.y - ball1.y;
1110
- const distance = Math.sqrt(dx * dx + dy * dy);
1111
- if (distance < ball1.radius + ball2.radius) {
1112
- const angle = Math.atan2(dy, dx);
1113
- const overlap = (ball1.radius + ball2.radius - distance) / 2;
1114
- if (ball1.isDragging || ball2.isDragging) {
1115
- const draggedBall2 = ball1.isDragging ? ball1 : ball2;
1116
- const otherBall = ball1.isDragging ? ball2 : ball1;
1117
- otherBall.x += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.cos(angle);
1118
- otherBall.y += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.sin(angle);
1119
- const pushForce = 2;
1120
- otherBall.vx = (draggedBall2 === ball1 ? -1 : 1) * Math.cos(angle) * pushForce;
1121
- otherBall.vy = (draggedBall2 === ball1 ? -1 : 1) * Math.sin(angle) * pushForce;
1122
- return;
1123
- }
1124
- const sin = Math.sin(angle);
1125
- const cos = Math.cos(angle);
1126
- const vx1 = ball1.vx * cos + ball1.vy * sin;
1127
- const vy1 = ball1.vy * cos - ball1.vx * sin;
1128
- const vx2 = ball2.vx * cos + ball2.vy * sin;
1129
- const vy2 = ball2.vy * cos - ball2.vx * sin;
1130
- const newVx1 = vx2;
1131
- const newVx2 = vx1;
1132
- ball1.vx = newVx1 * cos - vy1 * sin;
1133
- ball1.vy = vy1 * cos + newVx1 * sin;
1134
- ball2.vx = newVx2 * cos - vy2 * sin;
1135
- ball2.vy = vy2 * cos + newVx2 * sin;
1136
- ball1.x -= overlap * Math.cos(angle);
1137
- ball1.y -= overlap * Math.sin(angle);
1138
- ball2.x += overlap * Math.cos(angle);
1139
- ball2.y += overlap * Math.sin(angle);
1140
- }
1141
- };
1142
- const updatePosition = (ball, width2, height2) => {
1143
- const handleBoundaryCollision = (velocity, position, boundary, radius) => {
1144
- let newVelocity = velocity;
1145
- let newPosition = position;
1146
- if (position - radius < 0) {
1147
- newPosition = radius;
1148
- newVelocity = Math.abs(velocity);
1149
- } else if (position + radius > boundary) {
1150
- newPosition = boundary - radius;
1151
- newVelocity = -Math.abs(velocity);
1152
- }
1153
- return [newVelocity, newPosition];
1154
- };
1155
- const [newVx, newX] = handleBoundaryCollision(
1156
- ball.vx,
1157
- ball.x,
1158
- width2,
1159
- ball.radius
1160
- );
1161
- const [newVy, newY] = handleBoundaryCollision(
1162
- ball.vy,
1163
- ball.y,
1164
- height2,
1165
- ball.radius
1166
- );
1167
- ball.vx = newVx;
1168
- ball.vy = newVy;
1169
- ball.x = newX;
1170
- ball.y = newY;
1171
- };
1172
- const draw = (ctx, ball) => {
1173
- ctx.beginPath();
1174
- ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
1175
- ctx.fillStyle = ball.color;
1176
- ctx.fill();
1177
- ctx.closePath();
1178
- if (ball.text) {
1179
- ctx.font = "14px Arial";
1180
- ctx.fillStyle = "#fff";
1181
- ctx.textAlign = "center";
1182
- ctx.textBaseline = "middle";
1183
- ctx.fillText(ball.text, ball.x, ball.y);
1184
- }
1185
- };
1186
- const handleMouseDown = (event) => {
1187
- const mousePos2 = getMousePos(event);
1188
- const ball = ballsRef.current.find((b) => {
1189
- const dx = b.x - mousePos2.x;
1190
- const dy = b.y - mousePos2.y;
1191
- return Math.sqrt(dx * dx + dy * dy) < b.radius;
1192
- });
1193
- if (ball) {
1194
- ball.isDragging = true;
1195
- setDraggedBall(ball);
1196
- }
1197
- };
1198
- const handleMouseMove = (event) => {
1199
- const mousePos2 = getMousePos(event);
1200
- setMousePos(mousePos2);
1201
- if (draggedBall) {
1202
- draggedBall.x = mousePos2.x;
1203
- draggedBall.y = mousePos2.y;
1204
- draggedBall.vx = 0;
1205
- draggedBall.vy = 0;
1206
- }
1207
- };
1208
- const handleMouseUp = () => {
1209
- if (draggedBall) {
1210
- draggedBall.isDragging = false;
1211
- setDraggedBall(null);
1212
- }
1213
- };
1214
- const getMousePos = (event) => {
1215
- const canvas = canvasRef.current;
1216
- if (!canvas) return { x: 0, y: 0 };
1217
- const rect = canvas.getBoundingClientRect();
1218
- const scaleX = canvas.width / rect.width;
1219
- const scaleY = canvas.height / rect.height;
1220
- return {
1221
- x: (event.clientX - rect.left) * scaleX,
1222
- y: (event.clientY - rect.top) * scaleY
1223
- };
1224
- };
1225
- return /* @__PURE__ */ React23__default.createElement("div", { style: { width: "100%", height: "100%", position: "relative", backgroundColor: "#f9fafb", borderRadius: "0.5rem" } }, /* @__PURE__ */ React23__default.createElement("div", { ref: containerRef, style: { width: "100%", height: "100%", position: "absolute", top: 0, left: 0 } }, /* @__PURE__ */ React23__default.createElement(
1226
- "canvas",
1227
- {
1228
- ref: canvasRef,
1229
- style: {
1230
- width: "100%",
1231
- height: "100%",
1232
- display: "block"
1233
- // 确保canvas正确显示
1234
- },
1235
- onMouseDown: handleMouseDown,
1236
- onMouseMove: handleMouseMove,
1237
- onMouseUp: handleMouseUp,
1238
- onMouseLeave: handleMouseUp
1239
- }
1240
- )), /* @__PURE__ */ React23__default.createElement("div", { className: "absolute bottom-4 right-4 flex gap-2" }, /* @__PURE__ */ React23__default.createElement(
1241
- "button",
1242
- {
1243
- onClick: shake,
1244
- className: `px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors ${isShaking ? "animate-pulse" : ""}`
1245
- },
1246
- "\u6447\u4E00\u6447"
1247
- ), /* @__PURE__ */ React23__default.createElement(
1248
- "button",
1249
- {
1250
- onClick: slowdown,
1251
- className: `px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors ${isShaking ? "animate-pulse" : ""}`
1252
- },
1253
- "\u51CF\u901F"
1254
- )));
1255
- };
1256
- function GenericOrderManager({
1257
- operations,
1258
- renderItem,
1259
- className = "",
1260
- title = "\u987A\u5E8F\u7BA1\u7406",
1261
- description = "\u62D6\u62FD\u6216\u4F7F\u7528\u6309\u94AE\u8C03\u6574\u663E\u793A\u987A\u5E8F",
1262
- onOrderChanged,
1263
- emptyMessage = "\u6682\u65E0\u6570\u636E",
1264
- loadingMessage = "\u52A0\u8F7D\u6570\u636E..."
1265
- }) {
1266
- const [items, setItems] = useState([]);
1267
- const [originalOrder, setOriginalOrder] = useState([]);
1268
- const [loading, setLoading] = useState(true);
1269
- const [saving, setSaving] = useState(false);
1270
- const [error, setError] = useState(null);
1271
- const [hasChanges, setHasChanges] = useState(false);
1272
- const [draggedItem, setDraggedItem] = useState(null);
1273
- const loadItems = useCallback(async () => {
1274
- try {
1275
- setLoading(true);
1276
- setError(null);
1277
- const data = await operations.loadItems();
1278
- setItems(data);
1279
- setOriginalOrder([...data]);
1280
- setHasChanges(false);
1281
- } catch (err) {
1282
- console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u52A0\u8F7D\u6570\u636E\u9519\u8BEF:", err);
1283
- setError(err instanceof Error ? err.message : "\u52A0\u8F7D\u6570\u636E\u5931\u8D25");
1284
- } finally {
1285
- setLoading(false);
1286
- }
1287
- }, [operations]);
1288
- useEffect(() => {
1289
- loadItems();
1290
- }, [loadItems]);
1291
- useEffect(() => {
1292
- const hasOrderChanged = items.some(
1293
- (item, index) => originalOrder[index]?.id !== item.id
1294
- );
1295
- setHasChanges(hasOrderChanged);
1296
- }, [items, originalOrder]);
1297
- const handleMoveUp = async (itemId) => {
1298
- try {
1299
- setError(null);
1300
- const currentIndex = items.findIndex((item) => item.id === itemId);
1301
- if (currentIndex === -1) {
1302
- setError("\u9879\u76EE\u4E0D\u5B58\u5728");
1303
- return;
1304
- }
1305
- if (currentIndex === 0) {
1306
- setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u524D\u9762\uFF0C\u65E0\u6CD5\u4E0A\u79FB");
1307
- return;
1308
- }
1309
- await operations.moveItemUp(itemId);
1310
- await loadItems();
1311
- onOrderChanged?.();
1312
- } catch (err) {
1313
- console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0A\u79FB\u9879\u76EE\u9519\u8BEF:", err);
1314
- setError(err instanceof Error ? err.message : "\u4E0A\u79FB\u5931\u8D25");
1315
- }
1316
- };
1317
- const handleMoveDown = async (itemId) => {
1318
- try {
1319
- setError(null);
1320
- const currentIndex = items.findIndex((item) => item.id === itemId);
1321
- if (currentIndex === -1) {
1322
- setError("\u9879\u76EE\u4E0D\u5B58\u5728");
1323
- return;
1324
- }
1325
- if (currentIndex === items.length - 1) {
1326
- setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u540E\u9762\uFF0C\u65E0\u6CD5\u4E0B\u79FB");
1327
- return;
1328
- }
1329
- await operations.moveItemDown(itemId);
1330
- await loadItems();
1331
- onOrderChanged?.();
1332
- } catch (err) {
1333
- console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0B\u79FB\u9879\u76EE\u9519\u8BEF:", err);
1334
- setError(err instanceof Error ? err.message : "\u4E0B\u79FB\u5931\u8D25");
1335
- }
1336
- };
1337
- const handleDragStart = (e, index) => {
1338
- setDraggedItem(index);
1339
- e.dataTransfer.effectAllowed = "move";
1340
- };
1341
- const handleDragOver = (e, _index) => {
1342
- e.preventDefault();
1343
- e.dataTransfer.dropEffect = "move";
1344
- };
1345
- const handleDrop = async (e, dropIndex) => {
1346
- e.preventDefault();
1347
- if (draggedItem === null || draggedItem === dropIndex) {
1348
- setDraggedItem(null);
1349
- return;
1350
- }
1351
- try {
1352
- setError(null);
1353
- const newItems = [...items];
1354
- const draggedItemData = newItems[draggedItem];
1355
- if (!draggedItemData) return;
1356
- newItems.splice(draggedItem, 1);
1357
- newItems.splice(dropIndex, 0, draggedItemData);
1358
- const itemOrders = newItems.map((item, index) => ({
1359
- id: item.id,
1360
- order: index
1361
- }));
1362
- await operations.updateItemOrder(itemOrders);
1363
- await loadItems();
1364
- onOrderChanged?.();
1365
- } catch (err) {
1366
- console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u62D6\u62FD\u6392\u5E8F\u9519\u8BEF:", err);
1367
- setError(err instanceof Error ? err.message : "\u6392\u5E8F\u5931\u8D25");
1368
- } finally {
1369
- setDraggedItem(null);
1370
- }
1371
- };
1372
- const handleSaveOrder = async () => {
1373
- try {
1374
- setSaving(true);
1375
- setError(null);
1376
- const itemOrders = items.map((item, index) => ({
1377
- id: item.id,
1378
- order: index
1379
- }));
1380
- await operations.updateItemOrder(itemOrders);
1381
- setOriginalOrder([...items]);
1382
- setHasChanges(false);
1383
- onOrderChanged?.();
1384
- } catch (err) {
1385
- console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4FDD\u5B58\u987A\u5E8F\u9519\u8BEF:", err);
1386
- setError(err instanceof Error ? err.message : "\u4FDD\u5B58\u5931\u8D25");
1387
- await loadItems();
1388
- } finally {
1389
- setSaving(false);
1390
- }
1391
- };
1392
- const handleResetOrder = () => {
1393
- setItems([...originalOrder]);
1394
- };
1395
- if (loading) {
1396
- return /* @__PURE__ */ React23__default.createElement("div", { className: cn("flex flex-col items-center justify-center p-12 text-gray-500", className) }, /* @__PURE__ */ React23__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__default.createElement("span", null, loadingMessage));
1397
- }
1398
- return /* @__PURE__ */ React23__default.createElement("div", { className: cn("bg-white rounded-xl p-6 shadow-md border-2 border-gray-100", className) }, /* @__PURE__ */ React23__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__default.createElement("h3", { className: "m-0 text-gray-900 text-lg font-semibold" }, title), /* @__PURE__ */ React23__default.createElement("div", { className: "flex gap-3 w-full sm:w-auto" }, hasChanges && /* @__PURE__ */ React23__default.createElement(React23__default.Fragment, null, /* @__PURE__ */ React23__default.createElement(
1399
- "button",
1400
- {
1401
- onClick: handleResetOrder,
1402
- 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",
1403
- title: "\u91CD\u7F6E\u4E3A\u539F\u59CB\u987A\u5E8F"
1404
- },
1405
- /* @__PURE__ */ React23__default.createElement(RotateCcw, { size: 16 }),
1406
- "\u91CD\u7F6E"
1407
- ), /* @__PURE__ */ React23__default.createElement(
1408
- "button",
1409
- {
1410
- onClick: handleSaveOrder,
1411
- disabled: saving,
1412
- 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",
1413
- title: "\u4FDD\u5B58\u65B0\u987A\u5E8F"
1414
- },
1415
- /* @__PURE__ */ React23__default.createElement(Save, { size: 16 }),
1416
- saving ? "\u4FDD\u5B58\u4E2D..." : "\u4FDD\u5B58\u987A\u5E8F"
1417
- )))), error && /* @__PURE__ */ React23__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__default.createElement(AlertCircle, { size: 16 }), /* @__PURE__ */ React23__default.createElement("span", null, error)), /* @__PURE__ */ React23__default.createElement("div", { className: "bg-slate-50 border border-slate-200 rounded-lg p-4 mb-6" }, /* @__PURE__ */ React23__default.createElement("p", { className: "m-0 mb-2 color-slate-500 text-sm" }, description), /* @__PURE__ */ React23__default.createElement("ul", { className: "m-0 pl-6 color-slate-500 text-sm list-disc" }, /* @__PURE__ */ React23__default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u62D6\u62FD\uFF1A\u70B9\u51FB\u5E76\u62D6\u52A8 ", /* @__PURE__ */ React23__default.createElement(GripVertical, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u56FE\u6807"), /* @__PURE__ */ React23__default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u6309\u94AE\uFF1A\u70B9\u51FB ", /* @__PURE__ */ React23__default.createElement(ChevronUp, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6216 ", /* @__PURE__ */ React23__default.createElement(ChevronDown, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6309\u94AE"), /* @__PURE__ */ React23__default.createElement("li", null, '\u5B8C\u6210\u8C03\u6574\u540E\uFF0C\u70B9\u51FB"\u4FDD\u5B58\u987A\u5E8F"\u6309\u94AE\u4FDD\u5B58\u66F4\u6539'))), /* @__PURE__ */ React23__default.createElement("div", { className: "flex flex-col gap-3" }, items.map((item, index) => /* @__PURE__ */ React23__default.createElement(
1418
- "div",
1419
- {
1420
- key: item.id,
1421
- className: cn(
1422
- "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",
1423
- draggedItem === index && "opacity-50 rotate-2 border-blue-500"
1424
- ),
1425
- draggable: true,
1426
- onDragStart: (e) => handleDragStart(e, index),
1427
- onDragOver: (e) => handleDragOver(e),
1428
- onDrop: (e) => handleDrop(e, index)
1429
- },
1430
- /* @__PURE__ */ React23__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__default.createElement(GripVertical, { size: 20 })),
1431
- /* @__PURE__ */ React23__default.createElement("div", { className: "flex-1 min-w-0" }, renderItem(item, index, index === 0, index === items.length - 1)),
1432
- /* @__PURE__ */ React23__default.createElement("div", { className: "flex items-center mx-3" }, /* @__PURE__ */ React23__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)),
1433
- /* @__PURE__ */ React23__default.createElement("div", { className: "flex flex-col gap-1 sm:flex-col flex-row" }, /* @__PURE__ */ React23__default.createElement(
1434
- "button",
1435
- {
1436
- onClick: () => handleMoveUp(item.id),
1437
- disabled: index === 0,
1438
- 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",
1439
- title: "\u4E0A\u79FB"
1440
- },
1441
- /* @__PURE__ */ React23__default.createElement(ChevronUp, { size: 18 })
1442
- ), /* @__PURE__ */ React23__default.createElement(
1443
- "button",
1444
- {
1445
- onClick: () => handleMoveDown(item.id),
1446
- disabled: index === items.length - 1,
1447
- 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",
1448
- title: "\u4E0B\u79FB"
1449
- },
1450
- /* @__PURE__ */ React23__default.createElement(ChevronDown, { size: 18 })
1451
- ))
1452
- ))), items.length === 0 && /* @__PURE__ */ React23__default.createElement("div", { className: "text-center p-12 text-gray-400 italic" }, /* @__PURE__ */ React23__default.createElement("p", { className: "m-0" }, emptyMessage)));
1453
- }
1454
- var BackButton = ({ href, className = "" }) => {
1455
- const router = useRouter();
1456
- const handleClick = () => {
1457
- if (href) {
1458
- router.push(href);
1459
- } else {
1460
- router.back();
1461
- }
1462
- };
1463
- return /* @__PURE__ */ React23__default.createElement(
1464
- "button",
1465
- {
1466
- onClick: handleClick,
1467
- className: cn(
1468
- "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",
1469
- className
1470
- )
1471
- },
1472
- /* @__PURE__ */ React23__default.createElement(
1473
- "svg",
1474
- {
1475
- className: "w-5 h-5 mr-2",
1476
- fill: "none",
1477
- stroke: "currentColor",
1478
- viewBox: "0 0 24 24"
1479
- },
1480
- /* @__PURE__ */ React23__default.createElement(
1481
- "path",
1482
- {
1483
- strokeLinecap: "round",
1484
- strokeLinejoin: "round",
1485
- strokeWidth: 2,
1486
- d: "M10 19l-7-7m0 0l7-7m-7 7h18"
1487
- }
1488
- )
1489
- ),
1490
- "\u8FD4\u56DE"
1491
- );
1492
- };
1493
- function getColorValue(bgClass) {
1494
- const colorMap = {
1495
- "bg-blue-500": "#3b82f6",
1496
- "bg-green-500": "#10b981",
1497
- "bg-red-500": "#ef4444",
1498
- "bg-purple-500": "#8b5cf6",
1499
- "bg-slate-500": "#64748b",
1500
- "bg-emerald-500": "#10b981",
1501
- "bg-orange-500": "#f97316"
1502
- };
1503
- return colorMap[bgClass] || "#3b82f6";
1504
- }
1505
- function FilterButtonGroup({
1506
- label,
1507
- value,
1508
- options,
1509
- onChange,
1510
- className
1511
- }) {
1512
- return /* @__PURE__ */ React23__default.createElement("div", { className: cn("space-y-4", className) }, /* @__PURE__ */ React23__default.createElement("h3", { className: "text-lg font-semibold text-gray-800" }, label), /* @__PURE__ */ React23__default.createElement("div", { className: "flex gap-3" }, options.map((option) => {
1513
- const isActive = value === option.value;
1514
- return /* @__PURE__ */ React23__default.createElement(
1515
- "button",
1516
- {
1517
- key: option.value,
1518
- onClick: () => onChange(option.value),
1519
- style: isActive ? { backgroundColor: getColorValue(option.activeColor.bg) } : void 0,
1520
- className: cn(
1521
- "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",
1522
- 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"
1523
- )
1524
- },
1525
- /* @__PURE__ */ React23__default.createElement("div", { className: "flex items-center justify-center space-x-2" }, /* @__PURE__ */ React23__default.createElement("span", { className: "text-lg" }, option.icon), /* @__PURE__ */ React23__default.createElement("span", null, option.label), option.showCount && option.count !== void 0 && /* @__PURE__ */ React23__default.createElement("span", { className: cn(
1526
- "text-xs font-semibold px-2 py-0.5 rounded-full min-w-[1.25rem] text-center",
1527
- isActive ? "bg-white/20 text-white" : "bg-gray-100 text-gray-600"
1528
- ) }, option.count))
1529
- );
1530
- })));
1531
- }
1532
- function SearchResultHint({ searchQuery, resultCount, className }) {
1533
- if (!searchQuery) return null;
1534
- return /* @__PURE__ */ React23__default.createElement("div", { className: cn("mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg", className) }, /* @__PURE__ */ React23__default.createElement("p", { className: "text-sm text-blue-700" }, '\u641C\u7D22 "', /* @__PURE__ */ React23__default.createElement("span", { className: "font-medium" }, searchQuery), '" \u627E\u5230 ', resultCount, " \u4E2A\u7ED3\u679C"));
1535
- }
1536
- var Modal = ({
1537
- isOpen,
1538
- onClose,
1539
- title,
1540
- width,
1541
- className,
1542
- maskClosable = true,
1543
- children,
1544
- zIndex = 50
1545
- }) => {
1546
- return /* @__PURE__ */ React23__default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => {
1547
- if (!open) {
1548
- if (maskClosable) {
1549
- onClose();
1550
- }
1551
- }
1552
- } }, /* @__PURE__ */ React23__default.createElement(
1553
- DialogContent,
1554
- {
1555
- className: cn("sm:max-w-[425px]", className) + ` z-[${zIndex}]`,
1556
- onPointerDownOutside: (e) => {
1557
- if (!maskClosable) e.preventDefault();
1558
- },
1559
- onEscapeKeyDown: (e) => {
1560
- if (!maskClosable) e.preventDefault();
1561
- },
1562
- style: width ? { maxWidth: typeof width === "number" ? `${width}px` : width } : void 0
1563
- },
1564
- title ? /* @__PURE__ */ React23__default.createElement(DialogHeader, null, /* @__PURE__ */ React23__default.createElement(DialogTitle, null, title)) : (
1565
- // 无障碍性:始终需要 DialogTitle,使用 sr-only 对视觉隐藏但对屏幕阅读器可见
1566
- /* @__PURE__ */ React23__default.createElement(DialogTitle, { className: "sr-only" }, "\u5F39\u7A97")
1567
- ),
1568
- /* @__PURE__ */ React23__default.createElement("div", { className: "py-4" }, children)
1569
- ));
1570
- };
1571
- var ConfirmModal = ({
1572
- isOpen,
1573
- onClose,
1574
- onConfirm,
1575
- title = "\u786E\u8BA4\u64CD\u4F5C",
1576
- message,
1577
- confirmText = "\u786E\u8BA4",
1578
- cancelText = "\u53D6\u6D88",
1579
- isLoading = false
1580
- }) => {
1581
- return /* @__PURE__ */ React23__default.createElement(AlertDialog, { open: isOpen, onOpenChange: (open) => !open && onClose() }, /* @__PURE__ */ React23__default.createElement(AlertDialogContent, null, /* @__PURE__ */ React23__default.createElement(AlertDialogHeader, null, /* @__PURE__ */ React23__default.createElement(AlertDialogTitle, null, title), /* @__PURE__ */ React23__default.createElement(AlertDialogDescription, null, message)), /* @__PURE__ */ React23__default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React23__default.createElement(AlertDialogCancel, { disabled: isLoading }, cancelText), /* @__PURE__ */ React23__default.createElement(
1582
- AlertDialogAction,
1583
- {
1584
- onClick: (e) => {
1585
- e.preventDefault();
1586
- onConfirm();
1587
- },
1588
- disabled: isLoading,
1589
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/90"
1590
- },
1591
- isLoading ? "\u5904\u7406\u4E2D..." : confirmText
1592
- ))));
1593
- };
1594
-
1595
- export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, BackButton, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollisionBalls, ConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FilterButtonGroup, GenericOrderManager, Grid, Input, Label, Modal, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, SearchBox, SearchResultHint, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Timeline, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants };
1596
- //# sourceMappingURL=chunk-LFG6FPM5.mjs.map
1597
- //# sourceMappingURL=chunk-LFG6FPM5.mjs.map