@sreedev/my3dui 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,3717 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Accordion3D: () => Accordion3D,
34
+ AudioVisualizer: () => AudioVisualizer,
35
+ Badge: () => Badge,
36
+ Badge3D: () => Badge3D,
37
+ BarChart3D: () => BarChart3D,
38
+ Bloom: () => Bloom,
39
+ Breadcrumb: () => Breadcrumb,
40
+ Button3D: () => Button3D,
41
+ Card3D: () => Card3D,
42
+ Container: () => Container,
43
+ Dialog: () => Dialog,
44
+ Fog: () => Fog,
45
+ Gallery3D: () => Gallery3D,
46
+ GlowEffect: () => GlowEffect,
47
+ Graph3D: () => Graph3D,
48
+ Grid: () => Grid,
49
+ ImagePlane: () => ImagePlane,
50
+ Input: () => Input,
51
+ Input3D: () => Input3D,
52
+ LineChart3D: () => LineChart3D,
53
+ Map3D: () => Map3D,
54
+ Menu3D: () => Menu3D,
55
+ Menu3DItem: () => Menu3DItem,
56
+ Menu3DLabel: () => Menu3DLabel,
57
+ Menu3DSeparator: () => Menu3DSeparator,
58
+ Modal3D: () => Modal3D,
59
+ ModelViewer: () => ModelViewer,
60
+ NavBar3D: () => NavBar3D,
61
+ NoiseField: () => NoiseField,
62
+ PageLayout: () => PageLayout,
63
+ Pagination: () => Pagination,
64
+ Particles: () => Particles,
65
+ PieChart3D: () => PieChart3D,
66
+ Popover: () => Popover,
67
+ Progress: () => Progress,
68
+ Progress3D: () => Progress3D,
69
+ Reflection: () => Reflection,
70
+ ScatterPlot3D: () => ScatterPlot3D,
71
+ Section: () => Section,
72
+ Select: () => Select,
73
+ Select3D: () => Select3D,
74
+ ShadowSystem: () => ShadowSystem,
75
+ Sheet: () => Sheet,
76
+ Skeleton: () => Skeleton,
77
+ Slider: () => Slider,
78
+ Slider3D: () => Slider3D,
79
+ Spinner3D: () => Spinner3D,
80
+ Stack: () => Stack,
81
+ Stepper3D: () => Stepper3D,
82
+ Table: () => Table,
83
+ Tabs3D: () => Tabs3D,
84
+ Timeline3D: () => Timeline3D,
85
+ Toast: () => Toast,
86
+ Toggle: () => Toggle,
87
+ Toggle3D: () => Toggle3D,
88
+ Tooltip: () => Tooltip,
89
+ Tooltip3D: () => Tooltip3D,
90
+ VideoPlane: () => VideoPlane,
91
+ WaveEffect: () => WaveEffect
92
+ });
93
+ module.exports = __toCommonJS(index_exports);
94
+
95
+ // src/components/layouts/container.tsx
96
+ var import_react = __toESM(require("react"), 1);
97
+
98
+ // src/lib/utils.ts
99
+ var import_clsx = require("clsx");
100
+ var import_tailwind_merge = require("tailwind-merge");
101
+ function cn(...inputs) {
102
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
103
+ }
104
+
105
+ // src/components/layouts/container.tsx
106
+ var import_jsx_runtime = require("react/jsx-runtime");
107
+ var Container = import_react.default.forwardRef(
108
+ ({ className, size = "lg", ...props }, ref) => {
109
+ const sizeStyles = {
110
+ sm: "max-w-3xl",
111
+ md: "max-w-5xl",
112
+ lg: "max-w-7xl",
113
+ xl: "max-w-[1400px]",
114
+ full: "max-w-full"
115
+ };
116
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
117
+ "div",
118
+ {
119
+ ref,
120
+ className: cn(
121
+ "w-full mx-auto px-4 md:px-6 lg:px-8",
122
+ sizeStyles[size],
123
+ className
124
+ ),
125
+ ...props
126
+ }
127
+ );
128
+ }
129
+ );
130
+ Container.displayName = "Container";
131
+
132
+ // src/components/layouts/grid.tsx
133
+ var import_react2 = __toESM(require("react"), 1);
134
+ var import_jsx_runtime2 = require("react/jsx-runtime");
135
+ var Grid = import_react2.default.forwardRef(
136
+ ({ className, cols = 1, gap = 4, style, ...props }, ref) => {
137
+ const gridStyle = typeof cols === "number" ? { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` } : {};
138
+ const responsiveClasses = typeof cols === "object" ? Object.entries(cols).map(([breakpoint, val]) => {
139
+ return `${breakpoint}:grid-cols-${val}`;
140
+ }).join(" ") : "";
141
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
142
+ "div",
143
+ {
144
+ ref,
145
+ className: cn(
146
+ "grid",
147
+ typeof cols === "number" ? "" : responsiveClasses,
148
+ // using Tailwind's predefined grid-cols- if possible, but simplest is style override for arbitrary
149
+ className
150
+ ),
151
+ style: {
152
+ gap: typeof gap === "number" ? `${gap * 0.25}rem` : gap,
153
+ ...gridStyle,
154
+ ...style
155
+ },
156
+ ...props
157
+ }
158
+ );
159
+ }
160
+ );
161
+ Grid.displayName = "Grid";
162
+
163
+ // src/components/layouts/stack.tsx
164
+ var import_react3 = __toESM(require("react"), 1);
165
+ var import_jsx_runtime3 = require("react/jsx-runtime");
166
+ var Stack = import_react3.default.forwardRef(
167
+ ({
168
+ className,
169
+ direction = "col",
170
+ gap = 4,
171
+ align = "stretch",
172
+ justify = "start",
173
+ wrap = false,
174
+ style,
175
+ ...props
176
+ }, ref) => {
177
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
178
+ "div",
179
+ {
180
+ ref,
181
+ className: cn(
182
+ "flex",
183
+ direction === "col" ? "flex-col" : "flex-row",
184
+ wrap && "flex-wrap",
185
+ {
186
+ "items-start": align === "start",
187
+ "items-center": align === "center",
188
+ "items-end": align === "end",
189
+ "items-stretch": align === "stretch",
190
+ "justify-start": justify === "start",
191
+ "justify-center": justify === "center",
192
+ "justify-end": justify === "end",
193
+ "justify-between": justify === "between",
194
+ "justify-around": justify === "around",
195
+ "justify-evenly": justify === "evenly"
196
+ },
197
+ className
198
+ ),
199
+ style: {
200
+ gap: typeof gap === "number" ? `${gap * 0.25}rem` : gap,
201
+ ...style
202
+ },
203
+ ...props
204
+ }
205
+ );
206
+ }
207
+ );
208
+ Stack.displayName = "Stack";
209
+
210
+ // src/components/layouts/section.tsx
211
+ var import_react4 = __toESM(require("react"), 1);
212
+ var import_jsx_runtime4 = require("react/jsx-runtime");
213
+ var Section = import_react4.default.forwardRef(
214
+ ({
215
+ className,
216
+ children,
217
+ fullWidth = false,
218
+ background = "default",
219
+ containerSize = "lg",
220
+ noPadding = false,
221
+ ...props
222
+ }, ref) => {
223
+ const backgrounds = {
224
+ default: "bg-background text-foreground",
225
+ muted: "bg-muted text-muted-foreground",
226
+ brand: "bg-primary text-primary-foreground",
227
+ glass: "bg-background/80 backdrop-blur-sm border-y border-border/50"
228
+ };
229
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
230
+ "section",
231
+ {
232
+ ref,
233
+ className: cn(
234
+ "relative w-full",
235
+ !noPadding && "py-12 md:py-24 lg:py-32",
236
+ backgrounds[background],
237
+ className
238
+ ),
239
+ ...props,
240
+ children: fullWidth ? children : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Container, { size: containerSize, children })
241
+ }
242
+ );
243
+ }
244
+ );
245
+ Section.displayName = "Section";
246
+
247
+ // src/components/layouts/page-layout.tsx
248
+ var import_react5 = __toESM(require("react"), 1);
249
+ var import_jsx_runtime5 = require("react/jsx-runtime");
250
+ var PageLayout = import_react5.default.forwardRef(
251
+ ({ className, header, footer, sidebar, sidebarPosition = "left", children, ...props }, ref) => {
252
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { ref, className: cn("min-h-screen flex flex-col", className), ...props, children: [
253
+ header && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("header", { className: "sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: header }),
254
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 flex", children: [
255
+ sidebar && sidebarPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("aside", { className: "w-64 border-r bg-muted/40 p-4", children: sidebar }),
256
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("main", { className: "flex-1", children }),
257
+ sidebar && sidebarPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("aside", { className: "w-64 border-l bg-muted/40 p-4", children: sidebar })
258
+ ] }),
259
+ footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("footer", { className: "border-t bg-muted/40", children: footer })
260
+ ] });
261
+ }
262
+ );
263
+ PageLayout.displayName = "PageLayout";
264
+
265
+ // src/components/ui/button3d.tsx
266
+ var import_react6 = __toESM(require("react"), 1);
267
+ var import_framer_motion = require("framer-motion");
268
+ var import_react_slot = require("@radix-ui/react-slot");
269
+ var import_class_variance_authority = require("class-variance-authority");
270
+ var import_jsx_runtime6 = require("react/jsx-runtime");
271
+ var buttonVariants = (0, import_class_variance_authority.cva)(
272
+ "relative inline-flex items-center justify-center whitespace-nowrap rounded-lg 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 select-none",
273
+ {
274
+ variants: {
275
+ variant: {
276
+ primary: "bg-slate-900 text-slate-50 hover:bg-slate-800 border-b-4 border-slate-950 active:border-b-0 active:translate-y-1 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-200 dark:border-slate-300",
277
+ secondary: "bg-slate-100 text-slate-900 hover:bg-slate-200 border-b-4 border-slate-300 active:border-b-0 active:translate-y-1 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-700 dark:border-slate-950",
278
+ accent: "bg-cyan-500 text-white hover:bg-cyan-400 border-b-4 border-cyan-700 active:border-b-0 active:translate-y-1",
279
+ destructive: "bg-red-500 text-white hover:bg-red-600 border-b-4 border-red-800 active:border-b-0 active:translate-y-1",
280
+ outline: "bg-transparent border-2 border-slate-200 hover:bg-slate-100/50 text-slate-900 border-b-4 border-slate-300 active:border-b-2 active:translate-y-[2px] dark:border-slate-700 dark:text-slate-100 dark:hover:bg-slate-800",
281
+ ghost: "hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",
282
+ glass: "bg-white/10 backdrop-blur-md border border-white/20 text-white hover:bg-white/20 shadow-lg active:scale-95"
283
+ },
284
+ size: {
285
+ default: "h-10 px-4 py-2",
286
+ sm: "h-8 px-3 text-xs",
287
+ md: "h-10 px-4 py-2 text-sm",
288
+ lg: "h-12 px-8 text-base",
289
+ icon: "h-10 w-10 p-0"
290
+ }
291
+ },
292
+ defaultVariants: {
293
+ variant: "primary",
294
+ size: "default"
295
+ }
296
+ }
297
+ );
298
+ var Button3D = import_react6.default.forwardRef(
299
+ ({
300
+ className,
301
+ variant = "primary",
302
+ size = "md",
303
+ asChild = false,
304
+ loading = false,
305
+ shadowColor,
306
+ style,
307
+ children,
308
+ ...props
309
+ }, ref) => {
310
+ const baseStyles = "relative inline-flex items-center justify-center whitespace-nowrap rounded-lg 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 select-none active:scale-[0.98]";
311
+ const variantStyles = {
312
+ primary: `
313
+ bg-slate-900 text-slate-50
314
+ hover:bg-slate-800
315
+ border-b-4 border-slate-950
316
+ active:border-b-0 active:translate-y-1
317
+ dark:bg-slate-50 dark:text-slate-900
318
+ dark:hover:bg-slate-200
319
+ dark:border-slate-300 dark:border-b-4
320
+ `,
321
+ secondary: `
322
+ bg-slate-100 text-slate-900
323
+ hover:bg-slate-200
324
+ border-b-4 border-slate-300
325
+ active:border-b-0 active:translate-y-1
326
+ dark:bg-slate-800 dark:text-slate-50
327
+ dark:hover:bg-slate-700
328
+ dark:border-slate-950
329
+ `,
330
+ accent: `
331
+ bg-cyan-500 text-white
332
+ hover:bg-cyan-400
333
+ border-b-4 border-cyan-700
334
+ active:border-b-0 active:translate-y-1
335
+ `,
336
+ destructive: `
337
+ bg-red-500 text-white
338
+ hover:bg-red-600
339
+ border-b-4 border-red-800
340
+ active:border-b-0 active:translate-y-1
341
+ `,
342
+ outline: `
343
+ bg-transparent border-2 border-slate-200
344
+ hover:bg-slate-100/50 text-slate-900
345
+ border-b-4 border-slate-300
346
+ active:border-b-2 active:translate-y-[2px]
347
+ dark:border-slate-700 dark:text-slate-100
348
+ dark:border-b-4 dark:hover:bg-slate-800
349
+ `,
350
+ ghost: `
351
+ hover:bg-slate-100
352
+ hover:text-slate-900
353
+ dark:hover:bg-slate-800
354
+ dark:hover:text-slate-50
355
+ border-none shadow-none translate-y-0
356
+ `,
357
+ glass: `
358
+ bg-white/10 backdrop-blur-md
359
+ border border-white/20
360
+ text-white
361
+ hover:bg-white/20
362
+ shadow-lg
363
+ active:scale-95
364
+ `
365
+ };
366
+ const sizeStyles = {
367
+ default: "h-10 px-4 py-2 text-sm",
368
+ sm: "h-8 px-3 text-xs",
369
+ md: "h-10 px-4 py-2 text-sm",
370
+ lg: "h-12 px-8 text-base",
371
+ icon: "h-10 w-10 p-0"
372
+ };
373
+ const motionProps = {
374
+ whileTap: { scale: 0.97 },
375
+ transition: { type: "spring", stiffness: 400, damping: 15 }
376
+ };
377
+ const buttonContent = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
378
+ loading && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { className: "animate-spin -ml-1 mr-2 h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
379
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
380
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
381
+ ] }),
382
+ children
383
+ ] });
384
+ const buttonClassName = cn(
385
+ baseStyles,
386
+ variantStyles[variant],
387
+ sizeStyles[size],
388
+ className
389
+ );
390
+ const buttonStyle = {
391
+ ...style,
392
+ ...shadowColor ? { borderColor: shadowColor } : {}
393
+ };
394
+ if (asChild) {
395
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
396
+ import_react_slot.Slot,
397
+ {
398
+ ref,
399
+ className: buttonClassName,
400
+ style: buttonStyle,
401
+ ...props,
402
+ children
403
+ }
404
+ );
405
+ }
406
+ const {
407
+ onDrag,
408
+ onDragStart,
409
+ onDragEnd,
410
+ onAnimationStart,
411
+ onAnimationEnd,
412
+ onAnimationIteration,
413
+ ...safeProps
414
+ } = props;
415
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
416
+ import_framer_motion.motion.button,
417
+ {
418
+ ref,
419
+ className: buttonClassName,
420
+ style: buttonStyle,
421
+ disabled: props.disabled || loading,
422
+ ...safeProps,
423
+ ...motionProps,
424
+ children: buttonContent
425
+ }
426
+ );
427
+ }
428
+ );
429
+ Button3D.displayName = "Button3D";
430
+
431
+ // src/components/ui/card3d.tsx
432
+ var import_react7 = require("react");
433
+ var import_framer_motion2 = require("framer-motion");
434
+ var import_jsx_runtime7 = require("react/jsx-runtime");
435
+ function Card3D({
436
+ children,
437
+ className,
438
+ depth = "md",
439
+ variant = "glass",
440
+ disableTilt = false,
441
+ ...props
442
+ }) {
443
+ const ref = (0, import_react7.useRef)(null);
444
+ const x = (0, import_framer_motion2.useMotionValue)(0);
445
+ const y = (0, import_framer_motion2.useMotionValue)(0);
446
+ const mouseX = (0, import_framer_motion2.useSpring)(x, { stiffness: 150, damping: 15 });
447
+ const mouseY = (0, import_framer_motion2.useSpring)(y, { stiffness: 150, damping: 15 });
448
+ const rotateX = (0, import_framer_motion2.useTransform)(mouseY, [-0.5, 0.5], ["7deg", "-7deg"]);
449
+ const rotateY = (0, import_framer_motion2.useTransform)(mouseX, [-0.5, 0.5], ["-7deg", "7deg"]);
450
+ const handleMouseMove = (e) => {
451
+ if (disableTilt || !ref.current) return;
452
+ const rect = ref.current.getBoundingClientRect();
453
+ const width = rect.width;
454
+ const height = rect.height;
455
+ const mouseXPos = e.clientX - rect.left;
456
+ const mouseYPos = e.clientY - rect.top;
457
+ const xPct = mouseXPos / width - 0.5;
458
+ const yPct = mouseYPos / height - 0.5;
459
+ x.set(xPct);
460
+ y.set(yPct);
461
+ };
462
+ const handleMouseLeave = () => {
463
+ if (disableTilt) return;
464
+ x.set(0);
465
+ y.set(0);
466
+ };
467
+ const getVariantStyles = () => {
468
+ switch (variant) {
469
+ case "neon":
470
+ return "bg-black/90 border-cyan-500/50 shadow-[0_0_30px_rgba(6,182,212,0.2)] text-cyan-50";
471
+ case "solid":
472
+ return "bg-white dark:bg-slate-900 border-slate-200 dark:border-slate-800 shadow-xl text-slate-900 dark:text-slate-100";
473
+ case "outline":
474
+ return "bg-transparent border-2 border-slate-200 dark:border-slate-700 text-slate-900 dark:text-slate-100";
475
+ case "glass":
476
+ default:
477
+ return "bg-white/40 dark:bg-slate-900/60 backdrop-blur-xl border-white/40 dark:border-white/10 shadow-lg shadow-black/5 dark:shadow-black/20 text-slate-800 dark:text-white";
478
+ }
479
+ };
480
+ const getDepthValue = () => {
481
+ switch (depth) {
482
+ case "sm":
483
+ return 20;
484
+ case "lg":
485
+ return 80;
486
+ case "md":
487
+ default:
488
+ return 40;
489
+ }
490
+ };
491
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
492
+ import_framer_motion2.motion.div,
493
+ {
494
+ ref,
495
+ onMouseMove: handleMouseMove,
496
+ onMouseLeave: handleMouseLeave,
497
+ style: {
498
+ perspective: 1200,
499
+ transformStyle: "preserve-3d"
500
+ },
501
+ className: cn("relative group cursor-pointer", className),
502
+ ...props,
503
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
504
+ import_framer_motion2.motion.div,
505
+ {
506
+ style: {
507
+ rotateX: disableTilt ? 0 : rotateX,
508
+ rotateY: disableTilt ? 0 : rotateY,
509
+ transformStyle: "preserve-3d"
510
+ },
511
+ className: cn(
512
+ "relative h-full w-full rounded-xl border p-6 transition-colors duration-300",
513
+ getVariantStyles()
514
+ ),
515
+ children: [
516
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
517
+ "div",
518
+ {
519
+ className: "absolute inset-0 rounded-xl bg-black/10 dark:bg-black/40 blur-xl transition-all duration-300 -z-20",
520
+ style: {
521
+ transform: `translateZ(-${getDepthValue()}px) scale(0.95)`,
522
+ opacity: 0.6
523
+ }
524
+ }
525
+ ),
526
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { transform: "translateZ(20px)" }, children }),
527
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
528
+ "div",
529
+ {
530
+ className: "absolute inset-0 rounded-xl pointer-events-none bg-gradient-to-tr from-white/0 via-white/10 to-white/0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 will-change-transform",
531
+ style: { mixBlendMode: "overlay" }
532
+ }
533
+ )
534
+ ]
535
+ }
536
+ )
537
+ }
538
+ );
539
+ }
540
+
541
+ // src/components/ui/accordion3d.tsx
542
+ var import_react8 = require("react");
543
+ var import_framer_motion3 = require("framer-motion");
544
+ var import_lucide_react = require("lucide-react");
545
+ var import_jsx_runtime8 = require("react/jsx-runtime");
546
+ var Accordion3D = ({
547
+ items,
548
+ className,
549
+ variant = "glass",
550
+ defaultOpenIndex = null,
551
+ allowMultiple = false
552
+ }) => {
553
+ const [openIndexes, setOpenIndexes] = (0, import_react8.useState)(
554
+ defaultOpenIndex !== null ? [defaultOpenIndex] : []
555
+ );
556
+ const toggleItem = (index) => {
557
+ if (allowMultiple) {
558
+ setOpenIndexes(
559
+ (prev) => prev.includes(index) ? prev.filter((i) => i !== index) : [...prev, index]
560
+ );
561
+ } else {
562
+ setOpenIndexes(
563
+ (prev) => prev.includes(index) ? [] : [index]
564
+ );
565
+ }
566
+ };
567
+ const getVariantStyles = () => {
568
+ switch (variant) {
569
+ case "neon":
570
+ return "bg-slate-900/90 border-cyan-500/50 shadow-[0_0_15px_rgba(6,182,212,0.15)] hover:shadow-[0_0_25px_rgba(6,182,212,0.3)] text-cyan-50";
571
+ case "solid":
572
+ return "bg-white dark:bg-slate-800 border-slate-200 dark:border-slate-700 shadow-xl text-slate-900 dark:text-slate-100";
573
+ case "minimal":
574
+ return "bg-white/80 dark:bg-black/50 border-transparent shadow-sm backdrop-blur-md text-slate-800 dark:text-slate-200 hover:bg-white/95 dark:hover:bg-slate-900/80";
575
+ case "glass":
576
+ default:
577
+ return "bg-white/40 dark:bg-slate-900/60 backdrop-blur-xl border-white/40 dark:border-white/10 shadow-lg shadow-black/5 dark:shadow-black/20 text-slate-800 dark:text-white";
578
+ }
579
+ };
580
+ const getDepthLayerStyles = () => {
581
+ switch (variant) {
582
+ case "neon":
583
+ return "bg-cyan-900/40";
584
+ case "minimal":
585
+ return "hidden";
586
+ case "solid":
587
+ return "bg-slate-200 dark:bg-slate-900";
588
+ case "glass":
589
+ default:
590
+ return "bg-slate-900/10 dark:bg-black/40";
591
+ }
592
+ };
593
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("flex flex-col gap-4 w-full max-w-2xl mx-auto", className), children: items.map((item, index) => {
594
+ const isOpen = openIndexes.includes(index);
595
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
596
+ import_framer_motion3.motion.div,
597
+ {
598
+ initial: false,
599
+ animate: isOpen ? "open" : "closed",
600
+ className: "relative group perspective-[1000px] z-0",
601
+ children: [
602
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
603
+ import_framer_motion3.motion.div,
604
+ {
605
+ className: cn(
606
+ "absolute inset-0 rounded-xl translate-y-2 translate-x-0 -z-10 transition-colors duration-300",
607
+ getDepthLayerStyles()
608
+ ),
609
+ variants: {
610
+ open: {
611
+ translateY: 4,
612
+ scale: 0.99
613
+ },
614
+ closed: {
615
+ translateY: 8,
616
+ scale: 0.96
617
+ }
618
+ },
619
+ transition: { duration: 0.2 }
620
+ }
621
+ ),
622
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
623
+ import_framer_motion3.motion.div,
624
+ {
625
+ className: cn(
626
+ "relative overflow-hidden rounded-xl border transition-all duration-300 will-change-transform z-10",
627
+ getVariantStyles()
628
+ ),
629
+ whileHover: {
630
+ y: -2,
631
+ scale: 1.005,
632
+ transition: { type: "spring", stiffness: 400, damping: 25 }
633
+ },
634
+ whileTap: { scale: 0.995, y: 0 },
635
+ variants: {
636
+ open: { y: 0 },
637
+ closed: { y: 0 }
638
+ },
639
+ children: [
640
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
641
+ "button",
642
+ {
643
+ onClick: () => toggleItem(index),
644
+ className: "w-full flex items-center justify-between p-5 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 rounded-xl",
645
+ "aria-expanded": isOpen,
646
+ children: [
647
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-4", children: [
648
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
649
+ "div",
650
+ {
651
+ className: cn(
652
+ "flex items-center justify-center w-10 h-10 rounded-lg bg-gradient-to-br transition-all duration-500 shadow-inner",
653
+ variant === "neon" ? "from-cyan-500/20 to-blue-600/20 text-cyan-400" : variant === "solid" ? "from-slate-100 to-slate-200 dark:from-slate-800 dark:to-slate-900 text-slate-600 dark:text-slate-300" : "from-white/50 to-white/10 dark:from-white/10 dark:to-white/5 text-slate-700 dark:text-slate-200"
654
+ ),
655
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cn("transition-transform duration-300", isOpen ? "scale-110" : "scale-100"), children: item.icon })
656
+ }
657
+ ),
658
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col", children: [
659
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cn(
660
+ "text-lg font-semibold tracking-tight transition-colors",
661
+ isOpen ? "opacity-100" : "opacity-80 group-hover:opacity-100"
662
+ ), children: item.title }),
663
+ isOpen && item.value && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-xs opacity-60 font-mono", children: item.value })
664
+ ] })
665
+ ] }),
666
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-3", children: [
667
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn(
668
+ "w-2 h-2 rounded-full transition-all duration-500",
669
+ isOpen ? variant === "neon" ? "bg-cyan-400 shadow-[0_0_10px_#22d3ee]" : "bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]" : "bg-slate-400/30"
670
+ ) }),
671
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
672
+ import_framer_motion3.motion.div,
673
+ {
674
+ variants: {
675
+ open: { rotate: 180 },
676
+ closed: { rotate: 0 }
677
+ },
678
+ transition: { type: "spring", stiffness: 200, damping: 20 },
679
+ className: cn(
680
+ "p-1 rounded-full",
681
+ variant === "neon" ? "text-cyan-400" : "text-slate-500 dark:text-slate-400"
682
+ ),
683
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react.ChevronDown, { className: "w-5 h-5" })
684
+ }
685
+ )
686
+ ] })
687
+ ]
688
+ }
689
+ ),
690
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_framer_motion3.AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
691
+ import_framer_motion3.motion.div,
692
+ {
693
+ initial: "collapsed",
694
+ animate: "open",
695
+ exit: "collapsed",
696
+ variants: {
697
+ open: { opacity: 1, height: "auto" },
698
+ collapsed: { opacity: 0, height: 0 }
699
+ },
700
+ transition: {
701
+ duration: 0.4,
702
+ ease: [0.04, 0.62, 0.23, 0.98]
703
+ },
704
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "px-5 pb-6 pt-0", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
705
+ import_framer_motion3.motion.div,
706
+ {
707
+ initial: { opacity: 0 },
708
+ animate: { opacity: 1 },
709
+ transition: { delay: 0.1, duration: 0.3 },
710
+ className: "relative",
711
+ children: [
712
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-px w-full bg-gradient-to-r from-transparent via-current to-transparent opacity-10 mb-5" }),
713
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-base sm:text-[15px] opacity-80 leading-relaxed font-normal pl-14", children: item.content })
714
+ ]
715
+ }
716
+ ) })
717
+ },
718
+ "content"
719
+ ) }),
720
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
721
+ "div",
722
+ {
723
+ className: "absolute inset-0 pointer-events-none bg-gradient-to-tr from-white/0 via-white/5 to-white/0 opacity-0 group-hover:opacity-100 transition-opacity duration-700",
724
+ style: { mixBlendMode: "overlay" }
725
+ }
726
+ )
727
+ ]
728
+ }
729
+ )
730
+ ]
731
+ },
732
+ index
733
+ );
734
+ }) });
735
+ };
736
+
737
+ // src/components/ui/badge3d.tsx
738
+ var import_react9 = __toESM(require("react"), 1);
739
+ var import_framer_motion4 = require("framer-motion");
740
+ var import_jsx_runtime9 = require("react/jsx-runtime");
741
+ var Badge3D = import_react9.default.forwardRef(
742
+ ({ className, variant = "default", size = "md", pulse = false, children, ...props }, ref) => {
743
+ const variants = {
744
+ default: "bg-primary text-primary-foreground border-b-2 border-primary/80 shadow-sm",
745
+ secondary: "bg-secondary text-secondary-foreground border-b-2 border-secondary/80 shadow-sm",
746
+ success: "bg-emerald-500 text-white border-b-2 border-emerald-700 shadow-sm",
747
+ warning: "bg-amber-500 text-white border-b-2 border-amber-700 shadow-sm",
748
+ danger: "bg-red-500 text-white border-b-2 border-red-700 shadow-sm",
749
+ outline: "border-2 border-border bg-background text-foreground border-b-4 shadow-sm"
750
+ };
751
+ const sizes = {
752
+ sm: "px-2 py-0.5 text-xs",
753
+ md: "px-2.5 py-1 text-sm",
754
+ lg: "px-3 py-1.5 text-base"
755
+ };
756
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
757
+ import_framer_motion4.motion.div,
758
+ {
759
+ ref,
760
+ whileHover: { y: -1, scale: 1.05 },
761
+ whileTap: { y: 0, scale: 0.98 },
762
+ className: cn(
763
+ "inline-flex items-center rounded-md font-medium transition-all active:translate-y-[2px] active:border-b-0",
764
+ variants[variant],
765
+ sizes[size],
766
+ pulse && "animate-pulse",
767
+ className
768
+ ),
769
+ ...props,
770
+ children
771
+ }
772
+ );
773
+ }
774
+ );
775
+ Badge3D.displayName = "Badge3D";
776
+
777
+ // src/components/ui/input3d.tsx
778
+ var import_react10 = __toESM(require("react"), 1);
779
+ var import_framer_motion5 = require("framer-motion");
780
+ var import_jsx_runtime10 = require("react/jsx-runtime");
781
+ var Input3D = import_react10.default.forwardRef(
782
+ ({ className, label, error, icon, type = "text", ...props }, ref) => {
783
+ const [isFocused, setIsFocused] = (0, import_react10.useState)(false);
784
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w-full space-y-2", children: [
785
+ label && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { className: "text-sm font-medium text-foreground", children: label }),
786
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
787
+ import_framer_motion5.motion.div,
788
+ {
789
+ animate: {
790
+ y: isFocused ? -2 : 0
791
+ },
792
+ transition: { type: "spring", stiffness: 300, damping: 20 },
793
+ className: "relative",
794
+ children: [
795
+ icon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: icon }),
796
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
797
+ "input",
798
+ {
799
+ ref,
800
+ type,
801
+ onFocus: () => setIsFocused(true),
802
+ onBlur: () => setIsFocused(false),
803
+ className: cn(
804
+ "flex h-11 w-full rounded-lg border-2 border-input bg-background px-3 py-2 text-sm ring-offset-background transition-all",
805
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
806
+ "placeholder:text-muted-foreground",
807
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:border-primary",
808
+ "disabled:cursor-not-allowed disabled:opacity-50",
809
+ "border-b-4 border-b-slate-300 dark:border-b-slate-700",
810
+ "focus:border-b-primary",
811
+ error && "border-red-500 focus-visible:ring-red-500",
812
+ icon && "pl-10",
813
+ className
814
+ ),
815
+ ...props
816
+ }
817
+ )
818
+ ]
819
+ }
820
+ ),
821
+ error && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-red-500", children: error })
822
+ ] });
823
+ }
824
+ );
825
+ Input3D.displayName = "Input3D";
826
+
827
+ // src/components/ui/slider3d.tsx
828
+ var import_react11 = require("react");
829
+ var import_framer_motion6 = require("framer-motion");
830
+ var import_jsx_runtime11 = require("react/jsx-runtime");
831
+ function Slider3D({
832
+ value: controlledValue,
833
+ defaultValue = 50,
834
+ min = 0,
835
+ max = 100,
836
+ step = 1,
837
+ onChange,
838
+ label,
839
+ showValue = true,
840
+ className,
841
+ disabled = false
842
+ }) {
843
+ const [internalValue, setInternalValue] = (0, import_react11.useState)(defaultValue);
844
+ const isControlled = controlledValue !== void 0;
845
+ const value = isControlled ? controlledValue : internalValue;
846
+ const handleChange = (e) => {
847
+ const newValue = parseFloat(e.target.value);
848
+ if (!isControlled) setInternalValue(newValue);
849
+ onChange?.(newValue);
850
+ };
851
+ const percentage = (value - min) / (max - min) * 100;
852
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
853
+ (label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between", children: [
854
+ label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { className: "text-sm font-medium", children: label }),
855
+ showValue && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-sm font-mono text-muted-foreground", children: value })
856
+ ] }),
857
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative", children: [
858
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-3 w-full rounded-full bg-slate-200 dark:bg-slate-800 border-b-2 border-slate-300 dark:border-slate-900 shadow-inner" }),
859
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
860
+ import_framer_motion6.motion.div,
861
+ {
862
+ className: "absolute top-0 left-0 h-3 rounded-full bg-primary border-b-2 border-primary/80",
863
+ style: { width: `${percentage}%` },
864
+ initial: false,
865
+ animate: { width: `${percentage}%` },
866
+ transition: { type: "spring", stiffness: 300, damping: 30 }
867
+ }
868
+ ),
869
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
870
+ "input",
871
+ {
872
+ type: "range",
873
+ min,
874
+ max,
875
+ step,
876
+ value,
877
+ onChange: handleChange,
878
+ disabled,
879
+ className: "absolute top-0 left-0 w-full h-3 opacity-0 cursor-pointer disabled:cursor-not-allowed"
880
+ }
881
+ ),
882
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
883
+ import_framer_motion6.motion.div,
884
+ {
885
+ className: cn(
886
+ "absolute top-1/2 -translate-y-1/2 w-6 h-6 rounded-full bg-white border-2 border-primary shadow-lg pointer-events-none",
887
+ disabled && "opacity-50"
888
+ ),
889
+ style: { left: `calc(${percentage}% - 12px)` },
890
+ whileHover: { scale: 1.2 },
891
+ whileTap: { scale: 0.9 }
892
+ }
893
+ )
894
+ ] })
895
+ ] });
896
+ }
897
+
898
+ // src/components/ui/tabs3d.tsx
899
+ var import_react12 = require("react");
900
+ var import_framer_motion7 = require("framer-motion");
901
+ var import_jsx_runtime12 = require("react/jsx-runtime");
902
+ function Tabs3D({
903
+ tabs,
904
+ defaultValue,
905
+ value: controlledValue,
906
+ onValueChange,
907
+ className,
908
+ variant = "default"
909
+ }) {
910
+ const [internalValue, setInternalValue] = (0, import_react12.useState)(defaultValue || tabs[0]?.value);
911
+ const isControlled = controlledValue !== void 0;
912
+ const activeValue = isControlled ? controlledValue : internalValue;
913
+ const handleTabChange = (value) => {
914
+ if (!isControlled) setInternalValue(value);
915
+ onValueChange?.(value);
916
+ };
917
+ const activeTab = tabs.find((tab) => tab.value === activeValue);
918
+ const activeIndex = tabs.findIndex((tab) => tab.value === activeValue);
919
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: cn("w-full", className), children: [
920
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
921
+ "div",
922
+ {
923
+ className: cn(
924
+ "flex gap-1 mb-4",
925
+ variant === "default" && "bg-muted p-1 rounded-lg",
926
+ variant === "pills" && "gap-2",
927
+ variant === "underline" && "border-b border-border"
928
+ ),
929
+ children: tabs.map((tab, index) => {
930
+ const isActive = tab.value === activeValue;
931
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
932
+ "button",
933
+ {
934
+ onClick: () => handleTabChange(tab.value),
935
+ className: cn(
936
+ "relative px-4 py-2 text-sm font-medium transition-all rounded-md",
937
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
938
+ variant === "default" && [
939
+ isActive ? "bg-background text-foreground shadow-sm border-b-2 border-primary" : "text-muted-foreground hover:text-foreground"
940
+ ],
941
+ variant === "pills" && [
942
+ isActive ? "bg-primary text-primary-foreground border-b-2 border-primary/80" : "bg-muted text-muted-foreground hover:bg-muted/80"
943
+ ],
944
+ variant === "underline" && [
945
+ "rounded-none border-b-2",
946
+ isActive ? "border-primary text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
947
+ ]
948
+ ),
949
+ children: [
950
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex items-center gap-2", children: [
951
+ tab.icon,
952
+ tab.label
953
+ ] }),
954
+ isActive && variant === "default" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
955
+ import_framer_motion7.motion.div,
956
+ {
957
+ layoutId: "activeTab",
958
+ className: "absolute inset-0 bg-background rounded-md -z-10 shadow-sm",
959
+ transition: { type: "spring", stiffness: 300, damping: 30 }
960
+ }
961
+ )
962
+ ]
963
+ },
964
+ tab.value
965
+ );
966
+ })
967
+ }
968
+ ),
969
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_framer_motion7.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
970
+ import_framer_motion7.motion.div,
971
+ {
972
+ initial: { opacity: 0, y: 10 },
973
+ animate: { opacity: 1, y: 0 },
974
+ exit: { opacity: 0, y: -10 },
975
+ transition: { duration: 0.2 },
976
+ children: activeTab?.content
977
+ },
978
+ activeValue
979
+ ) })
980
+ ] });
981
+ }
982
+
983
+ // src/components/ui/toggle3d.tsx
984
+ var import_react13 = require("react");
985
+ var import_framer_motion8 = require("framer-motion");
986
+ var import_jsx_runtime13 = require("react/jsx-runtime");
987
+ function Toggle3D({
988
+ checked: controlledChecked,
989
+ defaultChecked = false,
990
+ onCheckedChange,
991
+ disabled = false,
992
+ variant = "pill",
993
+ label
994
+ }) {
995
+ const [internalChecked, setInternalChecked] = (0, import_react13.useState)(defaultChecked);
996
+ const isControlled = controlledChecked !== void 0;
997
+ const isChecked = isControlled ? controlledChecked : internalChecked;
998
+ const handleToggle = () => {
999
+ if (disabled) return;
1000
+ const newChecked = !isChecked;
1001
+ if (!isControlled) setInternalChecked(newChecked);
1002
+ onCheckedChange?.(newChecked);
1003
+ };
1004
+ const getVariantStyles = () => {
1005
+ switch (variant) {
1006
+ case "neon":
1007
+ return isChecked ? "bg-slate-900 border border-cyan-500/50 shadow-[0_0_15px_rgba(6,182,212,0.4)]" : "bg-slate-900 border border-slate-700";
1008
+ case "glass":
1009
+ return "bg-white/20 backdrop-blur-md border border-white/30 shadow-inner";
1010
+ case "pill":
1011
+ default:
1012
+ return isChecked ? "bg-primary shadow-inner" : "bg-slate-200 dark:bg-slate-700 shadow-inner";
1013
+ }
1014
+ };
1015
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-3", children: [
1016
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1017
+ "button",
1018
+ {
1019
+ onClick: handleToggle,
1020
+ className: cn(
1021
+ "relative h-8 w-14 rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1022
+ disabled && "opacity-50 cursor-not-allowed",
1023
+ getVariantStyles()
1024
+ ),
1025
+ role: "switch",
1026
+ "aria-checked": isChecked,
1027
+ children: [
1028
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1029
+ import_framer_motion8.motion.div,
1030
+ {
1031
+ className: cn(
1032
+ "absolute top-1 left-1 h-6 w-6 rounded-full shadow-md z-10",
1033
+ variant === "neon" && isChecked ? "bg-cyan-400 shadow-[0_0_10px_#22d3ee]" : "bg-white"
1034
+ ),
1035
+ animate: {
1036
+ x: isChecked ? 24 : 0,
1037
+ scale: disabled ? 0.9 : 1
1038
+ },
1039
+ transition: {
1040
+ type: "spring",
1041
+ stiffness: 500,
1042
+ damping: 30
1043
+ }
1044
+ }
1045
+ ),
1046
+ variant !== "neon" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1047
+ "div",
1048
+ {
1049
+ className: cn(
1050
+ "absolute inset-0 rounded-full border-b-[3px] border-black/5 pointer-events-none",
1051
+ isChecked ? "border-black/10" : "border-black/5"
1052
+ )
1053
+ }
1054
+ )
1055
+ ]
1056
+ }
1057
+ ),
1058
+ label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-sm font-medium", children: label })
1059
+ ] });
1060
+ }
1061
+
1062
+ // src/components/ui/modal3d.tsx
1063
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
1064
+ var import_lucide_react2 = require("lucide-react");
1065
+ var import_framer_motion9 = require("framer-motion");
1066
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1067
+ function Modal3D({
1068
+ open,
1069
+ onOpenChange,
1070
+ children,
1071
+ trigger,
1072
+ title,
1073
+ description,
1074
+ className
1075
+ }) {
1076
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogPrimitive.Root, { open, onOpenChange, children: [
1077
+ trigger && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogPrimitive.Trigger, { asChild: true, children: trigger }),
1078
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_framer_motion9.AnimatePresence, { children: open ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogPrimitive.Portal, { forceMount: true, children: [
1079
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogPrimitive.Overlay, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1080
+ import_framer_motion9.motion.div,
1081
+ {
1082
+ initial: { opacity: 0 },
1083
+ animate: { opacity: 1 },
1084
+ exit: { opacity: 0 },
1085
+ className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"
1086
+ }
1087
+ ) }),
1088
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogPrimitive.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1089
+ import_framer_motion9.motion.div,
1090
+ {
1091
+ initial: { opacity: 0, scale: 0.95, y: 10 },
1092
+ animate: { opacity: 1, scale: 1, y: 0 },
1093
+ exit: { opacity: 0, scale: 0.95, y: 10 },
1094
+ transition: { type: "spring", duration: 0.3 },
1095
+ className: cn(
1096
+ "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 sm:rounded-lg",
1097
+ "bg-white/80 dark:bg-slate-900/80 backdrop-blur-xl border-white/20 shadow-2xl",
1098
+ className
1099
+ ),
1100
+ children: [
1101
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col space-y-1.5 text-center sm:text-left", children: [
1102
+ title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogPrimitive.Title, { className: "text-lg font-semibold leading-none tracking-tight", children: title }),
1103
+ description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogPrimitive.Description, { className: "text-sm text-muted-foreground", children: description })
1104
+ ] }),
1105
+ children,
1106
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(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", children: [
1107
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react2.X, { className: "h-4 w-4" }),
1108
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "Close" })
1109
+ ] })
1110
+ ]
1111
+ }
1112
+ ) })
1113
+ ] }) : null })
1114
+ ] });
1115
+ }
1116
+
1117
+ // src/components/ui/menu3d.tsx
1118
+ var import_react14 = __toESM(require("react"), 1);
1119
+ var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
1120
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1121
+ var Menu3DContext = import_react14.default.createContext({});
1122
+ function Menu3D({ children, trigger, align = "end" }) {
1123
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuPrimitive.Root, { children: [
1124
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuPrimitive.Trigger, { asChild: true, children: trigger }),
1125
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1126
+ DropdownMenuPrimitive.Content,
1127
+ {
1128
+ align,
1129
+ className: cn(
1130
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1131
+ "bg-white/90 dark:bg-slate-900/90 backdrop-blur-xl border-white/20 shadow-xl"
1132
+ ),
1133
+ children
1134
+ }
1135
+ ) })
1136
+ ] });
1137
+ }
1138
+ var Menu3DItem = import_react14.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1139
+ DropdownMenuPrimitive.Item,
1140
+ {
1141
+ ref,
1142
+ className: cn(
1143
+ "relative flex cursor-default select-none items-center 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",
1144
+ inset && "pl-8",
1145
+ className
1146
+ ),
1147
+ ...props
1148
+ }
1149
+ ));
1150
+ Menu3DItem.displayName = DropdownMenuPrimitive.Item.displayName;
1151
+ var Menu3DLabel = import_react14.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1152
+ DropdownMenuPrimitive.Label,
1153
+ {
1154
+ ref,
1155
+ className: cn(
1156
+ "px-2 py-1.5 text-sm font-semibold",
1157
+ inset && "pl-8",
1158
+ className
1159
+ ),
1160
+ ...props
1161
+ }
1162
+ ));
1163
+ Menu3DLabel.displayName = DropdownMenuPrimitive.Label.displayName;
1164
+ var Menu3DSeparator = import_react14.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1165
+ DropdownMenuPrimitive.Separator,
1166
+ {
1167
+ ref,
1168
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
1169
+ ...props
1170
+ }
1171
+ ));
1172
+ Menu3DSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
1173
+
1174
+ // src/components/ui/tooltip3d.tsx
1175
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
1176
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1177
+ function Tooltip3D({
1178
+ content,
1179
+ children,
1180
+ side = "top",
1181
+ align = "center",
1182
+ delayDuration = 200
1183
+ }) {
1184
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipPrimitive.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(TooltipPrimitive.Root, { children: [
1185
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipPrimitive.Trigger, { asChild: true, children }),
1186
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1187
+ TooltipPrimitive.Content,
1188
+ {
1189
+ side,
1190
+ align,
1191
+ className: cn(
1192
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",
1193
+ "bg-slate-900 text-white dark:bg-slate-100 dark:text-slate-900 border-none shadow-[0_10px_38px_-10px_rgba(22,23,24,0.35),0_10px_20px_-15px_rgba(22,23,24,0.2)]"
1194
+ ),
1195
+ children: [
1196
+ content,
1197
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipPrimitive.Arrow, { className: "fill-slate-900 dark:fill-slate-100" })
1198
+ ]
1199
+ }
1200
+ )
1201
+ ] }) });
1202
+ }
1203
+
1204
+ // src/components/ui/progress3d.tsx
1205
+ var import_framer_motion10 = require("framer-motion");
1206
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1207
+ function Progress3D({
1208
+ value,
1209
+ max = 100,
1210
+ variant = "default",
1211
+ size = "md",
1212
+ showLabel = false,
1213
+ label,
1214
+ className,
1215
+ animated = true
1216
+ }) {
1217
+ const percentage = Math.min(Math.max(value / max * 100, 0), 100);
1218
+ const variants = {
1219
+ default: "bg-primary border-primary/80",
1220
+ success: "bg-emerald-500 border-emerald-700",
1221
+ warning: "bg-amber-500 border-amber-700",
1222
+ danger: "bg-red-500 border-red-700"
1223
+ };
1224
+ const sizes = {
1225
+ sm: "h-2",
1226
+ md: "h-3",
1227
+ lg: "h-4"
1228
+ };
1229
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
1230
+ (label || showLabel) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
1231
+ label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-medium", children: label }),
1232
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "text-muted-foreground font-mono", children: [
1233
+ Math.round(percentage),
1234
+ "%"
1235
+ ] })
1236
+ ] }),
1237
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1238
+ "div",
1239
+ {
1240
+ className: cn(
1241
+ "w-full rounded-full bg-slate-200 dark:bg-slate-800 overflow-hidden shadow-inner border-b-2 border-slate-300 dark:border-slate-900",
1242
+ sizes[size]
1243
+ ),
1244
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1245
+ import_framer_motion10.motion.div,
1246
+ {
1247
+ className: cn(
1248
+ "h-full rounded-full border-b-2 shadow-sm",
1249
+ variants[variant],
1250
+ animated && "transition-all"
1251
+ ),
1252
+ initial: { width: 0 },
1253
+ animate: { width: `${percentage}%` },
1254
+ transition: {
1255
+ duration: animated ? 0.5 : 0,
1256
+ ease: "easeOut"
1257
+ }
1258
+ }
1259
+ )
1260
+ }
1261
+ )
1262
+ ] });
1263
+ }
1264
+
1265
+ // src/components/ui/select3d.tsx
1266
+ var import_drei = require("@react-three/drei");
1267
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1268
+ function Select3D({
1269
+ options,
1270
+ value,
1271
+ onChange,
1272
+ width = 200
1273
+ }) {
1274
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_drei.Html, { transform: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1275
+ "select",
1276
+ {
1277
+ className: cn(
1278
+ "px-3 py-2 bg-background/80 backdrop-blur border rounded text-foreground outline-none focus:ring-2 focus:ring-primary"
1279
+ ),
1280
+ style: { width },
1281
+ value,
1282
+ onChange: (e) => onChange?.(e.target.value),
1283
+ children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
1284
+ }
1285
+ ) });
1286
+ }
1287
+
1288
+ // src/components/ui/spinner3d.tsx
1289
+ var import_react15 = require("react");
1290
+ var import_fiber = require("@react-three/fiber");
1291
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1292
+ function Spinner3D({
1293
+ size = "md",
1294
+ color = "#22d3ee",
1295
+ speed = 1
1296
+ }) {
1297
+ const ref = (0, import_react15.useRef)(null);
1298
+ const scale = size === "sm" ? 0.5 : size === "lg" ? 1.5 : 1;
1299
+ (0, import_fiber.useFrame)((state, delta) => {
1300
+ if (ref.current) {
1301
+ ref.current.rotation.z -= delta * speed * 3;
1302
+ ref.current.rotation.x -= delta * speed * 1;
1303
+ }
1304
+ });
1305
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("group", { ref, scale: [scale, scale, scale], children: [
1306
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("mesh", { rotation: [Math.PI / 4, 0, 0], children: [
1307
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("torusGeometry", { args: [0.5, 0.05, 16, 32] }),
1308
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("meshStandardMaterial", { color, emissive: color })
1309
+ ] }),
1310
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("mesh", { rotation: [-Math.PI / 4, 0, 0], children: [
1311
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("torusGeometry", { args: [0.4, 0.05, 16, 32] }),
1312
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("meshStandardMaterial", { color })
1313
+ ] })
1314
+ ] });
1315
+ }
1316
+
1317
+ // src/components/ui/stepper3d.tsx
1318
+ var import_drei2 = require("@react-three/drei");
1319
+ var import_three = require("three");
1320
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1321
+ function Stepper3D({
1322
+ steps,
1323
+ activeStep = 0,
1324
+ gap = 2
1325
+ }) {
1326
+ const points = steps.map((_, i) => new import_three.Vector3((i - (steps.length - 1) / 2) * gap, 0, 0));
1327
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("group", { children: [
1328
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1329
+ import_drei2.Line,
1330
+ {
1331
+ points,
1332
+ color: "#333",
1333
+ lineWidth: 2
1334
+ }
1335
+ ),
1336
+ activeStep > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1337
+ import_drei2.Line,
1338
+ {
1339
+ points: points.slice(0, activeStep + 1),
1340
+ color: "#22d3ee",
1341
+ lineWidth: 4
1342
+ }
1343
+ ),
1344
+ steps.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("group", { position: points[i], children: [
1345
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("mesh", { children: [
1346
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("sphereGeometry", { args: [0.3, 32, 32] }),
1347
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("meshStandardMaterial", { color: i <= activeStep ? "#22d3ee" : "#333" })
1348
+ ] }),
1349
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1350
+ import_drei2.Text,
1351
+ {
1352
+ position: [0, -0.6, 0],
1353
+ fontSize: 0.2,
1354
+ color: i <= activeStep ? "white" : "#666",
1355
+ anchorX: "center",
1356
+ anchorY: "top",
1357
+ children: label
1358
+ }
1359
+ )
1360
+ ] }, i))
1361
+ ] });
1362
+ }
1363
+
1364
+ // src/components/ui/navbar3d.tsx
1365
+ var import_react16 = require("react");
1366
+ var import_drei3 = require("@react-three/drei");
1367
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1368
+ function NavBar3D({ items, activeHref = "/" }) {
1369
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("group", { position: [0, -2, 0], children: [
1370
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("mesh", { position: [0, 0, -0.1], children: [
1371
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("boxGeometry", { args: [items.length * 2, 1, 0.2] }),
1372
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("meshStandardMaterial", { color: "#1a1a1a", transparent: true, opacity: 0.8 })
1373
+ ] }),
1374
+ items.map((item, i) => {
1375
+ const x = (i - (items.length - 1) / 2) * 2;
1376
+ const isActive = activeHref === item.href;
1377
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(NavBarItemMesh, { item, x, isActive }, i);
1378
+ })
1379
+ ] });
1380
+ }
1381
+ function NavBarItemMesh({ item, x, isActive }) {
1382
+ const [hovered, setHover] = (0, import_react16.useState)(false);
1383
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("group", { position: [x, 0, 0], children: [
1384
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1385
+ "mesh",
1386
+ {
1387
+ onPointerOver: () => setHover(true),
1388
+ onPointerOut: () => setHover(false),
1389
+ onClick: () => window.location.href = item.href,
1390
+ children: [
1391
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("planeGeometry", { args: [1.8, 0.8] }),
1392
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("meshStandardMaterial", { color: isActive ? "#22d3ee" : hovered ? "#333" : "transparent", transparent: true, opacity: isActive ? 0.3 : hovered ? 0.5 : 0 })
1393
+ ]
1394
+ }
1395
+ ),
1396
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1397
+ import_drei3.Text,
1398
+ {
1399
+ fontSize: 0.2,
1400
+ color: isActive || hovered ? "white" : "#888",
1401
+ anchorX: "center",
1402
+ anchorY: "middle",
1403
+ children: item.label
1404
+ }
1405
+ )
1406
+ ] });
1407
+ }
1408
+
1409
+ // src/components/ui/timeline3d.tsx
1410
+ var import_drei4 = require("@react-three/drei");
1411
+ var import_three2 = require("three");
1412
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1413
+ function Timeline3D({
1414
+ events,
1415
+ orientation = "horizontal",
1416
+ gap = 3
1417
+ }) {
1418
+ const points = events.map((_, i) => {
1419
+ return orientation === "horizontal" ? new import_three2.Vector3((i - (events.length - 1) / 2) * gap, 0, 0) : new import_three2.Vector3(0, (i - (events.length - 1) / 2) * -gap, 0);
1420
+ });
1421
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("group", { children: [
1422
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_drei4.Line, { points, color: "#555", lineWidth: 1 }),
1423
+ events.map((ev, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("group", { position: points[i], children: [
1424
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("mesh", { children: [
1425
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("sphereGeometry", { args: [0.2, 16, 16] }),
1426
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("meshStandardMaterial", { color: "#22d3ee" })
1427
+ ] }),
1428
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("group", { position: [0, 0.5, 0], children: [
1429
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1430
+ import_drei4.Text,
1431
+ {
1432
+ fontSize: 0.3,
1433
+ color: "white",
1434
+ anchorY: "bottom",
1435
+ children: ev.date
1436
+ }
1437
+ ),
1438
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1439
+ import_drei4.Text,
1440
+ {
1441
+ position: [0, -0.3, 0],
1442
+ fontSize: 0.25,
1443
+ color: "#ccc",
1444
+ anchorY: "top",
1445
+ children: ev.title
1446
+ }
1447
+ )
1448
+ ] })
1449
+ ] }, i))
1450
+ ] });
1451
+ }
1452
+
1453
+ // src/components/ui/tooltip.tsx
1454
+ var React17 = __toESM(require("react"), 1);
1455
+ var TooltipPrimitive2 = __toESM(require("@radix-ui/react-tooltip"), 1);
1456
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1457
+ var Tooltip = TooltipPrimitive2.Root;
1458
+ var TooltipContent = React17.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1459
+ TooltipPrimitive2.Content,
1460
+ {
1461
+ ref,
1462
+ sideOffset,
1463
+ className: cn(
1464
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",
1465
+ className
1466
+ ),
1467
+ ...props
1468
+ }
1469
+ ));
1470
+ TooltipContent.displayName = TooltipPrimitive2.Content.displayName;
1471
+
1472
+ // src/components/ui/slider.tsx
1473
+ var React18 = __toESM(require("react"), 1);
1474
+ var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
1475
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1476
+ var Slider = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1477
+ SliderPrimitive.Root,
1478
+ {
1479
+ ref,
1480
+ className: cn("relative flex w-full touch-none select-none items-center", className),
1481
+ ...props,
1482
+ children: [
1483
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
1484
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
1485
+ ]
1486
+ }
1487
+ ));
1488
+ Slider.displayName = SliderPrimitive.Root.displayName;
1489
+
1490
+ // src/components/ui/toggle.tsx
1491
+ var React19 = __toESM(require("react"), 1);
1492
+ var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
1493
+ var import_class_variance_authority2 = require("class-variance-authority");
1494
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1495
+ var toggleVariants = (0, import_class_variance_authority2.cva)(
1496
+ "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
1497
+ {
1498
+ variants: {
1499
+ variant: {
1500
+ default: "bg-transparent",
1501
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
1502
+ },
1503
+ size: {
1504
+ default: "h-10 px-3",
1505
+ sm: "h-9 px-2.5",
1506
+ lg: "h-11 px-5"
1507
+ }
1508
+ },
1509
+ defaultVariants: {
1510
+ variant: "default",
1511
+ size: "default"
1512
+ }
1513
+ }
1514
+ );
1515
+ var Toggle = React19.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
1516
+ Toggle.displayName = TogglePrimitive.Root.displayName;
1517
+
1518
+ // src/components/ui/badge.tsx
1519
+ var import_class_variance_authority3 = require("class-variance-authority");
1520
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1521
+ var badgeVariants = (0, import_class_variance_authority3.cva)(
1522
+ "inline-flex items-center rounded-full 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",
1523
+ {
1524
+ variants: {
1525
+ variant: {
1526
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
1527
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
1528
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
1529
+ outline: "text-foreground"
1530
+ }
1531
+ },
1532
+ defaultVariants: {
1533
+ variant: "default"
1534
+ }
1535
+ }
1536
+ );
1537
+ function Badge({ className, variant, ...props }) {
1538
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
1539
+ }
1540
+
1541
+ // src/components/ui/input.tsx
1542
+ var React20 = __toESM(require("react"), 1);
1543
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1544
+ var Input = React20.forwardRef(
1545
+ ({ className, type, ...props }, ref) => {
1546
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1547
+ "input",
1548
+ {
1549
+ type,
1550
+ className: cn(
1551
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background 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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1552
+ className
1553
+ ),
1554
+ ref,
1555
+ ...props
1556
+ }
1557
+ );
1558
+ }
1559
+ );
1560
+ Input.displayName = "Input";
1561
+
1562
+ // src/components/ui/select.tsx
1563
+ var React21 = __toESM(require("react"), 1);
1564
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
1565
+ var import_lucide_react3 = require("lucide-react");
1566
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1567
+ var Select = SelectPrimitive.Root;
1568
+ var SelectTrigger = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1569
+ SelectPrimitive.Trigger,
1570
+ {
1571
+ ref,
1572
+ className: cn(
1573
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
1574
+ className
1575
+ ),
1576
+ ...props,
1577
+ children: [
1578
+ children,
1579
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react3.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
1580
+ ]
1581
+ }
1582
+ ));
1583
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
1584
+ var SelectScrollUpButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1585
+ SelectPrimitive.ScrollUpButton,
1586
+ {
1587
+ ref,
1588
+ className: cn("flex cursor-default items-center justify-center py-1", className),
1589
+ ...props,
1590
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react3.ChevronUp, { className: "h-4 w-4" })
1591
+ }
1592
+ ));
1593
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
1594
+ var SelectScrollDownButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1595
+ SelectPrimitive.ScrollDownButton,
1596
+ {
1597
+ ref,
1598
+ className: cn("flex cursor-default items-center justify-center py-1", className),
1599
+ ...props,
1600
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react3.ChevronDown, { className: "h-4 w-4" })
1601
+ }
1602
+ ));
1603
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
1604
+ var SelectContent = React21.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1605
+ SelectPrimitive.Content,
1606
+ {
1607
+ ref,
1608
+ className: cn(
1609
+ "relative z-50 max-h-96 min-w-[8rem] overflow-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",
1610
+ 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",
1611
+ className
1612
+ ),
1613
+ position,
1614
+ ...props,
1615
+ children: [
1616
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectScrollUpButton, {}),
1617
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1618
+ SelectPrimitive.Viewport,
1619
+ {
1620
+ className: cn(
1621
+ "p-1",
1622
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
1623
+ ),
1624
+ children
1625
+ }
1626
+ ),
1627
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectScrollDownButton, {})
1628
+ ]
1629
+ }
1630
+ ) }));
1631
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
1632
+ var SelectLabel = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Label, { ref, className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props }));
1633
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
1634
+ var SelectItem = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1635
+ SelectPrimitive.Item,
1636
+ {
1637
+ ref,
1638
+ className: cn(
1639
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
1640
+ className
1641
+ ),
1642
+ ...props,
1643
+ children: [
1644
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react3.Check, { className: "h-4 w-4" }) }) }),
1645
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.ItemText, { children })
1646
+ ]
1647
+ }
1648
+ ));
1649
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
1650
+ var SelectSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
1651
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
1652
+
1653
+ // src/components/ui/table.tsx
1654
+ var React22 = __toESM(require("react"), 1);
1655
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1656
+ var Table = React22.forwardRef(
1657
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
1658
+ );
1659
+ Table.displayName = "Table";
1660
+ var TableHeader = React22.forwardRef(
1661
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
1662
+ );
1663
+ TableHeader.displayName = "TableHeader";
1664
+ var TableBody = React22.forwardRef(
1665
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
1666
+ );
1667
+ TableBody.displayName = "TableBody";
1668
+ var TableFooter = React22.forwardRef(
1669
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
1670
+ );
1671
+ TableFooter.displayName = "TableFooter";
1672
+ var TableRow = React22.forwardRef(
1673
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1674
+ "tr",
1675
+ {
1676
+ ref,
1677
+ className: cn("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50", className),
1678
+ ...props
1679
+ }
1680
+ )
1681
+ );
1682
+ TableRow.displayName = "TableRow";
1683
+ var TableHead = React22.forwardRef(
1684
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1685
+ "th",
1686
+ {
1687
+ ref,
1688
+ className: cn(
1689
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
1690
+ className
1691
+ ),
1692
+ ...props
1693
+ }
1694
+ )
1695
+ );
1696
+ TableHead.displayName = "TableHead";
1697
+ var TableCell = React22.forwardRef(
1698
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
1699
+ );
1700
+ TableCell.displayName = "TableCell";
1701
+ var TableCaption = React22.forwardRef(
1702
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
1703
+ );
1704
+ TableCaption.displayName = "TableCaption";
1705
+
1706
+ // src/components/ui/pagination.tsx
1707
+ var React23 = __toESM(require("react"), 1);
1708
+ var import_lucide_react4 = require("lucide-react");
1709
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1710
+ var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1711
+ "nav",
1712
+ {
1713
+ role: "navigation",
1714
+ "aria-label": "pagination",
1715
+ className: cn("mx-auto flex w-full justify-center", className),
1716
+ ...props
1717
+ }
1718
+ );
1719
+ Pagination.displayName = "Pagination";
1720
+ var PaginationContent = React23.forwardRef(
1721
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { ref, className: cn("flex flex-row items-center gap-1", className), ...props })
1722
+ );
1723
+ PaginationContent.displayName = "PaginationContent";
1724
+ var PaginationItem = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { ref, className: cn("", className), ...props }));
1725
+ PaginationItem.displayName = "PaginationItem";
1726
+ var PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1727
+ "a",
1728
+ {
1729
+ "aria-current": isActive ? "page" : void 0,
1730
+ className: cn(
1731
+ buttonVariants({
1732
+ variant: isActive ? "outline" : "ghost",
1733
+ size
1734
+ }),
1735
+ className
1736
+ ),
1737
+ ...props
1738
+ }
1739
+ );
1740
+ PaginationLink.displayName = "PaginationLink";
1741
+ var PaginationPrevious = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("gap-1 pl-2.5", className), ...props, children: [
1742
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react4.ChevronLeft, { className: "h-4 w-4" }),
1743
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Previous" })
1744
+ ] });
1745
+ PaginationPrevious.displayName = "PaginationPrevious";
1746
+ var PaginationNext = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("gap-1 pr-2.5", className), ...props, children: [
1747
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Next" }),
1748
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" })
1749
+ ] });
1750
+ PaginationNext.displayName = "PaginationNext";
1751
+ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { "aria-hidden": true, className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [
1752
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react4.MoreHorizontal, { className: "h-4 w-4" }),
1753
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sr-only", children: "More pages" })
1754
+ ] });
1755
+ PaginationEllipsis.displayName = "PaginationEllipsis";
1756
+
1757
+ // src/components/ui/progress.tsx
1758
+ var React24 = __toESM(require("react"), 1);
1759
+ var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
1760
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1761
+ var Progress = React24.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1762
+ ProgressPrimitive.Root,
1763
+ {
1764
+ ref,
1765
+ className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className),
1766
+ ...props,
1767
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1768
+ ProgressPrimitive.Indicator,
1769
+ {
1770
+ className: "h-full w-full flex-1 bg-primary transition-all",
1771
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
1772
+ }
1773
+ )
1774
+ }
1775
+ ));
1776
+ Progress.displayName = ProgressPrimitive.Root.displayName;
1777
+
1778
+ // src/components/ui/skeleton.tsx
1779
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1780
+ function Skeleton({ className, ...props }) {
1781
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn("animate-pulse rounded-md bg-muted", className), ...props });
1782
+ }
1783
+
1784
+ // src/components/ui/toast.tsx
1785
+ var React25 = __toESM(require("react"), 1);
1786
+ var ToastPrimitives = __toESM(require("@radix-ui/react-toast"), 1);
1787
+ var import_class_variance_authority4 = require("class-variance-authority");
1788
+ var import_lucide_react5 = require("lucide-react");
1789
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1790
+ var ToastViewport = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1791
+ ToastPrimitives.Viewport,
1792
+ {
1793
+ ref,
1794
+ className: cn(
1795
+ "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
1796
+ className
1797
+ ),
1798
+ ...props
1799
+ }
1800
+ ));
1801
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
1802
+ var toastVariants = (0, import_class_variance_authority4.cva)(
1803
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
1804
+ {
1805
+ variants: {
1806
+ variant: {
1807
+ default: "border bg-background text-foreground",
1808
+ destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
1809
+ }
1810
+ },
1811
+ defaultVariants: {
1812
+ variant: "default"
1813
+ }
1814
+ }
1815
+ );
1816
+ var Toast = React25.forwardRef(({ className, variant, ...props }, ref) => {
1817
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ToastPrimitives.Root, { ref, className: cn(toastVariants({ variant }), className), ...props });
1818
+ });
1819
+ Toast.displayName = ToastPrimitives.Root.displayName;
1820
+ var ToastAction = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1821
+ ToastPrimitives.Action,
1822
+ {
1823
+ ref,
1824
+ className: cn(
1825
+ "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",
1826
+ className
1827
+ ),
1828
+ ...props
1829
+ }
1830
+ ));
1831
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
1832
+ var ToastClose = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1833
+ ToastPrimitives.Close,
1834
+ {
1835
+ ref,
1836
+ className: cn(
1837
+ "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
1838
+ className
1839
+ ),
1840
+ "toast-close": "",
1841
+ ...props,
1842
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react5.X, { className: "h-4 w-4" })
1843
+ }
1844
+ ));
1845
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
1846
+ var ToastTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ToastPrimitives.Title, { ref, className: cn("text-sm font-semibold", className), ...props }));
1847
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
1848
+ var ToastDescription = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ToastPrimitives.Description, { ref, className: cn("text-sm opacity-90", className), ...props }));
1849
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
1850
+
1851
+ // src/components/ui/popover.tsx
1852
+ var React26 = __toESM(require("react"), 1);
1853
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
1854
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1855
+ var Popover = PopoverPrimitive.Root;
1856
+ var PopoverContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1857
+ PopoverPrimitive.Content,
1858
+ {
1859
+ ref,
1860
+ align,
1861
+ sideOffset,
1862
+ className: cn(
1863
+ "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",
1864
+ className
1865
+ ),
1866
+ ...props
1867
+ }
1868
+ ) }));
1869
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1870
+
1871
+ // src/components/ui/sheet.tsx
1872
+ var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
1873
+ var import_class_variance_authority5 = require("class-variance-authority");
1874
+ var import_lucide_react6 = require("lucide-react");
1875
+ var React27 = __toESM(require("react"), 1);
1876
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1877
+ var Sheet = SheetPrimitive.Root;
1878
+ var SheetPortal = SheetPrimitive.Portal;
1879
+ var SheetOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1880
+ SheetPrimitive.Overlay,
1881
+ {
1882
+ className: cn(
1883
+ "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",
1884
+ className
1885
+ ),
1886
+ ...props,
1887
+ ref
1888
+ }
1889
+ ));
1890
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
1891
+ var sheetVariants = (0, import_class_variance_authority5.cva)(
1892
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1893
+ {
1894
+ variants: {
1895
+ side: {
1896
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
1897
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
1898
+ 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",
1899
+ 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"
1900
+ }
1901
+ },
1902
+ defaultVariants: {
1903
+ side: "right"
1904
+ }
1905
+ }
1906
+ );
1907
+ var SheetContent = React27.forwardRef(
1908
+ ({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SheetPortal, { children: [
1909
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SheetOverlay, {}),
1910
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SheetPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
1911
+ children,
1912
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
1913
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react6.X, { className: "h-4 w-4" }),
1914
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "sr-only", children: "Close" })
1915
+ ] })
1916
+ ] })
1917
+ ] })
1918
+ );
1919
+ SheetContent.displayName = SheetPrimitive.Content.displayName;
1920
+ var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
1921
+ SheetHeader.displayName = "SheetHeader";
1922
+ var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
1923
+ SheetFooter.displayName = "SheetFooter";
1924
+ var SheetTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SheetPrimitive.Title, { ref, className: cn("text-lg font-semibold text-foreground", className), ...props }));
1925
+ SheetTitle.displayName = SheetPrimitive.Title.displayName;
1926
+ var SheetDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SheetPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
1927
+ SheetDescription.displayName = SheetPrimitive.Description.displayName;
1928
+
1929
+ // src/components/ui/dialog.tsx
1930
+ var React28 = __toESM(require("react"), 1);
1931
+ var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
1932
+ var import_lucide_react7 = require("lucide-react");
1933
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1934
+ var Dialog = DialogPrimitive2.Root;
1935
+ var DialogPortal = DialogPrimitive2.Portal;
1936
+ var DialogOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1937
+ DialogPrimitive2.Overlay,
1938
+ {
1939
+ ref,
1940
+ className: cn(
1941
+ "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",
1942
+ className
1943
+ ),
1944
+ ...props
1945
+ }
1946
+ ));
1947
+ DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
1948
+ var DialogContent = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(DialogPortal, { children: [
1949
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DialogOverlay, {}),
1950
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
1951
+ DialogPrimitive2.Content,
1952
+ {
1953
+ ref,
1954
+ className: cn(
1955
+ "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",
1956
+ className
1957
+ ),
1958
+ ...props,
1959
+ children: [
1960
+ children,
1961
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
1962
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react7.X, { className: "h-4 w-4" }),
1963
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "sr-only", children: "Close" })
1964
+ ] })
1965
+ ]
1966
+ }
1967
+ )
1968
+ ] }));
1969
+ DialogContent.displayName = DialogPrimitive2.Content.displayName;
1970
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
1971
+ DialogHeader.displayName = "DialogHeader";
1972
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
1973
+ DialogFooter.displayName = "DialogFooter";
1974
+ var DialogTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1975
+ DialogPrimitive2.Title,
1976
+ {
1977
+ ref,
1978
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
1979
+ ...props
1980
+ }
1981
+ ));
1982
+ DialogTitle.displayName = DialogPrimitive2.Title.displayName;
1983
+ var DialogDescription = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DialogPrimitive2.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
1984
+ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
1985
+
1986
+ // src/components/ui/breadcrumb.tsx
1987
+ var React29 = __toESM(require("react"), 1);
1988
+ var import_react_slot2 = require("@radix-ui/react-slot");
1989
+ var import_lucide_react8 = require("lucide-react");
1990
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1991
+ var Breadcrumb = React29.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("nav", { ref, "aria-label": "breadcrumb", ...props }));
1992
+ Breadcrumb.displayName = "Breadcrumb";
1993
+ var BreadcrumbList = React29.forwardRef(
1994
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1995
+ "ol",
1996
+ {
1997
+ ref,
1998
+ className: cn(
1999
+ "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
2000
+ className
2001
+ ),
2002
+ ...props
2003
+ }
2004
+ )
2005
+ );
2006
+ BreadcrumbList.displayName = "BreadcrumbList";
2007
+ var BreadcrumbItem = React29.forwardRef(
2008
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
2009
+ );
2010
+ BreadcrumbItem.displayName = "BreadcrumbItem";
2011
+ var BreadcrumbLink = React29.forwardRef(({ asChild, className, ...props }, ref) => {
2012
+ const Comp = asChild ? import_react_slot2.Slot : "a";
2013
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Comp, { ref, className: cn("transition-colors hover:text-foreground", className), ...props });
2014
+ });
2015
+ BreadcrumbLink.displayName = "BreadcrumbLink";
2016
+ var BreadcrumbPage = React29.forwardRef(
2017
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2018
+ "span",
2019
+ {
2020
+ ref,
2021
+ role: "link",
2022
+ "aria-disabled": "true",
2023
+ "aria-current": "page",
2024
+ className: cn("font-normal text-foreground", className),
2025
+ ...props
2026
+ }
2027
+ )
2028
+ );
2029
+ BreadcrumbPage.displayName = "BreadcrumbPage";
2030
+ var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react8.ChevronRight, {}) });
2031
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
2032
+ var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2033
+ "span",
2034
+ {
2035
+ role: "presentation",
2036
+ "aria-hidden": "true",
2037
+ className: cn("flex h-9 w-9 items-center justify-center", className),
2038
+ ...props,
2039
+ children: [
2040
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react8.MoreHorizontal, { className: "h-4 w-4" }),
2041
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "sr-only", children: "More" })
2042
+ ]
2043
+ }
2044
+ );
2045
+ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
2046
+
2047
+ // src/components/ui/barchart3d.tsx
2048
+ var import_react17 = require("react");
2049
+ var import_fiber2 = require("@react-three/fiber");
2050
+ var import_drei5 = require("@react-three/drei");
2051
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2052
+ function BarChart3D({
2053
+ data,
2054
+ orientation = "vertical",
2055
+ barSize = 0.5,
2056
+ gap = 0.2,
2057
+ animated = true
2058
+ }) {
2059
+ const maxValue = (0, import_react17.useMemo)(() => Math.max(...data.map((d) => d.value)), [data]);
2060
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("group", { children: [
2061
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("gridHelper", { args: [data.length * (barSize + gap) + 2, 10], position: [0, 0, 0] }),
2062
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_drei5.Instances, { range: data.length, children: [
2063
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("boxGeometry", { args: [barSize, 1, barSize] }),
2064
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("meshStandardMaterial", { roughness: 0.3, metalness: 0.6 }),
2065
+ data.map((item, index) => {
2066
+ const height = item.value / maxValue * 5;
2067
+ const x = (index - data.length / 2) * (barSize + gap);
2068
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("group", { position: [x, 0, 0], children: [
2069
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2070
+ BarInstance,
2071
+ {
2072
+ height,
2073
+ color: item.color || "#8884d8",
2074
+ animated
2075
+ }
2076
+ ),
2077
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2078
+ import_drei5.Text,
2079
+ {
2080
+ position: [0, -0.5, 0],
2081
+ fontSize: 0.2,
2082
+ color: "black",
2083
+ anchorX: "center",
2084
+ anchorY: "top",
2085
+ children: item.label
2086
+ }
2087
+ )
2088
+ ] }, index);
2089
+ })
2090
+ ] })
2091
+ ] });
2092
+ }
2093
+ function BarInstance({ height, color, animated }) {
2094
+ const ref = (0, import_react17.useRef)(null);
2095
+ const [hovered, setHover] = (0, import_react17.useState)(false);
2096
+ (0, import_fiber2.useFrame)((state, delta) => {
2097
+ if (ref.current) {
2098
+ const targetHeight = height;
2099
+ const targetY = height / 2;
2100
+ if (animated) {
2101
+ ref.current.scale.y += (targetHeight - ref.current.scale.y) * delta * 5;
2102
+ ref.current.position.y += (targetY - ref.current.position.y) * delta * 5;
2103
+ } else {
2104
+ ref.current.scale.y = targetHeight;
2105
+ ref.current.position.y = targetY;
2106
+ }
2107
+ if (hovered) {
2108
+ }
2109
+ }
2110
+ });
2111
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2112
+ import_drei5.Instance,
2113
+ {
2114
+ ref,
2115
+ color: hovered ? "orange" : color,
2116
+ onPointerOver: () => setHover(true),
2117
+ onPointerOut: () => setHover(false)
2118
+ }
2119
+ );
2120
+ }
2121
+
2122
+ // src/components/ui/linechart3d.tsx
2123
+ var import_react18 = require("react");
2124
+ var import_drei6 = require("@react-three/drei");
2125
+ var import_three3 = require("three");
2126
+ var import_jsx_runtime39 = (
2127
+ // Render curve
2128
+ require("react/jsx-runtime")
2129
+ );
2130
+ function LineChart3D({
2131
+ data,
2132
+ smooth = true,
2133
+ color = "#22d3ee",
2134
+ lineWidth = 3,
2135
+ showPoints = true
2136
+ }) {
2137
+ const points = (0, import_react18.useMemo)(() => {
2138
+ if (data.length === 0) return [];
2139
+ const maxX = Math.max(...data.map((d) => d.x));
2140
+ const maxY = Math.max(...data.map((d) => d.y));
2141
+ return data.map((d) => new import_three3.Vector3(
2142
+ d.x / (maxX || 1) * 10 - 5,
2143
+ // Center X
2144
+ d.y / (maxY || 1) * 5,
2145
+ // Y up
2146
+ 0
2147
+ ));
2148
+ }, [data]);
2149
+ const curve = (0, import_react18.useMemo)(() => {
2150
+ if (points.length < 2 || !smooth) return null;
2151
+ return new import_three3.CatmullRomCurve3(points);
2152
+ }, [points, smooth]);
2153
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("group", { children: [
2154
+ smooth && curve ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("mesh", { children: [
2155
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tubeGeometry", { args: [curve, 64, 0.05, 8, false] }),
2156
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("meshStandardMaterial", { color, emissive: color, emissiveIntensity: 0.5 })
2157
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2158
+ import_drei6.Line,
2159
+ {
2160
+ points,
2161
+ color,
2162
+ lineWidth,
2163
+ segments: true
2164
+ }
2165
+ ),
2166
+ showPoints && points.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("mesh", { position: p, children: [
2167
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("sphereGeometry", { args: [0.1, 16, 16] }),
2168
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("meshStandardMaterial", { color: "white" })
2169
+ ] }, i)),
2170
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("gridHelper", { args: [12, 12], rotation: [Math.PI / 2, 0, 0], position: [0, 2.5, -0.1] })
2171
+ ] });
2172
+ }
2173
+
2174
+ // src/components/ui/piechart3d.tsx
2175
+ var import_react19 = __toESM(require("react"), 1);
2176
+ var import_three4 = require("three");
2177
+ var import_fiber3 = require("@react-three/fiber");
2178
+ var import_drei7 = require("@react-three/drei");
2179
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2180
+ function PieChart3D({
2181
+ data,
2182
+ radius = 5,
2183
+ depth = 1,
2184
+ explode = true,
2185
+ donut = false
2186
+ }) {
2187
+ const total = (0, import_react19.useMemo)(() => data.reduce((acc, cur) => acc + cur.value, 0), [data]);
2188
+ let startAngle = 0;
2189
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("group", { rotation: [-Math.PI / 2, 0, 0], children: [
2190
+ " ",
2191
+ data.map((item, index) => {
2192
+ const percent = item.value / total;
2193
+ const angle = percent * Math.PI * 2;
2194
+ const endAngle = startAngle + angle;
2195
+ const props = {
2196
+ startAngle,
2197
+ endAngle,
2198
+ radius,
2199
+ color: item.color || `hsl(${index / data.length * 360}, 70%, 50%)`,
2200
+ depth,
2201
+ explode,
2202
+ innerRadius: donut ? radius * 0.5 : 0
2203
+ };
2204
+ startAngle = endAngle;
2205
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(PieSegment, { ...props, label: item.label }, index);
2206
+ })
2207
+ ] });
2208
+ }
2209
+ function PieSegment({ startAngle, endAngle, radius, color, depth, explode, innerRadius, label }) {
2210
+ const shape = (0, import_react19.useMemo)(() => {
2211
+ const s = new import_three4.Shape();
2212
+ if (innerRadius > 0) {
2213
+ s.moveTo(Math.cos(startAngle) * radius, Math.sin(startAngle) * radius);
2214
+ s.absarc(0, 0, radius, startAngle, endAngle, false);
2215
+ const hole = new import_three4.Shape();
2216
+ hole.absarc(0, 0, innerRadius, startAngle, endAngle, false);
2217
+ s.holes.push(hole);
2218
+ } else {
2219
+ s.moveTo(0, 0);
2220
+ s.arc(0, 0, radius, startAngle, endAngle, false);
2221
+ s.lineTo(0, 0);
2222
+ }
2223
+ return s;
2224
+ }, [startAngle, endAngle, radius, innerRadius]);
2225
+ const [hovered, setHover] = (0, import_react19.useState)(false);
2226
+ const ref = import_react19.default.useRef(null);
2227
+ const midAngle = (startAngle + endAngle) / 2;
2228
+ const explodeDir = [Math.cos(midAngle), Math.sin(midAngle), 0];
2229
+ (0, import_fiber3.useFrame)((state, delta) => {
2230
+ if (ref.current && explode) {
2231
+ const targetDist = hovered ? 0.5 : 0;
2232
+ ref.current.position.x += (explodeDir[0] * targetDist - ref.current.position.x) * delta * 5;
2233
+ ref.current.position.y += (explodeDir[1] * targetDist - ref.current.position.y) * delta * 5;
2234
+ }
2235
+ });
2236
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("group", { ref, children: [
2237
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2238
+ "mesh",
2239
+ {
2240
+ onPointerOver: () => setHover(true),
2241
+ onPointerOut: () => setHover(false),
2242
+ children: [
2243
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("extrudeGeometry", { args: [shape, { depth, bevelEnabled: false }] }),
2244
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("meshStandardMaterial", { color: hovered ? "white" : color })
2245
+ ]
2246
+ }
2247
+ ),
2248
+ hovered && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2249
+ import_drei7.Text,
2250
+ {
2251
+ position: [explodeDir[0] * radius * 0.8, explodeDir[1] * radius * 0.8, depth + 0.1],
2252
+ fontSize: 0.5,
2253
+ color: "black",
2254
+ children: label
2255
+ }
2256
+ )
2257
+ ] });
2258
+ }
2259
+
2260
+ // src/components/ui/scatterplot3d.tsx
2261
+ var import_react20 = require("react");
2262
+ var import_drei8 = require("@react-three/drei");
2263
+ var import_three5 = require("three");
2264
+ var import_fiber4 = require("@react-three/fiber");
2265
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2266
+ function ScatterPlot3D({
2267
+ data,
2268
+ pointSize = 0.1,
2269
+ colorScale = ["#22d3ee", "#a78bfa"]
2270
+ }) {
2271
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("group", { children: [
2272
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_drei8.Instances, { range: data.length, children: [
2273
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("sphereGeometry", { args: [1, 16, 16] }),
2274
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("meshStandardMaterial", {}),
2275
+ data.map((point, i) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2276
+ ScatterPointInstance,
2277
+ {
2278
+ position: [point.x, point.y, point.z],
2279
+ scale: point.size || pointSize,
2280
+ color: point.color || colorScale[i % colorScale.length]
2281
+ },
2282
+ i
2283
+ ))
2284
+ ] }),
2285
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("axesHelper", { args: [10] }),
2286
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("gridHelper", { args: [20, 20], position: [0, -5, 0] })
2287
+ ] });
2288
+ }
2289
+ function ScatterPointInstance({ position, scale, color }) {
2290
+ const ref = (0, import_react20.useRef)(null);
2291
+ const [hovered, setHover] = (0, import_react20.useState)(false);
2292
+ (0, import_fiber4.useFrame)((state) => {
2293
+ if (ref.current) {
2294
+ const s = hovered ? scale * 1.5 : scale;
2295
+ const target = new import_three5.Vector3(s, s, s);
2296
+ ref.current.scale.lerp(target, 0.1);
2297
+ }
2298
+ });
2299
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2300
+ import_drei8.Instance,
2301
+ {
2302
+ ref,
2303
+ position,
2304
+ scale,
2305
+ color: hovered ? "white" : color,
2306
+ onPointerOver: () => setHover(true),
2307
+ onPointerOut: () => setHover(false)
2308
+ }
2309
+ );
2310
+ }
2311
+
2312
+ // src/components/ui/graph3d.tsx
2313
+ var import_react21 = require("react");
2314
+ var import_drei9 = require("@react-three/drei");
2315
+ var import_three6 = require("three");
2316
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2317
+ function Graph3D({ nodes, edges, physics = false }) {
2318
+ const positionedNodes = (0, import_react21.useMemo)(() => {
2319
+ return nodes.map((node, i) => ({
2320
+ ...node,
2321
+ vec: new import_three6.Vector3(
2322
+ node.x ?? (Math.random() - 0.5) * 10,
2323
+ node.y ?? (Math.random() - 0.5) * 10,
2324
+ node.z ?? (Math.random() - 0.5) * 10
2325
+ )
2326
+ }));
2327
+ }, [nodes]);
2328
+ const nodeMap = (0, import_react21.useMemo)(() => {
2329
+ const map = /* @__PURE__ */ new Map();
2330
+ positionedNodes.forEach((n) => map.set(n.id, n.vec));
2331
+ return map;
2332
+ }, [positionedNodes]);
2333
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("group", { children: [
2334
+ edges.map((edge, i) => {
2335
+ const start = nodeMap.get(edge.source);
2336
+ const end = nodeMap.get(edge.target);
2337
+ if (!start || !end) return null;
2338
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2339
+ import_drei9.Line,
2340
+ {
2341
+ points: [start, end],
2342
+ color: "#444",
2343
+ lineWidth: 1,
2344
+ transparent: true,
2345
+ opacity: 0.5
2346
+ },
2347
+ i
2348
+ );
2349
+ }),
2350
+ positionedNodes.map((node, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("group", { position: node.vec, children: [
2351
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("mesh", { children: [
2352
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("sphereGeometry", { args: [0.2, 16, 16] }),
2353
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("meshStandardMaterial", { color: node.color || "#22d3ee" })
2354
+ ] }),
2355
+ node.label && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2356
+ import_drei9.Text,
2357
+ {
2358
+ position: [0, 0.3, 0],
2359
+ fontSize: 0.2,
2360
+ color: "white",
2361
+ children: node.label
2362
+ }
2363
+ )
2364
+ ] }, i))
2365
+ ] });
2366
+ }
2367
+
2368
+ // src/components/ui/map3d.tsx
2369
+ var import_drei10 = require("@react-three/drei");
2370
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2371
+ function Map3D({
2372
+ markers = [],
2373
+ radius = 5,
2374
+ textureSrc = "https://raw.githubusercontent.com/mrdoob/three.js/master/examples/textures/planets/earth_atmos_2048.jpg"
2375
+ }) {
2376
+ const texture = (0, import_drei10.useTexture)(textureSrc);
2377
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("group", { children: [
2378
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("mesh", { children: [
2379
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("sphereGeometry", { args: [radius, 64, 64] }),
2380
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("meshStandardMaterial", { map: texture, metalness: 0.1, roughness: 0.7 })
2381
+ ] }),
2382
+ markers.map((marker, i) => {
2383
+ const phi = (90 - marker.lat) * (Math.PI / 180);
2384
+ const theta = (marker.lng + 180) * (Math.PI / 180);
2385
+ const x = -(radius * Math.sin(phi) * Math.cos(theta));
2386
+ const z = radius * Math.sin(phi) * Math.sin(theta);
2387
+ const y = radius * Math.cos(phi);
2388
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("mesh", { position: [x, y, z], children: [
2389
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("sphereGeometry", { args: [0.1, 16, 16] }),
2390
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("meshBasicMaterial", { color: marker.color || "red" })
2391
+ ] }, i);
2392
+ })
2393
+ ] });
2394
+ }
2395
+
2396
+ // src/components/ui/gallery3d.tsx
2397
+ var import_react23 = require("react");
2398
+ var import_fiber5 = require("@react-three/fiber");
2399
+
2400
+ // src/components/ui/imageplane.tsx
2401
+ var import_react22 = require("react");
2402
+ var import_drei11 = require("@react-three/drei");
2403
+ var import_three7 = require("three");
2404
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2405
+ function ImagePlane({
2406
+ src,
2407
+ width = 3,
2408
+ height,
2409
+ // if undefined, will infer
2410
+ opacity = 1,
2411
+ transparent = true,
2412
+ parallax = false
2413
+ }) {
2414
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("mesh", { children: [
2415
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("planeGeometry", { args: [width, width] }),
2416
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("meshBasicMaterial", { wireframe: true, color: "gray" })
2417
+ ] }), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2418
+ ImageMesh,
2419
+ {
2420
+ src,
2421
+ width,
2422
+ height,
2423
+ opacity,
2424
+ transparent,
2425
+ parallax
2426
+ }
2427
+ ) });
2428
+ }
2429
+ function ImageMesh({ src, width = 1, height, opacity, transparent }) {
2430
+ const texture = (0, import_drei11.useTexture)(src);
2431
+ const aspect = texture.image ? texture.image.width / texture.image.height : 1;
2432
+ const h = height || width / aspect;
2433
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("mesh", { children: [
2434
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("planeGeometry", { args: [width, h] }),
2435
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2436
+ "meshBasicMaterial",
2437
+ {
2438
+ map: texture,
2439
+ transparent,
2440
+ opacity,
2441
+ side: import_three7.DoubleSide,
2442
+ toneMapped: false
2443
+ }
2444
+ )
2445
+ ] });
2446
+ }
2447
+
2448
+ // src/components/ui/gallery3d.tsx
2449
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2450
+ function Gallery3D({
2451
+ images,
2452
+ layout = "carousel",
2453
+ radius = 5,
2454
+ gap = 1.5
2455
+ }) {
2456
+ const ref = (0, import_react23.useRef)(null);
2457
+ (0, import_fiber5.useFrame)((state, delta) => {
2458
+ if (ref.current && layout === "carousel") {
2459
+ ref.current.rotation.y += delta * 0.1;
2460
+ }
2461
+ });
2462
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("group", { ref, children: images.map((img, i) => {
2463
+ let position = [0, 0, 0];
2464
+ let rotation = [0, 0, 0];
2465
+ if (layout === "carousel") {
2466
+ const angle = i / images.length * Math.PI * 2;
2467
+ position = [
2468
+ Math.cos(angle) * radius,
2469
+ 0,
2470
+ Math.sin(angle) * radius
2471
+ ];
2472
+ rotation = [0, -angle + Math.PI / 2, 0];
2473
+ rotation = [0, -angle, 0];
2474
+ } else if (layout === "grid") {
2475
+ const cols = 3;
2476
+ const x = i % cols * (3 + gap) - cols * 3 / 2;
2477
+ const y = -Math.floor(i / cols) * (2 + gap);
2478
+ position = [x, y, 0];
2479
+ }
2480
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("group", { position, rotation, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ImagePlane, { src: img.src, width: 3, opacity: 0.9 }) }, i);
2481
+ }) });
2482
+ }
2483
+
2484
+ // src/components/ui/modelviewer.tsx
2485
+ var import_react24 = require("react");
2486
+ var import_drei12 = require("@react-three/drei");
2487
+ var import_fiber6 = require("@react-three/fiber");
2488
+ var import_jsx_runtime46 = require("react/jsx-runtime");
2489
+ function ModelViewer({
2490
+ src,
2491
+ autoRotate = true,
2492
+ scale = 1,
2493
+ environment = "studio",
2494
+ position = [0, 0, 0]
2495
+ }) {
2496
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("group", { position, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react24.Suspense, { fallback: null, children: [
2497
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Model, { src, scale, autoRotate }),
2498
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_drei12.Environment, { preset: environment })
2499
+ ] }) });
2500
+ }
2501
+ function Model({ src, scale, autoRotate }) {
2502
+ const { scene } = (0, import_drei12.useGLTF)(src);
2503
+ const ref = (0, import_react24.useRef)(null);
2504
+ (0, import_fiber6.useFrame)((state, delta) => {
2505
+ if (ref.current && autoRotate) {
2506
+ ref.current.rotation.y += delta * 0.5;
2507
+ }
2508
+ });
2509
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("primitive", { object: scene, scale, ref });
2510
+ }
2511
+
2512
+ // src/components/ui/videoplane.tsx
2513
+ var import_react25 = require("react");
2514
+ var import_drei13 = require("@react-three/drei");
2515
+ var THREE = __toESM(require("three"), 1);
2516
+ var import_jsx_runtime47 = require("react/jsx-runtime");
2517
+ function VideoPlane({
2518
+ src,
2519
+ width = 4,
2520
+ height,
2521
+ autoPlay = true,
2522
+ loop = true,
2523
+ muted = true,
2524
+ opacity = 1,
2525
+ side = "double"
2526
+ }) {
2527
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
2528
+ import_react25.Suspense,
2529
+ {
2530
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("mesh", { children: [
2531
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("planeGeometry", { args: [width, width * 0.56] }),
2532
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("meshBasicMaterial", { color: "gray", wireframe: true })
2533
+ ] }),
2534
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
2535
+ VideoPlaneContent,
2536
+ {
2537
+ src,
2538
+ width,
2539
+ height,
2540
+ autoPlay,
2541
+ loop,
2542
+ muted,
2543
+ opacity,
2544
+ side
2545
+ }
2546
+ )
2547
+ }
2548
+ );
2549
+ }
2550
+ function VideoPlaneContent({
2551
+ src,
2552
+ width = 4,
2553
+ height,
2554
+ autoPlay = true,
2555
+ loop = true,
2556
+ muted = true,
2557
+ opacity = 1,
2558
+ side = "double"
2559
+ }) {
2560
+ const texture = (0, import_drei13.useVideoTexture)(src, {
2561
+ unsuspend: "canplay",
2562
+ muted,
2563
+ loop,
2564
+ start: autoPlay,
2565
+ crossOrigin: "anonymous"
2566
+ });
2567
+ const video = texture.image;
2568
+ const aspect = video && video.videoWidth > 0 && video.videoHeight > 0 ? video.videoWidth / video.videoHeight : 16 / 9;
2569
+ const planeHeight = height ?? width / aspect;
2570
+ const materialSide = side === "double" ? THREE.DoubleSide : side === "back" ? THREE.BackSide : THREE.FrontSide;
2571
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("mesh", { children: [
2572
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("planeGeometry", { args: [width, planeHeight] }),
2573
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
2574
+ "meshBasicMaterial",
2575
+ {
2576
+ map: texture,
2577
+ toneMapped: false,
2578
+ transparent: opacity < 1,
2579
+ opacity,
2580
+ side: materialSide
2581
+ }
2582
+ )
2583
+ ] });
2584
+ }
2585
+
2586
+ // src/components/ui/audiovisualizer.tsx
2587
+ var import_react26 = require("react");
2588
+ var import_fiber7 = require("@react-three/fiber");
2589
+ var THREE2 = __toESM(require("three"), 1);
2590
+ var import_jsx_runtime48 = require("react/jsx-runtime");
2591
+ function AudioVisualizer({
2592
+ audioSrc,
2593
+ fftSize = 64,
2594
+ barColor = "#22d3ee",
2595
+ width = 10
2596
+ }) {
2597
+ const analyserRef = (0, import_react26.useRef)(null);
2598
+ const meshRef = (0, import_react26.useRef)(null);
2599
+ const [ready, setReady] = (0, import_react26.useState)(false);
2600
+ (0, import_react26.useEffect)(() => {
2601
+ const listener = new THREE2.AudioListener();
2602
+ const sound = new THREE2.Audio(listener);
2603
+ const audioLoader = new THREE2.AudioLoader();
2604
+ audioLoader.load(audioSrc, function(buffer) {
2605
+ sound.setBuffer(buffer);
2606
+ sound.setLoop(true);
2607
+ sound.setVolume(0.5);
2608
+ const analyser = new THREE2.AudioAnalyser(sound, fftSize);
2609
+ analyserRef.current = analyser;
2610
+ setReady(true);
2611
+ sound.play();
2612
+ });
2613
+ return () => {
2614
+ if (sound.isPlaying) sound.stop();
2615
+ };
2616
+ }, [audioSrc, fftSize]);
2617
+ (0, import_fiber7.useFrame)(() => {
2618
+ if (analyserRef.current && meshRef.current && ready) {
2619
+ const data = analyserRef.current.getFrequencyData();
2620
+ const count = data.length;
2621
+ const step = width / count;
2622
+ const tempObj = new THREE2.Object3D();
2623
+ for (let i = 0; i < count; i++) {
2624
+ const value = data[i] / 256;
2625
+ const h = value * 5;
2626
+ const x = (i - count / 2) * step;
2627
+ tempObj.position.set(x, h / 2, 0);
2628
+ tempObj.scale.set(step * 0.8, h || 0.1, step * 0.8);
2629
+ tempObj.updateMatrix();
2630
+ meshRef.current.setMatrixAt(i, tempObj.matrix);
2631
+ }
2632
+ meshRef.current.instanceMatrix.needsUpdate = true;
2633
+ }
2634
+ });
2635
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("instancedMesh", { ref: meshRef, args: [void 0, void 0, fftSize / 2], children: [
2636
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("boxGeometry", { args: [1, 1, 1] }),
2637
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("meshStandardMaterial", { color: barColor })
2638
+ ] });
2639
+ }
2640
+
2641
+ // src/components/ui/particles.tsx
2642
+ var import_react27 = require("react");
2643
+ var import_fiber8 = require("@react-three/fiber");
2644
+ var import_three8 = require("three");
2645
+ var import_jsx_runtime49 = require("react/jsx-runtime");
2646
+ function Particles({
2647
+ count = 1e3,
2648
+ size = 0.03,
2649
+ color = "#a78bfa",
2650
+ speed = 0.1
2651
+ }) {
2652
+ const points = (0, import_react27.useRef)(null);
2653
+ const particlesPosition = (0, import_react27.useMemo)(() => {
2654
+ const positions = new Float32Array(count * 3);
2655
+ for (let i = 0; i < count; i++) {
2656
+ positions[i * 3] = (Math.random() - 0.5) * 10;
2657
+ positions[i * 3 + 1] = (Math.random() - 0.5) * 10;
2658
+ positions[i * 3 + 2] = (Math.random() - 0.5) * 10;
2659
+ }
2660
+ return positions;
2661
+ }, [count]);
2662
+ (0, import_fiber8.useFrame)((state, delta) => {
2663
+ if (points.current) {
2664
+ points.current.rotation.y += delta * speed;
2665
+ }
2666
+ });
2667
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("points", { ref: points, children: [
2668
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("bufferGeometry", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2669
+ "bufferAttribute",
2670
+ {
2671
+ attach: "attributes-position",
2672
+ count: particlesPosition.length / 3,
2673
+ array: particlesPosition,
2674
+ itemSize: 3
2675
+ }
2676
+ ) }),
2677
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2678
+ "pointsMaterial",
2679
+ {
2680
+ size,
2681
+ color,
2682
+ transparent: true,
2683
+ depthWrite: false,
2684
+ blending: import_three8.AdditiveBlending,
2685
+ sizeAttenuation: true
2686
+ }
2687
+ )
2688
+ ] });
2689
+ }
2690
+
2691
+ // src/components/ui/bloom.tsx
2692
+ var import_react28 = require("react");
2693
+ var import_fiber9 = require("@react-three/fiber");
2694
+
2695
+ // node_modules/three-stdlib/postprocessing/ShaderPass.js
2696
+ var import_three10 = require("three");
2697
+
2698
+ // node_modules/three-stdlib/postprocessing/Pass.js
2699
+ var import_three9 = require("three");
2700
+ var __defProp2 = Object.defineProperty;
2701
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2702
+ var __publicField = (obj, key, value) => {
2703
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
2704
+ return value;
2705
+ };
2706
+ var Pass = class {
2707
+ constructor() {
2708
+ __publicField(this, "enabled", true);
2709
+ __publicField(this, "needsSwap", true);
2710
+ __publicField(this, "clear", false);
2711
+ __publicField(this, "renderToScreen", false);
2712
+ }
2713
+ setSize(width, height) {
2714
+ }
2715
+ render(renderer, writeBuffer, readBuffer, deltaTime, maskActive) {
2716
+ console.error("THREE.Pass: .render() must be implemented in derived pass.");
2717
+ }
2718
+ dispose() {
2719
+ }
2720
+ };
2721
+ var FullScreenQuad = class {
2722
+ constructor(material) {
2723
+ __publicField(this, "camera", new import_three9.OrthographicCamera(-1, 1, 1, -1, 0, 1));
2724
+ __publicField(this, "geometry", new import_three9.PlaneGeometry(2, 2));
2725
+ __publicField(this, "mesh");
2726
+ this.mesh = new import_three9.Mesh(this.geometry, material);
2727
+ }
2728
+ get material() {
2729
+ return this.mesh.material;
2730
+ }
2731
+ set material(value) {
2732
+ this.mesh.material = value;
2733
+ }
2734
+ dispose() {
2735
+ this.mesh.geometry.dispose();
2736
+ }
2737
+ render(renderer) {
2738
+ renderer.render(this.mesh, this.camera);
2739
+ }
2740
+ };
2741
+
2742
+ // node_modules/three-stdlib/postprocessing/ShaderPass.js
2743
+ var __defProp3 = Object.defineProperty;
2744
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2745
+ var __publicField2 = (obj, key, value) => {
2746
+ __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
2747
+ return value;
2748
+ };
2749
+ var ShaderPass = class extends Pass {
2750
+ constructor(shader, textureID = "tDiffuse") {
2751
+ super();
2752
+ __publicField2(this, "textureID");
2753
+ __publicField2(this, "uniforms");
2754
+ __publicField2(this, "material");
2755
+ __publicField2(this, "fsQuad");
2756
+ this.textureID = textureID;
2757
+ if (shader instanceof import_three10.ShaderMaterial) {
2758
+ this.uniforms = shader.uniforms;
2759
+ this.material = shader;
2760
+ } else {
2761
+ this.uniforms = import_three10.UniformsUtils.clone(shader.uniforms);
2762
+ this.material = new import_three10.ShaderMaterial({
2763
+ defines: Object.assign({}, shader.defines),
2764
+ uniforms: this.uniforms,
2765
+ vertexShader: shader.vertexShader,
2766
+ fragmentShader: shader.fragmentShader
2767
+ });
2768
+ }
2769
+ this.fsQuad = new FullScreenQuad(this.material);
2770
+ }
2771
+ render(renderer, writeBuffer, readBuffer) {
2772
+ if (this.uniforms[this.textureID]) {
2773
+ this.uniforms[this.textureID].value = readBuffer.texture;
2774
+ }
2775
+ this.fsQuad.material = this.material;
2776
+ if (this.renderToScreen) {
2777
+ renderer.setRenderTarget(null);
2778
+ this.fsQuad.render(renderer);
2779
+ } else {
2780
+ renderer.setRenderTarget(writeBuffer);
2781
+ if (this.clear)
2782
+ renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);
2783
+ this.fsQuad.render(renderer);
2784
+ }
2785
+ }
2786
+ dispose() {
2787
+ this.fsQuad.dispose();
2788
+ this.material.dispose();
2789
+ }
2790
+ };
2791
+
2792
+ // node_modules/three-stdlib/shaders/CopyShader.js
2793
+ var CopyShader = {
2794
+ uniforms: {
2795
+ tDiffuse: { value: null },
2796
+ opacity: { value: 1 }
2797
+ },
2798
+ vertexShader: (
2799
+ /* glsl */
2800
+ `
2801
+ varying vec2 vUv;
2802
+
2803
+ void main() {
2804
+
2805
+ vUv = uv;
2806
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
2807
+
2808
+ }
2809
+ `
2810
+ ),
2811
+ fragmentShader: (
2812
+ /* glsl */
2813
+ `
2814
+ uniform float opacity;
2815
+
2816
+ uniform sampler2D tDiffuse;
2817
+
2818
+ varying vec2 vUv;
2819
+
2820
+ void main() {
2821
+
2822
+ vec4 texel = texture2D( tDiffuse, vUv );
2823
+ gl_FragColor = opacity * texel;
2824
+
2825
+ }
2826
+ `
2827
+ )
2828
+ };
2829
+
2830
+ // node_modules/three-stdlib/postprocessing/UnrealBloomPass.js
2831
+ var import_three12 = require("three");
2832
+
2833
+ // node_modules/three-stdlib/shaders/LuminosityHighPassShader.js
2834
+ var import_three11 = require("three");
2835
+ var LuminosityHighPassShader = {
2836
+ shaderID: "luminosityHighPass",
2837
+ uniforms: {
2838
+ tDiffuse: { value: null },
2839
+ luminosityThreshold: { value: 1 },
2840
+ smoothWidth: { value: 1 },
2841
+ defaultColor: { value: /* @__PURE__ */ new import_three11.Color(0) },
2842
+ defaultOpacity: { value: 0 }
2843
+ },
2844
+ vertexShader: (
2845
+ /* glsl */
2846
+ `
2847
+ varying vec2 vUv;
2848
+
2849
+ void main() {
2850
+
2851
+ vUv = uv;
2852
+
2853
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
2854
+
2855
+ }
2856
+ `
2857
+ ),
2858
+ fragmentShader: (
2859
+ /* glsl */
2860
+ `
2861
+ uniform sampler2D tDiffuse;
2862
+ uniform vec3 defaultColor;
2863
+ uniform float defaultOpacity;
2864
+ uniform float luminosityThreshold;
2865
+ uniform float smoothWidth;
2866
+
2867
+ varying vec2 vUv;
2868
+
2869
+ void main() {
2870
+
2871
+ vec4 texel = texture2D( tDiffuse, vUv );
2872
+
2873
+ vec3 luma = vec3( 0.299, 0.587, 0.114 );
2874
+
2875
+ float v = dot( texel.xyz, luma );
2876
+
2877
+ vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );
2878
+
2879
+ float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );
2880
+
2881
+ gl_FragColor = mix( outputColor, texel, alpha );
2882
+
2883
+ }
2884
+ `
2885
+ )
2886
+ };
2887
+
2888
+ // node_modules/three-stdlib/postprocessing/UnrealBloomPass.js
2889
+ var __defProp4 = Object.defineProperty;
2890
+ var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2891
+ var __publicField3 = (obj, key, value) => {
2892
+ __defNormalProp3(obj, typeof key !== "symbol" ? key + "" : key, value);
2893
+ return value;
2894
+ };
2895
+ var UnrealBloomPass = /* @__PURE__ */ (() => {
2896
+ const _UnrealBloomPass = class extends Pass {
2897
+ constructor(resolution, strength, radius, threshold) {
2898
+ super();
2899
+ this.strength = strength !== void 0 ? strength : 1;
2900
+ this.radius = radius;
2901
+ this.threshold = threshold;
2902
+ this.resolution = resolution !== void 0 ? new import_three12.Vector2(resolution.x, resolution.y) : new import_three12.Vector2(256, 256);
2903
+ this.clearColor = new import_three12.Color(0, 0, 0);
2904
+ this.renderTargetsHorizontal = [];
2905
+ this.renderTargetsVertical = [];
2906
+ this.nMips = 5;
2907
+ let resx = Math.round(this.resolution.x / 2);
2908
+ let resy = Math.round(this.resolution.y / 2);
2909
+ this.renderTargetBright = new import_three12.WebGLRenderTarget(resx, resy, { type: import_three12.HalfFloatType });
2910
+ this.renderTargetBright.texture.name = "UnrealBloomPass.bright";
2911
+ this.renderTargetBright.texture.generateMipmaps = false;
2912
+ for (let i = 0; i < this.nMips; i++) {
2913
+ const renderTargetHorizonal = new import_three12.WebGLRenderTarget(resx, resy, { type: import_three12.HalfFloatType });
2914
+ renderTargetHorizonal.texture.name = "UnrealBloomPass.h" + i;
2915
+ renderTargetHorizonal.texture.generateMipmaps = false;
2916
+ this.renderTargetsHorizontal.push(renderTargetHorizonal);
2917
+ const renderTargetVertical = new import_three12.WebGLRenderTarget(resx, resy, { type: import_three12.HalfFloatType });
2918
+ renderTargetVertical.texture.name = "UnrealBloomPass.v" + i;
2919
+ renderTargetVertical.texture.generateMipmaps = false;
2920
+ this.renderTargetsVertical.push(renderTargetVertical);
2921
+ resx = Math.round(resx / 2);
2922
+ resy = Math.round(resy / 2);
2923
+ }
2924
+ const highPassShader = LuminosityHighPassShader;
2925
+ this.highPassUniforms = import_three12.UniformsUtils.clone(highPassShader.uniforms);
2926
+ this.highPassUniforms["luminosityThreshold"].value = threshold;
2927
+ this.highPassUniforms["smoothWidth"].value = 0.01;
2928
+ this.materialHighPassFilter = new import_three12.ShaderMaterial({
2929
+ uniforms: this.highPassUniforms,
2930
+ vertexShader: highPassShader.vertexShader,
2931
+ fragmentShader: highPassShader.fragmentShader,
2932
+ defines: {}
2933
+ });
2934
+ this.separableBlurMaterials = [];
2935
+ const kernelSizeArray = [3, 5, 7, 9, 11];
2936
+ resx = Math.round(this.resolution.x / 2);
2937
+ resy = Math.round(this.resolution.y / 2);
2938
+ for (let i = 0; i < this.nMips; i++) {
2939
+ this.separableBlurMaterials.push(this.getSeperableBlurMaterial(kernelSizeArray[i]));
2940
+ this.separableBlurMaterials[i].uniforms["texSize"].value = new import_three12.Vector2(resx, resy);
2941
+ resx = Math.round(resx / 2);
2942
+ resy = Math.round(resy / 2);
2943
+ }
2944
+ this.compositeMaterial = this.getCompositeMaterial(this.nMips);
2945
+ this.compositeMaterial.uniforms["blurTexture1"].value = this.renderTargetsVertical[0].texture;
2946
+ this.compositeMaterial.uniforms["blurTexture2"].value = this.renderTargetsVertical[1].texture;
2947
+ this.compositeMaterial.uniforms["blurTexture3"].value = this.renderTargetsVertical[2].texture;
2948
+ this.compositeMaterial.uniforms["blurTexture4"].value = this.renderTargetsVertical[3].texture;
2949
+ this.compositeMaterial.uniforms["blurTexture5"].value = this.renderTargetsVertical[4].texture;
2950
+ this.compositeMaterial.uniforms["bloomStrength"].value = strength;
2951
+ this.compositeMaterial.uniforms["bloomRadius"].value = 0.1;
2952
+ this.compositeMaterial.needsUpdate = true;
2953
+ const bloomFactors = [1, 0.8, 0.6, 0.4, 0.2];
2954
+ this.compositeMaterial.uniforms["bloomFactors"].value = bloomFactors;
2955
+ this.bloomTintColors = [
2956
+ new import_three12.Vector3(1, 1, 1),
2957
+ new import_three12.Vector3(1, 1, 1),
2958
+ new import_three12.Vector3(1, 1, 1),
2959
+ new import_three12.Vector3(1, 1, 1),
2960
+ new import_three12.Vector3(1, 1, 1)
2961
+ ];
2962
+ this.compositeMaterial.uniforms["bloomTintColors"].value = this.bloomTintColors;
2963
+ const copyShader = CopyShader;
2964
+ this.copyUniforms = import_three12.UniformsUtils.clone(copyShader.uniforms);
2965
+ this.copyUniforms["opacity"].value = 1;
2966
+ this.materialCopy = new import_three12.ShaderMaterial({
2967
+ uniforms: this.copyUniforms,
2968
+ vertexShader: copyShader.vertexShader,
2969
+ fragmentShader: copyShader.fragmentShader,
2970
+ blending: import_three12.AdditiveBlending,
2971
+ depthTest: false,
2972
+ depthWrite: false,
2973
+ transparent: true
2974
+ });
2975
+ this.enabled = true;
2976
+ this.needsSwap = false;
2977
+ this._oldClearColor = new import_three12.Color();
2978
+ this.oldClearAlpha = 1;
2979
+ this.basic = new import_three12.MeshBasicMaterial();
2980
+ this.fsQuad = new FullScreenQuad(null);
2981
+ }
2982
+ dispose() {
2983
+ for (let i = 0; i < this.renderTargetsHorizontal.length; i++) {
2984
+ this.renderTargetsHorizontal[i].dispose();
2985
+ }
2986
+ for (let i = 0; i < this.renderTargetsVertical.length; i++) {
2987
+ this.renderTargetsVertical[i].dispose();
2988
+ }
2989
+ this.renderTargetBright.dispose();
2990
+ for (let i = 0; i < this.separableBlurMaterials.length; i++) {
2991
+ this.separableBlurMaterials[i].dispose();
2992
+ }
2993
+ this.compositeMaterial.dispose();
2994
+ this.materialCopy.dispose();
2995
+ this.basic.dispose();
2996
+ this.fsQuad.dispose();
2997
+ }
2998
+ setSize(width, height) {
2999
+ let resx = Math.round(width / 2);
3000
+ let resy = Math.round(height / 2);
3001
+ this.renderTargetBright.setSize(resx, resy);
3002
+ for (let i = 0; i < this.nMips; i++) {
3003
+ this.renderTargetsHorizontal[i].setSize(resx, resy);
3004
+ this.renderTargetsVertical[i].setSize(resx, resy);
3005
+ this.separableBlurMaterials[i].uniforms["texSize"].value = new import_three12.Vector2(resx, resy);
3006
+ resx = Math.round(resx / 2);
3007
+ resy = Math.round(resy / 2);
3008
+ }
3009
+ }
3010
+ render(renderer, writeBuffer, readBuffer, deltaTime, maskActive) {
3011
+ renderer.getClearColor(this._oldClearColor);
3012
+ this.oldClearAlpha = renderer.getClearAlpha();
3013
+ const oldAutoClear = renderer.autoClear;
3014
+ renderer.autoClear = false;
3015
+ renderer.setClearColor(this.clearColor, 0);
3016
+ if (maskActive)
3017
+ renderer.state.buffers.stencil.setTest(false);
3018
+ if (this.renderToScreen) {
3019
+ this.fsQuad.material = this.basic;
3020
+ this.basic.map = readBuffer.texture;
3021
+ renderer.setRenderTarget(null);
3022
+ renderer.clear();
3023
+ this.fsQuad.render(renderer);
3024
+ }
3025
+ this.highPassUniforms["tDiffuse"].value = readBuffer.texture;
3026
+ this.highPassUniforms["luminosityThreshold"].value = this.threshold;
3027
+ this.fsQuad.material = this.materialHighPassFilter;
3028
+ renderer.setRenderTarget(this.renderTargetBright);
3029
+ renderer.clear();
3030
+ this.fsQuad.render(renderer);
3031
+ let inputRenderTarget = this.renderTargetBright;
3032
+ for (let i = 0; i < this.nMips; i++) {
3033
+ this.fsQuad.material = this.separableBlurMaterials[i];
3034
+ this.separableBlurMaterials[i].uniforms["colorTexture"].value = inputRenderTarget.texture;
3035
+ this.separableBlurMaterials[i].uniforms["direction"].value = _UnrealBloomPass.BlurDirectionX;
3036
+ renderer.setRenderTarget(this.renderTargetsHorizontal[i]);
3037
+ renderer.clear();
3038
+ this.fsQuad.render(renderer);
3039
+ this.separableBlurMaterials[i].uniforms["colorTexture"].value = this.renderTargetsHorizontal[i].texture;
3040
+ this.separableBlurMaterials[i].uniforms["direction"].value = _UnrealBloomPass.BlurDirectionY;
3041
+ renderer.setRenderTarget(this.renderTargetsVertical[i]);
3042
+ renderer.clear();
3043
+ this.fsQuad.render(renderer);
3044
+ inputRenderTarget = this.renderTargetsVertical[i];
3045
+ }
3046
+ this.fsQuad.material = this.compositeMaterial;
3047
+ this.compositeMaterial.uniforms["bloomStrength"].value = this.strength;
3048
+ this.compositeMaterial.uniforms["bloomRadius"].value = this.radius;
3049
+ this.compositeMaterial.uniforms["bloomTintColors"].value = this.bloomTintColors;
3050
+ renderer.setRenderTarget(this.renderTargetsHorizontal[0]);
3051
+ renderer.clear();
3052
+ this.fsQuad.render(renderer);
3053
+ this.fsQuad.material = this.materialCopy;
3054
+ this.copyUniforms["tDiffuse"].value = this.renderTargetsHorizontal[0].texture;
3055
+ if (maskActive)
3056
+ renderer.state.buffers.stencil.setTest(true);
3057
+ if (this.renderToScreen) {
3058
+ renderer.setRenderTarget(null);
3059
+ this.fsQuad.render(renderer);
3060
+ } else {
3061
+ renderer.setRenderTarget(readBuffer);
3062
+ this.fsQuad.render(renderer);
3063
+ }
3064
+ renderer.setClearColor(this._oldClearColor, this.oldClearAlpha);
3065
+ renderer.autoClear = oldAutoClear;
3066
+ }
3067
+ getSeperableBlurMaterial(kernelRadius) {
3068
+ return new import_three12.ShaderMaterial({
3069
+ defines: {
3070
+ KERNEL_RADIUS: kernelRadius,
3071
+ SIGMA: kernelRadius
3072
+ },
3073
+ uniforms: {
3074
+ colorTexture: { value: null },
3075
+ texSize: { value: new import_three12.Vector2(0.5, 0.5) },
3076
+ direction: { value: new import_three12.Vector2(0.5, 0.5) }
3077
+ },
3078
+ vertexShader: `varying vec2 vUv;
3079
+ void main() {
3080
+ vUv = uv;
3081
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
3082
+ }`,
3083
+ fragmentShader: `#include <common>
3084
+ varying vec2 vUv;
3085
+ uniform sampler2D colorTexture;
3086
+ uniform vec2 texSize;
3087
+ uniform vec2 direction;
3088
+
3089
+ float gaussianPdf(in float x, in float sigma) {
3090
+ return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;
3091
+ }
3092
+ void main() {
3093
+ vec2 invSize = 1.0 / texSize;
3094
+ float fSigma = float(SIGMA);
3095
+ float weightSum = gaussianPdf(0.0, fSigma);
3096
+ vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;
3097
+ for( int i = 1; i < KERNEL_RADIUS; i ++ ) {
3098
+ float x = float(i);
3099
+ float w = gaussianPdf(x, fSigma);
3100
+ vec2 uvOffset = direction * invSize * x;
3101
+ vec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;
3102
+ vec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;
3103
+ diffuseSum += (sample1 + sample2) * w;
3104
+ weightSum += 2.0 * w;
3105
+ }
3106
+ gl_FragColor = vec4(diffuseSum/weightSum, 1.0);
3107
+ }`
3108
+ });
3109
+ }
3110
+ getCompositeMaterial(nMips) {
3111
+ return new import_three12.ShaderMaterial({
3112
+ defines: {
3113
+ NUM_MIPS: nMips
3114
+ },
3115
+ uniforms: {
3116
+ blurTexture1: { value: null },
3117
+ blurTexture2: { value: null },
3118
+ blurTexture3: { value: null },
3119
+ blurTexture4: { value: null },
3120
+ blurTexture5: { value: null },
3121
+ bloomStrength: { value: 1 },
3122
+ bloomFactors: { value: null },
3123
+ bloomTintColors: { value: null },
3124
+ bloomRadius: { value: 0 }
3125
+ },
3126
+ vertexShader: `varying vec2 vUv;
3127
+ void main() {
3128
+ vUv = uv;
3129
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
3130
+ }`,
3131
+ fragmentShader: `varying vec2 vUv;
3132
+ uniform sampler2D blurTexture1;
3133
+ uniform sampler2D blurTexture2;
3134
+ uniform sampler2D blurTexture3;
3135
+ uniform sampler2D blurTexture4;
3136
+ uniform sampler2D blurTexture5;
3137
+ uniform float bloomStrength;
3138
+ uniform float bloomRadius;
3139
+ uniform float bloomFactors[NUM_MIPS];
3140
+ uniform vec3 bloomTintColors[NUM_MIPS];
3141
+
3142
+ float lerpBloomFactor(const in float factor) {
3143
+ float mirrorFactor = 1.2 - factor;
3144
+ return mix(factor, mirrorFactor, bloomRadius);
3145
+ }
3146
+
3147
+ void main() {
3148
+ gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +
3149
+ lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +
3150
+ lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
3151
+ lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
3152
+ lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
3153
+ }`
3154
+ });
3155
+ }
3156
+ };
3157
+ let UnrealBloomPass2 = _UnrealBloomPass;
3158
+ __publicField3(UnrealBloomPass2, "BlurDirectionX", new import_three12.Vector2(1, 0));
3159
+ __publicField3(UnrealBloomPass2, "BlurDirectionY", new import_three12.Vector2(0, 1));
3160
+ return UnrealBloomPass2;
3161
+ })();
3162
+
3163
+ // node_modules/three-stdlib/postprocessing/MaskPass.js
3164
+ var __defProp5 = Object.defineProperty;
3165
+ var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3166
+ var __publicField4 = (obj, key, value) => {
3167
+ __defNormalProp4(obj, typeof key !== "symbol" ? key + "" : key, value);
3168
+ return value;
3169
+ };
3170
+ var MaskPass = class extends Pass {
3171
+ constructor(scene, camera) {
3172
+ super();
3173
+ __publicField4(this, "scene");
3174
+ __publicField4(this, "camera");
3175
+ __publicField4(this, "inverse");
3176
+ this.scene = scene;
3177
+ this.camera = camera;
3178
+ this.clear = true;
3179
+ this.needsSwap = false;
3180
+ this.inverse = false;
3181
+ }
3182
+ render(renderer, writeBuffer, readBuffer) {
3183
+ const context = renderer.getContext();
3184
+ const state = renderer.state;
3185
+ state.buffers.color.setMask(false);
3186
+ state.buffers.depth.setMask(false);
3187
+ state.buffers.color.setLocked(true);
3188
+ state.buffers.depth.setLocked(true);
3189
+ let writeValue, clearValue;
3190
+ if (this.inverse) {
3191
+ writeValue = 0;
3192
+ clearValue = 1;
3193
+ } else {
3194
+ writeValue = 1;
3195
+ clearValue = 0;
3196
+ }
3197
+ state.buffers.stencil.setTest(true);
3198
+ state.buffers.stencil.setOp(context.REPLACE, context.REPLACE, context.REPLACE);
3199
+ state.buffers.stencil.setFunc(context.ALWAYS, writeValue, 4294967295);
3200
+ state.buffers.stencil.setClear(clearValue);
3201
+ state.buffers.stencil.setLocked(true);
3202
+ renderer.setRenderTarget(readBuffer);
3203
+ if (this.clear)
3204
+ renderer.clear();
3205
+ renderer.render(this.scene, this.camera);
3206
+ renderer.setRenderTarget(writeBuffer);
3207
+ if (this.clear)
3208
+ renderer.clear();
3209
+ renderer.render(this.scene, this.camera);
3210
+ state.buffers.color.setLocked(false);
3211
+ state.buffers.depth.setLocked(false);
3212
+ state.buffers.stencil.setLocked(false);
3213
+ state.buffers.stencil.setFunc(context.EQUAL, 1, 4294967295);
3214
+ state.buffers.stencil.setOp(context.KEEP, context.KEEP, context.KEEP);
3215
+ state.buffers.stencil.setLocked(true);
3216
+ }
3217
+ };
3218
+ var ClearMaskPass = class extends Pass {
3219
+ constructor() {
3220
+ super();
3221
+ this.needsSwap = false;
3222
+ }
3223
+ render(renderer) {
3224
+ renderer.state.buffers.stencil.setLocked(false);
3225
+ renderer.state.buffers.stencil.setTest(false);
3226
+ }
3227
+ };
3228
+
3229
+ // node_modules/three-stdlib/postprocessing/EffectComposer.js
3230
+ var import_three13 = require("three");
3231
+ var __defProp6 = Object.defineProperty;
3232
+ var __defNormalProp5 = (obj, key, value) => key in obj ? __defProp6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3233
+ var __publicField5 = (obj, key, value) => {
3234
+ __defNormalProp5(obj, typeof key !== "symbol" ? key + "" : key, value);
3235
+ return value;
3236
+ };
3237
+ var EffectComposer = class {
3238
+ constructor(renderer, renderTarget) {
3239
+ __publicField5(this, "renderer");
3240
+ __publicField5(this, "_pixelRatio");
3241
+ __publicField5(this, "_width");
3242
+ __publicField5(this, "_height");
3243
+ __publicField5(this, "renderTarget1");
3244
+ __publicField5(this, "renderTarget2");
3245
+ __publicField5(this, "writeBuffer");
3246
+ __publicField5(this, "readBuffer");
3247
+ __publicField5(this, "renderToScreen");
3248
+ __publicField5(this, "passes", []);
3249
+ __publicField5(this, "copyPass");
3250
+ __publicField5(this, "clock");
3251
+ this.renderer = renderer;
3252
+ if (renderTarget === void 0) {
3253
+ const parameters = {
3254
+ minFilter: import_three13.LinearFilter,
3255
+ magFilter: import_three13.LinearFilter,
3256
+ format: import_three13.RGBAFormat
3257
+ };
3258
+ const size = renderer.getSize(new import_three13.Vector2());
3259
+ this._pixelRatio = renderer.getPixelRatio();
3260
+ this._width = size.width;
3261
+ this._height = size.height;
3262
+ renderTarget = new import_three13.WebGLRenderTarget(
3263
+ this._width * this._pixelRatio,
3264
+ this._height * this._pixelRatio,
3265
+ parameters
3266
+ );
3267
+ renderTarget.texture.name = "EffectComposer.rt1";
3268
+ } else {
3269
+ this._pixelRatio = 1;
3270
+ this._width = renderTarget.width;
3271
+ this._height = renderTarget.height;
3272
+ }
3273
+ this.renderTarget1 = renderTarget;
3274
+ this.renderTarget2 = renderTarget.clone();
3275
+ this.renderTarget2.texture.name = "EffectComposer.rt2";
3276
+ this.writeBuffer = this.renderTarget1;
3277
+ this.readBuffer = this.renderTarget2;
3278
+ this.renderToScreen = true;
3279
+ if (CopyShader === void 0) {
3280
+ console.error("THREE.EffectComposer relies on CopyShader");
3281
+ }
3282
+ if (ShaderPass === void 0) {
3283
+ console.error("THREE.EffectComposer relies on ShaderPass");
3284
+ }
3285
+ this.copyPass = new ShaderPass(CopyShader);
3286
+ this.copyPass.material.blending = import_three13.NoBlending;
3287
+ this.clock = new import_three13.Clock();
3288
+ }
3289
+ swapBuffers() {
3290
+ const tmp = this.readBuffer;
3291
+ this.readBuffer = this.writeBuffer;
3292
+ this.writeBuffer = tmp;
3293
+ }
3294
+ addPass(pass) {
3295
+ this.passes.push(pass);
3296
+ pass.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
3297
+ }
3298
+ insertPass(pass, index) {
3299
+ this.passes.splice(index, 0, pass);
3300
+ pass.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
3301
+ }
3302
+ removePass(pass) {
3303
+ const index = this.passes.indexOf(pass);
3304
+ if (index !== -1) {
3305
+ this.passes.splice(index, 1);
3306
+ }
3307
+ }
3308
+ isLastEnabledPass(passIndex) {
3309
+ for (let i = passIndex + 1; i < this.passes.length; i++) {
3310
+ if (this.passes[i].enabled) {
3311
+ return false;
3312
+ }
3313
+ }
3314
+ return true;
3315
+ }
3316
+ render(deltaTime) {
3317
+ if (deltaTime === void 0) {
3318
+ deltaTime = this.clock.getDelta();
3319
+ }
3320
+ const currentRenderTarget = this.renderer.getRenderTarget();
3321
+ let maskActive = false;
3322
+ const il = this.passes.length;
3323
+ for (let i = 0; i < il; i++) {
3324
+ const pass = this.passes[i];
3325
+ if (pass.enabled === false)
3326
+ continue;
3327
+ pass.renderToScreen = this.renderToScreen && this.isLastEnabledPass(i);
3328
+ pass.render(this.renderer, this.writeBuffer, this.readBuffer, deltaTime, maskActive);
3329
+ if (pass.needsSwap) {
3330
+ if (maskActive) {
3331
+ const context = this.renderer.getContext();
3332
+ const stencil = this.renderer.state.buffers.stencil;
3333
+ stencil.setFunc(context.NOTEQUAL, 1, 4294967295);
3334
+ this.copyPass.render(this.renderer, this.writeBuffer, this.readBuffer, deltaTime);
3335
+ stencil.setFunc(context.EQUAL, 1, 4294967295);
3336
+ }
3337
+ this.swapBuffers();
3338
+ }
3339
+ if (MaskPass !== void 0) {
3340
+ if (pass instanceof MaskPass) {
3341
+ maskActive = true;
3342
+ } else if (pass instanceof ClearMaskPass) {
3343
+ maskActive = false;
3344
+ }
3345
+ }
3346
+ }
3347
+ this.renderer.setRenderTarget(currentRenderTarget);
3348
+ }
3349
+ reset(renderTarget) {
3350
+ if (renderTarget === void 0) {
3351
+ const size = this.renderer.getSize(new import_three13.Vector2());
3352
+ this._pixelRatio = this.renderer.getPixelRatio();
3353
+ this._width = size.width;
3354
+ this._height = size.height;
3355
+ renderTarget = this.renderTarget1.clone();
3356
+ renderTarget.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
3357
+ }
3358
+ this.renderTarget1.dispose();
3359
+ this.renderTarget2.dispose();
3360
+ this.renderTarget1 = renderTarget;
3361
+ this.renderTarget2 = renderTarget.clone();
3362
+ this.writeBuffer = this.renderTarget1;
3363
+ this.readBuffer = this.renderTarget2;
3364
+ }
3365
+ setSize(width, height) {
3366
+ this._width = width;
3367
+ this._height = height;
3368
+ const effectiveWidth = this._width * this._pixelRatio;
3369
+ const effectiveHeight = this._height * this._pixelRatio;
3370
+ this.renderTarget1.setSize(effectiveWidth, effectiveHeight);
3371
+ this.renderTarget2.setSize(effectiveWidth, effectiveHeight);
3372
+ for (let i = 0; i < this.passes.length; i++) {
3373
+ this.passes[i].setSize(effectiveWidth, effectiveHeight);
3374
+ }
3375
+ }
3376
+ setPixelRatio(pixelRatio) {
3377
+ this._pixelRatio = pixelRatio;
3378
+ this.setSize(this._width, this._height);
3379
+ }
3380
+ dispose() {
3381
+ this.renderTarget1.dispose();
3382
+ this.renderTarget2.dispose();
3383
+ this.copyPass.dispose();
3384
+ }
3385
+ };
3386
+
3387
+ // node_modules/three-stdlib/postprocessing/RenderPass.js
3388
+ var import_three14 = require("three");
3389
+ var __defProp7 = Object.defineProperty;
3390
+ var __defNormalProp6 = (obj, key, value) => key in obj ? __defProp7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3391
+ var __publicField6 = (obj, key, value) => {
3392
+ __defNormalProp6(obj, typeof key !== "symbol" ? key + "" : key, value);
3393
+ return value;
3394
+ };
3395
+ var RenderPass = class extends Pass {
3396
+ constructor(scene, camera, overrideMaterial, clearColor, clearAlpha = 0) {
3397
+ super();
3398
+ __publicField6(this, "scene");
3399
+ __publicField6(this, "camera");
3400
+ __publicField6(this, "overrideMaterial");
3401
+ __publicField6(this, "clearColor");
3402
+ __publicField6(this, "clearAlpha");
3403
+ __publicField6(this, "clearDepth", false);
3404
+ __publicField6(this, "_oldClearColor", new import_three14.Color());
3405
+ this.scene = scene;
3406
+ this.camera = camera;
3407
+ this.overrideMaterial = overrideMaterial;
3408
+ this.clearColor = clearColor;
3409
+ this.clearAlpha = clearAlpha;
3410
+ this.clear = true;
3411
+ this.needsSwap = false;
3412
+ }
3413
+ render(renderer, writeBuffer, readBuffer) {
3414
+ let oldAutoClear = renderer.autoClear;
3415
+ renderer.autoClear = false;
3416
+ let oldClearAlpha;
3417
+ let oldOverrideMaterial = null;
3418
+ if (this.overrideMaterial !== void 0) {
3419
+ oldOverrideMaterial = this.scene.overrideMaterial;
3420
+ this.scene.overrideMaterial = this.overrideMaterial;
3421
+ }
3422
+ if (this.clearColor) {
3423
+ renderer.getClearColor(this._oldClearColor);
3424
+ oldClearAlpha = renderer.getClearAlpha();
3425
+ renderer.setClearColor(this.clearColor, this.clearAlpha);
3426
+ }
3427
+ if (this.clearDepth) {
3428
+ renderer.clearDepth();
3429
+ }
3430
+ renderer.setRenderTarget(this.renderToScreen ? null : readBuffer);
3431
+ if (this.clear)
3432
+ renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);
3433
+ renderer.render(this.scene, this.camera);
3434
+ if (this.clearColor) {
3435
+ renderer.setClearColor(this._oldClearColor, oldClearAlpha);
3436
+ }
3437
+ if (this.overrideMaterial !== void 0) {
3438
+ this.scene.overrideMaterial = oldOverrideMaterial;
3439
+ }
3440
+ renderer.autoClear = oldAutoClear;
3441
+ }
3442
+ };
3443
+
3444
+ // src/components/ui/bloom.tsx
3445
+ var import_three15 = require("three");
3446
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3447
+ (0, import_fiber9.extend)({ EffectComposer, RenderPass, UnrealBloomPass });
3448
+ function Bloom({ intensity = 1, radius = 0.4, threshold = 0 }) {
3449
+ const { gl, scene, camera, size } = (0, import_fiber9.useThree)();
3450
+ const composer = (0, import_react28.useRef)(null);
3451
+ (0, import_react28.useEffect)(() => {
3452
+ if (composer.current) {
3453
+ composer.current.setSize(size.width, size.height);
3454
+ }
3455
+ }, [size]);
3456
+ (0, import_fiber9.useFrame)(() => {
3457
+ if (composer.current) {
3458
+ composer.current.render();
3459
+ }
3460
+ }, 1);
3461
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("effectComposer", { ref: composer, args: [gl], children: [
3462
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("renderPass", { attach: "passes", args: [scene, camera] }),
3463
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("unrealBloomPass", { attach: "passes", args: [new import_three15.Vector2(size.width, size.height), intensity, radius, threshold] })
3464
+ ] });
3465
+ }
3466
+
3467
+ // src/components/ui/reflection.tsx
3468
+ var import_drei14 = require("@react-three/drei");
3469
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3470
+ function Reflection({
3471
+ blur = [300, 100],
3472
+ opacity = 0.5,
3473
+ resolution = 512,
3474
+ color = "#101010"
3475
+ }) {
3476
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("mesh", { rotation: [-Math.PI / 2, 0, 0], position: [0, -0.01, 0], children: [
3477
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("planeGeometry", { args: [50, 50] }),
3478
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3479
+ import_drei14.MeshReflectorMaterial,
3480
+ {
3481
+ blur,
3482
+ resolution,
3483
+ mixBlur: 1,
3484
+ mixStrength: opacity * 10,
3485
+ roughness: 1,
3486
+ depthScale: 1.2,
3487
+ minDepthThreshold: 0.4,
3488
+ maxDepthThreshold: 1.4,
3489
+ color,
3490
+ metalness: 0.5,
3491
+ mirror: 1
3492
+ }
3493
+ )
3494
+ ] });
3495
+ }
3496
+
3497
+ // src/components/ui/fog.tsx
3498
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3499
+ function Fog({
3500
+ color = "#000",
3501
+ near = 5,
3502
+ far = 30,
3503
+ type = "linear",
3504
+ density = 0.02
3505
+ }) {
3506
+ if (type === "exponential") {
3507
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("fogExp2", { attach: "fog", args: [color, density] });
3508
+ }
3509
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("fog", { attach: "fog", args: [color, near, far] });
3510
+ }
3511
+
3512
+ // src/components/ui/shadowsystem.tsx
3513
+ var import_drei15 = require("@react-three/drei");
3514
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3515
+ function ShadowSystem({ type = "soft", bias = -1e-4, mapSize = 1024 }) {
3516
+ if (type === "soft") {
3517
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_drei15.SoftShadows, {});
3518
+ }
3519
+ if (type === "contact") {
3520
+ return null;
3521
+ }
3522
+ return null;
3523
+ }
3524
+
3525
+ // src/components/ui/gloweffect.tsx
3526
+ var import_react29 = __toESM(require("react"), 1);
3527
+ var THREE3 = __toESM(require("three"), 1);
3528
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3529
+ function GlowEffect({
3530
+ children,
3531
+ color = "#22d3ee",
3532
+ intensity = 1,
3533
+ scale = 1.2
3534
+ }) {
3535
+ const glowMaterial = import_react29.default.useMemo(() => {
3536
+ return new THREE3.MeshBasicMaterial({
3537
+ color,
3538
+ transparent: true,
3539
+ opacity: 0.3 * intensity,
3540
+ blending: THREE3.AdditiveBlending,
3541
+ side: THREE3.BackSide
3542
+ // Outline effect often uses BackSide with scaled mesh
3543
+ });
3544
+ }, [color, intensity]);
3545
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("group", { children: [
3546
+ children,
3547
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("group", { scale: [scale, scale, scale], children: import_react29.Children.map(children, (child) => {
3548
+ if (import_react29.default.isValidElement(child)) {
3549
+ return (0, import_react29.cloneElement)(child, {
3550
+ material: glowMaterial
3551
+ });
3552
+ }
3553
+ return child;
3554
+ }) })
3555
+ ] });
3556
+ }
3557
+
3558
+ // src/components/ui/waveeffect.tsx
3559
+ var import_react30 = __toESM(require("react"), 1);
3560
+ var import_drei16 = require("@react-three/drei");
3561
+ var import_fiber10 = require("@react-three/fiber");
3562
+ var THREE4 = __toESM(require("three"), 1);
3563
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3564
+ var WaveMaterial = (0, import_drei16.shaderMaterial)(
3565
+ { time: 0, color: new THREE4.Color(0.2, 0.5, 1) },
3566
+ // vertex shader
3567
+ `
3568
+ varying vec2 vUv;
3569
+ uniform float time;
3570
+ void main() {
3571
+ vUv = uv;
3572
+ vec3 pos = position;
3573
+ pos.y += sin(pos.x * 2.0 + time) * 0.2;
3574
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);
3575
+ }
3576
+ `,
3577
+ // fragment shader
3578
+ `
3579
+ uniform vec3 color;
3580
+ varying vec2 vUv;
3581
+ void main() {
3582
+ gl_FragColor = vec4(color, 1.0);
3583
+ }
3584
+ `
3585
+ );
3586
+ (0, import_fiber10.extend)({ WaveMaterial });
3587
+ function WaveEffect({ children, amplitude = 0.3, frequency = 2, speed = 1 }) {
3588
+ const group = import_react30.default.useRef(null);
3589
+ const material = (0, import_react30.useMemo)(() => new WaveMaterial(), []);
3590
+ (0, import_fiber10.useFrame)((state, delta) => {
3591
+ if (material) {
3592
+ material.time += delta * speed;
3593
+ }
3594
+ });
3595
+ import_react30.default.useEffect(() => {
3596
+ if (group.current) {
3597
+ group.current.traverse((obj) => {
3598
+ if (obj.isMesh) {
3599
+ obj.material = material;
3600
+ }
3601
+ });
3602
+ }
3603
+ }, [children, material]);
3604
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("group", { ref: group, children });
3605
+ }
3606
+
3607
+ // src/components/ui/noisefield.tsx
3608
+ var import_react31 = require("react");
3609
+ var import_drei17 = require("@react-three/drei");
3610
+ var import_fiber11 = require("@react-three/fiber");
3611
+ var THREE5 = __toESM(require("three"), 1);
3612
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3613
+ var NoiseMaterial = (0, import_drei17.shaderMaterial)(
3614
+ { time: 0, scale: 1, color: new THREE5.Color(0.2, 0.5, 1) },
3615
+ // Vertex
3616
+ `
3617
+ varying vec2 vUv;
3618
+ void main() {
3619
+ vUv = uv;
3620
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
3621
+ }
3622
+ `,
3623
+ // Fragment (Simple noise-like pattern via sine waves)
3624
+ `
3625
+ uniform float time;
3626
+ uniform float scale;
3627
+ uniform vec3 color;
3628
+ varying vec2 vUv;
3629
+
3630
+ // Pseudo-random
3631
+ float rand(vec2 co){
3632
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
3633
+ }
3634
+
3635
+ void main() {
3636
+ float noise = rand(vUv * scale + time * 0.1);
3637
+ gl_FragColor = vec4(color * noise, 1.0);
3638
+ }
3639
+ `
3640
+ );
3641
+ (0, import_fiber11.extend)({ NoiseMaterial });
3642
+ function NoiseField({ scale = 1, speed = 0.5, mode = "color" }) {
3643
+ const material = (0, import_react31.useMemo)(() => new NoiseMaterial(), []);
3644
+ (0, import_fiber11.useFrame)((state, delta) => {
3645
+ if (material) {
3646
+ material.time += delta * speed;
3647
+ material.scale = scale;
3648
+ }
3649
+ });
3650
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("mesh", { rotation: [-Math.PI / 2, 0, 0], children: [
3651
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("planeGeometry", { args: [10, 10, 64, 64] }),
3652
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("primitive", { object: material, attach: "material" })
3653
+ ] });
3654
+ }
3655
+ // Annotate the CommonJS export names for ESM import in node:
3656
+ 0 && (module.exports = {
3657
+ Accordion3D,
3658
+ AudioVisualizer,
3659
+ Badge,
3660
+ Badge3D,
3661
+ BarChart3D,
3662
+ Bloom,
3663
+ Breadcrumb,
3664
+ Button3D,
3665
+ Card3D,
3666
+ Container,
3667
+ Dialog,
3668
+ Fog,
3669
+ Gallery3D,
3670
+ GlowEffect,
3671
+ Graph3D,
3672
+ Grid,
3673
+ ImagePlane,
3674
+ Input,
3675
+ Input3D,
3676
+ LineChart3D,
3677
+ Map3D,
3678
+ Menu3D,
3679
+ Menu3DItem,
3680
+ Menu3DLabel,
3681
+ Menu3DSeparator,
3682
+ Modal3D,
3683
+ ModelViewer,
3684
+ NavBar3D,
3685
+ NoiseField,
3686
+ PageLayout,
3687
+ Pagination,
3688
+ Particles,
3689
+ PieChart3D,
3690
+ Popover,
3691
+ Progress,
3692
+ Progress3D,
3693
+ Reflection,
3694
+ ScatterPlot3D,
3695
+ Section,
3696
+ Select,
3697
+ Select3D,
3698
+ ShadowSystem,
3699
+ Sheet,
3700
+ Skeleton,
3701
+ Slider,
3702
+ Slider3D,
3703
+ Spinner3D,
3704
+ Stack,
3705
+ Stepper3D,
3706
+ Table,
3707
+ Tabs3D,
3708
+ Timeline3D,
3709
+ Toast,
3710
+ Toggle,
3711
+ Toggle3D,
3712
+ Tooltip,
3713
+ Tooltip3D,
3714
+ VideoPlane,
3715
+ WaveEffect
3716
+ });
3717
+ //# sourceMappingURL=index.cjs.map