@hanzo/ui 5.3.28 → 5.3.30

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 (229) hide show
  1. package/dist/3d/button.js +298 -0
  2. package/dist/3d/button.mjs +273 -0
  3. package/dist/3d/card.js +234 -0
  4. package/dist/3d/card.mjs +207 -0
  5. package/dist/3d/carousel.js +371 -0
  6. package/dist/3d/carousel.mjs +344 -0
  7. package/dist/3d/grid.js +362 -0
  8. package/dist/3d/grid.mjs +337 -0
  9. package/dist/3d/index.js +1518 -0
  10. package/dist/3d/index.mjs +1472 -0
  11. package/dist/3d/marquee.js +352 -0
  12. package/dist/3d/marquee.mjs +327 -0
  13. package/dist/3d/pin.js +46 -0
  14. package/dist/3d/pin.mjs +24 -0
  15. package/dist/accordion.js +80 -0
  16. package/dist/accordion.mjs +55 -0
  17. package/dist/alert-dialog.js +220 -0
  18. package/dist/alert-dialog.mjs +187 -0
  19. package/dist/alert.js +68 -0
  20. package/dist/alert.mjs +64 -0
  21. package/dist/animation/animated-background.js +424 -0
  22. package/dist/animation/animated-background.mjs +418 -0
  23. package/dist/animation/animated-beam.js +119 -0
  24. package/dist/animation/animated-beam.mjs +97 -0
  25. package/dist/animation/animated-cursor.js +275 -0
  26. package/dist/animation/animated-cursor.mjs +270 -0
  27. package/dist/animation/animated-icon.js +357 -0
  28. package/dist/animation/animated-icon.mjs +351 -0
  29. package/dist/animation/animated-list.js +339 -0
  30. package/dist/animation/animated-list.mjs +333 -0
  31. package/dist/animation/animated-number.js +283 -0
  32. package/dist/animation/animated-number.mjs +277 -0
  33. package/dist/animation/animated-testimonials.js +97 -0
  34. package/dist/animation/animated-testimonials.mjs +75 -0
  35. package/dist/animation/animated-tooltip.js +67 -0
  36. package/dist/animation/animated-tooltip.mjs +45 -0
  37. package/dist/animation/apple-cards-carousel.js +308 -0
  38. package/dist/animation/apple-cards-carousel.mjs +285 -0
  39. package/dist/animation/apple-hello-effect.js +60 -0
  40. package/dist/animation/apple-hello-effect.mjs +38 -0
  41. package/dist/animation/index.js +1952 -0
  42. package/dist/animation/index.mjs +1921 -0
  43. package/dist/avatar.js +71 -0
  44. package/dist/avatar.mjs +47 -0
  45. package/dist/badge.js +66 -0
  46. package/dist/badge.mjs +40 -0
  47. package/dist/blocks/index.js +1665 -0
  48. package/dist/blocks/index.mjs +1626 -0
  49. package/dist/breadcrumb.js +107 -0
  50. package/dist/breadcrumb.mjs +99 -0
  51. package/dist/calendar.js +189 -0
  52. package/dist/calendar.mjs +164 -0
  53. package/dist/carousel.js +278 -0
  54. package/dist/carousel.mjs +249 -0
  55. package/dist/checkbox.js +60 -0
  56. package/dist/checkbox.mjs +35 -0
  57. package/dist/code/block.js +226 -0
  58. package/dist/code/block.mjs +203 -0
  59. package/dist/code/compare.js +446 -0
  60. package/dist/code/compare.mjs +423 -0
  61. package/dist/code/diff.js +430 -0
  62. package/dist/code/diff.mjs +407 -0
  63. package/dist/code/editor.js +243 -0
  64. package/dist/code/editor.mjs +218 -0
  65. package/dist/code/explorer.js +291 -0
  66. package/dist/code/explorer.mjs +268 -0
  67. package/dist/code/index.js +2551 -0
  68. package/dist/code/index.mjs +2510 -0
  69. package/dist/code/preview.js +400 -0
  70. package/dist/code/preview.mjs +377 -0
  71. package/dist/code/snippet.js +274 -0
  72. package/dist/code/snippet.mjs +250 -0
  73. package/dist/code/tabs.js +75 -0
  74. package/dist/code/tabs.mjs +53 -0
  75. package/dist/code/terminal.js +437 -0
  76. package/dist/code/terminal.mjs +414 -0
  77. package/dist/collapsible.js +33 -0
  78. package/dist/collapsible.mjs +9 -0
  79. package/dist/command.js +262 -0
  80. package/dist/command.mjs +232 -0
  81. package/dist/context-menu.js +207 -0
  82. package/dist/context-menu.mjs +171 -0
  83. package/dist/device/index.js +3 -0
  84. package/dist/device/index.mjs +2 -0
  85. package/dist/dialog.js +151 -0
  86. package/dist/dialog.mjs +121 -0
  87. package/dist/dock/basic.js +174 -0
  88. package/dist/dock/basic.mjs +151 -0
  89. package/dist/dock/index.js +628 -0
  90. package/dist/dock/index.mjs +601 -0
  91. package/dist/dock/limelight-nav.js +295 -0
  92. package/dist/dock/limelight-nav.mjs +274 -0
  93. package/dist/dock/macos.js +141 -0
  94. package/dist/dock/macos.mjs +118 -0
  95. package/dist/dock/menu.js +70 -0
  96. package/dist/dock/menu.mjs +48 -0
  97. package/dist/dock/message.js +144 -0
  98. package/dist/dock/message.mjs +122 -0
  99. package/dist/drawer.js +115 -0
  100. package/dist/drawer.mjs +103 -0
  101. package/dist/dropdown-menu.js +202 -0
  102. package/dist/dropdown-menu.mjs +166 -0
  103. package/dist/finance/AdvancedChart.js +48 -0
  104. package/dist/finance/AdvancedChart.mjs +46 -0
  105. package/dist/finance/CompanyProfile.js +48 -0
  106. package/dist/finance/CompanyProfile.mjs +46 -0
  107. package/dist/finance/CryptoScreener.js +45 -0
  108. package/dist/finance/CryptoScreener.mjs +43 -0
  109. package/dist/finance/Financials.js +52 -0
  110. package/dist/finance/Financials.mjs +50 -0
  111. package/dist/finance/ForexScreener.js +46 -0
  112. package/dist/finance/ForexScreener.mjs +44 -0
  113. package/dist/finance/MarketOverview.js +104 -0
  114. package/dist/finance/MarketOverview.mjs +102 -0
  115. package/dist/finance/NewsTimeline.js +44 -0
  116. package/dist/finance/NewsTimeline.mjs +42 -0
  117. package/dist/finance/OrderEntry.js +131 -0
  118. package/dist/finance/OrderEntry.mjs +129 -0
  119. package/dist/finance/OrdersHistory.js +64 -0
  120. package/dist/finance/OrdersHistory.mjs +62 -0
  121. package/dist/finance/PositionsList.js +80 -0
  122. package/dist/finance/PositionsList.mjs +78 -0
  123. package/dist/finance/StockScreener.js +46 -0
  124. package/dist/finance/StockScreener.mjs +44 -0
  125. package/dist/finance/SymbolInfo.js +46 -0
  126. package/dist/finance/SymbolInfo.mjs +44 -0
  127. package/dist/finance/TechnicalAnalysis.js +54 -0
  128. package/dist/finance/TechnicalAnalysis.mjs +52 -0
  129. package/dist/finance/TickerTape.js +56 -0
  130. package/dist/finance/TickerTape.mjs +54 -0
  131. package/dist/finance/TradingPanel.js +191 -0
  132. package/dist/finance/TradingPanel.mjs +189 -0
  133. package/dist/finance/index.js +930 -0
  134. package/dist/finance/index.mjs +914 -0
  135. package/dist/form/index.js +155 -0
  136. package/dist/form/index.mjs +125 -0
  137. package/dist/form.js +172 -0
  138. package/dist/form.mjs +142 -0
  139. package/dist/hover-card.js +58 -0
  140. package/dist/hover-card.mjs +34 -0
  141. package/dist/index.js +8467 -0
  142. package/dist/index.mjs +8087 -0
  143. package/dist/input-otp.js +79 -0
  144. package/dist/input-otp.mjs +54 -0
  145. package/dist/lib/utils.js +28 -0
  146. package/dist/lib/utils.mjs +24 -0
  147. package/dist/navigation/index.js +98 -0
  148. package/dist/navigation/index.mjs +79 -0
  149. package/dist/navigation-menu.js +149 -0
  150. package/dist/navigation-menu.mjs +116 -0
  151. package/dist/pattern/grid-pattern.js +333 -0
  152. package/dist/pattern/grid-pattern.mjs +310 -0
  153. package/dist/pattern/index.js +333 -0
  154. package/dist/pattern/index.mjs +310 -0
  155. package/dist/popover.js +63 -0
  156. package/dist/popover.mjs +37 -0
  157. package/dist/primitives/index.js +8467 -0
  158. package/dist/primitives/index.mjs +8087 -0
  159. package/dist/primitives-export.js +8467 -0
  160. package/dist/primitives-export.mjs +8087 -0
  161. package/dist/progress.js +62 -0
  162. package/dist/progress.mjs +37 -0
  163. package/dist/project/gantt.js +65 -0
  164. package/dist/project/gantt.mjs +43 -0
  165. package/dist/project/index.js +636 -0
  166. package/dist/project/index.mjs +611 -0
  167. package/dist/project/kanban.js +597 -0
  168. package/dist/project/kanban.mjs +572 -0
  169. package/dist/project/list.js +35 -0
  170. package/dist/project/list.mjs +12 -0
  171. package/dist/radio-group.js +68 -0
  172. package/dist/radio-group.mjs +45 -0
  173. package/dist/resizable.js +72 -0
  174. package/dist/resizable.mjs +48 -0
  175. package/dist/scroll-area.js +89 -0
  176. package/dist/scroll-area.mjs +66 -0
  177. package/dist/select.js +140 -0
  178. package/dist/select.mjs +111 -0
  179. package/dist/separator.js +59 -0
  180. package/dist/separator.mjs +34 -0
  181. package/dist/sheet.js +148 -0
  182. package/dist/sheet.mjs +117 -0
  183. package/dist/skeleton.js +32 -0
  184. package/dist/skeleton.mjs +27 -0
  185. package/dist/slider.js +99 -0
  186. package/dist/slider.mjs +73 -0
  187. package/dist/sonner.js +34 -0
  188. package/dist/sonner.mjs +29 -0
  189. package/dist/switch.js +62 -0
  190. package/dist/switch.mjs +37 -0
  191. package/dist/table.js +110 -0
  192. package/dist/table.mjs +101 -0
  193. package/dist/tabs.js +82 -0
  194. package/dist/tabs.mjs +57 -0
  195. package/dist/tailwind/index.js +2023 -0
  196. package/dist/tailwind/index.mjs +2011 -0
  197. package/dist/textarea.js +78 -0
  198. package/dist/textarea.mjs +56 -0
  199. package/dist/toggle-group.js +118 -0
  200. package/dist/toggle-group.mjs +93 -0
  201. package/dist/toggle.js +71 -0
  202. package/dist/toggle.mjs +48 -0
  203. package/dist/tooltip.js +67 -0
  204. package/dist/tooltip.mjs +40 -0
  205. package/dist/types/index.js +57 -0
  206. package/dist/types/index.mjs +51 -0
  207. package/dist/ui/announcement.js +129 -0
  208. package/dist/ui/announcement.mjs +107 -0
  209. package/dist/ui/avatar-group.js +88 -0
  210. package/dist/ui/avatar-group.mjs +65 -0
  211. package/dist/ui/banner.js +85 -0
  212. package/dist/ui/banner.mjs +62 -0
  213. package/dist/ui/cursor.js +78 -0
  214. package/dist/ui/cursor.mjs +56 -0
  215. package/dist/ui/index.js +475 -0
  216. package/dist/ui/index.mjs +442 -0
  217. package/dist/ui/marquee.js +74 -0
  218. package/dist/ui/marquee.mjs +52 -0
  219. package/dist/ui/pill.js +85 -0
  220. package/dist/ui/pill.mjs +62 -0
  221. package/dist/ui/spinner.js +28 -0
  222. package/dist/ui/spinner.mjs +26 -0
  223. package/dist/ui/tags.js +101 -0
  224. package/dist/ui/tags.mjs +79 -0
  225. package/dist/ui/ticker.js +73 -0
  226. package/dist/ui/ticker.mjs +51 -0
  227. package/dist/util/index.js +463 -0
  228. package/dist/util/index.mjs +404 -0
  229. package/package.json +1 -1
@@ -0,0 +1,1952 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React9 = require('react');
5
+ var react = require('motion/react');
6
+ var utils$1 = require('@/lib/utils');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ var utils = require('@hanzo/ui/lib/utils');
9
+ var avatar = require('@hanzo/ui/primitives/avatar');
10
+ var ui = require('@hanzo/ui');
11
+ var framerMotion = require('framer-motion');
12
+ var lucideReact = require('lucide-react');
13
+
14
+ function _interopNamespace(e) {
15
+ if (e && e.__esModule) return e;
16
+ var n = Object.create(null);
17
+ if (e) {
18
+ Object.keys(e).forEach(function (k) {
19
+ if (k !== 'default') {
20
+ var d = Object.getOwnPropertyDescriptor(e, k);
21
+ Object.defineProperty(n, k, d.get ? d : {
22
+ enumerable: true,
23
+ get: function () { return e[k]; }
24
+ });
25
+ }
26
+ });
27
+ }
28
+ n.default = e;
29
+ return Object.freeze(n);
30
+ }
31
+
32
+ var React9__namespace = /*#__PURE__*/_interopNamespace(React9);
33
+
34
+ var __defProp = Object.defineProperty;
35
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
36
+ function usePrefersReducedMotion() {
37
+ const [prefersReducedMotion, setPrefersReducedMotion] = React9.useState(false);
38
+ React9.useEffect(() => {
39
+ if (typeof window === "undefined") return;
40
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
41
+ setPrefersReducedMotion(mediaQuery.matches);
42
+ const handleChange = /* @__PURE__ */ __name((event) => {
43
+ setPrefersReducedMotion(event.matches);
44
+ }, "handleChange");
45
+ mediaQuery.addEventListener("change", handleChange);
46
+ return () => mediaQuery.removeEventListener("change", handleChange);
47
+ }, []);
48
+ return prefersReducedMotion;
49
+ }
50
+ __name(usePrefersReducedMotion, "usePrefersReducedMotion");
51
+ function GradientBackground({
52
+ colors,
53
+ speed,
54
+ intensity,
55
+ paused
56
+ }) {
57
+ const gradientColors = colors.length >= 2 ? colors : ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"];
58
+ return /* @__PURE__ */ jsxRuntime.jsx(
59
+ react.motion.div,
60
+ {
61
+ className: "absolute inset-0",
62
+ style: {
63
+ background: `linear-gradient(-45deg, ${gradientColors.join(", ")})`,
64
+ backgroundSize: "400% 400%"
65
+ },
66
+ animate: paused ? {} : {
67
+ x: ["0%", "100%", "0%"]
68
+ },
69
+ transition: {
70
+ duration: 10 / speed,
71
+ repeat: Infinity,
72
+ ease: "linear"
73
+ }
74
+ }
75
+ );
76
+ }
77
+ __name(GradientBackground, "GradientBackground");
78
+ function BlobBackground({
79
+ colors,
80
+ speed,
81
+ elementCount,
82
+ intensity,
83
+ paused
84
+ }) {
85
+ const blobs = React9.useMemo(
86
+ () => Array.from({ length: elementCount }, (_, i) => ({
87
+ id: i,
88
+ color: colors[i % colors.length],
89
+ size: Math.random() * 200 + 100,
90
+ x: Math.random() * 100,
91
+ y: Math.random() * 100,
92
+ duration: (Math.random() * 10 + 10) / speed
93
+ })),
94
+ [elementCount, colors, speed]
95
+ );
96
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: blobs.map((blob) => /* @__PURE__ */ jsxRuntime.jsx(
97
+ react.motion.div,
98
+ {
99
+ className: "absolute rounded-full",
100
+ style: {
101
+ background: `radial-gradient(circle, ${blob.color}40, transparent)`,
102
+ width: blob.size * intensity,
103
+ height: blob.size * intensity,
104
+ filter: "blur(40px)"
105
+ },
106
+ initial: {
107
+ x: `${blob.x}%`,
108
+ y: `${blob.y}%`
109
+ },
110
+ animate: paused ? {} : {
111
+ x: [`${blob.x}%`, `${(blob.x + 50) % 100}%`, `${blob.x}%`],
112
+ y: [`${blob.y}%`, `${(blob.y + 30) % 100}%`, `${blob.y}%`],
113
+ scale: [1, 1.2, 1]
114
+ },
115
+ transition: {
116
+ duration: blob.duration,
117
+ repeat: Infinity,
118
+ ease: "easeInOut"
119
+ }
120
+ },
121
+ blob.id
122
+ )) });
123
+ }
124
+ __name(BlobBackground, "BlobBackground");
125
+ function WaveBackground({
126
+ colors,
127
+ speed,
128
+ intensity,
129
+ paused
130
+ }) {
131
+ const waveColor = colors[0] || "#4ecdc4";
132
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsxRuntime.jsx(
133
+ react.motion.div,
134
+ {
135
+ className: "absolute inset-0",
136
+ style: {
137
+ background: `radial-gradient(ellipse 100% 50% at center ${50 + index * 20}%, ${waveColor}${Math.round(
138
+ 30 * intensity
139
+ ).toString(16).padStart(2, "0")}, transparent)`
140
+ },
141
+ animate: paused ? {} : {
142
+ y: [index * 10, index * 10 + 20 * intensity, index * 10]
143
+ },
144
+ transition: {
145
+ duration: (3 + index) / speed,
146
+ repeat: Infinity,
147
+ ease: "easeInOut"
148
+ }
149
+ },
150
+ index
151
+ )) });
152
+ }
153
+ __name(WaveBackground, "WaveBackground");
154
+ function MeshBackground({
155
+ colors,
156
+ speed,
157
+ intensity,
158
+ paused
159
+ }) {
160
+ const meshColors = colors.length >= 4 ? colors.slice(0, 4) : ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"];
161
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: meshColors.map((color, index) => /* @__PURE__ */ jsxRuntime.jsx(
162
+ react.motion.div,
163
+ {
164
+ className: "absolute rounded-full",
165
+ style: {
166
+ background: `radial-gradient(circle, ${color}60, transparent)`,
167
+ width: `${60 + index * 20}%`,
168
+ height: `${60 + index * 20}%`,
169
+ filter: "blur(60px)",
170
+ mixBlendMode: "multiply"
171
+ },
172
+ initial: {
173
+ x: `${25 + index * 15}%`,
174
+ y: `${25 + index * 15}%`
175
+ },
176
+ animate: paused ? {} : {
177
+ x: [
178
+ `${25 + index * 15}%`,
179
+ `${35 + index * 15}%`,
180
+ `${25 + index * 15}%`
181
+ ],
182
+ y: [
183
+ `${25 + index * 15}%`,
184
+ `${15 + index * 15}%`,
185
+ `${25 + index * 15}%`
186
+ ],
187
+ rotate: [0, 180, 360]
188
+ },
189
+ transition: {
190
+ duration: (8 + index * 2) / speed,
191
+ repeat: Infinity,
192
+ ease: "easeInOut"
193
+ }
194
+ },
195
+ index
196
+ )) });
197
+ }
198
+ __name(MeshBackground, "MeshBackground");
199
+ function ParallaxBackground({
200
+ layers,
201
+ speed,
202
+ paused
203
+ }) {
204
+ const mouseX = react.useMotionValue(0);
205
+ const mouseY = react.useMotionValue(0);
206
+ React9.useEffect(() => {
207
+ const handleMouseMove = /* @__PURE__ */ __name((e) => {
208
+ const { clientX, clientY } = e;
209
+ const { innerWidth, innerHeight } = window;
210
+ mouseX.set((clientX / innerWidth - 0.5) * 100);
211
+ mouseY.set((clientY / innerHeight - 0.5) * 100);
212
+ }, "handleMouseMove");
213
+ window.addEventListener("mousemove", handleMouseMove);
214
+ return () => window.removeEventListener("mousemove", handleMouseMove);
215
+ }, [mouseX, mouseY]);
216
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: layers.map((layer, index) => {
217
+ const x = react.useTransform(
218
+ mouseX,
219
+ [-50, 50],
220
+ [-layer.speed * 10, layer.speed * 10]
221
+ );
222
+ const y = react.useTransform(
223
+ mouseY,
224
+ [-50, 50],
225
+ [-layer.speed * 10, layer.speed * 10]
226
+ );
227
+ return /* @__PURE__ */ jsxRuntime.jsx(
228
+ react.motion.div,
229
+ {
230
+ className: "absolute inset-0",
231
+ style: {
232
+ background: `radial-gradient(circle, ${layer.color}, transparent)`,
233
+ opacity: layer.opacity,
234
+ x: paused ? 0 : x,
235
+ y: paused ? 0 : y
236
+ }
237
+ },
238
+ index
239
+ );
240
+ }) });
241
+ }
242
+ __name(ParallaxBackground, "ParallaxBackground");
243
+ function ParticlesBackground({
244
+ colors,
245
+ speed,
246
+ elementCount,
247
+ intensity,
248
+ paused
249
+ }) {
250
+ const particles = React9.useMemo(
251
+ () => Array.from({ length: elementCount }, (_, i) => ({
252
+ id: i,
253
+ color: colors[i % colors.length],
254
+ size: Math.random() * 4 + 2,
255
+ x: Math.random() * 100,
256
+ y: Math.random() * 100,
257
+ duration: (Math.random() * 20 + 20) / speed,
258
+ delay: Math.random() * 5
259
+ })),
260
+ [elementCount, colors, speed]
261
+ );
262
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 overflow-hidden", children: particles.map((particle) => /* @__PURE__ */ jsxRuntime.jsx(
263
+ react.motion.div,
264
+ {
265
+ className: "absolute rounded-full",
266
+ style: {
267
+ backgroundColor: particle.color,
268
+ width: particle.size * intensity,
269
+ height: particle.size * intensity,
270
+ opacity: 0.6
271
+ },
272
+ initial: {
273
+ x: `${particle.x}%`,
274
+ y: `${particle.y}%`
275
+ },
276
+ animate: paused ? {} : {
277
+ y: [`${particle.y}%`, `${particle.y - 100}%`],
278
+ opacity: [0, 0.6, 0]
279
+ },
280
+ transition: {
281
+ duration: particle.duration,
282
+ repeat: Infinity,
283
+ delay: particle.delay,
284
+ ease: "linear"
285
+ }
286
+ },
287
+ particle.id
288
+ )) });
289
+ }
290
+ __name(ParticlesBackground, "ParticlesBackground");
291
+ function AnimatedBackground({
292
+ animation = "gradient",
293
+ speed = 1,
294
+ colors = ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4", "#ffeaa7"],
295
+ paused = false,
296
+ className,
297
+ style,
298
+ children,
299
+ intensity = 1,
300
+ blur = false,
301
+ blurAmount = 20,
302
+ opacity = 1,
303
+ elementCount = 5,
304
+ width = "100%",
305
+ height = "100%",
306
+ fullscreen = false,
307
+ parallaxLayers = [
308
+ { speed: 0.5, color: "#ff6b6b50", opacity: 0.3 },
309
+ { speed: 1, color: "#4ecdc450", opacity: 0.4 },
310
+ { speed: 1.5, color: "#45b7d150", opacity: 0.3 }
311
+ ]
312
+ }) {
313
+ const prefersReducedMotion = usePrefersReducedMotion();
314
+ const isAnimationPaused = paused || prefersReducedMotion;
315
+ const containerStyle = React9.useMemo(
316
+ () => ({
317
+ width: fullscreen ? "100vw" : width,
318
+ height: fullscreen ? "100vh" : height,
319
+ opacity,
320
+ filter: blur ? `blur(${blurAmount}px)` : void 0,
321
+ ...style
322
+ }),
323
+ [fullscreen, width, height, opacity, blur, blurAmount, style]
324
+ );
325
+ const renderAnimation = /* @__PURE__ */ __name(() => {
326
+ const props = { colors, speed, intensity, paused: isAnimationPaused };
327
+ switch (animation) {
328
+ case "blob":
329
+ return /* @__PURE__ */ jsxRuntime.jsx(BlobBackground, { ...props, elementCount });
330
+ case "wave":
331
+ return /* @__PURE__ */ jsxRuntime.jsx(WaveBackground, { ...props });
332
+ case "mesh":
333
+ return /* @__PURE__ */ jsxRuntime.jsx(MeshBackground, { ...props });
334
+ case "parallax":
335
+ return /* @__PURE__ */ jsxRuntime.jsx(
336
+ ParallaxBackground,
337
+ {
338
+ layers: parallaxLayers,
339
+ speed,
340
+ paused: isAnimationPaused
341
+ }
342
+ );
343
+ case "particles":
344
+ return /* @__PURE__ */ jsxRuntime.jsx(ParticlesBackground, { ...props, elementCount });
345
+ default:
346
+ return /* @__PURE__ */ jsxRuntime.jsx(GradientBackground, { ...props });
347
+ }
348
+ }, "renderAnimation");
349
+ return /* @__PURE__ */ jsxRuntime.jsxs(
350
+ "div",
351
+ {
352
+ className: utils$1.cn(
353
+ "relative overflow-hidden",
354
+ fullscreen && "fixed inset-0 z-0",
355
+ className
356
+ ),
357
+ style: containerStyle,
358
+ children: [
359
+ renderAnimation(),
360
+ children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10 h-full w-full", children })
361
+ ]
362
+ }
363
+ );
364
+ }
365
+ __name(AnimatedBackground, "AnimatedBackground");
366
+ var AnimatedBeam = React9__namespace.forwardRef(
367
+ ({
368
+ className,
369
+ duration = 3,
370
+ delay = 0,
371
+ pathColor = "gray",
372
+ pathWidth = 2,
373
+ gradientStartColor = "#18CCFC",
374
+ gradientStopColor = "#6344F5",
375
+ containerRef,
376
+ fromRef,
377
+ toRef,
378
+ ...props
379
+ }, ref) => {
380
+ const [pathD, setPathD] = React9__namespace.useState("");
381
+ React9__namespace.useEffect(() => {
382
+ if (!containerRef?.current || !fromRef?.current || !toRef?.current) return;
383
+ const updatePath = /* @__PURE__ */ __name(() => {
384
+ const containerRect = containerRef.current.getBoundingClientRect();
385
+ const fromRect = fromRef.current.getBoundingClientRect();
386
+ const toRect = toRef.current.getBoundingClientRect();
387
+ const fromX = fromRect.left - containerRect.left + fromRect.width / 2;
388
+ const fromY = fromRect.top - containerRect.top + fromRect.height / 2;
389
+ const toX = toRect.left - containerRect.left + toRect.width / 2;
390
+ const toY = toRect.top - containerRect.top + toRect.height / 2;
391
+ const controlX = (fromX + toX) / 2;
392
+ const controlY = Math.min(fromY, toY) - 50;
393
+ setPathD(`M ${fromX} ${fromY} Q ${controlX} ${controlY} ${toX} ${toY}`);
394
+ }, "updatePath");
395
+ updatePath();
396
+ window.addEventListener("resize", updatePath);
397
+ return () => window.removeEventListener("resize", updatePath);
398
+ }, [containerRef, fromRef, toRef]);
399
+ return /* @__PURE__ */ jsxRuntime.jsxs(
400
+ "svg",
401
+ {
402
+ ref,
403
+ className: utils.cn("pointer-events-none absolute inset-0", className),
404
+ ...props,
405
+ children: [
406
+ /* @__PURE__ */ jsxRuntime.jsx(
407
+ "path",
408
+ {
409
+ d: pathD,
410
+ stroke: pathColor,
411
+ strokeWidth: pathWidth,
412
+ fill: "none",
413
+ strokeOpacity: 0.2
414
+ }
415
+ ),
416
+ /* @__PURE__ */ jsxRuntime.jsx(
417
+ react.motion.path,
418
+ {
419
+ d: pathD,
420
+ stroke: `url(#gradient-${gradientStartColor}-${gradientStopColor})`,
421
+ strokeWidth: pathWidth,
422
+ fill: "none",
423
+ initial: { pathLength: 0 },
424
+ animate: { pathLength: 1 },
425
+ transition: {
426
+ duration,
427
+ delay,
428
+ ease: "easeInOut",
429
+ repeat: Infinity
430
+ }
431
+ }
432
+ ),
433
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
434
+ "linearGradient",
435
+ {
436
+ id: `gradient-${gradientStartColor}-${gradientStopColor}`,
437
+ x1: "0%",
438
+ y1: "0%",
439
+ x2: "100%",
440
+ y2: "0%",
441
+ children: [
442
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: gradientStartColor }),
443
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: gradientStopColor })
444
+ ]
445
+ }
446
+ ) })
447
+ ]
448
+ }
449
+ );
450
+ }
451
+ );
452
+ AnimatedBeam.displayName = "AnimatedBeam";
453
+ var INTERACTIVE_SELECTORS = [
454
+ "a",
455
+ "button",
456
+ "input",
457
+ "textarea",
458
+ "select",
459
+ '[role="button"]',
460
+ '[role="link"]',
461
+ '[tabindex]:not([tabindex="-1"])',
462
+ ".cursor-pointer",
463
+ '[data-cursor="pointer"]'
464
+ ].join(", ");
465
+ var TEXT_SELECTORS = [
466
+ 'input[type="text"]',
467
+ 'input[type="email"]',
468
+ 'input[type="password"]',
469
+ 'input[type="search"]',
470
+ "textarea",
471
+ '[contenteditable="true"]',
472
+ '[data-cursor="text"]'
473
+ ].join(", ");
474
+ var GRAB_SELECTORS = ['[data-cursor="grab"]', ".cursor-grab"].join(", ");
475
+ var GRABBING_SELECTORS = [
476
+ '[data-cursor="grabbing"]',
477
+ ".cursor-grabbing"
478
+ ].join(", ");
479
+ function isTouchDevice() {
480
+ if (typeof window === "undefined") return false;
481
+ return "ontouchstart" in window || navigator.maxTouchPoints > 0 || // @ts-ignore
482
+ navigator.msMaxTouchPoints > 0;
483
+ }
484
+ __name(isTouchDevice, "isTouchDevice");
485
+ function useCursorState() {
486
+ const [cursorState, setCursorState] = React9.useState({
487
+ position: { x: 0, y: 0 },
488
+ isHovering: false,
489
+ isClicking: false,
490
+ cursorType: "default"
491
+ });
492
+ const updatePosition = React9.useCallback((x, y) => {
493
+ setCursorState((prev) => ({
494
+ ...prev,
495
+ position: { x, y }
496
+ }));
497
+ }, []);
498
+ const updateHoverState = React9.useCallback(
499
+ (isHovering, cursorType = "default") => {
500
+ setCursorState((prev) => ({
501
+ ...prev,
502
+ isHovering,
503
+ cursorType
504
+ }));
505
+ },
506
+ []
507
+ );
508
+ const updateClickState = React9.useCallback((isClicking) => {
509
+ setCursorState((prev) => ({
510
+ ...prev,
511
+ isClicking
512
+ }));
513
+ }, []);
514
+ return {
515
+ cursorState,
516
+ updatePosition,
517
+ updateHoverState,
518
+ updateClickState
519
+ };
520
+ }
521
+ __name(useCursorState, "useCursorState");
522
+ function useCursorTrail(trailLength, position) {
523
+ const [trail, setTrail] = React9.useState([]);
524
+ const trailRef = React9.useRef([]);
525
+ React9.useEffect(() => {
526
+ trailRef.current.push(position);
527
+ if (trailRef.current.length > trailLength) {
528
+ trailRef.current.shift();
529
+ }
530
+ setTrail([...trailRef.current]);
531
+ }, [position, trailLength]);
532
+ return trail;
533
+ }
534
+ __name(useCursorTrail, "useCursorTrail");
535
+ function AnimatedCursor({
536
+ isVisible = true,
537
+ size = 20,
538
+ color = "#000000",
539
+ trailColor = "#00000050",
540
+ animationDuration = 200,
541
+ showTrail = true,
542
+ trailLength = 8,
543
+ blendMode = "normal",
544
+ hoverScale = 1.5,
545
+ hideOnTouch = true,
546
+ className,
547
+ clickAnimationDuration = 100,
548
+ zIndex = 9999
549
+ }) {
550
+ const { cursorState, updatePosition, updateHoverState, updateClickState } = useCursorState();
551
+ const trail = useCursorTrail(trailLength, cursorState.position);
552
+ const [isTouch, setIsTouch] = React9.useState(false);
553
+ const [mounted, setMounted] = React9.useState(false);
554
+ React9.useEffect(() => {
555
+ setIsTouch(isTouchDevice());
556
+ setMounted(true);
557
+ }, []);
558
+ React9.useEffect(() => {
559
+ if (!mounted || hideOnTouch && isTouch) return;
560
+ const handleMouseMove = /* @__PURE__ */ __name((e) => {
561
+ try {
562
+ requestAnimationFrame(() => {
563
+ updatePosition(e.clientX, e.clientY);
564
+ });
565
+ } catch (error) {
566
+ console.warn("AnimatedCursor: Error updating position", error);
567
+ }
568
+ }, "handleMouseMove");
569
+ const handleMouseOver = /* @__PURE__ */ __name((e) => {
570
+ try {
571
+ const target = e.target;
572
+ if (target?.closest?.(INTERACTIVE_SELECTORS)) {
573
+ updateHoverState(true, "pointer");
574
+ } else if (target?.closest?.(TEXT_SELECTORS)) {
575
+ updateHoverState(true, "text");
576
+ } else if (target?.closest?.(GRAB_SELECTORS)) {
577
+ updateHoverState(true, "grab");
578
+ } else if (target?.closest?.(GRABBING_SELECTORS)) {
579
+ updateHoverState(true, "grabbing");
580
+ } else {
581
+ updateHoverState(false, "default");
582
+ }
583
+ } catch (error) {
584
+ console.warn("AnimatedCursor: Error handling mouse over", error);
585
+ updateHoverState(false, "default");
586
+ }
587
+ }, "handleMouseOver");
588
+ const handleMouseDown = /* @__PURE__ */ __name(() => {
589
+ updateClickState(true);
590
+ }, "handleMouseDown");
591
+ const handleMouseUp = /* @__PURE__ */ __name(() => {
592
+ updateClickState(false);
593
+ }, "handleMouseUp");
594
+ const handleMouseLeave = /* @__PURE__ */ __name(() => {
595
+ updateHoverState(false, "default");
596
+ }, "handleMouseLeave");
597
+ document.addEventListener("mousemove", handleMouseMove);
598
+ document.addEventListener("mouseover", handleMouseOver);
599
+ document.addEventListener("mousedown", handleMouseDown);
600
+ document.addEventListener("mouseup", handleMouseUp);
601
+ document.addEventListener("mouseleave", handleMouseLeave);
602
+ return () => {
603
+ document.removeEventListener("mousemove", handleMouseMove);
604
+ document.removeEventListener("mouseover", handleMouseOver);
605
+ document.removeEventListener("mousedown", handleMouseDown);
606
+ document.removeEventListener("mouseup", handleMouseUp);
607
+ document.removeEventListener("mouseleave", handleMouseLeave);
608
+ };
609
+ }, [
610
+ mounted,
611
+ hideOnTouch,
612
+ isTouch,
613
+ updatePosition,
614
+ updateHoverState,
615
+ updateClickState
616
+ ]);
617
+ React9.useEffect(() => {
618
+ if (!mounted || hideOnTouch && isTouch) return;
619
+ try {
620
+ const originalCursor = document.body.style.cursor;
621
+ document.body.style.cursor = "none";
622
+ return () => {
623
+ try {
624
+ document.body.style.cursor = originalCursor;
625
+ } catch (error) {
626
+ console.warn("AnimatedCursor: Error restoring cursor style", error);
627
+ }
628
+ };
629
+ } catch (error) {
630
+ console.warn("AnimatedCursor: Error hiding cursor", error);
631
+ }
632
+ }, [mounted, hideOnTouch, isTouch]);
633
+ if (!mounted || !isVisible || hideOnTouch && isTouch) {
634
+ return null;
635
+ }
636
+ const currentScale = cursorState.isHovering ? hoverScale : 1;
637
+ const clickScale = cursorState.isClicking ? 0.8 : 1;
638
+ const finalScale = currentScale * clickScale;
639
+ const getCursorShape = /* @__PURE__ */ __name(() => {
640
+ switch (cursorState.cursorType) {
641
+ case "text":
642
+ return "h-6 w-0.5";
643
+ case "grab":
644
+ case "grabbing":
645
+ return "rounded-md";
646
+ default:
647
+ return "rounded-full";
648
+ }
649
+ }, "getCursorShape");
650
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils.cn("pointer-events-none fixed inset-0", className), children: [
651
+ showTrail && trail.map((point, index) => {
652
+ const opacity = (index + 1) / trail.length * 0.5;
653
+ const scale = (index + 1) / trail.length * 0.8;
654
+ return /* @__PURE__ */ jsxRuntime.jsx(
655
+ "div",
656
+ {
657
+ className: "absolute",
658
+ style: {
659
+ left: point.x - size / 2,
660
+ top: point.y - size / 2,
661
+ width: size,
662
+ height: size,
663
+ backgroundColor: trailColor,
664
+ borderRadius: "50%",
665
+ opacity,
666
+ transform: `scale(${scale})`,
667
+ zIndex: zIndex - index - 1,
668
+ mixBlendMode: blendMode
669
+ }
670
+ },
671
+ index
672
+ );
673
+ }),
674
+ /* @__PURE__ */ jsxRuntime.jsx(
675
+ "div",
676
+ {
677
+ className: utils.cn(
678
+ "absolute transition-transform duration-100 ease-out",
679
+ getCursorShape()
680
+ ),
681
+ style: {
682
+ left: cursorState.position.x - size / 2,
683
+ top: cursorState.position.y - size / 2,
684
+ width: cursorState.cursorType === "text" ? 2 : size,
685
+ height: cursorState.cursorType === "text" ? 24 : size,
686
+ backgroundColor: color,
687
+ transform: `scale(${finalScale})`,
688
+ transitionDuration: `${animationDuration}ms`,
689
+ zIndex,
690
+ mixBlendMode: blendMode
691
+ }
692
+ }
693
+ ),
694
+ cursorState.isHovering && cursorState.cursorType !== "text" && /* @__PURE__ */ jsxRuntime.jsx(
695
+ "div",
696
+ {
697
+ className: "absolute rounded-full border-2 transition-all duration-200 ease-out",
698
+ style: {
699
+ left: cursorState.position.x - size * hoverScale / 2,
700
+ top: cursorState.position.y - size * hoverScale / 2,
701
+ width: size * hoverScale,
702
+ height: size * hoverScale,
703
+ borderColor: color,
704
+ opacity: 0.3,
705
+ zIndex: zIndex - 1,
706
+ mixBlendMode: blendMode
707
+ }
708
+ }
709
+ )
710
+ ] });
711
+ }
712
+ __name(AnimatedCursor, "AnimatedCursor");
713
+ function usePrefersReducedMotion2() {
714
+ const [prefersReducedMotion, setPrefersReducedMotion] = React9.useState(false);
715
+ React9.useEffect(() => {
716
+ if (typeof window === "undefined") return;
717
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
718
+ setPrefersReducedMotion(mediaQuery.matches);
719
+ const handleChange = /* @__PURE__ */ __name((event) => {
720
+ setPrefersReducedMotion(event.matches);
721
+ }, "handleChange");
722
+ mediaQuery.addEventListener("change", handleChange);
723
+ return () => mediaQuery.removeEventListener("change", handleChange);
724
+ }, []);
725
+ return prefersReducedMotion;
726
+ }
727
+ __name(usePrefersReducedMotion2, "usePrefersReducedMotion");
728
+ var iconPaths = {
729
+ loading: "M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",
730
+ heart: [
731
+ "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z",
732
+ "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"
733
+ ],
734
+ star: "m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z",
735
+ hamburger: ["M3 12h18M3 6h18M3 18h18", "m6 6 12 12M6 18 18 6"],
736
+ arrow: "M5 12l14 0m-7 -7l7 7l-7 7",
737
+ check: "m9 12 2 2 4-4",
738
+ x: "m18 6-12 12M6 6l12 12"
739
+ };
740
+ var animationVariants = {
741
+ spin: {
742
+ animate: {
743
+ rotate: 360,
744
+ transition: {
745
+ duration: 1,
746
+ repeat: Infinity,
747
+ ease: "linear"
748
+ }
749
+ }
750
+ },
751
+ pulse: {
752
+ animate: {
753
+ scale: [1, 1.2, 1],
754
+ transition: {
755
+ duration: 1,
756
+ repeat: Infinity,
757
+ ease: "easeInOut"
758
+ }
759
+ }
760
+ },
761
+ bounce: {
762
+ animate: {
763
+ y: [0, -10, 0],
764
+ transition: {
765
+ duration: 0.6,
766
+ repeat: Infinity,
767
+ ease: "easeInOut"
768
+ }
769
+ }
770
+ },
771
+ draw: {
772
+ initial: { pathLength: 0, opacity: 0 },
773
+ animate: {
774
+ pathLength: 1,
775
+ opacity: 1,
776
+ transition: { duration: 2, ease: "easeInOut" }
777
+ }
778
+ },
779
+ hover: {
780
+ whileHover: {
781
+ scale: 1.1,
782
+ transition: { duration: 0.2 }
783
+ }
784
+ }
785
+ };
786
+ var hoverVariants = {
787
+ scale: { scale: 1.2 },
788
+ rotate: { rotate: 15 },
789
+ glow: { filter: "drop-shadow(0 0 8px currentColor)" },
790
+ shake: { x: [-2, 2, -2, 2, 0] }
791
+ };
792
+ var clickVariants = {
793
+ scale: { scale: 0.9 },
794
+ rotate: { rotate: 180 },
795
+ ripple: { scale: [1, 1.3, 1] }
796
+ };
797
+ function MorphingPath({
798
+ paths,
799
+ duration,
800
+ strokeWidth = 2,
801
+ autoAnimate,
802
+ repeat,
803
+ onComplete
804
+ }) {
805
+ const [currentPathIndex, setCurrentPathIndex] = React9.useState(0);
806
+ React9.useEffect(() => {
807
+ if (!autoAnimate || paths.length < 2) return;
808
+ const interval = setInterval(() => {
809
+ setCurrentPathIndex((prev) => {
810
+ const next = (prev + 1) % paths.length;
811
+ if (next === 0 && !repeat) {
812
+ clearInterval(interval);
813
+ onComplete?.();
814
+ }
815
+ return next;
816
+ });
817
+ }, duration);
818
+ return () => clearInterval(interval);
819
+ }, [autoAnimate, paths.length, duration, repeat, onComplete]);
820
+ return /* @__PURE__ */ jsxRuntime.jsx(
821
+ react.motion.path,
822
+ {
823
+ d: paths[currentPathIndex],
824
+ fill: "none",
825
+ stroke: "currentColor",
826
+ strokeWidth,
827
+ strokeLinecap: "round",
828
+ strokeLinejoin: "round",
829
+ animate: { d: paths[currentPathIndex] },
830
+ transition: { duration: duration / 1e3, ease: "easeInOut" }
831
+ }
832
+ );
833
+ }
834
+ __name(MorphingPath, "MorphingPath");
835
+ function DrawingPath({
836
+ path,
837
+ duration,
838
+ strokeWidth = 2,
839
+ progress,
840
+ autoAnimate
841
+ }) {
842
+ const pathRef = React9.useRef(null);
843
+ const [pathLength, setPathLength] = React9.useState(0);
844
+ React9.useEffect(() => {
845
+ if (pathRef.current) {
846
+ const length = pathRef.current.getTotalLength();
847
+ setPathLength(length);
848
+ }
849
+ }, [path]);
850
+ const animatedLength = progress !== void 0 ? pathLength * progress : pathLength;
851
+ return /* @__PURE__ */ jsxRuntime.jsx(
852
+ react.motion.path,
853
+ {
854
+ ref: pathRef,
855
+ d: path,
856
+ fill: "none",
857
+ stroke: "currentColor",
858
+ strokeWidth,
859
+ strokeLinecap: "round",
860
+ strokeLinejoin: "round",
861
+ initial: { pathLength: 0 },
862
+ animate: autoAnimate ? { pathLength: 1 } : { pathLength: animatedLength / pathLength },
863
+ transition: { duration: duration / 1e3, ease: "easeInOut" },
864
+ style: {
865
+ strokeDasharray: pathLength,
866
+ strokeDashoffset: pathLength - animatedLength
867
+ }
868
+ }
869
+ );
870
+ }
871
+ __name(DrawingPath, "DrawingPath");
872
+ function LoadingSpinner({
873
+ size,
874
+ strokeWidth = 2
875
+ }) {
876
+ return /* @__PURE__ */ jsxRuntime.jsx(
877
+ react.motion.div,
878
+ {
879
+ animate: { rotate: 360 },
880
+ transition: { duration: 1, repeat: Infinity, ease: "linear" },
881
+ style: { width: size, height: size },
882
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
883
+ "circle",
884
+ {
885
+ cx: "12",
886
+ cy: "12",
887
+ r: "10",
888
+ stroke: "currentColor",
889
+ strokeWidth,
890
+ strokeLinecap: "round",
891
+ strokeDasharray: "60 40",
892
+ opacity: "0.3"
893
+ }
894
+ ) })
895
+ }
896
+ );
897
+ }
898
+ __name(LoadingSpinner, "LoadingSpinner");
899
+ function AnimatedIcon({
900
+ icon = "loading",
901
+ paths,
902
+ animation = "spin",
903
+ size = 24,
904
+ color = "currentColor",
905
+ duration = 1e3,
906
+ autoAnimate = true,
907
+ repeat = true,
908
+ className,
909
+ style,
910
+ onAnimationComplete,
911
+ onClick,
912
+ interactive = true,
913
+ hoverAnimation = "scale",
914
+ clickAnimation = "scale",
915
+ customVariants,
916
+ viewBox = "0 0 24 24",
917
+ strokeWidth = 2,
918
+ loading = false,
919
+ progress
920
+ }) {
921
+ const [isHovered, setIsHovered] = React9.useState(false);
922
+ const [isClicked, setIsClicked] = React9.useState(false);
923
+ const prefersReducedMotion = usePrefersReducedMotion2();
924
+ const variants = customVariants || animationVariants[animation] || {};
925
+ const shouldAnimate = autoAnimate && !prefersReducedMotion;
926
+ const getIconPaths = /* @__PURE__ */ __name(() => {
927
+ if (paths) {
928
+ return Array.isArray(paths) ? paths : [paths];
929
+ }
930
+ const builtInPath = iconPaths[icon];
931
+ return Array.isArray(builtInPath) ? builtInPath : [builtInPath];
932
+ }, "getIconPaths");
933
+ const iconPathsArray = getIconPaths();
934
+ const handleClick = /* @__PURE__ */ __name(() => {
935
+ if (!interactive) return;
936
+ setIsClicked(true);
937
+ setTimeout(() => setIsClicked(false), 200);
938
+ onClick?.();
939
+ }, "handleClick");
940
+ const getHoverVariant = /* @__PURE__ */ __name(() => {
941
+ if (!interactive || !isHovered) return {};
942
+ return hoverVariants[hoverAnimation] || {};
943
+ }, "getHoverVariant");
944
+ const getClickVariant = /* @__PURE__ */ __name(() => {
945
+ if (!interactive || !isClicked) return {};
946
+ return clickVariants[clickAnimation] || {};
947
+ }, "getClickVariant");
948
+ if (loading) {
949
+ return /* @__PURE__ */ jsxRuntime.jsx(LoadingSpinner, { size, strokeWidth });
950
+ }
951
+ const renderIcon = /* @__PURE__ */ __name(() => {
952
+ if (animation === "morph" && iconPathsArray.length > 1) {
953
+ return /* @__PURE__ */ jsxRuntime.jsx(
954
+ MorphingPath,
955
+ {
956
+ paths: iconPathsArray,
957
+ duration,
958
+ strokeWidth,
959
+ autoAnimate: shouldAnimate,
960
+ repeat,
961
+ onComplete: onAnimationComplete
962
+ }
963
+ );
964
+ }
965
+ if (animation === "draw") {
966
+ return /* @__PURE__ */ jsxRuntime.jsx(
967
+ DrawingPath,
968
+ {
969
+ path: iconPathsArray[0],
970
+ duration,
971
+ strokeWidth,
972
+ progress,
973
+ autoAnimate: shouldAnimate
974
+ }
975
+ );
976
+ }
977
+ return iconPathsArray.map((path, index) => /* @__PURE__ */ jsxRuntime.jsx(
978
+ react.motion.path,
979
+ {
980
+ d: path,
981
+ fill: icon === "heart" ? "currentColor" : "none",
982
+ stroke: icon === "heart" ? "none" : "currentColor",
983
+ strokeWidth,
984
+ strokeLinecap: "round",
985
+ strokeLinejoin: "round"
986
+ },
987
+ index
988
+ ));
989
+ }, "renderIcon");
990
+ return /* @__PURE__ */ jsxRuntime.jsx(
991
+ react.motion.div,
992
+ {
993
+ className: utils$1.cn(
994
+ "inline-flex items-center justify-center",
995
+ interactive && "cursor-pointer",
996
+ className
997
+ ),
998
+ style: {
999
+ width: size,
1000
+ height: size,
1001
+ color,
1002
+ ...style
1003
+ },
1004
+ onClick: handleClick,
1005
+ onMouseEnter: () => setIsHovered(true),
1006
+ onMouseLeave: () => setIsHovered(false),
1007
+ variants,
1008
+ animate: shouldAnimate ? "animate" : "initial",
1009
+ whileHover: !prefersReducedMotion ? getHoverVariant() : {},
1010
+ whileTap: !prefersReducedMotion ? getClickVariant() : {},
1011
+ onAnimationComplete,
1012
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1013
+ "svg",
1014
+ {
1015
+ width: "100%",
1016
+ height: "100%",
1017
+ viewBox,
1018
+ fill: "none",
1019
+ xmlns: "http://www.w3.org/2000/svg",
1020
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", children: renderIcon() })
1021
+ }
1022
+ )
1023
+ }
1024
+ );
1025
+ }
1026
+ __name(AnimatedIcon, "AnimatedIcon");
1027
+ function usePrefersReducedMotion3() {
1028
+ const [prefersReducedMotion, setPrefersReducedMotion] = React9.useState(false);
1029
+ React9.useEffect(() => {
1030
+ if (typeof window === "undefined") return;
1031
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
1032
+ setPrefersReducedMotion(mediaQuery.matches);
1033
+ const handleChange = /* @__PURE__ */ __name((event) => {
1034
+ setPrefersReducedMotion(event.matches);
1035
+ }, "handleChange");
1036
+ mediaQuery.addEventListener("change", handleChange);
1037
+ return () => mediaQuery.removeEventListener("change", handleChange);
1038
+ }, []);
1039
+ return prefersReducedMotion;
1040
+ }
1041
+ __name(usePrefersReducedMotion3, "usePrefersReducedMotion");
1042
+ var slideVariants = {
1043
+ hidden: { opacity: 0, x: -50 },
1044
+ visible: /* @__PURE__ */ __name((i) => ({
1045
+ opacity: 1,
1046
+ x: 0,
1047
+ transition: {
1048
+ delay: i * 0.1,
1049
+ duration: 0.5,
1050
+ ease: "easeOut"
1051
+ }
1052
+ }), "visible"),
1053
+ exit: { opacity: 0, x: 50, transition: { duration: 0.3 } }
1054
+ };
1055
+ var fadeVariants = {
1056
+ hidden: { opacity: 0 },
1057
+ visible: /* @__PURE__ */ __name((i) => ({
1058
+ opacity: 1,
1059
+ transition: {
1060
+ delay: i * 0.1,
1061
+ duration: 0.5,
1062
+ ease: "easeOut"
1063
+ }
1064
+ }), "visible"),
1065
+ exit: { opacity: 0, transition: { duration: 0.3 } }
1066
+ };
1067
+ var scaleVariants = {
1068
+ hidden: { opacity: 0, scale: 0.8 },
1069
+ visible: /* @__PURE__ */ __name((i) => ({
1070
+ opacity: 1,
1071
+ scale: 1,
1072
+ transition: {
1073
+ delay: i * 0.1,
1074
+ duration: 0.5,
1075
+ ease: "easeOut",
1076
+ type: "spring",
1077
+ stiffness: 100
1078
+ }
1079
+ }), "visible"),
1080
+ exit: { opacity: 0, scale: 0.8, transition: { duration: 0.3 } }
1081
+ };
1082
+ var slideUpVariants = {
1083
+ hidden: { opacity: 0, y: 50 },
1084
+ visible: /* @__PURE__ */ __name((i) => ({
1085
+ opacity: 1,
1086
+ y: 0,
1087
+ transition: {
1088
+ delay: i * 0.1,
1089
+ duration: 0.5,
1090
+ ease: "easeOut"
1091
+ }
1092
+ }), "visible"),
1093
+ exit: { opacity: 0, y: -50, transition: { duration: 0.3 } }
1094
+ };
1095
+ var slideDownVariants = {
1096
+ hidden: { opacity: 0, y: -50 },
1097
+ visible: /* @__PURE__ */ __name((i) => ({
1098
+ opacity: 1,
1099
+ y: 0,
1100
+ transition: {
1101
+ delay: i * 0.1,
1102
+ duration: 0.5,
1103
+ ease: "easeOut"
1104
+ }
1105
+ }), "visible"),
1106
+ exit: { opacity: 0, y: 50, transition: { duration: 0.3 } }
1107
+ };
1108
+ var slideLeftVariants = {
1109
+ hidden: { opacity: 0, x: 50 },
1110
+ visible: /* @__PURE__ */ __name((i) => ({
1111
+ opacity: 1,
1112
+ x: 0,
1113
+ transition: {
1114
+ delay: i * 0.1,
1115
+ duration: 0.5,
1116
+ ease: "easeOut"
1117
+ }
1118
+ }), "visible"),
1119
+ exit: { opacity: 0, x: -50, transition: { duration: 0.3 } }
1120
+ };
1121
+ var slideRightVariants = {
1122
+ hidden: { opacity: 0, x: -50 },
1123
+ visible: /* @__PURE__ */ __name((i) => ({
1124
+ opacity: 1,
1125
+ x: 0,
1126
+ transition: {
1127
+ delay: i * 0.1,
1128
+ duration: 0.5,
1129
+ ease: "easeOut"
1130
+ }
1131
+ }), "visible"),
1132
+ exit: { opacity: 0, x: 50, transition: { duration: 0.3 } }
1133
+ };
1134
+ var animationVariants2 = {
1135
+ slide: slideVariants,
1136
+ fade: fadeVariants,
1137
+ scale: scaleVariants,
1138
+ slideUp: slideUpVariants,
1139
+ slideDown: slideDownVariants,
1140
+ slideLeft: slideLeftVariants,
1141
+ slideRight: slideRightVariants
1142
+ };
1143
+ function useVirtualizedList(items, containerHeight, itemHeight, enabled) {
1144
+ const [scrollTop, setScrollTop] = React9.useState(0);
1145
+ const visibleItems = React9.useMemo(() => {
1146
+ if (!enabled) return items;
1147
+ const startIndex = Math.floor(scrollTop / itemHeight);
1148
+ const endIndex = Math.min(
1149
+ startIndex + Math.ceil(containerHeight / itemHeight) + 1,
1150
+ items.length
1151
+ );
1152
+ return items.slice(startIndex, endIndex).map((item, index) => ({
1153
+ ...item,
1154
+ virtualIndex: startIndex + index,
1155
+ style: {
1156
+ position: "absolute",
1157
+ top: (startIndex + index) * itemHeight,
1158
+ height: itemHeight,
1159
+ width: "100%"
1160
+ }
1161
+ }));
1162
+ }, [items, scrollTop, itemHeight, containerHeight, enabled]);
1163
+ const totalHeight = items.length * itemHeight;
1164
+ const handleScroll = React9.useCallback((e) => {
1165
+ setScrollTop(e.currentTarget.scrollTop);
1166
+ }, []);
1167
+ return {
1168
+ visibleItems,
1169
+ totalHeight,
1170
+ handleScroll
1171
+ };
1172
+ }
1173
+ __name(useVirtualizedList, "useVirtualizedList");
1174
+ function AnimatedList({
1175
+ items,
1176
+ animation = "slideUp",
1177
+ staggerDelay = 100,
1178
+ duration = 500,
1179
+ reorderable = false,
1180
+ enableAddRemove = true,
1181
+ layout = "vertical",
1182
+ gridColumns = 3,
1183
+ className,
1184
+ itemClassName,
1185
+ style,
1186
+ onReorder,
1187
+ onItemClick,
1188
+ showHoverEffects = true,
1189
+ customVariants,
1190
+ virtualized = false,
1191
+ itemHeight = 60,
1192
+ containerHeight = 400,
1193
+ autoStart = true,
1194
+ onAnimationComplete
1195
+ }) {
1196
+ const [animatedItems, setAnimatedItems] = React9.useState(items);
1197
+ const [animationKey, setAnimationKey] = React9.useState(0);
1198
+ const prefersReducedMotion = usePrefersReducedMotion3();
1199
+ const variants = customVariants || animationVariants2[animation];
1200
+ const shouldAnimate = !prefersReducedMotion && autoStart;
1201
+ const { visibleItems, totalHeight, handleScroll } = useVirtualizedList(
1202
+ items,
1203
+ containerHeight,
1204
+ itemHeight,
1205
+ virtualized
1206
+ );
1207
+ React9.useEffect(() => {
1208
+ setAnimatedItems(items);
1209
+ }, [items]);
1210
+ const updatedVariants = React9.useMemo(() => {
1211
+ if (!variants.visible || typeof variants.visible !== "function")
1212
+ return variants;
1213
+ return {
1214
+ ...variants,
1215
+ visible: /* @__PURE__ */ __name((i) => {
1216
+ const original = variants.visible;
1217
+ const originalResult = original(i);
1218
+ return {
1219
+ ...originalResult,
1220
+ transition: {
1221
+ ...originalResult.transition,
1222
+ delay: i * (staggerDelay / 1e3),
1223
+ duration: duration / 1e3
1224
+ }
1225
+ };
1226
+ }, "visible")
1227
+ };
1228
+ }, [variants, staggerDelay, duration]);
1229
+ const getLayoutClassName = /* @__PURE__ */ __name(() => {
1230
+ switch (layout) {
1231
+ case "horizontal":
1232
+ return "flex flex-row gap-4 overflow-x-auto";
1233
+ case "grid":
1234
+ return `grid gap-4 grid-cols-${gridColumns}`;
1235
+ default:
1236
+ return "flex flex-col gap-4";
1237
+ }
1238
+ }, "getLayoutClassName");
1239
+ const renderListItem = /* @__PURE__ */ __name((item, index, virtualStyle) => {
1240
+ const itemContent = /* @__PURE__ */ jsxRuntime.jsx(
1241
+ react.motion.div,
1242
+ {
1243
+ custom: index,
1244
+ variants: updatedVariants,
1245
+ initial: shouldAnimate ? "hidden" : "visible",
1246
+ animate: "visible",
1247
+ exit: "exit",
1248
+ layout: enableAddRemove,
1249
+ className: utils$1.cn(
1250
+ "cursor-pointer select-none",
1251
+ showHoverEffects && "hover:scale-105 transition-transform",
1252
+ itemClassName
1253
+ ),
1254
+ style: virtualStyle,
1255
+ onClick: () => onItemClick?.(item, index),
1256
+ whileHover: showHoverEffects ? { scale: 1.02 } : void 0,
1257
+ whileTap: showHoverEffects ? { scale: 0.98 } : void 0,
1258
+ onAnimationComplete: () => {
1259
+ if (index === animatedItems.length - 1) {
1260
+ onAnimationComplete?.();
1261
+ }
1262
+ },
1263
+ children: item.content
1264
+ },
1265
+ item.id
1266
+ );
1267
+ return itemContent;
1268
+ }, "renderListItem");
1269
+ if (reorderable && !virtualized) {
1270
+ return /* @__PURE__ */ jsxRuntime.jsx(
1271
+ react.Reorder.Group,
1272
+ {
1273
+ axis: layout === "horizontal" ? "x" : "y",
1274
+ values: animatedItems,
1275
+ onReorder: (newItems) => {
1276
+ setAnimatedItems(newItems);
1277
+ onReorder?.(newItems);
1278
+ },
1279
+ className: utils$1.cn(getLayoutClassName(), className),
1280
+ style,
1281
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "popLayout", children: animatedItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
1282
+ react.Reorder.Item,
1283
+ {
1284
+ value: item,
1285
+ className: utils$1.cn(
1286
+ "cursor-grab active:cursor-grabbing",
1287
+ itemClassName
1288
+ ),
1289
+ whileDrag: { scale: 1.05, zIndex: 10 },
1290
+ children: item.content
1291
+ },
1292
+ item.id
1293
+ )) })
1294
+ }
1295
+ );
1296
+ }
1297
+ if (virtualized) {
1298
+ return /* @__PURE__ */ jsxRuntime.jsx(
1299
+ "div",
1300
+ {
1301
+ className: utils$1.cn("overflow-auto", className),
1302
+ style: { height: containerHeight, ...style },
1303
+ onScroll: handleScroll,
1304
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: totalHeight, position: "relative" }, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "popLayout", children: visibleItems.map(
1305
+ (item, index) => renderListItem(item, item.virtualIndex || index, item.style)
1306
+ ) }) })
1307
+ }
1308
+ );
1309
+ }
1310
+ return /* @__PURE__ */ jsxRuntime.jsx(
1311
+ react.motion.div,
1312
+ {
1313
+ className: utils$1.cn(getLayoutClassName(), className),
1314
+ style,
1315
+ initial: "hidden",
1316
+ animate: "visible",
1317
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "popLayout", children: animatedItems.map((item, index) => renderListItem(item, index)) })
1318
+ },
1319
+ animationKey
1320
+ );
1321
+ }
1322
+ __name(AnimatedList, "AnimatedList");
1323
+ function usePrefersReducedMotion4() {
1324
+ const [prefersReducedMotion, setPrefersReducedMotion] = React9.useState(false);
1325
+ React9.useEffect(() => {
1326
+ if (typeof window === "undefined") return;
1327
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
1328
+ setPrefersReducedMotion(mediaQuery.matches);
1329
+ const handleChange = /* @__PURE__ */ __name((event) => {
1330
+ setPrefersReducedMotion(event.matches);
1331
+ }, "handleChange");
1332
+ mediaQuery.addEventListener("change", handleChange);
1333
+ return () => mediaQuery.removeEventListener("change", handleChange);
1334
+ }, []);
1335
+ return prefersReducedMotion;
1336
+ }
1337
+ __name(usePrefersReducedMotion4, "usePrefersReducedMotion");
1338
+ function useAnimatedNumber(targetValue, from, duration, decimals, format, currency, locale, easing, autoStart, useSpringAnim, springConfig, separator) {
1339
+ const [displayValue, setDisplayValue] = React9.useState(from);
1340
+ const [isAnimating, setIsAnimating] = React9.useState(false);
1341
+ const animationRef = React9.useRef(null);
1342
+ const prefersReducedMotion = usePrefersReducedMotion4();
1343
+ const springValue = react.useSpring(from, {
1344
+ stiffness: springConfig.tension || 100,
1345
+ damping: springConfig.friction || 10,
1346
+ mass: springConfig.mass || 1
1347
+ });
1348
+ const [motionValue, setMotionValue] = React9.useState(from);
1349
+ const startAnimation = React9.useCallback(() => {
1350
+ if (prefersReducedMotion) {
1351
+ setDisplayValue(targetValue);
1352
+ return;
1353
+ }
1354
+ setIsAnimating(true);
1355
+ if (useSpringAnim) {
1356
+ springValue.set(targetValue);
1357
+ } else {
1358
+ const startTime = Date.now();
1359
+ const startValue = displayValue;
1360
+ const distance = targetValue - startValue;
1361
+ const animate = /* @__PURE__ */ __name(() => {
1362
+ const elapsed = Date.now() - startTime;
1363
+ const progress = Math.min(elapsed / duration, 1);
1364
+ const easedProgress = progress;
1365
+ const currentValue = startValue + distance * easedProgress;
1366
+ setDisplayValue(currentValue);
1367
+ setMotionValue(currentValue);
1368
+ if (progress < 1) {
1369
+ animationRef.current = requestAnimationFrame(animate);
1370
+ } else {
1371
+ setIsAnimating(false);
1372
+ animationRef.current = null;
1373
+ }
1374
+ }, "animate");
1375
+ animationRef.current = requestAnimationFrame(animate);
1376
+ }
1377
+ }, [
1378
+ targetValue,
1379
+ displayValue,
1380
+ duration,
1381
+ useSpringAnim,
1382
+ springValue,
1383
+ prefersReducedMotion
1384
+ ]);
1385
+ React9.useEffect(() => {
1386
+ return () => {
1387
+ if (animationRef.current) {
1388
+ cancelAnimationFrame(animationRef.current);
1389
+ }
1390
+ };
1391
+ }, []);
1392
+ React9.useEffect(() => {
1393
+ if (useSpringAnim) {
1394
+ const unsubscribe = springValue.onChange((latest) => {
1395
+ setDisplayValue(latest);
1396
+ if (Math.abs(latest - targetValue) < 0.01) {
1397
+ setIsAnimating(false);
1398
+ }
1399
+ });
1400
+ return () => {
1401
+ unsubscribe();
1402
+ };
1403
+ }
1404
+ }, [springValue, useSpringAnim, targetValue]);
1405
+ React9.useEffect(() => {
1406
+ if (autoStart) {
1407
+ startAnimation();
1408
+ }
1409
+ }, [autoStart, startAnimation]);
1410
+ const formattedValue = React9.useMemo(() => {
1411
+ const roundedValue = Math.round(displayValue * Math.pow(10, decimals)) / Math.pow(10, decimals);
1412
+ try {
1413
+ switch (format) {
1414
+ case "currency":
1415
+ return new Intl.NumberFormat(locale, {
1416
+ style: "currency",
1417
+ currency,
1418
+ minimumFractionDigits: decimals,
1419
+ maximumFractionDigits: decimals
1420
+ }).format(roundedValue);
1421
+ case "percent":
1422
+ return new Intl.NumberFormat(locale, {
1423
+ style: "percent",
1424
+ minimumFractionDigits: decimals,
1425
+ maximumFractionDigits: decimals
1426
+ }).format(roundedValue / 100);
1427
+ default:
1428
+ let formatted = new Intl.NumberFormat(locale, {
1429
+ minimumFractionDigits: decimals,
1430
+ maximumFractionDigits: decimals
1431
+ }).format(roundedValue);
1432
+ if (separator && separator !== ",") {
1433
+ formatted = formatted.replace(/,/g, separator);
1434
+ }
1435
+ return formatted;
1436
+ }
1437
+ } catch (error) {
1438
+ return roundedValue.toFixed(decimals);
1439
+ }
1440
+ }, [displayValue, decimals, format, currency, locale, separator]);
1441
+ return {
1442
+ formattedValue,
1443
+ displayValue,
1444
+ isAnimating,
1445
+ startAnimation
1446
+ };
1447
+ }
1448
+ __name(useAnimatedNumber, "useAnimatedNumber");
1449
+ function AnimatedNumber({
1450
+ value,
1451
+ from = 0,
1452
+ duration = 2e3,
1453
+ decimals = 0,
1454
+ format = "number",
1455
+ currency = "USD",
1456
+ locale = "en-US",
1457
+ easing = "easeOut",
1458
+ autoStart = true,
1459
+ onComplete,
1460
+ className,
1461
+ style,
1462
+ prefix = "",
1463
+ suffix = "",
1464
+ useSpring: useSpring2 = false,
1465
+ springConfig = {},
1466
+ separator,
1467
+ animateOnHover = false,
1468
+ hoverValue
1469
+ }) {
1470
+ const [isHovered, setIsHovered] = React9.useState(false);
1471
+ const [animationKey, setAnimationKey] = React9.useState(0);
1472
+ const currentValue = animateOnHover && isHovered && hoverValue !== void 0 ? hoverValue : value;
1473
+ const { formattedValue, displayValue, isAnimating, startAnimation } = useAnimatedNumber(
1474
+ currentValue,
1475
+ from,
1476
+ duration,
1477
+ decimals,
1478
+ format,
1479
+ currency,
1480
+ locale,
1481
+ easing,
1482
+ autoStart,
1483
+ useSpring2,
1484
+ springConfig,
1485
+ separator
1486
+ );
1487
+ React9.useEffect(() => {
1488
+ if (!isAnimating && onComplete && Math.abs(displayValue - currentValue) < 1e-3) {
1489
+ onComplete(displayValue);
1490
+ }
1491
+ }, [isAnimating, displayValue, currentValue, onComplete]);
1492
+ React9.useEffect(() => {
1493
+ if (animateOnHover && hoverValue !== void 0) {
1494
+ startAnimation();
1495
+ }
1496
+ }, [isHovered, animateOnHover, hoverValue, startAnimation]);
1497
+ const handleMouseEnter = /* @__PURE__ */ __name(() => {
1498
+ if (animateOnHover) {
1499
+ setIsHovered(true);
1500
+ }
1501
+ }, "handleMouseEnter");
1502
+ const handleMouseLeave = /* @__PURE__ */ __name(() => {
1503
+ if (animateOnHover) {
1504
+ setIsHovered(false);
1505
+ }
1506
+ }, "handleMouseLeave");
1507
+ const prefersReducedMotion = usePrefersReducedMotion4();
1508
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1509
+ react.motion.span,
1510
+ {
1511
+ className: utils$1.cn("inline-block tabular-nums", className),
1512
+ style,
1513
+ onMouseEnter: handleMouseEnter,
1514
+ onMouseLeave: handleMouseLeave,
1515
+ initial: { scale: 1 },
1516
+ animate: !prefersReducedMotion && isAnimating ? { scale: [1, 1.05, 1] } : { scale: 1 },
1517
+ transition: { duration: 0.3 },
1518
+ children: [
1519
+ prefix,
1520
+ /* @__PURE__ */ jsxRuntime.jsx(
1521
+ react.motion.span,
1522
+ {
1523
+ initial: { opacity: 0, y: 20 },
1524
+ animate: { opacity: 1, y: 0 },
1525
+ transition: { duration: 0.3 },
1526
+ children: formattedValue
1527
+ },
1528
+ animationKey
1529
+ ),
1530
+ suffix
1531
+ ]
1532
+ }
1533
+ );
1534
+ }
1535
+ __name(AnimatedNumber, "AnimatedNumber");
1536
+ var AnimatedTestimonials = React9__namespace.forwardRef(
1537
+ ({ className, testimonials, autoPlay = true, duration = 5e3, ...props }, ref) => {
1538
+ const [activeIndex, setActiveIndex] = React9__namespace.useState(0);
1539
+ React9__namespace.useEffect(() => {
1540
+ if (!autoPlay) return;
1541
+ const interval = setInterval(() => {
1542
+ setActiveIndex((prev) => (prev + 1) % testimonials.length);
1543
+ }, duration);
1544
+ return () => clearInterval(interval);
1545
+ }, [autoPlay, duration, testimonials.length]);
1546
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1547
+ "div",
1548
+ {
1549
+ ref,
1550
+ className: utils.cn("relative min-h-[200px]", className),
1551
+ ...props,
1552
+ children: [
1553
+ /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
1554
+ react.motion.div,
1555
+ {
1556
+ initial: { opacity: 0, y: 20 },
1557
+ animate: { opacity: 1, y: 0 },
1558
+ exit: { opacity: 0, y: -20 },
1559
+ transition: { duration: 0.5 },
1560
+ children: /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.CardContent, { className: "pt-6", children: /* @__PURE__ */ jsxRuntime.jsxs("blockquote", { className: "space-y-4", children: [
1561
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg italic", children: [
1562
+ '"',
1563
+ testimonials[activeIndex].content,
1564
+ '"'
1565
+ ] }),
1566
+ /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "flex items-center gap-4", children: [
1567
+ /* @__PURE__ */ jsxRuntime.jsxs(avatar.Avatar, { children: [
1568
+ /* @__PURE__ */ jsxRuntime.jsx(avatar.AvatarImage, { src: testimonials[activeIndex].avatar }),
1569
+ /* @__PURE__ */ jsxRuntime.jsx(avatar.AvatarFallback, { children: testimonials[activeIndex].author.slice(0, 2).toUpperCase() })
1570
+ ] }),
1571
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1572
+ /* @__PURE__ */ jsxRuntime.jsx("cite", { className: "not-italic font-medium", children: testimonials[activeIndex].author }),
1573
+ testimonials[activeIndex].role && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
1574
+ testimonials[activeIndex].role,
1575
+ testimonials[activeIndex].company && `, ${testimonials[activeIndex].company}`
1576
+ ] })
1577
+ ] })
1578
+ ] })
1579
+ ] }) }) })
1580
+ },
1581
+ activeIndex
1582
+ ) }),
1583
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex justify-center gap-2", children: testimonials.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
1584
+ "button",
1585
+ {
1586
+ onClick: () => setActiveIndex(index),
1587
+ className: utils.cn(
1588
+ "h-2 w-2 rounded-full transition-all",
1589
+ index === activeIndex ? "w-8 bg-primary" : "bg-muted hover:bg-muted-foreground"
1590
+ ),
1591
+ "aria-label": `Go to testimonial ${index + 1}`
1592
+ },
1593
+ index
1594
+ )) })
1595
+ ]
1596
+ }
1597
+ );
1598
+ }
1599
+ );
1600
+ AnimatedTestimonials.displayName = "AnimatedTestimonials";
1601
+ var AnimatedTooltip = React9__namespace.forwardRef(
1602
+ ({ className, content, children, delay = 0, ...props }, ref) => {
1603
+ const [isVisible, setIsVisible] = React9__namespace.useState(false);
1604
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1605
+ "div",
1606
+ {
1607
+ ref,
1608
+ className: utils.cn("relative inline-block", className),
1609
+ onMouseEnter: () => setIsVisible(true),
1610
+ onMouseLeave: () => setIsVisible(false),
1611
+ ...props,
1612
+ children: [
1613
+ children,
1614
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isVisible && /* @__PURE__ */ jsxRuntime.jsxs(
1615
+ framerMotion.motion.div,
1616
+ {
1617
+ initial: { opacity: 0, y: 10, scale: 0.95 },
1618
+ animate: { opacity: 1, y: 0, scale: 1 },
1619
+ exit: { opacity: 0, y: 10, scale: 0.95 },
1620
+ transition: {
1621
+ duration: 0.2,
1622
+ delay: delay / 1e3,
1623
+ ease: "easeOut"
1624
+ },
1625
+ className: "absolute left-1/2 -translate-x-1/2 bottom-full mb-2 px-3 py-1.5 bg-popover text-popover-foreground text-sm rounded-md shadow-md whitespace-nowrap z-50",
1626
+ children: [
1627
+ content,
1628
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-popover" })
1629
+ ]
1630
+ }
1631
+ ) })
1632
+ ]
1633
+ }
1634
+ );
1635
+ }
1636
+ );
1637
+ AnimatedTooltip.displayName = "AnimatedTooltip";
1638
+ function AppleCardsCarousel({
1639
+ cards,
1640
+ autoPlay = false,
1641
+ autoPlayInterval = 5e3,
1642
+ className,
1643
+ cardClassName,
1644
+ showArrows = true,
1645
+ showDots = true,
1646
+ parallaxOffset = 50,
1647
+ stackOffset = 10,
1648
+ stackScale = 0.95,
1649
+ swipeThreshold = 50
1650
+ }) {
1651
+ const [currentIndex, setCurrentIndex] = React9__namespace.useState(0);
1652
+ const [isAutoPlaying, setIsAutoPlaying] = React9__namespace.useState(autoPlay);
1653
+ const containerRef = React9__namespace.useRef(null);
1654
+ const dragX = framerMotion.useMotionValue(0);
1655
+ const getCardStyle = /* @__PURE__ */ __name((index) => {
1656
+ const offset = index - currentIndex;
1657
+ const absOffset = Math.abs(offset);
1658
+ if (absOffset > 2) {
1659
+ return {
1660
+ display: "none",
1661
+ x: 0,
1662
+ scale: 1,
1663
+ opacity: 0,
1664
+ zIndex: 0
1665
+ };
1666
+ }
1667
+ const baseX = offset * stackOffset;
1668
+ const scale = Math.pow(stackScale, absOffset);
1669
+ const opacity = Math.max(0, 1 - absOffset * 0.3);
1670
+ const zIndex = cards.length - absOffset;
1671
+ return {
1672
+ display: "block",
1673
+ x: baseX,
1674
+ scale,
1675
+ opacity,
1676
+ zIndex
1677
+ };
1678
+ }, "getCardStyle");
1679
+ const goToNext = React9__namespace.useCallback(() => {
1680
+ setCurrentIndex((prev) => (prev + 1) % cards.length);
1681
+ }, [cards.length]);
1682
+ const goToPrevious = React9__namespace.useCallback(() => {
1683
+ setCurrentIndex((prev) => (prev - 1 + cards.length) % cards.length);
1684
+ }, [cards.length]);
1685
+ const goToCard = React9__namespace.useCallback((index) => {
1686
+ setCurrentIndex(index);
1687
+ }, []);
1688
+ const handleDragEnd = React9__namespace.useCallback(
1689
+ (event, info) => {
1690
+ const { offset, velocity } = info;
1691
+ if (Math.abs(offset.x) > swipeThreshold || Math.abs(velocity.x) > 500) {
1692
+ if (offset.x > 0) {
1693
+ goToPrevious();
1694
+ } else {
1695
+ goToNext();
1696
+ }
1697
+ }
1698
+ },
1699
+ [goToNext, goToPrevious, swipeThreshold]
1700
+ );
1701
+ React9__namespace.useEffect(() => {
1702
+ if (!isAutoPlaying) return;
1703
+ const interval = setInterval(goToNext, autoPlayInterval);
1704
+ return () => clearInterval(interval);
1705
+ }, [isAutoPlaying, goToNext, autoPlayInterval]);
1706
+ const handleMouseEnter = React9__namespace.useCallback(() => {
1707
+ if (autoPlay) {
1708
+ setIsAutoPlaying(false);
1709
+ }
1710
+ }, [autoPlay]);
1711
+ const handleMouseLeave = React9__namespace.useCallback(() => {
1712
+ if (autoPlay) {
1713
+ setIsAutoPlaying(true);
1714
+ }
1715
+ }, [autoPlay]);
1716
+ React9__namespace.useEffect(() => {
1717
+ const handleKeyDown = /* @__PURE__ */ __name((e) => {
1718
+ if (e.key === "ArrowLeft") {
1719
+ goToPrevious();
1720
+ } else if (e.key === "ArrowRight") {
1721
+ goToNext();
1722
+ }
1723
+ }, "handleKeyDown");
1724
+ window.addEventListener("keydown", handleKeyDown);
1725
+ return () => window.removeEventListener("keydown", handleKeyDown);
1726
+ }, [goToNext, goToPrevious]);
1727
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1728
+ "div",
1729
+ {
1730
+ ref: containerRef,
1731
+ className: utils.cn("relative w-full max-w-6xl mx-auto px-4 py-8", className),
1732
+ onMouseEnter: handleMouseEnter,
1733
+ onMouseLeave: handleMouseLeave,
1734
+ children: [
1735
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "popLayout", children: cards.map((card, index) => {
1736
+ const style = getCardStyle(index);
1737
+ const isActive = index === currentIndex;
1738
+ return /* @__PURE__ */ jsxRuntime.jsx(
1739
+ framerMotion.motion.div,
1740
+ {
1741
+ className: utils.cn(
1742
+ "absolute inset-0 w-full h-full",
1743
+ !isActive && "pointer-events-none"
1744
+ ),
1745
+ initial: false,
1746
+ animate: {
1747
+ x: style.x,
1748
+ scale: style.scale,
1749
+ opacity: style.opacity,
1750
+ zIndex: style.zIndex
1751
+ },
1752
+ transition: {
1753
+ type: "spring",
1754
+ stiffness: 300,
1755
+ damping: 30
1756
+ },
1757
+ drag: isActive ? "x" : false,
1758
+ dragSnapToOrigin: true,
1759
+ dragElastic: 0.2,
1760
+ onDragEnd: handleDragEnd,
1761
+ whileDrag: { cursor: "grabbing" },
1762
+ style: {
1763
+ x: dragX,
1764
+ display: style.display
1765
+ },
1766
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1767
+ ui.Card,
1768
+ {
1769
+ className: utils.cn(
1770
+ "relative w-full h-full overflow-hidden cursor-grab",
1771
+ "bg-gradient-to-br from-white to-gray-50 dark:from-gray-900 dark:to-gray-950",
1772
+ "shadow-2xl hover:shadow-3xl transition-shadow duration-300",
1773
+ cardClassName
1774
+ ),
1775
+ style: {
1776
+ background: card.gradient
1777
+ },
1778
+ children: [
1779
+ card.image && /* @__PURE__ */ jsxRuntime.jsxs(
1780
+ framerMotion.motion.div,
1781
+ {
1782
+ className: "absolute inset-0 w-full h-full",
1783
+ style: {
1784
+ x: framerMotion.useTransform(
1785
+ dragX,
1786
+ [-200, 0, 200],
1787
+ [parallaxOffset, 0, -parallaxOffset]
1788
+ )
1789
+ },
1790
+ children: [
1791
+ /* @__PURE__ */ jsxRuntime.jsx(
1792
+ "img",
1793
+ {
1794
+ src: card.image,
1795
+ alt: card.title,
1796
+ className: "w-full h-full object-cover"
1797
+ }
1798
+ ),
1799
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent" })
1800
+ ]
1801
+ }
1802
+ ),
1803
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10 flex flex-col justify-end h-full p-8 md:p-12", children: card.content ? card.content : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1804
+ /* @__PURE__ */ jsxRuntime.jsx(
1805
+ framerMotion.motion.h3,
1806
+ {
1807
+ className: "text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-2",
1808
+ initial: { opacity: 0, y: 20 },
1809
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
1810
+ transition: { delay: 0.1 },
1811
+ children: card.title
1812
+ }
1813
+ ),
1814
+ card.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
1815
+ framerMotion.motion.p,
1816
+ {
1817
+ className: "text-xl md:text-2xl text-white/80 mb-4",
1818
+ initial: { opacity: 0, y: 20 },
1819
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
1820
+ transition: { delay: 0.2 },
1821
+ children: card.subtitle
1822
+ }
1823
+ ),
1824
+ card.description && /* @__PURE__ */ jsxRuntime.jsx(
1825
+ framerMotion.motion.p,
1826
+ {
1827
+ className: "text-base md:text-lg text-white/70 max-w-2xl",
1828
+ initial: { opacity: 0, y: 20 },
1829
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
1830
+ transition: { delay: 0.3 },
1831
+ children: card.description
1832
+ }
1833
+ )
1834
+ ] }) })
1835
+ ]
1836
+ }
1837
+ )
1838
+ },
1839
+ card.id
1840
+ );
1841
+ }) }) }),
1842
+ showArrows && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1843
+ /* @__PURE__ */ jsxRuntime.jsxs(
1844
+ ui.Button,
1845
+ {
1846
+ variant: "ghost",
1847
+ size: "icon",
1848
+ className: utils.cn(
1849
+ "absolute left-4 top-1/2 -translate-y-1/2 z-20",
1850
+ "bg-white/10 backdrop-blur-md hover:bg-white/20",
1851
+ "text-white border border-white/20",
1852
+ "hidden md:flex"
1853
+ ),
1854
+ onClick: goToPrevious,
1855
+ children: [
1856
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-6 w-6" }),
1857
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Previous card" })
1858
+ ]
1859
+ }
1860
+ ),
1861
+ /* @__PURE__ */ jsxRuntime.jsxs(
1862
+ ui.Button,
1863
+ {
1864
+ variant: "ghost",
1865
+ size: "icon",
1866
+ className: utils.cn(
1867
+ "absolute right-4 top-1/2 -translate-y-1/2 z-20",
1868
+ "bg-white/10 backdrop-blur-md hover:bg-white/20",
1869
+ "text-white border border-white/20",
1870
+ "hidden md:flex"
1871
+ ),
1872
+ onClick: goToNext,
1873
+ children: [
1874
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-6 w-6" }),
1875
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Next card" })
1876
+ ]
1877
+ }
1878
+ )
1879
+ ] }),
1880
+ showDots && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2", children: cards.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
1881
+ "button",
1882
+ {
1883
+ className: utils.cn(
1884
+ "w-2 h-2 rounded-full transition-all duration-300",
1885
+ "bg-white/40 hover:bg-white/60",
1886
+ index === currentIndex && "w-8 bg-white"
1887
+ ),
1888
+ onClick: () => goToCard(index),
1889
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sr-only", children: [
1890
+ "Go to card ",
1891
+ index + 1
1892
+ ] })
1893
+ },
1894
+ index
1895
+ )) })
1896
+ ]
1897
+ }
1898
+ );
1899
+ }
1900
+ __name(AppleCardsCarousel, "AppleCardsCarousel");
1901
+ var gradientPresets = {
1902
+ sunset: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
1903
+ ocean: "linear-gradient(135deg, #667eea 0%, #4ca1af 100%)",
1904
+ fire: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
1905
+ forest: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
1906
+ galaxy: "linear-gradient(135deg, #7303c0 0%, #ec38bc 50%, #fdeff9 100%)",
1907
+ aurora: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)",
1908
+ peach: "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",
1909
+ lavender: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"
1910
+ };
1911
+ var AppleHelloEffect = React9__namespace.forwardRef(({ className, text = "Hello", duration = 2, ...props }, ref) => {
1912
+ const letters = text.split("");
1913
+ return /* @__PURE__ */ jsxRuntime.jsx(
1914
+ "div",
1915
+ {
1916
+ ref,
1917
+ className: utils.cn(
1918
+ "relative flex items-center justify-center text-6xl font-bold",
1919
+ className
1920
+ ),
1921
+ ...props,
1922
+ children: letters.map((letter, index) => /* @__PURE__ */ jsxRuntime.jsx(
1923
+ framerMotion.motion.span,
1924
+ {
1925
+ initial: { opacity: 0, y: 50 },
1926
+ animate: { opacity: 1, y: 0 },
1927
+ transition: {
1928
+ duration,
1929
+ delay: index * 0.1,
1930
+ ease: [0.215, 0.61, 0.355, 1]
1931
+ },
1932
+ className: "inline-block",
1933
+ children: letter
1934
+ },
1935
+ index
1936
+ ))
1937
+ }
1938
+ );
1939
+ });
1940
+ AppleHelloEffect.displayName = "AppleHelloEffect";
1941
+
1942
+ exports.AnimatedBackground = AnimatedBackground;
1943
+ exports.AnimatedBeam = AnimatedBeam;
1944
+ exports.AnimatedCursor = AnimatedCursor;
1945
+ exports.AnimatedIcon = AnimatedIcon;
1946
+ exports.AnimatedList = AnimatedList;
1947
+ exports.AnimatedNumber = AnimatedNumber;
1948
+ exports.AnimatedTestimonials = AnimatedTestimonials;
1949
+ exports.AnimatedTooltip = AnimatedTooltip;
1950
+ exports.AppleCardsCarousel = AppleCardsCarousel;
1951
+ exports.AppleHelloEffect = AppleHelloEffect;
1952
+ exports.gradientPresets = gradientPresets;