@cupcodev/ui 6.1.2 → 7.0.0
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/README.md +22 -0
- package/dist/index.cjs +2003 -1544
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +1238 -785
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,282 +1,157 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
// src/components/cupcode/AccordionCupcode.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
8
|
-
import { ChevronDown } from "lucide-react";
|
|
9
|
-
|
|
10
|
-
// src/lib/utils.ts
|
|
11
|
-
import { clsx } from "clsx";
|
|
12
|
-
import { twMerge } from "tailwind-merge";
|
|
13
|
-
function cn(...inputs) {
|
|
14
|
-
return twMerge(clsx(inputs));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// src/components/cupcode/AccordionCupcode.tsx
|
|
18
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
var AccordionCupcode = AccordionPrimitive.Root;
|
|
20
|
-
var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
21
|
-
AccordionPrimitive.Item,
|
|
22
|
-
{
|
|
23
|
-
ref,
|
|
24
|
-
className: cn("glass rounded-xl mb-3 overflow-hidden", className),
|
|
25
|
-
...props
|
|
26
|
-
}
|
|
27
|
-
));
|
|
28
|
-
AccordionItem.displayName = "AccordionItem";
|
|
29
|
-
var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
30
|
-
AccordionPrimitive.Trigger,
|
|
31
|
-
{
|
|
32
|
-
ref,
|
|
33
|
-
className: cn(
|
|
34
|
-
"flex flex-1 items-center justify-between p-4 font-semibold text-foreground",
|
|
35
|
-
"transition-all hover:bg-cupcode-purple/5",
|
|
36
|
-
"[&[data-state=open]>svg]:rotate-180",
|
|
37
|
-
className
|
|
38
|
-
),
|
|
39
|
-
...props,
|
|
40
|
-
children: [
|
|
41
|
-
children,
|
|
42
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "h-5 w-5 shrink-0 text-cupcode-purple transition-transform duration-300" })
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
) }));
|
|
46
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
47
|
-
var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48
|
-
AccordionPrimitive.Content,
|
|
49
|
-
{
|
|
50
|
-
ref,
|
|
51
|
-
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
52
|
-
...props,
|
|
53
|
-
children: /* @__PURE__ */ jsx("div", { className: cn("px-4 pb-4 pt-0 text-muted-foreground", className), children })
|
|
54
|
-
}
|
|
55
|
-
));
|
|
56
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
57
|
-
|
|
58
|
-
// src/components/cupcode/AvatarCupcode.tsx
|
|
59
|
-
import * as React2 from "react";
|
|
60
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
61
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
62
|
-
var Avatar = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
63
|
-
AvatarPrimitive.Root,
|
|
64
|
-
{
|
|
65
|
-
ref,
|
|
66
|
-
className: cn(
|
|
67
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
68
|
-
"ring-2 ring-border ring-offset-2 ring-offset-background",
|
|
69
|
-
className
|
|
70
|
-
),
|
|
71
|
-
...props
|
|
72
|
-
}
|
|
73
|
-
));
|
|
74
|
-
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
75
|
-
var AvatarImage = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
76
|
-
AvatarPrimitive.Image,
|
|
77
|
-
{
|
|
78
|
-
ref,
|
|
79
|
-
className: cn("aspect-square h-full w-full object-cover", className),
|
|
80
|
-
...props
|
|
81
|
-
}
|
|
82
|
-
));
|
|
83
|
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
84
|
-
var AvatarFallback = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
85
|
-
AvatarPrimitive.Fallback,
|
|
86
|
-
{
|
|
87
|
-
ref,
|
|
88
|
-
className: cn(
|
|
89
|
-
"flex h-full w-full items-center justify-center rounded-full",
|
|
90
|
-
"bg-gradient-to-br from-cupcode-hover to-cupcode-purple",
|
|
91
|
-
"text-white font-semibold",
|
|
92
|
-
className
|
|
93
|
-
),
|
|
94
|
-
...props
|
|
95
|
-
}
|
|
96
|
-
));
|
|
97
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
98
|
-
var statusStyles = {
|
|
99
|
-
online: "bg-success",
|
|
100
|
-
offline: "bg-muted-foreground",
|
|
101
|
-
away: "bg-warning",
|
|
102
|
-
busy: "bg-destructive"
|
|
4
|
+
var __esm = (fn, res) => function __init() {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
103
6
|
};
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
lg: "h-14 w-14",
|
|
108
|
-
xl: "h-20 w-20"
|
|
109
|
-
};
|
|
110
|
-
var statusSizes = {
|
|
111
|
-
sm: "h-2 w-2",
|
|
112
|
-
md: "h-2.5 w-2.5",
|
|
113
|
-
lg: "h-3 w-3",
|
|
114
|
-
xl: "h-4 w-4"
|
|
115
|
-
};
|
|
116
|
-
var AvatarWithStatus = ({
|
|
117
|
-
src,
|
|
118
|
-
alt,
|
|
119
|
-
fallback,
|
|
120
|
-
status,
|
|
121
|
-
size = "md",
|
|
122
|
-
className
|
|
123
|
-
}) => {
|
|
124
|
-
return /* @__PURE__ */ jsxs2("div", { className: "relative inline-block", children: [
|
|
125
|
-
/* @__PURE__ */ jsxs2(Avatar, { className: cn(sizeClasses[size], className), children: [
|
|
126
|
-
/* @__PURE__ */ jsx2(AvatarImage, { src, alt }),
|
|
127
|
-
/* @__PURE__ */ jsx2(AvatarFallback, { children: fallback })
|
|
128
|
-
] }),
|
|
129
|
-
status && /* @__PURE__ */ jsx2(
|
|
130
|
-
"span",
|
|
131
|
-
{
|
|
132
|
-
className: cn(
|
|
133
|
-
"absolute bottom-0 right-0 block rounded-full ring-2 ring-background",
|
|
134
|
-
statusStyles[status],
|
|
135
|
-
statusSizes[size],
|
|
136
|
-
status === "online" && "animate-pulse"
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
] });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
141
10
|
};
|
|
11
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
142
12
|
|
|
143
13
|
// src/components/cupcode/BackgroundRainbow.tsx
|
|
14
|
+
var BackgroundRainbow_exports = {};
|
|
15
|
+
__export(BackgroundRainbow_exports, {
|
|
16
|
+
BackgroundRainbow: () => BackgroundRainbow
|
|
17
|
+
});
|
|
144
18
|
import { useEffect, useId, useMemo, useRef } from "react";
|
|
145
19
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
146
|
-
var BackgroundRainbow
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
window.removeEventListener("pointermove", onPointer);
|
|
240
|
-
document.removeEventListener("visibilitychange", onStateChange);
|
|
241
|
-
if (typeof prefersReducedMotion.removeEventListener === "function") {
|
|
242
|
-
prefersReducedMotion.removeEventListener("change", onStateChange);
|
|
243
|
-
} else {
|
|
244
|
-
prefersReducedMotion.removeListener(onStateChange);
|
|
245
|
-
}
|
|
246
|
-
observer.disconnect();
|
|
247
|
-
stop();
|
|
248
|
-
};
|
|
249
|
-
}, [config.easeFactor, config.snapDistance]);
|
|
250
|
-
return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: "fixed inset-0 z-0 overflow-hidden bg-white pointer-events-none dark:hidden", children: [
|
|
251
|
-
/* @__PURE__ */ jsx3("svg", { className: "hidden", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, focusable: "false", children: /* @__PURE__ */ jsx3("defs", { children: /* @__PURE__ */ jsxs3("filter", { id: filterId, children: [
|
|
252
|
-
/* @__PURE__ */ jsx3("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "10", result: "blur" }),
|
|
253
|
-
/* @__PURE__ */ jsx3(
|
|
254
|
-
"feColorMatrix",
|
|
255
|
-
{
|
|
256
|
-
in: "blur",
|
|
257
|
-
mode: "matrix",
|
|
258
|
-
values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -8",
|
|
259
|
-
result: "goo"
|
|
20
|
+
var BackgroundRainbow;
|
|
21
|
+
var init_BackgroundRainbow = __esm({
|
|
22
|
+
"src/components/cupcode/BackgroundRainbow.tsx"() {
|
|
23
|
+
"use strict";
|
|
24
|
+
BackgroundRainbow = () => {
|
|
25
|
+
const rootRef = useRef(null);
|
|
26
|
+
const interactiveRef = useRef(null);
|
|
27
|
+
const currentRef = useRef({ x: 0, y: 0 });
|
|
28
|
+
const targetRef = useRef({ x: 0, y: 0 });
|
|
29
|
+
const filterId = useId().replace(/:/g, "");
|
|
30
|
+
const config = useMemo(() => {
|
|
31
|
+
const nav = typeof navigator !== "undefined" ? navigator : null;
|
|
32
|
+
const lowMemory = !!nav && typeof nav.deviceMemory === "number" && nav.deviceMemory <= 4;
|
|
33
|
+
const lowCpu = !!nav && typeof nav.hardwareConcurrency === "number" && nav.hardwareConcurrency <= 4;
|
|
34
|
+
const lowPowerDevice = lowMemory || lowCpu;
|
|
35
|
+
return {
|
|
36
|
+
blur: lowPowerDevice ? 20 : 30,
|
|
37
|
+
interactiveOpacity: lowPowerDevice ? 0.54 : 0.7,
|
|
38
|
+
useGoo: !lowPowerDevice,
|
|
39
|
+
snapDistance: lowPowerDevice ? 2.5 : 1.5,
|
|
40
|
+
easeFactor: lowPowerDevice ? 7.5 : 10,
|
|
41
|
+
renderThirdBubble: !lowPowerDevice,
|
|
42
|
+
blendMode: lowPowerDevice ? "screen" : "hard-light"
|
|
43
|
+
};
|
|
44
|
+
}, []);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
const interactive = interactiveRef.current;
|
|
47
|
+
const root = rootRef.current;
|
|
48
|
+
if (!interactive || !root) return;
|
|
49
|
+
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
50
|
+
let raf = 0;
|
|
51
|
+
let running = false;
|
|
52
|
+
const stop = () => {
|
|
53
|
+
running = false;
|
|
54
|
+
if (raf) {
|
|
55
|
+
cancelAnimationFrame(raf);
|
|
56
|
+
raf = 0;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const updatePlayState = () => {
|
|
60
|
+
const enabled = !prefersReducedMotion.matches && !document.hidden;
|
|
61
|
+
root.style.setProperty("--cc-rainbow-play", enabled ? "running" : "paused");
|
|
62
|
+
if (!enabled) stop();
|
|
63
|
+
return enabled;
|
|
64
|
+
};
|
|
65
|
+
const applyTransform = () => {
|
|
66
|
+
const x = Math.round(currentRef.current.x);
|
|
67
|
+
const y = Math.round(currentRef.current.y);
|
|
68
|
+
interactive.style.transform = `translate3d(${x}px, ${y}px, 0)`;
|
|
69
|
+
};
|
|
70
|
+
const animate = () => {
|
|
71
|
+
if (!updatePlayState()) return;
|
|
72
|
+
currentRef.current.x += (targetRef.current.x - currentRef.current.x) / config.easeFactor;
|
|
73
|
+
currentRef.current.y += (targetRef.current.y - currentRef.current.y) / config.easeFactor;
|
|
74
|
+
applyTransform();
|
|
75
|
+
const dx = Math.abs(targetRef.current.x - currentRef.current.x);
|
|
76
|
+
const dy = Math.abs(targetRef.current.y - currentRef.current.y);
|
|
77
|
+
if (dx < config.snapDistance && dy < config.snapDistance) {
|
|
78
|
+
running = false;
|
|
79
|
+
raf = 0;
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
raf = requestAnimationFrame(animate);
|
|
83
|
+
};
|
|
84
|
+
const start = () => {
|
|
85
|
+
if (running) return;
|
|
86
|
+
if (!updatePlayState()) return;
|
|
87
|
+
running = true;
|
|
88
|
+
raf = requestAnimationFrame(animate);
|
|
89
|
+
};
|
|
90
|
+
const onPointer = (e) => {
|
|
91
|
+
if (!updatePlayState()) return;
|
|
92
|
+
targetRef.current.x = e.clientX;
|
|
93
|
+
targetRef.current.y = e.clientY;
|
|
94
|
+
start();
|
|
95
|
+
};
|
|
96
|
+
const onStateChange = () => {
|
|
97
|
+
updatePlayState();
|
|
98
|
+
};
|
|
99
|
+
const centerX = window.innerWidth / 2;
|
|
100
|
+
const centerY = window.innerHeight / 2;
|
|
101
|
+
currentRef.current.x = centerX;
|
|
102
|
+
currentRef.current.y = centerY;
|
|
103
|
+
targetRef.current.x = centerX;
|
|
104
|
+
targetRef.current.y = centerY;
|
|
105
|
+
applyTransform();
|
|
106
|
+
updatePlayState();
|
|
107
|
+
window.addEventListener("pointermove", onPointer, { passive: true });
|
|
108
|
+
document.addEventListener("visibilitychange", onStateChange);
|
|
109
|
+
if (typeof prefersReducedMotion.addEventListener === "function") {
|
|
110
|
+
prefersReducedMotion.addEventListener("change", onStateChange);
|
|
111
|
+
} else {
|
|
112
|
+
prefersReducedMotion.addListener(onStateChange);
|
|
260
113
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
/* @__PURE__ */ jsx3(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
114
|
+
return () => {
|
|
115
|
+
window.removeEventListener("pointermove", onPointer);
|
|
116
|
+
document.removeEventListener("visibilitychange", onStateChange);
|
|
117
|
+
if (typeof prefersReducedMotion.removeEventListener === "function") {
|
|
118
|
+
prefersReducedMotion.removeEventListener("change", onStateChange);
|
|
119
|
+
} else {
|
|
120
|
+
prefersReducedMotion.removeListener(onStateChange);
|
|
121
|
+
}
|
|
122
|
+
stop();
|
|
123
|
+
};
|
|
124
|
+
}, [config.easeFactor, config.snapDistance]);
|
|
125
|
+
return /* @__PURE__ */ jsxs3("div", { ref: rootRef, className: "fixed inset-0 z-0 overflow-hidden bg-white pointer-events-none dark:hidden", children: [
|
|
126
|
+
/* @__PURE__ */ jsx3("svg", { className: "hidden", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, focusable: "false", children: /* @__PURE__ */ jsx3("defs", { children: /* @__PURE__ */ jsxs3("filter", { id: filterId, children: [
|
|
127
|
+
/* @__PURE__ */ jsx3("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "10", result: "blur" }),
|
|
128
|
+
/* @__PURE__ */ jsx3(
|
|
129
|
+
"feColorMatrix",
|
|
130
|
+
{
|
|
131
|
+
in: "blur",
|
|
132
|
+
mode: "matrix",
|
|
133
|
+
values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -8",
|
|
134
|
+
result: "goo"
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ jsx3("feBlend", { in: "SourceGraphic", in2: "goo" })
|
|
138
|
+
] }) }) }),
|
|
139
|
+
/* @__PURE__ */ jsxs3(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
className: "absolute inset-0 cc-rainbow-layer",
|
|
143
|
+
style: {
|
|
144
|
+
filter: config.useGoo ? `url(#${filterId}) blur(${config.blur}px)` : `blur(${config.blur}px)`
|
|
145
|
+
},
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx3("div", { className: "cc-rainbow-bubble cc-rainbow-a cc-rainbow-g1" }),
|
|
148
|
+
/* @__PURE__ */ jsx3("div", { className: "cc-rainbow-bubble cc-rainbow-b cc-rainbow-g2" }),
|
|
149
|
+
config.renderThirdBubble ? /* @__PURE__ */ jsx3("div", { className: "cc-rainbow-bubble cc-rainbow-a cc-rainbow-g3" }) : null,
|
|
150
|
+
/* @__PURE__ */ jsx3("div", { ref: interactiveRef, className: "cc-rainbow-bubble cc-rainbow-b cc-rainbow-interactive" })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ jsx3("style", { children: `
|
|
280
155
|
.cc-rainbow-layer {
|
|
281
156
|
contain: paint;
|
|
282
157
|
}
|
|
@@ -361,21 +236,35 @@ var BackgroundRainbow = () => {
|
|
|
361
236
|
}
|
|
362
237
|
}
|
|
363
238
|
` })
|
|
364
|
-
|
|
365
|
-
};
|
|
239
|
+
] });
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
});
|
|
366
243
|
|
|
367
244
|
// src/components/cupcode/BackgroundStars.tsx
|
|
245
|
+
var BackgroundStars_exports = {};
|
|
246
|
+
__export(BackgroundStars_exports, {
|
|
247
|
+
BackgroundStars: () => BackgroundStars,
|
|
248
|
+
default: () => BackgroundStars_default
|
|
249
|
+
});
|
|
368
250
|
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
369
251
|
import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
370
|
-
var TWO_PI = Math.PI * 2;
|
|
371
|
-
var rand = (a, b) => a + Math.random() * (b - a);
|
|
372
|
-
var choice = (arr) => arr[Math.random() * arr.length | 0];
|
|
373
252
|
function createCanvas(width, height) {
|
|
374
253
|
const canvas = document.createElement("canvas");
|
|
375
254
|
canvas.width = Math.max(1, Math.floor(width));
|
|
376
255
|
canvas.height = Math.max(1, Math.floor(height));
|
|
377
256
|
return canvas;
|
|
378
257
|
}
|
|
258
|
+
function dprFromPixelBudget(width, height, pixelBudget, minDpr, maxDpr) {
|
|
259
|
+
const area = Math.max(1, width * height);
|
|
260
|
+
const dpr = Math.sqrt(pixelBudget / area);
|
|
261
|
+
return clamp(dpr, minDpr, maxDpr);
|
|
262
|
+
}
|
|
263
|
+
function scaleFromPixelBudget(width, height, pixelBudget, minScale, maxScale) {
|
|
264
|
+
const area = Math.max(1, width * height);
|
|
265
|
+
const scale = Math.sqrt(pixelBudget / area);
|
|
266
|
+
return clamp(scale, minScale, maxScale);
|
|
267
|
+
}
|
|
379
268
|
function createStarBaseSprite(size) {
|
|
380
269
|
const canvas = createCanvas(size, size);
|
|
381
270
|
const ctx = canvas.getContext("2d");
|
|
@@ -424,8 +313,8 @@ function createFlareSprite(size) {
|
|
|
424
313
|
const centerY = size / 2;
|
|
425
314
|
const gradient = ctx.createLinearGradient(0, centerY, canvas.width, centerY);
|
|
426
315
|
gradient.addColorStop(0, "rgba(0,0,0,0)");
|
|
427
|
-
gradient.addColorStop(0.44, "rgba(41,5,40,0.
|
|
428
|
-
gradient.addColorStop(0.56, "rgba(41,5,40,0.
|
|
316
|
+
gradient.addColorStop(0.44, "rgba(41,5,40,0.84)");
|
|
317
|
+
gradient.addColorStop(0.56, "rgba(41,5,40,0.84)");
|
|
429
318
|
gradient.addColorStop(1, "rgba(0,0,0,0)");
|
|
430
319
|
ctx.fillStyle = gradient;
|
|
431
320
|
ctx.fillRect(0, (size - 4) / 2, canvas.width, 4);
|
|
@@ -457,21 +346,14 @@ function createCometHeadSprite(size) {
|
|
|
457
346
|
const ctx = canvas.getContext("2d");
|
|
458
347
|
if (!ctx) return canvas;
|
|
459
348
|
const half = size / 2;
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
ctx.fillStyle =
|
|
349
|
+
const outer = ctx.createRadialGradient(half, half, 0, half, half, half);
|
|
350
|
+
outer.addColorStop(0, "rgba(255,255,255,0.96)");
|
|
351
|
+
outer.addColorStop(0.35, "rgba(151,90,182,0.72)");
|
|
352
|
+
outer.addColorStop(1, "rgba(0,0,0,0)");
|
|
353
|
+
ctx.fillStyle = outer;
|
|
465
354
|
ctx.beginPath();
|
|
466
355
|
ctx.arc(half, half, half, 0, TWO_PI);
|
|
467
356
|
ctx.fill();
|
|
468
|
-
const glowB = ctx.createRadialGradient(half, half, 0, half, half, half * 0.56);
|
|
469
|
-
glowB.addColorStop(0, "rgba(255,255,255,0.95)");
|
|
470
|
-
glowB.addColorStop(1, "rgba(0,0,0,0)");
|
|
471
|
-
ctx.fillStyle = glowB;
|
|
472
|
-
ctx.beginPath();
|
|
473
|
-
ctx.arc(half, half, half * 0.56, 0, TWO_PI);
|
|
474
|
-
ctx.fill();
|
|
475
357
|
return canvas;
|
|
476
358
|
}
|
|
477
359
|
function createCometTailSprite(width, height) {
|
|
@@ -481,59 +363,37 @@ function createCometTailSprite(width, height) {
|
|
|
481
363
|
const center = height / 2;
|
|
482
364
|
const gradient = ctx.createLinearGradient(0, center, width, center);
|
|
483
365
|
gradient.addColorStop(0, "rgba(0,0,0,0)");
|
|
484
|
-
gradient.addColorStop(0.
|
|
485
|
-
gradient.addColorStop(
|
|
486
|
-
gradient.addColorStop(1, "rgba(255,255,255,0.96)");
|
|
366
|
+
gradient.addColorStop(0.5, "rgba(124,91,187,0.52)");
|
|
367
|
+
gradient.addColorStop(1, "rgba(255,255,255,0.94)");
|
|
487
368
|
ctx.fillStyle = gradient;
|
|
488
369
|
ctx.fillRect(0, center - 1, width, 2);
|
|
489
370
|
return canvas;
|
|
490
371
|
}
|
|
491
|
-
function
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
372
|
+
function setCanvasDisplaySize(canvas, width, height, dpr) {
|
|
373
|
+
canvas.width = Math.max(1, Math.floor(width * dpr));
|
|
374
|
+
canvas.height = Math.max(1, Math.floor(height * dpr));
|
|
375
|
+
canvas.style.width = `${width}px`;
|
|
376
|
+
canvas.style.height = `${height}px`;
|
|
495
377
|
}
|
|
496
378
|
function BackgroundStars() {
|
|
497
379
|
const nebulaRef = useRef2(null);
|
|
498
|
-
const
|
|
380
|
+
const staticStarsRef = useRef2(null);
|
|
381
|
+
const fxStarsRef = useRef2(null);
|
|
499
382
|
useEffect2(() => {
|
|
500
383
|
const nebulaCanvas = nebulaRef.current;
|
|
501
|
-
const
|
|
502
|
-
|
|
384
|
+
const staticCanvas = staticStarsRef.current;
|
|
385
|
+
const fxCanvas = fxStarsRef.current;
|
|
386
|
+
if (!nebulaCanvas || !staticCanvas || !fxCanvas) return;
|
|
503
387
|
const nebulaCtx = nebulaCanvas.getContext("2d", { alpha: true, desynchronized: true });
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
const height = window.innerHeight;
|
|
388
|
+
const staticCtx = staticCanvas.getContext("2d", { alpha: true, desynchronized: true });
|
|
389
|
+
const fxCtx = fxCanvas.getContext("2d", { alpha: true, desynchronized: true });
|
|
390
|
+
if (!nebulaCtx || !staticCtx || !fxCtx) return;
|
|
508
391
|
const nav = navigator;
|
|
509
392
|
const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
510
393
|
const lowMemory = typeof nav.deviceMemory === "number" && nav.deviceMemory <= 4;
|
|
511
394
|
const lowCpu = typeof nav.hardwareConcurrency === "number" && nav.hardwareConcurrency <= 4;
|
|
512
395
|
const lowPowerDevice = lowMemory || lowCpu;
|
|
513
|
-
const nebulaScale = lowPowerDevice ? 0.48 : 0.62;
|
|
514
|
-
const nebulaWidth = Math.max(1, Math.floor(width * nebulaScale));
|
|
515
|
-
const nebulaHeight = Math.max(1, Math.floor(height * nebulaScale));
|
|
516
|
-
nebulaCanvas.width = nebulaWidth;
|
|
517
|
-
nebulaCanvas.height = nebulaHeight;
|
|
518
|
-
nebulaCanvas.style.width = `${width}px`;
|
|
519
|
-
nebulaCanvas.style.height = `${height}px`;
|
|
520
|
-
starsCanvas.width = width;
|
|
521
|
-
starsCanvas.height = height;
|
|
522
|
-
starsCanvas.style.width = `${width}px`;
|
|
523
|
-
starsCanvas.style.height = `${height}px`;
|
|
524
396
|
const palette = ["#ffffff", "#d7c8ff", "#7c5bbb", "#b146ea", "#975ab6", "#ff8ad1"];
|
|
525
|
-
const starSpriteSize = 96;
|
|
526
|
-
const halfStarSprite = starSpriteSize / 2;
|
|
527
|
-
const starBaseSprite = createStarBaseSprite(starSpriteSize);
|
|
528
|
-
const starSprites = /* @__PURE__ */ new Map();
|
|
529
|
-
for (const color of palette) {
|
|
530
|
-
starSprites.set(color, tintSprite(starBaseSprite, color));
|
|
531
|
-
}
|
|
532
|
-
const flareSprite = createFlareSprite(starSpriteSize);
|
|
533
|
-
const haloPink = createHaloSprite(160, "rgba(251,88,235,0.68)");
|
|
534
|
-
const haloPurple = createHaloSprite(160, "rgba(151,90,182,0.6)");
|
|
535
|
-
const haloIndigo = createHaloSprite(160, "rgba(124,91,187,0.54)");
|
|
536
|
-
const haloGlow = createHaloSprite(140, "rgba(151,90,182,0.32)");
|
|
537
397
|
const cloudColors = [
|
|
538
398
|
"rgba(65,105,225,0.18)",
|
|
539
399
|
"rgba(138,43,226,0.17)",
|
|
@@ -542,96 +402,81 @@ function BackgroundStars() {
|
|
|
542
402
|
"rgba(147,112,219,0.17)",
|
|
543
403
|
"rgba(218,112,214,0.16)"
|
|
544
404
|
];
|
|
405
|
+
const starSpriteSize = 96;
|
|
406
|
+
const starBaseSprite = createStarBaseSprite(starSpriteSize);
|
|
407
|
+
const starSprites = /* @__PURE__ */ new Map();
|
|
408
|
+
for (const color of palette) {
|
|
409
|
+
starSprites.set(color, tintSprite(starBaseSprite, color));
|
|
410
|
+
}
|
|
411
|
+
const haloSoft = createHaloSprite(160, "rgba(151,90,182,0.52)");
|
|
412
|
+
const haloPulse = createHaloSprite(192, "rgba(251,88,235,0.56)");
|
|
413
|
+
const flareSprite = createFlareSprite(starSpriteSize);
|
|
545
414
|
const cloudSprites = /* @__PURE__ */ new Map();
|
|
546
415
|
for (const color of cloudColors) {
|
|
547
416
|
cloudSprites.set(color, createCloudSprite(256, color));
|
|
548
417
|
}
|
|
549
|
-
const
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
driftDx: rand(-6e-3, 6e-3) * width,
|
|
603
|
-
driftDy: rand(-6e-3, 6e-3) * height,
|
|
604
|
-
driftInvDur: 1 / rand(5e4, 9e4),
|
|
605
|
-
scaleTo: rand(0.9, 1.12),
|
|
606
|
-
baseOpacity: rand(0.82, 1),
|
|
607
|
-
intensity: rand(0.95, 1.5),
|
|
608
|
-
twinkleFreq: TWO_PI / twinkleDur,
|
|
609
|
-
twinkleDelay: rand(0, 24e3),
|
|
610
|
-
sparkInvDur: 1 / sparkDur,
|
|
611
|
-
sparkDelay: rand(0, 1200),
|
|
612
|
-
phase: Math.random() * TWO_PI
|
|
613
|
-
};
|
|
614
|
-
});
|
|
615
|
-
const cometHeadSprite = createCometHeadSprite(90);
|
|
616
|
-
const cometTailSprite = createCometTailSprite(256, 8);
|
|
617
|
-
const comets = [];
|
|
618
|
-
const spawnComet = (now) => {
|
|
619
|
-
comets.push({
|
|
620
|
-
x: Math.random() * width,
|
|
621
|
-
y: Math.random() * height,
|
|
622
|
-
angle: Math.random() * TWO_PI,
|
|
623
|
-
len: rand(80, 160),
|
|
624
|
-
t0: now,
|
|
625
|
-
dur: rand(1400, 2200)
|
|
626
|
-
});
|
|
418
|
+
const cometHeadSprite = createCometHeadSprite(84);
|
|
419
|
+
const cometTailSprite = createCometTailSprite(228, 8);
|
|
420
|
+
const maxQualityLevel = lowPowerDevice ? 1 : QUALITY_PROFILES.length - 1;
|
|
421
|
+
let qualityLevel = maxQualityLevel;
|
|
422
|
+
let profile = QUALITY_PROFILES[qualityLevel];
|
|
423
|
+
let width = 0;
|
|
424
|
+
let height = 0;
|
|
425
|
+
let staticDpr = 1;
|
|
426
|
+
let fxDpr = 1;
|
|
427
|
+
let nebulaScale = lowPowerDevice ? 0.46 : 0.58;
|
|
428
|
+
let nebulaWidth = 1;
|
|
429
|
+
let nebulaHeight = 1;
|
|
430
|
+
let staticStars = [];
|
|
431
|
+
let dynamicStars = [];
|
|
432
|
+
let clouds = [];
|
|
433
|
+
let comets = [];
|
|
434
|
+
let nebulaBackdrop = createCanvas(1, 1);
|
|
435
|
+
let nextCometAt = 0;
|
|
436
|
+
const nextCometDelay = () => rand(profile.cometMinMs, profile.cometMaxMs);
|
|
437
|
+
const clearFx = () => {
|
|
438
|
+
fxCtx.setTransform(fxDpr, 0, 0, fxDpr, 0, 0);
|
|
439
|
+
fxCtx.clearRect(0, 0, width, height);
|
|
440
|
+
};
|
|
441
|
+
const clearNebula = () => {
|
|
442
|
+
nebulaCtx.setTransform(1, 0, 0, 1, 0, 0);
|
|
443
|
+
nebulaCtx.clearRect(0, 0, nebulaWidth, nebulaHeight);
|
|
444
|
+
};
|
|
445
|
+
const drawStaticStars = () => {
|
|
446
|
+
staticCtx.setTransform(staticDpr, 0, 0, staticDpr, 0, 0);
|
|
447
|
+
staticCtx.clearRect(0, 0, width, height);
|
|
448
|
+
staticCtx.globalCompositeOperation = "screen";
|
|
449
|
+
for (const star of staticStars) {
|
|
450
|
+
const size = star.size;
|
|
451
|
+
const half = size / 2;
|
|
452
|
+
staticCtx.globalAlpha = star.alpha;
|
|
453
|
+
staticCtx.drawImage(star.sprite, star.x - half, star.y - half, size, size);
|
|
454
|
+
const haloRadius = size * star.haloScale;
|
|
455
|
+
staticCtx.globalAlpha = star.alpha * 0.48;
|
|
456
|
+
staticCtx.drawImage(haloSoft, star.x - haloRadius, star.y - haloRadius, haloRadius * 2, haloRadius * 2);
|
|
457
|
+
if (star.isHighlight) {
|
|
458
|
+
const flareWidth = size * 5.2;
|
|
459
|
+
const flareHeight = size * 1.25;
|
|
460
|
+
staticCtx.globalAlpha = star.alpha * 0.22;
|
|
461
|
+
staticCtx.drawImage(flareSprite, star.x - flareWidth / 2, star.y - flareHeight / 2, flareWidth, flareHeight);
|
|
462
|
+
staticCtx.save();
|
|
463
|
+
staticCtx.translate(star.x, star.y);
|
|
464
|
+
staticCtx.rotate(Math.PI / 2);
|
|
465
|
+
staticCtx.drawImage(flareSprite, -flareWidth / 2, -flareHeight / 2, flareWidth, flareHeight);
|
|
466
|
+
staticCtx.restore();
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
staticCtx.globalAlpha = 1;
|
|
470
|
+
staticCtx.globalCompositeOperation = "source-over";
|
|
627
471
|
};
|
|
628
472
|
const drawNebula = (now) => {
|
|
473
|
+
nebulaCtx.setTransform(1, 0, 0, 1, 0, 0);
|
|
629
474
|
nebulaCtx.clearRect(0, 0, nebulaWidth, nebulaHeight);
|
|
630
475
|
nebulaCtx.drawImage(nebulaBackdrop, 0, 0);
|
|
631
476
|
nebulaCtx.globalCompositeOperation = "screen";
|
|
632
477
|
for (const cloud of clouds) {
|
|
633
478
|
cloud.angle += cloud.speed;
|
|
634
|
-
const pulse = 1 + cloud.pulseAmp * Math.sin(now *
|
|
479
|
+
const pulse = 1 + cloud.pulseAmp * Math.sin(now * 18e-5 + cloud.pulsePhase);
|
|
635
480
|
const radius = cloud.size * pulse;
|
|
636
481
|
nebulaCtx.save();
|
|
637
482
|
nebulaCtx.translate(cloud.x, cloud.y);
|
|
@@ -643,79 +488,208 @@ function BackgroundStars() {
|
|
|
643
488
|
nebulaCtx.globalCompositeOperation = "source-over";
|
|
644
489
|
nebulaCtx.globalAlpha = 1;
|
|
645
490
|
};
|
|
491
|
+
const drawDynamicStars = (now) => {
|
|
492
|
+
fxCtx.setTransform(fxDpr, 0, 0, fxDpr, 0, 0);
|
|
493
|
+
fxCtx.clearRect(0, 0, width, height);
|
|
494
|
+
fxCtx.globalCompositeOperation = "screen";
|
|
495
|
+
for (const star of dynamicStars) {
|
|
496
|
+
const drift = now * star.driftInvDur % 1;
|
|
497
|
+
const x = star.x + star.driftDx * drift;
|
|
498
|
+
const y = star.y + star.driftDy * drift;
|
|
499
|
+
const twinkle = (Math.sin((now + star.twinkleDelay) * star.twinkleFreq + star.phase) + 1) * 0.5;
|
|
500
|
+
const sparkCycle = (now + star.sparkDelay) * star.sparkInvDur % 1;
|
|
501
|
+
const sparkBoost = sparkCycle < 0.15 ? sparkCycle / 0.15 : sparkCycle < 0.4 ? 1 - (sparkCycle - 0.15) / 0.25 : 0;
|
|
502
|
+
const size = star.size * (0.92 + twinkle * profile.twinkleBoost + sparkBoost * 0.12);
|
|
503
|
+
const alpha = star.baseOpacity * (0.58 + twinkle * 0.42);
|
|
504
|
+
const half = size / 2;
|
|
505
|
+
fxCtx.globalAlpha = alpha;
|
|
506
|
+
fxCtx.drawImage(star.sprite, x - half, y - half, size, size);
|
|
507
|
+
const haloRadius = size * (star.haloScale + sparkBoost * 1.8) * profile.haloBoost;
|
|
508
|
+
fxCtx.globalAlpha = alpha * 0.42;
|
|
509
|
+
fxCtx.drawImage(haloPulse, x - haloRadius, y - haloRadius, haloRadius * 2, haloRadius * 2);
|
|
510
|
+
if (profile.dynamicFlares && star.isHighlight) {
|
|
511
|
+
const flareWidth = size * 5.8;
|
|
512
|
+
const flareHeight = size * 1.25;
|
|
513
|
+
fxCtx.globalAlpha = alpha * (0.18 + sparkBoost * 0.35);
|
|
514
|
+
fxCtx.drawImage(flareSprite, x - flareWidth / 2, y - flareHeight / 2, flareWidth, flareHeight);
|
|
515
|
+
fxCtx.save();
|
|
516
|
+
fxCtx.translate(x, y);
|
|
517
|
+
fxCtx.rotate(Math.PI / 2);
|
|
518
|
+
fxCtx.drawImage(flareSprite, -flareWidth / 2, -flareHeight / 2, flareWidth, flareHeight);
|
|
519
|
+
fxCtx.restore();
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
fxCtx.globalAlpha = 1;
|
|
523
|
+
fxCtx.globalCompositeOperation = "source-over";
|
|
524
|
+
};
|
|
646
525
|
const drawComets = (now) => {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
526
|
+
if (!comets.length) return;
|
|
527
|
+
fxCtx.globalCompositeOperation = "screen";
|
|
528
|
+
for (let index = comets.length - 1; index >= 0; index -= 1) {
|
|
529
|
+
const comet = comets[index];
|
|
530
|
+
const progress = (now - comet.t0) / comet.dur;
|
|
531
|
+
if (progress >= 1) {
|
|
532
|
+
comets.splice(index, 1);
|
|
652
533
|
continue;
|
|
653
534
|
}
|
|
654
|
-
const ease =
|
|
655
|
-
const dx = Math.cos(comet.angle) * comet.len * 6.
|
|
656
|
-
const dy = Math.sin(comet.angle) * comet.len * 6.
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
535
|
+
const ease = progress < 0.5 ? progress * 2 : 1 - (progress - 0.5) * 2;
|
|
536
|
+
const dx = Math.cos(comet.angle) * comet.len * 6.2 * progress;
|
|
537
|
+
const dy = Math.sin(comet.angle) * comet.len * 6.2 * progress;
|
|
538
|
+
fxCtx.save();
|
|
539
|
+
fxCtx.translate(comet.x + dx, comet.y + dy);
|
|
540
|
+
fxCtx.rotate(comet.angle);
|
|
541
|
+
fxCtx.globalAlpha = 0.24 + 0.7 * ease;
|
|
542
|
+
fxCtx.drawImage(cometHeadSprite, -12, -12, 24, 24);
|
|
543
|
+
fxCtx.globalAlpha = 0.2 + 0.58 * ease;
|
|
544
|
+
fxCtx.drawImage(cometTailSprite, -comet.len, -3, comet.len, 6);
|
|
545
|
+
fxCtx.restore();
|
|
546
|
+
}
|
|
547
|
+
fxCtx.globalAlpha = 1;
|
|
548
|
+
fxCtx.globalCompositeOperation = "source-over";
|
|
668
549
|
};
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
550
|
+
const spawnComet = (now) => {
|
|
551
|
+
if (profile.maxComets <= 0) return;
|
|
552
|
+
if (comets.length >= profile.maxComets) return;
|
|
553
|
+
comets.push({
|
|
554
|
+
x: Math.random() * width,
|
|
555
|
+
y: Math.random() * height,
|
|
556
|
+
angle: Math.random() * TWO_PI,
|
|
557
|
+
len: rand(72, 150),
|
|
558
|
+
t0: now,
|
|
559
|
+
dur: rand(1300, 2100)
|
|
560
|
+
});
|
|
561
|
+
};
|
|
562
|
+
const buildScene = () => {
|
|
563
|
+
width = Math.max(1, window.innerWidth);
|
|
564
|
+
height = Math.max(1, window.innerHeight);
|
|
565
|
+
const deviceDpr = window.devicePixelRatio || 1;
|
|
566
|
+
staticDpr = dprFromPixelBudget(
|
|
567
|
+
width,
|
|
568
|
+
height,
|
|
569
|
+
profile.staticPixelBudget,
|
|
570
|
+
lowPowerDevice ? 0.36 : 0.44,
|
|
571
|
+
Math.min(deviceDpr, 0.85)
|
|
572
|
+
);
|
|
573
|
+
fxDpr = dprFromPixelBudget(
|
|
574
|
+
width,
|
|
575
|
+
height,
|
|
576
|
+
profile.fxPixelBudget,
|
|
577
|
+
lowPowerDevice ? 0.44 : 0.52,
|
|
578
|
+
Math.min(deviceDpr, 0.95)
|
|
579
|
+
);
|
|
580
|
+
setCanvasDisplaySize(staticCanvas, width, height, staticDpr);
|
|
581
|
+
setCanvasDisplaySize(fxCanvas, width, height, fxDpr);
|
|
582
|
+
nebulaScale = scaleFromPixelBudget(
|
|
583
|
+
width,
|
|
584
|
+
height,
|
|
585
|
+
profile.nebulaPixelBudget,
|
|
586
|
+
lowPowerDevice ? 0.32 : 0.38,
|
|
587
|
+
0.62
|
|
588
|
+
);
|
|
589
|
+
nebulaWidth = Math.max(1, Math.floor(width * nebulaScale));
|
|
590
|
+
nebulaHeight = Math.max(1, Math.floor(height * nebulaScale));
|
|
591
|
+
nebulaCanvas.width = nebulaWidth;
|
|
592
|
+
nebulaCanvas.height = nebulaHeight;
|
|
593
|
+
nebulaCanvas.style.width = `${width}px`;
|
|
594
|
+
nebulaCanvas.style.height = `${height}px`;
|
|
595
|
+
staticCtx.setTransform(staticDpr, 0, 0, staticDpr, 0, 0);
|
|
596
|
+
fxCtx.setTransform(fxDpr, 0, 0, fxDpr, 0, 0);
|
|
597
|
+
nebulaCtx.setTransform(1, 0, 0, 1, 0, 0);
|
|
598
|
+
const areaFactor = Math.min(1.25, width * height / (1920 * 1080));
|
|
599
|
+
const totalStarsBase = lowPowerDevice ? 100 : 166;
|
|
600
|
+
const totalStars = Math.max(72, Math.min(210, Math.round(totalStarsBase * areaFactor)));
|
|
601
|
+
const dynamicCount = Math.max(10, Math.round(totalStars * profile.dynamicRatio));
|
|
602
|
+
staticStars = [];
|
|
603
|
+
dynamicStars = [];
|
|
604
|
+
comets = [];
|
|
605
|
+
for (let i = 0; i < totalStars; i += 1) {
|
|
606
|
+
const bucket = Math.random();
|
|
607
|
+
const isHighlight = bucket > 0.965;
|
|
608
|
+
const size = Math.max(
|
|
609
|
+
0.8,
|
|
610
|
+
(bucket < 0.24 ? rand(0.35, 0.95) : bucket < 0.95 ? rand(0.6, 1.75) : rand(1.8, 3)) * (width * 1e-3)
|
|
611
|
+
);
|
|
612
|
+
const color = choice(palette);
|
|
613
|
+
const alpha = rand(0.76, 0.98);
|
|
614
|
+
const base = {
|
|
615
|
+
x: Math.random() * width,
|
|
616
|
+
y: Math.random() * height,
|
|
617
|
+
size,
|
|
618
|
+
sprite: starSprites.get(color),
|
|
619
|
+
isHighlight
|
|
620
|
+
};
|
|
621
|
+
if (dynamicStars.length < dynamicCount && Math.random() > 0.32) {
|
|
622
|
+
const twinkleDur = rand(5500, 26e3);
|
|
623
|
+
const sparkDur = rand(760, 1300);
|
|
624
|
+
dynamicStars.push({
|
|
625
|
+
...base,
|
|
626
|
+
baseOpacity: alpha,
|
|
627
|
+
driftDx: rand(-5e-3, 5e-3) * width,
|
|
628
|
+
driftDy: rand(-5e-3, 5e-3) * height,
|
|
629
|
+
driftInvDur: 1 / rand(52e3, 96e3),
|
|
630
|
+
twinkleFreq: TWO_PI / twinkleDur,
|
|
631
|
+
twinkleDelay: rand(0, 2e4),
|
|
632
|
+
sparkInvDur: 1 / sparkDur,
|
|
633
|
+
sparkDelay: rand(0, 1100),
|
|
634
|
+
phase: Math.random() * TWO_PI,
|
|
635
|
+
haloScale: rand(2.2, 3.8)
|
|
636
|
+
});
|
|
637
|
+
} else {
|
|
638
|
+
staticStars.push({
|
|
639
|
+
...base,
|
|
640
|
+
alpha,
|
|
641
|
+
haloScale: rand(2.1, 3.6)
|
|
642
|
+
});
|
|
700
643
|
}
|
|
701
|
-
starsCtx.restore();
|
|
702
644
|
}
|
|
703
|
-
|
|
645
|
+
const cloudCount = lowPowerDevice ? Math.min(profile.cloudCount, 4) : profile.cloudCount;
|
|
646
|
+
clouds = Array.from({ length: cloudCount }).map(() => {
|
|
647
|
+
const color = choice(cloudColors);
|
|
648
|
+
return {
|
|
649
|
+
x: Math.random() * nebulaWidth,
|
|
650
|
+
y: Math.random() * nebulaHeight,
|
|
651
|
+
size: rand(90, 220),
|
|
652
|
+
alpha: rand(0.64, 0.95),
|
|
653
|
+
sprite: cloudSprites.get(color),
|
|
654
|
+
angle: Math.random() * TWO_PI,
|
|
655
|
+
speed: rand(-36e-5, 36e-5),
|
|
656
|
+
pulseAmp: rand(0.02, 0.07),
|
|
657
|
+
pulsePhase: Math.random() * TWO_PI
|
|
658
|
+
};
|
|
659
|
+
});
|
|
660
|
+
nebulaBackdrop = createCanvas(nebulaWidth, nebulaHeight);
|
|
661
|
+
const backdropCtx = nebulaBackdrop.getContext("2d");
|
|
662
|
+
if (backdropCtx) {
|
|
663
|
+
const bg = backdropCtx.createRadialGradient(
|
|
664
|
+
nebulaWidth / 2,
|
|
665
|
+
nebulaHeight / 2,
|
|
666
|
+
0,
|
|
667
|
+
nebulaWidth / 2,
|
|
668
|
+
nebulaHeight / 2,
|
|
669
|
+
Math.max(nebulaWidth, nebulaHeight) / 1.5
|
|
670
|
+
);
|
|
671
|
+
bg.addColorStop(0, "#0c0d1d");
|
|
672
|
+
bg.addColorStop(1, "#000000");
|
|
673
|
+
backdropCtx.fillStyle = bg;
|
|
674
|
+
backdropCtx.fillRect(0, 0, nebulaWidth, nebulaHeight);
|
|
675
|
+
}
|
|
676
|
+
nextCometAt = performance.now() + nextCometDelay();
|
|
677
|
+
drawNebula(performance.now());
|
|
678
|
+
drawStaticStars();
|
|
679
|
+
clearFx();
|
|
704
680
|
};
|
|
681
|
+
buildScene();
|
|
705
682
|
let raf = 0;
|
|
683
|
+
let resizeRaf = 0;
|
|
706
684
|
let running = false;
|
|
707
685
|
let disposed = false;
|
|
708
686
|
let lastFrame = 0;
|
|
709
687
|
let lastNebulaFrame = 0;
|
|
710
|
-
let
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
const
|
|
715
|
-
starsCtx.clearRect(0, 0, width, height);
|
|
716
|
-
nebulaCtx.clearRect(0, 0, nebulaWidth, nebulaHeight);
|
|
717
|
-
};
|
|
718
|
-
const shouldRun = () => !reducedMotion && !document.hidden && isDarkMode();
|
|
688
|
+
let avgFrameMs = profile.minFrameMs;
|
|
689
|
+
let slowFrameScore = 0;
|
|
690
|
+
let fastFrameScore = 0;
|
|
691
|
+
let qualityCooldownUntil = performance.now() + 2400;
|
|
692
|
+
const shouldRun = () => !reducedMotion && !document.hidden;
|
|
719
693
|
const stop = () => {
|
|
720
694
|
running = false;
|
|
721
695
|
if (raf) {
|
|
@@ -723,21 +697,67 @@ function BackgroundStars() {
|
|
|
723
697
|
raf = 0;
|
|
724
698
|
}
|
|
725
699
|
};
|
|
700
|
+
const scheduleRebuild = () => {
|
|
701
|
+
if (resizeRaf) cancelAnimationFrame(resizeRaf);
|
|
702
|
+
resizeRaf = requestAnimationFrame(() => {
|
|
703
|
+
resizeRaf = 0;
|
|
704
|
+
buildScene();
|
|
705
|
+
if (shouldRun() && !running) {
|
|
706
|
+
running = true;
|
|
707
|
+
lastFrame = 0;
|
|
708
|
+
lastNebulaFrame = 0;
|
|
709
|
+
raf = requestAnimationFrame(frame);
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
};
|
|
713
|
+
const setQualityLevel = (nextLevel, now) => {
|
|
714
|
+
const boundedLevel = clamp(nextLevel, 0, maxQualityLevel);
|
|
715
|
+
if (boundedLevel === qualityLevel) return;
|
|
716
|
+
qualityLevel = boundedLevel;
|
|
717
|
+
profile = QUALITY_PROFILES[qualityLevel];
|
|
718
|
+
avgFrameMs = profile.minFrameMs;
|
|
719
|
+
slowFrameScore = 0;
|
|
720
|
+
fastFrameScore = 0;
|
|
721
|
+
qualityCooldownUntil = now + 4200;
|
|
722
|
+
scheduleRebuild();
|
|
723
|
+
};
|
|
724
|
+
const adaptQuality = (deltaMs, now) => {
|
|
725
|
+
const clampedDelta = clamp(deltaMs, 1, 250);
|
|
726
|
+
avgFrameMs = avgFrameMs * 0.9 + clampedDelta * 0.1;
|
|
727
|
+
if (now < qualityCooldownUntil) return;
|
|
728
|
+
const slowThreshold = profile.minFrameMs * 1.45;
|
|
729
|
+
const fastThreshold = profile.minFrameMs * 0.9;
|
|
730
|
+
if (avgFrameMs > slowThreshold) slowFrameScore += 1;
|
|
731
|
+
else slowFrameScore = Math.max(0, slowFrameScore - 0.5);
|
|
732
|
+
if (avgFrameMs < fastThreshold) fastFrameScore += 1;
|
|
733
|
+
else fastFrameScore = Math.max(0, fastFrameScore - 1);
|
|
734
|
+
if (slowFrameScore >= 48 && qualityLevel > 0) {
|
|
735
|
+
setQualityLevel(qualityLevel - 1, now);
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (fastFrameScore >= 220 && qualityLevel < maxQualityLevel) {
|
|
739
|
+
setQualityLevel(qualityLevel + 1, now);
|
|
740
|
+
}
|
|
741
|
+
};
|
|
726
742
|
const frame = (now) => {
|
|
727
743
|
if (!running || disposed) return;
|
|
728
|
-
if (
|
|
729
|
-
|
|
730
|
-
|
|
744
|
+
if (lastFrame !== 0) {
|
|
745
|
+
const delta = now - lastFrame;
|
|
746
|
+
if (delta < profile.minFrameMs) {
|
|
747
|
+
raf = requestAnimationFrame(frame);
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
adaptQuality(delta, now);
|
|
731
751
|
}
|
|
732
752
|
lastFrame = now;
|
|
733
|
-
if (now - lastNebulaFrame >= nebulaFrameMs) {
|
|
753
|
+
if (now - lastNebulaFrame >= profile.nebulaFrameMs) {
|
|
734
754
|
drawNebula(now);
|
|
735
755
|
lastNebulaFrame = now;
|
|
736
756
|
}
|
|
737
|
-
|
|
738
|
-
if (now >= nextCometAt) {
|
|
757
|
+
drawDynamicStars(now);
|
|
758
|
+
if (profile.maxComets > 0 && now >= nextCometAt) {
|
|
739
759
|
spawnComet(now);
|
|
740
|
-
nextCometAt = now +
|
|
760
|
+
nextCometAt = now + nextCometDelay();
|
|
741
761
|
}
|
|
742
762
|
drawComets(now);
|
|
743
763
|
raf = requestAnimationFrame(frame);
|
|
@@ -747,63 +767,277 @@ function BackgroundStars() {
|
|
|
747
767
|
running = true;
|
|
748
768
|
lastFrame = 0;
|
|
749
769
|
lastNebulaFrame = 0;
|
|
770
|
+
nextCometAt = performance.now() + nextCometDelay();
|
|
750
771
|
raf = requestAnimationFrame(frame);
|
|
751
772
|
};
|
|
752
|
-
const
|
|
753
|
-
if (shouldRun())
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
clearCanvases();
|
|
773
|
+
const onVisibilityChange = () => {
|
|
774
|
+
if (shouldRun()) {
|
|
775
|
+
start();
|
|
776
|
+
return;
|
|
757
777
|
}
|
|
778
|
+
stop();
|
|
779
|
+
clearFx();
|
|
780
|
+
if (document.hidden) clearNebula();
|
|
781
|
+
else drawNebula(0);
|
|
782
|
+
};
|
|
783
|
+
const onResize = () => {
|
|
784
|
+
scheduleRebuild();
|
|
758
785
|
};
|
|
759
786
|
if (reducedMotion) {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
} else {
|
|
764
|
-
clearCanvases();
|
|
765
|
-
}
|
|
787
|
+
drawNebula(0);
|
|
788
|
+
drawStaticStars();
|
|
789
|
+
clearFx();
|
|
766
790
|
return () => {
|
|
767
791
|
stop();
|
|
768
792
|
};
|
|
769
793
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
onVisibilityOrTheme();
|
|
794
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
795
|
+
window.addEventListener("resize", onResize, { passive: true });
|
|
796
|
+
start();
|
|
774
797
|
return () => {
|
|
775
798
|
disposed = true;
|
|
776
799
|
stop();
|
|
777
|
-
|
|
778
|
-
|
|
800
|
+
clearFx();
|
|
801
|
+
clearNebula();
|
|
802
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
803
|
+
window.removeEventListener("resize", onResize);
|
|
804
|
+
if (resizeRaf) cancelAnimationFrame(resizeRaf);
|
|
779
805
|
};
|
|
780
806
|
}, []);
|
|
781
807
|
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
782
808
|
/* @__PURE__ */ jsx4(
|
|
783
809
|
"canvas",
|
|
784
810
|
{
|
|
785
|
-
ref: nebulaRef,
|
|
811
|
+
ref: nebulaRef,
|
|
812
|
+
"aria-hidden": "true",
|
|
813
|
+
className: "cc-background-stars-canvas fixed inset-0 z-0 pointer-events-none"
|
|
814
|
+
}
|
|
815
|
+
),
|
|
816
|
+
/* @__PURE__ */ jsx4(
|
|
817
|
+
"canvas",
|
|
818
|
+
{
|
|
819
|
+
ref: staticStarsRef,
|
|
786
820
|
"aria-hidden": "true",
|
|
787
|
-
className: "cc-background-stars-canvas fixed inset-0 z-
|
|
821
|
+
className: "cc-background-stars-canvas fixed inset-0 z-10 pointer-events-none"
|
|
788
822
|
}
|
|
789
823
|
),
|
|
790
824
|
/* @__PURE__ */ jsx4(
|
|
791
825
|
"canvas",
|
|
792
826
|
{
|
|
793
|
-
ref:
|
|
827
|
+
ref: fxStarsRef,
|
|
794
828
|
"aria-hidden": "true",
|
|
795
|
-
className: "cc-background-stars-canvas fixed inset-0 z-
|
|
829
|
+
className: "cc-background-stars-canvas fixed inset-0 z-20 pointer-events-none"
|
|
796
830
|
}
|
|
797
831
|
),
|
|
798
832
|
/* @__PURE__ */ jsx4("style", { children: `
|
|
799
833
|
@media (prefers-reduced-motion: reduce) {
|
|
800
834
|
.cc-background-stars-canvas {
|
|
801
|
-
|
|
835
|
+
animation: none !important;
|
|
802
836
|
}
|
|
803
837
|
}
|
|
804
838
|
` })
|
|
805
839
|
] });
|
|
806
840
|
}
|
|
841
|
+
var TWO_PI, rand, choice, clamp, QUALITY_PROFILES, BackgroundStars_default;
|
|
842
|
+
var init_BackgroundStars = __esm({
|
|
843
|
+
"src/components/cupcode/BackgroundStars.tsx"() {
|
|
844
|
+
"use strict";
|
|
845
|
+
TWO_PI = Math.PI * 2;
|
|
846
|
+
rand = (a, b) => a + Math.random() * (b - a);
|
|
847
|
+
choice = (arr) => arr[Math.random() * arr.length | 0];
|
|
848
|
+
clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
849
|
+
QUALITY_PROFILES = [
|
|
850
|
+
{
|
|
851
|
+
staticPixelBudget: 42e4,
|
|
852
|
+
fxPixelBudget: 62e4,
|
|
853
|
+
nebulaPixelBudget: 3e5,
|
|
854
|
+
dynamicRatio: 0.12,
|
|
855
|
+
cloudCount: 3,
|
|
856
|
+
maxComets: 0,
|
|
857
|
+
minFrameMs: 36,
|
|
858
|
+
nebulaFrameMs: 180,
|
|
859
|
+
cometMinMs: 9e3,
|
|
860
|
+
cometMaxMs: 14e3,
|
|
861
|
+
haloBoost: 0.72,
|
|
862
|
+
twinkleBoost: 0.2,
|
|
863
|
+
dynamicFlares: false
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
staticPixelBudget: 62e4,
|
|
867
|
+
fxPixelBudget: 95e4,
|
|
868
|
+
nebulaPixelBudget: 42e4,
|
|
869
|
+
dynamicRatio: 0.18,
|
|
870
|
+
cloudCount: 4,
|
|
871
|
+
maxComets: 1,
|
|
872
|
+
minFrameMs: 26,
|
|
873
|
+
nebulaFrameMs: 130,
|
|
874
|
+
cometMinMs: 5600,
|
|
875
|
+
cometMaxMs: 9e3,
|
|
876
|
+
haloBoost: 0.88,
|
|
877
|
+
twinkleBoost: 0.26,
|
|
878
|
+
dynamicFlares: true
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
staticPixelBudget: 78e4,
|
|
882
|
+
fxPixelBudget: 125e4,
|
|
883
|
+
nebulaPixelBudget: 56e4,
|
|
884
|
+
dynamicRatio: 0.24,
|
|
885
|
+
cloudCount: 6,
|
|
886
|
+
maxComets: 2,
|
|
887
|
+
minFrameMs: 16,
|
|
888
|
+
nebulaFrameMs: 90,
|
|
889
|
+
cometMinMs: 3600,
|
|
890
|
+
cometMaxMs: 7e3,
|
|
891
|
+
haloBoost: 1,
|
|
892
|
+
twinkleBoost: 0.3,
|
|
893
|
+
dynamicFlares: true
|
|
894
|
+
}
|
|
895
|
+
];
|
|
896
|
+
BackgroundStars_default = BackgroundStars;
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
|
|
900
|
+
// src/components/cupcode/AccordionCupcode.tsx
|
|
901
|
+
import * as React from "react";
|
|
902
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
903
|
+
import { ChevronDown } from "lucide-react";
|
|
904
|
+
|
|
905
|
+
// src/lib/utils.ts
|
|
906
|
+
import { clsx } from "clsx";
|
|
907
|
+
import { twMerge } from "tailwind-merge";
|
|
908
|
+
function cn(...inputs) {
|
|
909
|
+
return twMerge(clsx(inputs));
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// src/components/cupcode/AccordionCupcode.tsx
|
|
913
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
914
|
+
var AccordionCupcode = AccordionPrimitive.Root;
|
|
915
|
+
var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
916
|
+
AccordionPrimitive.Item,
|
|
917
|
+
{
|
|
918
|
+
ref,
|
|
919
|
+
className: cn("glass rounded-xl mb-3 overflow-hidden", className),
|
|
920
|
+
...props
|
|
921
|
+
}
|
|
922
|
+
));
|
|
923
|
+
AccordionItem.displayName = "AccordionItem";
|
|
924
|
+
var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
925
|
+
AccordionPrimitive.Trigger,
|
|
926
|
+
{
|
|
927
|
+
ref,
|
|
928
|
+
className: cn(
|
|
929
|
+
"flex flex-1 items-center justify-between p-4 font-semibold text-foreground",
|
|
930
|
+
"transition-all hover:bg-cupcode-purple/5",
|
|
931
|
+
"[&[data-state=open]>svg]:rotate-180",
|
|
932
|
+
className
|
|
933
|
+
),
|
|
934
|
+
...props,
|
|
935
|
+
children: [
|
|
936
|
+
children,
|
|
937
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-5 w-5 shrink-0 text-cupcode-purple transition-transform duration-300" })
|
|
938
|
+
]
|
|
939
|
+
}
|
|
940
|
+
) }));
|
|
941
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
942
|
+
var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
943
|
+
AccordionPrimitive.Content,
|
|
944
|
+
{
|
|
945
|
+
ref,
|
|
946
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
947
|
+
...props,
|
|
948
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("px-4 pb-4 pt-0 text-muted-foreground", className), children })
|
|
949
|
+
}
|
|
950
|
+
));
|
|
951
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
952
|
+
|
|
953
|
+
// src/components/cupcode/AvatarCupcode.tsx
|
|
954
|
+
import * as React2 from "react";
|
|
955
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
956
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
957
|
+
var Avatar = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
958
|
+
AvatarPrimitive.Root,
|
|
959
|
+
{
|
|
960
|
+
ref,
|
|
961
|
+
className: cn(
|
|
962
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
963
|
+
"ring-2 ring-border ring-offset-2 ring-offset-background",
|
|
964
|
+
className
|
|
965
|
+
),
|
|
966
|
+
...props
|
|
967
|
+
}
|
|
968
|
+
));
|
|
969
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
970
|
+
var AvatarImage = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
971
|
+
AvatarPrimitive.Image,
|
|
972
|
+
{
|
|
973
|
+
ref,
|
|
974
|
+
className: cn("aspect-square h-full w-full object-cover", className),
|
|
975
|
+
...props
|
|
976
|
+
}
|
|
977
|
+
));
|
|
978
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
979
|
+
var AvatarFallback = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
980
|
+
AvatarPrimitive.Fallback,
|
|
981
|
+
{
|
|
982
|
+
ref,
|
|
983
|
+
className: cn(
|
|
984
|
+
"flex h-full w-full items-center justify-center rounded-full",
|
|
985
|
+
"bg-gradient-to-br from-cupcode-hover to-cupcode-purple",
|
|
986
|
+
"text-white font-semibold",
|
|
987
|
+
className
|
|
988
|
+
),
|
|
989
|
+
...props
|
|
990
|
+
}
|
|
991
|
+
));
|
|
992
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
993
|
+
var statusStyles = {
|
|
994
|
+
online: "bg-success",
|
|
995
|
+
offline: "bg-muted-foreground",
|
|
996
|
+
away: "bg-warning",
|
|
997
|
+
busy: "bg-destructive"
|
|
998
|
+
};
|
|
999
|
+
var sizeClasses = {
|
|
1000
|
+
sm: "h-8 w-8",
|
|
1001
|
+
md: "h-10 w-10",
|
|
1002
|
+
lg: "h-14 w-14",
|
|
1003
|
+
xl: "h-20 w-20"
|
|
1004
|
+
};
|
|
1005
|
+
var statusSizes = {
|
|
1006
|
+
sm: "h-2 w-2",
|
|
1007
|
+
md: "h-2.5 w-2.5",
|
|
1008
|
+
lg: "h-3 w-3",
|
|
1009
|
+
xl: "h-4 w-4"
|
|
1010
|
+
};
|
|
1011
|
+
var AvatarWithStatus = ({
|
|
1012
|
+
src,
|
|
1013
|
+
alt,
|
|
1014
|
+
fallback,
|
|
1015
|
+
status,
|
|
1016
|
+
size = "md",
|
|
1017
|
+
className
|
|
1018
|
+
}) => {
|
|
1019
|
+
return /* @__PURE__ */ jsxs2("div", { className: "relative inline-block", children: [
|
|
1020
|
+
/* @__PURE__ */ jsxs2(Avatar, { className: cn(sizeClasses[size], className), children: [
|
|
1021
|
+
/* @__PURE__ */ jsx2(AvatarImage, { src, alt }),
|
|
1022
|
+
/* @__PURE__ */ jsx2(AvatarFallback, { children: fallback })
|
|
1023
|
+
] }),
|
|
1024
|
+
status && /* @__PURE__ */ jsx2(
|
|
1025
|
+
"span",
|
|
1026
|
+
{
|
|
1027
|
+
className: cn(
|
|
1028
|
+
"absolute bottom-0 right-0 block rounded-full ring-2 ring-background",
|
|
1029
|
+
statusStyles[status],
|
|
1030
|
+
statusSizes[size],
|
|
1031
|
+
status === "online" && "animate-pulse"
|
|
1032
|
+
)
|
|
1033
|
+
}
|
|
1034
|
+
)
|
|
1035
|
+
] });
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
// src/index.ts
|
|
1039
|
+
init_BackgroundRainbow();
|
|
1040
|
+
init_BackgroundStars();
|
|
807
1041
|
|
|
808
1042
|
// src/components/cupcode/BadgeCupcode.tsx
|
|
809
1043
|
import { forwardRef as forwardRef3 } from "react";
|
|
@@ -22035,6 +22269,8 @@ function ThemeToggle({ className }) {
|
|
|
22035
22269
|
--ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
22036
22270
|
--dark-top: #7c5bbb;
|
|
22037
22271
|
--dark-bottom: #3a2a58;
|
|
22272
|
+
--toggle-track-alpha-light: 0.88;
|
|
22273
|
+
--toggle-track-alpha-dark: 0.82;
|
|
22038
22274
|
}
|
|
22039
22275
|
|
|
22040
22276
|
.cc-theme-toggle {
|
|
@@ -22054,7 +22290,12 @@ function ThemeToggle({ className }) {
|
|
|
22054
22290
|
height: var(--toggle-height);
|
|
22055
22291
|
border-radius: 999px;
|
|
22056
22292
|
overflow: hidden;
|
|
22057
|
-
background: linear-gradient(
|
|
22293
|
+
background: linear-gradient(
|
|
22294
|
+
180deg,
|
|
22295
|
+
rgba(247, 246, 251, var(--toggle-track-alpha-light)) 0%,
|
|
22296
|
+
rgba(241, 237, 249, var(--toggle-track-alpha-light)) 55%,
|
|
22297
|
+
rgba(230, 222, 245, var(--toggle-track-alpha-light)) 100%
|
|
22298
|
+
);
|
|
22058
22299
|
box-shadow:
|
|
22059
22300
|
inset 0 1px 0 rgba(255, 255, 255, 0.92),
|
|
22060
22301
|
inset 0 0 0 1px rgba(232, 219, 255, 0.85),
|
|
@@ -22168,7 +22409,11 @@ function ThemeToggle({ className }) {
|
|
|
22168
22409
|
}
|
|
22169
22410
|
|
|
22170
22411
|
.cc-theme-toggle.is-dark .track {
|
|
22171
|
-
background: linear-gradient(
|
|
22412
|
+
background: linear-gradient(
|
|
22413
|
+
180deg,
|
|
22414
|
+
rgba(124, 91, 187, var(--toggle-track-alpha-dark)) 0%,
|
|
22415
|
+
rgba(58, 42, 88, var(--toggle-track-alpha-dark)) 100%
|
|
22416
|
+
);
|
|
22172
22417
|
box-shadow:
|
|
22173
22418
|
inset 0 2px 8px rgba(255, 255, 255, 0.06),
|
|
22174
22419
|
inset 0 -4px 12px rgba(0, 0, 0, 0.28),
|
|
@@ -25538,7 +25783,6 @@ function ParticleSystem({
|
|
|
25538
25783
|
canvas.height = canvas.offsetHeight;
|
|
25539
25784
|
};
|
|
25540
25785
|
resizeCanvas();
|
|
25541
|
-
window.addEventListener("resize", resizeCanvas);
|
|
25542
25786
|
const particles = [];
|
|
25543
25787
|
for (let i = 0; i < count2; i++) {
|
|
25544
25788
|
particles.push({
|
|
@@ -25550,16 +25794,17 @@ function ParticleSystem({
|
|
|
25550
25794
|
opacity: Math.random() * 0.5 + 0.5
|
|
25551
25795
|
});
|
|
25552
25796
|
}
|
|
25553
|
-
|
|
25554
|
-
|
|
25797
|
+
const drawFrame = () => {
|
|
25798
|
+
const width = canvas.width;
|
|
25799
|
+
const height = canvas.height;
|
|
25555
25800
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
25556
25801
|
particles.forEach((particle) => {
|
|
25557
25802
|
particle.x += particle.speedX;
|
|
25558
25803
|
particle.y += particle.speedY;
|
|
25559
|
-
if (particle.x < 0) particle.x =
|
|
25560
|
-
if (particle.x >
|
|
25561
|
-
if (particle.y < 0) particle.y =
|
|
25562
|
-
if (particle.y >
|
|
25804
|
+
if (particle.x < 0) particle.x = width;
|
|
25805
|
+
if (particle.x > width) particle.x = 0;
|
|
25806
|
+
if (particle.y < 0) particle.y = height;
|
|
25807
|
+
if (particle.y > height) particle.y = 0;
|
|
25563
25808
|
if (variant === "stars") {
|
|
25564
25809
|
ctx.fillStyle = `rgba(151, 90, 182, ${particle.opacity})`;
|
|
25565
25810
|
ctx.beginPath();
|
|
@@ -25585,12 +25830,98 @@ function ParticleSystem({
|
|
|
25585
25830
|
ctx.stroke();
|
|
25586
25831
|
}
|
|
25587
25832
|
});
|
|
25833
|
+
};
|
|
25834
|
+
let animationId = 0;
|
|
25835
|
+
let running = false;
|
|
25836
|
+
let isVisible = false;
|
|
25837
|
+
let lastFrameTime = 0;
|
|
25838
|
+
const minFrameMs = variant === "comets" ? 32 : 24;
|
|
25839
|
+
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
25840
|
+
const canAnimate = () => isVisible && !document.hidden && !prefersReducedMotion.matches;
|
|
25841
|
+
const animate = (timestamp) => {
|
|
25842
|
+
if (!running) return;
|
|
25843
|
+
if (timestamp - lastFrameTime >= minFrameMs) {
|
|
25844
|
+
lastFrameTime = timestamp;
|
|
25845
|
+
drawFrame();
|
|
25846
|
+
}
|
|
25588
25847
|
animationId = requestAnimationFrame(animate);
|
|
25589
25848
|
};
|
|
25590
|
-
|
|
25849
|
+
const stop = () => {
|
|
25850
|
+
running = false;
|
|
25851
|
+
if (animationId) {
|
|
25852
|
+
cancelAnimationFrame(animationId);
|
|
25853
|
+
animationId = 0;
|
|
25854
|
+
}
|
|
25855
|
+
};
|
|
25856
|
+
const start = () => {
|
|
25857
|
+
if (running || !canAnimate()) return;
|
|
25858
|
+
running = true;
|
|
25859
|
+
lastFrameTime = 0;
|
|
25860
|
+
animationId = requestAnimationFrame(animate);
|
|
25861
|
+
};
|
|
25862
|
+
const onDocumentVisibilityChange = () => {
|
|
25863
|
+
if (canAnimate()) {
|
|
25864
|
+
start();
|
|
25865
|
+
} else {
|
|
25866
|
+
stop();
|
|
25867
|
+
}
|
|
25868
|
+
};
|
|
25869
|
+
const onReducedMotionChange = () => {
|
|
25870
|
+
if (canAnimate()) {
|
|
25871
|
+
start();
|
|
25872
|
+
} else {
|
|
25873
|
+
stop();
|
|
25874
|
+
}
|
|
25875
|
+
};
|
|
25876
|
+
const onResize = () => {
|
|
25877
|
+
resizeCanvas();
|
|
25878
|
+
if (!running) {
|
|
25879
|
+
drawFrame();
|
|
25880
|
+
}
|
|
25881
|
+
};
|
|
25882
|
+
const observer = typeof IntersectionObserver === "undefined" ? null : new IntersectionObserver(
|
|
25883
|
+
(entries) => {
|
|
25884
|
+
const entry = entries[0];
|
|
25885
|
+
isVisible = Boolean(entry == null ? void 0 : entry.isIntersecting);
|
|
25886
|
+
if (canAnimate()) {
|
|
25887
|
+
start();
|
|
25888
|
+
} else {
|
|
25889
|
+
stop();
|
|
25890
|
+
}
|
|
25891
|
+
},
|
|
25892
|
+
{
|
|
25893
|
+
root: null,
|
|
25894
|
+
threshold: 0.01,
|
|
25895
|
+
rootMargin: "200px 0px"
|
|
25896
|
+
}
|
|
25897
|
+
);
|
|
25898
|
+
const rect = canvas.getBoundingClientRect();
|
|
25899
|
+
isVisible = rect.bottom >= -200 && rect.top <= window.innerHeight + 200;
|
|
25900
|
+
if (observer) {
|
|
25901
|
+
observer.observe(canvas);
|
|
25902
|
+
}
|
|
25903
|
+
window.addEventListener("resize", onResize);
|
|
25904
|
+
document.addEventListener("visibilitychange", onDocumentVisibilityChange);
|
|
25905
|
+
if (typeof prefersReducedMotion.addEventListener === "function") {
|
|
25906
|
+
prefersReducedMotion.addEventListener("change", onReducedMotionChange);
|
|
25907
|
+
} else {
|
|
25908
|
+
prefersReducedMotion.addListener(onReducedMotionChange);
|
|
25909
|
+
}
|
|
25910
|
+
if (canAnimate()) {
|
|
25911
|
+
start();
|
|
25912
|
+
} else {
|
|
25913
|
+
drawFrame();
|
|
25914
|
+
}
|
|
25591
25915
|
return () => {
|
|
25592
|
-
window.removeEventListener("resize",
|
|
25593
|
-
|
|
25916
|
+
window.removeEventListener("resize", onResize);
|
|
25917
|
+
document.removeEventListener("visibilitychange", onDocumentVisibilityChange);
|
|
25918
|
+
if (typeof prefersReducedMotion.removeEventListener === "function") {
|
|
25919
|
+
prefersReducedMotion.removeEventListener("change", onReducedMotionChange);
|
|
25920
|
+
} else {
|
|
25921
|
+
prefersReducedMotion.removeListener(onReducedMotionChange);
|
|
25922
|
+
}
|
|
25923
|
+
observer == null ? void 0 : observer.disconnect();
|
|
25924
|
+
stop();
|
|
25594
25925
|
};
|
|
25595
25926
|
}, [count2, variant]);
|
|
25596
25927
|
return /* @__PURE__ */ jsx49(
|
|
@@ -26010,10 +26341,25 @@ var TextareaField = React32.forwardRef(
|
|
|
26010
26341
|
);
|
|
26011
26342
|
TextareaField.displayName = "TextareaField";
|
|
26012
26343
|
|
|
26344
|
+
// src/components/cupcode/ThemeBackground.tsx
|
|
26345
|
+
import { Suspense, lazy } from "react";
|
|
26346
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
26347
|
+
var BackgroundRainbow2 = lazy(
|
|
26348
|
+
() => Promise.resolve().then(() => (init_BackgroundRainbow(), BackgroundRainbow_exports)).then((module) => ({ default: module.BackgroundRainbow }))
|
|
26349
|
+
);
|
|
26350
|
+
var BackgroundStars2 = lazy(
|
|
26351
|
+
() => Promise.resolve().then(() => (init_BackgroundStars(), BackgroundStars_exports)).then((module) => ({ default: module.BackgroundStars }))
|
|
26352
|
+
);
|
|
26353
|
+
var ThemeBackground = ({ enableStars = true }) => {
|
|
26354
|
+
const { theme } = useAppTheme();
|
|
26355
|
+
const isDark = theme === "dark";
|
|
26356
|
+
return /* @__PURE__ */ jsx57(Suspense, { fallback: null, children: isDark ? enableStars ? /* @__PURE__ */ jsx57(BackgroundStars2, {}) : null : /* @__PURE__ */ jsx57(BackgroundRainbow2, {}) });
|
|
26357
|
+
};
|
|
26358
|
+
|
|
26013
26359
|
// src/components/cupcode/ThemeToggle.tsx
|
|
26014
26360
|
import * as React33 from "react";
|
|
26015
26361
|
import { Moon as Moon2, Sun as Sun2 } from "lucide-react";
|
|
26016
|
-
import { jsx as
|
|
26362
|
+
import { jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
26017
26363
|
var THEME_STORAGE_KEY2 = "cupcode-theme";
|
|
26018
26364
|
function isThemeMode(value) {
|
|
26019
26365
|
return value === "light" || value === "dark";
|
|
@@ -26099,7 +26445,7 @@ var ThemeToggle2 = ({
|
|
|
26099
26445
|
return () => observer.disconnect();
|
|
26100
26446
|
}, [defaultTheme, isControlled, usesProviderTheme]);
|
|
26101
26447
|
if (!mounted) {
|
|
26102
|
-
return /* @__PURE__ */
|
|
26448
|
+
return /* @__PURE__ */ jsx58("div", { className: cn("w-10 h-10 rounded-lg bg-muted", className) });
|
|
26103
26449
|
}
|
|
26104
26450
|
const handleToggle = (event) => {
|
|
26105
26451
|
var _a79;
|
|
@@ -26133,8 +26479,8 @@ var ThemeToggle2 = ({
|
|
|
26133
26479
|
),
|
|
26134
26480
|
"aria-label": "Toggle theme",
|
|
26135
26481
|
children: [
|
|
26136
|
-
/* @__PURE__ */
|
|
26137
|
-
/* @__PURE__ */
|
|
26482
|
+
/* @__PURE__ */ jsx58(Sun2, { className: "h-5 w-5 text-cupcode-purple rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
26483
|
+
/* @__PURE__ */ jsx58(Moon2, { className: "absolute h-5 w-5 text-cupcode-hover rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
26138
26484
|
/* @__PURE__ */ jsxs37("span", { className: "sr-only", children: [
|
|
26139
26485
|
"Current theme: ",
|
|
26140
26486
|
activeTheme
|
|
@@ -26147,7 +26493,7 @@ var ThemeToggle2 = ({
|
|
|
26147
26493
|
// src/components/theme-provider.tsx
|
|
26148
26494
|
import { useCallback as useCallback8, useEffect as useEffect20, useMemo as useMemo12, useState as useState17 } from "react";
|
|
26149
26495
|
import { flushSync } from "react-dom";
|
|
26150
|
-
import { jsx as
|
|
26496
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
26151
26497
|
var STORAGE_KEY2 = "cupcode-theme";
|
|
26152
26498
|
var LEGACY_STORAGE_KEY = "theme";
|
|
26153
26499
|
function getPreferredTheme() {
|
|
@@ -26301,7 +26647,7 @@ function ThemeProvider({ children }) {
|
|
|
26301
26647
|
}),
|
|
26302
26648
|
[theme, setTheme, toggleTheme]
|
|
26303
26649
|
);
|
|
26304
|
-
return /* @__PURE__ */
|
|
26650
|
+
return /* @__PURE__ */ jsx59(ThemeContext.Provider, { value, children });
|
|
26305
26651
|
}
|
|
26306
26652
|
function ThemeScript() {
|
|
26307
26653
|
const script = `
|
|
@@ -26322,15 +26668,15 @@ function ThemeScript() {
|
|
|
26322
26668
|
root.style.colorScheme = theme;
|
|
26323
26669
|
})();
|
|
26324
26670
|
`;
|
|
26325
|
-
return /* @__PURE__ */
|
|
26671
|
+
return /* @__PURE__ */ jsx59("script", { dangerouslySetInnerHTML: { __html: script } });
|
|
26326
26672
|
}
|
|
26327
26673
|
|
|
26328
26674
|
// src/components/cupcode/TimelineCupcode.tsx
|
|
26329
|
-
import { jsx as
|
|
26675
|
+
import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
26330
26676
|
function Timeline({ items, variant = "vertical", className }) {
|
|
26331
26677
|
if (variant === "horizontal") {
|
|
26332
|
-
return /* @__PURE__ */
|
|
26333
|
-
/* @__PURE__ */
|
|
26678
|
+
return /* @__PURE__ */ jsx60("div", { className: cn("flex items-start gap-4 overflow-x-auto pb-4", className), children: items.map((item, index) => /* @__PURE__ */ jsxs38("div", { className: "flex flex-col items-center min-w-[200px]", children: [
|
|
26679
|
+
/* @__PURE__ */ jsx60(
|
|
26334
26680
|
"div",
|
|
26335
26681
|
{
|
|
26336
26682
|
className: cn(
|
|
@@ -26338,27 +26684,27 @@ function Timeline({ items, variant = "vertical", className }) {
|
|
|
26338
26684
|
"transition-all duration-300",
|
|
26339
26685
|
item.active ? "cc-gradient-galaxy text-white elevation-3 scale-110" : "bg-muted text-muted-foreground"
|
|
26340
26686
|
),
|
|
26341
|
-
children: item.icon || /* @__PURE__ */
|
|
26687
|
+
children: item.icon || /* @__PURE__ */ jsx60("span", { className: "text-sm font-bold", children: index + 1 })
|
|
26342
26688
|
}
|
|
26343
26689
|
),
|
|
26344
|
-
index < items.length - 1 && /* @__PURE__ */
|
|
26690
|
+
index < items.length - 1 && /* @__PURE__ */ jsx60("div", { className: cn(
|
|
26345
26691
|
"h-1 w-full mb-3",
|
|
26346
26692
|
item.active ? "bg-cupcode-purple" : "bg-muted"
|
|
26347
26693
|
) }),
|
|
26348
26694
|
/* @__PURE__ */ jsxs38("div", { className: "text-center", children: [
|
|
26349
|
-
/* @__PURE__ */
|
|
26695
|
+
/* @__PURE__ */ jsx60("h4", { className: cn(
|
|
26350
26696
|
"font-display font-semibold mb-1",
|
|
26351
26697
|
item.active ? "text-cupcode-purple" : "text-foreground"
|
|
26352
26698
|
), children: item.title }),
|
|
26353
|
-
item.description && /* @__PURE__ */
|
|
26354
|
-
item.date && /* @__PURE__ */
|
|
26699
|
+
item.description && /* @__PURE__ */ jsx60("p", { className: "text-sm text-muted-foreground", children: item.description }),
|
|
26700
|
+
item.date && /* @__PURE__ */ jsx60("p", { className: "text-xs text-muted-foreground mt-1", children: item.date })
|
|
26355
26701
|
] })
|
|
26356
26702
|
] }, item.id)) });
|
|
26357
26703
|
}
|
|
26358
26704
|
return /* @__PURE__ */ jsxs38("div", { className: cn("relative space-6", className), children: [
|
|
26359
|
-
/* @__PURE__ */
|
|
26705
|
+
/* @__PURE__ */ jsx60("div", { className: "absolute left-6 top-0 bottom-0 w-0.5 bg-muted" }),
|
|
26360
26706
|
items.map((item, index) => /* @__PURE__ */ jsxs38("div", { className: "relative flex gap-6 pb-8 last:pb-0", children: [
|
|
26361
|
-
/* @__PURE__ */
|
|
26707
|
+
/* @__PURE__ */ jsx60(
|
|
26362
26708
|
"div",
|
|
26363
26709
|
{
|
|
26364
26710
|
className: cn(
|
|
@@ -26366,16 +26712,16 @@ function Timeline({ items, variant = "vertical", className }) {
|
|
|
26366
26712
|
"transition-all duration-300",
|
|
26367
26713
|
item.active ? "cc-gradient-galaxy text-white elevation-3" : "bg-muted text-muted-foreground"
|
|
26368
26714
|
),
|
|
26369
|
-
children: item.icon || /* @__PURE__ */
|
|
26715
|
+
children: item.icon || /* @__PURE__ */ jsx60("span", { className: "text-sm font-bold", children: index + 1 })
|
|
26370
26716
|
}
|
|
26371
26717
|
),
|
|
26372
26718
|
/* @__PURE__ */ jsxs38("div", { className: "flex-1 pt-1", children: [
|
|
26373
|
-
/* @__PURE__ */
|
|
26719
|
+
/* @__PURE__ */ jsx60("h4", { className: cn(
|
|
26374
26720
|
"font-display font-semibold mb-1",
|
|
26375
26721
|
item.active ? "text-cupcode-purple" : "text-foreground"
|
|
26376
26722
|
), children: item.title }),
|
|
26377
|
-
item.description && /* @__PURE__ */
|
|
26378
|
-
item.date && /* @__PURE__ */
|
|
26723
|
+
item.description && /* @__PURE__ */ jsx60("p", { className: "text-sm text-muted-foreground mb-2", children: item.description }),
|
|
26724
|
+
item.date && /* @__PURE__ */ jsx60("p", { className: "text-xs text-muted-foreground", children: item.date })
|
|
26379
26725
|
] })
|
|
26380
26726
|
] }, item.id))
|
|
26381
26727
|
] });
|
|
@@ -26383,7 +26729,7 @@ function Timeline({ items, variant = "vertical", className }) {
|
|
|
26383
26729
|
|
|
26384
26730
|
// src/components/cupcode/ToastCupcode.tsx
|
|
26385
26731
|
import { X as X6, CheckCircle, AlertCircle, Info as Info2, AlertTriangle as AlertTriangle2 } from "lucide-react";
|
|
26386
|
-
import { jsx as
|
|
26732
|
+
import { jsx as jsx61, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
26387
26733
|
var variantStyles2 = {
|
|
26388
26734
|
success: {
|
|
26389
26735
|
gradient: "from-success/20 to-success/5",
|
|
@@ -26418,7 +26764,7 @@ var ToastCupcode = ({
|
|
|
26418
26764
|
}) => {
|
|
26419
26765
|
const style = variantStyles2[variant];
|
|
26420
26766
|
const Icon3 = style.icon;
|
|
26421
|
-
return /* @__PURE__ */
|
|
26767
|
+
return /* @__PURE__ */ jsx61(
|
|
26422
26768
|
"div",
|
|
26423
26769
|
{
|
|
26424
26770
|
className: cn(
|
|
@@ -26431,17 +26777,17 @@ var ToastCupcode = ({
|
|
|
26431
26777
|
"animate-slide-up"
|
|
26432
26778
|
),
|
|
26433
26779
|
children: /* @__PURE__ */ jsxs39("div", { className: "flex items-start gap-3", children: [
|
|
26434
|
-
/* @__PURE__ */
|
|
26780
|
+
/* @__PURE__ */ jsx61(Icon3, { className: cn("h-5 w-5 shrink-0 mt-0.5", style.iconColor) }),
|
|
26435
26781
|
/* @__PURE__ */ jsxs39("div", { className: "flex-1 space-y-1", children: [
|
|
26436
|
-
/* @__PURE__ */
|
|
26437
|
-
description && /* @__PURE__ */
|
|
26782
|
+
/* @__PURE__ */ jsx61("p", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
26783
|
+
description && /* @__PURE__ */ jsx61("p", { className: "text-xs text-foreground/80", children: description })
|
|
26438
26784
|
] }),
|
|
26439
|
-
onClose && /* @__PURE__ */
|
|
26785
|
+
onClose && /* @__PURE__ */ jsx61(
|
|
26440
26786
|
"button",
|
|
26441
26787
|
{
|
|
26442
26788
|
onClick: onClose,
|
|
26443
|
-
className: "shrink-0 rounded-md p-1 hover:bg-
|
|
26444
|
-
children: /* @__PURE__ */
|
|
26789
|
+
className: "shrink-0 rounded-md p-1 transition-colors hover:bg-foreground/10",
|
|
26790
|
+
children: /* @__PURE__ */ jsx61(X6, { className: "h-4 w-4 text-foreground/60" })
|
|
26445
26791
|
}
|
|
26446
26792
|
)
|
|
26447
26793
|
] })
|
|
@@ -26451,8 +26797,8 @@ var ToastCupcode = ({
|
|
|
26451
26797
|
|
|
26452
26798
|
// src/components/cupcode/VideoWatchButton.tsx
|
|
26453
26799
|
import React34 from "react";
|
|
26454
|
-
import { jsx as
|
|
26455
|
-
var PlayGlyph = () => /* @__PURE__ */
|
|
26800
|
+
import { jsx as jsx62, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
26801
|
+
var PlayGlyph = () => /* @__PURE__ */ jsx62("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", className: "h-[18px] w-[18px]", children: /* @__PURE__ */ jsx62("path", { d: "M6 4.5L13.5 9L6 13.5V4.5Z", fill: "currentColor" }) });
|
|
26456
26802
|
var VideoWatchButton = React34.forwardRef(
|
|
26457
26803
|
({ className, label = "Assistir", type = "button", "aria-label": ariaLabel, ...props }, ref) => {
|
|
26458
26804
|
return /* @__PURE__ */ jsxs40(
|
|
@@ -26465,17 +26811,17 @@ var VideoWatchButton = React34.forwardRef(
|
|
|
26465
26811
|
...props,
|
|
26466
26812
|
children: [
|
|
26467
26813
|
/* @__PURE__ */ jsxs40("span", { className: "cc-video-watch-btn__bg", children: [
|
|
26468
|
-
/* @__PURE__ */
|
|
26469
|
-
/* @__PURE__ */
|
|
26814
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__icon", children: /* @__PURE__ */ jsx62(PlayGlyph, {}) }),
|
|
26815
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__label", children: label }),
|
|
26470
26816
|
/* @__PURE__ */ jsxs40("span", { className: "cc-video-watch-btn__mask", "aria-hidden": "true", children: [
|
|
26471
|
-
/* @__PURE__ */
|
|
26472
|
-
/* @__PURE__ */
|
|
26473
|
-
/* @__PURE__ */
|
|
26474
|
-
/* @__PURE__ */
|
|
26475
|
-
/* @__PURE__ */
|
|
26817
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__blob cc-video-watch-btn__blob--1" }),
|
|
26818
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__blob cc-video-watch-btn__blob--2" }),
|
|
26819
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__blob cc-video-watch-btn__blob--3" }),
|
|
26820
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__blob cc-video-watch-btn__blob--4" }),
|
|
26821
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__blob cc-video-watch-btn__blob--5" })
|
|
26476
26822
|
] })
|
|
26477
26823
|
] }),
|
|
26478
|
-
/* @__PURE__ */
|
|
26824
|
+
/* @__PURE__ */ jsx62("span", { className: "cc-video-watch-btn__glow", "aria-hidden": "true" })
|
|
26479
26825
|
]
|
|
26480
26826
|
}
|
|
26481
26827
|
);
|
|
@@ -26486,11 +26832,11 @@ VideoWatchButton.displayName = "VideoWatchButton";
|
|
|
26486
26832
|
// src/components/cupcode/TooltipCupcode.tsx
|
|
26487
26833
|
import * as React35 from "react";
|
|
26488
26834
|
import * as TooltipPrimitive2 from "@radix-ui/react-tooltip";
|
|
26489
|
-
import { jsx as
|
|
26835
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
26490
26836
|
var TooltipProvider2 = TooltipPrimitive2.Provider;
|
|
26491
26837
|
var TooltipCupcode = TooltipPrimitive2.Root;
|
|
26492
26838
|
var TooltipTrigger2 = TooltipPrimitive2.Trigger;
|
|
26493
|
-
var TooltipContent2 = React35.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
26839
|
+
var TooltipContent2 = React35.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx63(
|
|
26494
26840
|
TooltipPrimitive2.Content,
|
|
26495
26841
|
{
|
|
26496
26842
|
ref,
|
|
@@ -26514,11 +26860,11 @@ TooltipContent2.displayName = TooltipPrimitive2.Content.displayName;
|
|
|
26514
26860
|
import * as React36 from "react";
|
|
26515
26861
|
import * as AccordionPrimitive2 from "@radix-ui/react-accordion";
|
|
26516
26862
|
import { ChevronDown as ChevronDown6 } from "lucide-react";
|
|
26517
|
-
import { jsx as
|
|
26863
|
+
import { jsx as jsx64, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
26518
26864
|
var Accordion = AccordionPrimitive2.Root;
|
|
26519
|
-
var AccordionItem2 = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
26865
|
+
var AccordionItem2 = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx64(AccordionPrimitive2.Item, { ref, className: cn("border-b", className), ...props }));
|
|
26520
26866
|
AccordionItem2.displayName = "AccordionItem";
|
|
26521
|
-
var AccordionTrigger2 = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
26867
|
+
var AccordionTrigger2 = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx64(AccordionPrimitive2.Header, { className: "flex", children: /* @__PURE__ */ jsxs41(
|
|
26522
26868
|
AccordionPrimitive2.Trigger,
|
|
26523
26869
|
{
|
|
26524
26870
|
ref,
|
|
@@ -26529,18 +26875,18 @@ var AccordionTrigger2 = React36.forwardRef(({ className, children, ...props }, r
|
|
|
26529
26875
|
...props,
|
|
26530
26876
|
children: [
|
|
26531
26877
|
children,
|
|
26532
|
-
/* @__PURE__ */
|
|
26878
|
+
/* @__PURE__ */ jsx64(ChevronDown6, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
26533
26879
|
]
|
|
26534
26880
|
}
|
|
26535
26881
|
) }));
|
|
26536
26882
|
AccordionTrigger2.displayName = AccordionPrimitive2.Trigger.displayName;
|
|
26537
|
-
var AccordionContent2 = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
26883
|
+
var AccordionContent2 = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx64(
|
|
26538
26884
|
AccordionPrimitive2.Content,
|
|
26539
26885
|
{
|
|
26540
26886
|
ref,
|
|
26541
26887
|
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
26542
26888
|
...props,
|
|
26543
|
-
children: /* @__PURE__ */
|
|
26889
|
+
children: /* @__PURE__ */ jsx64("div", { className: cn("pb-4 pt-0", className), children })
|
|
26544
26890
|
}
|
|
26545
26891
|
));
|
|
26546
26892
|
AccordionContent2.displayName = AccordionPrimitive2.Content.displayName;
|
|
@@ -26548,14 +26894,14 @@ AccordionContent2.displayName = AccordionPrimitive2.Content.displayName;
|
|
|
26548
26894
|
// src/components/ui/alert.tsx
|
|
26549
26895
|
import * as React37 from "react";
|
|
26550
26896
|
import { cva as cva3 } from "class-variance-authority";
|
|
26551
|
-
import { jsx as
|
|
26897
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
26552
26898
|
var alertVariants = cva3(
|
|
26553
26899
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
26554
26900
|
{
|
|
26555
26901
|
variants: {
|
|
26556
26902
|
variant: {
|
|
26557
26903
|
default: "bg-background text-foreground",
|
|
26558
|
-
destructive: "border-destructive/50
|
|
26904
|
+
destructive: "border-destructive/50 bg-destructive/10 text-foreground dark:border-destructive/70 dark:bg-destructive/20 [&>svg]:text-destructive"
|
|
26559
26905
|
}
|
|
26560
26906
|
},
|
|
26561
26907
|
defaultVariants: {
|
|
@@ -26563,14 +26909,14 @@ var alertVariants = cva3(
|
|
|
26563
26909
|
}
|
|
26564
26910
|
}
|
|
26565
26911
|
);
|
|
26566
|
-
var Alert = React37.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
26912
|
+
var Alert = React37.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx65("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
26567
26913
|
Alert.displayName = "Alert";
|
|
26568
26914
|
var AlertTitle = React37.forwardRef(
|
|
26569
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
26915
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx65("h5", { ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })
|
|
26570
26916
|
);
|
|
26571
26917
|
AlertTitle.displayName = "AlertTitle";
|
|
26572
26918
|
var AlertDescription = React37.forwardRef(
|
|
26573
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
26919
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx65("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })
|
|
26574
26920
|
);
|
|
26575
26921
|
AlertDescription.displayName = "AlertDescription";
|
|
26576
26922
|
|
|
@@ -26582,11 +26928,11 @@ var AspectRatio = AspectRatioPrimitive.Root;
|
|
|
26582
26928
|
import * as React38 from "react";
|
|
26583
26929
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
26584
26930
|
import { ChevronRight as ChevronRight3, MoreHorizontal } from "lucide-react";
|
|
26585
|
-
import { jsx as
|
|
26586
|
-
var Breadcrumb = React38.forwardRef(({ ...props }, ref) => /* @__PURE__ */
|
|
26931
|
+
import { jsx as jsx66, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
26932
|
+
var Breadcrumb = React38.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx66("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
26587
26933
|
Breadcrumb.displayName = "Breadcrumb";
|
|
26588
26934
|
var BreadcrumbList = React38.forwardRef(
|
|
26589
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
26935
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
|
|
26590
26936
|
"ol",
|
|
26591
26937
|
{
|
|
26592
26938
|
ref,
|
|
@@ -26600,16 +26946,16 @@ var BreadcrumbList = React38.forwardRef(
|
|
|
26600
26946
|
);
|
|
26601
26947
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
26602
26948
|
var BreadcrumbItem = React38.forwardRef(
|
|
26603
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
26949
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx66("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
|
|
26604
26950
|
);
|
|
26605
26951
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
26606
26952
|
var BreadcrumbLink = React38.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
26607
26953
|
const Comp = asChild ? Slot2 : "a";
|
|
26608
|
-
return /* @__PURE__ */
|
|
26954
|
+
return /* @__PURE__ */ jsx66(Comp, { ref, className: cn("transition-colors hover:text-foreground", className), ...props });
|
|
26609
26955
|
});
|
|
26610
26956
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
26611
26957
|
var BreadcrumbPage = React38.forwardRef(
|
|
26612
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
26958
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx66(
|
|
26613
26959
|
"span",
|
|
26614
26960
|
{
|
|
26615
26961
|
ref,
|
|
@@ -26622,7 +26968,7 @@ var BreadcrumbPage = React38.forwardRef(
|
|
|
26622
26968
|
)
|
|
26623
26969
|
);
|
|
26624
26970
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
26625
|
-
var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */
|
|
26971
|
+
var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ jsx66("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children != null ? children : /* @__PURE__ */ jsx66(ChevronRight3, {}) });
|
|
26626
26972
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
26627
26973
|
var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs42(
|
|
26628
26974
|
"span",
|
|
@@ -26632,8 +26978,8 @@ var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs42(
|
|
|
26632
26978
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
26633
26979
|
...props,
|
|
26634
26980
|
children: [
|
|
26635
|
-
/* @__PURE__ */
|
|
26636
|
-
/* @__PURE__ */
|
|
26981
|
+
/* @__PURE__ */ jsx66(MoreHorizontal, { className: "h-4 w-4" }),
|
|
26982
|
+
/* @__PURE__ */ jsx66("span", { className: "sr-only", children: "More" })
|
|
26637
26983
|
]
|
|
26638
26984
|
}
|
|
26639
26985
|
);
|
|
@@ -26642,9 +26988,9 @@ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
|
26642
26988
|
// src/components/ui/calendar.tsx
|
|
26643
26989
|
import { ChevronLeft, ChevronRight as ChevronRight4 } from "lucide-react";
|
|
26644
26990
|
import { DayPicker } from "react-day-picker";
|
|
26645
|
-
import { jsx as
|
|
26991
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
26646
26992
|
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
26647
|
-
return /* @__PURE__ */
|
|
26993
|
+
return /* @__PURE__ */ jsx67(
|
|
26648
26994
|
DayPicker,
|
|
26649
26995
|
{
|
|
26650
26996
|
showOutsideDays,
|
|
@@ -26679,9 +27025,9 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
26679
27025
|
components: {
|
|
26680
27026
|
Chevron: ({ orientation, className: className2, ...chevronProps }) => {
|
|
26681
27027
|
if (orientation === "left") {
|
|
26682
|
-
return /* @__PURE__ */
|
|
27028
|
+
return /* @__PURE__ */ jsx67(ChevronLeft, { className: cn("h-4 w-4", className2), ...chevronProps });
|
|
26683
27029
|
}
|
|
26684
|
-
return /* @__PURE__ */
|
|
27030
|
+
return /* @__PURE__ */ jsx67(ChevronRight4, { className: cn("h-4 w-4", className2), ...chevronProps });
|
|
26685
27031
|
}
|
|
26686
27032
|
},
|
|
26687
27033
|
...props
|
|
@@ -26692,27 +27038,27 @@ Calendar.displayName = "Calendar";
|
|
|
26692
27038
|
|
|
26693
27039
|
// src/components/ui/card.tsx
|
|
26694
27040
|
import * as React39 from "react";
|
|
26695
|
-
import { jsx as
|
|
26696
|
-
var Card = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27041
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
27042
|
+
var Card = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx68("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props }));
|
|
26697
27043
|
Card.displayName = "Card";
|
|
26698
27044
|
var CardHeader = React39.forwardRef(
|
|
26699
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
27045
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx68("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
26700
27046
|
);
|
|
26701
27047
|
CardHeader.displayName = "CardHeader";
|
|
26702
27048
|
var CardTitle = React39.forwardRef(
|
|
26703
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
27049
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx68("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
|
|
26704
27050
|
);
|
|
26705
27051
|
CardTitle.displayName = "CardTitle";
|
|
26706
27052
|
var CardDescription = React39.forwardRef(
|
|
26707
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
27053
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx68("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
26708
27054
|
);
|
|
26709
27055
|
CardDescription.displayName = "CardDescription";
|
|
26710
27056
|
var CardContent = React39.forwardRef(
|
|
26711
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
27057
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx68("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
26712
27058
|
);
|
|
26713
27059
|
CardContent.displayName = "CardContent";
|
|
26714
27060
|
var CardFooter = React39.forwardRef(
|
|
26715
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
27061
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx68("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
26716
27062
|
);
|
|
26717
27063
|
CardFooter.displayName = "CardFooter";
|
|
26718
27064
|
|
|
@@ -26720,7 +27066,7 @@ CardFooter.displayName = "CardFooter";
|
|
|
26720
27066
|
import * as React40 from "react";
|
|
26721
27067
|
import useEmblaCarousel from "embla-carousel-react";
|
|
26722
27068
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
26723
|
-
import { jsx as
|
|
27069
|
+
import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
26724
27070
|
var CarouselContext = React40.createContext(null);
|
|
26725
27071
|
function useCarousel() {
|
|
26726
27072
|
const context = React40.useContext(CarouselContext);
|
|
@@ -26782,7 +27128,7 @@ var Carousel = React40.forwardRef(
|
|
|
26782
27128
|
api == null ? void 0 : api.off("select", onSelect);
|
|
26783
27129
|
};
|
|
26784
27130
|
}, [api, onSelect]);
|
|
26785
|
-
return /* @__PURE__ */
|
|
27131
|
+
return /* @__PURE__ */ jsx69(
|
|
26786
27132
|
CarouselContext.Provider,
|
|
26787
27133
|
{
|
|
26788
27134
|
value: {
|
|
@@ -26795,7 +27141,7 @@ var Carousel = React40.forwardRef(
|
|
|
26795
27141
|
canScrollPrev,
|
|
26796
27142
|
canScrollNext
|
|
26797
27143
|
},
|
|
26798
|
-
children: /* @__PURE__ */
|
|
27144
|
+
children: /* @__PURE__ */ jsx69(
|
|
26799
27145
|
"div",
|
|
26800
27146
|
{
|
|
26801
27147
|
ref,
|
|
@@ -26815,7 +27161,7 @@ Carousel.displayName = "Carousel";
|
|
|
26815
27161
|
var CarouselContent = React40.forwardRef(
|
|
26816
27162
|
({ className, ...props }, ref) => {
|
|
26817
27163
|
const { carouselRef, orientation } = useCarousel();
|
|
26818
|
-
return /* @__PURE__ */
|
|
27164
|
+
return /* @__PURE__ */ jsx69("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx69(
|
|
26819
27165
|
"div",
|
|
26820
27166
|
{
|
|
26821
27167
|
ref,
|
|
@@ -26829,7 +27175,7 @@ CarouselContent.displayName = "CarouselContent";
|
|
|
26829
27175
|
var CarouselItem = React40.forwardRef(
|
|
26830
27176
|
({ className, ...props }, ref) => {
|
|
26831
27177
|
const { orientation } = useCarousel();
|
|
26832
|
-
return /* @__PURE__ */
|
|
27178
|
+
return /* @__PURE__ */ jsx69(
|
|
26833
27179
|
"div",
|
|
26834
27180
|
{
|
|
26835
27181
|
ref,
|
|
@@ -26860,8 +27206,8 @@ var CarouselPrevious = React40.forwardRef(
|
|
|
26860
27206
|
onClick: scrollPrev,
|
|
26861
27207
|
...props,
|
|
26862
27208
|
children: [
|
|
26863
|
-
/* @__PURE__ */
|
|
26864
|
-
/* @__PURE__ */
|
|
27209
|
+
/* @__PURE__ */ jsx69(ArrowLeft, { className: "h-4 w-4" }),
|
|
27210
|
+
/* @__PURE__ */ jsx69("span", { className: "sr-only", children: "Previous slide" })
|
|
26865
27211
|
]
|
|
26866
27212
|
}
|
|
26867
27213
|
);
|
|
@@ -26886,8 +27232,8 @@ var CarouselNext = React40.forwardRef(
|
|
|
26886
27232
|
onClick: scrollNext,
|
|
26887
27233
|
...props,
|
|
26888
27234
|
children: [
|
|
26889
|
-
/* @__PURE__ */
|
|
26890
|
-
/* @__PURE__ */
|
|
27235
|
+
/* @__PURE__ */ jsx69(ArrowRight, { className: "h-4 w-4" }),
|
|
27236
|
+
/* @__PURE__ */ jsx69("span", { className: "sr-only", children: "Next slide" })
|
|
26891
27237
|
]
|
|
26892
27238
|
}
|
|
26893
27239
|
);
|
|
@@ -26898,7 +27244,7 @@ CarouselNext.displayName = "CarouselNext";
|
|
|
26898
27244
|
// src/components/ui/chart.tsx
|
|
26899
27245
|
import * as React41 from "react";
|
|
26900
27246
|
import * as RechartsPrimitive from "recharts";
|
|
26901
|
-
import { Fragment as Fragment6, jsx as
|
|
27247
|
+
import { Fragment as Fragment6, jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
26902
27248
|
var THEMES = { light: "", dark: ".dark" };
|
|
26903
27249
|
var ChartContext = React41.createContext(null);
|
|
26904
27250
|
function useChart() {
|
|
@@ -26911,7 +27257,7 @@ function useChart() {
|
|
|
26911
27257
|
var ChartContainer = React41.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
26912
27258
|
const uniqueId = React41.useId();
|
|
26913
27259
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
26914
|
-
return /* @__PURE__ */
|
|
27260
|
+
return /* @__PURE__ */ jsx70(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs44(
|
|
26915
27261
|
"div",
|
|
26916
27262
|
{
|
|
26917
27263
|
"data-chart": chartId,
|
|
@@ -26922,8 +27268,8 @@ var ChartContainer = React41.forwardRef(({ id, className, children, config, ...p
|
|
|
26922
27268
|
),
|
|
26923
27269
|
...props,
|
|
26924
27270
|
children: [
|
|
26925
|
-
/* @__PURE__ */
|
|
26926
|
-
/* @__PURE__ */
|
|
27271
|
+
/* @__PURE__ */ jsx70(ChartStyle, { id: chartId, config }),
|
|
27272
|
+
/* @__PURE__ */ jsx70(RechartsPrimitive.ResponsiveContainer, { children })
|
|
26927
27273
|
]
|
|
26928
27274
|
}
|
|
26929
27275
|
) });
|
|
@@ -26934,7 +27280,7 @@ var ChartStyle = ({ id, config }) => {
|
|
|
26934
27280
|
if (!colorConfig.length) {
|
|
26935
27281
|
return null;
|
|
26936
27282
|
}
|
|
26937
|
-
return /* @__PURE__ */
|
|
27283
|
+
return /* @__PURE__ */ jsx70(
|
|
26938
27284
|
"style",
|
|
26939
27285
|
{
|
|
26940
27286
|
dangerouslySetInnerHTML: {
|
|
@@ -26981,12 +27327,12 @@ var ChartTooltipContent = React41.forwardRef(
|
|
|
26981
27327
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
26982
27328
|
const value = !labelKey && typeof label === "string" ? ((_a78 = config[label]) == null ? void 0 : _a78.label) || label : itemConfig == null ? void 0 : itemConfig.label;
|
|
26983
27329
|
if (labelFormatter) {
|
|
26984
|
-
return /* @__PURE__ */
|
|
27330
|
+
return /* @__PURE__ */ jsx70("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
26985
27331
|
}
|
|
26986
27332
|
if (!value) {
|
|
26987
27333
|
return null;
|
|
26988
27334
|
}
|
|
26989
|
-
return /* @__PURE__ */
|
|
27335
|
+
return /* @__PURE__ */ jsx70("div", { className: cn("font-medium", labelClassName), children: value });
|
|
26990
27336
|
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
26991
27337
|
if (!active || !(payload == null ? void 0 : payload.length)) {
|
|
26992
27338
|
return null;
|
|
@@ -27002,11 +27348,11 @@ var ChartTooltipContent = React41.forwardRef(
|
|
|
27002
27348
|
),
|
|
27003
27349
|
children: [
|
|
27004
27350
|
!nestLabel ? tooltipLabel : null,
|
|
27005
|
-
/* @__PURE__ */
|
|
27351
|
+
/* @__PURE__ */ jsx70("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
27006
27352
|
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
27007
27353
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
27008
27354
|
const indicatorColor = color || item.payload.fill || item.color;
|
|
27009
|
-
return /* @__PURE__ */
|
|
27355
|
+
return /* @__PURE__ */ jsx70(
|
|
27010
27356
|
"div",
|
|
27011
27357
|
{
|
|
27012
27358
|
className: cn(
|
|
@@ -27014,7 +27360,7 @@ var ChartTooltipContent = React41.forwardRef(
|
|
|
27014
27360
|
indicator === "dot" && "items-center"
|
|
27015
27361
|
),
|
|
27016
27362
|
children: formatter && (item == null ? void 0 : item.value) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs44(Fragment6, { children: [
|
|
27017
|
-
(itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */
|
|
27363
|
+
(itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */ jsx70(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx70(
|
|
27018
27364
|
"div",
|
|
27019
27365
|
{
|
|
27020
27366
|
className: cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
@@ -27039,9 +27385,9 @@ var ChartTooltipContent = React41.forwardRef(
|
|
|
27039
27385
|
children: [
|
|
27040
27386
|
/* @__PURE__ */ jsxs44("div", { className: "grid gap-1.5", children: [
|
|
27041
27387
|
nestLabel ? tooltipLabel : null,
|
|
27042
|
-
/* @__PURE__ */
|
|
27388
|
+
/* @__PURE__ */ jsx70("span", { className: "text-muted-foreground", children: (itemConfig == null ? void 0 : itemConfig.label) || item.name })
|
|
27043
27389
|
] }),
|
|
27044
|
-
item.value && /* @__PURE__ */
|
|
27390
|
+
item.value && /* @__PURE__ */ jsx70("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
27045
27391
|
]
|
|
27046
27392
|
}
|
|
27047
27393
|
)
|
|
@@ -27062,7 +27408,7 @@ var ChartLegendContent = React41.forwardRef(({ className, hideIcon = false, payl
|
|
|
27062
27408
|
if (!(payload == null ? void 0 : payload.length)) {
|
|
27063
27409
|
return null;
|
|
27064
27410
|
}
|
|
27065
|
-
return /* @__PURE__ */
|
|
27411
|
+
return /* @__PURE__ */ jsx70(
|
|
27066
27412
|
"div",
|
|
27067
27413
|
{
|
|
27068
27414
|
ref,
|
|
@@ -27075,7 +27421,7 @@ var ChartLegendContent = React41.forwardRef(({ className, hideIcon = false, payl
|
|
|
27075
27421
|
{
|
|
27076
27422
|
className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
27077
27423
|
children: [
|
|
27078
|
-
(itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */
|
|
27424
|
+
(itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */ jsx70(itemConfig.icon, {}) : /* @__PURE__ */ jsx70(
|
|
27079
27425
|
"div",
|
|
27080
27426
|
{
|
|
27081
27427
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -27112,8 +27458,8 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
27112
27458
|
import * as React42 from "react";
|
|
27113
27459
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
27114
27460
|
import { Check as Check6 } from "lucide-react";
|
|
27115
|
-
import { jsx as
|
|
27116
|
-
var Checkbox = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27461
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
27462
|
+
var Checkbox = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx71(
|
|
27117
27463
|
CheckboxPrimitive.Root,
|
|
27118
27464
|
{
|
|
27119
27465
|
ref,
|
|
@@ -27122,7 +27468,7 @@ var Checkbox = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
27122
27468
|
className
|
|
27123
27469
|
),
|
|
27124
27470
|
...props,
|
|
27125
|
-
children: /* @__PURE__ */
|
|
27471
|
+
children: /* @__PURE__ */ jsx71(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsx71(Check6, { className: "h-4 w-4" }) })
|
|
27126
27472
|
}
|
|
27127
27473
|
));
|
|
27128
27474
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
@@ -27137,8 +27483,8 @@ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
|
27137
27483
|
import * as React43 from "react";
|
|
27138
27484
|
import { Command as CommandPrimitive } from "cmdk";
|
|
27139
27485
|
import { Search as Search3 } from "lucide-react";
|
|
27140
|
-
import { jsx as
|
|
27141
|
-
var Command = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27486
|
+
import { jsx as jsx72, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
27487
|
+
var Command = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx72(
|
|
27142
27488
|
CommandPrimitive,
|
|
27143
27489
|
{
|
|
27144
27490
|
ref,
|
|
@@ -27151,11 +27497,11 @@ var Command = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
27151
27497
|
));
|
|
27152
27498
|
Command.displayName = CommandPrimitive.displayName;
|
|
27153
27499
|
var CommandDialog = ({ children, ...props }) => {
|
|
27154
|
-
return /* @__PURE__ */
|
|
27500
|
+
return /* @__PURE__ */ jsx72(Dialog, { ...props, children: /* @__PURE__ */ jsx72(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ jsx72(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
27155
27501
|
};
|
|
27156
27502
|
var CommandInput = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs45("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
27157
|
-
/* @__PURE__ */
|
|
27158
|
-
/* @__PURE__ */
|
|
27503
|
+
/* @__PURE__ */ jsx72(Search3, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
27504
|
+
/* @__PURE__ */ jsx72(
|
|
27159
27505
|
CommandPrimitive.Input,
|
|
27160
27506
|
{
|
|
27161
27507
|
ref,
|
|
@@ -27168,7 +27514,7 @@ var CommandInput = React43.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
27168
27514
|
)
|
|
27169
27515
|
] }));
|
|
27170
27516
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
27171
|
-
var CommandList = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27517
|
+
var CommandList = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx72(
|
|
27172
27518
|
CommandPrimitive.List,
|
|
27173
27519
|
{
|
|
27174
27520
|
ref,
|
|
@@ -27177,9 +27523,9 @@ var CommandList = React43.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
27177
27523
|
}
|
|
27178
27524
|
));
|
|
27179
27525
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
27180
|
-
var CommandEmpty = React43.forwardRef((props, ref) => /* @__PURE__ */
|
|
27526
|
+
var CommandEmpty = React43.forwardRef((props, ref) => /* @__PURE__ */ jsx72(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
27181
27527
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
27182
|
-
var CommandGroup = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27528
|
+
var CommandGroup = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx72(
|
|
27183
27529
|
CommandPrimitive.Group,
|
|
27184
27530
|
{
|
|
27185
27531
|
ref,
|
|
@@ -27191,9 +27537,9 @@ var CommandGroup = React43.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
27191
27537
|
}
|
|
27192
27538
|
));
|
|
27193
27539
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
27194
|
-
var CommandSeparator = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27540
|
+
var CommandSeparator = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx72(CommandPrimitive.Separator, { ref, className: cn("-mx-1 h-px bg-border", className), ...props }));
|
|
27195
27541
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
27196
|
-
var CommandItem = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27542
|
+
var CommandItem = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx72(
|
|
27197
27543
|
CommandPrimitive.Item,
|
|
27198
27544
|
{
|
|
27199
27545
|
ref,
|
|
@@ -27206,7 +27552,7 @@ var CommandItem = React43.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
27206
27552
|
));
|
|
27207
27553
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
27208
27554
|
var CommandShortcut = ({ className, ...props }) => {
|
|
27209
|
-
return /* @__PURE__ */
|
|
27555
|
+
return /* @__PURE__ */ jsx72("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
27210
27556
|
};
|
|
27211
27557
|
CommandShortcut.displayName = "CommandShortcut";
|
|
27212
27558
|
|
|
@@ -27214,7 +27560,7 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
27214
27560
|
import * as React44 from "react";
|
|
27215
27561
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
27216
27562
|
import { Check as Check7, ChevronRight as ChevronRight5, Circle as Circle3 } from "lucide-react";
|
|
27217
|
-
import { jsx as
|
|
27563
|
+
import { jsx as jsx73, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
27218
27564
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
27219
27565
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
27220
27566
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
@@ -27233,12 +27579,12 @@ var ContextMenuSubTrigger = React44.forwardRef(({ className, inset, children, ..
|
|
|
27233
27579
|
...props,
|
|
27234
27580
|
children: [
|
|
27235
27581
|
children,
|
|
27236
|
-
/* @__PURE__ */
|
|
27582
|
+
/* @__PURE__ */ jsx73(ChevronRight5, { className: "ml-auto h-4 w-4" })
|
|
27237
27583
|
]
|
|
27238
27584
|
}
|
|
27239
27585
|
));
|
|
27240
27586
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
27241
|
-
var ContextMenuSubContent = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27587
|
+
var ContextMenuSubContent = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx73(
|
|
27242
27588
|
ContextMenuPrimitive.SubContent,
|
|
27243
27589
|
{
|
|
27244
27590
|
ref,
|
|
@@ -27250,7 +27596,7 @@ var ContextMenuSubContent = React44.forwardRef(({ className, ...props }, ref) =>
|
|
|
27250
27596
|
}
|
|
27251
27597
|
));
|
|
27252
27598
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
27253
|
-
var ContextMenuContent = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27599
|
+
var ContextMenuContent = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx73(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx73(
|
|
27254
27600
|
ContextMenuPrimitive.Content,
|
|
27255
27601
|
{
|
|
27256
27602
|
ref,
|
|
@@ -27262,7 +27608,7 @@ var ContextMenuContent = React44.forwardRef(({ className, ...props }, ref) => /*
|
|
|
27262
27608
|
}
|
|
27263
27609
|
) }));
|
|
27264
27610
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
27265
|
-
var ContextMenuItem = React44.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
27611
|
+
var ContextMenuItem = React44.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx73(
|
|
27266
27612
|
ContextMenuPrimitive.Item,
|
|
27267
27613
|
{
|
|
27268
27614
|
ref,
|
|
@@ -27286,7 +27632,7 @@ var ContextMenuCheckboxItem = React44.forwardRef(({ className, children, checked
|
|
|
27286
27632
|
checked,
|
|
27287
27633
|
...props,
|
|
27288
27634
|
children: [
|
|
27289
|
-
/* @__PURE__ */
|
|
27635
|
+
/* @__PURE__ */ jsx73("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx73(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx73(Check7, { className: "h-4 w-4" }) }) }),
|
|
27290
27636
|
children
|
|
27291
27637
|
]
|
|
27292
27638
|
}
|
|
@@ -27302,13 +27648,13 @@ var ContextMenuRadioItem = React44.forwardRef(({ className, children, ...props }
|
|
|
27302
27648
|
),
|
|
27303
27649
|
...props,
|
|
27304
27650
|
children: [
|
|
27305
|
-
/* @__PURE__ */
|
|
27651
|
+
/* @__PURE__ */ jsx73("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx73(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx73(Circle3, { className: "h-2 w-2 fill-current" }) }) }),
|
|
27306
27652
|
children
|
|
27307
27653
|
]
|
|
27308
27654
|
}
|
|
27309
27655
|
));
|
|
27310
27656
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
27311
|
-
var ContextMenuLabel = React44.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
27657
|
+
var ContextMenuLabel = React44.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx73(
|
|
27312
27658
|
ContextMenuPrimitive.Label,
|
|
27313
27659
|
{
|
|
27314
27660
|
ref,
|
|
@@ -27317,10 +27663,10 @@ var ContextMenuLabel = React44.forwardRef(({ className, inset, ...props }, ref)
|
|
|
27317
27663
|
}
|
|
27318
27664
|
));
|
|
27319
27665
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
27320
|
-
var ContextMenuSeparator = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27666
|
+
var ContextMenuSeparator = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx73(ContextMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
|
|
27321
27667
|
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
27322
27668
|
var ContextMenuShortcut = ({ className, ...props }) => {
|
|
27323
|
-
return /* @__PURE__ */
|
|
27669
|
+
return /* @__PURE__ */ jsx73("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
27324
27670
|
};
|
|
27325
27671
|
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
27326
27672
|
|
|
@@ -27333,19 +27679,19 @@ import { Controller, FormProvider, useFormContext } from "react-hook-form";
|
|
|
27333
27679
|
import * as React45 from "react";
|
|
27334
27680
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
27335
27681
|
import { cva as cva4 } from "class-variance-authority";
|
|
27336
|
-
import { jsx as
|
|
27682
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
27337
27683
|
var labelVariants = cva4("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
27338
|
-
var Label4 = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27684
|
+
var Label4 = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx74(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
27339
27685
|
Label4.displayName = LabelPrimitive.Root.displayName;
|
|
27340
27686
|
|
|
27341
27687
|
// src/components/ui/form.tsx
|
|
27342
|
-
import { jsx as
|
|
27688
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
27343
27689
|
var Form = FormProvider;
|
|
27344
27690
|
var FormFieldContext = React46.createContext({});
|
|
27345
27691
|
var FormField = ({
|
|
27346
27692
|
...props
|
|
27347
27693
|
}) => {
|
|
27348
|
-
return /* @__PURE__ */
|
|
27694
|
+
return /* @__PURE__ */ jsx75(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx75(Controller, { ...props }) });
|
|
27349
27695
|
};
|
|
27350
27696
|
var useFormField = () => {
|
|
27351
27697
|
const fieldContext = React46.useContext(FormFieldContext);
|
|
@@ -27369,19 +27715,19 @@ var FormItemContext = React46.createContext({});
|
|
|
27369
27715
|
var FormItem = React46.forwardRef(
|
|
27370
27716
|
({ className, ...props }, ref) => {
|
|
27371
27717
|
const id = React46.useId();
|
|
27372
|
-
return /* @__PURE__ */
|
|
27718
|
+
return /* @__PURE__ */ jsx75(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx75("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
27373
27719
|
}
|
|
27374
27720
|
);
|
|
27375
27721
|
FormItem.displayName = "FormItem";
|
|
27376
27722
|
var FormLabel = React46.forwardRef(({ className, ...props }, ref) => {
|
|
27377
27723
|
const { error, formItemId } = useFormField();
|
|
27378
|
-
return /* @__PURE__ */
|
|
27724
|
+
return /* @__PURE__ */ jsx75(Label4, { ref, className: cn(error && "text-destructive", className), htmlFor: formItemId, ...props });
|
|
27379
27725
|
});
|
|
27380
27726
|
FormLabel.displayName = "FormLabel";
|
|
27381
27727
|
var FormControl = React46.forwardRef(
|
|
27382
27728
|
({ ...props }, ref) => {
|
|
27383
27729
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
27384
|
-
return /* @__PURE__ */
|
|
27730
|
+
return /* @__PURE__ */ jsx75(
|
|
27385
27731
|
Slot3,
|
|
27386
27732
|
{
|
|
27387
27733
|
ref,
|
|
@@ -27397,7 +27743,7 @@ FormControl.displayName = "FormControl";
|
|
|
27397
27743
|
var FormDescription = React46.forwardRef(
|
|
27398
27744
|
({ className, ...props }, ref) => {
|
|
27399
27745
|
const { formDescriptionId } = useFormField();
|
|
27400
|
-
return /* @__PURE__ */
|
|
27746
|
+
return /* @__PURE__ */ jsx75("p", { ref, id: formDescriptionId, className: cn("text-sm text-muted-foreground", className), ...props });
|
|
27401
27747
|
}
|
|
27402
27748
|
);
|
|
27403
27749
|
FormDescription.displayName = "FormDescription";
|
|
@@ -27408,17 +27754,17 @@ var FormMessage = React46.forwardRef(
|
|
|
27408
27754
|
if (!body) {
|
|
27409
27755
|
return null;
|
|
27410
27756
|
}
|
|
27411
|
-
return /* @__PURE__ */
|
|
27757
|
+
return /* @__PURE__ */ jsx75("p", { ref, id: formMessageId, className: cn("text-sm font-medium text-destructive", className), ...props, children: body });
|
|
27412
27758
|
}
|
|
27413
27759
|
);
|
|
27414
27760
|
FormMessage.displayName = "FormMessage";
|
|
27415
27761
|
|
|
27416
27762
|
// src/components/ui/glass-card.tsx
|
|
27417
27763
|
import * as React47 from "react";
|
|
27418
|
-
import { jsx as
|
|
27764
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
27419
27765
|
var GlassCard = React47.forwardRef(
|
|
27420
27766
|
({ className, ...props }, ref) => {
|
|
27421
|
-
return /* @__PURE__ */
|
|
27767
|
+
return /* @__PURE__ */ jsx76("div", { ref, className: cn("glass-card", className), ...props });
|
|
27422
27768
|
}
|
|
27423
27769
|
);
|
|
27424
27770
|
GlassCard.displayName = "GlassCard";
|
|
@@ -27426,10 +27772,10 @@ GlassCard.displayName = "GlassCard";
|
|
|
27426
27772
|
// src/components/ui/hover-card.tsx
|
|
27427
27773
|
import * as React48 from "react";
|
|
27428
27774
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
27429
|
-
import { jsx as
|
|
27775
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
27430
27776
|
var HoverCard = HoverCardPrimitive.Root;
|
|
27431
27777
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
27432
|
-
var HoverCardContent = React48.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
27778
|
+
var HoverCardContent = React48.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx77(
|
|
27433
27779
|
HoverCardPrimitive.Content,
|
|
27434
27780
|
{
|
|
27435
27781
|
ref,
|
|
@@ -27448,9 +27794,9 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
|
27448
27794
|
import * as React49 from "react";
|
|
27449
27795
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
27450
27796
|
import { Dot } from "lucide-react";
|
|
27451
|
-
import { jsx as
|
|
27797
|
+
import { jsx as jsx78, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
27452
27798
|
var InputOTP = React49.forwardRef(
|
|
27453
|
-
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
27799
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
27454
27800
|
OTPInput,
|
|
27455
27801
|
{
|
|
27456
27802
|
ref,
|
|
@@ -27462,7 +27808,7 @@ var InputOTP = React49.forwardRef(
|
|
|
27462
27808
|
);
|
|
27463
27809
|
InputOTP.displayName = "InputOTP";
|
|
27464
27810
|
var InputOTPGroup = React49.forwardRef(
|
|
27465
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
27811
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx78("div", { ref, className: cn("flex items-center", className), ...props })
|
|
27466
27812
|
);
|
|
27467
27813
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
27468
27814
|
var InputOTPSlot = React49.forwardRef(({ index, className, ...props }, ref) => {
|
|
@@ -27480,14 +27826,14 @@ var InputOTPSlot = React49.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
27480
27826
|
...props,
|
|
27481
27827
|
children: [
|
|
27482
27828
|
char,
|
|
27483
|
-
hasFakeCaret && /* @__PURE__ */
|
|
27829
|
+
hasFakeCaret && /* @__PURE__ */ jsx78("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx78("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
|
|
27484
27830
|
]
|
|
27485
27831
|
}
|
|
27486
27832
|
);
|
|
27487
27833
|
});
|
|
27488
27834
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
27489
27835
|
var InputOTPSeparator = React49.forwardRef(
|
|
27490
|
-
({ ...props }, ref) => /* @__PURE__ */
|
|
27836
|
+
({ ...props }, ref) => /* @__PURE__ */ jsx78("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx78(Dot, {}) })
|
|
27491
27837
|
);
|
|
27492
27838
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
27493
27839
|
|
|
@@ -27495,13 +27841,13 @@ InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
|
27495
27841
|
import * as React50 from "react";
|
|
27496
27842
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
27497
27843
|
import { Check as Check8, ChevronRight as ChevronRight6, Circle as Circle4 } from "lucide-react";
|
|
27498
|
-
import { jsx as
|
|
27844
|
+
import { jsx as jsx79, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
27499
27845
|
var MenubarMenu = MenubarPrimitive.Menu;
|
|
27500
27846
|
var MenubarGroup = MenubarPrimitive.Group;
|
|
27501
27847
|
var MenubarPortal = MenubarPrimitive.Portal;
|
|
27502
27848
|
var MenubarSub = MenubarPrimitive.Sub;
|
|
27503
27849
|
var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
27504
|
-
var Menubar = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27850
|
+
var Menubar = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx79(
|
|
27505
27851
|
MenubarPrimitive.Root,
|
|
27506
27852
|
{
|
|
27507
27853
|
ref,
|
|
@@ -27510,7 +27856,7 @@ var Menubar = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
27510
27856
|
}
|
|
27511
27857
|
));
|
|
27512
27858
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
27513
|
-
var MenubarTrigger = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27859
|
+
var MenubarTrigger = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx79(
|
|
27514
27860
|
MenubarPrimitive.Trigger,
|
|
27515
27861
|
{
|
|
27516
27862
|
ref,
|
|
@@ -27534,12 +27880,12 @@ var MenubarSubTrigger = React50.forwardRef(({ className, inset, children, ...pro
|
|
|
27534
27880
|
...props,
|
|
27535
27881
|
children: [
|
|
27536
27882
|
children,
|
|
27537
|
-
/* @__PURE__ */
|
|
27883
|
+
/* @__PURE__ */ jsx79(ChevronRight6, { className: "ml-auto h-4 w-4" })
|
|
27538
27884
|
]
|
|
27539
27885
|
}
|
|
27540
27886
|
));
|
|
27541
27887
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
27542
|
-
var MenubarSubContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27888
|
+
var MenubarSubContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx79(
|
|
27543
27889
|
MenubarPrimitive.SubContent,
|
|
27544
27890
|
{
|
|
27545
27891
|
ref,
|
|
@@ -27551,7 +27897,7 @@ var MenubarSubContent = React50.forwardRef(({ className, ...props }, ref) => /*
|
|
|
27551
27897
|
}
|
|
27552
27898
|
));
|
|
27553
27899
|
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
27554
|
-
var MenubarContent = React50.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */
|
|
27900
|
+
var MenubarContent = React50.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx79(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx79(
|
|
27555
27901
|
MenubarPrimitive.Content,
|
|
27556
27902
|
{
|
|
27557
27903
|
ref,
|
|
@@ -27566,7 +27912,7 @@ var MenubarContent = React50.forwardRef(({ className, align = "start", alignOffs
|
|
|
27566
27912
|
}
|
|
27567
27913
|
) }));
|
|
27568
27914
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
27569
|
-
var MenubarItem = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
27915
|
+
var MenubarItem = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx79(
|
|
27570
27916
|
MenubarPrimitive.Item,
|
|
27571
27917
|
{
|
|
27572
27918
|
ref,
|
|
@@ -27590,7 +27936,7 @@ var MenubarCheckboxItem = React50.forwardRef(({ className, children, checked, ..
|
|
|
27590
27936
|
checked,
|
|
27591
27937
|
...props,
|
|
27592
27938
|
children: [
|
|
27593
|
-
/* @__PURE__ */
|
|
27939
|
+
/* @__PURE__ */ jsx79("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx79(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx79(Check8, { className: "h-4 w-4" }) }) }),
|
|
27594
27940
|
children
|
|
27595
27941
|
]
|
|
27596
27942
|
}
|
|
@@ -27606,13 +27952,13 @@ var MenubarRadioItem = React50.forwardRef(({ className, children, ...props }, re
|
|
|
27606
27952
|
),
|
|
27607
27953
|
...props,
|
|
27608
27954
|
children: [
|
|
27609
|
-
/* @__PURE__ */
|
|
27955
|
+
/* @__PURE__ */ jsx79("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx79(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx79(Circle4, { className: "h-2 w-2 fill-current" }) }) }),
|
|
27610
27956
|
children
|
|
27611
27957
|
]
|
|
27612
27958
|
}
|
|
27613
27959
|
));
|
|
27614
27960
|
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
27615
|
-
var MenubarLabel = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
27961
|
+
var MenubarLabel = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx79(
|
|
27616
27962
|
MenubarPrimitive.Label,
|
|
27617
27963
|
{
|
|
27618
27964
|
ref,
|
|
@@ -27621,10 +27967,10 @@ var MenubarLabel = React50.forwardRef(({ className, inset, ...props }, ref) => /
|
|
|
27621
27967
|
}
|
|
27622
27968
|
));
|
|
27623
27969
|
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
27624
|
-
var MenubarSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27970
|
+
var MenubarSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx79(MenubarPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
27625
27971
|
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
27626
27972
|
var MenubarShortcut = ({ className, ...props }) => {
|
|
27627
|
-
return /* @__PURE__ */
|
|
27973
|
+
return /* @__PURE__ */ jsx79("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
27628
27974
|
};
|
|
27629
27975
|
MenubarShortcut.displayname = "MenubarShortcut";
|
|
27630
27976
|
|
|
@@ -27633,7 +27979,7 @@ import * as React51 from "react";
|
|
|
27633
27979
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
27634
27980
|
import { cva as cva5 } from "class-variance-authority";
|
|
27635
27981
|
import { ChevronDown as ChevronDown7 } from "lucide-react";
|
|
27636
|
-
import { jsx as
|
|
27982
|
+
import { jsx as jsx80, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
27637
27983
|
var NavigationMenu = React51.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs49(
|
|
27638
27984
|
NavigationMenuPrimitive.Root,
|
|
27639
27985
|
{
|
|
@@ -27642,12 +27988,12 @@ var NavigationMenu = React51.forwardRef(({ className, children, ...props }, ref)
|
|
|
27642
27988
|
...props,
|
|
27643
27989
|
children: [
|
|
27644
27990
|
children,
|
|
27645
|
-
/* @__PURE__ */
|
|
27991
|
+
/* @__PURE__ */ jsx80(NavigationMenuViewport, {})
|
|
27646
27992
|
]
|
|
27647
27993
|
}
|
|
27648
27994
|
));
|
|
27649
27995
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
27650
|
-
var NavigationMenuList = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
27996
|
+
var NavigationMenuList = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx80(
|
|
27651
27997
|
NavigationMenuPrimitive.List,
|
|
27652
27998
|
{
|
|
27653
27999
|
ref,
|
|
@@ -27669,7 +28015,7 @@ var NavigationMenuTrigger = React51.forwardRef(({ className, children, ...props
|
|
|
27669
28015
|
children: [
|
|
27670
28016
|
children,
|
|
27671
28017
|
" ",
|
|
27672
|
-
/* @__PURE__ */
|
|
28018
|
+
/* @__PURE__ */ jsx80(
|
|
27673
28019
|
ChevronDown7,
|
|
27674
28020
|
{
|
|
27675
28021
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
@@ -27680,7 +28026,7 @@ var NavigationMenuTrigger = React51.forwardRef(({ className, children, ...props
|
|
|
27680
28026
|
}
|
|
27681
28027
|
));
|
|
27682
28028
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
27683
|
-
var NavigationMenuContent = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28029
|
+
var NavigationMenuContent = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx80(
|
|
27684
28030
|
NavigationMenuPrimitive.Content,
|
|
27685
28031
|
{
|
|
27686
28032
|
ref,
|
|
@@ -27693,7 +28039,7 @@ var NavigationMenuContent = React51.forwardRef(({ className, ...props }, ref) =>
|
|
|
27693
28039
|
));
|
|
27694
28040
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
27695
28041
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
27696
|
-
var NavigationMenuViewport = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28042
|
+
var NavigationMenuViewport = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx80("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx80(
|
|
27697
28043
|
NavigationMenuPrimitive.Viewport,
|
|
27698
28044
|
{
|
|
27699
28045
|
className: cn(
|
|
@@ -27705,7 +28051,7 @@ var NavigationMenuViewport = React51.forwardRef(({ className, ...props }, ref) =
|
|
|
27705
28051
|
}
|
|
27706
28052
|
) }));
|
|
27707
28053
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
27708
|
-
var NavigationMenuIndicator = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28054
|
+
var NavigationMenuIndicator = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx80(
|
|
27709
28055
|
NavigationMenuPrimitive.Indicator,
|
|
27710
28056
|
{
|
|
27711
28057
|
ref,
|
|
@@ -27714,7 +28060,7 @@ var NavigationMenuIndicator = React51.forwardRef(({ className, ...props }, ref)
|
|
|
27714
28060
|
className
|
|
27715
28061
|
),
|
|
27716
28062
|
...props,
|
|
27717
|
-
children: /* @__PURE__ */
|
|
28063
|
+
children: /* @__PURE__ */ jsx80("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
27718
28064
|
}
|
|
27719
28065
|
));
|
|
27720
28066
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
@@ -27722,8 +28068,8 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
|
|
|
27722
28068
|
// src/components/ui/pagination.tsx
|
|
27723
28069
|
import * as React52 from "react";
|
|
27724
28070
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight7, MoreHorizontal as MoreHorizontal2 } from "lucide-react";
|
|
27725
|
-
import { jsx as
|
|
27726
|
-
var Pagination = ({ className, ...props }) => /* @__PURE__ */
|
|
28071
|
+
import { jsx as jsx81, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
28072
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx81(
|
|
27727
28073
|
"nav",
|
|
27728
28074
|
{
|
|
27729
28075
|
role: "navigation",
|
|
@@ -27734,12 +28080,12 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx80(
|
|
|
27734
28080
|
);
|
|
27735
28081
|
Pagination.displayName = "Pagination";
|
|
27736
28082
|
var PaginationContent = React52.forwardRef(
|
|
27737
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28083
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx81("ul", { ref, className: cn("flex flex-row items-center gap-1", className), ...props })
|
|
27738
28084
|
);
|
|
27739
28085
|
PaginationContent.displayName = "PaginationContent";
|
|
27740
|
-
var PaginationItem = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28086
|
+
var PaginationItem = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx81("li", { ref, className: cn("", className), ...props }));
|
|
27741
28087
|
PaginationItem.displayName = "PaginationItem";
|
|
27742
|
-
var PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */
|
|
28088
|
+
var PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx81(
|
|
27743
28089
|
"a",
|
|
27744
28090
|
{
|
|
27745
28091
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -27755,28 +28101,28 @@ var PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @_
|
|
|
27755
28101
|
);
|
|
27756
28102
|
PaginationLink.displayName = "PaginationLink";
|
|
27757
28103
|
var PaginationPrevious = ({ className, ...props }) => /* @__PURE__ */ jsxs50(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("gap-1 pl-2.5", className), ...props, children: [
|
|
27758
|
-
/* @__PURE__ */
|
|
27759
|
-
/* @__PURE__ */
|
|
28104
|
+
/* @__PURE__ */ jsx81(ChevronLeft2, { className: "h-4 w-4" }),
|
|
28105
|
+
/* @__PURE__ */ jsx81("span", { children: "Previous" })
|
|
27760
28106
|
] });
|
|
27761
28107
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
27762
28108
|
var PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs50(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("gap-1 pr-2.5", className), ...props, children: [
|
|
27763
|
-
/* @__PURE__ */
|
|
27764
|
-
/* @__PURE__ */
|
|
28109
|
+
/* @__PURE__ */ jsx81("span", { children: "Next" }),
|
|
28110
|
+
/* @__PURE__ */ jsx81(ChevronRight7, { className: "h-4 w-4" })
|
|
27765
28111
|
] });
|
|
27766
28112
|
PaginationNext.displayName = "PaginationNext";
|
|
27767
28113
|
var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs50("span", { "aria-hidden": true, className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [
|
|
27768
|
-
/* @__PURE__ */
|
|
27769
|
-
/* @__PURE__ */
|
|
28114
|
+
/* @__PURE__ */ jsx81(MoreHorizontal2, { className: "h-4 w-4" }),
|
|
28115
|
+
/* @__PURE__ */ jsx81("span", { className: "sr-only", children: "More pages" })
|
|
27770
28116
|
] });
|
|
27771
28117
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
27772
28118
|
|
|
27773
28119
|
// src/components/ui/popover.tsx
|
|
27774
28120
|
import * as React53 from "react";
|
|
27775
28121
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
27776
|
-
import { jsx as
|
|
28122
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
27777
28123
|
var Popover = PopoverPrimitive.Root;
|
|
27778
28124
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
27779
|
-
var PopoverContent = React53.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
28125
|
+
var PopoverContent = React53.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx82(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx82(
|
|
27780
28126
|
PopoverPrimitive.Content,
|
|
27781
28127
|
{
|
|
27782
28128
|
ref,
|
|
@@ -27795,13 +28141,13 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
|
27795
28141
|
import * as React54 from "react";
|
|
27796
28142
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
27797
28143
|
import { Circle as Circle5 } from "lucide-react";
|
|
27798
|
-
import { jsx as
|
|
28144
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
27799
28145
|
var RadioGroup4 = React54.forwardRef(({ className, ...props }, ref) => {
|
|
27800
|
-
return /* @__PURE__ */
|
|
28146
|
+
return /* @__PURE__ */ jsx83(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref });
|
|
27801
28147
|
});
|
|
27802
28148
|
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
27803
28149
|
var RadioGroupItem = React54.forwardRef(({ className, ...props }, ref) => {
|
|
27804
|
-
return /* @__PURE__ */
|
|
28150
|
+
return /* @__PURE__ */ jsx83(
|
|
27805
28151
|
RadioGroupPrimitive.Item,
|
|
27806
28152
|
{
|
|
27807
28153
|
ref,
|
|
@@ -27810,7 +28156,7 @@ var RadioGroupItem = React54.forwardRef(({ className, ...props }, ref) => {
|
|
|
27810
28156
|
className
|
|
27811
28157
|
),
|
|
27812
28158
|
...props,
|
|
27813
|
-
children: /* @__PURE__ */
|
|
28159
|
+
children: /* @__PURE__ */ jsx83(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx83(Circle5, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
27814
28160
|
}
|
|
27815
28161
|
);
|
|
27816
28162
|
});
|
|
@@ -27819,8 +28165,8 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
27819
28165
|
// src/components/ui/resizable.tsx
|
|
27820
28166
|
import { GripVertical } from "lucide-react";
|
|
27821
28167
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
27822
|
-
import { jsx as
|
|
27823
|
-
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */
|
|
28168
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
28169
|
+
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx84(
|
|
27824
28170
|
ResizablePrimitive.PanelGroup,
|
|
27825
28171
|
{
|
|
27826
28172
|
className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
@@ -27832,7 +28178,7 @@ var ResizableHandle = ({
|
|
|
27832
28178
|
withHandle,
|
|
27833
28179
|
className,
|
|
27834
28180
|
...props
|
|
27835
|
-
}) => /* @__PURE__ */
|
|
28181
|
+
}) => /* @__PURE__ */ jsx84(
|
|
27836
28182
|
ResizablePrimitive.PanelResizeHandle,
|
|
27837
28183
|
{
|
|
27838
28184
|
className: cn(
|
|
@@ -27840,15 +28186,15 @@ var ResizableHandle = ({
|
|
|
27840
28186
|
className
|
|
27841
28187
|
),
|
|
27842
28188
|
...props,
|
|
27843
|
-
children: withHandle && /* @__PURE__ */
|
|
28189
|
+
children: withHandle && /* @__PURE__ */ jsx84("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx84(GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
27844
28190
|
}
|
|
27845
28191
|
);
|
|
27846
28192
|
|
|
27847
28193
|
// src/components/ui/separator.tsx
|
|
27848
28194
|
import * as React55 from "react";
|
|
27849
28195
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
27850
|
-
import { jsx as
|
|
27851
|
-
var Separator5 = React55.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */
|
|
28196
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
28197
|
+
var Separator5 = React55.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx85(
|
|
27852
28198
|
SeparatorPrimitive.Root,
|
|
27853
28199
|
{
|
|
27854
28200
|
ref,
|
|
@@ -27865,12 +28211,12 @@ import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
|
27865
28211
|
import { cva as cva6 } from "class-variance-authority";
|
|
27866
28212
|
import { X as X7 } from "lucide-react";
|
|
27867
28213
|
import * as React56 from "react";
|
|
27868
|
-
import { jsx as
|
|
28214
|
+
import { jsx as jsx86, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
27869
28215
|
var Sheet = SheetPrimitive.Root;
|
|
27870
28216
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
27871
28217
|
var SheetClose = SheetPrimitive.Close;
|
|
27872
28218
|
var SheetPortal = SheetPrimitive.Portal;
|
|
27873
|
-
var SheetOverlay = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28219
|
+
var SheetOverlay = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx86(
|
|
27874
28220
|
SheetPrimitive.Overlay,
|
|
27875
28221
|
{
|
|
27876
28222
|
className: cn(
|
|
@@ -27908,7 +28254,7 @@ var SheetContent = React56.forwardRef(
|
|
|
27908
28254
|
closeButtonLabel = "Close",
|
|
27909
28255
|
...props
|
|
27910
28256
|
}, ref) => /* @__PURE__ */ jsxs51(SheetPortal, { children: [
|
|
27911
|
-
/* @__PURE__ */
|
|
28257
|
+
/* @__PURE__ */ jsx86(SheetOverlay, {}),
|
|
27912
28258
|
/* @__PURE__ */ jsxs51(SheetPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
|
|
27913
28259
|
children,
|
|
27914
28260
|
showCloseButton ? /* @__PURE__ */ jsxs51(
|
|
@@ -27919,8 +28265,8 @@ var SheetContent = React56.forwardRef(
|
|
|
27919
28265
|
closeButtonClassName
|
|
27920
28266
|
),
|
|
27921
28267
|
children: [
|
|
27922
|
-
/* @__PURE__ */
|
|
27923
|
-
/* @__PURE__ */
|
|
28268
|
+
/* @__PURE__ */ jsx86(X7, { className: "h-4 w-4" }),
|
|
28269
|
+
/* @__PURE__ */ jsx86("span", { className: "sr-only", children: closeButtonLabel })
|
|
27924
28270
|
]
|
|
27925
28271
|
}
|
|
27926
28272
|
) : null
|
|
@@ -27928,13 +28274,13 @@ var SheetContent = React56.forwardRef(
|
|
|
27928
28274
|
] })
|
|
27929
28275
|
);
|
|
27930
28276
|
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
27931
|
-
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
28277
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx86("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
27932
28278
|
SheetHeader.displayName = "SheetHeader";
|
|
27933
|
-
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
28279
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx86("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
27934
28280
|
SheetFooter.displayName = "SheetFooter";
|
|
27935
|
-
var SheetTitle = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28281
|
+
var SheetTitle = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx86(SheetPrimitive.Title, { ref, className: cn("text-lg font-semibold text-foreground", className), ...props }));
|
|
27936
28282
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
27937
|
-
var SheetDescription = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28283
|
+
var SheetDescription = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx86(SheetPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
27938
28284
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
27939
28285
|
|
|
27940
28286
|
// src/components/ui/sidebar.tsx
|
|
@@ -27961,7 +28307,7 @@ function useIsMobile() {
|
|
|
27961
28307
|
}
|
|
27962
28308
|
|
|
27963
28309
|
// src/components/ui/sidebar.tsx
|
|
27964
|
-
import { jsx as
|
|
28310
|
+
import { jsx as jsx87, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
27965
28311
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
27966
28312
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
27967
28313
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -28019,7 +28365,7 @@ var SidebarProvider = React58.forwardRef(({ defaultOpen = true, open: openProp,
|
|
|
28019
28365
|
}),
|
|
28020
28366
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
28021
28367
|
);
|
|
28022
|
-
return /* @__PURE__ */
|
|
28368
|
+
return /* @__PURE__ */ jsx87(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx87(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx87(
|
|
28023
28369
|
"div",
|
|
28024
28370
|
{
|
|
28025
28371
|
style: {
|
|
@@ -28038,7 +28384,7 @@ SidebarProvider.displayName = "SidebarProvider";
|
|
|
28038
28384
|
var Sidebar = React58.forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
28039
28385
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
28040
28386
|
if (collapsible === "none") {
|
|
28041
|
-
return /* @__PURE__ */
|
|
28387
|
+
return /* @__PURE__ */ jsx87(
|
|
28042
28388
|
"div",
|
|
28043
28389
|
{
|
|
28044
28390
|
className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
@@ -28049,7 +28395,7 @@ var Sidebar = React58.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
28049
28395
|
);
|
|
28050
28396
|
}
|
|
28051
28397
|
if (isMobile) {
|
|
28052
|
-
return /* @__PURE__ */
|
|
28398
|
+
return /* @__PURE__ */ jsx87(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx87(
|
|
28053
28399
|
SheetContent,
|
|
28054
28400
|
{
|
|
28055
28401
|
"data-sidebar": "sidebar",
|
|
@@ -28059,7 +28405,7 @@ var Sidebar = React58.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
28059
28405
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
28060
28406
|
},
|
|
28061
28407
|
side,
|
|
28062
|
-
children: /* @__PURE__ */
|
|
28408
|
+
children: /* @__PURE__ */ jsx87("div", { className: "flex h-full w-full flex-col", children })
|
|
28063
28409
|
}
|
|
28064
28410
|
) });
|
|
28065
28411
|
}
|
|
@@ -28073,7 +28419,7 @@ var Sidebar = React58.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
28073
28419
|
"data-variant": variant,
|
|
28074
28420
|
"data-side": side,
|
|
28075
28421
|
children: [
|
|
28076
|
-
/* @__PURE__ */
|
|
28422
|
+
/* @__PURE__ */ jsx87(
|
|
28077
28423
|
"div",
|
|
28078
28424
|
{
|
|
28079
28425
|
className: cn(
|
|
@@ -28084,7 +28430,7 @@ var Sidebar = React58.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
28084
28430
|
)
|
|
28085
28431
|
}
|
|
28086
28432
|
),
|
|
28087
|
-
/* @__PURE__ */
|
|
28433
|
+
/* @__PURE__ */ jsx87(
|
|
28088
28434
|
"div",
|
|
28089
28435
|
{
|
|
28090
28436
|
className: cn(
|
|
@@ -28095,7 +28441,7 @@ var Sidebar = React58.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
28095
28441
|
className
|
|
28096
28442
|
),
|
|
28097
28443
|
...props,
|
|
28098
|
-
children: /* @__PURE__ */
|
|
28444
|
+
children: /* @__PURE__ */ jsx87(
|
|
28099
28445
|
"div",
|
|
28100
28446
|
{
|
|
28101
28447
|
"data-sidebar": "sidebar",
|
|
@@ -28127,8 +28473,8 @@ var SidebarTrigger = React58.forwardRef(
|
|
|
28127
28473
|
},
|
|
28128
28474
|
...props,
|
|
28129
28475
|
children: [
|
|
28130
|
-
/* @__PURE__ */
|
|
28131
|
-
/* @__PURE__ */
|
|
28476
|
+
/* @__PURE__ */ jsx87(PanelLeft2, {}),
|
|
28477
|
+
/* @__PURE__ */ jsx87("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
28132
28478
|
]
|
|
28133
28479
|
}
|
|
28134
28480
|
);
|
|
@@ -28138,7 +28484,7 @@ SidebarTrigger.displayName = "SidebarTrigger";
|
|
|
28138
28484
|
var SidebarRail = React58.forwardRef(
|
|
28139
28485
|
({ className, ...props }, ref) => {
|
|
28140
28486
|
const { toggleSidebar } = useSidebar();
|
|
28141
|
-
return /* @__PURE__ */
|
|
28487
|
+
return /* @__PURE__ */ jsx87(
|
|
28142
28488
|
"button",
|
|
28143
28489
|
{
|
|
28144
28490
|
ref,
|
|
@@ -28163,7 +28509,7 @@ var SidebarRail = React58.forwardRef(
|
|
|
28163
28509
|
);
|
|
28164
28510
|
SidebarRail.displayName = "SidebarRail";
|
|
28165
28511
|
var SidebarInset = React58.forwardRef(({ className, ...props }, ref) => {
|
|
28166
|
-
return /* @__PURE__ */
|
|
28512
|
+
return /* @__PURE__ */ jsx87(
|
|
28167
28513
|
"main",
|
|
28168
28514
|
{
|
|
28169
28515
|
ref,
|
|
@@ -28179,7 +28525,7 @@ var SidebarInset = React58.forwardRef(({ className, ...props }, ref) => {
|
|
|
28179
28525
|
SidebarInset.displayName = "SidebarInset";
|
|
28180
28526
|
var SidebarInput = React58.forwardRef(
|
|
28181
28527
|
({ className, ...props }, ref) => {
|
|
28182
|
-
return /* @__PURE__ */
|
|
28528
|
+
return /* @__PURE__ */ jsx87(
|
|
28183
28529
|
Input,
|
|
28184
28530
|
{
|
|
28185
28531
|
ref,
|
|
@@ -28195,16 +28541,16 @@ var SidebarInput = React58.forwardRef(
|
|
|
28195
28541
|
);
|
|
28196
28542
|
SidebarInput.displayName = "SidebarInput";
|
|
28197
28543
|
var SidebarHeader = React58.forwardRef(({ className, ...props }, ref) => {
|
|
28198
|
-
return /* @__PURE__ */
|
|
28544
|
+
return /* @__PURE__ */ jsx87("div", { ref, "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
28199
28545
|
});
|
|
28200
28546
|
SidebarHeader.displayName = "SidebarHeader";
|
|
28201
28547
|
var SidebarFooter = React58.forwardRef(({ className, ...props }, ref) => {
|
|
28202
|
-
return /* @__PURE__ */
|
|
28548
|
+
return /* @__PURE__ */ jsx87("div", { ref, "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
28203
28549
|
});
|
|
28204
28550
|
SidebarFooter.displayName = "SidebarFooter";
|
|
28205
28551
|
var SidebarSeparator = React58.forwardRef(
|
|
28206
28552
|
({ className, ...props }, ref) => {
|
|
28207
|
-
return /* @__PURE__ */
|
|
28553
|
+
return /* @__PURE__ */ jsx87(
|
|
28208
28554
|
Separator5,
|
|
28209
28555
|
{
|
|
28210
28556
|
ref,
|
|
@@ -28217,7 +28563,7 @@ var SidebarSeparator = React58.forwardRef(
|
|
|
28217
28563
|
);
|
|
28218
28564
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
28219
28565
|
var SidebarContent = React58.forwardRef(({ className, ...props }, ref) => {
|
|
28220
|
-
return /* @__PURE__ */
|
|
28566
|
+
return /* @__PURE__ */ jsx87(
|
|
28221
28567
|
"div",
|
|
28222
28568
|
{
|
|
28223
28569
|
ref,
|
|
@@ -28232,7 +28578,7 @@ var SidebarContent = React58.forwardRef(({ className, ...props }, ref) => {
|
|
|
28232
28578
|
});
|
|
28233
28579
|
SidebarContent.displayName = "SidebarContent";
|
|
28234
28580
|
var SidebarGroup = React58.forwardRef(({ className, ...props }, ref) => {
|
|
28235
|
-
return /* @__PURE__ */
|
|
28581
|
+
return /* @__PURE__ */ jsx87(
|
|
28236
28582
|
"div",
|
|
28237
28583
|
{
|
|
28238
28584
|
ref,
|
|
@@ -28246,7 +28592,7 @@ SidebarGroup.displayName = "SidebarGroup";
|
|
|
28246
28592
|
var SidebarGroupLabel = React58.forwardRef(
|
|
28247
28593
|
({ className, asChild = false, ...props }, ref) => {
|
|
28248
28594
|
const Comp = asChild ? Slot4 : "div";
|
|
28249
|
-
return /* @__PURE__ */
|
|
28595
|
+
return /* @__PURE__ */ jsx87(
|
|
28250
28596
|
Comp,
|
|
28251
28597
|
{
|
|
28252
28598
|
ref,
|
|
@@ -28265,7 +28611,7 @@ SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
|
28265
28611
|
var SidebarGroupAction = React58.forwardRef(
|
|
28266
28612
|
({ className, asChild = false, ...props }, ref) => {
|
|
28267
28613
|
const Comp = asChild ? Slot4 : "button";
|
|
28268
|
-
return /* @__PURE__ */
|
|
28614
|
+
return /* @__PURE__ */ jsx87(
|
|
28269
28615
|
Comp,
|
|
28270
28616
|
{
|
|
28271
28617
|
ref,
|
|
@@ -28284,12 +28630,12 @@ var SidebarGroupAction = React58.forwardRef(
|
|
|
28284
28630
|
);
|
|
28285
28631
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
28286
28632
|
var SidebarGroupContent = React58.forwardRef(
|
|
28287
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28633
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx87("div", { ref, "data-sidebar": "group-content", className: cn("w-full text-sm", className), ...props })
|
|
28288
28634
|
);
|
|
28289
28635
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
28290
|
-
var SidebarMenu = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28636
|
+
var SidebarMenu = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx87("ul", { ref, "data-sidebar": "menu", className: cn("flex w-full min-w-0 flex-col gap-1", className), ...props }));
|
|
28291
28637
|
SidebarMenu.displayName = "SidebarMenu";
|
|
28292
|
-
var SidebarMenuItem = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28638
|
+
var SidebarMenuItem = React58.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx87("li", { ref, "data-sidebar": "menu-item", className: cn("group/menu-item relative", className), ...props }));
|
|
28293
28639
|
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
28294
28640
|
var sidebarMenuButtonVariants = cva7(
|
|
28295
28641
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
@@ -28314,7 +28660,7 @@ var sidebarMenuButtonVariants = cva7(
|
|
|
28314
28660
|
var SidebarMenuButton = React58.forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
28315
28661
|
const Comp = asChild ? Slot4 : "button";
|
|
28316
28662
|
const { isMobile, state } = useSidebar();
|
|
28317
|
-
const button = /* @__PURE__ */
|
|
28663
|
+
const button = /* @__PURE__ */ jsx87(
|
|
28318
28664
|
Comp,
|
|
28319
28665
|
{
|
|
28320
28666
|
ref,
|
|
@@ -28334,14 +28680,14 @@ var SidebarMenuButton = React58.forwardRef(({ asChild = false, isActive = false,
|
|
|
28334
28680
|
};
|
|
28335
28681
|
}
|
|
28336
28682
|
return /* @__PURE__ */ jsxs52(Tooltip, { children: [
|
|
28337
|
-
/* @__PURE__ */
|
|
28338
|
-
/* @__PURE__ */
|
|
28683
|
+
/* @__PURE__ */ jsx87(TooltipTrigger, { asChild: true, children: button }),
|
|
28684
|
+
/* @__PURE__ */ jsx87(TooltipContent, { side: "right", align: "center", hidden: state !== "collapsed" || isMobile, ...tooltip })
|
|
28339
28685
|
] });
|
|
28340
28686
|
});
|
|
28341
28687
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
28342
28688
|
var SidebarMenuAction = React58.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
28343
28689
|
const Comp = asChild ? Slot4 : "button";
|
|
28344
|
-
return /* @__PURE__ */
|
|
28690
|
+
return /* @__PURE__ */ jsx87(
|
|
28345
28691
|
Comp,
|
|
28346
28692
|
{
|
|
28347
28693
|
ref,
|
|
@@ -28363,7 +28709,7 @@ var SidebarMenuAction = React58.forwardRef(({ className, asChild = false, showOn
|
|
|
28363
28709
|
});
|
|
28364
28710
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
28365
28711
|
var SidebarMenuBadge = React58.forwardRef(
|
|
28366
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28712
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx87(
|
|
28367
28713
|
"div",
|
|
28368
28714
|
{
|
|
28369
28715
|
ref,
|
|
@@ -28394,8 +28740,8 @@ var SidebarMenuSkeleton = React58.forwardRef(({ className, showIcon = false, ...
|
|
|
28394
28740
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
28395
28741
|
...props,
|
|
28396
28742
|
children: [
|
|
28397
|
-
showIcon && /* @__PURE__ */
|
|
28398
|
-
/* @__PURE__ */
|
|
28743
|
+
showIcon && /* @__PURE__ */ jsx87(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
28744
|
+
/* @__PURE__ */ jsx87(
|
|
28399
28745
|
Skeleton,
|
|
28400
28746
|
{
|
|
28401
28747
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -28411,7 +28757,7 @@ var SidebarMenuSkeleton = React58.forwardRef(({ className, showIcon = false, ...
|
|
|
28411
28757
|
});
|
|
28412
28758
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
28413
28759
|
var SidebarMenuSub = React58.forwardRef(
|
|
28414
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28760
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx87(
|
|
28415
28761
|
"ul",
|
|
28416
28762
|
{
|
|
28417
28763
|
ref,
|
|
@@ -28426,11 +28772,11 @@ var SidebarMenuSub = React58.forwardRef(
|
|
|
28426
28772
|
)
|
|
28427
28773
|
);
|
|
28428
28774
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
28429
|
-
var SidebarMenuSubItem = React58.forwardRef(({ ...props }, ref) => /* @__PURE__ */
|
|
28775
|
+
var SidebarMenuSubItem = React58.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx87("li", { ref, ...props }));
|
|
28430
28776
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
28431
28777
|
var SidebarMenuSubButton = React58.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
28432
28778
|
const Comp = asChild ? Slot4 : "a";
|
|
28433
|
-
return /* @__PURE__ */
|
|
28779
|
+
return /* @__PURE__ */ jsx87(
|
|
28434
28780
|
Comp,
|
|
28435
28781
|
{
|
|
28436
28782
|
ref,
|
|
@@ -28454,7 +28800,7 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
28454
28800
|
// src/components/ui/slider.tsx
|
|
28455
28801
|
import * as React59 from "react";
|
|
28456
28802
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
28457
|
-
import { jsx as
|
|
28803
|
+
import { jsx as jsx88, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
28458
28804
|
var Slider = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs53(
|
|
28459
28805
|
SliderPrimitive.Root,
|
|
28460
28806
|
{
|
|
@@ -28462,8 +28808,8 @@ var Slider = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
28462
28808
|
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
28463
28809
|
...props,
|
|
28464
28810
|
children: [
|
|
28465
|
-
/* @__PURE__ */
|
|
28466
|
-
/* @__PURE__ */
|
|
28811
|
+
/* @__PURE__ */ jsx88(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx88(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
28812
|
+
/* @__PURE__ */ jsx88(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" })
|
|
28467
28813
|
]
|
|
28468
28814
|
}
|
|
28469
28815
|
));
|
|
@@ -28471,25 +28817,25 @@ Slider.displayName = SliderPrimitive.Root.displayName;
|
|
|
28471
28817
|
|
|
28472
28818
|
// src/components/ui/table.tsx
|
|
28473
28819
|
import * as React60 from "react";
|
|
28474
|
-
import { jsx as
|
|
28820
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
28475
28821
|
var Table = React60.forwardRef(
|
|
28476
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28822
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx89("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
28477
28823
|
);
|
|
28478
28824
|
Table.displayName = "Table";
|
|
28479
28825
|
var TableHeader = React60.forwardRef(
|
|
28480
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28826
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
28481
28827
|
);
|
|
28482
28828
|
TableHeader.displayName = "TableHeader";
|
|
28483
28829
|
var TableBody = React60.forwardRef(
|
|
28484
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28830
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
|
|
28485
28831
|
);
|
|
28486
28832
|
TableBody.displayName = "TableBody";
|
|
28487
28833
|
var TableFooter = React60.forwardRef(
|
|
28488
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28834
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
|
|
28489
28835
|
);
|
|
28490
28836
|
TableFooter.displayName = "TableFooter";
|
|
28491
28837
|
var TableRow = React60.forwardRef(
|
|
28492
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28838
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89(
|
|
28493
28839
|
"tr",
|
|
28494
28840
|
{
|
|
28495
28841
|
ref,
|
|
@@ -28500,7 +28846,7 @@ var TableRow = React60.forwardRef(
|
|
|
28500
28846
|
);
|
|
28501
28847
|
TableRow.displayName = "TableRow";
|
|
28502
28848
|
var TableHead = React60.forwardRef(
|
|
28503
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28849
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89(
|
|
28504
28850
|
"th",
|
|
28505
28851
|
{
|
|
28506
28852
|
ref,
|
|
@@ -28514,11 +28860,11 @@ var TableHead = React60.forwardRef(
|
|
|
28514
28860
|
);
|
|
28515
28861
|
TableHead.displayName = "TableHead";
|
|
28516
28862
|
var TableCell = React60.forwardRef(
|
|
28517
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28863
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
|
|
28518
28864
|
);
|
|
28519
28865
|
TableCell.displayName = "TableCell";
|
|
28520
28866
|
var TableCaption = React60.forwardRef(
|
|
28521
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
28867
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx89("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
|
|
28522
28868
|
);
|
|
28523
28869
|
TableCaption.displayName = "TableCaption";
|
|
28524
28870
|
|
|
@@ -28527,9 +28873,9 @@ import * as React61 from "react";
|
|
|
28527
28873
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
28528
28874
|
import { cva as cva8 } from "class-variance-authority";
|
|
28529
28875
|
import { X as X8 } from "lucide-react";
|
|
28530
|
-
import { jsx as
|
|
28876
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
28531
28877
|
var ToastProvider = ToastPrimitives.Provider;
|
|
28532
|
-
var ToastViewport = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28878
|
+
var ToastViewport = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx90(
|
|
28533
28879
|
ToastPrimitives.Viewport,
|
|
28534
28880
|
{
|
|
28535
28881
|
ref,
|
|
@@ -28556,10 +28902,10 @@ var toastVariants = cva8(
|
|
|
28556
28902
|
}
|
|
28557
28903
|
);
|
|
28558
28904
|
var Toast = React61.forwardRef(({ className, variant, ...props }, ref) => {
|
|
28559
|
-
return /* @__PURE__ */
|
|
28905
|
+
return /* @__PURE__ */ jsx90(ToastPrimitives.Root, { ref, className: cn(toastVariants({ variant }), className), ...props });
|
|
28560
28906
|
});
|
|
28561
28907
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
28562
|
-
var ToastAction = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28908
|
+
var ToastAction = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx90(
|
|
28563
28909
|
ToastPrimitives.Action,
|
|
28564
28910
|
{
|
|
28565
28911
|
ref,
|
|
@@ -28571,7 +28917,7 @@ var ToastAction = React61.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
28571
28917
|
}
|
|
28572
28918
|
));
|
|
28573
28919
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
28574
|
-
var ToastClose = React61.forwardRef(({ className, onClick, ...props }, ref) => /* @__PURE__ */
|
|
28920
|
+
var ToastClose = React61.forwardRef(({ className, onClick, ...props }, ref) => /* @__PURE__ */ jsx90(
|
|
28575
28921
|
ToastPrimitives.Close,
|
|
28576
28922
|
{
|
|
28577
28923
|
ref,
|
|
@@ -28585,31 +28931,31 @@ var ToastClose = React61.forwardRef(({ className, onClick, ...props }, ref) => /
|
|
|
28585
28931
|
},
|
|
28586
28932
|
"toast-close": "",
|
|
28587
28933
|
...props,
|
|
28588
|
-
children: /* @__PURE__ */
|
|
28934
|
+
children: /* @__PURE__ */ jsx90(X8, { className: "h-4 w-4" })
|
|
28589
28935
|
}
|
|
28590
28936
|
));
|
|
28591
28937
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
28592
|
-
var ToastTitle = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28938
|
+
var ToastTitle = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx90(ToastPrimitives.Title, { ref, className: cn("text-sm font-semibold", className), ...props }));
|
|
28593
28939
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
28594
|
-
var ToastDescription = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
28940
|
+
var ToastDescription = React61.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx90(ToastPrimitives.Description, { ref, className: cn("text-sm opacity-90", className), ...props }));
|
|
28595
28941
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
28596
28942
|
|
|
28597
28943
|
// src/components/ui/toaster.tsx
|
|
28598
|
-
import { jsx as
|
|
28944
|
+
import { jsx as jsx91, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
28599
28945
|
function Toaster2() {
|
|
28600
28946
|
const { toasts } = useToast();
|
|
28601
28947
|
return /* @__PURE__ */ jsxs54(ToastProvider, { children: [
|
|
28602
28948
|
toasts.map(function({ id, title, description, action, ...props }) {
|
|
28603
28949
|
return /* @__PURE__ */ jsxs54(Toast, { ...props, children: [
|
|
28604
28950
|
/* @__PURE__ */ jsxs54("div", { className: "grid gap-1", children: [
|
|
28605
|
-
title && /* @__PURE__ */
|
|
28606
|
-
description && /* @__PURE__ */
|
|
28951
|
+
title && /* @__PURE__ */ jsx91(ToastTitle, { children: title }),
|
|
28952
|
+
description && /* @__PURE__ */ jsx91(ToastDescription, { children: description })
|
|
28607
28953
|
] }),
|
|
28608
28954
|
action,
|
|
28609
|
-
/* @__PURE__ */
|
|
28955
|
+
/* @__PURE__ */ jsx91(ToastClose, {})
|
|
28610
28956
|
] }, id);
|
|
28611
28957
|
}),
|
|
28612
|
-
/* @__PURE__ */
|
|
28958
|
+
/* @__PURE__ */ jsx91(ToastViewport, {})
|
|
28613
28959
|
] });
|
|
28614
28960
|
}
|
|
28615
28961
|
|
|
@@ -28617,7 +28963,7 @@ function Toaster2() {
|
|
|
28617
28963
|
import * as React62 from "react";
|
|
28618
28964
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
28619
28965
|
import { cva as cva9 } from "class-variance-authority";
|
|
28620
|
-
import { jsx as
|
|
28966
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
28621
28967
|
var toggleVariants = cva9(
|
|
28622
28968
|
"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",
|
|
28623
28969
|
{
|
|
@@ -28638,22 +28984,22 @@ var toggleVariants = cva9(
|
|
|
28638
28984
|
}
|
|
28639
28985
|
}
|
|
28640
28986
|
);
|
|
28641
|
-
var Toggle = React62.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */
|
|
28987
|
+
var Toggle = React62.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx92(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
28642
28988
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
28643
28989
|
|
|
28644
28990
|
// src/components/ui/toggle-group.tsx
|
|
28645
28991
|
import * as React63 from "react";
|
|
28646
28992
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
28647
|
-
import { jsx as
|
|
28993
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
28648
28994
|
var ToggleGroupContext = React63.createContext({
|
|
28649
28995
|
size: "default",
|
|
28650
28996
|
variant: "default"
|
|
28651
28997
|
});
|
|
28652
|
-
var ToggleGroup = React63.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */
|
|
28998
|
+
var ToggleGroup = React63.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx93(ToggleGroupPrimitive.Root, { ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: /* @__PURE__ */ jsx93(ToggleGroupContext.Provider, { value: { variant, size }, children }) }));
|
|
28653
28999
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
28654
29000
|
var ToggleGroupItem = React63.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
28655
29001
|
const context = React63.useContext(ToggleGroupContext);
|
|
28656
|
-
return /* @__PURE__ */
|
|
29002
|
+
return /* @__PURE__ */ jsx93(
|
|
28657
29003
|
ToggleGroupPrimitive.Item,
|
|
28658
29004
|
{
|
|
28659
29005
|
ref,
|
|
@@ -28673,30 +29019,126 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
28673
29019
|
|
|
28674
29020
|
// src/hooks/useActiveSection.ts
|
|
28675
29021
|
import { useEffect as useEffect24, useState as useState21 } from "react";
|
|
29022
|
+
var resolveActiveFromOffsets = (sectionIds, topById, offset, scrollY) => {
|
|
29023
|
+
var _a78;
|
|
29024
|
+
const line = scrollY + offset;
|
|
29025
|
+
let nextActive = (_a78 = sectionIds[0]) != null ? _a78 : "";
|
|
29026
|
+
for (const id of sectionIds) {
|
|
29027
|
+
const top = topById.get(id);
|
|
29028
|
+
if (typeof top !== "number") continue;
|
|
29029
|
+
if (top <= line) {
|
|
29030
|
+
nextActive = id;
|
|
29031
|
+
continue;
|
|
29032
|
+
}
|
|
29033
|
+
break;
|
|
29034
|
+
}
|
|
29035
|
+
return nextActive;
|
|
29036
|
+
};
|
|
28676
29037
|
var useActiveSection = (sectionIds, offset = 180) => {
|
|
28677
29038
|
var _a78;
|
|
28678
29039
|
const [activeId, setActiveId] = useState21((_a78 = sectionIds[0]) != null ? _a78 : "");
|
|
28679
29040
|
useEffect24(() => {
|
|
29041
|
+
var _a79;
|
|
28680
29042
|
if (!sectionIds.length || typeof window === "undefined") return;
|
|
28681
|
-
const
|
|
28682
|
-
|
|
28683
|
-
|
|
28684
|
-
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28688
|
-
|
|
29043
|
+
const sections = sectionIds.map((id) => {
|
|
29044
|
+
const element = document.getElementById(id);
|
|
29045
|
+
if (!element) return null;
|
|
29046
|
+
return { id, element };
|
|
29047
|
+
}).filter((section) => section !== null);
|
|
29048
|
+
if (!sections.length) {
|
|
29049
|
+
setActiveId((_a79 = sectionIds[0]) != null ? _a79 : "");
|
|
29050
|
+
return;
|
|
29051
|
+
}
|
|
29052
|
+
const topById = /* @__PURE__ */ new Map();
|
|
29053
|
+
const visibleIds = /* @__PURE__ */ new Set();
|
|
29054
|
+
const sectionIndexes = new Map(sectionIds.map((id, index) => [id, index]));
|
|
29055
|
+
const normalizedOffset = Math.max(0, offset);
|
|
29056
|
+
const measure = () => {
|
|
29057
|
+
const scrollY = window.scrollY || window.pageYOffset;
|
|
29058
|
+
for (const section of sections) {
|
|
29059
|
+
topById.set(section.id, section.element.getBoundingClientRect().top + scrollY);
|
|
29060
|
+
}
|
|
29061
|
+
};
|
|
29062
|
+
const commit = (nextId) => {
|
|
29063
|
+
setActiveId((current) => current === nextId ? current : nextId);
|
|
29064
|
+
};
|
|
29065
|
+
const resolveVisibleActive = () => {
|
|
29066
|
+
let nextId = null;
|
|
29067
|
+
let maxIndex = -1;
|
|
29068
|
+
for (const id of visibleIds) {
|
|
29069
|
+
const index = sectionIndexes.get(id);
|
|
29070
|
+
if (typeof index !== "number" || index < maxIndex) continue;
|
|
29071
|
+
maxIndex = index;
|
|
29072
|
+
nextId = id;
|
|
29073
|
+
}
|
|
29074
|
+
return nextId;
|
|
29075
|
+
};
|
|
29076
|
+
const resolveByScroll = () => resolveActiveFromOffsets(sectionIds, topById, normalizedOffset, window.scrollY || window.pageYOffset);
|
|
29077
|
+
const syncActive = () => {
|
|
29078
|
+
const visibleActive = resolveVisibleActive();
|
|
29079
|
+
commit(visibleActive != null ? visibleActive : resolveByScroll());
|
|
29080
|
+
};
|
|
29081
|
+
measure();
|
|
29082
|
+
syncActive();
|
|
29083
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
29084
|
+
let raf = 0;
|
|
29085
|
+
const onScroll = () => {
|
|
29086
|
+
if (raf) return;
|
|
29087
|
+
raf = window.requestAnimationFrame(() => {
|
|
29088
|
+
raf = 0;
|
|
29089
|
+
commit(resolveByScroll());
|
|
29090
|
+
});
|
|
29091
|
+
};
|
|
29092
|
+
const onResize2 = () => {
|
|
29093
|
+
measure();
|
|
29094
|
+
commit(resolveByScroll());
|
|
29095
|
+
};
|
|
29096
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
29097
|
+
window.addEventListener("resize", onResize2);
|
|
29098
|
+
return () => {
|
|
29099
|
+
if (raf) window.cancelAnimationFrame(raf);
|
|
29100
|
+
window.removeEventListener("scroll", onScroll);
|
|
29101
|
+
window.removeEventListener("resize", onResize2);
|
|
29102
|
+
};
|
|
29103
|
+
}
|
|
29104
|
+
const observer = new IntersectionObserver(
|
|
29105
|
+
(entries) => {
|
|
29106
|
+
let changed = false;
|
|
29107
|
+
for (const entry of entries) {
|
|
29108
|
+
const target = entry.target;
|
|
29109
|
+
if (!target.id) continue;
|
|
29110
|
+
if (entry.isIntersecting) {
|
|
29111
|
+
if (!visibleIds.has(target.id)) {
|
|
29112
|
+
visibleIds.add(target.id);
|
|
29113
|
+
changed = true;
|
|
29114
|
+
}
|
|
29115
|
+
continue;
|
|
29116
|
+
}
|
|
29117
|
+
if (visibleIds.delete(target.id)) {
|
|
29118
|
+
changed = true;
|
|
29119
|
+
}
|
|
28689
29120
|
}
|
|
28690
|
-
|
|
29121
|
+
if (changed) {
|
|
29122
|
+
syncActive();
|
|
29123
|
+
}
|
|
29124
|
+
},
|
|
29125
|
+
{
|
|
29126
|
+
root: null,
|
|
29127
|
+
threshold: [0, 0.01],
|
|
29128
|
+
rootMargin: `-${normalizedOffset}px 0px -55% 0px`
|
|
28691
29129
|
}
|
|
28692
|
-
|
|
29130
|
+
);
|
|
29131
|
+
for (const section of sections) {
|
|
29132
|
+
observer.observe(section.element);
|
|
29133
|
+
}
|
|
29134
|
+
const onResize = () => {
|
|
29135
|
+
measure();
|
|
29136
|
+
syncActive();
|
|
28693
29137
|
};
|
|
28694
|
-
|
|
28695
|
-
window.addEventListener("scroll", update, { passive: true });
|
|
28696
|
-
window.addEventListener("resize", update);
|
|
29138
|
+
window.addEventListener("resize", onResize);
|
|
28697
29139
|
return () => {
|
|
28698
|
-
|
|
28699
|
-
window.removeEventListener("resize",
|
|
29140
|
+
observer.disconnect();
|
|
29141
|
+
window.removeEventListener("resize", onResize);
|
|
28700
29142
|
};
|
|
28701
29143
|
}, [offset, sectionIds]);
|
|
28702
29144
|
return activeId;
|
|
@@ -28762,7 +29204,7 @@ var useLayoutModeControl = () => {
|
|
|
28762
29204
|
|
|
28763
29205
|
// src/lib/auth.tsx
|
|
28764
29206
|
import { createContext as createContext7, useCallback as useCallback12, useContext as useContext9, useEffect as useEffect26, useMemo as useMemo15, useRef as useRef13, useState as useState23 } from "react";
|
|
28765
|
-
import { jsx as
|
|
29207
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
28766
29208
|
var STORAGE_KEYS = {
|
|
28767
29209
|
accessToken: "cc_access_token",
|
|
28768
29210
|
idToken: "cc_id_token",
|
|
@@ -29650,7 +30092,7 @@ var AuthProvider = ({ children }) => {
|
|
|
29650
30092
|
}),
|
|
29651
30093
|
[status, user, accessToken, login, logout, completeLogin, getAccessToken, presenceStatus, setPresenceStatus]
|
|
29652
30094
|
);
|
|
29653
|
-
return /* @__PURE__ */
|
|
30095
|
+
return /* @__PURE__ */ jsx94(AuthContext.Provider, { value, children });
|
|
29654
30096
|
};
|
|
29655
30097
|
var useAuth = () => {
|
|
29656
30098
|
const ctx = useContext9(AuthContext);
|
|
@@ -29888,6 +30330,15 @@ export {
|
|
|
29888
30330
|
PopoverContent,
|
|
29889
30331
|
PopoverTrigger,
|
|
29890
30332
|
PricingCard,
|
|
30333
|
+
Skeleton as PrimitiveSkeleton,
|
|
30334
|
+
Tabs as PrimitiveTabs,
|
|
30335
|
+
TabsContent as PrimitiveTabsContent,
|
|
30336
|
+
TabsList as PrimitiveTabsList,
|
|
30337
|
+
TabsTrigger as PrimitiveTabsTrigger,
|
|
30338
|
+
Tooltip as PrimitiveTooltip,
|
|
30339
|
+
TooltipContent as PrimitiveTooltipContent,
|
|
30340
|
+
TooltipProvider as PrimitiveTooltipProvider,
|
|
30341
|
+
TooltipTrigger as PrimitiveTooltipTrigger,
|
|
29891
30342
|
Progress,
|
|
29892
30343
|
ProgressCupcode,
|
|
29893
30344
|
RadioGroup4 as RadioGroup,
|
|
@@ -29944,7 +30395,8 @@ export {
|
|
|
29944
30395
|
SidebarRail,
|
|
29945
30396
|
SidebarSeparator,
|
|
29946
30397
|
SidebarTrigger,
|
|
29947
|
-
Skeleton,
|
|
30398
|
+
Skeleton2 as Skeleton,
|
|
30399
|
+
SkeletonText,
|
|
29948
30400
|
Slider,
|
|
29949
30401
|
Toaster as SonnerToaster,
|
|
29950
30402
|
Switch,
|
|
@@ -29960,10 +30412,10 @@ export {
|
|
|
29960
30412
|
TableHead,
|
|
29961
30413
|
TableHeader,
|
|
29962
30414
|
TableRow,
|
|
29963
|
-
Tabs,
|
|
29964
|
-
TabsContent,
|
|
29965
|
-
TabsList,
|
|
29966
|
-
TabsTrigger,
|
|
30415
|
+
Tabs2 as Tabs,
|
|
30416
|
+
TabsContent2 as TabsContent,
|
|
30417
|
+
TabsList2 as TabsList,
|
|
30418
|
+
TabsTrigger2 as TabsTrigger,
|
|
29967
30419
|
TagGroup,
|
|
29968
30420
|
TelescupAssetPicker,
|
|
29969
30421
|
TelescupClientError,
|
|
@@ -29973,6 +30425,7 @@ export {
|
|
|
29973
30425
|
TelescupVideo,
|
|
29974
30426
|
Textarea,
|
|
29975
30427
|
TextareaField,
|
|
30428
|
+
ThemeBackground,
|
|
29976
30429
|
ThemeProvider,
|
|
29977
30430
|
ThemeScript,
|
|
29978
30431
|
ThemeToggle2 as ThemeToggle,
|
|
@@ -29989,11 +30442,11 @@ export {
|
|
|
29989
30442
|
Toggle,
|
|
29990
30443
|
ToggleGroup,
|
|
29991
30444
|
ToggleGroupItem,
|
|
29992
|
-
Tooltip,
|
|
29993
|
-
TooltipContent,
|
|
30445
|
+
TooltipCupcode as Tooltip,
|
|
30446
|
+
TooltipContent2 as TooltipContent,
|
|
29994
30447
|
TooltipCupcode,
|
|
29995
|
-
TooltipProvider,
|
|
29996
|
-
TooltipTrigger,
|
|
30448
|
+
TooltipProvider2 as TooltipProvider,
|
|
30449
|
+
TooltipTrigger2 as TooltipTrigger,
|
|
29997
30450
|
USER_PRESENCE_LAST_ACTIVE_COLUMN_ENV_KEY,
|
|
29998
30451
|
USER_PRESENCE_SOURCE_COLUMN_ENV_KEY,
|
|
29999
30452
|
UserMenuCupcode_default as UserMenuCupcode,
|