dara-ui 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Avatar/Avatar.d.ts +3 -2
- package/dist/dara-ui.cjs.js +183 -183
- package/dist/dara-ui.es.js +950 -939
- package/dist/style.css +1 -1
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/fa.d.ts +3 -0
- package/dist/translations/fr.d.ts +3 -0
- package/dist/translations/index.d.ts +9 -0
- package/package.json +1 -1
package/dist/dara-ui.es.js
CHANGED
|
@@ -9,12 +9,12 @@ const Ie = ne.forwardRef((t, l) => {
|
|
|
9
9
|
size: n = "md",
|
|
10
10
|
fullWidth: L = !1,
|
|
11
11
|
loading: p = !1,
|
|
12
|
-
glow:
|
|
12
|
+
glow: $,
|
|
13
13
|
leftIcon: N,
|
|
14
|
-
rightIcon:
|
|
14
|
+
rightIcon: x,
|
|
15
15
|
className: o = "",
|
|
16
|
-
...
|
|
17
|
-
} = t, c = a === "button" && "disabled" in
|
|
16
|
+
...M
|
|
17
|
+
} = t, c = a === "button" && "disabled" in M ? M.disabled : void 0, { disabled: y, ...g } = M, I = a === "button" ? { ...g, disabled: c || p } : g, k = "inline-flex items-center justify-center gap-2 font-heading font-semibold tracking-wide transition-all duration-180 rounded-full active:scale-95 disabled:opacity-45 disabled:cursor-not-allowed disabled:pointer-events-none relative overflow-hidden hover:-translate-y-0.5 no-underline hover:no-underline", u = {
|
|
18
18
|
primary: "bg-[var(--color-primary-solid)] !text-white shadow-[var(--shadow-btn-primary)] hover:bg-[var(--color-primary-hover)] hover:shadow-[var(--shadow-btn-primary-hover)] hover:brightness-105",
|
|
19
19
|
secondary: "bg-[var(--color-secondary-solid)] !text-white shadow-[var(--shadow-btn-secondary)] hover:bg-[var(--color-secondary-hover)] hover:shadow-[var(--shadow-btn-secondary-hover)] hover:brightness-105",
|
|
20
20
|
accent: "bg-[var(--color-accent-solid)] !text-white shadow-[var(--shadow-btn-accent)] hover:bg-[var(--color-accent-hover)] hover:shadow-[var(--shadow-btn-accent-hover)] hover:brightness-105",
|
|
@@ -22,28 +22,28 @@ const Ie = ne.forwardRef((t, l) => {
|
|
|
22
22
|
danger: "bg-[var(--color-danger-solid)] !text-white shadow-[var(--shadow-btn-danger)] hover:bg-[var(--color-danger-hover)] hover:shadow-[var(--shadow-btn-danger-hover)] hover:brightness-105",
|
|
23
23
|
success: "bg-[var(--color-success-solid)] !text-white shadow-[var(--shadow-btn-success)] hover:bg-[var(--color-success-hover)] hover:shadow-[var(--shadow-btn-success-hover)] hover:brightness-105",
|
|
24
24
|
outline: "bg-transparent !text-[var(--color-text-primary)] border-2 border-[var(--color-border-primary)] hover:bg-[var(--color-primary-light)] hover:border-[var(--color-primary)] hover:!text-[var(--color-primary)] hover:shadow-[var(--shadow-btn-primary)]"
|
|
25
|
-
},
|
|
25
|
+
}, b = {
|
|
26
26
|
sm: "px-4 py-1.5 text-sm min-h-[32px]",
|
|
27
27
|
md: "px-6 py-2.5 text-base min-h-[40px]",
|
|
28
28
|
lg: "px-8 py-3.5 text-lg min-h-[48px]"
|
|
29
|
-
},
|
|
29
|
+
}, v = {
|
|
30
30
|
primary: "hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-primary-solid)_50%,_transparent)]",
|
|
31
31
|
secondary: "hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-secondary-solid)_50%,_transparent)]",
|
|
32
32
|
accent: "hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-accent-solid)_50%,_transparent)]"
|
|
33
|
-
},
|
|
34
|
-
|
|
33
|
+
}, T = [
|
|
34
|
+
k,
|
|
35
35
|
u[s],
|
|
36
|
-
|
|
36
|
+
b[n],
|
|
37
37
|
L ? "w-full" : "",
|
|
38
38
|
p ? "opacity-80 pointer-events-none" : "",
|
|
39
|
-
|
|
39
|
+
$ ? v[$] : "",
|
|
40
40
|
o
|
|
41
41
|
].filter(Boolean).join(" ");
|
|
42
|
-
return /* @__PURE__ */ r(a, { ref: l, className:
|
|
42
|
+
return /* @__PURE__ */ r(a, { ref: l, className: T, ...I, children: [
|
|
43
43
|
p && /* @__PURE__ */ e("span", { className: "spinner inline-block w-4 h-4 border-2 border-transparent border-t-current rounded-full animate-spin" }),
|
|
44
44
|
N && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: N }),
|
|
45
45
|
m,
|
|
46
|
-
|
|
46
|
+
x && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: x })
|
|
47
47
|
] });
|
|
48
48
|
});
|
|
49
49
|
Ie.displayName = "Button";
|
|
@@ -57,11 +57,11 @@ const ye = ne.forwardRef(
|
|
|
57
57
|
children: n,
|
|
58
58
|
...L
|
|
59
59
|
}, p) => {
|
|
60
|
-
const
|
|
60
|
+
const $ = "inline-flex items-center justify-center font-accent font-medium transition-all duration-180 rounded-full", N = {
|
|
61
61
|
sm: "px-2.5 py-0.5 text-xs",
|
|
62
62
|
md: "px-3.5 py-1 text-sm",
|
|
63
63
|
lg: "px-5 py-1.5 text-base"
|
|
64
|
-
},
|
|
64
|
+
}, x = {
|
|
65
65
|
primary: "bg-[var(--color-primary-solid)] text-white",
|
|
66
66
|
secondary: "bg-[var(--color-secondary-solid)] text-white",
|
|
67
67
|
success: "bg-[var(--color-success-solid)] text-white",
|
|
@@ -73,17 +73,17 @@ const ye = ne.forwardRef(
|
|
|
73
73
|
success: "border-2 border-[var(--color-success)] text-[var(--color-success)] bg-transparent",
|
|
74
74
|
danger: "border-2 border-[var(--color-danger)] text-[var(--color-danger)] bg-transparent",
|
|
75
75
|
warning: "border-2 border-[var(--color-warning)] text-[var(--color-warning)] bg-transparent"
|
|
76
|
-
},
|
|
76
|
+
}, M = {
|
|
77
77
|
primary: "shadow-[var(--shadow-glow-primary)]",
|
|
78
78
|
secondary: "shadow-[var(--shadow-glow-secondary)]",
|
|
79
79
|
success: "shadow-[var(--shadow-glow-success)]",
|
|
80
80
|
danger: "shadow-[var(--shadow-glow-danger)]",
|
|
81
81
|
warning: "shadow-[var(--shadow-glow-warning)]"
|
|
82
|
-
}, c = m ? o[t] :
|
|
83
|
-
|
|
82
|
+
}, c = m ? o[t] : x[t], y = a ? M[t] : "", g = [
|
|
83
|
+
$,
|
|
84
84
|
c,
|
|
85
85
|
N[l],
|
|
86
|
-
|
|
86
|
+
y,
|
|
87
87
|
s
|
|
88
88
|
].filter(Boolean).join(" ");
|
|
89
89
|
return /* @__PURE__ */ e("span", { ref: p, className: g, dir: "auto", ...L, children: n });
|
|
@@ -317,7 +317,7 @@ const nt = ({
|
|
|
317
317
|
"aria-hidden": "true",
|
|
318
318
|
children: /* @__PURE__ */ e("path", { d: "M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" })
|
|
319
319
|
}
|
|
320
|
-
),
|
|
320
|
+
), ft = ({
|
|
321
321
|
className: t = "h-4 w-4"
|
|
322
322
|
}) => /* @__PURE__ */ e(
|
|
323
323
|
"svg",
|
|
@@ -335,7 +335,7 @@ const nt = ({
|
|
|
335
335
|
}
|
|
336
336
|
)
|
|
337
337
|
}
|
|
338
|
-
),
|
|
338
|
+
), gt = ({
|
|
339
339
|
className: t = "h-4 w-4"
|
|
340
340
|
}) => /* @__PURE__ */ r(
|
|
341
341
|
"svg",
|
|
@@ -384,20 +384,20 @@ const nt = ({
|
|
|
384
384
|
leftIcon: n,
|
|
385
385
|
rightIcon: L,
|
|
386
386
|
glowFocus: p = !0,
|
|
387
|
-
label:
|
|
387
|
+
label: $,
|
|
388
388
|
helperText: N,
|
|
389
|
-
fullWidth:
|
|
389
|
+
fullWidth: x = !1,
|
|
390
390
|
disabled: o = !1,
|
|
391
|
-
className:
|
|
391
|
+
className: M = "",
|
|
392
392
|
placeholder: c,
|
|
393
|
-
value:
|
|
393
|
+
value: y,
|
|
394
394
|
onChange: g,
|
|
395
|
-
onFocus:
|
|
396
|
-
onBlur:
|
|
395
|
+
onFocus: I,
|
|
396
|
+
onBlur: k,
|
|
397
397
|
id: u,
|
|
398
|
-
...
|
|
399
|
-
},
|
|
400
|
-
const [
|
|
398
|
+
...b
|
|
399
|
+
}, v) => {
|
|
400
|
+
const [T, C] = P(!1), [A, R] = P(!1), w = Ve(), i = u || w, S = "w-full font-sans transition-all duration-180 outline-none disabled:opacity-60 disabled:cursor-not-allowed placeholder:text-[var(--color-text-tertiary)]", D = "bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)] focus:bg-[var(--color-bg-elevated)]", f = {
|
|
401
401
|
default: "border border-[var(--color-border-primary)] focus:border-[var(--color-primary)]",
|
|
402
402
|
success: "border border-[var(--color-success)] focus:border-[var(--color-success)]",
|
|
403
403
|
error: "border border-[var(--color-danger)] focus:border-[var(--color-danger)]",
|
|
@@ -417,28 +417,28 @@ const nt = ({
|
|
|
417
417
|
lg: "h-6 w-6"
|
|
418
418
|
}, V = [
|
|
419
419
|
S,
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
D,
|
|
421
|
+
f[a || "default"],
|
|
422
422
|
h,
|
|
423
423
|
d,
|
|
424
424
|
j[l],
|
|
425
|
-
|
|
425
|
+
x ? "w-full" : "",
|
|
426
426
|
n ? l === "sm" ? "pl-9" : l === "md" ? "pl-11" : "pl-14" : "",
|
|
427
427
|
L || t === "password" ? l === "sm" ? "pr-9" : l === "md" ? "pr-11" : "pr-14" : "",
|
|
428
428
|
o ? "opacity-60 cursor-not-allowed" : "",
|
|
429
|
-
|
|
429
|
+
M
|
|
430
430
|
].filter(Boolean).join(" "), G = (ee) => {
|
|
431
|
-
R(!0),
|
|
431
|
+
R(!0), I == null || I(ee);
|
|
432
432
|
}, X = (ee) => {
|
|
433
|
-
R(!1),
|
|
433
|
+
R(!1), k == null || k(ee);
|
|
434
434
|
}, B = () => o ? "text-[var(--color-text-tertiary)]" : a === "error" ? "text-[var(--color-danger)]" : a === "success" ? "text-[var(--color-success)]" : a === "warning" ? "text-[var(--color-warning)]" : A ? "text-[var(--color-primary)]" : "text-[var(--color-text-secondary)]", J = () => o ? "text-[var(--color-text-tertiary)]" : a === "error" ? "text-[var(--color-danger)]" : a === "success" ? "text-[var(--color-success)]" : a === "warning" ? "text-[var(--color-warning)]" : A ? "text-[var(--color-primary)]" : "text-[var(--color-text-tertiary)]";
|
|
435
|
-
return /* @__PURE__ */ r("div", { className: `${
|
|
436
|
-
|
|
435
|
+
return /* @__PURE__ */ r("div", { className: `${x ? "w-full" : ""} flex flex-col gap-1.5`, children: [
|
|
436
|
+
$ && /* @__PURE__ */ e(
|
|
437
437
|
"label",
|
|
438
438
|
{
|
|
439
439
|
htmlFor: i,
|
|
440
440
|
className: `text-sm font-medium font-sans transition-colors duration-180 ${B()}`,
|
|
441
|
-
children:
|
|
441
|
+
children: $
|
|
442
442
|
}
|
|
443
443
|
),
|
|
444
444
|
/* @__PURE__ */ r("div", { className: "relative group w-full", children: [
|
|
@@ -452,29 +452,29 @@ const nt = ({
|
|
|
452
452
|
/* @__PURE__ */ e(
|
|
453
453
|
"input",
|
|
454
454
|
{
|
|
455
|
-
ref:
|
|
455
|
+
ref: v,
|
|
456
456
|
id: i,
|
|
457
|
-
type: t === "password" &&
|
|
457
|
+
type: t === "password" && T ? "text" : t,
|
|
458
458
|
className: V,
|
|
459
459
|
placeholder: c,
|
|
460
|
-
value:
|
|
460
|
+
value: y,
|
|
461
461
|
onChange: g,
|
|
462
462
|
onFocus: G,
|
|
463
463
|
onBlur: X,
|
|
464
464
|
disabled: o,
|
|
465
|
-
"aria-label":
|
|
466
|
-
...
|
|
465
|
+
"aria-label": $ ? void 0 : c || "Input",
|
|
466
|
+
...b
|
|
467
467
|
}
|
|
468
468
|
),
|
|
469
469
|
t === "password" && /* @__PURE__ */ e(
|
|
470
470
|
"button",
|
|
471
471
|
{
|
|
472
472
|
type: "button",
|
|
473
|
-
onClick: () => C(!
|
|
473
|
+
onClick: () => C(!T),
|
|
474
474
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] transition-colors cursor-pointer",
|
|
475
475
|
tabIndex: -1,
|
|
476
|
-
"aria-label":
|
|
477
|
-
children:
|
|
476
|
+
"aria-label": T ? "Hide password" : "Show password",
|
|
477
|
+
children: T ? /* @__PURE__ */ r(
|
|
478
478
|
"svg",
|
|
479
479
|
{
|
|
480
480
|
className: "h-5 w-5",
|
|
@@ -549,39 +549,39 @@ const bt = ne.forwardRef(
|
|
|
549
549
|
className: n = "",
|
|
550
550
|
children: L,
|
|
551
551
|
style: p,
|
|
552
|
-
|
|
552
|
+
...$
|
|
553
553
|
}, N) => {
|
|
554
|
-
const [
|
|
555
|
-
if (!
|
|
556
|
-
const i =
|
|
554
|
+
const [x, o] = P({ x: 0, y: 0 }), [M, c] = P(!1), y = Z(null), g = (w) => {
|
|
555
|
+
if (!y.current || !m) return;
|
|
556
|
+
const i = y.current.getBoundingClientRect(), S = w.clientX - i.left, D = w.clientY - i.top, f = i.width / 2, h = i.height / 2, d = (D - h) / h * -6, j = (S - f) / f * 6;
|
|
557
557
|
o({ x: d, y: j });
|
|
558
|
-
},
|
|
558
|
+
}, I = () => {
|
|
559
559
|
m && c(!0);
|
|
560
|
-
},
|
|
560
|
+
}, k = () => {
|
|
561
561
|
c(!1), o({ x: 0, y: 0 });
|
|
562
562
|
}, u = {
|
|
563
563
|
glass: "glass",
|
|
564
564
|
solid: "glass-solid",
|
|
565
565
|
outline: "glass-outline"
|
|
566
|
-
},
|
|
566
|
+
}, b = {
|
|
567
567
|
sm: "p-4",
|
|
568
568
|
md: "p-6",
|
|
569
569
|
lg: "p-8",
|
|
570
570
|
none: "p-0"
|
|
571
|
-
},
|
|
571
|
+
}, v = {
|
|
572
572
|
sm: "var(--radius-sm)",
|
|
573
573
|
md: "var(--radius-md)",
|
|
574
574
|
standard: "var(--radius-standard)",
|
|
575
575
|
large: "var(--radius-large)",
|
|
576
576
|
xl: "var(--radius-xl)",
|
|
577
577
|
full: "var(--radius-full)"
|
|
578
|
-
},
|
|
578
|
+
}, T = {
|
|
579
579
|
primary: "glow-primary",
|
|
580
580
|
secondary: "glow-secondary",
|
|
581
581
|
accent: "glow-accent"
|
|
582
|
-
}, C = m ? "float-card" : "", A = s ?
|
|
582
|
+
}, C = m ? "float-card" : "", A = s ? T[s] : "", R = [
|
|
583
583
|
u[t],
|
|
584
|
-
|
|
584
|
+
b[l],
|
|
585
585
|
C,
|
|
586
586
|
A,
|
|
587
587
|
n
|
|
@@ -589,21 +589,21 @@ const bt = ne.forwardRef(
|
|
|
589
589
|
return /* @__PURE__ */ e(
|
|
590
590
|
"div",
|
|
591
591
|
{
|
|
592
|
-
ref: (
|
|
593
|
-
typeof N == "function" ? N(
|
|
592
|
+
ref: (w) => {
|
|
593
|
+
typeof N == "function" ? N(w) : N && (N.current = w), y.current = w;
|
|
594
594
|
},
|
|
595
595
|
className: R,
|
|
596
596
|
style: {
|
|
597
|
-
borderRadius:
|
|
598
|
-
transform: m &&
|
|
597
|
+
borderRadius: v[a],
|
|
598
|
+
transform: m && M ? `perspective(800px) rotateX(${x.x}deg) rotateY(${x.y}deg) scale(1.02)` : "perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",
|
|
599
599
|
transformStyle: m ? "preserve-3d" : "flat",
|
|
600
600
|
transition: m ? "transform 0.2s ease-out, box-shadow 0.4s ease, border-radius 0.2s ease" : "border-radius 0.2s ease",
|
|
601
601
|
...p
|
|
602
602
|
},
|
|
603
603
|
onMouseMove: g,
|
|
604
|
-
onMouseEnter:
|
|
605
|
-
onMouseLeave:
|
|
606
|
-
|
|
604
|
+
onMouseEnter: I,
|
|
605
|
+
onMouseLeave: k,
|
|
606
|
+
...$,
|
|
607
607
|
children: L
|
|
608
608
|
}
|
|
609
609
|
);
|
|
@@ -619,23 +619,23 @@ const yt = ({
|
|
|
619
619
|
size: n = "md",
|
|
620
620
|
glowColor: L = "primary",
|
|
621
621
|
fullWidth: p = !1,
|
|
622
|
-
className:
|
|
622
|
+
className: $ = ""
|
|
623
623
|
}) => {
|
|
624
|
-
var S,
|
|
625
|
-
const N = l !== void 0, [
|
|
626
|
-
a || ((S = t[0]) == null ? void 0 : S.value) || ((
|
|
627
|
-
),
|
|
624
|
+
var S, D;
|
|
625
|
+
const N = l !== void 0, [x, o] = P(
|
|
626
|
+
a || ((S = t[0]) == null ? void 0 : S.value) || ((D = t[0]) == null ? void 0 : D.label) || ""
|
|
627
|
+
), M = N ? l : x, [c, y] = P({}), g = Z(null), I = Z(null), k = Z(
|
|
628
628
|
null
|
|
629
|
-
), u = Z(null),
|
|
630
|
-
(
|
|
631
|
-
N || o(
|
|
629
|
+
), u = Z(null), b = Z(!0), v = (f, h) => f.value || f.label || `tab-${h}`, T = F(
|
|
630
|
+
(f) => {
|
|
631
|
+
N || o(f), m == null || m(f);
|
|
632
632
|
},
|
|
633
633
|
[N, m]
|
|
634
634
|
), C = F(() => {
|
|
635
|
-
|
|
636
|
-
if (
|
|
637
|
-
const
|
|
638
|
-
|
|
635
|
+
k.current && (clearTimeout(k.current), k.current = null), requestAnimationFrame(() => {
|
|
636
|
+
if (I.current && g.current) {
|
|
637
|
+
const f = I.current.getBoundingClientRect(), h = g.current.getBoundingClientRect(), d = f.left - h.left, j = f.width;
|
|
638
|
+
y((q) => q.left === d && q.width === j ? q : {
|
|
639
639
|
left: d,
|
|
640
640
|
width: j
|
|
641
641
|
});
|
|
@@ -643,23 +643,23 @@ const yt = ({
|
|
|
643
643
|
});
|
|
644
644
|
}, []);
|
|
645
645
|
Y(() => {
|
|
646
|
-
if (
|
|
647
|
-
|
|
646
|
+
if (b.current) {
|
|
647
|
+
b.current = !1, setTimeout(C, 100);
|
|
648
648
|
return;
|
|
649
649
|
}
|
|
650
|
-
return
|
|
650
|
+
return k.current = setTimeout(() => {
|
|
651
651
|
C();
|
|
652
652
|
}, 30), () => {
|
|
653
|
-
|
|
653
|
+
k.current && (clearTimeout(k.current), k.current = null);
|
|
654
654
|
};
|
|
655
|
-
}, [
|
|
656
|
-
const
|
|
655
|
+
}, [M, t, C]), Y(() => {
|
|
656
|
+
const f = () => {
|
|
657
657
|
u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
658
658
|
C();
|
|
659
659
|
}, 150);
|
|
660
660
|
};
|
|
661
|
-
return window.addEventListener("resize",
|
|
662
|
-
window.removeEventListener("resize",
|
|
661
|
+
return window.addEventListener("resize", f), window.addEventListener("orientationchange", f), () => {
|
|
662
|
+
window.removeEventListener("resize", f), window.removeEventListener("orientationchange", f), u.current && (clearTimeout(u.current), u.current = null);
|
|
663
663
|
};
|
|
664
664
|
}, [C]);
|
|
665
665
|
const A = ve(
|
|
@@ -679,7 +679,7 @@ const yt = ({
|
|
|
679
679
|
none: "bg-[var(--color-border-primary)]"
|
|
680
680
|
}),
|
|
681
681
|
[]
|
|
682
|
-
),
|
|
682
|
+
), w = ve(
|
|
683
683
|
() => ({
|
|
684
684
|
left: "justify-start",
|
|
685
685
|
center: "justify-center",
|
|
@@ -687,27 +687,27 @@ const yt = ({
|
|
|
687
687
|
}),
|
|
688
688
|
[]
|
|
689
689
|
), i = ve(() => {
|
|
690
|
-
var
|
|
691
|
-
return (
|
|
692
|
-
}, [t,
|
|
693
|
-
return /* @__PURE__ */ r("div", { className: `w-full ${
|
|
690
|
+
var f;
|
|
691
|
+
return (f = t.find((h, d) => v(h, d) === M)) == null ? void 0 : f.content;
|
|
692
|
+
}, [t, M]);
|
|
693
|
+
return /* @__PURE__ */ r("div", { className: `w-full ${$}`, children: [
|
|
694
694
|
/* @__PURE__ */ r(
|
|
695
695
|
"div",
|
|
696
696
|
{
|
|
697
697
|
ref: g,
|
|
698
698
|
className: `
|
|
699
699
|
relative flex border-b border-[var(--color-border-secondary)]
|
|
700
|
-
${
|
|
700
|
+
${w[s]}
|
|
701
701
|
${p ? "w-full" : ""}
|
|
702
702
|
`,
|
|
703
703
|
role: "tablist",
|
|
704
704
|
children: [
|
|
705
|
-
t.map((
|
|
706
|
-
const d = f
|
|
705
|
+
t.map((f, h) => {
|
|
706
|
+
const d = v(f, h), j = d === M;
|
|
707
707
|
return /* @__PURE__ */ r(
|
|
708
708
|
"button",
|
|
709
709
|
{
|
|
710
|
-
ref: j ?
|
|
710
|
+
ref: j ? I : null,
|
|
711
711
|
className: `
|
|
712
712
|
relative flex items-center gap-2 font-medium font-sans
|
|
713
713
|
transition-all duration-150
|
|
@@ -715,20 +715,20 @@ const yt = ({
|
|
|
715
715
|
${A[n]}
|
|
716
716
|
${p ? "flex-1 justify-center" : ""}
|
|
717
717
|
${j ? "text-[var(--color-text-primary)]" : "text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]"}
|
|
718
|
-
${
|
|
718
|
+
${f.disabled ? "opacity-40 cursor-not-allowed pointer-events-none" : "cursor-pointer"}
|
|
719
719
|
focus:outline-none focus-visible:ring-2 focus-visible:ring-[#7c5cff]
|
|
720
720
|
hover:bg-[var(--color-bg-elevated)]/20
|
|
721
721
|
select-none
|
|
722
722
|
`,
|
|
723
|
-
onClick: () => !
|
|
723
|
+
onClick: () => !f.disabled && T(d),
|
|
724
724
|
role: "tab",
|
|
725
725
|
"aria-selected": j,
|
|
726
|
-
"aria-disabled":
|
|
726
|
+
"aria-disabled": f.disabled,
|
|
727
727
|
tabIndex: j ? 0 : -1,
|
|
728
|
-
disabled:
|
|
728
|
+
disabled: f.disabled,
|
|
729
729
|
children: [
|
|
730
|
-
|
|
731
|
-
/* @__PURE__ */ e("span", { children:
|
|
730
|
+
f.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: f.icon }),
|
|
731
|
+
/* @__PURE__ */ e("span", { children: f.label })
|
|
732
732
|
]
|
|
733
733
|
},
|
|
734
734
|
d
|
|
@@ -762,7 +762,7 @@ const yt = ({
|
|
|
762
762
|
`,
|
|
763
763
|
children: i
|
|
764
764
|
},
|
|
765
|
-
|
|
765
|
+
M
|
|
766
766
|
) }),
|
|
767
767
|
/* @__PURE__ */ e("style", { children: `
|
|
768
768
|
@keyframes fadeSlideIn {
|
|
@@ -793,41 +793,41 @@ const wt = ({
|
|
|
793
793
|
className: L = "",
|
|
794
794
|
size: p = "md"
|
|
795
795
|
}) => {
|
|
796
|
-
const
|
|
796
|
+
const $ = l !== void 0, [N, x] = P(a), o = $ ? l : N, M = Z(/* @__PURE__ */ new Map()), [c, y] = P(
|
|
797
797
|
{}
|
|
798
798
|
), g = F(
|
|
799
799
|
(u) => {
|
|
800
|
-
let
|
|
801
|
-
s ? o.includes(u) ?
|
|
800
|
+
let b;
|
|
801
|
+
s ? o.includes(u) ? b = o.filter((v) => v !== u) : b = [...o, u] : o.includes(u) && o.length === 1 ? b = [] : b = [u], $ || x(b), m == null || m(b);
|
|
802
802
|
},
|
|
803
|
-
[o, s,
|
|
803
|
+
[o, s, $, m]
|
|
804
804
|
);
|
|
805
805
|
Y(() => {
|
|
806
806
|
const u = {};
|
|
807
|
-
t.forEach((
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
}),
|
|
807
|
+
t.forEach((b) => {
|
|
808
|
+
const v = M.current.get(b.id);
|
|
809
|
+
v && (v.style.maxHeight = "none", u[b.id] = v.scrollHeight, v.style.maxHeight = "0px");
|
|
810
|
+
}), y(u);
|
|
811
811
|
}, [t]);
|
|
812
|
-
const
|
|
812
|
+
const I = {
|
|
813
813
|
sm: "px-3 py-2 text-sm",
|
|
814
814
|
md: "px-4 py-3 text-base",
|
|
815
815
|
lg: "px-6 py-4 text-lg"
|
|
816
|
-
},
|
|
816
|
+
}, k = {
|
|
817
817
|
sm: "px-5 py-3 text-sm",
|
|
818
818
|
md: "px-6 py-4 text-base",
|
|
819
819
|
lg: "px-8 py-6 text-lg"
|
|
820
820
|
};
|
|
821
|
-
return /* @__PURE__ */ e("div", { className: `${n ? "glass" : ""} overflow-hidden ${L}`, children: t.map((u,
|
|
822
|
-
const
|
|
823
|
-
let
|
|
824
|
-
return A ?
|
|
821
|
+
return /* @__PURE__ */ e("div", { className: `${n ? "glass" : ""} overflow-hidden ${L}`, children: t.map((u, b) => {
|
|
822
|
+
const v = o.includes(u.id), T = b === 0, C = b === t.length - 1, A = t.length === 1, R = c[u.id] || 0;
|
|
823
|
+
let w = "";
|
|
824
|
+
return A ? w = "rounded-[--radius-md]" : T ? w = "rounded-t-[--radius-md]" : C && (w = "rounded-b-[--radius-md]"), /* @__PURE__ */ r(
|
|
825
825
|
"div",
|
|
826
826
|
{
|
|
827
827
|
className: `
|
|
828
828
|
border-b border-[var(--color-border-secondary)] last:border-b-0
|
|
829
829
|
transition-colors duration-180
|
|
830
|
-
${
|
|
830
|
+
${w}
|
|
831
831
|
`,
|
|
832
832
|
children: [
|
|
833
833
|
/* @__PURE__ */ r(
|
|
@@ -839,13 +839,13 @@ const wt = ({
|
|
|
839
839
|
w-full flex items-center justify-between
|
|
840
840
|
font-heading font-semibold
|
|
841
841
|
transition-colors duration-180
|
|
842
|
-
${
|
|
842
|
+
${I[p]}
|
|
843
843
|
${u.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
844
|
-
${
|
|
844
|
+
${v ? "text-[var(--color-primary)]" : "text-[var(--color-text-primary)]"}
|
|
845
845
|
hover:bg-[var(--color-bg-elevated)]/30
|
|
846
846
|
focus:outline-none
|
|
847
847
|
`,
|
|
848
|
-
"aria-expanded":
|
|
848
|
+
"aria-expanded": v,
|
|
849
849
|
"aria-disabled": u.disabled,
|
|
850
850
|
children: [
|
|
851
851
|
/* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: [
|
|
@@ -857,7 +857,7 @@ const wt = ({
|
|
|
857
857
|
{
|
|
858
858
|
className: `
|
|
859
859
|
transition-transform duration-250 text-[var(--color-text-secondary)]
|
|
860
|
-
${
|
|
860
|
+
${v ? "rotate-180" : "rotate-0"}
|
|
861
861
|
`,
|
|
862
862
|
"aria-hidden": "true",
|
|
863
863
|
children: /* @__PURE__ */ e(
|
|
@@ -887,22 +887,22 @@ const wt = ({
|
|
|
887
887
|
"div",
|
|
888
888
|
{
|
|
889
889
|
ref: (i) => {
|
|
890
|
-
i ?
|
|
890
|
+
i ? M.current.set(u.id, i) : M.current.delete(u.id);
|
|
891
891
|
},
|
|
892
892
|
className: `
|
|
893
893
|
overflow-hidden
|
|
894
894
|
transition-[max-height,padding] duration-350 ease-[var(--ease-in-out)]
|
|
895
|
-
${
|
|
895
|
+
${v ? "border-t border-[var(--color-border-secondary)]" : ""}
|
|
896
896
|
`,
|
|
897
897
|
style: {
|
|
898
|
-
maxHeight:
|
|
898
|
+
maxHeight: v ? `${R}px` : "0px",
|
|
899
899
|
paddingTop: "0",
|
|
900
900
|
paddingBottom: "0"
|
|
901
901
|
},
|
|
902
902
|
children: /* @__PURE__ */ e(
|
|
903
903
|
"div",
|
|
904
904
|
{
|
|
905
|
-
className: `${
|
|
905
|
+
className: `${k[p]} text-[var(--color-text-secondary)]`,
|
|
906
906
|
children: u.content
|
|
907
907
|
}
|
|
908
908
|
)
|
|
@@ -925,36 +925,36 @@ const kt = ne.forwardRef(
|
|
|
925
925
|
searchable: n = !1,
|
|
926
926
|
searchPlaceholder: L = "Search...",
|
|
927
927
|
disabled: p = !1,
|
|
928
|
-
fullWidth:
|
|
928
|
+
fullWidth: $ = !1,
|
|
929
929
|
size: N = "md",
|
|
930
|
-
className:
|
|
930
|
+
className: x = "",
|
|
931
931
|
label: o,
|
|
932
|
-
helperText:
|
|
932
|
+
helperText: M,
|
|
933
933
|
error: c = !1,
|
|
934
|
-
errorMessage:
|
|
934
|
+
errorMessage: y
|
|
935
935
|
}, g) => {
|
|
936
|
-
const
|
|
936
|
+
const I = l !== void 0, [k, u] = P(
|
|
937
937
|
a
|
|
938
|
-
), [
|
|
939
|
-
(G) => G.label.toLowerCase().includes(
|
|
940
|
-
) : t,
|
|
941
|
-
p || (
|
|
942
|
-
}, [p,
|
|
938
|
+
), [b, v] = P(!1), [T, C] = P(""), A = Z(null), R = Z(null), w = I ? l : k, i = t.find((G) => G.value === w), S = n ? t.filter(
|
|
939
|
+
(G) => G.label.toLowerCase().includes(T.toLowerCase())
|
|
940
|
+
) : t, D = Ve(), f = F(() => {
|
|
941
|
+
p || (v((G) => !G), b || C(""));
|
|
942
|
+
}, [p, b]), h = F(
|
|
943
943
|
(G) => {
|
|
944
|
-
|
|
944
|
+
I || u(G), m == null || m(G), v(!1), C("");
|
|
945
945
|
},
|
|
946
|
-
[
|
|
946
|
+
[I, m]
|
|
947
947
|
);
|
|
948
948
|
Y(() => {
|
|
949
949
|
const G = (X) => {
|
|
950
|
-
A.current && !A.current.contains(X.target) && (
|
|
950
|
+
A.current && !A.current.contains(X.target) && (v(!1), C(""));
|
|
951
951
|
};
|
|
952
|
-
return
|
|
952
|
+
return b && document.addEventListener("mousedown", G), () => {
|
|
953
953
|
document.removeEventListener("mousedown", G);
|
|
954
954
|
};
|
|
955
|
-
}, [
|
|
956
|
-
|
|
957
|
-
}, [
|
|
955
|
+
}, [b]), Y(() => {
|
|
956
|
+
b && n && R.current && R.current.focus();
|
|
957
|
+
}, [b, n]);
|
|
958
958
|
const d = {
|
|
959
959
|
sm: {
|
|
960
960
|
trigger: "px-3 py-1.5 text-sm",
|
|
@@ -986,8 +986,8 @@ const kt = ne.forwardRef(
|
|
|
986
986
|
ref: g,
|
|
987
987
|
className: `
|
|
988
988
|
flex flex-col gap-1.5
|
|
989
|
-
${
|
|
990
|
-
${
|
|
989
|
+
${$ ? "w-full" : j[N]}
|
|
990
|
+
${x}
|
|
991
991
|
`,
|
|
992
992
|
children: [
|
|
993
993
|
o && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-[var(--color-text-secondary)] font-sans", children: o }),
|
|
@@ -996,7 +996,7 @@ const kt = ne.forwardRef(
|
|
|
996
996
|
"button",
|
|
997
997
|
{
|
|
998
998
|
type: "button",
|
|
999
|
-
onClick:
|
|
999
|
+
onClick: f,
|
|
1000
1000
|
disabled: p,
|
|
1001
1001
|
className: `
|
|
1002
1002
|
w-full flex items-center justify-between gap-2
|
|
@@ -1007,10 +1007,10 @@ const kt = ne.forwardRef(
|
|
|
1007
1007
|
${p ? "opacity-60 cursor-not-allowed bg-[var(--color-bg-tertiary)]" : "cursor-pointer bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)]"}
|
|
1008
1008
|
${c ? "border border-[var(--color-danger)] focus:border-[var(--color-danger)]" : "border border-[var(--color-border-primary)] focus:border-[var(--color-primary)]"}
|
|
1009
1009
|
focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]/20
|
|
1010
|
-
${
|
|
1010
|
+
${b ? "border-[var(--color-primary)]" : ""}
|
|
1011
1011
|
`,
|
|
1012
1012
|
"aria-haspopup": "listbox",
|
|
1013
|
-
"aria-expanded":
|
|
1013
|
+
"aria-expanded": b,
|
|
1014
1014
|
"aria-disabled": p,
|
|
1015
1015
|
children: [
|
|
1016
1016
|
/* @__PURE__ */ r(
|
|
@@ -1031,7 +1031,7 @@ const kt = ne.forwardRef(
|
|
|
1031
1031
|
{
|
|
1032
1032
|
className: `
|
|
1033
1033
|
transition-transform duration-[var(--transition-med)] ease-[var(--ease-in-out)]
|
|
1034
|
-
${
|
|
1034
|
+
${b ? "rotate-180" : "rotate-0"}
|
|
1035
1035
|
text-[var(--color-text-tertiary)]
|
|
1036
1036
|
flex-shrink-0
|
|
1037
1037
|
`,
|
|
@@ -1065,19 +1065,19 @@ const kt = ne.forwardRef(
|
|
|
1065
1065
|
z-50 w-full mt-1.5 glass max-h-60 overflow-auto
|
|
1066
1066
|
rounded-[var(--radius-md)] py-1 shadow-[var(--shadow-float)]
|
|
1067
1067
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
1068
|
-
${
|
|
1068
|
+
${b ? "opacity-100 translate-y-0 pointer-events-auto" : "opacity-0 -translate-y-2 pointer-events-none"}
|
|
1069
1069
|
`,
|
|
1070
1070
|
style: { position: "absolute" },
|
|
1071
1071
|
children: [
|
|
1072
1072
|
n && /* @__PURE__ */ r("div", { className: "px-2 pb-1.5 border-b border-[var(--color-border-secondary)]", children: [
|
|
1073
|
-
/* @__PURE__ */ e("label", { htmlFor: `${
|
|
1073
|
+
/* @__PURE__ */ e("label", { htmlFor: `${D}-search`, className: "sr-only", children: L }),
|
|
1074
1074
|
/* @__PURE__ */ e(
|
|
1075
1075
|
"input",
|
|
1076
1076
|
{
|
|
1077
1077
|
ref: R,
|
|
1078
|
-
id: `${
|
|
1078
|
+
id: `${D}-search`,
|
|
1079
1079
|
type: "text",
|
|
1080
|
-
value:
|
|
1080
|
+
value: T,
|
|
1081
1081
|
onChange: (G) => C(G.target.value),
|
|
1082
1082
|
placeholder: L,
|
|
1083
1083
|
className: `
|
|
@@ -1107,7 +1107,7 @@ const kt = ne.forwardRef(
|
|
|
1107
1107
|
children: "No options found"
|
|
1108
1108
|
}
|
|
1109
1109
|
) : S.map((G) => {
|
|
1110
|
-
const X = G.value ===
|
|
1110
|
+
const X = G.value === w;
|
|
1111
1111
|
return /* @__PURE__ */ r(
|
|
1112
1112
|
"div",
|
|
1113
1113
|
{
|
|
@@ -1167,8 +1167,8 @@ const kt = ne.forwardRef(
|
|
|
1167
1167
|
}
|
|
1168
1168
|
)
|
|
1169
1169
|
] }),
|
|
1170
|
-
(
|
|
1171
|
-
c &&
|
|
1170
|
+
(M || y) && /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 text-xs font-sans", children: [
|
|
1171
|
+
c && y && /* @__PURE__ */ r(we, { children: [
|
|
1172
1172
|
/* @__PURE__ */ e(
|
|
1173
1173
|
"svg",
|
|
1174
1174
|
{
|
|
@@ -1187,9 +1187,9 @@ const kt = ne.forwardRef(
|
|
|
1187
1187
|
)
|
|
1188
1188
|
}
|
|
1189
1189
|
),
|
|
1190
|
-
/* @__PURE__ */ e("span", { className: "text-[var(--color-danger)]", children:
|
|
1190
|
+
/* @__PURE__ */ e("span", { className: "text-[var(--color-danger)]", children: y })
|
|
1191
1191
|
] }),
|
|
1192
|
-
!c &&
|
|
1192
|
+
!c && M && /* @__PURE__ */ e("span", { className: "text-[var(--color-text-tertiary)]", children: M })
|
|
1193
1193
|
] })
|
|
1194
1194
|
]
|
|
1195
1195
|
}
|
|
@@ -1206,58 +1206,58 @@ const Nt = 300, Ye = ({
|
|
|
1206
1206
|
closeOnBackdropClick: n = !0,
|
|
1207
1207
|
closeOnEscape: L = !0,
|
|
1208
1208
|
confirmText: p,
|
|
1209
|
-
cancelText:
|
|
1209
|
+
cancelText: $,
|
|
1210
1210
|
onConfirm: N,
|
|
1211
|
-
className:
|
|
1211
|
+
className: x = ""
|
|
1212
1212
|
}) => {
|
|
1213
|
-
const o = Z(null),
|
|
1213
|
+
const o = Z(null), M = Z(null), [c, y] = P(!1), [g, I] = P(!1), k = {
|
|
1214
1214
|
sm: "max-w-sm",
|
|
1215
1215
|
md: "max-w-md",
|
|
1216
1216
|
lg: "max-w-lg",
|
|
1217
1217
|
xl: "max-w-xl"
|
|
1218
1218
|
};
|
|
1219
1219
|
Y(() => {
|
|
1220
|
-
let
|
|
1221
|
-
return t ? (
|
|
1222
|
-
|
|
1223
|
-
}, 20)) : (
|
|
1224
|
-
|
|
1225
|
-
}, Nt)), () => clearTimeout(
|
|
1220
|
+
let v;
|
|
1221
|
+
return t ? (y(!0), I(!1), v = setTimeout(() => {
|
|
1222
|
+
I(!0);
|
|
1223
|
+
}, 20)) : (I(!1), v = setTimeout(() => {
|
|
1224
|
+
y(!1);
|
|
1225
|
+
}, Nt)), () => clearTimeout(v);
|
|
1226
1226
|
}, [t]), Y(() => {
|
|
1227
1227
|
if (!t || !L) return;
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1228
|
+
const v = (T) => {
|
|
1229
|
+
T.key === "Escape" && l();
|
|
1230
1230
|
};
|
|
1231
|
-
return document.addEventListener("keydown",
|
|
1231
|
+
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
1232
1232
|
}, [t, L, l]), Y(() => {
|
|
1233
1233
|
var C;
|
|
1234
1234
|
if (!t) {
|
|
1235
|
-
(C =
|
|
1235
|
+
(C = M.current) == null || C.focus();
|
|
1236
1236
|
return;
|
|
1237
1237
|
}
|
|
1238
|
-
|
|
1239
|
-
const
|
|
1238
|
+
M.current = document.activeElement;
|
|
1239
|
+
const v = setTimeout(() => {
|
|
1240
1240
|
var A;
|
|
1241
1241
|
return (A = o.current) == null ? void 0 : A.focus();
|
|
1242
|
-
}, 30),
|
|
1242
|
+
}, 30), T = (A) => {
|
|
1243
1243
|
if (A.key !== "Tab" || !o.current) return;
|
|
1244
1244
|
const R = o.current.querySelectorAll(
|
|
1245
1245
|
'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
|
|
1246
1246
|
);
|
|
1247
1247
|
if (R.length === 0) return;
|
|
1248
|
-
const
|
|
1249
|
-
A.shiftKey && S ===
|
|
1248
|
+
const w = R[0], i = R[R.length - 1], S = document.activeElement;
|
|
1249
|
+
A.shiftKey && S === w ? (A.preventDefault(), i.focus()) : !A.shiftKey && S === i && (A.preventDefault(), w.focus());
|
|
1250
1250
|
};
|
|
1251
|
-
return document.addEventListener("keydown",
|
|
1252
|
-
clearTimeout(
|
|
1251
|
+
return document.addEventListener("keydown", T), () => {
|
|
1252
|
+
clearTimeout(v), document.removeEventListener("keydown", T);
|
|
1253
1253
|
};
|
|
1254
1254
|
}, [t]);
|
|
1255
1255
|
const u = F(
|
|
1256
|
-
(
|
|
1257
|
-
n &&
|
|
1256
|
+
(v) => {
|
|
1257
|
+
n && v.target === v.currentTarget && l();
|
|
1258
1258
|
},
|
|
1259
1259
|
[n, l]
|
|
1260
|
-
),
|
|
1260
|
+
), b = F(() => {
|
|
1261
1261
|
N == null || N(), l();
|
|
1262
1262
|
}, [N, l]);
|
|
1263
1263
|
return c ? je(
|
|
@@ -1282,12 +1282,12 @@ const Nt = 300, Ye = ({
|
|
|
1282
1282
|
{
|
|
1283
1283
|
className: `
|
|
1284
1284
|
glass-heavy p-8
|
|
1285
|
-
w-[90%] ${
|
|
1285
|
+
w-[90%] ${k[s]}
|
|
1286
1286
|
transition-all duration-300 ease-[var(--ease-in-out,cubic-bezier(0.4,0,0.2,1))]
|
|
1287
1287
|
${g ? "scale-100 opacity-100" : "scale-90 opacity-0"}
|
|
1288
|
-
${
|
|
1288
|
+
${x}
|
|
1289
1289
|
`,
|
|
1290
|
-
onClick: (
|
|
1290
|
+
onClick: (v) => v.stopPropagation(),
|
|
1291
1291
|
children: [
|
|
1292
1292
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between mb-6", children: [
|
|
1293
1293
|
a && /* @__PURE__ */ r(
|
|
@@ -1313,9 +1313,9 @@ const Nt = 300, Ye = ({
|
|
|
1313
1313
|
)
|
|
1314
1314
|
] }),
|
|
1315
1315
|
/* @__PURE__ */ e("div", { className: "text-[var(--color-text-secondary)] mb-4 font-sans text-sm leading-relaxed", children: m }),
|
|
1316
|
-
(p ||
|
|
1317
|
-
p && /* @__PURE__ */ e(Ie, { variant: "primary", onClick:
|
|
1318
|
-
|
|
1316
|
+
(p || $) && /* @__PURE__ */ r("div", { className: "flex gap-3 mt-6", children: [
|
|
1317
|
+
p && /* @__PURE__ */ e(Ie, { variant: "primary", onClick: b, children: p }),
|
|
1318
|
+
$ && /* @__PURE__ */ e(Ie, { variant: "glass", onClick: l, children: $ })
|
|
1319
1319
|
] })
|
|
1320
1320
|
]
|
|
1321
1321
|
}
|
|
@@ -1336,13 +1336,13 @@ const St = ne.forwardRef(
|
|
|
1336
1336
|
glow: n = !1,
|
|
1337
1337
|
error: L = !1,
|
|
1338
1338
|
disabled: p = !1,
|
|
1339
|
-
className:
|
|
1339
|
+
className: $ = "",
|
|
1340
1340
|
id: N,
|
|
1341
|
-
...
|
|
1341
|
+
...x
|
|
1342
1342
|
}, o) => {
|
|
1343
|
-
const
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1343
|
+
const M = t !== void 0, [c, y] = P(l), [g, I] = P(!1), k = Z(null), u = M ? t : c, b = ne.useId(), v = N || b, T = (D) => {
|
|
1344
|
+
const f = D.target.checked;
|
|
1345
|
+
M || y(f), a == null || a(f), f && (I(!0), setTimeout(() => I(!1), 800));
|
|
1346
1346
|
}, C = {
|
|
1347
1347
|
sm: {
|
|
1348
1348
|
box: "w-4 h-4",
|
|
@@ -1362,7 +1362,7 @@ const St = ne.forwardRef(
|
|
|
1362
1362
|
label: "text-lg",
|
|
1363
1363
|
gap: "gap-3"
|
|
1364
1364
|
}
|
|
1365
|
-
}, A = C[s] || C.md, R = n && u ? "shadow-[var(--shadow-glow-primary)] ring-2 ring-[var(--color-primary)]/30" : "",
|
|
1365
|
+
}, A = C[s] || C.md, R = n && u ? "shadow-[var(--shadow-glow-primary)] ring-2 ring-[var(--color-primary)]/30" : "", w = L ? "border-[var(--color-danger)]" : "border-[var(--color-border-primary)]", i = () => /* @__PURE__ */ e(
|
|
1366
1366
|
"svg",
|
|
1367
1367
|
{
|
|
1368
1368
|
className: `${A.icon} text-[var(--color-text-inverse)]`,
|
|
@@ -1375,7 +1375,7 @@ const St = ne.forwardRef(
|
|
|
1375
1375
|
children: /* @__PURE__ */ e("polyline", { points: "20 6 9 17 4 12" })
|
|
1376
1376
|
}
|
|
1377
1377
|
), S = () => {
|
|
1378
|
-
const
|
|
1378
|
+
const D = [
|
|
1379
1379
|
"var(--color-primary)",
|
|
1380
1380
|
"var(--color-secondary)",
|
|
1381
1381
|
"var(--color-accent)",
|
|
@@ -1383,7 +1383,7 @@ const St = ne.forwardRef(
|
|
|
1383
1383
|
"#ffffff"
|
|
1384
1384
|
];
|
|
1385
1385
|
return /* @__PURE__ */ e("div", { className: "absolute inset-0 pointer-events-none overflow-visible", children: Array.from({ length: 12 }).map((h, d) => {
|
|
1386
|
-
const j = d / 12 * 360 + Math.random() * 30, q = 12 + Math.random() * 20, V = 2 + Math.random() * 3, G =
|
|
1386
|
+
const j = d / 12 * 360 + Math.random() * 30, q = 12 + Math.random() * 20, V = 2 + Math.random() * 3, G = D[Math.floor(Math.random() * D.length)], X = Math.random() * 0.15;
|
|
1387
1387
|
return /* @__PURE__ */ e(
|
|
1388
1388
|
"div",
|
|
1389
1389
|
{
|
|
@@ -1410,13 +1410,13 @@ const St = ne.forwardRef(
|
|
|
1410
1410
|
return /* @__PURE__ */ r(
|
|
1411
1411
|
"label",
|
|
1412
1412
|
{
|
|
1413
|
-
htmlFor:
|
|
1413
|
+
htmlFor: v,
|
|
1414
1414
|
className: `
|
|
1415
1415
|
inline-flex items-center
|
|
1416
1416
|
${A.gap}
|
|
1417
1417
|
cursor-pointer
|
|
1418
1418
|
${p ? "opacity-50 cursor-not-allowed" : ""}
|
|
1419
|
-
${
|
|
1419
|
+
${$}
|
|
1420
1420
|
align-middle
|
|
1421
1421
|
w-fit
|
|
1422
1422
|
`,
|
|
@@ -1424,17 +1424,17 @@ const St = ne.forwardRef(
|
|
|
1424
1424
|
/* @__PURE__ */ e(
|
|
1425
1425
|
"input",
|
|
1426
1426
|
{
|
|
1427
|
-
ref: (
|
|
1428
|
-
typeof o == "function" ? o(
|
|
1427
|
+
ref: (D) => {
|
|
1428
|
+
typeof o == "function" ? o(D) : o && (o.current = D), k.current = D;
|
|
1429
1429
|
},
|
|
1430
|
-
id:
|
|
1430
|
+
id: v,
|
|
1431
1431
|
type: "checkbox",
|
|
1432
1432
|
checked: u,
|
|
1433
|
-
onChange:
|
|
1433
|
+
onChange: T,
|
|
1434
1434
|
disabled: p,
|
|
1435
1435
|
className: "sr-only",
|
|
1436
1436
|
"aria-invalid": L,
|
|
1437
|
-
...
|
|
1437
|
+
...x
|
|
1438
1438
|
}
|
|
1439
1439
|
),
|
|
1440
1440
|
/* @__PURE__ */ r(
|
|
@@ -1445,7 +1445,7 @@ const St = ne.forwardRef(
|
|
|
1445
1445
|
${A.box}
|
|
1446
1446
|
rounded-[var(--radius-sm)]
|
|
1447
1447
|
transition-all duration-[var(--transition-med)]
|
|
1448
|
-
${
|
|
1448
|
+
${w}
|
|
1449
1449
|
${p ? "bg-[var(--color-bg-tertiary)]" : ""}
|
|
1450
1450
|
${u ? `bg-[var(--color-primary-solid)] ${R}` : "bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)]"}
|
|
1451
1451
|
flex items-center justify-center
|
|
@@ -1533,27 +1533,27 @@ const Ct = ne.forwardRef(
|
|
|
1533
1533
|
glow: n = !1,
|
|
1534
1534
|
disabled: L = !1,
|
|
1535
1535
|
onIcon: p,
|
|
1536
|
-
offIcon:
|
|
1536
|
+
offIcon: $,
|
|
1537
1537
|
className: N = "",
|
|
1538
|
-
id:
|
|
1538
|
+
id: x,
|
|
1539
1539
|
...o
|
|
1540
|
-
},
|
|
1541
|
-
const c = t !== void 0, [
|
|
1540
|
+
}, M) => {
|
|
1541
|
+
const c = t !== void 0, [y, g] = P(l), [I, k] = P(!1), u = Z(null), [b, v] = P(!1);
|
|
1542
1542
|
Y(() => {
|
|
1543
|
-
const
|
|
1544
|
-
|
|
1543
|
+
const D = () => {
|
|
1544
|
+
v(document.documentElement.dir === "rtl");
|
|
1545
1545
|
};
|
|
1546
|
-
|
|
1547
|
-
const
|
|
1548
|
-
return
|
|
1546
|
+
D();
|
|
1547
|
+
const f = new MutationObserver(D);
|
|
1548
|
+
return f.observe(document.documentElement, {
|
|
1549
1549
|
attributes: !0,
|
|
1550
1550
|
attributeFilter: ["dir"]
|
|
1551
|
-
}), () =>
|
|
1551
|
+
}), () => f.disconnect();
|
|
1552
1552
|
}, []);
|
|
1553
|
-
const
|
|
1554
|
-
const
|
|
1555
|
-
c || g(
|
|
1556
|
-
},
|
|
1553
|
+
const T = c ? t : y, C = ne.useId(), A = x || C, R = (D) => {
|
|
1554
|
+
const f = D.target.checked;
|
|
1555
|
+
c || g(f), a == null || a(f), f && (k(!0), setTimeout(() => k(!1), 700));
|
|
1556
|
+
}, w = {
|
|
1557
1557
|
sm: {
|
|
1558
1558
|
track: "w-10 h-5",
|
|
1559
1559
|
thumb: "w-5 h-5",
|
|
@@ -1581,9 +1581,9 @@ const Ct = ne.forwardRef(
|
|
|
1581
1581
|
gap: "gap-2.5",
|
|
1582
1582
|
thumbOffset: 0
|
|
1583
1583
|
}
|
|
1584
|
-
}, i =
|
|
1584
|
+
}, i = w[s] || w.md;
|
|
1585
1585
|
let S = 0;
|
|
1586
|
-
return
|
|
1586
|
+
return T ? S = b ? -i.travel : i.travel : S = 0, /* @__PURE__ */ r(
|
|
1587
1587
|
"label",
|
|
1588
1588
|
{
|
|
1589
1589
|
htmlFor: A,
|
|
@@ -1620,17 +1620,17 @@ const Ct = ne.forwardRef(
|
|
|
1620
1620
|
/* @__PURE__ */ e(
|
|
1621
1621
|
"input",
|
|
1622
1622
|
{
|
|
1623
|
-
ref: (
|
|
1624
|
-
typeof
|
|
1623
|
+
ref: (D) => {
|
|
1624
|
+
typeof M == "function" ? M(D) : M && (M.current = D), u.current = D;
|
|
1625
1625
|
},
|
|
1626
1626
|
id: A,
|
|
1627
1627
|
type: "checkbox",
|
|
1628
1628
|
role: "switch",
|
|
1629
|
-
checked:
|
|
1629
|
+
checked: T,
|
|
1630
1630
|
onChange: R,
|
|
1631
1631
|
disabled: L,
|
|
1632
1632
|
className: "sr-only",
|
|
1633
|
-
"aria-checked":
|
|
1633
|
+
"aria-checked": T,
|
|
1634
1634
|
...o
|
|
1635
1635
|
}
|
|
1636
1636
|
),
|
|
@@ -1644,7 +1644,7 @@ const Ct = ne.forwardRef(
|
|
|
1644
1644
|
overflow-visible
|
|
1645
1645
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
1646
1646
|
border-2
|
|
1647
|
-
${
|
|
1647
|
+
${T ? `
|
|
1648
1648
|
bg-[var(--color-primary)]
|
|
1649
1649
|
border-[var(--color-primary)]
|
|
1650
1650
|
backdrop-blur-[12px]
|
|
@@ -1653,10 +1653,10 @@ const Ct = ne.forwardRef(
|
|
|
1653
1653
|
border-[var(--color-border-primary)]
|
|
1654
1654
|
backdrop-blur-[10px]
|
|
1655
1655
|
`}
|
|
1656
|
-
${n &&
|
|
1656
|
+
${n && T ? "shadow-[var(--shadow-glow-primary)] ring-2 ring-[var(--color-primary)]/25" : "shadow-[var(--shadow-float)]"}
|
|
1657
1657
|
`,
|
|
1658
1658
|
style: {
|
|
1659
|
-
boxShadow: n &&
|
|
1659
|
+
boxShadow: n && T ? "var(--shadow-glow-primary)" : void 0
|
|
1660
1660
|
},
|
|
1661
1661
|
children: [
|
|
1662
1662
|
/* @__PURE__ */ e(
|
|
@@ -1665,7 +1665,7 @@ const Ct = ne.forwardRef(
|
|
|
1665
1665
|
className: `
|
|
1666
1666
|
absolute inset-0 rounded-full pointer-events-none
|
|
1667
1667
|
transition-opacity duration-300
|
|
1668
|
-
${
|
|
1668
|
+
${T ? "opacity-100" : "opacity-40"}
|
|
1669
1669
|
`,
|
|
1670
1670
|
style: {
|
|
1671
1671
|
background: "linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 55%)"
|
|
@@ -1682,7 +1682,7 @@ const Ct = ne.forwardRef(
|
|
|
1682
1682
|
flex items-center justify-center
|
|
1683
1683
|
transition-transform duration-350
|
|
1684
1684
|
ease-[cubic-bezier(0.34,1.56,0.64,1)]
|
|
1685
|
-
${
|
|
1685
|
+
${T ? `
|
|
1686
1686
|
bg-white
|
|
1687
1687
|
shadow-[0_2px_12px_rgba(0,0,0,0.25),0_0_0_1px_rgba(255,255,255,0.4)]
|
|
1688
1688
|
` : `
|
|
@@ -1692,11 +1692,11 @@ const Ct = ne.forwardRef(
|
|
|
1692
1692
|
`,
|
|
1693
1693
|
style: {
|
|
1694
1694
|
top: "50%",
|
|
1695
|
-
[
|
|
1695
|
+
[b ? "right" : "left"]: 0,
|
|
1696
1696
|
transform: `translateY(-50%) translateX(${S}px)`
|
|
1697
1697
|
},
|
|
1698
1698
|
children: [
|
|
1699
|
-
|
|
1699
|
+
T && p && /* @__PURE__ */ e(
|
|
1700
1700
|
"span",
|
|
1701
1701
|
{
|
|
1702
1702
|
className: `
|
|
@@ -1707,7 +1707,7 @@ const Ct = ne.forwardRef(
|
|
|
1707
1707
|
children: p
|
|
1708
1708
|
}
|
|
1709
1709
|
),
|
|
1710
|
-
!
|
|
1710
|
+
!T && $ && /* @__PURE__ */ e(
|
|
1711
1711
|
"span",
|
|
1712
1712
|
{
|
|
1713
1713
|
className: `
|
|
@@ -1715,14 +1715,14 @@ const Ct = ne.forwardRef(
|
|
|
1715
1715
|
flex items-center justify-center leading-none
|
|
1716
1716
|
text-[var(--color-text-tertiary)]
|
|
1717
1717
|
`,
|
|
1718
|
-
children:
|
|
1718
|
+
children: $
|
|
1719
1719
|
}
|
|
1720
1720
|
)
|
|
1721
1721
|
]
|
|
1722
1722
|
}
|
|
1723
1723
|
),
|
|
1724
|
-
|
|
1725
|
-
const h =
|
|
1724
|
+
T && I && /* @__PURE__ */ e("div", { className: "absolute inset-0 pointer-events-none overflow-visible", children: Array.from({ length: 10 }).map((D, f) => {
|
|
1725
|
+
const h = f / 10 * 360 + Math.random() * 24, d = 14 + Math.random() * 18, j = 2 + Math.random() * 2.5, q = [
|
|
1726
1726
|
"var(--color-primary)",
|
|
1727
1727
|
"var(--color-secondary)",
|
|
1728
1728
|
"var(--color-accent)",
|
|
@@ -1734,7 +1734,7 @@ const Ct = ne.forwardRef(
|
|
|
1734
1734
|
className: "switch-sparkle",
|
|
1735
1735
|
style: {
|
|
1736
1736
|
position: "absolute",
|
|
1737
|
-
left:
|
|
1737
|
+
left: b ? "20%" : "80%",
|
|
1738
1738
|
top: "50%",
|
|
1739
1739
|
width: `${j}px`,
|
|
1740
1740
|
height: `${j}px`,
|
|
@@ -1746,7 +1746,7 @@ const Ct = ne.forwardRef(
|
|
|
1746
1746
|
animationDelay: `${G}s`
|
|
1747
1747
|
}
|
|
1748
1748
|
},
|
|
1749
|
-
|
|
1749
|
+
f
|
|
1750
1750
|
);
|
|
1751
1751
|
}) })
|
|
1752
1752
|
]
|
|
@@ -1789,31 +1789,31 @@ const Lt = ne.forwardRef(
|
|
|
1789
1789
|
size: n = "md",
|
|
1790
1790
|
glow: L = !1,
|
|
1791
1791
|
error: p = !1,
|
|
1792
|
-
disabled:
|
|
1792
|
+
disabled: $ = !1,
|
|
1793
1793
|
value: N,
|
|
1794
|
-
name:
|
|
1794
|
+
name: x,
|
|
1795
1795
|
className: o = "",
|
|
1796
|
-
id:
|
|
1796
|
+
id: M,
|
|
1797
1797
|
...c
|
|
1798
|
-
},
|
|
1799
|
-
const g = t !== void 0, [
|
|
1798
|
+
}, y) => {
|
|
1799
|
+
const g = t !== void 0, [I, k] = P(l), [u, b] = P(
|
|
1800
1800
|
g ? !!t : l
|
|
1801
|
-
),
|
|
1801
|
+
), v = Z(null);
|
|
1802
1802
|
Y(() => {
|
|
1803
|
-
g &&
|
|
1803
|
+
g && b(!!t);
|
|
1804
1804
|
}, [t, g]);
|
|
1805
|
-
const
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1805
|
+
const T = ne.useId(), C = M || T, A = (S) => {
|
|
1806
|
+
const D = S.target.checked;
|
|
1807
|
+
b(D), g || k(D), a == null || a(D), m == null || m(S);
|
|
1808
1808
|
};
|
|
1809
1809
|
Y(() => {
|
|
1810
|
-
if (g || !
|
|
1810
|
+
if (g || !x) return;
|
|
1811
1811
|
const S = () => {
|
|
1812
|
-
const
|
|
1813
|
-
|
|
1812
|
+
const D = v.current;
|
|
1813
|
+
D && b(D.checked);
|
|
1814
1814
|
};
|
|
1815
1815
|
return document.addEventListener("change", S, !0), () => document.removeEventListener("change", S, !0);
|
|
1816
|
-
}, [g,
|
|
1816
|
+
}, [g, x]);
|
|
1817
1817
|
const R = {
|
|
1818
1818
|
sm: {
|
|
1819
1819
|
ring: "w-4 h-4",
|
|
@@ -1833,16 +1833,16 @@ const Lt = ne.forwardRef(
|
|
|
1833
1833
|
label: "text-lg",
|
|
1834
1834
|
gap: "gap-3"
|
|
1835
1835
|
}
|
|
1836
|
-
},
|
|
1836
|
+
}, w = R[n] || R.md, i = u;
|
|
1837
1837
|
return /* @__PURE__ */ r(
|
|
1838
1838
|
"label",
|
|
1839
1839
|
{
|
|
1840
1840
|
htmlFor: C,
|
|
1841
1841
|
className: `
|
|
1842
1842
|
inline-flex items-center
|
|
1843
|
-
${
|
|
1843
|
+
${w.gap}
|
|
1844
1844
|
cursor-pointer
|
|
1845
|
-
${
|
|
1845
|
+
${$ ? "opacity-50 cursor-not-allowed" : ""}
|
|
1846
1846
|
${o}
|
|
1847
1847
|
align-middle
|
|
1848
1848
|
w-fit
|
|
@@ -1852,15 +1852,15 @@ const Lt = ne.forwardRef(
|
|
|
1852
1852
|
"input",
|
|
1853
1853
|
{
|
|
1854
1854
|
ref: (S) => {
|
|
1855
|
-
typeof
|
|
1855
|
+
typeof y == "function" ? y(S) : y && (y.current = S), v.current = S;
|
|
1856
1856
|
},
|
|
1857
1857
|
id: C,
|
|
1858
1858
|
type: "radio",
|
|
1859
|
-
checked: g ? t :
|
|
1859
|
+
checked: g ? t : I,
|
|
1860
1860
|
onChange: A,
|
|
1861
|
-
disabled:
|
|
1861
|
+
disabled: $,
|
|
1862
1862
|
value: N,
|
|
1863
|
-
name:
|
|
1863
|
+
name: x,
|
|
1864
1864
|
className: "sr-only",
|
|
1865
1865
|
"aria-invalid": p,
|
|
1866
1866
|
...c
|
|
@@ -1871,7 +1871,7 @@ const Lt = ne.forwardRef(
|
|
|
1871
1871
|
{
|
|
1872
1872
|
className: `
|
|
1873
1873
|
relative flex-shrink-0
|
|
1874
|
-
${
|
|
1874
|
+
${w.ring}
|
|
1875
1875
|
rounded-full
|
|
1876
1876
|
flex items-center justify-center
|
|
1877
1877
|
border-2
|
|
@@ -1889,7 +1889,7 @@ const Lt = ne.forwardRef(
|
|
|
1889
1889
|
"span",
|
|
1890
1890
|
{
|
|
1891
1891
|
className: `
|
|
1892
|
-
${
|
|
1892
|
+
${w.dot}
|
|
1893
1893
|
rounded-full
|
|
1894
1894
|
bg-[var(--color-primary)]
|
|
1895
1895
|
transition-transform duration-100
|
|
@@ -1913,11 +1913,11 @@ const Lt = ne.forwardRef(
|
|
|
1913
1913
|
"span",
|
|
1914
1914
|
{
|
|
1915
1915
|
className: `
|
|
1916
|
-
${
|
|
1916
|
+
${w.label}
|
|
1917
1917
|
font-sans font-medium
|
|
1918
1918
|
text-[var(--color-text-primary)]
|
|
1919
1919
|
select-none
|
|
1920
|
-
${
|
|
1920
|
+
${$ ? "text-[var(--color-text-tertiary)]" : ""}
|
|
1921
1921
|
align-middle
|
|
1922
1922
|
`,
|
|
1923
1923
|
children: s
|
|
@@ -1954,18 +1954,18 @@ const $t = ne.forwardRef(
|
|
|
1954
1954
|
onChange: n,
|
|
1955
1955
|
onChangeComplete: L,
|
|
1956
1956
|
label: p,
|
|
1957
|
-
suffix:
|
|
1957
|
+
suffix: $ = "%",
|
|
1958
1958
|
prefix: N = "",
|
|
1959
|
-
showValue:
|
|
1959
|
+
showValue: x = !0,
|
|
1960
1960
|
valuePosition: o = "right",
|
|
1961
|
-
size:
|
|
1961
|
+
size: M = "md",
|
|
1962
1962
|
color: c = "primary",
|
|
1963
|
-
glow:
|
|
1963
|
+
glow: y = !0,
|
|
1964
1964
|
disabled: g = !1,
|
|
1965
|
-
fullWidth:
|
|
1966
|
-
className:
|
|
1965
|
+
fullWidth: I = !0,
|
|
1966
|
+
className: k = ""
|
|
1967
1967
|
}, u) => {
|
|
1968
|
-
const
|
|
1968
|
+
const b = t !== void 0, [v, T] = P(l), [C, A] = P(!1), [R, w] = P(null), [i, S] = P(!1), D = Z(null), f = Z(null), h = Z(null), d = Z(0), q = Math.max(a, Math.min(m, b ? t : v)), V = R !== null ? Math.max(a, Math.min(m, R)) : q, G = (V - a) / (m - a) * 100, X = V >= m, [B, J] = P(!1);
|
|
1969
1969
|
Y(() => {
|
|
1970
1970
|
const K = () => {
|
|
1971
1971
|
J(document.documentElement.dir === "rtl");
|
|
@@ -2050,10 +2050,10 @@ const $t = ne.forwardRef(
|
|
|
2050
2050
|
gap: "gap-3",
|
|
2051
2051
|
minHeight: "76px"
|
|
2052
2052
|
}
|
|
2053
|
-
}[
|
|
2053
|
+
}[M], Q = F(
|
|
2054
2054
|
(K) => {
|
|
2055
|
-
if (
|
|
2056
|
-
const le =
|
|
2055
|
+
if (!D.current) return V;
|
|
2056
|
+
const le = D.current.getBoundingClientRect();
|
|
2057
2057
|
let ue = (K - le.left) / le.width;
|
|
2058
2058
|
B && (ue = 1 - ue);
|
|
2059
2059
|
const E = ue * (m - a) + a, H = Math.round(E / s) * s;
|
|
@@ -2062,29 +2062,29 @@ const $t = ne.forwardRef(
|
|
|
2062
2062
|
[a, m, s, V, B]
|
|
2063
2063
|
), re = F(
|
|
2064
2064
|
(K) => {
|
|
2065
|
-
h.current !== K && (h.current = K,
|
|
2065
|
+
h.current !== K && (h.current = K, b || T(K), n == null || n(K));
|
|
2066
2066
|
},
|
|
2067
|
-
[
|
|
2067
|
+
[b, n]
|
|
2068
2068
|
), ae = F(
|
|
2069
2069
|
(K) => {
|
|
2070
2070
|
if (g) return;
|
|
2071
2071
|
A(!0);
|
|
2072
2072
|
const le = Q(K);
|
|
2073
|
-
|
|
2073
|
+
w(le), re(le);
|
|
2074
2074
|
},
|
|
2075
2075
|
[g, Q, re]
|
|
2076
2076
|
), oe = F(
|
|
2077
2077
|
(K) => {
|
|
2078
2078
|
if (!C || g) return;
|
|
2079
2079
|
const le = Q(K);
|
|
2080
|
-
|
|
2080
|
+
w(le), re(le);
|
|
2081
2081
|
},
|
|
2082
2082
|
[C, g, Q, re]
|
|
2083
2083
|
), ce = F(() => {
|
|
2084
2084
|
if (!C) return;
|
|
2085
2085
|
A(!1);
|
|
2086
2086
|
const K = R !== null ? R : q;
|
|
2087
|
-
|
|
2087
|
+
w(null), L == null || L(K);
|
|
2088
2088
|
}, [C, R, q, L]), z = (K) => {
|
|
2089
2089
|
ae(K.clientX), K.preventDefault();
|
|
2090
2090
|
};
|
|
@@ -2105,7 +2105,7 @@ const $t = ne.forwardRef(
|
|
|
2105
2105
|
document.removeEventListener("touchmove", K), document.removeEventListener("touchend", le);
|
|
2106
2106
|
};
|
|
2107
2107
|
}, [C, oe, ce]);
|
|
2108
|
-
const te = () => `${N}${V}${
|
|
2108
|
+
const te = () => `${N}${V}${$}`, se = {
|
|
2109
2109
|
left: "flex-row items-center gap-3",
|
|
2110
2110
|
right: "flex-row items-center gap-3",
|
|
2111
2111
|
top: "flex-col items-start gap-1.5",
|
|
@@ -2134,14 +2134,14 @@ const $t = ne.forwardRef(
|
|
|
2134
2134
|
}, [i]), pe = {
|
|
2135
2135
|
top: "50%",
|
|
2136
2136
|
transform: "translateY(-50%)"
|
|
2137
|
-
}, xe = C ? "none" : "width 120ms ease-out", Se = C ? "none" : "transform 120ms ease-out",
|
|
2137
|
+
}, xe = C ? "none" : "width 120ms ease-out", Se = C ? "none" : "transform 120ms ease-out", ge = o === "top" || o === "bottom", be = ge ? O.minHeight : "auto", Ce = ge ? "32px" : "auto";
|
|
2138
2138
|
return /* @__PURE__ */ r(
|
|
2139
2139
|
"div",
|
|
2140
2140
|
{
|
|
2141
2141
|
ref: u,
|
|
2142
|
-
className: `${
|
|
2142
|
+
className: `${I ? "w-full" : "inline-block"} ${k}`,
|
|
2143
2143
|
style: {
|
|
2144
|
-
minWidth:
|
|
2144
|
+
minWidth: ge ? "140px" : "120px",
|
|
2145
2145
|
minHeight: be
|
|
2146
2146
|
},
|
|
2147
2147
|
children: [
|
|
@@ -2157,10 +2157,10 @@ const $t = ne.forwardRef(
|
|
|
2157
2157
|
{
|
|
2158
2158
|
className: `flex ${se[o] || se.right}`,
|
|
2159
2159
|
style: {
|
|
2160
|
-
minHeight:
|
|
2160
|
+
minHeight: ge ? O.minHeight : "auto"
|
|
2161
2161
|
},
|
|
2162
2162
|
children: [
|
|
2163
|
-
|
|
2163
|
+
x && (o === "left" || o === "top") && /* @__PURE__ */ e(
|
|
2164
2164
|
"span",
|
|
2165
2165
|
{
|
|
2166
2166
|
className: `
|
|
@@ -2169,7 +2169,7 @@ const $t = ne.forwardRef(
|
|
|
2169
2169
|
font-mono font-medium
|
|
2170
2170
|
${_.text}
|
|
2171
2171
|
min-w-[2.5rem]
|
|
2172
|
-
${
|
|
2172
|
+
${ge ? "mb-0.5" : ""}
|
|
2173
2173
|
`,
|
|
2174
2174
|
children: te()
|
|
2175
2175
|
}
|
|
@@ -2177,7 +2177,7 @@ const $t = ne.forwardRef(
|
|
|
2177
2177
|
/* @__PURE__ */ r(
|
|
2178
2178
|
"div",
|
|
2179
2179
|
{
|
|
2180
|
-
ref:
|
|
2180
|
+
ref: D,
|
|
2181
2181
|
className: `
|
|
2182
2182
|
relative flex-1
|
|
2183
2183
|
${O.gap}
|
|
@@ -2211,7 +2211,7 @@ const $t = ne.forwardRef(
|
|
|
2211
2211
|
${O.track}
|
|
2212
2212
|
rounded-full
|
|
2213
2213
|
${_.track}
|
|
2214
|
-
${
|
|
2214
|
+
${y ? _.glow : ""}
|
|
2215
2215
|
`,
|
|
2216
2216
|
style: {
|
|
2217
2217
|
...pe,
|
|
@@ -2224,7 +2224,7 @@ const $t = ne.forwardRef(
|
|
|
2224
2224
|
/* @__PURE__ */ r(
|
|
2225
2225
|
"div",
|
|
2226
2226
|
{
|
|
2227
|
-
ref:
|
|
2227
|
+
ref: f,
|
|
2228
2228
|
className: `
|
|
2229
2229
|
absolute
|
|
2230
2230
|
${O.thumb}
|
|
@@ -2251,7 +2251,7 @@ const $t = ne.forwardRef(
|
|
|
2251
2251
|
${O.thumbInner}
|
|
2252
2252
|
rounded-full
|
|
2253
2253
|
${_.track}
|
|
2254
|
-
${
|
|
2254
|
+
${y ? _.glow : ""}
|
|
2255
2255
|
`
|
|
2256
2256
|
}
|
|
2257
2257
|
),
|
|
@@ -2282,7 +2282,7 @@ const $t = ne.forwardRef(
|
|
|
2282
2282
|
]
|
|
2283
2283
|
}
|
|
2284
2284
|
),
|
|
2285
|
-
|
|
2285
|
+
x && (o === "right" || o === "bottom") && /* @__PURE__ */ e(
|
|
2286
2286
|
"span",
|
|
2287
2287
|
{
|
|
2288
2288
|
className: `
|
|
@@ -2291,7 +2291,7 @@ const $t = ne.forwardRef(
|
|
|
2291
2291
|
font-mono font-medium
|
|
2292
2292
|
${_.text}
|
|
2293
2293
|
min-w-[2.5rem]
|
|
2294
|
-
${
|
|
2294
|
+
${ge ? "mt-0.5" : ""}
|
|
2295
2295
|
`,
|
|
2296
2296
|
children: te()
|
|
2297
2297
|
}
|
|
@@ -2336,66 +2336,66 @@ const Me = [
|
|
|
2336
2336
|
var c;
|
|
2337
2337
|
const s = "dara-ui-language", n = a || Me, L = () => {
|
|
2338
2338
|
var g;
|
|
2339
|
-
const
|
|
2340
|
-
return
|
|
2341
|
-
}, [p,
|
|
2342
|
-
(
|
|
2343
|
-
const
|
|
2344
|
-
let u =
|
|
2345
|
-
for (const
|
|
2346
|
-
if (u && typeof u == "object" &&
|
|
2347
|
-
u = u[
|
|
2339
|
+
const y = localStorage.getItem(s);
|
|
2340
|
+
return y && n.some((I) => I.value === y) ? y : t || ((g = n[0]) == null ? void 0 : g.value) || "en";
|
|
2341
|
+
}, [p, $] = P(L), N = F(
|
|
2342
|
+
(y, g) => {
|
|
2343
|
+
const I = l[p] || l.en || {}, k = y.split(".");
|
|
2344
|
+
let u = I;
|
|
2345
|
+
for (const b of k)
|
|
2346
|
+
if (u && typeof u == "object" && b in u)
|
|
2347
|
+
u = u[b];
|
|
2348
2348
|
else {
|
|
2349
|
-
let
|
|
2350
|
-
for (const C of
|
|
2351
|
-
if (
|
|
2352
|
-
|
|
2349
|
+
let T = l.en || {};
|
|
2350
|
+
for (const C of k)
|
|
2351
|
+
if (T && typeof T == "object" && C in T)
|
|
2352
|
+
T = T[C];
|
|
2353
2353
|
else
|
|
2354
|
-
return
|
|
2355
|
-
u =
|
|
2354
|
+
return y;
|
|
2355
|
+
u = T;
|
|
2356
2356
|
break;
|
|
2357
2357
|
}
|
|
2358
|
-
return typeof u != "string" ?
|
|
2358
|
+
return typeof u != "string" ? y : g ? u.replace(/\{\{(\w+)\}\}/g, (b, v) => String(g[v] ?? `{{${v}}}`)) : u;
|
|
2359
2359
|
},
|
|
2360
2360
|
[p, l]
|
|
2361
|
-
),
|
|
2362
|
-
(
|
|
2363
|
-
const g = n.find((
|
|
2364
|
-
g && (
|
|
2365
|
-
new CustomEvent("dara-language-change", { detail: { lang:
|
|
2361
|
+
), x = F(
|
|
2362
|
+
(y) => {
|
|
2363
|
+
const g = n.find((I) => I.value === y);
|
|
2364
|
+
g && ($(y), document.documentElement.lang = y, document.documentElement.dir = g.dir || "ltr", localStorage.setItem(s, y), window.dispatchEvent(
|
|
2365
|
+
new CustomEvent("dara-language-change", { detail: { lang: y } })
|
|
2366
2366
|
));
|
|
2367
2367
|
},
|
|
2368
2368
|
[n]
|
|
2369
2369
|
);
|
|
2370
2370
|
Y(() => {
|
|
2371
|
-
const
|
|
2372
|
-
g && (document.documentElement.lang =
|
|
2371
|
+
const y = L(), g = n.find((I) => I.value === y);
|
|
2372
|
+
g && (document.documentElement.lang = y, document.documentElement.dir = g.dir || "ltr");
|
|
2373
2373
|
}, [n]), Y(() => {
|
|
2374
|
-
const
|
|
2375
|
-
const { lang:
|
|
2376
|
-
|
|
2374
|
+
const y = (g) => {
|
|
2375
|
+
const { lang: I } = g.detail;
|
|
2376
|
+
I && I !== p && $(I);
|
|
2377
2377
|
};
|
|
2378
2378
|
return window.addEventListener(
|
|
2379
2379
|
"dara-language-change",
|
|
2380
|
-
|
|
2380
|
+
y
|
|
2381
2381
|
), () => {
|
|
2382
2382
|
window.removeEventListener(
|
|
2383
2383
|
"dara-language-change",
|
|
2384
|
-
|
|
2384
|
+
y
|
|
2385
2385
|
);
|
|
2386
2386
|
};
|
|
2387
2387
|
}, [p]);
|
|
2388
|
-
const o = ((c = n.find((
|
|
2388
|
+
const o = ((c = n.find((y) => y.value === p)) == null ? void 0 : c.dir) || "ltr", M = ve(
|
|
2389
2389
|
() => ({
|
|
2390
2390
|
language: p,
|
|
2391
|
-
setLanguage:
|
|
2391
|
+
setLanguage: x,
|
|
2392
2392
|
t: N,
|
|
2393
2393
|
languages: n,
|
|
2394
2394
|
dir: o
|
|
2395
2395
|
}),
|
|
2396
|
-
[p,
|
|
2396
|
+
[p, x, N, n, o]
|
|
2397
2397
|
);
|
|
2398
|
-
return /* @__PURE__ */ e(Be.Provider, { value:
|
|
2398
|
+
return /* @__PURE__ */ e(Be.Provider, { value: M, children: m });
|
|
2399
2399
|
}, ke = () => {
|
|
2400
2400
|
const t = Ne(Be);
|
|
2401
2401
|
if (!t)
|
|
@@ -2480,23 +2480,23 @@ const Me = [
|
|
|
2480
2480
|
iconOnly: n = !1,
|
|
2481
2481
|
fixedWidth: L,
|
|
2482
2482
|
className: p = "",
|
|
2483
|
-
placement:
|
|
2483
|
+
placement: $ = "bottom",
|
|
2484
2484
|
openUpward: N = !1,
|
|
2485
|
-
useContext:
|
|
2485
|
+
useContext: x = !0
|
|
2486
2486
|
}) => {
|
|
2487
|
-
const [o,
|
|
2487
|
+
const [o, M] = P(!1), [c, y] = P(Me), g = Z(null), I = "dara-ui-language", k = Ne(Be), u = x && k !== void 0, b = t !== void 0, [v, T] = P(() => {
|
|
2488
2488
|
var j;
|
|
2489
|
-
const d = localStorage.getItem(
|
|
2489
|
+
const d = localStorage.getItem(I);
|
|
2490
2490
|
return d && Me.find((V) => V.value === d) ? d : l || ((j = Me[0]) == null ? void 0 : j.value) || "en";
|
|
2491
2491
|
});
|
|
2492
2492
|
let C;
|
|
2493
|
-
|
|
2494
|
-
m &&
|
|
2493
|
+
b ? C = t : u ? C = k.language : C = v, Y(() => {
|
|
2494
|
+
m && y(m);
|
|
2495
2495
|
}, [m]);
|
|
2496
2496
|
const A = F(
|
|
2497
2497
|
(d) => {
|
|
2498
2498
|
const j = c.find((q) => q.value === d);
|
|
2499
|
-
document.documentElement.lang = d, document.documentElement.dir = (j == null ? void 0 : j.dir) || "ltr", localStorage.setItem(
|
|
2499
|
+
document.documentElement.lang = d, document.documentElement.dir = (j == null ? void 0 : j.dir) || "ltr", localStorage.setItem(I, d), window.dispatchEvent(
|
|
2500
2500
|
new CustomEvent("dara-language-change", { detail: { lang: d } })
|
|
2501
2501
|
);
|
|
2502
2502
|
},
|
|
@@ -2506,7 +2506,7 @@ const Me = [
|
|
|
2506
2506
|
A(C);
|
|
2507
2507
|
}, [C, A]), Y(() => {
|
|
2508
2508
|
const d = (j) => {
|
|
2509
|
-
g.current && !g.current.contains(j.target) &&
|
|
2509
|
+
g.current && !g.current.contains(j.target) && M(!1);
|
|
2510
2510
|
};
|
|
2511
2511
|
return o && document.addEventListener("mousedown", d), () => {
|
|
2512
2512
|
document.removeEventListener("mousedown", d);
|
|
@@ -2514,10 +2514,10 @@ const Me = [
|
|
|
2514
2514
|
}, [o]);
|
|
2515
2515
|
const R = F(
|
|
2516
2516
|
(d) => {
|
|
2517
|
-
u ?
|
|
2517
|
+
u ? k.setLanguage(d) : b || T(d), A(d), a == null || a(d), M(!1);
|
|
2518
2518
|
},
|
|
2519
|
-
[u,
|
|
2520
|
-
),
|
|
2519
|
+
[u, k, b, a, A]
|
|
2520
|
+
), w = ve(
|
|
2521
2521
|
() => c.map((d) => ({
|
|
2522
2522
|
...d,
|
|
2523
2523
|
icon: d.icon || /* @__PURE__ */ e(Mt, { code: d.value })
|
|
@@ -2551,7 +2551,7 @@ const Me = [
|
|
|
2551
2551
|
iconOnlyWidth: "48px",
|
|
2552
2552
|
flagSize: "w-6 h-4.5"
|
|
2553
2553
|
}
|
|
2554
|
-
}, S =
|
|
2554
|
+
}, S = w.find((d) => d.value === C), D = n ? i[s].iconOnlyWidth : L || "140px", f = () => N || $ === "top" ? "bottom-full mb-1.5" : "top-full mt-1.5", h = (d, j) => {
|
|
2555
2555
|
const q = Xe(d);
|
|
2556
2556
|
return /* @__PURE__ */ e(
|
|
2557
2557
|
"img",
|
|
@@ -2580,7 +2580,7 @@ const Me = [
|
|
|
2580
2580
|
"button",
|
|
2581
2581
|
{
|
|
2582
2582
|
type: "button",
|
|
2583
|
-
onClick: () =>
|
|
2583
|
+
onClick: () => M(!o),
|
|
2584
2584
|
className: `
|
|
2585
2585
|
inline-flex items-center justify-center
|
|
2586
2586
|
bg-[var(--color-bg-tertiary)]
|
|
@@ -2612,7 +2612,7 @@ const Me = [
|
|
|
2612
2612
|
className: `
|
|
2613
2613
|
absolute z-50
|
|
2614
2614
|
left-1/2 -translate-x-1/2
|
|
2615
|
-
${
|
|
2615
|
+
${f()}
|
|
2616
2616
|
glass
|
|
2617
2617
|
rounded-[var(--radius-md)]
|
|
2618
2618
|
py-1
|
|
@@ -2622,8 +2622,8 @@ const Me = [
|
|
|
2622
2622
|
${o ? "opacity-100 translate-y-0 pointer-events-auto" : N ? "opacity-0 translate-y-2 pointer-events-none" : "opacity-0 -translate-y-2 pointer-events-none"}
|
|
2623
2623
|
`,
|
|
2624
2624
|
style: {
|
|
2625
|
-
width:
|
|
2626
|
-
minWidth:
|
|
2625
|
+
width: D,
|
|
2626
|
+
minWidth: D,
|
|
2627
2627
|
position: "absolute",
|
|
2628
2628
|
top: N ? "auto" : "100%",
|
|
2629
2629
|
bottom: N ? "100%" : "auto",
|
|
@@ -2631,7 +2631,7 @@ const Me = [
|
|
|
2631
2631
|
marginBottom: N ? "6px" : "0"
|
|
2632
2632
|
},
|
|
2633
2633
|
role: "listbox",
|
|
2634
|
-
children:
|
|
2634
|
+
children: w.map((d) => {
|
|
2635
2635
|
const j = d.value === C;
|
|
2636
2636
|
return /* @__PURE__ */ e(
|
|
2637
2637
|
"button",
|
|
@@ -2670,7 +2670,7 @@ const Me = [
|
|
|
2670
2670
|
"button",
|
|
2671
2671
|
{
|
|
2672
2672
|
type: "button",
|
|
2673
|
-
onClick: () =>
|
|
2673
|
+
onClick: () => M(!o),
|
|
2674
2674
|
className: `
|
|
2675
2675
|
inline-flex items-center
|
|
2676
2676
|
bg-[var(--color-bg-tertiary)]
|
|
@@ -2726,12 +2726,12 @@ const Me = [
|
|
|
2726
2726
|
className: `
|
|
2727
2727
|
absolute z-50
|
|
2728
2728
|
left-1/2 -translate-x-1/2
|
|
2729
|
-
${
|
|
2729
|
+
${f()}
|
|
2730
2730
|
pointer-events-none
|
|
2731
2731
|
`,
|
|
2732
2732
|
style: {
|
|
2733
|
-
width:
|
|
2734
|
-
minWidth:
|
|
2733
|
+
width: D,
|
|
2734
|
+
minWidth: D,
|
|
2735
2735
|
top: "100%",
|
|
2736
2736
|
marginTop: "6px"
|
|
2737
2737
|
},
|
|
@@ -2747,7 +2747,7 @@ const Me = [
|
|
|
2747
2747
|
overflow-hidden
|
|
2748
2748
|
${o ? "opacity-100 translate-y-0 pointer-events-auto" : "opacity-0 -translate-y-2 pointer-events-none"}
|
|
2749
2749
|
`,
|
|
2750
|
-
children:
|
|
2750
|
+
children: w.map((d) => {
|
|
2751
2751
|
const j = d.value === C;
|
|
2752
2752
|
return /* @__PURE__ */ r(
|
|
2753
2753
|
"button",
|
|
@@ -2815,25 +2815,25 @@ const It = ({
|
|
|
2815
2815
|
searchPlaceholder: n = "Search...",
|
|
2816
2816
|
onSearch: L,
|
|
2817
2817
|
showLanguageChanger: p = !1,
|
|
2818
|
-
showThemeChanger:
|
|
2818
|
+
showThemeChanger: $ = !1,
|
|
2819
2819
|
languageChanger: N,
|
|
2820
|
-
themeChanger:
|
|
2820
|
+
themeChanger: x,
|
|
2821
2821
|
languageChangerMobile: o,
|
|
2822
|
-
themeChangerMobile:
|
|
2822
|
+
themeChangerMobile: M,
|
|
2823
2823
|
rightContent: c,
|
|
2824
|
-
className:
|
|
2824
|
+
className: y = "",
|
|
2825
2825
|
scrollSpy: g = !1,
|
|
2826
|
-
scrollSpyOffset:
|
|
2827
|
-
onActiveChange:
|
|
2826
|
+
scrollSpyOffset: I = 140,
|
|
2827
|
+
onActiveChange: k
|
|
2828
2828
|
}) => {
|
|
2829
|
-
const { t: u } = ke(), [
|
|
2829
|
+
const { t: u } = ke(), [b, v] = P(!1), [T, C] = P(!1), [A, R] = P(!1), [w, i] = P(""), [S, D] = P(!1), [f, h] = P(!1), [d, j] = P(""), q = Z(null), V = Z(null), G = Z(null), X = Z(null), B = typeof document < "u" && document.documentElement.dir === "rtl";
|
|
2830
2830
|
Y(() => {
|
|
2831
2831
|
const z = () => h(window.innerWidth < 768);
|
|
2832
2832
|
return z(), window.addEventListener("resize", z), () => window.removeEventListener("resize", z);
|
|
2833
2833
|
}, []), Y(() => {
|
|
2834
2834
|
const z = () => {
|
|
2835
2835
|
X.current && clearTimeout(X.current), X.current = setTimeout(() => {
|
|
2836
|
-
|
|
2836
|
+
v(window.scrollY > 20);
|
|
2837
2837
|
}, 50);
|
|
2838
2838
|
};
|
|
2839
2839
|
return window.addEventListener("scroll", z, { passive: !0 }), () => {
|
|
@@ -2854,35 +2854,35 @@ const It = ({
|
|
|
2854
2854
|
let he = null;
|
|
2855
2855
|
if (ie.forEach((pe) => {
|
|
2856
2856
|
const xe = pe.getBoundingClientRect(), Se = te.get(pe.id) ?? 0;
|
|
2857
|
-
if (xe.bottom <
|
|
2858
|
-
const
|
|
2857
|
+
if (xe.bottom < I || xe.top > window.innerHeight) return;
|
|
2858
|
+
const ge = Math.abs(xe.top - I), be = Se * 1e3 - ge;
|
|
2859
2859
|
(!he || be > he.score) && (he = { id: pe.id, score: be });
|
|
2860
2860
|
}), he && he.id !== d) {
|
|
2861
2861
|
const pe = he.id;
|
|
2862
|
-
j(pe),
|
|
2862
|
+
j(pe), k == null || k(pe);
|
|
2863
2863
|
}
|
|
2864
2864
|
},
|
|
2865
2865
|
{
|
|
2866
|
-
rootMargin: `-${
|
|
2866
|
+
rootMargin: `-${I}px 0px -50% 0px`,
|
|
2867
2867
|
threshold: [0, 0.1, 0.25, 0.5, 0.75, 1]
|
|
2868
2868
|
}
|
|
2869
2869
|
);
|
|
2870
2870
|
return ie.forEach((de) => se.observe(de)), () => se.disconnect();
|
|
2871
|
-
}, [g,
|
|
2871
|
+
}, [g, I, l, d, k]), Y(() => {
|
|
2872
2872
|
const z = (ie) => {
|
|
2873
|
-
ie.key === "Escape" &&
|
|
2873
|
+
ie.key === "Escape" && T && C(!1);
|
|
2874
2874
|
};
|
|
2875
2875
|
return document.addEventListener("keydown", z), () => document.removeEventListener("keydown", z);
|
|
2876
|
-
}, [
|
|
2876
|
+
}, [T]), Y(() => (T ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
2877
2877
|
document.body.style.overflow = "";
|
|
2878
|
-
}), [
|
|
2878
|
+
}), [T]), Y(() => {
|
|
2879
2879
|
A && V.current && V.current.focus();
|
|
2880
2880
|
}, [A]);
|
|
2881
2881
|
const J = F(
|
|
2882
2882
|
(z) => {
|
|
2883
|
-
z.preventDefault(),
|
|
2883
|
+
z.preventDefault(), w.trim() && L && L(w);
|
|
2884
2884
|
},
|
|
2885
|
-
[
|
|
2885
|
+
[w, L]
|
|
2886
2886
|
), ee = F(() => {
|
|
2887
2887
|
C((z) => !z);
|
|
2888
2888
|
}, []), _ = F(() => {
|
|
@@ -2891,13 +2891,13 @@ const It = ({
|
|
|
2891
2891
|
return (z = V.current) == null ? void 0 : z.focus();
|
|
2892
2892
|
}, 100);
|
|
2893
2893
|
}, [A]), W = F(() => {
|
|
2894
|
-
|
|
2895
|
-
}, [
|
|
2894
|
+
f && !w && R(!1);
|
|
2895
|
+
}, [f, w]), O = F(() => {
|
|
2896
2896
|
C(!1);
|
|
2897
2897
|
}, []), Q = F(() => {
|
|
2898
|
-
|
|
2898
|
+
D(!0);
|
|
2899
2899
|
}, []), re = F(() => {
|
|
2900
|
-
|
|
2900
|
+
D(!1);
|
|
2901
2901
|
}, []), ae = F(
|
|
2902
2902
|
(z) => {
|
|
2903
2903
|
if (!g) return !!z.active;
|
|
@@ -2926,12 +2926,12 @@ const It = ({
|
|
|
2926
2926
|
className: `
|
|
2927
2927
|
fixed top-0 left-0 right-0 z-50
|
|
2928
2928
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
2929
|
-
${
|
|
2930
|
-
${
|
|
2929
|
+
${b ? "px-3 md:px-4" : ""}
|
|
2930
|
+
${y}
|
|
2931
2931
|
`,
|
|
2932
2932
|
style: {
|
|
2933
|
-
paddingTop:
|
|
2934
|
-
paddingBottom:
|
|
2933
|
+
paddingTop: b ? "12px" : "0",
|
|
2934
|
+
paddingBottom: b ? "12px" : "0"
|
|
2935
2935
|
},
|
|
2936
2936
|
children: /* @__PURE__ */ r(
|
|
2937
2937
|
"div",
|
|
@@ -2942,7 +2942,7 @@ const It = ({
|
|
|
2942
2942
|
duration-300 ease-[var(--ease-in-out)]
|
|
2943
2943
|
bg-[var(--color-bg-secondary)]/80 backdrop-blur-[20px]
|
|
2944
2944
|
border-b
|
|
2945
|
-
${
|
|
2945
|
+
${b ? "rounded-full shadow-[var(--shadow-float)] py-2 px-5 md:px-8 border-transparent" : "border-[var(--color-border-primary)] py-3 px-5 md:px-8 rounded-none"}
|
|
2946
2946
|
`,
|
|
2947
2947
|
children: [
|
|
2948
2948
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-[auto_1fr_auto] items-center md:gap-4", children: [
|
|
@@ -2969,13 +2969,13 @@ const It = ({
|
|
|
2969
2969
|
);
|
|
2970
2970
|
}) }),
|
|
2971
2971
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 justify-end", children: [
|
|
2972
|
-
s && !
|
|
2972
|
+
s && !f && /* @__PURE__ */ e("form", { onSubmit: J, className: "relative", children: /* @__PURE__ */ e(
|
|
2973
2973
|
$e,
|
|
2974
2974
|
{
|
|
2975
2975
|
ref: V,
|
|
2976
2976
|
type: "search",
|
|
2977
2977
|
placeholder: n,
|
|
2978
|
-
value:
|
|
2978
|
+
value: w,
|
|
2979
2979
|
onChange: (z) => i(z.target.value),
|
|
2980
2980
|
size: "sm",
|
|
2981
2981
|
className: "w-44 lg:w-56",
|
|
@@ -2999,7 +2999,7 @@ const It = ({
|
|
|
2999
2999
|
)
|
|
3000
3000
|
}
|
|
3001
3001
|
) }),
|
|
3002
|
-
s &&
|
|
3002
|
+
s && f && /* @__PURE__ */ r(
|
|
3003
3003
|
"div",
|
|
3004
3004
|
{
|
|
3005
3005
|
className: `
|
|
@@ -3013,7 +3013,7 @@ const It = ({
|
|
|
3013
3013
|
ref: V,
|
|
3014
3014
|
type: "search",
|
|
3015
3015
|
placeholder: n,
|
|
3016
|
-
value:
|
|
3016
|
+
value: w,
|
|
3017
3017
|
onChange: (z) => i(z.target.value),
|
|
3018
3018
|
onBlur: W,
|
|
3019
3019
|
size: "sm",
|
|
@@ -3056,8 +3056,8 @@ const It = ({
|
|
|
3056
3056
|
]
|
|
3057
3057
|
}
|
|
3058
3058
|
),
|
|
3059
|
-
!
|
|
3060
|
-
!
|
|
3059
|
+
!f && p && N,
|
|
3060
|
+
!f && $ && x,
|
|
3061
3061
|
c,
|
|
3062
3062
|
/* @__PURE__ */ r(
|
|
3063
3063
|
"button",
|
|
@@ -3065,24 +3065,24 @@ const It = ({
|
|
|
3065
3065
|
onClick: ee,
|
|
3066
3066
|
className: "md:hidden relative w-10 h-10 rounded-full bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)] transition-all duration-180 flex items-center justify-center flex-shrink-0",
|
|
3067
3067
|
"aria-label": "Toggle menu",
|
|
3068
|
-
"aria-expanded":
|
|
3068
|
+
"aria-expanded": T,
|
|
3069
3069
|
children: [
|
|
3070
3070
|
/* @__PURE__ */ e(
|
|
3071
3071
|
"span",
|
|
3072
3072
|
{
|
|
3073
|
-
className: `absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${
|
|
3073
|
+
className: `absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${T ? "rotate-45" : "-translate-y-1.5"}`
|
|
3074
3074
|
}
|
|
3075
3075
|
),
|
|
3076
3076
|
/* @__PURE__ */ e(
|
|
3077
3077
|
"span",
|
|
3078
3078
|
{
|
|
3079
|
-
className: `absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${
|
|
3079
|
+
className: `absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${T ? "opacity-0 scale-0" : "opacity-100"}`
|
|
3080
3080
|
}
|
|
3081
3081
|
),
|
|
3082
3082
|
/* @__PURE__ */ e(
|
|
3083
3083
|
"span",
|
|
3084
3084
|
{
|
|
3085
|
-
className: `absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${
|
|
3085
|
+
className: `absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${T ? "-rotate-45" : "translate-y-1.5"}`
|
|
3086
3086
|
}
|
|
3087
3087
|
)
|
|
3088
3088
|
]
|
|
@@ -3090,7 +3090,7 @@ const It = ({
|
|
|
3090
3090
|
)
|
|
3091
3091
|
] })
|
|
3092
3092
|
] }),
|
|
3093
|
-
a && !
|
|
3093
|
+
a && !f && /* @__PURE__ */ e(
|
|
3094
3094
|
"div",
|
|
3095
3095
|
{
|
|
3096
3096
|
className: `overflow-hidden transition-all duration-300 ease-[var(--ease-in-out)] ${S ? "max-h-20 opacity-100 mt-2" : "max-h-0 opacity-0"}`,
|
|
@@ -3127,7 +3127,7 @@ const It = ({
|
|
|
3127
3127
|
bg-black/60 backdrop-blur-[6px]
|
|
3128
3128
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
3129
3129
|
md:hidden
|
|
3130
|
-
${
|
|
3130
|
+
${T ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}
|
|
3131
3131
|
`,
|
|
3132
3132
|
onClick: ee,
|
|
3133
3133
|
"aria-hidden": "true"
|
|
@@ -3148,10 +3148,10 @@ const It = ({
|
|
|
3148
3148
|
transition-all duration-400 ease-[var(--ease-in-out)]
|
|
3149
3149
|
md:hidden
|
|
3150
3150
|
flex flex-col
|
|
3151
|
-
${
|
|
3151
|
+
${T ? "translate-x-0 opacity-100" : B ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"}
|
|
3152
3152
|
`,
|
|
3153
3153
|
style: {
|
|
3154
|
-
transform:
|
|
3154
|
+
transform: T ? "translateX(0)" : B ? "translateX(-100%)" : "translateX(100%)",
|
|
3155
3155
|
transition: "transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease"
|
|
3156
3156
|
},
|
|
3157
3157
|
role: "dialog",
|
|
@@ -3242,7 +3242,7 @@ const It = ({
|
|
|
3242
3242
|
{
|
|
3243
3243
|
type: "search",
|
|
3244
3244
|
placeholder: n,
|
|
3245
|
-
value:
|
|
3245
|
+
value: w,
|
|
3246
3246
|
onChange: (z) => i(z.target.value),
|
|
3247
3247
|
size: "sm",
|
|
3248
3248
|
className: "w-full",
|
|
@@ -3268,7 +3268,7 @@ const It = ({
|
|
|
3268
3268
|
) }),
|
|
3269
3269
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
3270
3270
|
p && (o || N),
|
|
3271
|
-
|
|
3271
|
+
$ && (M || x)
|
|
3272
3272
|
] }),
|
|
3273
3273
|
c && /* @__PURE__ */ e("div", { className: "pt-1", children: c })
|
|
3274
3274
|
] })
|
|
@@ -3287,31 +3287,31 @@ const Dt = ({
|
|
|
3287
3287
|
onCollapseChange: n,
|
|
3288
3288
|
iconOnly: L = !1,
|
|
3289
3289
|
showGroupLabels: p = !0,
|
|
3290
|
-
activeItemId:
|
|
3290
|
+
activeItemId: $,
|
|
3291
3291
|
defaultActiveItemId: N,
|
|
3292
|
-
onItemClick:
|
|
3292
|
+
onItemClick: x,
|
|
3293
3293
|
expandedWidth: o = "260px",
|
|
3294
|
-
collapsedWidth:
|
|
3294
|
+
collapsedWidth: M = "64px",
|
|
3295
3295
|
className: c = "",
|
|
3296
|
-
footer:
|
|
3296
|
+
footer: y,
|
|
3297
3297
|
fixed: g = !1,
|
|
3298
|
-
height:
|
|
3299
|
-
mobileBreakpoint:
|
|
3298
|
+
height: I = "100%",
|
|
3299
|
+
mobileBreakpoint: k = 768,
|
|
3300
3300
|
forceMobile: u = !1
|
|
3301
3301
|
}) => {
|
|
3302
3302
|
var le, ue;
|
|
3303
|
-
const [
|
|
3303
|
+
const [b, v] = P(!1);
|
|
3304
3304
|
Y(() => {
|
|
3305
3305
|
if (u) {
|
|
3306
|
-
|
|
3306
|
+
v(!0);
|
|
3307
3307
|
return;
|
|
3308
3308
|
}
|
|
3309
|
-
const E = () =>
|
|
3309
|
+
const E = () => v(window.innerWidth < k);
|
|
3310
3310
|
return E(), window.addEventListener("resize", E), () => window.removeEventListener("resize", E);
|
|
3311
|
-
}, [
|
|
3312
|
-
const
|
|
3311
|
+
}, [k, u]);
|
|
3312
|
+
const T = s !== void 0, [C, A] = P(m), R = T ? s : C, w = L || R, i = $ !== void 0, [S, D] = P(
|
|
3313
3313
|
N || ((ue = (le = l[0]) == null ? void 0 : le.items[0]) == null ? void 0 : ue.id)
|
|
3314
|
-
),
|
|
3314
|
+
), f = i ? $ : S, [h, d] = P(!1);
|
|
3315
3315
|
Y(() => {
|
|
3316
3316
|
const E = () => d(document.documentElement.dir === "rtl");
|
|
3317
3317
|
E();
|
|
@@ -3324,16 +3324,16 @@ const Dt = ({
|
|
|
3324
3324
|
const { activeItem: j, activeParent: q } = ve(() => {
|
|
3325
3325
|
for (const E of l)
|
|
3326
3326
|
for (const H of E.items) {
|
|
3327
|
-
if (H.id ===
|
|
3327
|
+
if (H.id === f)
|
|
3328
3328
|
return { activeItem: H, activeParent: null };
|
|
3329
3329
|
if (H.subItems) {
|
|
3330
3330
|
for (const U of H.subItems)
|
|
3331
|
-
if (U.id ===
|
|
3331
|
+
if (U.id === f)
|
|
3332
3332
|
return { activeItem: U, activeParent: H };
|
|
3333
3333
|
}
|
|
3334
3334
|
}
|
|
3335
3335
|
return { activeItem: null, activeParent: null };
|
|
3336
|
-
}, [l,
|
|
3336
|
+
}, [l, f]), [V, G] = P(() => {
|
|
3337
3337
|
const E = /* @__PURE__ */ new Set();
|
|
3338
3338
|
return l.forEach((H, U) => {
|
|
3339
3339
|
H.defaultExpanded !== !1 && E.add(`group-${U}`);
|
|
@@ -3359,14 +3359,14 @@ const Dt = ({
|
|
|
3359
3359
|
[h]
|
|
3360
3360
|
), te = F(
|
|
3361
3361
|
(E, H) => {
|
|
3362
|
-
i ||
|
|
3362
|
+
i || D(E), x == null || x(E), H == null || H();
|
|
3363
3363
|
},
|
|
3364
|
-
[i,
|
|
3364
|
+
[i, x]
|
|
3365
3365
|
), se = F(() => {
|
|
3366
3366
|
if (!a) return;
|
|
3367
3367
|
const E = !R;
|
|
3368
|
-
|
|
3369
|
-
}, [a, R,
|
|
3368
|
+
T || A(E), n == null || n(E);
|
|
3369
|
+
}, [a, R, T, n]), de = F((E) => {
|
|
3370
3370
|
G((H) => {
|
|
3371
3371
|
const U = new Set(H);
|
|
3372
3372
|
return U.has(E) ? U.delete(E) : U.add(E), U;
|
|
@@ -3378,7 +3378,7 @@ const Dt = ({
|
|
|
3378
3378
|
});
|
|
3379
3379
|
}, []);
|
|
3380
3380
|
Y(() => {
|
|
3381
|
-
if (!
|
|
3381
|
+
if (!b) return;
|
|
3382
3382
|
const E = J.current;
|
|
3383
3383
|
if (!E) return;
|
|
3384
3384
|
z(), E.addEventListener("scroll", z, { passive: !0 }), window.addEventListener("resize", z);
|
|
@@ -3386,18 +3386,18 @@ const Dt = ({
|
|
|
3386
3386
|
return typeof ResizeObserver < "u" && (H = new ResizeObserver(() => z()), H.observe(E)), () => {
|
|
3387
3387
|
E.removeEventListener("scroll", z), window.removeEventListener("resize", z), H == null || H.disconnect();
|
|
3388
3388
|
};
|
|
3389
|
-
}, [
|
|
3389
|
+
}, [b, z, l]), Y(() => {
|
|
3390
3390
|
var H;
|
|
3391
|
-
if (!
|
|
3391
|
+
if (!b) return;
|
|
3392
3392
|
const E = (H = J.current) == null ? void 0 : H.querySelector(
|
|
3393
|
-
`[data-sidebar-id="${
|
|
3393
|
+
`[data-sidebar-id="${f}"]`
|
|
3394
3394
|
);
|
|
3395
3395
|
E == null || E.scrollIntoView({
|
|
3396
3396
|
behavior: "smooth",
|
|
3397
3397
|
block: "nearest",
|
|
3398
3398
|
inline: "center"
|
|
3399
3399
|
});
|
|
3400
|
-
}, [
|
|
3400
|
+
}, [f, b]), Y(() => {
|
|
3401
3401
|
if (Q === re) return;
|
|
3402
3402
|
ce(!1);
|
|
3403
3403
|
const E = setTimeout(() => {
|
|
@@ -3405,15 +3405,15 @@ const Dt = ({
|
|
|
3405
3405
|
}, 160);
|
|
3406
3406
|
return () => clearTimeout(E);
|
|
3407
3407
|
}, [Q, re]), Y(() => {
|
|
3408
|
-
if (
|
|
3408
|
+
if (b) return;
|
|
3409
3409
|
const E = (H) => {
|
|
3410
3410
|
(H.ctrlKey || H.metaKey) && H.key === "b" && (H.preventDefault(), se());
|
|
3411
3411
|
};
|
|
3412
3412
|
return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
|
|
3413
|
-
}, [
|
|
3413
|
+
}, [b, se]);
|
|
3414
3414
|
const pe = (E, H = 0, U) => {
|
|
3415
|
-
const me =
|
|
3416
|
-
return
|
|
3415
|
+
const me = f === E.id, fe = !!(E.subItems && E.subItems.length > 0), Le = `${U || E.id}-sub`, Re = X.has(Le), tt = w ? 0 : H * 16;
|
|
3416
|
+
return w ? /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ r(
|
|
3417
3417
|
"button",
|
|
3418
3418
|
{
|
|
3419
3419
|
onClick: () => te(E.id, E.onClick),
|
|
@@ -3462,7 +3462,7 @@ const Dt = ({
|
|
|
3462
3462
|
"button",
|
|
3463
3463
|
{
|
|
3464
3464
|
onClick: () => {
|
|
3465
|
-
|
|
3465
|
+
fe ? he(Le) : te(E.id, E.onClick);
|
|
3466
3466
|
},
|
|
3467
3467
|
disabled: E.disabled,
|
|
3468
3468
|
className: `
|
|
@@ -3481,7 +3481,7 @@ const Dt = ({
|
|
|
3481
3481
|
},
|
|
3482
3482
|
"aria-current": me ? "page" : void 0,
|
|
3483
3483
|
"aria-disabled": E.disabled,
|
|
3484
|
-
"aria-expanded":
|
|
3484
|
+
"aria-expanded": fe ? Re : void 0,
|
|
3485
3485
|
children: [
|
|
3486
3486
|
E.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-current w-5 h-5 flex items-center justify-center", children: E.icon }),
|
|
3487
3487
|
/* @__PURE__ */ e(
|
|
@@ -3501,7 +3501,7 @@ const Dt = ({
|
|
|
3501
3501
|
children: E.badge
|
|
3502
3502
|
}
|
|
3503
3503
|
),
|
|
3504
|
-
|
|
3504
|
+
fe && /* @__PURE__ */ e(
|
|
3505
3505
|
"span",
|
|
3506
3506
|
{
|
|
3507
3507
|
className: `
|
|
@@ -3543,7 +3543,7 @@ const Dt = ({
|
|
|
3543
3543
|
]
|
|
3544
3544
|
}
|
|
3545
3545
|
),
|
|
3546
|
-
|
|
3546
|
+
fe && !w && /* @__PURE__ */ e(
|
|
3547
3547
|
"div",
|
|
3548
3548
|
{
|
|
3549
3549
|
className: `
|
|
@@ -3567,7 +3567,7 @@ const Dt = ({
|
|
|
3567
3567
|
] }, E.id);
|
|
3568
3568
|
}, xe = (E, H) => {
|
|
3569
3569
|
const U = `group-${H}`, me = V.has(U);
|
|
3570
|
-
return
|
|
3570
|
+
return w ? /* @__PURE__ */ e("div", { className: "space-y-1", children: E.items.map((fe) => pe(fe)) }, U) : /* @__PURE__ */ r("div", { className: "mb-2", children: [
|
|
3571
3571
|
p && /* @__PURE__ */ r(
|
|
3572
3572
|
"button",
|
|
3573
3573
|
{
|
|
@@ -3619,12 +3619,12 @@ const Dt = ({
|
|
|
3619
3619
|
overflow-hidden transition-all duration-300 ease-[var(--ease-in-out)]
|
|
3620
3620
|
${me ? "max-h-[9999px] opacity-100" : "max-h-0 opacity-0"}
|
|
3621
3621
|
`,
|
|
3622
|
-
children: /* @__PURE__ */ e("div", { className: "space-y-1 py-1", children: E.items.map((
|
|
3622
|
+
children: /* @__PURE__ */ e("div", { className: "space-y-1 py-1", children: E.items.map((fe) => pe(fe)) })
|
|
3623
3623
|
}
|
|
3624
3624
|
)
|
|
3625
3625
|
] }, U);
|
|
3626
3626
|
};
|
|
3627
|
-
if (
|
|
3627
|
+
if (b)
|
|
3628
3628
|
return /* @__PURE__ */ r("div", { className: `flex flex-col w-full h-full min-h-0 ${c}`, children: [
|
|
3629
3629
|
/* @__PURE__ */ r("div", { className: "relative flex items-stretch gap-2 px-4 pt-4 flex-shrink-0", children: [
|
|
3630
3630
|
/* @__PURE__ */ e(
|
|
@@ -3703,7 +3703,7 @@ const Dt = ({
|
|
|
3703
3703
|
}
|
|
3704
3704
|
),
|
|
3705
3705
|
E.items.map((U) => {
|
|
3706
|
-
const me = !!(U.subItems && U.subItems.length > 0),
|
|
3706
|
+
const me = !!(U.subItems && U.subItems.length > 0), fe = f === U.id || me && U.subItems.some((Le) => Le.id === f);
|
|
3707
3707
|
return /* @__PURE__ */ r(
|
|
3708
3708
|
"button",
|
|
3709
3709
|
{
|
|
@@ -3718,10 +3718,10 @@ const Dt = ({
|
|
|
3718
3718
|
text-sm font-medium whitespace-nowrap
|
|
3719
3719
|
transition-all duration-180
|
|
3720
3720
|
${U.disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"}
|
|
3721
|
-
${
|
|
3721
|
+
${fe ? "bg-[var(--color-primary-solid)] text-white" : "text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/40"}
|
|
3722
3722
|
`,
|
|
3723
|
-
style:
|
|
3724
|
-
"aria-current":
|
|
3723
|
+
style: fe ? { boxShadow: "none" } : void 0,
|
|
3724
|
+
"aria-current": fe ? "page" : void 0,
|
|
3725
3725
|
"aria-disabled": U.disabled,
|
|
3726
3726
|
children: [
|
|
3727
3727
|
U.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0 w-4 h-4 flex items-center justify-center", children: U.icon }),
|
|
@@ -3731,7 +3731,7 @@ const Dt = ({
|
|
|
3731
3731
|
{
|
|
3732
3732
|
className: `
|
|
3733
3733
|
flex-shrink-0 text-[10px] font-bold px-1.5 py-0.5 rounded-full
|
|
3734
|
-
${
|
|
3734
|
+
${fe ? "bg-white/25 text-white" : "bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]"}
|
|
3735
3735
|
`,
|
|
3736
3736
|
children: U.badge
|
|
3737
3737
|
}
|
|
@@ -3796,7 +3796,7 @@ const Dt = ({
|
|
|
3796
3796
|
":"
|
|
3797
3797
|
] }),
|
|
3798
3798
|
q.subItems.map((E) => {
|
|
3799
|
-
const H =
|
|
3799
|
+
const H = f === E.id;
|
|
3800
3800
|
return /* @__PURE__ */ r(
|
|
3801
3801
|
"button",
|
|
3802
3802
|
{
|
|
@@ -3853,7 +3853,7 @@ const Dt = ({
|
|
|
3853
3853
|
}
|
|
3854
3854
|
` })
|
|
3855
3855
|
] });
|
|
3856
|
-
const
|
|
3856
|
+
const ge = g ? "fixed top-0 z-40" : `relative overflow-hidden ${g ? "" : h ? "rounded-l-[var(--radius-large)]" : "rounded-r-[var(--radius-large)]"}`, be = h && !R ? { direction: "rtl" } : { direction: "ltr" }, Ce = h ? "ltr" : "rtl", K = h ? "rtl" : "ltr";
|
|
3857
3857
|
return /* @__PURE__ */ r(
|
|
3858
3858
|
"div",
|
|
3859
3859
|
{
|
|
@@ -3863,8 +3863,8 @@ const Dt = ({
|
|
|
3863
3863
|
${c}
|
|
3864
3864
|
`,
|
|
3865
3865
|
style: {
|
|
3866
|
-
height: g ? "100%" :
|
|
3867
|
-
maxHeight: g ? "100%" :
|
|
3866
|
+
height: g ? "100%" : I,
|
|
3867
|
+
maxHeight: g ? "100%" : I
|
|
3868
3868
|
},
|
|
3869
3869
|
children: [
|
|
3870
3870
|
/* @__PURE__ */ e("style", { children: `
|
|
@@ -3882,7 +3882,7 @@ const Dt = ({
|
|
|
3882
3882
|
"aside",
|
|
3883
3883
|
{
|
|
3884
3884
|
className: `
|
|
3885
|
-
${
|
|
3885
|
+
${ge}
|
|
3886
3886
|
h-full
|
|
3887
3887
|
bg-[var(--color-bg-secondary)]/95
|
|
3888
3888
|
backdrop-blur-[20px]
|
|
@@ -3893,7 +3893,7 @@ const Dt = ({
|
|
|
3893
3893
|
${g ? "" : "shadow-[var(--shadow-float)]"}
|
|
3894
3894
|
`,
|
|
3895
3895
|
style: {
|
|
3896
|
-
width: R ?
|
|
3896
|
+
width: R ? M : o,
|
|
3897
3897
|
[h ? "right" : "left"]: g ? 0 : "auto",
|
|
3898
3898
|
flexShrink: 0,
|
|
3899
3899
|
height: "100%",
|
|
@@ -3938,7 +3938,7 @@ const Dt = ({
|
|
|
3938
3938
|
}
|
|
3939
3939
|
),
|
|
3940
3940
|
/* @__PURE__ */ r("div", { className: "border-t border-[var(--color-border-primary)] flex-shrink-0", children: [
|
|
3941
|
-
|
|
3941
|
+
y && /* @__PURE__ */ e("div", { className: `p-3 ${R ? "flex justify-center" : ""}`, children: /* @__PURE__ */ e(
|
|
3942
3942
|
"div",
|
|
3943
3943
|
{
|
|
3944
3944
|
className: `
|
|
@@ -3954,7 +3954,7 @@ const Dt = ({
|
|
|
3954
3954
|
`,
|
|
3955
3955
|
style: be,
|
|
3956
3956
|
dir: h && !R ? "rtl" : "ltr",
|
|
3957
|
-
children:
|
|
3957
|
+
children: y
|
|
3958
3958
|
}
|
|
3959
3959
|
) }),
|
|
3960
3960
|
a && /* @__PURE__ */ e(
|
|
@@ -4089,7 +4089,7 @@ const At = ({
|
|
|
4089
4089
|
),
|
|
4090
4090
|
s && /* @__PURE__ */ e("div", { className: "flex items-center gap-3 mt-2", children: s })
|
|
4091
4091
|
] }),
|
|
4092
|
-
/* @__PURE__ */ e("div", { className: "md:col-span-8 grid grid-cols-2 md:grid-cols-3 gap-6", children: m.map((p,
|
|
4092
|
+
/* @__PURE__ */ e("div", { className: "md:col-span-8 grid grid-cols-2 md:grid-cols-3 gap-6", children: m.map((p, $) => {
|
|
4093
4093
|
var N;
|
|
4094
4094
|
return /* @__PURE__ */ r("div", { className: "flex flex-col gap-3", children: [
|
|
4095
4095
|
p.title && /* @__PURE__ */ e(
|
|
@@ -4100,12 +4100,12 @@ const At = ({
|
|
|
4100
4100
|
children: p.title
|
|
4101
4101
|
}
|
|
4102
4102
|
),
|
|
4103
|
-
p.content ? /* @__PURE__ */ e("div", { className: "text-sm text-[var(--color-text-secondary)]", children: p.content }) : /* @__PURE__ */ e("ul", { className: "flex flex-col gap-2", children: (N = p.links) == null ? void 0 : N.map((
|
|
4103
|
+
p.content ? /* @__PURE__ */ e("div", { className: "text-sm text-[var(--color-text-secondary)]", children: p.content }) : /* @__PURE__ */ e("ul", { className: "flex flex-col gap-2", children: (N = p.links) == null ? void 0 : N.map((x, o) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ r(
|
|
4104
4104
|
"a",
|
|
4105
4105
|
{
|
|
4106
|
-
href:
|
|
4107
|
-
target:
|
|
4108
|
-
rel:
|
|
4106
|
+
href: x.href,
|
|
4107
|
+
target: x.external ? "_blank" : void 0,
|
|
4108
|
+
rel: x.external ? "noopener noreferrer" : void 0,
|
|
4109
4109
|
className: `\r
|
|
4110
4110
|
inline-flex items-center gap-2\r
|
|
4111
4111
|
text-sm text-[var(--color-text-secondary)]\r
|
|
@@ -4114,12 +4114,12 @@ const At = ({
|
|
|
4114
4114
|
`,
|
|
4115
4115
|
dir: "auto",
|
|
4116
4116
|
children: [
|
|
4117
|
-
|
|
4118
|
-
|
|
4117
|
+
x.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: x.icon }),
|
|
4118
|
+
x.label
|
|
4119
4119
|
]
|
|
4120
4120
|
}
|
|
4121
4121
|
) }, o)) })
|
|
4122
|
-
] },
|
|
4122
|
+
] }, $);
|
|
4123
4123
|
}) })
|
|
4124
4124
|
] }),
|
|
4125
4125
|
n && /* @__PURE__ */ e("div", { className: "pt-6 border-t border-[var(--color-border-secondary)] flex items-center justify-between flex-wrap gap-4", children: /* @__PURE__ */ e(
|
|
@@ -4148,11 +4148,11 @@ const We = {
|
|
|
4148
4148
|
color: "#5865F2"
|
|
4149
4149
|
},
|
|
4150
4150
|
youtube: {
|
|
4151
|
-
icon: /* @__PURE__ */ e(
|
|
4151
|
+
icon: /* @__PURE__ */ e(ft, { className: "h-4 w-4" }),
|
|
4152
4152
|
color: "#FF0000"
|
|
4153
4153
|
},
|
|
4154
4154
|
instagram: {
|
|
4155
|
-
icon: /* @__PURE__ */ e(
|
|
4155
|
+
icon: /* @__PURE__ */ e(gt, { className: "h-4 w-4" }),
|
|
4156
4156
|
color: "#E4405F"
|
|
4157
4157
|
},
|
|
4158
4158
|
linkedin: {
|
|
@@ -4172,13 +4172,13 @@ const We = {
|
|
|
4172
4172
|
showLabels: n = !1,
|
|
4173
4173
|
className: L = ""
|
|
4174
4174
|
}) => {
|
|
4175
|
-
const [p,
|
|
4176
|
-
const i =
|
|
4175
|
+
const [p, $] = P(!1), [N, x] = P(!1), o = Z(null), M = (w) => {
|
|
4176
|
+
const i = w.toLowerCase();
|
|
4177
4177
|
return i.includes("github.com") ? "github" : i.includes("twitter.com") || i.includes("x.com") ? "twitter" : i.includes("discord.com") || i.includes("discord.gg") ? "discord" : i.includes("youtube.com") || i.includes("youtu.be") ? "youtube" : i.includes("instagram.com") ? "instagram" : i.includes("linkedin.com") ? "linkedin" : i.includes("bsky.app") || i.includes("bluesky") ? "bluesky" : "github";
|
|
4178
|
-
}, c = (
|
|
4179
|
-
const i =
|
|
4178
|
+
}, c = (w) => {
|
|
4179
|
+
const i = w.toLowerCase();
|
|
4180
4180
|
return We[i] || We.github;
|
|
4181
|
-
},
|
|
4181
|
+
}, y = {
|
|
4182
4182
|
sm: {
|
|
4183
4183
|
button: "w-9 h-9 text-sm",
|
|
4184
4184
|
icon: "h-3.5 w-3.5",
|
|
@@ -4204,19 +4204,19 @@ const We = {
|
|
|
4204
4204
|
chevronPx: 48
|
|
4205
4205
|
}
|
|
4206
4206
|
}, g = () => {
|
|
4207
|
-
p ? (
|
|
4208
|
-
|
|
4209
|
-
}, 300)) : (
|
|
4207
|
+
p ? (x(!0), setTimeout(() => {
|
|
4208
|
+
$(!1), x(!1);
|
|
4209
|
+
}, 300)) : ($(!0), x(!1));
|
|
4210
4210
|
};
|
|
4211
4211
|
Y(() => {
|
|
4212
|
-
const
|
|
4212
|
+
const w = (i) => {
|
|
4213
4213
|
o.current && !o.current.contains(i.target) && p && !N && g();
|
|
4214
4214
|
};
|
|
4215
|
-
return p && document.addEventListener("mousedown",
|
|
4216
|
-
document.removeEventListener("mousedown",
|
|
4215
|
+
return p && document.addEventListener("mousedown", w), () => {
|
|
4216
|
+
document.removeEventListener("mousedown", w);
|
|
4217
4217
|
};
|
|
4218
4218
|
}, [p, N]);
|
|
4219
|
-
const
|
|
4219
|
+
const I = () => typeof m == "number" ? `${m}px` : m, k = l === "left", u = y[s] || y.md, v = {
|
|
4220
4220
|
left: {
|
|
4221
4221
|
container: "left-0",
|
|
4222
4222
|
chevron: `left-[${a}px]`,
|
|
@@ -4229,32 +4229,32 @@ const We = {
|
|
|
4229
4229
|
menu: `right-[${a}px]`,
|
|
4230
4230
|
transform: "translateX(0)"
|
|
4231
4231
|
}
|
|
4232
|
-
}[l],
|
|
4233
|
-
const S =
|
|
4234
|
-
if (
|
|
4235
|
-
const h =
|
|
4232
|
+
}[l], T = u.buttonPx, C = 8, A = (w, i) => {
|
|
4233
|
+
const S = M(w.url), D = c(S);
|
|
4234
|
+
if (w.icon && ne.isValidElement(w.icon)) {
|
|
4235
|
+
const h = w.icon;
|
|
4236
4236
|
return ne.cloneElement(h, {
|
|
4237
4237
|
className: `${i} flex-shrink-0`
|
|
4238
4238
|
});
|
|
4239
4239
|
}
|
|
4240
|
-
const
|
|
4241
|
-
if (ne.isValidElement(
|
|
4242
|
-
const h =
|
|
4240
|
+
const f = D.icon;
|
|
4241
|
+
if (ne.isValidElement(f)) {
|
|
4242
|
+
const h = f;
|
|
4243
4243
|
return ne.cloneElement(h, {
|
|
4244
4244
|
className: `${i} flex-shrink-0`
|
|
4245
4245
|
});
|
|
4246
4246
|
}
|
|
4247
|
-
return
|
|
4248
|
-
}, R = (
|
|
4247
|
+
return f;
|
|
4248
|
+
}, R = (w) => w.color ? w.color : c(M(w.url)).color;
|
|
4249
4249
|
return /* @__PURE__ */ e(
|
|
4250
4250
|
"div",
|
|
4251
4251
|
{
|
|
4252
4252
|
ref: o,
|
|
4253
|
-
className: `fixed z-40 ${
|
|
4253
|
+
className: `fixed z-40 ${v.container} ${L}`,
|
|
4254
4254
|
style: {
|
|
4255
|
-
top:
|
|
4255
|
+
top: I(),
|
|
4256
4256
|
transform: "translateY(-50%)",
|
|
4257
|
-
...
|
|
4257
|
+
...k ? { left: `${a + 5}px` } : { right: `${a}px` }
|
|
4258
4258
|
},
|
|
4259
4259
|
children: /* @__PURE__ */ r("div", { className: "relative flex items-center", children: [
|
|
4260
4260
|
/* @__PURE__ */ e(
|
|
@@ -4267,18 +4267,18 @@ const We = {
|
|
|
4267
4267
|
transition-opacity duration-300 ease-[var(--ease-in-out)]
|
|
4268
4268
|
${p ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}
|
|
4269
4269
|
${N ? "opacity-0" : ""}
|
|
4270
|
-
${
|
|
4270
|
+
${k ? "left-0" : "right-0"}
|
|
4271
4271
|
`,
|
|
4272
4272
|
style: {
|
|
4273
|
-
paddingRight:
|
|
4274
|
-
paddingLeft:
|
|
4273
|
+
paddingRight: k ? "0" : `${T + C}px`,
|
|
4274
|
+
paddingLeft: k ? `${T + C}px` : "0"
|
|
4275
4275
|
},
|
|
4276
|
-
children: t.map((
|
|
4277
|
-
const S =
|
|
4276
|
+
children: t.map((w, i) => {
|
|
4277
|
+
const S = w.label || M(w.url).charAt(0).toUpperCase() + M(w.url).slice(1), D = R(w);
|
|
4278
4278
|
return /* @__PURE__ */ r(
|
|
4279
4279
|
"a",
|
|
4280
4280
|
{
|
|
4281
|
-
href:
|
|
4281
|
+
href: w.url,
|
|
4282
4282
|
target: "_blank",
|
|
4283
4283
|
rel: "noopener noreferrer",
|
|
4284
4284
|
"aria-label": `${S} (opens in new tab)`,
|
|
@@ -4304,15 +4304,15 @@ const We = {
|
|
|
4304
4304
|
background: "var(--glass-bg, rgba(255,255,255,0.05))",
|
|
4305
4305
|
backdropFilter: "blur(12px)",
|
|
4306
4306
|
WebkitBackdropFilter: "blur(12px)",
|
|
4307
|
-
border: `1px solid ${
|
|
4307
|
+
border: `1px solid ${D}44`,
|
|
4308
4308
|
borderRadius: "50%",
|
|
4309
4309
|
transition: "border-color 0.25s ease, box-shadow 0.25s ease, scale 0.25s ease"
|
|
4310
4310
|
},
|
|
4311
|
-
onMouseEnter: (
|
|
4312
|
-
|
|
4311
|
+
onMouseEnter: (f) => {
|
|
4312
|
+
f.currentTarget.style.borderColor = D, f.currentTarget.style.boxShadow = `0 0 24px ${D}44`;
|
|
4313
4313
|
},
|
|
4314
|
-
onMouseLeave: (
|
|
4315
|
-
|
|
4314
|
+
onMouseLeave: (f) => {
|
|
4315
|
+
f.currentTarget.style.borderColor = `${D}44`, f.currentTarget.style.boxShadow = "none";
|
|
4316
4316
|
},
|
|
4317
4317
|
children: [
|
|
4318
4318
|
/* @__PURE__ */ e(
|
|
@@ -4320,9 +4320,9 @@ const We = {
|
|
|
4320
4320
|
{
|
|
4321
4321
|
className: `${u.icon} flex-shrink-0 flex items-center justify-center`,
|
|
4322
4322
|
style: {
|
|
4323
|
-
color:
|
|
4323
|
+
color: D
|
|
4324
4324
|
},
|
|
4325
|
-
children: A(
|
|
4325
|
+
children: A(w, u.icon)
|
|
4326
4326
|
}
|
|
4327
4327
|
),
|
|
4328
4328
|
n && /* @__PURE__ */ e("span", { className: "text-xs font-medium truncate max-w-[80px] text-[var(--color-text-primary)]", children: S })
|
|
@@ -4377,7 +4377,7 @@ const We = {
|
|
|
4377
4377
|
{
|
|
4378
4378
|
strokeLinecap: "round",
|
|
4379
4379
|
strokeLinejoin: "round",
|
|
4380
|
-
d:
|
|
4380
|
+
d: k ? "M9 5l7 7-7 7" : "M15 19l-7-7 7-7"
|
|
4381
4381
|
}
|
|
4382
4382
|
)
|
|
4383
4383
|
}
|
|
@@ -4406,7 +4406,7 @@ const Et = ({ type: t }) => {
|
|
|
4406
4406
|
duration: a = 3e3,
|
|
4407
4407
|
onDismiss: m
|
|
4408
4408
|
}) => {
|
|
4409
|
-
const [s, n] = P(!1), [L, p] = P(!1),
|
|
4409
|
+
const [s, n] = P(!1), [L, p] = P(!1), $ = {
|
|
4410
4410
|
success: {
|
|
4411
4411
|
bg: "bg-[var(--color-success-light)]",
|
|
4412
4412
|
border: "border-[var(--color-success)]",
|
|
@@ -4444,7 +4444,7 @@ const Et = ({ type: t }) => {
|
|
|
4444
4444
|
p(!0), n(!1), setTimeout(() => {
|
|
4445
4445
|
m == null || m();
|
|
4446
4446
|
}, 300);
|
|
4447
|
-
}, [m]),
|
|
4447
|
+
}, [m]), x = $[l];
|
|
4448
4448
|
return /* @__PURE__ */ r(
|
|
4449
4449
|
"div",
|
|
4450
4450
|
{
|
|
@@ -4458,15 +4458,15 @@ const Et = ({ type: t }) => {
|
|
|
4458
4458
|
flex items-center gap-3
|
|
4459
4459
|
w-[360px] max-w-[90vw]
|
|
4460
4460
|
transition-all duration-[var(--transition-med)] ease-[var(--ease-in-out)]
|
|
4461
|
-
${
|
|
4462
|
-
${
|
|
4461
|
+
${x.bg}
|
|
4462
|
+
${x.border}
|
|
4463
4463
|
${s ? "translate-x-0 opacity-100" : "translate-x-[calc(100%+24px)] opacity-0"}
|
|
4464
4464
|
${L ? "scale-95 opacity-0" : ""}
|
|
4465
4465
|
`,
|
|
4466
4466
|
role: "alert",
|
|
4467
4467
|
"aria-live": "polite",
|
|
4468
4468
|
children: [
|
|
4469
|
-
/* @__PURE__ */ e("span", { className: `${
|
|
4469
|
+
/* @__PURE__ */ e("span", { className: `${x.text} flex-shrink-0`, children: /* @__PURE__ */ e(Et, { type: l }) }),
|
|
4470
4470
|
/* @__PURE__ */ e("span", { className: "text-[var(--color-text-primary)] flex-1", children: t }),
|
|
4471
4471
|
/* @__PURE__ */ e(
|
|
4472
4472
|
"button",
|
|
@@ -4510,50 +4510,50 @@ Ue.displayName = "ToastContainer";
|
|
|
4510
4510
|
const Je = Ae(void 0), sr = ({
|
|
4511
4511
|
children: t
|
|
4512
4512
|
}) => {
|
|
4513
|
-
const [a, m] = P([]), s = F((
|
|
4514
|
-
m((c) => c.filter((
|
|
4513
|
+
const [a, m] = P([]), s = F((M) => {
|
|
4514
|
+
m((c) => c.filter((y) => y.id !== M));
|
|
4515
4515
|
}, []), n = F(
|
|
4516
|
-
(
|
|
4516
|
+
(M) => {
|
|
4517
4517
|
const c = `toast-${Date.now()}-${Math.random().toString(36).substring(2, 6)}`;
|
|
4518
4518
|
m((g) => {
|
|
4519
|
-
const
|
|
4520
|
-
return
|
|
4519
|
+
const I = [...g, { ...M, id: c }];
|
|
4520
|
+
return I.length > 5 ? I.slice(1) : I;
|
|
4521
4521
|
});
|
|
4522
|
-
const
|
|
4522
|
+
const y = M.duration || 3e3;
|
|
4523
4523
|
setTimeout(() => {
|
|
4524
4524
|
s(c);
|
|
4525
|
-
},
|
|
4525
|
+
}, y + 350);
|
|
4526
4526
|
},
|
|
4527
4527
|
[s]
|
|
4528
4528
|
), L = F(
|
|
4529
|
-
(
|
|
4530
|
-
n({ message:
|
|
4529
|
+
(M, c) => {
|
|
4530
|
+
n({ message: M, type: "success", duration: c });
|
|
4531
4531
|
},
|
|
4532
4532
|
[n]
|
|
4533
4533
|
), p = F(
|
|
4534
|
-
(
|
|
4535
|
-
n({ message:
|
|
4534
|
+
(M, c) => {
|
|
4535
|
+
n({ message: M, type: "error", duration: c });
|
|
4536
4536
|
},
|
|
4537
4537
|
[n]
|
|
4538
|
-
),
|
|
4539
|
-
(
|
|
4540
|
-
n({ message:
|
|
4538
|
+
), $ = F(
|
|
4539
|
+
(M, c) => {
|
|
4540
|
+
n({ message: M, type: "warning", duration: c });
|
|
4541
4541
|
},
|
|
4542
4542
|
[n]
|
|
4543
4543
|
), N = F(
|
|
4544
|
-
(
|
|
4545
|
-
n({ message:
|
|
4544
|
+
(M, c) => {
|
|
4545
|
+
n({ message: M, type: "info", duration: c });
|
|
4546
4546
|
},
|
|
4547
4547
|
[n]
|
|
4548
|
-
),
|
|
4548
|
+
), x = F(() => {
|
|
4549
4549
|
m([]);
|
|
4550
4550
|
}, []), o = {
|
|
4551
4551
|
showToast: n,
|
|
4552
4552
|
success: L,
|
|
4553
4553
|
error: p,
|
|
4554
|
-
warning:
|
|
4554
|
+
warning: $,
|
|
4555
4555
|
info: N,
|
|
4556
|
-
clearAll:
|
|
4556
|
+
clearAll: x
|
|
4557
4557
|
};
|
|
4558
4558
|
return /* @__PURE__ */ r(Je.Provider, { value: o, children: [
|
|
4559
4559
|
t,
|
|
@@ -4574,72 +4574,74 @@ const Je = Ae(void 0), sr = ({
|
|
|
4574
4574
|
shape: n = "circle",
|
|
4575
4575
|
bordered: L = !1,
|
|
4576
4576
|
glow: p,
|
|
4577
|
-
status:
|
|
4577
|
+
status: $,
|
|
4578
4578
|
group: N = !1,
|
|
4579
|
-
onClick:
|
|
4579
|
+
onClick: x,
|
|
4580
4580
|
className: o = "",
|
|
4581
|
-
children:
|
|
4581
|
+
children: M,
|
|
4582
4582
|
...c
|
|
4583
|
-
},
|
|
4584
|
-
const [g,
|
|
4583
|
+
}, y) => {
|
|
4584
|
+
const [g, I] = P(!1), k = {
|
|
4585
4585
|
xs: "w-6 h-6 text-[10px]",
|
|
4586
4586
|
sm: "w-8 h-8 text-xs",
|
|
4587
4587
|
md: "w-10 h-10 text-sm",
|
|
4588
4588
|
lg: "w-12 h-12 text-base",
|
|
4589
|
-
xl: "w-16 h-16 text-lg"
|
|
4589
|
+
xl: "w-16 h-16 text-lg",
|
|
4590
|
+
hero: "w-40 h-40 text-4xl"
|
|
4590
4591
|
}, u = {
|
|
4591
4592
|
circle: "rounded-full",
|
|
4592
4593
|
rounded: "rounded-[var(--radius-md)]",
|
|
4593
4594
|
square: "rounded-none"
|
|
4594
|
-
},
|
|
4595
|
+
}, b = {
|
|
4595
4596
|
primary: "shadow-[var(--shadow-glow-primary)]",
|
|
4596
4597
|
secondary: "shadow-[var(--shadow-glow-secondary)]",
|
|
4597
4598
|
accent: "shadow-[var(--shadow-glow-accent)]"
|
|
4598
|
-
},
|
|
4599
|
+
}, v = {
|
|
4599
4600
|
online: "bg-[var(--color-success)]",
|
|
4600
4601
|
offline: "bg-[var(--color-text-tertiary)]",
|
|
4601
4602
|
away: "bg-[var(--color-warning)]",
|
|
4602
4603
|
busy: "bg-[var(--color-danger)]"
|
|
4603
|
-
},
|
|
4604
|
+
}, T = {
|
|
4604
4605
|
xs: "w-1.5 h-1.5",
|
|
4605
4606
|
sm: "w-2 h-2",
|
|
4606
4607
|
md: "w-2.5 h-2.5",
|
|
4607
4608
|
lg: "w-3 h-3",
|
|
4608
|
-
xl: "w-3.5 h-3.5"
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4609
|
+
xl: "w-3.5 h-3.5",
|
|
4610
|
+
hero: "w-6 h-6"
|
|
4611
|
+
}, C = a === "hero" ? "ring-4" : "ring-2", A = L ? "border-2 border-[var(--color-border-secondary)]" : "", R = p ? b[p] : "", w = () => {
|
|
4612
|
+
x && x();
|
|
4613
|
+
}, i = () => {
|
|
4612
4614
|
if (!s) return "";
|
|
4613
|
-
const
|
|
4614
|
-
return
|
|
4615
|
-
},
|
|
4615
|
+
const f = s.trim().split(" ");
|
|
4616
|
+
return f.length === 1 ? f[0].charAt(0).toUpperCase() : (f[0].charAt(0) + f[f.length - 1].charAt(0)).toUpperCase();
|
|
4617
|
+
}, S = t && !m && !g, D = () => S ? /* @__PURE__ */ e(
|
|
4616
4618
|
"img",
|
|
4617
4619
|
{
|
|
4618
4620
|
src: t,
|
|
4619
4621
|
alt: l,
|
|
4620
4622
|
className: "w-full h-full object-cover",
|
|
4621
|
-
onError: () =>
|
|
4623
|
+
onError: () => I(!0)
|
|
4622
4624
|
}
|
|
4623
|
-
) : s ? /* @__PURE__ */ e("span", { className: "font-heading font-semibold text-inherit", children:
|
|
4624
|
-
return N ? /* @__PURE__ */ e("div", { ref:
|
|
4625
|
-
|
|
4625
|
+
) : s ? /* @__PURE__ */ e("span", { className: "font-heading font-semibold text-inherit", children: i() }) : /* @__PURE__ */ e(Fe, {});
|
|
4626
|
+
return N ? /* @__PURE__ */ e("div", { ref: y, className: `flex -space-x-2 ${o}`, ...c, children: ne.Children.map(M, (f) => ne.isValidElement(f) ? ne.cloneElement(
|
|
4627
|
+
f,
|
|
4626
4628
|
{
|
|
4627
4629
|
size: a,
|
|
4628
4630
|
shape: n,
|
|
4629
4631
|
bordered: !0,
|
|
4630
|
-
className: `${u[n]} ring-2 ring-[var(--color-bg-primary)] ${
|
|
4632
|
+
className: `${u[n]} ring-2 ring-[var(--color-bg-primary)] ${f.props.className || ""}`
|
|
4631
4633
|
}
|
|
4632
|
-
) :
|
|
4634
|
+
) : f) }) : /* @__PURE__ */ r(
|
|
4633
4635
|
"div",
|
|
4634
4636
|
{
|
|
4635
|
-
ref:
|
|
4637
|
+
ref: y,
|
|
4636
4638
|
className: `
|
|
4637
4639
|
relative inline-flex items-center justify-center
|
|
4638
4640
|
flex-shrink-0
|
|
4639
|
-
${
|
|
4641
|
+
${x ? "cursor-pointer hover:opacity-80" : ""}
|
|
4640
4642
|
${o}
|
|
4641
4643
|
`,
|
|
4642
|
-
onClick:
|
|
4644
|
+
onClick: w,
|
|
4643
4645
|
...c,
|
|
4644
4646
|
children: [
|
|
4645
4647
|
/* @__PURE__ */ e(
|
|
@@ -4650,24 +4652,24 @@ const Je = Ae(void 0), sr = ({
|
|
|
4650
4652
|
bg-[var(--color-bg-tertiary)]
|
|
4651
4653
|
text-[var(--color-text-secondary)]
|
|
4652
4654
|
transition-all duration-[var(--transition-fast)]
|
|
4653
|
-
${
|
|
4655
|
+
${k[a]}
|
|
4654
4656
|
${u[n]}
|
|
4655
|
-
${C}
|
|
4656
4657
|
${A}
|
|
4658
|
+
${R}
|
|
4657
4659
|
overflow-hidden
|
|
4658
4660
|
`,
|
|
4659
|
-
children:
|
|
4661
|
+
children: D()
|
|
4660
4662
|
}
|
|
4661
4663
|
),
|
|
4662
|
-
|
|
4664
|
+
$ && /* @__PURE__ */ e(
|
|
4663
4665
|
"span",
|
|
4664
4666
|
{
|
|
4665
4667
|
className: `
|
|
4666
4668
|
absolute bottom-0 right-0
|
|
4667
4669
|
rounded-full
|
|
4668
|
-
|
|
4669
|
-
${
|
|
4670
|
-
${
|
|
4670
|
+
${C} ring-[var(--color-bg-primary)]
|
|
4671
|
+
${v[$]}
|
|
4672
|
+
${T[a]}
|
|
4671
4673
|
`
|
|
4672
4674
|
}
|
|
4673
4675
|
)
|
|
@@ -4686,14 +4688,14 @@ const Pt = ({
|
|
|
4686
4688
|
maxWidth: n = "240px",
|
|
4687
4689
|
arrow: L = !0,
|
|
4688
4690
|
variant: p = "glass",
|
|
4689
|
-
size:
|
|
4691
|
+
size: $ = "md",
|
|
4690
4692
|
disabled: N = !1,
|
|
4691
|
-
open:
|
|
4693
|
+
open: x,
|
|
4692
4694
|
onOpen: o,
|
|
4693
|
-
onClose:
|
|
4695
|
+
onClose: M,
|
|
4694
4696
|
className: c = ""
|
|
4695
4697
|
}) => {
|
|
4696
|
-
const [
|
|
4698
|
+
const [y, g] = P(!1), [I, k] = P(!1), [u, b] = P(!1), [v, T] = P({ top: -9999, left: -9999 }), [C, A] = P(!1), R = ne.useId(), w = Z(null), i = Z(null), S = Z(null), D = Z(null), f = x !== void 0, h = f ? x : y;
|
|
4697
4699
|
Y(() => {
|
|
4698
4700
|
const ee = () => {
|
|
4699
4701
|
A(document.documentElement.dir === "rtl");
|
|
@@ -4710,7 +4712,7 @@ const Pt = ({
|
|
|
4710
4712
|
md: "px-3.5 py-2 text-sm",
|
|
4711
4713
|
lg: "px-[18px] py-2.5 text-base"
|
|
4712
4714
|
}, j = p === "solid" ? "glass-solid" : p === "outline" ? "glass-outline" : "glass", q = 150, V = F(() => {
|
|
4713
|
-
const ee =
|
|
4715
|
+
const ee = w.current, _ = i.current;
|
|
4714
4716
|
if (!ee || !_) return !1;
|
|
4715
4717
|
const W = ee.getBoundingClientRect(), O = _.offsetWidth, Q = _.offsetHeight;
|
|
4716
4718
|
if (O === 0 || Q === 0) return !1;
|
|
@@ -4756,29 +4758,29 @@ const Pt = ({
|
|
|
4756
4758
|
ae = W.top - Q - re, oe = ce - O / 2;
|
|
4757
4759
|
}
|
|
4758
4760
|
const se = window.innerWidth, de = window.innerHeight;
|
|
4759
|
-
return oe < 8 && (oe = 8), oe + O > se - 8 && (oe = se - O - 8), ae < 8 && (ae = 8), ae + Q > de - 8 && (ae = de - Q - 8),
|
|
4761
|
+
return oe < 8 && (oe = 8), oe + O > se - 8 && (oe = se - O - 8), ae < 8 && (ae = 8), ae + Q > de - 8 && (ae = de - Q - 8), T({ top: ae, left: oe }), !0;
|
|
4760
4762
|
}, [a, C]);
|
|
4761
4763
|
at(() => {
|
|
4762
4764
|
if (!h) {
|
|
4763
|
-
|
|
4765
|
+
b(!1);
|
|
4764
4766
|
const O = setTimeout(() => {
|
|
4765
|
-
|
|
4767
|
+
k(!1), T({ top: -9999, left: -9999 });
|
|
4766
4768
|
}, q);
|
|
4767
4769
|
return () => clearTimeout(O);
|
|
4768
4770
|
}
|
|
4769
|
-
|
|
4771
|
+
k(!0), b(!1);
|
|
4770
4772
|
let ee = 0, _ = 0;
|
|
4771
4773
|
const W = () => {
|
|
4772
4774
|
if (ee += 1, V()) {
|
|
4773
|
-
|
|
4775
|
+
b(!0);
|
|
4774
4776
|
return;
|
|
4775
4777
|
}
|
|
4776
|
-
ee < 8 ? _ = requestAnimationFrame(W) :
|
|
4778
|
+
ee < 8 ? _ = requestAnimationFrame(W) : b(!0);
|
|
4777
4779
|
};
|
|
4778
4780
|
return _ = requestAnimationFrame(W), () => cancelAnimationFrame(_);
|
|
4779
4781
|
}, [h, V]), Y(() => {
|
|
4780
|
-
h &&
|
|
4781
|
-
}, [C, h,
|
|
4782
|
+
h && I && V();
|
|
4783
|
+
}, [C, h, I, V]), Y(() => {
|
|
4782
4784
|
if (!h) return;
|
|
4783
4785
|
const ee = () => V();
|
|
4784
4786
|
return window.addEventListener("resize", ee), window.addEventListener("scroll", ee, !0), () => {
|
|
@@ -4786,16 +4788,16 @@ const Pt = ({
|
|
|
4786
4788
|
};
|
|
4787
4789
|
}, [h, V]);
|
|
4788
4790
|
const G = F(() => {
|
|
4789
|
-
N || (S.current && (clearTimeout(S.current), S.current = null),
|
|
4790
|
-
|
|
4791
|
+
N || (S.current && (clearTimeout(S.current), S.current = null), D.current && (clearTimeout(D.current), D.current = null), S.current = setTimeout(() => {
|
|
4792
|
+
f || g(!0), o == null || o();
|
|
4791
4793
|
}, m));
|
|
4792
|
-
}, [N, m,
|
|
4793
|
-
S.current && (clearTimeout(S.current), S.current = null),
|
|
4794
|
-
|
|
4794
|
+
}, [N, m, f, o]), X = F(() => {
|
|
4795
|
+
S.current && (clearTimeout(S.current), S.current = null), D.current = setTimeout(() => {
|
|
4796
|
+
f || g(!1), M == null || M();
|
|
4795
4797
|
}, s);
|
|
4796
|
-
}, [s,
|
|
4798
|
+
}, [s, f, M]);
|
|
4797
4799
|
Y(() => () => {
|
|
4798
|
-
S.current && clearTimeout(S.current),
|
|
4800
|
+
S.current && clearTimeout(S.current), D.current && clearTimeout(D.current);
|
|
4799
4801
|
}, []);
|
|
4800
4802
|
const B = {
|
|
4801
4803
|
top: "bottom-[-5px] left-1/2 -translate-x-1/2",
|
|
@@ -4821,7 +4823,7 @@ const Pt = ({
|
|
|
4821
4823
|
/* @__PURE__ */ e(
|
|
4822
4824
|
"div",
|
|
4823
4825
|
{
|
|
4824
|
-
ref:
|
|
4826
|
+
ref: w,
|
|
4825
4827
|
className: "inline-flex",
|
|
4826
4828
|
onMouseEnter: G,
|
|
4827
4829
|
onMouseLeave: X,
|
|
@@ -4831,7 +4833,7 @@ const Pt = ({
|
|
|
4831
4833
|
children: l
|
|
4832
4834
|
}
|
|
4833
4835
|
),
|
|
4834
|
-
|
|
4836
|
+
I && je(
|
|
4835
4837
|
/* @__PURE__ */ r(
|
|
4836
4838
|
"div",
|
|
4837
4839
|
{
|
|
@@ -4843,14 +4845,14 @@ const Pt = ({
|
|
|
4843
4845
|
pointer-events-none
|
|
4844
4846
|
${u ? "opacity-100" : "opacity-0"}
|
|
4845
4847
|
${j}
|
|
4846
|
-
${d[
|
|
4848
|
+
${d[$]}
|
|
4847
4849
|
${c}
|
|
4848
4850
|
${C ? "text-right" : "text-left"}
|
|
4849
4851
|
`,
|
|
4850
4852
|
style: {
|
|
4851
4853
|
position: "fixed",
|
|
4852
|
-
top:
|
|
4853
|
-
left:
|
|
4854
|
+
top: v.top,
|
|
4855
|
+
left: v.left,
|
|
4854
4856
|
maxWidth: n,
|
|
4855
4857
|
direction: C ? "rtl" : "ltr"
|
|
4856
4858
|
},
|
|
@@ -4888,24 +4890,24 @@ const Ee = ne.forwardRef(
|
|
|
4888
4890
|
showLabel: n = !1,
|
|
4889
4891
|
labelFormat: L,
|
|
4890
4892
|
label: p,
|
|
4891
|
-
labelPosition:
|
|
4893
|
+
labelPosition: $ = "inside",
|
|
4892
4894
|
animated: N = !0,
|
|
4893
|
-
thickness:
|
|
4895
|
+
thickness: x = 8,
|
|
4894
4896
|
radialSize: o = 80,
|
|
4895
|
-
displayType:
|
|
4897
|
+
displayType: M = "percentage",
|
|
4896
4898
|
glow: c = !1,
|
|
4897
|
-
className:
|
|
4899
|
+
className: y = "",
|
|
4898
4900
|
...g
|
|
4899
|
-
},
|
|
4900
|
-
const
|
|
4901
|
+
}, I) => {
|
|
4902
|
+
const k = Math.max(0, Math.min(t, l)), u = k / l * 100, b = {
|
|
4901
4903
|
sm: "h-1.5",
|
|
4902
4904
|
md: "h-2.5",
|
|
4903
4905
|
lg: "h-4"
|
|
4904
|
-
},
|
|
4906
|
+
}, v = {
|
|
4905
4907
|
sm: 64,
|
|
4906
4908
|
md: 80,
|
|
4907
4909
|
lg: 100
|
|
4908
|
-
},
|
|
4910
|
+
}, T = {
|
|
4909
4911
|
primary: "bg-[var(--color-primary)]",
|
|
4910
4912
|
secondary: "bg-[var(--color-secondary)]",
|
|
4911
4913
|
accent: "bg-[var(--color-accent)]",
|
|
@@ -4923,19 +4925,19 @@ const Ee = ne.forwardRef(
|
|
|
4923
4925
|
gradient: "color-mix(in srgb, var(--color-primary) 35%, transparent)"
|
|
4924
4926
|
}, R = (() => {
|
|
4925
4927
|
if (p) return p;
|
|
4926
|
-
if (L) return L(
|
|
4927
|
-
switch (
|
|
4928
|
+
if (L) return L(k, l);
|
|
4929
|
+
switch (M) {
|
|
4928
4930
|
case "ratio":
|
|
4929
|
-
return `${Math.round(
|
|
4931
|
+
return `${Math.round(k)} / ${l}`;
|
|
4930
4932
|
case "custom":
|
|
4931
|
-
return p || `${Math.round(
|
|
4933
|
+
return p || `${Math.round(k)}`;
|
|
4932
4934
|
case "percentage":
|
|
4933
4935
|
default:
|
|
4934
4936
|
return `${Math.round(u)}%`;
|
|
4935
4937
|
}
|
|
4936
4938
|
})();
|
|
4937
4939
|
if (a === "horizontal") {
|
|
4938
|
-
const q = N ? "transition-all duration-[var(--transition-base)] ease-[var(--ease-in-out)]" : "", V =
|
|
4940
|
+
const q = N ? "transition-all duration-[var(--transition-base)] ease-[var(--ease-in-out)]" : "", V = x || 8, G = {
|
|
4939
4941
|
left: "flex-row items-center gap-3",
|
|
4940
4942
|
right: "flex-row items-center gap-3",
|
|
4941
4943
|
top: "flex-col items-start gap-1.5",
|
|
@@ -4947,11 +4949,11 @@ const Ee = ne.forwardRef(
|
|
|
4947
4949
|
top: "order-first",
|
|
4948
4950
|
bottom: "order-last",
|
|
4949
4951
|
inside: "order-last"
|
|
4950
|
-
}, B = G[
|
|
4952
|
+
}, B = G[$] || G.right, J = X[$] || X.right, ee = $ === "left" || $ === "top", _ = $ === "inside", W = b[m] || b.md, O = C[s] || C.primary;
|
|
4951
4953
|
return /* @__PURE__ */ r(
|
|
4952
4954
|
"div",
|
|
4953
4955
|
{
|
|
4954
|
-
className: `w-full ${B} ${
|
|
4956
|
+
className: `w-full ${B} ${y}`,
|
|
4955
4957
|
style: { minWidth: "100px" },
|
|
4956
4958
|
...g,
|
|
4957
4959
|
children: [
|
|
@@ -4997,13 +4999,13 @@ const Ee = ne.forwardRef(
|
|
|
4997
4999
|
},
|
|
4998
5000
|
role: "progressbar",
|
|
4999
5001
|
"aria-label": `${p || "Progress"}: ${Math.round(u)}%`,
|
|
5000
|
-
"aria-valuenow":
|
|
5002
|
+
"aria-valuenow": k,
|
|
5001
5003
|
"aria-valuemin": 0,
|
|
5002
5004
|
"aria-valuemax": l,
|
|
5003
5005
|
children: /* @__PURE__ */ e(
|
|
5004
5006
|
"div",
|
|
5005
5007
|
{
|
|
5006
|
-
className: `h-full rounded-full ${
|
|
5008
|
+
className: `h-full rounded-full ${T[s]} ${q} relative flex items-center justify-end`,
|
|
5007
5009
|
style: {
|
|
5008
5010
|
width: `${u}%`,
|
|
5009
5011
|
transition: N ? "width 0.4s ease" : "none"
|
|
@@ -5065,21 +5067,21 @@ const Ee = ne.forwardRef(
|
|
|
5065
5067
|
}
|
|
5066
5068
|
);
|
|
5067
5069
|
}
|
|
5068
|
-
const
|
|
5070
|
+
const w = o || v[m] || 80, i = w / 2, S = (w - x) / 2, D = 2 * Math.PI * S, f = D - u / 100 * D, h = n ? R : "", d = () => s === "gradient" ? "url(#radialGradient)" : `var(--color-${s})`, j = () => s === "gradient" ? "url(#glowGradient)" : `var(--color-${s})`;
|
|
5069
5071
|
return /* @__PURE__ */ e(
|
|
5070
5072
|
"div",
|
|
5071
5073
|
{
|
|
5072
|
-
ref:
|
|
5073
|
-
className: `relative inline-flex flex-col items-center justify-center ${
|
|
5074
|
+
ref: I,
|
|
5075
|
+
className: `relative inline-flex flex-col items-center justify-center ${y}`,
|
|
5074
5076
|
...g,
|
|
5075
5077
|
children: /* @__PURE__ */ r(
|
|
5076
5078
|
"div",
|
|
5077
5079
|
{
|
|
5078
5080
|
className: "relative",
|
|
5079
|
-
style: { width:
|
|
5081
|
+
style: { width: w, height: w },
|
|
5080
5082
|
role: "progressbar",
|
|
5081
5083
|
"aria-label": `${p || "Progress"}: ${Math.round(u)}%`,
|
|
5082
|
-
"aria-valuenow":
|
|
5084
|
+
"aria-valuenow": k,
|
|
5083
5085
|
"aria-valuemin": 0,
|
|
5084
5086
|
"aria-valuemax": l,
|
|
5085
5087
|
children: [
|
|
@@ -5087,7 +5089,7 @@ const Ee = ne.forwardRef(
|
|
|
5087
5089
|
"svg",
|
|
5088
5090
|
{
|
|
5089
5091
|
className: "relative w-full h-full",
|
|
5090
|
-
viewBox: `0 0 ${
|
|
5092
|
+
viewBox: `0 0 ${w} ${w}`,
|
|
5091
5093
|
"aria-hidden": "true",
|
|
5092
5094
|
children: [
|
|
5093
5095
|
/* @__PURE__ */ r("defs", { children: [
|
|
@@ -5125,12 +5127,12 @@ const Ee = ne.forwardRef(
|
|
|
5125
5127
|
{
|
|
5126
5128
|
cx: i,
|
|
5127
5129
|
cy: i,
|
|
5128
|
-
r: S +
|
|
5130
|
+
r: S + x / 2,
|
|
5129
5131
|
fill: "none",
|
|
5130
5132
|
stroke: j(),
|
|
5131
|
-
strokeWidth:
|
|
5132
|
-
strokeDasharray:
|
|
5133
|
-
strokeDashoffset:
|
|
5133
|
+
strokeWidth: x + 6,
|
|
5134
|
+
strokeDasharray: D,
|
|
5135
|
+
strokeDashoffset: f,
|
|
5134
5136
|
strokeLinecap: "round",
|
|
5135
5137
|
transform: `rotate(-90 ${i} ${i})`,
|
|
5136
5138
|
style: {
|
|
@@ -5148,7 +5150,7 @@ const Ee = ne.forwardRef(
|
|
|
5148
5150
|
r: S,
|
|
5149
5151
|
fill: "none",
|
|
5150
5152
|
stroke: "var(--color-bg-tertiary)",
|
|
5151
|
-
strokeWidth:
|
|
5153
|
+
strokeWidth: x
|
|
5152
5154
|
}
|
|
5153
5155
|
),
|
|
5154
5156
|
/* @__PURE__ */ e(
|
|
@@ -5159,9 +5161,9 @@ const Ee = ne.forwardRef(
|
|
|
5159
5161
|
r: S,
|
|
5160
5162
|
fill: "none",
|
|
5161
5163
|
stroke: d(),
|
|
5162
|
-
strokeWidth:
|
|
5163
|
-
strokeDasharray:
|
|
5164
|
-
strokeDashoffset:
|
|
5164
|
+
strokeWidth: x,
|
|
5165
|
+
strokeDasharray: D,
|
|
5166
|
+
strokeDashoffset: f,
|
|
5165
5167
|
strokeLinecap: "round",
|
|
5166
5168
|
transform: `rotate(-90 ${i} ${i})`,
|
|
5167
5169
|
style: {
|
|
@@ -5177,7 +5179,7 @@ const Ee = ne.forwardRef(
|
|
|
5177
5179
|
{
|
|
5178
5180
|
className: "font-heading font-bold leading-none",
|
|
5179
5181
|
style: {
|
|
5180
|
-
fontSize:
|
|
5182
|
+
fontSize: w < 60 ? "0.65rem" : w < 80 ? "0.75rem" : "0.9rem",
|
|
5181
5183
|
color: "var(--color-text-primary)",
|
|
5182
5184
|
textShadow: "0 0 30px var(--color-bg-primary), 0 0 60px var(--color-bg-primary)"
|
|
5183
5185
|
},
|
|
@@ -5201,22 +5203,22 @@ const zt = ({
|
|
|
5201
5203
|
rating: n = 0,
|
|
5202
5204
|
reviewCount: L = 0,
|
|
5203
5205
|
category: p,
|
|
5204
|
-
tags:
|
|
5206
|
+
tags: $ = [],
|
|
5205
5207
|
onSale: N = !1,
|
|
5206
|
-
originalPrice:
|
|
5208
|
+
originalPrice: x,
|
|
5207
5209
|
inStock: o = !0,
|
|
5208
|
-
badge:
|
|
5210
|
+
badge: M,
|
|
5209
5211
|
badgeVariant: c = "primary",
|
|
5210
|
-
link:
|
|
5212
|
+
link: y,
|
|
5211
5213
|
onAddToCart: g,
|
|
5212
|
-
onClick:
|
|
5213
|
-
layout:
|
|
5214
|
+
onClick: I,
|
|
5215
|
+
layout: k = "vertical",
|
|
5214
5216
|
glow: u = "none",
|
|
5215
|
-
showQuickActions:
|
|
5216
|
-
className:
|
|
5217
|
-
fullWidthMobile:
|
|
5217
|
+
showQuickActions: b = !0,
|
|
5218
|
+
className: v = "",
|
|
5219
|
+
fullWidthMobile: T = !1
|
|
5218
5220
|
}) => {
|
|
5219
|
-
const { t: C } = ke(), [A, R] = P({ x: 0, y: 0 }), [
|
|
5221
|
+
const { t: C } = ke(), [A, R] = P({ x: 0, y: 0 }), [w, i] = P(!1), [S, D] = P(!1), f = Z(null), h = k === "horizontal", d = k === "compact", j = k === "vertical", [q, V] = P(!1);
|
|
5220
5222
|
ne.useEffect(() => {
|
|
5221
5223
|
const te = () => {
|
|
5222
5224
|
V(document.documentElement.dir === "rtl");
|
|
@@ -5229,8 +5231,8 @@ const zt = ({
|
|
|
5229
5231
|
}), () => se.disconnect();
|
|
5230
5232
|
}, []);
|
|
5231
5233
|
const G = (te) => {
|
|
5232
|
-
if (!
|
|
5233
|
-
const se =
|
|
5234
|
+
if (!f.current || d) return;
|
|
5235
|
+
const se = f.current.getBoundingClientRect(), de = te.clientX - se.left, he = te.clientY - se.top;
|
|
5234
5236
|
R({
|
|
5235
5237
|
x: (he - se.height / 2) / (se.height / 2) * -6,
|
|
5236
5238
|
y: (de - se.width / 2) / (se.width / 2) * 6
|
|
@@ -5255,7 +5257,7 @@ const zt = ({
|
|
|
5255
5257
|
children: se < Math.round(n) ? "★" : "☆"
|
|
5256
5258
|
},
|
|
5257
5259
|
se
|
|
5258
|
-
)), re = () => /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]", children: /* @__PURE__ */ e(ct, {}) }), ae = d ? "w-14 h-14 flex-shrink-0" : h ? "w-28 h-28 sm:w-36 sm:h-36 flex-shrink-0" : "w-full aspect-square", oe = d ?
|
|
5260
|
+
)), re = () => /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]", children: /* @__PURE__ */ e(ct, {}) }), ae = d ? "w-14 h-14 flex-shrink-0" : h ? "w-28 h-28 sm:w-36 sm:h-36 flex-shrink-0" : "w-full aspect-square", oe = d ? w ? "translateY(-4px) scale(1.03)" : "translateY(0) scale(1)" : w ? `perspective(900px) rotateX(${A.x}deg) rotateY(${A.y}deg) translateY(-6px) scale(1.02)` : "perspective(900px) rotateX(0) rotateY(0) translateY(0) scale(1)", ce = !b && I, z = !!y, ie = N && d && /* @__PURE__ */ e(
|
|
5259
5261
|
"div",
|
|
5260
5262
|
{
|
|
5261
5263
|
className: `
|
|
@@ -5282,36 +5284,36 @@ const zt = ({
|
|
|
5282
5284
|
return /* @__PURE__ */ r(
|
|
5283
5285
|
"div",
|
|
5284
5286
|
{
|
|
5285
|
-
ref:
|
|
5287
|
+
ref: f,
|
|
5286
5288
|
className: `
|
|
5287
5289
|
glass relative overflow-hidden
|
|
5288
5290
|
${d ? "p-3" : "p-4"}
|
|
5289
5291
|
${J[u]}
|
|
5290
|
-
${
|
|
5292
|
+
${T ? "w-full sm:w-auto" : ""}
|
|
5291
5293
|
${j ? "flex flex-col h-full" : ""}
|
|
5292
5294
|
${h ? "flex flex-row gap-4 items-stretch" : ""}
|
|
5293
5295
|
${d ? "flex flex-row items-center gap-3" : ""}
|
|
5294
|
-
${
|
|
5296
|
+
${v}
|
|
5295
5297
|
${ce ? "cursor-pointer" : ""}
|
|
5296
5298
|
`,
|
|
5297
5299
|
style: {
|
|
5298
5300
|
transform: oe,
|
|
5299
5301
|
transformStyle: "preserve-3d",
|
|
5300
|
-
boxShadow:
|
|
5302
|
+
boxShadow: w ? W : _,
|
|
5301
5303
|
transition: "transform 0.22s ease-out, box-shadow 0.3s ease, border-color 0.25s ease",
|
|
5302
|
-
borderColor:
|
|
5304
|
+
borderColor: w ? "color-mix(in srgb, var(--color-primary) 35%, var(--color-border-primary))" : void 0,
|
|
5303
5305
|
overflow: "hidden",
|
|
5304
5306
|
borderRadius: "var(--radius-standard)"
|
|
5305
5307
|
},
|
|
5306
5308
|
onMouseMove: G,
|
|
5307
5309
|
onMouseEnter: X,
|
|
5308
5310
|
onMouseLeave: B,
|
|
5309
|
-
onClick:
|
|
5311
|
+
onClick: I,
|
|
5310
5312
|
role: ce ? "button" : void 0,
|
|
5311
5313
|
tabIndex: ce ? 0 : void 0,
|
|
5312
5314
|
"aria-label": ce ? `Product: ${t}` : void 0,
|
|
5313
5315
|
onKeyDown: ce ? (te) => {
|
|
5314
|
-
(te.key === "Enter" || te.key === " ") && (
|
|
5316
|
+
(te.key === "Enter" || te.key === " ") && (I == null || I());
|
|
5315
5317
|
} : void 0,
|
|
5316
5318
|
children: [
|
|
5317
5319
|
/* @__PURE__ */ e(
|
|
@@ -5319,7 +5321,7 @@ const zt = ({
|
|
|
5319
5321
|
{
|
|
5320
5322
|
className: "pointer-events-none absolute inset-0 rounded-[inherit] transition-opacity duration-300",
|
|
5321
5323
|
style: {
|
|
5322
|
-
opacity:
|
|
5324
|
+
opacity: w ? 1 : 0,
|
|
5323
5325
|
background: "radial-gradient(ellipse at 30% 0%, color-mix(in srgb, var(--color-primary) 14%, transparent), transparent 55%)"
|
|
5324
5326
|
}
|
|
5325
5327
|
}
|
|
@@ -5334,7 +5336,7 @@ const zt = ({
|
|
|
5334
5336
|
rounded-[var(--radius-md)] overflow-hidden
|
|
5335
5337
|
bg-[var(--color-bg-tertiary)] relative
|
|
5336
5338
|
transition-transform duration-300
|
|
5337
|
-
${
|
|
5339
|
+
${w && d ? "scale-105" : ""}
|
|
5338
5340
|
`,
|
|
5339
5341
|
children: [
|
|
5340
5342
|
m && !S ? /* @__PURE__ */ e(
|
|
@@ -5344,16 +5346,16 @@ const zt = ({
|
|
|
5344
5346
|
alt: t,
|
|
5345
5347
|
className: `
|
|
5346
5348
|
w-full h-full object-cover transition-transform duration-500
|
|
5347
|
-
${
|
|
5349
|
+
${w && !d ? "scale-105" : "scale-100"}
|
|
5348
5350
|
`,
|
|
5349
|
-
onError: () =>
|
|
5351
|
+
onError: () => D(!0),
|
|
5350
5352
|
loading: "lazy"
|
|
5351
5353
|
}
|
|
5352
5354
|
) : /* @__PURE__ */ e(re, {}),
|
|
5353
5355
|
/* @__PURE__ */ r("div", { className: "absolute top-2 start-2 z-10 flex flex-col gap-1 items-start", children: [
|
|
5354
|
-
|
|
5355
|
-
N && !d && !
|
|
5356
|
-
N && !d &&
|
|
5356
|
+
M && !d && /* @__PURE__ */ e(ye, { variant: c, size: "sm", glow: !0, children: M }),
|
|
5357
|
+
N && !d && !M && /* @__PURE__ */ e(ye, { variant: "danger", size: "sm", glow: !0, children: "Sale" }),
|
|
5358
|
+
N && !d && M && /* @__PURE__ */ e(ye, { variant: "danger", size: "sm", glow: !0, children: M })
|
|
5357
5359
|
] }),
|
|
5358
5360
|
!o && !d && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-black/55 flex items-center justify-center z-10", children: /* @__PURE__ */ e("span", { className: "font-heading font-bold text-white text-xs uppercase tracking-wider", children: C("productLabels.outOfStock") }) })
|
|
5359
5361
|
]
|
|
@@ -5375,19 +5377,19 @@ const zt = ({
|
|
|
5375
5377
|
font-heading font-bold text-[var(--color-text-primary)]
|
|
5376
5378
|
${d ? "text-sm" : "text-base"}
|
|
5377
5379
|
line-clamp-2 leading-snug
|
|
5378
|
-
${z ||
|
|
5380
|
+
${z || w ? "hover:text-[var(--color-primary)]" : ""}
|
|
5379
5381
|
transition-colors duration-180
|
|
5380
|
-
${
|
|
5382
|
+
${w ? "text-[var(--color-primary)]" : ""}
|
|
5381
5383
|
`,
|
|
5382
5384
|
onClick: (te) => {
|
|
5383
|
-
|
|
5385
|
+
y && (te.stopPropagation(), window.open(y, "_blank"));
|
|
5384
5386
|
},
|
|
5385
5387
|
children: t
|
|
5386
5388
|
}
|
|
5387
5389
|
),
|
|
5388
5390
|
s && !d && /* @__PURE__ */ e("p", { className: "text-[var(--color-text-secondary)] text-sm mt-1.5 line-clamp-2", children: s }),
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
+
$.length > 0 && !d && /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 mt-2", children: [
|
|
5392
|
+
$.slice(0, 3).map((te) => /* @__PURE__ */ r(
|
|
5391
5393
|
"span",
|
|
5392
5394
|
{
|
|
5393
5395
|
className: "text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]",
|
|
@@ -5398,9 +5400,9 @@ const zt = ({
|
|
|
5398
5400
|
},
|
|
5399
5401
|
te
|
|
5400
5402
|
)),
|
|
5401
|
-
|
|
5403
|
+
$.length > 3 && /* @__PURE__ */ r("span", { className: "text-[10px] font-mono text-[var(--color-text-tertiary)]", children: [
|
|
5402
5404
|
"+",
|
|
5403
|
-
|
|
5405
|
+
$.length - 3
|
|
5404
5406
|
] })
|
|
5405
5407
|
] }),
|
|
5406
5408
|
/* @__PURE__ */ r(
|
|
@@ -5424,7 +5426,7 @@ const zt = ({
|
|
|
5424
5426
|
children: O(l)
|
|
5425
5427
|
}
|
|
5426
5428
|
),
|
|
5427
|
-
N &&
|
|
5429
|
+
N && x && /* @__PURE__ */ e(
|
|
5428
5430
|
"span",
|
|
5429
5431
|
{
|
|
5430
5432
|
className: `
|
|
@@ -5432,7 +5434,7 @@ const zt = ({
|
|
|
5432
5434
|
pointer-events-none whitespace-nowrap
|
|
5433
5435
|
${d ? "text-[8px] -top-2.5 start-0" : "text-[10px] -top-3 start-0.5"}
|
|
5434
5436
|
`,
|
|
5435
|
-
children: O(
|
|
5437
|
+
children: O(x)
|
|
5436
5438
|
}
|
|
5437
5439
|
)
|
|
5438
5440
|
] }),
|
|
@@ -5447,7 +5449,7 @@ const zt = ({
|
|
|
5447
5449
|
]
|
|
5448
5450
|
}
|
|
5449
5451
|
),
|
|
5450
|
-
|
|
5452
|
+
b && !d && /* @__PURE__ */ e("div", { className: "mt-3 pt-3 border-t border-[var(--color-border-secondary)]", children: /* @__PURE__ */ e(
|
|
5451
5453
|
Ie,
|
|
5452
5454
|
{
|
|
5453
5455
|
variant: "primary",
|
|
@@ -5463,7 +5465,7 @@ const zt = ({
|
|
|
5463
5465
|
]
|
|
5464
5466
|
}
|
|
5465
5467
|
),
|
|
5466
|
-
d &&
|
|
5468
|
+
d && b && /* @__PURE__ */ e(
|
|
5467
5469
|
"button",
|
|
5468
5470
|
{
|
|
5469
5471
|
type: "button",
|
|
@@ -5476,7 +5478,7 @@ const zt = ({
|
|
|
5476
5478
|
flex items-center justify-center relative z-10
|
|
5477
5479
|
transition-all duration-200
|
|
5478
5480
|
${o ? "bg-[var(--color-primary-solid)] text-white hover:bg-[var(--color-primary-hover)]" : "bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)] cursor-not-allowed"}
|
|
5479
|
-
${
|
|
5481
|
+
${w && o ? "scale-110 shadow-[var(--shadow-glow-primary)]" : "scale-100"}
|
|
5480
5482
|
`,
|
|
5481
5483
|
"aria-label": C(o ? "productLabels.addToCart" : "productLabels.outOfStock"),
|
|
5482
5484
|
children: /* @__PURE__ */ e(
|
|
@@ -5514,19 +5516,19 @@ const jt = ({
|
|
|
5514
5516
|
date: n,
|
|
5515
5517
|
readTime: L,
|
|
5516
5518
|
category: p,
|
|
5517
|
-
tags:
|
|
5519
|
+
tags: $ = [],
|
|
5518
5520
|
link: N,
|
|
5519
|
-
onClick:
|
|
5521
|
+
onClick: x,
|
|
5520
5522
|
featured: o = !1,
|
|
5521
|
-
layout:
|
|
5523
|
+
layout: M = "vertical",
|
|
5522
5524
|
glow: c = "none",
|
|
5523
|
-
showCategory:
|
|
5525
|
+
showCategory: y = !0,
|
|
5524
5526
|
showAuthor: g = !0,
|
|
5525
|
-
showReadTime:
|
|
5526
|
-
className:
|
|
5527
|
+
showReadTime: I = !0,
|
|
5528
|
+
className: k = "",
|
|
5527
5529
|
fullWidthMobile: u = !1
|
|
5528
5530
|
}) => {
|
|
5529
|
-
const { t:
|
|
5531
|
+
const { t: b, language: v } = ke(), [T, C] = P({ x: 0, y: 0 }), [A, R] = P(!1), [w, i] = P(!1), S = Z(null), D = M === "horizontal", f = (O) => {
|
|
5530
5532
|
if (!S.current) return;
|
|
5531
5533
|
const Q = S.current.getBoundingClientRect(), re = O.clientX - Q.left, ae = O.clientY - Q.top;
|
|
5532
5534
|
C({
|
|
@@ -5554,7 +5556,7 @@ const jt = ({
|
|
|
5554
5556
|
en: "en-US",
|
|
5555
5557
|
fa: "fa-IR",
|
|
5556
5558
|
fr: "fr-FR"
|
|
5557
|
-
}[
|
|
5559
|
+
}[v] || "en-US";
|
|
5558
5560
|
return Q.toLocaleDateString(ae, {
|
|
5559
5561
|
year: "numeric",
|
|
5560
5562
|
month: "short",
|
|
@@ -5572,7 +5574,7 @@ const jt = ({
|
|
|
5572
5574
|
} catch {
|
|
5573
5575
|
return;
|
|
5574
5576
|
}
|
|
5575
|
-
}, J = () => /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]", children: /* @__PURE__ */ e(dt, {}) }), ee =
|
|
5577
|
+
}, J = () => /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]", children: /* @__PURE__ */ e(dt, {}) }), ee = D ? "w-full sm:w-44 sm:h-44 md:w-52 md:h-52 flex-shrink-0 aspect-video sm:aspect-square" : o ? "w-full aspect-[16/9]" : "w-full aspect-video", _ = o ? 4 : 3, W = !!x;
|
|
5576
5578
|
return /* @__PURE__ */ r(
|
|
5577
5579
|
"div",
|
|
5578
5580
|
{
|
|
@@ -5582,26 +5584,26 @@ const jt = ({
|
|
|
5582
5584
|
${o ? "p-5" : "p-4"}
|
|
5583
5585
|
${j[c]}
|
|
5584
5586
|
${u ? "w-full sm:w-auto" : ""}
|
|
5585
|
-
${
|
|
5586
|
-
${
|
|
5587
|
+
${D ? "flex flex-col sm:flex-row gap-4" : "flex flex-col h-full"}
|
|
5588
|
+
${k}
|
|
5587
5589
|
${W ? "cursor-pointer" : ""}
|
|
5588
5590
|
`,
|
|
5589
5591
|
style: {
|
|
5590
|
-
transform: A ? `perspective(900px) rotateX(${
|
|
5592
|
+
transform: A ? `perspective(900px) rotateX(${T.x}deg) rotateY(${T.y}deg) translateY(-6px) scale(1.02)` : "perspective(900px) rotateX(0) rotateY(0) translateY(0) scale(1)",
|
|
5591
5593
|
transformStyle: "preserve-3d",
|
|
5592
5594
|
boxShadow: A ? G : V,
|
|
5593
5595
|
transition: "transform 0.22s ease-out, box-shadow 0.3s ease, border-color 0.25s ease",
|
|
5594
5596
|
borderColor: A ? "color-mix(in srgb, var(--color-primary) 35%, var(--color-border-primary))" : void 0
|
|
5595
5597
|
},
|
|
5596
|
-
onMouseMove:
|
|
5598
|
+
onMouseMove: f,
|
|
5597
5599
|
onMouseEnter: h,
|
|
5598
5600
|
onMouseLeave: d,
|
|
5599
|
-
onClick:
|
|
5601
|
+
onClick: x,
|
|
5600
5602
|
role: W ? "button" : void 0,
|
|
5601
5603
|
tabIndex: W ? 0 : void 0,
|
|
5602
5604
|
"aria-label": W ? `Blog post: ${t}` : void 0,
|
|
5603
5605
|
onKeyDown: W ? (O) => {
|
|
5604
|
-
(O.key === "Enter" || O.key === " ") && (
|
|
5606
|
+
(O.key === "Enter" || O.key === " ") && (x == null || x());
|
|
5605
5607
|
} : void 0,
|
|
5606
5608
|
children: [
|
|
5607
5609
|
/* @__PURE__ */ e(
|
|
@@ -5623,7 +5625,7 @@ const jt = ({
|
|
|
5623
5625
|
bg-[var(--color-bg-tertiary)] relative z-[1]
|
|
5624
5626
|
`,
|
|
5625
5627
|
children: [
|
|
5626
|
-
a && !
|
|
5628
|
+
a && !w ? /* @__PURE__ */ e(
|
|
5627
5629
|
"img",
|
|
5628
5630
|
{
|
|
5629
5631
|
src: a,
|
|
@@ -5636,7 +5638,7 @@ const jt = ({
|
|
|
5636
5638
|
loading: "lazy"
|
|
5637
5639
|
}
|
|
5638
5640
|
) : /* @__PURE__ */ e(J, {}),
|
|
5639
|
-
p &&
|
|
5641
|
+
p && y && /* @__PURE__ */ e("span", { className: "absolute top-2.5 start-2.5 z-10", children: /* @__PURE__ */ e(ye, { variant: "primary", size: "sm", glow: !0, children: p }) })
|
|
5640
5642
|
]
|
|
5641
5643
|
}
|
|
5642
5644
|
),
|
|
@@ -5645,7 +5647,7 @@ const jt = ({
|
|
|
5645
5647
|
{
|
|
5646
5648
|
className: `
|
|
5647
5649
|
flex flex-col flex-1 min-w-0 relative z-[1]
|
|
5648
|
-
${
|
|
5650
|
+
${D ? "" : "mt-3"}
|
|
5649
5651
|
`,
|
|
5650
5652
|
children: [
|
|
5651
5653
|
/* @__PURE__ */ e(
|
|
@@ -5653,7 +5655,7 @@ const jt = ({
|
|
|
5653
5655
|
{
|
|
5654
5656
|
className: `
|
|
5655
5657
|
font-heading font-bold leading-snug line-clamp-2
|
|
5656
|
-
${o ? "text-2xl" :
|
|
5658
|
+
${o ? "text-2xl" : D ? "text-lg" : "text-xl"}
|
|
5657
5659
|
transition-colors duration-180
|
|
5658
5660
|
${A ? "text-[var(--color-primary)]" : "text-[var(--color-text-primary)]"}
|
|
5659
5661
|
`,
|
|
@@ -5673,8 +5675,8 @@ const jt = ({
|
|
|
5673
5675
|
children: l
|
|
5674
5676
|
}
|
|
5675
5677
|
),
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
+
$.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5 mt-3", children: [
|
|
5679
|
+
$.slice(0, _).map((O) => /* @__PURE__ */ r(
|
|
5678
5680
|
"span",
|
|
5679
5681
|
{
|
|
5680
5682
|
className: "text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]",
|
|
@@ -5685,9 +5687,9 @@ const jt = ({
|
|
|
5685
5687
|
},
|
|
5686
5688
|
O
|
|
5687
5689
|
)),
|
|
5688
|
-
|
|
5690
|
+
$.length > _ && /* @__PURE__ */ r("span", { className: "text-[10px] font-mono text-[var(--color-text-tertiary)]", children: [
|
|
5689
5691
|
"+",
|
|
5690
|
-
|
|
5692
|
+
$.length - _
|
|
5691
5693
|
] })
|
|
5692
5694
|
] }),
|
|
5693
5695
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-3 mt-4 pt-3 border-t border-[var(--color-border-secondary)]", children: [
|
|
@@ -5697,7 +5699,7 @@ const jt = ({
|
|
|
5697
5699
|
] }),
|
|
5698
5700
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between text-xs text-[var(--color-text-tertiary)]", children: [
|
|
5699
5701
|
n && /* @__PURE__ */ e("time", { dateTime: B(n), children: X(n) }),
|
|
5700
|
-
|
|
5702
|
+
I && L != null && /* @__PURE__ */ r("span", { className: "flex items-center gap-1", children: [
|
|
5701
5703
|
/* @__PURE__ */ e(
|
|
5702
5704
|
"svg",
|
|
5703
5705
|
{
|
|
@@ -5717,7 +5719,7 @@ const jt = ({
|
|
|
5717
5719
|
)
|
|
5718
5720
|
}
|
|
5719
5721
|
),
|
|
5720
|
-
|
|
5722
|
+
b("blogLabels.minRead", { count: L })
|
|
5721
5723
|
] })
|
|
5722
5724
|
] }),
|
|
5723
5725
|
N && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ r(
|
|
@@ -5730,7 +5732,7 @@ const jt = ({
|
|
|
5730
5732
|
${A ? "opacity-100 translate-x-0.5" : "opacity-70"}
|
|
5731
5733
|
`,
|
|
5732
5734
|
children: [
|
|
5733
|
-
|
|
5735
|
+
b("blogLabels.readMore"),
|
|
5734
5736
|
/* @__PURE__ */ e(
|
|
5735
5737
|
"svg",
|
|
5736
5738
|
{
|
|
@@ -5834,12 +5836,12 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
5834
5836
|
children: m
|
|
5835
5837
|
}) => {
|
|
5836
5838
|
const s = "dara-ui-theme", n = () => {
|
|
5837
|
-
var
|
|
5839
|
+
var y;
|
|
5838
5840
|
const c = localStorage.getItem(s);
|
|
5839
|
-
return c || t || ((
|
|
5840
|
-
}, [L, p] = P(De), [
|
|
5841
|
+
return c || t || ((y = De[0]) == null ? void 0 : y.value) || "nightfall";
|
|
5842
|
+
}, [L, p] = P(De), [$, N] = P(n);
|
|
5841
5843
|
Y(() => {
|
|
5842
|
-
var g,
|
|
5844
|
+
var g, I;
|
|
5843
5845
|
if (!a && l) {
|
|
5844
5846
|
p(l);
|
|
5845
5847
|
return;
|
|
@@ -5848,22 +5850,22 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
5848
5850
|
p(l);
|
|
5849
5851
|
return;
|
|
5850
5852
|
}
|
|
5851
|
-
const c = [],
|
|
5853
|
+
const c = [], y = document.styleSheets;
|
|
5852
5854
|
try {
|
|
5853
|
-
for (const
|
|
5855
|
+
for (const k of y)
|
|
5854
5856
|
try {
|
|
5855
|
-
const u =
|
|
5856
|
-
for (const
|
|
5857
|
-
if (
|
|
5858
|
-
const
|
|
5857
|
+
const u = k.cssRules || k.rules;
|
|
5858
|
+
for (const b of u)
|
|
5859
|
+
if (b instanceof CSSStyleRule) {
|
|
5860
|
+
const v = (g = b.selectorText) == null ? void 0 : g.match(
|
|
5859
5861
|
/\[data-theme="([^"]+)"\]/
|
|
5860
5862
|
);
|
|
5861
|
-
if (
|
|
5862
|
-
const
|
|
5863
|
-
c.some((A) => A.value ===
|
|
5864
|
-
value:
|
|
5863
|
+
if (v && v[1]) {
|
|
5864
|
+
const T = v[1], C = T.split("-").map((A) => A.charAt(0).toUpperCase() + A.slice(1)).join(" ");
|
|
5865
|
+
c.some((A) => A.value === T) || c.push({
|
|
5866
|
+
value: T,
|
|
5865
5867
|
label: C,
|
|
5866
|
-
icon: ze(
|
|
5868
|
+
icon: ze(T)
|
|
5867
5869
|
});
|
|
5868
5870
|
}
|
|
5869
5871
|
}
|
|
@@ -5873,33 +5875,33 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
5873
5875
|
} catch {
|
|
5874
5876
|
}
|
|
5875
5877
|
if (c.length > 0) {
|
|
5876
|
-
if (p(c), !c.some((
|
|
5877
|
-
const
|
|
5878
|
-
N(
|
|
5878
|
+
if (p(c), !c.some((k) => k.value === $)) {
|
|
5879
|
+
const k = ((I = c[0]) == null ? void 0 : I.value) || "nightfall";
|
|
5880
|
+
N(k), x(k);
|
|
5879
5881
|
}
|
|
5880
5882
|
} else l && p(l);
|
|
5881
5883
|
}, [a, l]);
|
|
5882
|
-
const
|
|
5884
|
+
const x = F((c) => {
|
|
5883
5885
|
document.documentElement.setAttribute("data-theme", c);
|
|
5884
5886
|
}, []);
|
|
5885
5887
|
Y(() => {
|
|
5886
|
-
|
|
5887
|
-
}, [
|
|
5888
|
+
x($);
|
|
5889
|
+
}, [$, x]);
|
|
5888
5890
|
const o = F(
|
|
5889
5891
|
(c) => {
|
|
5890
|
-
L.find((g) => g.value === c) && (N(c),
|
|
5892
|
+
L.find((g) => g.value === c) && (N(c), x(c), localStorage.setItem(s, c), window.dispatchEvent(
|
|
5891
5893
|
new CustomEvent("dara-theme-change", { detail: { theme: c } })
|
|
5892
5894
|
));
|
|
5893
5895
|
},
|
|
5894
|
-
[L,
|
|
5896
|
+
[L, x]
|
|
5895
5897
|
);
|
|
5896
5898
|
Y(() => {
|
|
5897
5899
|
const c = n();
|
|
5898
|
-
L.find((g) => g.value === c) &&
|
|
5899
|
-
}, [L,
|
|
5900
|
-
const c = (
|
|
5901
|
-
const { theme: g } =
|
|
5902
|
-
g && g !==
|
|
5900
|
+
L.find((g) => g.value === c) && x(c);
|
|
5901
|
+
}, [L, x]), Y(() => {
|
|
5902
|
+
const c = (y) => {
|
|
5903
|
+
const { theme: g } = y.detail;
|
|
5904
|
+
g && g !== $ && N(g);
|
|
5903
5905
|
};
|
|
5904
5906
|
return window.addEventListener(
|
|
5905
5907
|
"dara-theme-change",
|
|
@@ -5910,16 +5912,16 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
5910
5912
|
c
|
|
5911
5913
|
);
|
|
5912
5914
|
};
|
|
5913
|
-
}, [
|
|
5914
|
-
const
|
|
5915
|
+
}, [$]);
|
|
5916
|
+
const M = ve(
|
|
5915
5917
|
() => ({
|
|
5916
|
-
theme:
|
|
5918
|
+
theme: $,
|
|
5917
5919
|
setTheme: o,
|
|
5918
5920
|
themes: L
|
|
5919
5921
|
}),
|
|
5920
|
-
[
|
|
5922
|
+
[$, o, L]
|
|
5921
5923
|
);
|
|
5922
|
-
return /* @__PURE__ */ e(Ze.Provider, { value:
|
|
5924
|
+
return /* @__PURE__ */ e(Ze.Provider, { value: M, children: m });
|
|
5923
5925
|
}, Bt = () => {
|
|
5924
5926
|
const t = Ne(Ze);
|
|
5925
5927
|
if (!t)
|
|
@@ -5934,31 +5936,31 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
5934
5936
|
size: n = "md",
|
|
5935
5937
|
iconOnly: L = !1,
|
|
5936
5938
|
fixedWidth: p,
|
|
5937
|
-
className:
|
|
5939
|
+
className: $ = "",
|
|
5938
5940
|
useContext: N = !0,
|
|
5939
|
-
openUpward:
|
|
5941
|
+
openUpward: x = !1
|
|
5940
5942
|
}) => {
|
|
5941
|
-
const [o,
|
|
5942
|
-
let
|
|
5943
|
+
const [o, M] = P(!1), [c, y] = P(De), g = Z(null), I = "dara-ui-theme";
|
|
5944
|
+
let k = null, u = !1;
|
|
5943
5945
|
try {
|
|
5944
|
-
|
|
5946
|
+
k = Bt(), u = N && !0;
|
|
5945
5947
|
} catch {
|
|
5946
|
-
u = !1,
|
|
5948
|
+
u = !1, k = null;
|
|
5947
5949
|
}
|
|
5948
|
-
const
|
|
5950
|
+
const b = t !== void 0, [v, T] = P(() => {
|
|
5949
5951
|
var d;
|
|
5950
|
-
const h = localStorage.getItem(
|
|
5952
|
+
const h = localStorage.getItem(I);
|
|
5951
5953
|
return h || l || ((d = De[0]) == null ? void 0 : d.value) || "nightfall";
|
|
5952
5954
|
});
|
|
5953
5955
|
let C;
|
|
5954
|
-
|
|
5956
|
+
b ? C = t : u && k ? C = k.theme : C = v, Y(() => {
|
|
5955
5957
|
var j, q;
|
|
5956
5958
|
if (!s && m) {
|
|
5957
|
-
|
|
5959
|
+
y(m);
|
|
5958
5960
|
return;
|
|
5959
5961
|
}
|
|
5960
5962
|
if (m) {
|
|
5961
|
-
|
|
5963
|
+
y(m);
|
|
5962
5964
|
return;
|
|
5963
5965
|
}
|
|
5964
5966
|
const h = [], d = document.styleSheets;
|
|
@@ -5986,11 +5988,11 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
5986
5988
|
} catch {
|
|
5987
5989
|
}
|
|
5988
5990
|
if (h.length > 0) {
|
|
5989
|
-
if (
|
|
5991
|
+
if (y(h), !h.some((V) => V.value === C)) {
|
|
5990
5992
|
const V = ((q = h[0]) == null ? void 0 : q.value) || "nightfall";
|
|
5991
|
-
!
|
|
5993
|
+
!b && !u && T(V), A(V);
|
|
5992
5994
|
}
|
|
5993
|
-
} else m &&
|
|
5995
|
+
} else m && y(m);
|
|
5994
5996
|
}, [s, m]);
|
|
5995
5997
|
const A = F((h) => {
|
|
5996
5998
|
document.documentElement.setAttribute("data-theme", h);
|
|
@@ -5999,7 +6001,7 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
5999
6001
|
A(C);
|
|
6000
6002
|
}, [C, A]), Y(() => {
|
|
6001
6003
|
const h = (d) => {
|
|
6002
|
-
g.current && !g.current.contains(d.target) &&
|
|
6004
|
+
g.current && !g.current.contains(d.target) && M(!1);
|
|
6003
6005
|
};
|
|
6004
6006
|
return o && document.addEventListener("mousedown", h), () => {
|
|
6005
6007
|
document.removeEventListener("mousedown", h);
|
|
@@ -6007,12 +6009,12 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6007
6009
|
}, [o]);
|
|
6008
6010
|
const R = F(
|
|
6009
6011
|
(h) => {
|
|
6010
|
-
u &&
|
|
6012
|
+
u && k ? k.setTheme(h) : b || T(h), A(h), a == null || a(h), M(!1), window.dispatchEvent(
|
|
6011
6013
|
new CustomEvent("dara-theme-change", { detail: { theme: h } })
|
|
6012
6014
|
);
|
|
6013
6015
|
},
|
|
6014
|
-
[u,
|
|
6015
|
-
),
|
|
6016
|
+
[u, k, b, a, A]
|
|
6017
|
+
), w = ve(
|
|
6016
6018
|
() => c.map((h) => ({
|
|
6017
6019
|
...h,
|
|
6018
6020
|
icon: h.icon || ze(h.value)
|
|
@@ -6043,7 +6045,7 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6043
6045
|
chevronSize: "h-5 w-5",
|
|
6044
6046
|
iconOnlyWidth: "48px"
|
|
6045
6047
|
}
|
|
6046
|
-
}, S =
|
|
6048
|
+
}, S = w.find((h) => h.value === C), D = L ? i[n].iconOnlyWidth : p || "140px", f = (h) => {
|
|
6047
6049
|
if (ne.isValidElement(h)) {
|
|
6048
6050
|
const d = h;
|
|
6049
6051
|
return ne.cloneElement(d, {
|
|
@@ -6055,12 +6057,12 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6055
6057
|
}
|
|
6056
6058
|
return h;
|
|
6057
6059
|
};
|
|
6058
|
-
return L ? /* @__PURE__ */ r("div", { ref: g, className: `relative inline-flex ${
|
|
6060
|
+
return L ? /* @__PURE__ */ r("div", { ref: g, className: `relative inline-flex ${$}`, children: [
|
|
6059
6061
|
/* @__PURE__ */ e(
|
|
6060
6062
|
"button",
|
|
6061
6063
|
{
|
|
6062
6064
|
type: "button",
|
|
6063
|
-
onClick: () =>
|
|
6065
|
+
onClick: () => M(!o),
|
|
6064
6066
|
className: `
|
|
6065
6067
|
inline-flex items-center justify-center
|
|
6066
6068
|
bg-[var(--color-bg-tertiary)]
|
|
@@ -6083,7 +6085,7 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6083
6085
|
"aria-expanded": o,
|
|
6084
6086
|
"aria-haspopup": "listbox",
|
|
6085
6087
|
"aria-label": `Current theme: ${(S == null ? void 0 : S.label) || "Theme"}`,
|
|
6086
|
-
children: (S == null ? void 0 : S.icon) &&
|
|
6088
|
+
children: (S == null ? void 0 : S.icon) && f(S.icon)
|
|
6087
6089
|
}
|
|
6088
6090
|
),
|
|
6089
6091
|
/* @__PURE__ */ e(
|
|
@@ -6092,26 +6094,26 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6092
6094
|
className: `
|
|
6093
6095
|
absolute z-50
|
|
6094
6096
|
left-1/2 -translate-x-1/2
|
|
6095
|
-
${
|
|
6097
|
+
${x ? "bottom-full mb-1.5" : "top-full mt-1.5"}
|
|
6096
6098
|
glass
|
|
6097
6099
|
rounded-[var(--radius-md)]
|
|
6098
6100
|
py-1
|
|
6099
6101
|
shadow-[var(--shadow-float)]
|
|
6100
6102
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
6101
6103
|
overflow-hidden
|
|
6102
|
-
${o ? "opacity-100 translate-y-0 pointer-events-auto" :
|
|
6104
|
+
${o ? "opacity-100 translate-y-0 pointer-events-auto" : x ? "opacity-0 translate-y-2 pointer-events-none" : "opacity-0 -translate-y-2 pointer-events-none"}
|
|
6103
6105
|
`,
|
|
6104
6106
|
style: {
|
|
6105
|
-
width:
|
|
6106
|
-
minWidth:
|
|
6107
|
+
width: D,
|
|
6108
|
+
minWidth: D,
|
|
6107
6109
|
position: "absolute",
|
|
6108
|
-
top:
|
|
6109
|
-
bottom:
|
|
6110
|
-
marginTop:
|
|
6111
|
-
marginBottom:
|
|
6110
|
+
top: x ? "auto" : "100%",
|
|
6111
|
+
bottom: x ? "100%" : "auto",
|
|
6112
|
+
marginTop: x ? "0" : "6px",
|
|
6113
|
+
marginBottom: x ? "6px" : "0"
|
|
6112
6114
|
},
|
|
6113
6115
|
role: "listbox",
|
|
6114
|
-
children:
|
|
6116
|
+
children: w.map((h) => {
|
|
6115
6117
|
const d = h.value === C;
|
|
6116
6118
|
return /* @__PURE__ */ e(
|
|
6117
6119
|
"button",
|
|
@@ -6127,19 +6129,19 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6127
6129
|
role: "option",
|
|
6128
6130
|
"aria-selected": d,
|
|
6129
6131
|
title: h.label,
|
|
6130
|
-
children: h.icon &&
|
|
6132
|
+
children: h.icon && f(h.icon)
|
|
6131
6133
|
},
|
|
6132
6134
|
h.value
|
|
6133
6135
|
);
|
|
6134
6136
|
})
|
|
6135
6137
|
}
|
|
6136
6138
|
)
|
|
6137
|
-
] }) : /* @__PURE__ */ r("div", { ref: g, className: `relative ${
|
|
6139
|
+
] }) : /* @__PURE__ */ r("div", { ref: g, className: `relative ${$}`, children: [
|
|
6138
6140
|
/* @__PURE__ */ r(
|
|
6139
6141
|
"button",
|
|
6140
6142
|
{
|
|
6141
6143
|
type: "button",
|
|
6142
|
-
onClick: () =>
|
|
6144
|
+
onClick: () => M(!o),
|
|
6143
6145
|
className: `
|
|
6144
6146
|
inline-flex items-center
|
|
6145
6147
|
bg-[var(--color-bg-tertiary)]
|
|
@@ -6160,7 +6162,7 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6160
6162
|
"aria-haspopup": "listbox",
|
|
6161
6163
|
children: [
|
|
6162
6164
|
/* @__PURE__ */ r("span", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
6163
|
-
(S == null ? void 0 : S.icon) &&
|
|
6165
|
+
(S == null ? void 0 : S.icon) && f(S.icon),
|
|
6164
6166
|
/* @__PURE__ */ e("span", { className: "font-mono tracking-wide truncate", children: (S == null ? void 0 : S.label) || "Theme" })
|
|
6165
6167
|
] }),
|
|
6166
6168
|
/* @__PURE__ */ e(
|
|
@@ -6195,16 +6197,16 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6195
6197
|
className: `
|
|
6196
6198
|
absolute z-50
|
|
6197
6199
|
left-1/2 -translate-x-1/2
|
|
6198
|
-
${
|
|
6200
|
+
${x ? "bottom-full mb-1.5" : "top-full mt-1.5"}
|
|
6199
6201
|
pointer-events-none
|
|
6200
6202
|
`,
|
|
6201
6203
|
style: {
|
|
6202
|
-
width:
|
|
6203
|
-
minWidth:
|
|
6204
|
-
top:
|
|
6205
|
-
bottom:
|
|
6206
|
-
marginTop:
|
|
6207
|
-
marginBottom:
|
|
6204
|
+
width: D,
|
|
6205
|
+
minWidth: D,
|
|
6206
|
+
top: x ? "auto" : "100%",
|
|
6207
|
+
bottom: x ? "100%" : "auto",
|
|
6208
|
+
marginTop: x ? "0" : "6px",
|
|
6209
|
+
marginBottom: x ? "6px" : "0"
|
|
6208
6210
|
},
|
|
6209
6211
|
children: /* @__PURE__ */ e(
|
|
6210
6212
|
"div",
|
|
@@ -6216,9 +6218,9 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6216
6218
|
shadow-[var(--shadow-float)]
|
|
6217
6219
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
6218
6220
|
overflow-hidden
|
|
6219
|
-
${o ? "opacity-100 translate-y-0 pointer-events-auto" :
|
|
6221
|
+
${o ? "opacity-100 translate-y-0 pointer-events-auto" : x ? "opacity-0 translate-y-2 pointer-events-none" : "opacity-0 -translate-y-2 pointer-events-none"}
|
|
6220
6222
|
`,
|
|
6221
|
-
children:
|
|
6223
|
+
children: w.map((h) => {
|
|
6222
6224
|
const d = h.value === C;
|
|
6223
6225
|
return /* @__PURE__ */ r(
|
|
6224
6226
|
"button",
|
|
@@ -6234,7 +6236,7 @@ const Te = () => /* @__PURE__ */ e(
|
|
|
6234
6236
|
role: "option",
|
|
6235
6237
|
"aria-selected": d,
|
|
6236
6238
|
children: [
|
|
6237
|
-
h.icon &&
|
|
6239
|
+
h.icon && f(h.icon),
|
|
6238
6240
|
/* @__PURE__ */ e("span", { className: "truncate", children: h.label }),
|
|
6239
6241
|
d && /* @__PURE__ */ e(
|
|
6240
6242
|
"svg",
|
|
@@ -6461,7 +6463,10 @@ const Gt = {
|
|
|
6461
6463
|
glowEffects: "Glow Effects",
|
|
6462
6464
|
withImage: "With Image",
|
|
6463
6465
|
group: "Group",
|
|
6464
|
-
clickable: "Clickable"
|
|
6466
|
+
clickable: "Clickable",
|
|
6467
|
+
heroProfile: "Hero Profile Block",
|
|
6468
|
+
profileName: "Dara",
|
|
6469
|
+
profileBio: "Building futuristic interfaces one glassmorphism card at a time. Archivist of the digital snowstorm."
|
|
6465
6470
|
},
|
|
6466
6471
|
tooltip: {
|
|
6467
6472
|
title: "Tooltip",
|
|
@@ -7225,7 +7230,10 @@ const Gt = {
|
|
|
7225
7230
|
glowEffects: "جلوههای درخشش",
|
|
7226
7231
|
withImage: "با تصویر",
|
|
7227
7232
|
group: "گروه",
|
|
7228
|
-
clickable: "قابل کلیک"
|
|
7233
|
+
clickable: "قابل کلیک",
|
|
7234
|
+
heroProfile: "بلوک پروفایل قهرمان",
|
|
7235
|
+
profileName: "دارا",
|
|
7236
|
+
profileBio: "ساخت رابطهای آیندهنگرانه، یک کارت شیشهای در هر لحظه. بایگان طوفان برفی دیجیتال."
|
|
7229
7237
|
},
|
|
7230
7238
|
tooltip: {
|
|
7231
7239
|
title: "راهنما",
|
|
@@ -7989,7 +7997,10 @@ const Gt = {
|
|
|
7989
7997
|
glowEffects: "Effets de lueur",
|
|
7990
7998
|
withImage: "Avec image",
|
|
7991
7999
|
group: "Groupe",
|
|
7992
|
-
clickable: "Cliquable"
|
|
8000
|
+
clickable: "Cliquable",
|
|
8001
|
+
heroProfile: "Bloc de profil héros",
|
|
8002
|
+
profileName: "Dara",
|
|
8003
|
+
profileBio: "Construction d'interfaces futuristes, une carte glassmorphique à la fois. Archiviste de la tempête de neige numérique."
|
|
7993
8004
|
},
|
|
7994
8005
|
tooltip: {
|
|
7995
8006
|
title: "Infobulle",
|
|
@@ -8570,25 +8581,25 @@ const Gt = {
|
|
|
8570
8581
|
mbti: n,
|
|
8571
8582
|
species: L,
|
|
8572
8583
|
affiliation: p,
|
|
8573
|
-
traits:
|
|
8584
|
+
traits: $ = [],
|
|
8574
8585
|
stats: N = [],
|
|
8575
|
-
glow:
|
|
8586
|
+
glow: x = "primary",
|
|
8576
8587
|
layout: o = "vertical",
|
|
8577
|
-
className:
|
|
8588
|
+
className: M = ""
|
|
8578
8589
|
}) => {
|
|
8579
|
-
const [c,
|
|
8580
|
-
if (!
|
|
8581
|
-
const S =
|
|
8582
|
-
|
|
8583
|
-
},
|
|
8584
|
-
|
|
8590
|
+
const [c, y] = P({ x: 0, y: 0 }), [g, I] = P(!1), k = Z(null), { t: u } = ke(), b = (i) => {
|
|
8591
|
+
if (!k.current) return;
|
|
8592
|
+
const S = k.current.getBoundingClientRect(), D = i.clientX - S.left, f = i.clientY - S.top, h = S.width / 2, d = S.height / 2, j = (f - d) / d * -8, q = (D - h) / h * 8;
|
|
8593
|
+
y({ x: j, y: q });
|
|
8594
|
+
}, v = () => I(!0), T = () => {
|
|
8595
|
+
I(!1), y({ x: 0, y: 0 });
|
|
8585
8596
|
}, A = {
|
|
8586
8597
|
primary: "glow-primary",
|
|
8587
8598
|
secondary: "glow-secondary",
|
|
8588
8599
|
accent: "glow-accent",
|
|
8589
8600
|
none: ""
|
|
8590
|
-
}[
|
|
8591
|
-
const S = Math.min(100, Math.max(0, i.value)),
|
|
8601
|
+
}[x] || "", R = o === "horizontal", w = (i) => {
|
|
8602
|
+
const S = Math.min(100, Math.max(0, i.value)), D = R ? 48 : 56, f = 3.5, h = D / 2 - f / 2, d = 2 * Math.PI * h, j = d - S / 100 * d, q = R ? 60 : 68, G = D + 8 * 2, X = G / 2, B = i.color === "secondary" ? "var(--color-secondary)" : i.color === "accent" ? "var(--color-accent)" : i.color === "success" ? "var(--color-success)" : i.color === "danger" ? "var(--color-danger)" : i.color === "warning" ? "var(--color-warning)" : "var(--color-primary)";
|
|
8592
8603
|
return /* @__PURE__ */ r(
|
|
8593
8604
|
"div",
|
|
8594
8605
|
{
|
|
@@ -8599,14 +8610,14 @@ const Gt = {
|
|
|
8599
8610
|
"div",
|
|
8600
8611
|
{
|
|
8601
8612
|
className: "relative",
|
|
8602
|
-
style: { width:
|
|
8613
|
+
style: { width: D, height: D },
|
|
8603
8614
|
role: "img",
|
|
8604
8615
|
"aria-label": `${i.label}: ${i.value}%`,
|
|
8605
8616
|
children: /* @__PURE__ */ r(
|
|
8606
8617
|
"svg",
|
|
8607
8618
|
{
|
|
8608
|
-
width:
|
|
8609
|
-
height:
|
|
8619
|
+
width: D,
|
|
8620
|
+
height: D,
|
|
8610
8621
|
viewBox: `0 0 ${G} ${G}`,
|
|
8611
8622
|
className: "block overflow-visible",
|
|
8612
8623
|
"aria-hidden": "true",
|
|
@@ -8620,7 +8631,7 @@ const Gt = {
|
|
|
8620
8631
|
r: h,
|
|
8621
8632
|
fill: "none",
|
|
8622
8633
|
stroke: B,
|
|
8623
|
-
strokeWidth:
|
|
8634
|
+
strokeWidth: f + 3,
|
|
8624
8635
|
strokeDasharray: d,
|
|
8625
8636
|
strokeDashoffset: j,
|
|
8626
8637
|
strokeLinecap: "round",
|
|
@@ -8639,7 +8650,7 @@ const Gt = {
|
|
|
8639
8650
|
r: h,
|
|
8640
8651
|
fill: "none",
|
|
8641
8652
|
stroke: "var(--color-border-secondary)",
|
|
8642
|
-
strokeWidth:
|
|
8653
|
+
strokeWidth: f
|
|
8643
8654
|
}
|
|
8644
8655
|
),
|
|
8645
8656
|
/* @__PURE__ */ e(
|
|
@@ -8650,7 +8661,7 @@ const Gt = {
|
|
|
8650
8661
|
r: h,
|
|
8651
8662
|
fill: "none",
|
|
8652
8663
|
stroke: B,
|
|
8653
|
-
strokeWidth:
|
|
8664
|
+
strokeWidth: f,
|
|
8654
8665
|
strokeDasharray: d,
|
|
8655
8666
|
strokeDashoffset: j,
|
|
8656
8667
|
strokeLinecap: "round",
|
|
@@ -8667,7 +8678,7 @@ const Gt = {
|
|
|
8667
8678
|
dominantBaseline: "central",
|
|
8668
8679
|
className: "font-heading font-bold",
|
|
8669
8680
|
style: {
|
|
8670
|
-
fontSize:
|
|
8681
|
+
fontSize: D < 52 ? "11px" : "13px",
|
|
8671
8682
|
fill: "var(--color-text-primary)"
|
|
8672
8683
|
},
|
|
8673
8684
|
children: [
|
|
@@ -8676,7 +8687,7 @@ const Gt = {
|
|
|
8676
8687
|
"tspan",
|
|
8677
8688
|
{
|
|
8678
8689
|
style: {
|
|
8679
|
-
fontSize:
|
|
8690
|
+
fontSize: D < 52 ? "8px" : "9px",
|
|
8680
8691
|
fill: "var(--color-text-secondary)"
|
|
8681
8692
|
},
|
|
8682
8693
|
children: "%"
|
|
@@ -8698,23 +8709,23 @@ const Gt = {
|
|
|
8698
8709
|
return /* @__PURE__ */ r(
|
|
8699
8710
|
"div",
|
|
8700
8711
|
{
|
|
8701
|
-
ref:
|
|
8712
|
+
ref: k,
|
|
8702
8713
|
className: `
|
|
8703
8714
|
glass p-6 float-card
|
|
8704
8715
|
relative
|
|
8705
8716
|
transition-all duration-300
|
|
8706
8717
|
${A}
|
|
8707
8718
|
${R ? "flex flex-col md:flex-row gap-6" : "flex flex-col"}
|
|
8708
|
-
${
|
|
8719
|
+
${M}
|
|
8709
8720
|
`,
|
|
8710
8721
|
style: {
|
|
8711
8722
|
transform: g ? `perspective(800px) rotateX(${c.x}deg) rotateY(${c.y}deg) scale(1.02)` : "perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",
|
|
8712
8723
|
transformStyle: "preserve-3d",
|
|
8713
8724
|
transition: "transform 0.2s ease-out, box-shadow 0.4s ease"
|
|
8714
8725
|
},
|
|
8715
|
-
onMouseMove:
|
|
8716
|
-
onMouseEnter:
|
|
8717
|
-
onMouseLeave:
|
|
8726
|
+
onMouseMove: b,
|
|
8727
|
+
onMouseEnter: v,
|
|
8728
|
+
onMouseLeave: T,
|
|
8718
8729
|
children: [
|
|
8719
8730
|
/* @__PURE__ */ r(
|
|
8720
8731
|
"div",
|
|
@@ -8732,7 +8743,7 @@ const Gt = {
|
|
|
8732
8743
|
src: m,
|
|
8733
8744
|
fallbackText: t,
|
|
8734
8745
|
size: "lg",
|
|
8735
|
-
glow:
|
|
8746
|
+
glow: x !== "none" ? "primary" : void 0,
|
|
8736
8747
|
bordered: !0
|
|
8737
8748
|
}
|
|
8738
8749
|
) : /* @__PURE__ */ e(
|
|
@@ -8744,7 +8755,7 @@ const Gt = {
|
|
|
8744
8755
|
bg-[var(--color-bg-tertiary)]
|
|
8745
8756
|
text-[var(--color-primary)]
|
|
8746
8757
|
border-2 border-[var(--color-border-secondary)]
|
|
8747
|
-
${
|
|
8758
|
+
${x !== "none" ? "shadow-[var(--shadow-glow-primary)]" : ""}
|
|
8748
8759
|
`,
|
|
8749
8760
|
"aria-hidden": "true",
|
|
8750
8761
|
children: s || /* @__PURE__ */ e(Fe, { className: "h-6 w-6" })
|
|
@@ -8844,12 +8855,12 @@ const Gt = {
|
|
|
8844
8855
|
]
|
|
8845
8856
|
}
|
|
8846
8857
|
),
|
|
8847
|
-
|
|
8858
|
+
$.length > 0 && /* @__PURE__ */ e(
|
|
8848
8859
|
"div",
|
|
8849
8860
|
{
|
|
8850
8861
|
className: "flex flex-wrap gap-2 mb-4",
|
|
8851
8862
|
style: { transform: "translateZ(5px)" },
|
|
8852
|
-
children:
|
|
8863
|
+
children: $.map((i, S) => /* @__PURE__ */ e(ye, { variant: "secondary", size: "sm", outline: !0, children: i }, S))
|
|
8853
8864
|
}
|
|
8854
8865
|
),
|
|
8855
8866
|
N.length > 0 && /* @__PURE__ */ e(
|
|
@@ -8860,7 +8871,7 @@ const Gt = {
|
|
|
8860
8871
|
pt-4 border-t border-[var(--color-border-secondary)]
|
|
8861
8872
|
`,
|
|
8862
8873
|
style: { transform: "translateZ(5px)" },
|
|
8863
|
-
children: N.map((i, S) => /* @__PURE__ */ e(ne.Fragment, { children:
|
|
8874
|
+
children: N.map((i, S) => /* @__PURE__ */ e(ne.Fragment, { children: w(i) }, `${i.label}-${S}`))
|
|
8864
8875
|
}
|
|
8865
8876
|
)
|
|
8866
8877
|
]
|
|
@@ -8880,11 +8891,11 @@ const Ht = ({
|
|
|
8880
8891
|
rank: n,
|
|
8881
8892
|
requirements: L = [],
|
|
8882
8893
|
glow: p = "none",
|
|
8883
|
-
done:
|
|
8894
|
+
done: $,
|
|
8884
8895
|
onComplete: N,
|
|
8885
|
-
className:
|
|
8896
|
+
className: x = ""
|
|
8886
8897
|
}) => {
|
|
8887
|
-
const { t: o } = ke(), [
|
|
8898
|
+
const { t: o } = ke(), [M, c] = P(!1), [y, g] = P(!1), [I, k] = P(!1), [u, b] = P({ x: 0, y: 0 }), [v, T] = P(!1), C = Z(null), [A, R] = P(!1);
|
|
8888
8899
|
ne.useEffect(() => {
|
|
8889
8900
|
const B = () => R(document.documentElement.dir === "rtl");
|
|
8890
8901
|
B();
|
|
@@ -8894,14 +8905,14 @@ const Ht = ({
|
|
|
8894
8905
|
attributeFilter: ["dir"]
|
|
8895
8906
|
}), () => J.disconnect();
|
|
8896
8907
|
}, []);
|
|
8897
|
-
const
|
|
8908
|
+
const w = $ !== void 0, i = w ? $ : M, S = (B) => {
|
|
8898
8909
|
if (!C.current) return;
|
|
8899
8910
|
const J = C.current.getBoundingClientRect(), ee = B.clientX - J.left, _ = B.clientY - J.top, W = J.width / 2, O = J.height / 2, Q = (_ - O) / O * -8, re = (ee - W) / W * 8;
|
|
8900
|
-
|
|
8901
|
-
},
|
|
8902
|
-
|
|
8903
|
-
},
|
|
8904
|
-
|
|
8911
|
+
b({ x: Q, y: re });
|
|
8912
|
+
}, D = () => {
|
|
8913
|
+
T(!0);
|
|
8914
|
+
}, f = () => {
|
|
8915
|
+
T(!1), b({ x: 0, y: 0 });
|
|
8905
8916
|
}, h = () => {
|
|
8906
8917
|
if (!s) return "";
|
|
8907
8918
|
const B = /* @__PURE__ */ new Date(), J = new Date(s), ee = s.toLowerCase();
|
|
@@ -8926,8 +8937,8 @@ const Ht = ({
|
|
|
8926
8937
|
}, j = () => {
|
|
8927
8938
|
i || g(!0);
|
|
8928
8939
|
}, q = () => {
|
|
8929
|
-
g(!1),
|
|
8930
|
-
|
|
8940
|
+
g(!1), w || c(!0), N == null || N(), k(!0), setTimeout(() => {
|
|
8941
|
+
k(!1);
|
|
8931
8942
|
}, 1500);
|
|
8932
8943
|
}, G = {
|
|
8933
8944
|
primary: "glow-primary",
|
|
@@ -8981,16 +8992,16 @@ const Ht = ({
|
|
|
8981
8992
|
${G}
|
|
8982
8993
|
${i ? "opacity-80" : ""}
|
|
8983
8994
|
transition-all duration-300
|
|
8984
|
-
${
|
|
8995
|
+
${x}
|
|
8985
8996
|
`,
|
|
8986
8997
|
style: {
|
|
8987
|
-
transform:
|
|
8998
|
+
transform: v ? `perspective(800px) rotateX(${u.x}deg) rotateY(${u.y}deg) scale(1.02)` : "perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",
|
|
8988
8999
|
transformStyle: "preserve-3d",
|
|
8989
9000
|
transition: "transform 0.2s ease-out"
|
|
8990
9001
|
},
|
|
8991
9002
|
onMouseMove: S,
|
|
8992
|
-
onMouseEnter:
|
|
8993
|
-
onMouseLeave:
|
|
9003
|
+
onMouseEnter: D,
|
|
9004
|
+
onMouseLeave: f,
|
|
8994
9005
|
onClick: j,
|
|
8995
9006
|
role: "button",
|
|
8996
9007
|
tabIndex: 0,
|
|
@@ -8999,7 +9010,7 @@ const Ht = ({
|
|
|
8999
9010
|
(B.key === "Enter" || B.key === " ") && (B.preventDefault(), j());
|
|
9000
9011
|
},
|
|
9001
9012
|
children: [
|
|
9002
|
-
|
|
9013
|
+
I && /* @__PURE__ */ e("div", { className: "absolute inset-0 pointer-events-none overflow-visible z-10", children: X() }),
|
|
9003
9014
|
/* @__PURE__ */ r(
|
|
9004
9015
|
"p",
|
|
9005
9016
|
{
|
|
@@ -9146,7 +9157,7 @@ const Ht = ({
|
|
|
9146
9157
|
/* @__PURE__ */ r(
|
|
9147
9158
|
Ye,
|
|
9148
9159
|
{
|
|
9149
|
-
isOpen:
|
|
9160
|
+
isOpen: y,
|
|
9150
9161
|
onClose: () => g(!1),
|
|
9151
9162
|
title: o("common.completeMission"),
|
|
9152
9163
|
confirmText: o("common.complete"),
|
|
@@ -9244,45 +9255,45 @@ const Ft = ({
|
|
|
9244
9255
|
layout: s = "vertical",
|
|
9245
9256
|
className: n = ""
|
|
9246
9257
|
}) => {
|
|
9247
|
-
const { t: L } = ke(), [p,
|
|
9258
|
+
const { t: L } = ke(), [p, $] = P({ x: 0, y: 0 }), [N, x] = P(!1), o = Z(null), M = (v) => {
|
|
9248
9259
|
if (!o.current) return;
|
|
9249
|
-
const
|
|
9250
|
-
|
|
9260
|
+
const T = o.current.getBoundingClientRect(), C = v.clientX - T.left, A = v.clientY - T.top, R = T.width / 2, w = T.height / 2, i = (A - w) / w * -6, S = (C - R) / R * 6;
|
|
9261
|
+
$({ x: i, y: S });
|
|
9251
9262
|
}, c = () => {
|
|
9252
|
-
|
|
9253
|
-
},
|
|
9254
|
-
|
|
9255
|
-
},
|
|
9263
|
+
x(!0);
|
|
9264
|
+
}, y = () => {
|
|
9265
|
+
x(!1), $({ x: 0, y: 0 });
|
|
9266
|
+
}, I = {
|
|
9256
9267
|
primary: "glow-primary",
|
|
9257
9268
|
secondary: "glow-secondary",
|
|
9258
9269
|
accent: "glow-accent",
|
|
9259
9270
|
none: ""
|
|
9260
|
-
}[m] || "",
|
|
9261
|
-
if (
|
|
9262
|
-
const
|
|
9271
|
+
}[m] || "", k = s === "horizontal", u = (v) => {
|
|
9272
|
+
if (v === void 0 || v === 0) return null;
|
|
9273
|
+
const T = v > 0;
|
|
9263
9274
|
return /* @__PURE__ */ r(
|
|
9264
9275
|
"span",
|
|
9265
9276
|
{
|
|
9266
9277
|
className: "text-xs font-mono font-medium flex-shrink-0",
|
|
9267
|
-
style: { color:
|
|
9278
|
+
style: { color: T ? "var(--color-success)" : "var(--color-danger)" },
|
|
9268
9279
|
children: [
|
|
9269
|
-
|
|
9280
|
+
T ? "▲" : "▼",
|
|
9270
9281
|
" ",
|
|
9271
|
-
Math.abs(
|
|
9282
|
+
Math.abs(v),
|
|
9272
9283
|
"%"
|
|
9273
9284
|
]
|
|
9274
9285
|
}
|
|
9275
9286
|
);
|
|
9276
|
-
},
|
|
9277
|
-
const C =
|
|
9287
|
+
}, b = (v, T) => {
|
|
9288
|
+
const C = v.max ? v.value / v.max * 100 : v.value, A = v.max ? `${Math.round(v.value)} / ${v.max}` : `${Math.round(v.value)}`, R = v.unit || "%";
|
|
9278
9289
|
if (l === "radial") {
|
|
9279
|
-
const i =
|
|
9290
|
+
const i = k ? 56 : 64, S = v.color || "primary";
|
|
9280
9291
|
return /* @__PURE__ */ r(
|
|
9281
9292
|
"div",
|
|
9282
9293
|
{
|
|
9283
9294
|
className: "flex flex-col items-center flex-shrink-0",
|
|
9284
9295
|
style: {
|
|
9285
|
-
width:
|
|
9296
|
+
width: k ? 80 : 84
|
|
9286
9297
|
},
|
|
9287
9298
|
children: [
|
|
9288
9299
|
/* @__PURE__ */ e(
|
|
@@ -9297,15 +9308,15 @@ const Ft = ({
|
|
|
9297
9308
|
}
|
|
9298
9309
|
),
|
|
9299
9310
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 mt-1.5 max-w-full", children: [
|
|
9300
|
-
/* @__PURE__ */ e("p", { className: "text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono text-center leading-tight truncate min-w-0", children:
|
|
9301
|
-
u(
|
|
9311
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono text-center leading-tight truncate min-w-0", children: v.label }),
|
|
9312
|
+
u(v.trend)
|
|
9302
9313
|
] })
|
|
9303
9314
|
]
|
|
9304
9315
|
},
|
|
9305
|
-
|
|
9316
|
+
T
|
|
9306
9317
|
);
|
|
9307
9318
|
}
|
|
9308
|
-
const
|
|
9319
|
+
const w = v.color || "primary";
|
|
9309
9320
|
return /* @__PURE__ */ r(
|
|
9310
9321
|
"div",
|
|
9311
9322
|
{
|
|
@@ -9315,13 +9326,13 @@ const Ft = ({
|
|
|
9315
9326
|
},
|
|
9316
9327
|
children: [
|
|
9317
9328
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
9318
|
-
/* @__PURE__ */ e("span", { className: "text-xs font-mono text-[var(--color-text-secondary)] truncate", children:
|
|
9329
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-mono text-[var(--color-text-secondary)] truncate", children: v.label }),
|
|
9319
9330
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
9320
9331
|
/* @__PURE__ */ r("span", { className: "text-xs font-mono font-medium text-[var(--color-text-primary)]", children: [
|
|
9321
9332
|
A,
|
|
9322
9333
|
/* @__PURE__ */ e("span", { className: "text-[10px] text-[var(--color-text-tertiary)]", children: R })
|
|
9323
9334
|
] }),
|
|
9324
|
-
u(
|
|
9335
|
+
u(v.trend)
|
|
9325
9336
|
] })
|
|
9326
9337
|
] }),
|
|
9327
9338
|
/* @__PURE__ */ e(
|
|
@@ -9329,7 +9340,7 @@ const Ft = ({
|
|
|
9329
9340
|
{
|
|
9330
9341
|
variant: "horizontal",
|
|
9331
9342
|
value: C,
|
|
9332
|
-
color:
|
|
9343
|
+
color: w,
|
|
9333
9344
|
size: "sm",
|
|
9334
9345
|
showLabel: !1,
|
|
9335
9346
|
animated: !0
|
|
@@ -9337,7 +9348,7 @@ const Ft = ({
|
|
|
9337
9348
|
)
|
|
9338
9349
|
]
|
|
9339
9350
|
},
|
|
9340
|
-
|
|
9351
|
+
T
|
|
9341
9352
|
);
|
|
9342
9353
|
};
|
|
9343
9354
|
return /* @__PURE__ */ r(
|
|
@@ -9348,8 +9359,8 @@ const Ft = ({
|
|
|
9348
9359
|
glass p-6 float-card
|
|
9349
9360
|
relative
|
|
9350
9361
|
transition-all duration-300
|
|
9351
|
-
${
|
|
9352
|
-
${
|
|
9362
|
+
${I}
|
|
9363
|
+
${k ? "flex flex-col md:flex-row gap-6" : "flex flex-col"}
|
|
9353
9364
|
${n}
|
|
9354
9365
|
`,
|
|
9355
9366
|
style: {
|
|
@@ -9357,24 +9368,24 @@ const Ft = ({
|
|
|
9357
9368
|
transformStyle: "preserve-3d",
|
|
9358
9369
|
transition: "transform 0.2s ease-out, box-shadow 0.4s ease"
|
|
9359
9370
|
},
|
|
9360
|
-
onMouseMove:
|
|
9371
|
+
onMouseMove: M,
|
|
9361
9372
|
onMouseEnter: c,
|
|
9362
|
-
onMouseLeave:
|
|
9373
|
+
onMouseLeave: y,
|
|
9363
9374
|
children: [
|
|
9364
9375
|
a && /* @__PURE__ */ r(
|
|
9365
9376
|
"div",
|
|
9366
9377
|
{
|
|
9367
9378
|
className: `
|
|
9368
|
-
${
|
|
9379
|
+
${k ? "flex-shrink-0 md:w-48" : "w-full"}
|
|
9369
9380
|
flex items-center justify-between
|
|
9370
|
-
${
|
|
9381
|
+
${k ? "md:flex-col md:items-start md:justify-start" : "mb-4"}
|
|
9371
9382
|
`,
|
|
9372
9383
|
style: {
|
|
9373
9384
|
transform: "translateZ(20px)"
|
|
9374
9385
|
},
|
|
9375
9386
|
children: [
|
|
9376
9387
|
/* @__PURE__ */ e("p", { className: "font-mono text-xs text-[var(--color-primary)] uppercase tracking-wider", children: a }),
|
|
9377
|
-
|
|
9388
|
+
k && /* @__PURE__ */ r(
|
|
9378
9389
|
"span",
|
|
9379
9390
|
{
|
|
9380
9391
|
className: "text-[10px] text-[var(--color-text-tertiary)] font-mono md:mt-1",
|
|
@@ -9393,13 +9404,13 @@ const Ft = ({
|
|
|
9393
9404
|
"div",
|
|
9394
9405
|
{
|
|
9395
9406
|
className: `
|
|
9396
|
-
${
|
|
9397
|
-
${l === "radial" ?
|
|
9407
|
+
${k ? "flex-1 min-w-0" : "w-full"}
|
|
9408
|
+
${l === "radial" ? k ? "flex flex-wrap gap-4 justify-start" : "flex flex-wrap gap-4 justify-center" : "flex flex-col gap-4"}
|
|
9398
9409
|
`,
|
|
9399
9410
|
style: {
|
|
9400
9411
|
transform: "translateZ(10px)"
|
|
9401
9412
|
},
|
|
9402
|
-
children: t.map((
|
|
9413
|
+
children: t.map((v, T) => b(v, T))
|
|
9403
9414
|
}
|
|
9404
9415
|
)
|
|
9405
9416
|
]
|
|
@@ -9416,42 +9427,42 @@ const Yt = ({
|
|
|
9416
9427
|
levelLabel: n = "Level",
|
|
9417
9428
|
xpLabel: L = "XP",
|
|
9418
9429
|
ranks: p,
|
|
9419
|
-
className:
|
|
9430
|
+
className: $ = ""
|
|
9420
9431
|
}) => {
|
|
9421
|
-
const [N,
|
|
9432
|
+
const [N, x] = P({ x: 0, y: 0 }), [o, M] = P(!1), c = Z(null), y = (S) => {
|
|
9422
9433
|
if (!c.current) return;
|
|
9423
|
-
const
|
|
9424
|
-
|
|
9434
|
+
const D = c.current.getBoundingClientRect(), f = S.clientX - D.left, h = S.clientY - D.top, d = D.width / 2, j = D.height / 2, q = (h - j) / j * -6, V = (f - d) / d * 6;
|
|
9435
|
+
x({ x: q, y: V });
|
|
9425
9436
|
}, g = () => {
|
|
9426
|
-
|
|
9427
|
-
},
|
|
9428
|
-
|
|
9429
|
-
},
|
|
9437
|
+
M(!0);
|
|
9438
|
+
}, I = () => {
|
|
9439
|
+
M(!1), x({ x: 0, y: 0 });
|
|
9440
|
+
}, k = Math.max(0, Math.min(t, l)), u = k / l * 100, b = l - k, T = (() => {
|
|
9430
9441
|
if (!p || p.length === 0) return null;
|
|
9431
9442
|
let S = p[0];
|
|
9432
|
-
for (const
|
|
9433
|
-
|
|
9443
|
+
for (const D of p)
|
|
9444
|
+
k >= D.requiredXP && (S = D);
|
|
9434
9445
|
return S;
|
|
9435
9446
|
})(), A = (() => {
|
|
9436
9447
|
if (!p || p.length === 0) return null;
|
|
9437
9448
|
for (const S of p)
|
|
9438
|
-
if (
|
|
9449
|
+
if (k < S.requiredXP)
|
|
9439
9450
|
return S;
|
|
9440
9451
|
return null;
|
|
9441
|
-
})(), R = A ? A.requiredXP -
|
|
9452
|
+
})(), R = A ? A.requiredXP - k : null, w = (S) => S.toLocaleString(), i = () => p && A ? `${w(R || 0)} ${L} to ${A.label}` : `${w(b)} ${L} to next ${n}`;
|
|
9442
9453
|
return /* @__PURE__ */ r(
|
|
9443
9454
|
"div",
|
|
9444
9455
|
{
|
|
9445
9456
|
ref: c,
|
|
9446
|
-
className: `glass p-6 float-card ${
|
|
9457
|
+
className: `glass p-6 float-card ${$}`,
|
|
9447
9458
|
style: {
|
|
9448
9459
|
transform: o ? `perspective(800px) rotateX(${N.x}deg) rotateY(${N.y}deg) scale(1.02)` : "perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",
|
|
9449
9460
|
transformStyle: "preserve-3d",
|
|
9450
9461
|
transition: "transform 0.2s ease-out, box-shadow 0.4s ease"
|
|
9451
9462
|
},
|
|
9452
|
-
onMouseMove:
|
|
9463
|
+
onMouseMove: y,
|
|
9453
9464
|
onMouseEnter: g,
|
|
9454
|
-
onMouseLeave:
|
|
9465
|
+
onMouseLeave: I,
|
|
9455
9466
|
children: [
|
|
9456
9467
|
/* @__PURE__ */ e(
|
|
9457
9468
|
"p",
|
|
@@ -9467,22 +9478,22 @@ const Yt = ({
|
|
|
9467
9478
|
className: "flex items-center justify-between mb-2",
|
|
9468
9479
|
style: { transform: "translateZ(15px)" },
|
|
9469
9480
|
children: [
|
|
9470
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("span", { className: "font-accent text-sm text-[var(--color-text-secondary)]", children: p &&
|
|
9481
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("span", { className: "font-accent text-sm text-[var(--color-text-secondary)]", children: p && T ? /* @__PURE__ */ r(we, { children: [
|
|
9471
9482
|
n,
|
|
9472
9483
|
" ",
|
|
9473
9484
|
a,
|
|
9474
9485
|
" · ",
|
|
9475
|
-
|
|
9486
|
+
T.label
|
|
9476
9487
|
] }) : /* @__PURE__ */ r(we, { children: [
|
|
9477
9488
|
n,
|
|
9478
9489
|
" ",
|
|
9479
9490
|
a
|
|
9480
9491
|
] }) }) }),
|
|
9481
9492
|
/* @__PURE__ */ r("span", { className: "font-mono text-xs text-[var(--color-text-tertiary)]", children: [
|
|
9482
|
-
|
|
9493
|
+
w(k),
|
|
9483
9494
|
" /",
|
|
9484
9495
|
" ",
|
|
9485
|
-
|
|
9496
|
+
w(p && A ? A.requiredXP : l),
|
|
9486
9497
|
" ",
|
|
9487
9498
|
L
|
|
9488
9499
|
] })
|
|
@@ -9500,13 +9511,13 @@ const Yt = ({
|
|
|
9500
9511
|
{
|
|
9501
9512
|
className: "xp-bar-fill",
|
|
9502
9513
|
style: {
|
|
9503
|
-
width: p && A ? `${
|
|
9514
|
+
width: p && A ? `${k / A.requiredXP * 100}%` : `${u}%`
|
|
9504
9515
|
},
|
|
9505
9516
|
role: "progressbar",
|
|
9506
|
-
"aria-label": s || `${n} ${a}: ${
|
|
9517
|
+
"aria-label": s || `${n} ${a}: ${w(k)} of ${w(
|
|
9507
9518
|
p && A ? A.requiredXP : l
|
|
9508
9519
|
)} ${L}`,
|
|
9509
|
-
"aria-valuenow":
|
|
9520
|
+
"aria-valuenow": k,
|
|
9510
9521
|
"aria-valuemin": 0,
|
|
9511
9522
|
"aria-valuemax": p && A ? A.requiredXP : l
|
|
9512
9523
|
}
|
|
@@ -9540,7 +9551,7 @@ const Xt = [
|
|
|
9540
9551
|
speedRange: s = Jt,
|
|
9541
9552
|
className: n = ""
|
|
9542
9553
|
}) => {
|
|
9543
|
-
const L = Z(null), p = Z([]),
|
|
9554
|
+
const L = Z(null), p = Z([]), $ = Z(0), N = Z({
|
|
9544
9555
|
count: t,
|
|
9545
9556
|
colors: l,
|
|
9546
9557
|
opacityRange: a,
|
|
@@ -9548,60 +9559,60 @@ const Xt = [
|
|
|
9548
9559
|
speedRange: s
|
|
9549
9560
|
});
|
|
9550
9561
|
N.current = { count: t, colors: l, opacityRange: a, sizeRange: m, speedRange: s };
|
|
9551
|
-
const
|
|
9562
|
+
const x = F(() => {
|
|
9552
9563
|
const c = L.current;
|
|
9553
9564
|
c && (c.width = window.innerWidth, c.height = window.innerHeight);
|
|
9554
9565
|
}, []), o = F(() => {
|
|
9555
9566
|
if (typeof window > "u") return N.current.colors;
|
|
9556
9567
|
const c = document.documentElement;
|
|
9557
|
-
return N.current.colors.map((
|
|
9558
|
-
const g =
|
|
9568
|
+
return N.current.colors.map((y) => {
|
|
9569
|
+
const g = y.trim();
|
|
9559
9570
|
if (g.startsWith("var(")) {
|
|
9560
|
-
const
|
|
9561
|
-
return getComputedStyle(c).getPropertyValue(
|
|
9571
|
+
const I = g.slice(4, -1).trim();
|
|
9572
|
+
return getComputedStyle(c).getPropertyValue(I).trim() || "#ffffff";
|
|
9562
9573
|
}
|
|
9563
9574
|
return g;
|
|
9564
9575
|
});
|
|
9565
|
-
}, []),
|
|
9576
|
+
}, []), M = F(() => {
|
|
9566
9577
|
const c = L.current;
|
|
9567
9578
|
if (!c) return;
|
|
9568
|
-
const { count:
|
|
9569
|
-
for (let
|
|
9570
|
-
|
|
9579
|
+
const { count: y, opacityRange: g, sizeRange: I, speedRange: k } = N.current, u = o(), b = [];
|
|
9580
|
+
for (let v = 0; v < y; v++)
|
|
9581
|
+
b.push({
|
|
9571
9582
|
x: Math.random() * c.width,
|
|
9572
9583
|
y: Math.random() * c.height,
|
|
9573
|
-
size: Math.random() * (
|
|
9574
|
-
speedY: Math.random() * (
|
|
9584
|
+
size: Math.random() * (I[1] - I[0]) + I[0],
|
|
9585
|
+
speedY: Math.random() * (k[1] - k[0]) + k[0],
|
|
9575
9586
|
speedX: (Math.random() - 0.5) * 0.2,
|
|
9576
9587
|
opacity: Math.random() * (g[1] - g[0]) + g[0],
|
|
9577
9588
|
color: u[Math.floor(Math.random() * u.length)]
|
|
9578
9589
|
});
|
|
9579
|
-
p.current =
|
|
9590
|
+
p.current = b;
|
|
9580
9591
|
}, [o]);
|
|
9581
9592
|
return Y(() => {
|
|
9582
9593
|
const c = L.current;
|
|
9583
9594
|
if (!c) return;
|
|
9584
|
-
const
|
|
9585
|
-
if (!
|
|
9586
|
-
|
|
9587
|
-
const g = () =>
|
|
9588
|
-
|
|
9595
|
+
const y = c.getContext("2d");
|
|
9596
|
+
if (!y) return;
|
|
9597
|
+
x(), M();
|
|
9598
|
+
const g = () => M(), I = new MutationObserver(g);
|
|
9599
|
+
I.observe(document.documentElement, {
|
|
9589
9600
|
attributes: !0,
|
|
9590
9601
|
attributeFilter: ["data-theme"]
|
|
9591
9602
|
});
|
|
9592
|
-
const
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
}),
|
|
9603
|
+
const k = () => {
|
|
9604
|
+
y.clearRect(0, 0, c.width, c.height), p.current.forEach((b) => {
|
|
9605
|
+
b.y += b.speedY, b.x += b.speedX, b.y > c.height + 10 && (b.y = -10, b.x = Math.random() * c.width), b.x < -10 && (b.x = c.width + 10), b.x > c.width + 10 && (b.x = -10), y.beginPath(), y.arc(b.x, b.y, b.size, 0, Math.PI * 2), y.fillStyle = b.color, y.globalAlpha = b.opacity, y.fill(), y.globalAlpha = 1;
|
|
9606
|
+
}), $.current = requestAnimationFrame(k);
|
|
9596
9607
|
};
|
|
9597
|
-
|
|
9608
|
+
k();
|
|
9598
9609
|
const u = () => {
|
|
9599
|
-
|
|
9610
|
+
x(), M();
|
|
9600
9611
|
};
|
|
9601
9612
|
return window.addEventListener("resize", u), () => {
|
|
9602
|
-
cancelAnimationFrame(
|
|
9613
|
+
cancelAnimationFrame($.current), window.removeEventListener("resize", u), I.disconnect();
|
|
9603
9614
|
};
|
|
9604
|
-
}, [t,
|
|
9615
|
+
}, [t, x, M]), /* @__PURE__ */ e(
|
|
9605
9616
|
"canvas",
|
|
9606
9617
|
{
|
|
9607
9618
|
ref: L,
|
|
@@ -9715,28 +9726,28 @@ const tr = ({
|
|
|
9715
9726
|
threshold: n = 0.15,
|
|
9716
9727
|
once: L = !0,
|
|
9717
9728
|
rootMargin: p = "0px 0px -10% 0px",
|
|
9718
|
-
className:
|
|
9729
|
+
className: $ = ""
|
|
9719
9730
|
}) => {
|
|
9720
|
-
const N = Z(null), [
|
|
9731
|
+
const N = Z(null), [x, o] = P(!1), [M, c] = P(!1), y = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
9721
9732
|
Y(() => {
|
|
9722
9733
|
const u = N.current;
|
|
9723
9734
|
if (!u) return;
|
|
9724
|
-
if (
|
|
9735
|
+
if (y) {
|
|
9725
9736
|
o(!0), c(!0);
|
|
9726
9737
|
return;
|
|
9727
9738
|
}
|
|
9728
|
-
const
|
|
9729
|
-
(
|
|
9730
|
-
|
|
9731
|
-
|
|
9739
|
+
const b = new IntersectionObserver(
|
|
9740
|
+
(v) => {
|
|
9741
|
+
v.forEach((T) => {
|
|
9742
|
+
T.isIntersecting ? (o(!0), c(!0), L && b.unobserve(T.target)) : L || o(!1);
|
|
9732
9743
|
});
|
|
9733
9744
|
},
|
|
9734
9745
|
{ threshold: n, rootMargin: p }
|
|
9735
9746
|
);
|
|
9736
|
-
return
|
|
9737
|
-
}, [n, p, L,
|
|
9747
|
+
return b.observe(u), () => b.disconnect();
|
|
9748
|
+
}, [n, p, L, y]);
|
|
9738
9749
|
const g = () => {
|
|
9739
|
-
if (
|
|
9750
|
+
if (y) return "none";
|
|
9740
9751
|
switch (l) {
|
|
9741
9752
|
case "fade":
|
|
9742
9753
|
return "none";
|
|
@@ -9761,20 +9772,20 @@ const tr = ({
|
|
|
9761
9772
|
default:
|
|
9762
9773
|
return `translateY(${s}px)`;
|
|
9763
9774
|
}
|
|
9764
|
-
},
|
|
9765
|
-
opacity:
|
|
9766
|
-
transform:
|
|
9775
|
+
}, I = x || M, k = y ? {} : {
|
|
9776
|
+
opacity: I ? 1 : 0,
|
|
9777
|
+
transform: I ? "none" : g(),
|
|
9767
9778
|
transition: `opacity ${m}ms cubic-bezier(0.4, 0, 0.2, 1) ${a}ms, transform ${m}ms cubic-bezier(0.4, 0, 0.2, 1) ${a}ms`,
|
|
9768
|
-
willChange:
|
|
9779
|
+
willChange: I ? "auto" : "opacity, transform"
|
|
9769
9780
|
};
|
|
9770
9781
|
return /* @__PURE__ */ e(
|
|
9771
9782
|
"div",
|
|
9772
9783
|
{
|
|
9773
9784
|
ref: N,
|
|
9774
|
-
className:
|
|
9775
|
-
style:
|
|
9785
|
+
className: $,
|
|
9786
|
+
style: k,
|
|
9776
9787
|
"data-scroll-reveal": l,
|
|
9777
|
-
"data-scroll-reveal-visible":
|
|
9788
|
+
"data-scroll-reveal-visible": I ? "true" : "false",
|
|
9778
9789
|
children: t
|
|
9779
9790
|
}
|
|
9780
9791
|
);
|
|
@@ -9793,15 +9804,15 @@ function dr(t = {}) {
|
|
|
9793
9804
|
L(!0);
|
|
9794
9805
|
return;
|
|
9795
9806
|
}
|
|
9796
|
-
const
|
|
9807
|
+
const $ = new IntersectionObserver(
|
|
9797
9808
|
(N) => {
|
|
9798
|
-
N.forEach((
|
|
9799
|
-
|
|
9809
|
+
N.forEach((x) => {
|
|
9810
|
+
x.isIntersecting ? (L(!0), a && $.unobserve(x.target)) : a || L(!1);
|
|
9800
9811
|
});
|
|
9801
9812
|
},
|
|
9802
9813
|
{ threshold: l, rootMargin: m }
|
|
9803
9814
|
);
|
|
9804
|
-
return
|
|
9815
|
+
return $.observe(p), () => $.disconnect();
|
|
9805
9816
|
}, [l, a, m]), { ref: s, isVisible: n };
|
|
9806
9817
|
}
|
|
9807
9818
|
const Ke = ({
|
|
@@ -9813,48 +9824,48 @@ const Ke = ({
|
|
|
9813
9824
|
progress: n,
|
|
9814
9825
|
showProgress: L = !1,
|
|
9815
9826
|
size: p = "md",
|
|
9816
|
-
blur:
|
|
9827
|
+
blur: $ = !0,
|
|
9817
9828
|
showBrand: N = !1,
|
|
9818
|
-
minDuration:
|
|
9829
|
+
minDuration: x = 0,
|
|
9819
9830
|
inline: o = !1,
|
|
9820
|
-
className:
|
|
9831
|
+
className: M = ""
|
|
9821
9832
|
}) => {
|
|
9822
|
-
const [c,
|
|
9833
|
+
const [c, y] = P(t), [g, I] = P(!1), [k] = P(Date.now()), u = m || `var(--color-${a})`;
|
|
9823
9834
|
if (Y(() => {
|
|
9824
9835
|
if (o) {
|
|
9825
|
-
|
|
9836
|
+
y(t), I(t);
|
|
9826
9837
|
return;
|
|
9827
9838
|
}
|
|
9828
|
-
let
|
|
9839
|
+
let f;
|
|
9829
9840
|
if (t)
|
|
9830
|
-
|
|
9841
|
+
y(!0), f = setTimeout(() => I(!0), 20);
|
|
9831
9842
|
else {
|
|
9832
|
-
const h = Date.now() -
|
|
9833
|
-
|
|
9834
|
-
|
|
9843
|
+
const h = Date.now() - k, d = Math.max(0, x - h);
|
|
9844
|
+
f = setTimeout(() => {
|
|
9845
|
+
I(!1), setTimeout(() => y(!1), 300);
|
|
9835
9846
|
}, d);
|
|
9836
9847
|
}
|
|
9837
|
-
return () => clearTimeout(
|
|
9838
|
-
}, [t,
|
|
9848
|
+
return () => clearTimeout(f);
|
|
9849
|
+
}, [t, x, k, o]), Y(() => {
|
|
9839
9850
|
if (!o)
|
|
9840
9851
|
return c ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
9841
9852
|
document.body.style.overflow = "";
|
|
9842
9853
|
};
|
|
9843
9854
|
}, [c, o]), !c) return null;
|
|
9844
|
-
const
|
|
9855
|
+
const v = {
|
|
9845
9856
|
sm: { box: 32, stroke: 3, dots: 6, bars: 20 },
|
|
9846
9857
|
md: { box: 48, stroke: 4, dots: 8, bars: 28 },
|
|
9847
9858
|
lg: { box: 64, stroke: 5, dots: 10, bars: 36 }
|
|
9848
|
-
}[p],
|
|
9859
|
+
}[p], T = `drop-shadow(0 0 6px ${u}) drop-shadow(0 0 12px color-mix(in srgb, ${u} 45%, transparent))`, C = `drop-shadow(0 0 5px ${u}) drop-shadow(0 0 10px color-mix(in srgb, ${u} 40%, transparent))`, D = {
|
|
9849
9860
|
spinner: /* @__PURE__ */ e(() => /* @__PURE__ */ r(
|
|
9850
9861
|
"svg",
|
|
9851
9862
|
{
|
|
9852
9863
|
className: "animate-spin",
|
|
9853
|
-
width:
|
|
9854
|
-
height:
|
|
9864
|
+
width: v.box,
|
|
9865
|
+
height: v.box,
|
|
9855
9866
|
viewBox: "0 0 50 50",
|
|
9856
9867
|
"aria-hidden": "true",
|
|
9857
|
-
style: { filter:
|
|
9868
|
+
style: { filter: T, overflow: "visible" },
|
|
9858
9869
|
children: [
|
|
9859
9870
|
/* @__PURE__ */ e(
|
|
9860
9871
|
"circle",
|
|
@@ -9864,7 +9875,7 @@ const Ke = ({
|
|
|
9864
9875
|
r: "20",
|
|
9865
9876
|
fill: "none",
|
|
9866
9877
|
stroke: "var(--color-border-primary)",
|
|
9867
|
-
strokeWidth:
|
|
9878
|
+
strokeWidth: v.stroke
|
|
9868
9879
|
}
|
|
9869
9880
|
),
|
|
9870
9881
|
/* @__PURE__ */ e(
|
|
@@ -9875,7 +9886,7 @@ const Ke = ({
|
|
|
9875
9886
|
r: "20",
|
|
9876
9887
|
fill: "none",
|
|
9877
9888
|
stroke: u,
|
|
9878
|
-
strokeWidth:
|
|
9889
|
+
strokeWidth: v.stroke,
|
|
9879
9890
|
strokeLinecap: "round",
|
|
9880
9891
|
strokeDasharray: "90 150"
|
|
9881
9892
|
}
|
|
@@ -9887,8 +9898,8 @@ const Ke = ({
|
|
|
9887
9898
|
"svg",
|
|
9888
9899
|
{
|
|
9889
9900
|
className: "animate-spin",
|
|
9890
|
-
width:
|
|
9891
|
-
height:
|
|
9901
|
+
width: v.box,
|
|
9902
|
+
height: v.box,
|
|
9892
9903
|
viewBox: "0 0 50 50",
|
|
9893
9904
|
"aria-hidden": "true",
|
|
9894
9905
|
style: {
|
|
@@ -9896,7 +9907,7 @@ const Ke = ({
|
|
|
9896
9907
|
filter: C,
|
|
9897
9908
|
overflow: "visible"
|
|
9898
9909
|
},
|
|
9899
|
-
children: Array.from({ length: 12 }).map((
|
|
9910
|
+
children: Array.from({ length: 12 }).map((f, h) => {
|
|
9900
9911
|
const d = h / 12 * 360;
|
|
9901
9912
|
return /* @__PURE__ */ e(
|
|
9902
9913
|
"rect",
|
|
@@ -9915,24 +9926,24 @@ const Ke = ({
|
|
|
9915
9926
|
})
|
|
9916
9927
|
}
|
|
9917
9928
|
), {}),
|
|
9918
|
-
dots: /* @__PURE__ */ e(() => /* @__PURE__ */ e("div", { className: "flex items-center gap-2", style: { filter: C }, children: [0, 1, 2].map((
|
|
9929
|
+
dots: /* @__PURE__ */ e(() => /* @__PURE__ */ e("div", { className: "flex items-center gap-2", style: { filter: C }, children: [0, 1, 2].map((f) => /* @__PURE__ */ e(
|
|
9919
9930
|
"span",
|
|
9920
9931
|
{
|
|
9921
9932
|
className: "rounded-full",
|
|
9922
9933
|
style: {
|
|
9923
|
-
width:
|
|
9924
|
-
height:
|
|
9934
|
+
width: v.dots,
|
|
9935
|
+
height: v.dots,
|
|
9925
9936
|
backgroundColor: u,
|
|
9926
|
-
animation: `pageLoaderDot 1.2s ease-in-out ${
|
|
9937
|
+
animation: `pageLoaderDot 1.2s ease-in-out ${f * 0.15}s infinite`
|
|
9927
9938
|
}
|
|
9928
9939
|
},
|
|
9929
|
-
|
|
9940
|
+
f
|
|
9930
9941
|
)) }), {}),
|
|
9931
9942
|
pulse: /* @__PURE__ */ e(() => /* @__PURE__ */ r(
|
|
9932
9943
|
"div",
|
|
9933
9944
|
{
|
|
9934
9945
|
className: "relative",
|
|
9935
|
-
style: { width:
|
|
9946
|
+
style: { width: v.box, height: v.box, filter: C },
|
|
9936
9947
|
children: [
|
|
9937
9948
|
/* @__PURE__ */ e(
|
|
9938
9949
|
"span",
|
|
@@ -9961,8 +9972,8 @@ const Ke = ({
|
|
|
9961
9972
|
style: {
|
|
9962
9973
|
top: "50%",
|
|
9963
9974
|
left: "50%",
|
|
9964
|
-
width:
|
|
9965
|
-
height:
|
|
9975
|
+
width: v.dots * 1.5,
|
|
9976
|
+
height: v.dots * 1.5,
|
|
9966
9977
|
backgroundColor: u,
|
|
9967
9978
|
transform: "translate(-50%, -50%)"
|
|
9968
9979
|
}
|
|
@@ -9975,8 +9986,8 @@ const Ke = ({
|
|
|
9975
9986
|
"div",
|
|
9976
9987
|
{
|
|
9977
9988
|
className: "flex items-end gap-1.5",
|
|
9978
|
-
style: { height:
|
|
9979
|
-
children: [0, 1, 2, 3, 4].map((
|
|
9989
|
+
style: { height: v.bars, filter: C },
|
|
9990
|
+
children: [0, 1, 2, 3, 4].map((f) => /* @__PURE__ */ e(
|
|
9980
9991
|
"span",
|
|
9981
9992
|
{
|
|
9982
9993
|
className: "rounded-full",
|
|
@@ -9984,21 +9995,21 @@ const Ke = ({
|
|
|
9984
9995
|
width: 3,
|
|
9985
9996
|
height: "100%",
|
|
9986
9997
|
backgroundColor: u,
|
|
9987
|
-
animation: `pageLoaderBar 1s ease-in-out ${
|
|
9998
|
+
animation: `pageLoaderBar 1s ease-in-out ${f * 0.1}s infinite`,
|
|
9988
9999
|
transformOrigin: "bottom"
|
|
9989
10000
|
}
|
|
9990
10001
|
},
|
|
9991
|
-
|
|
10002
|
+
f
|
|
9992
10003
|
))
|
|
9993
10004
|
}
|
|
9994
10005
|
), {})
|
|
9995
10006
|
};
|
|
9996
10007
|
if (o) {
|
|
9997
|
-
const
|
|
10008
|
+
const f = v.box + 24;
|
|
9998
10009
|
return /* @__PURE__ */ r(
|
|
9999
10010
|
"div",
|
|
10000
10011
|
{
|
|
10001
|
-
className: `flex flex-col items-center justify-center gap-3 ${
|
|
10012
|
+
className: `flex flex-col items-center justify-center gap-3 ${M}`,
|
|
10002
10013
|
role: "status",
|
|
10003
10014
|
"aria-live": "polite",
|
|
10004
10015
|
"aria-busy": t,
|
|
@@ -10020,7 +10031,7 @@ const Ke = ({
|
|
|
10020
10031
|
"div",
|
|
10021
10032
|
{
|
|
10022
10033
|
className: "relative flex items-center justify-center",
|
|
10023
|
-
style: { width:
|
|
10034
|
+
style: { width: f, height: f },
|
|
10024
10035
|
children: /* @__PURE__ */ e(
|
|
10025
10036
|
"div",
|
|
10026
10037
|
{
|
|
@@ -10030,7 +10041,7 @@ const Ke = ({
|
|
|
10030
10041
|
transition: "opacity 220ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
10031
10042
|
pointerEvents: t ? "auto" : "none"
|
|
10032
10043
|
},
|
|
10033
|
-
children:
|
|
10044
|
+
children: D[l]
|
|
10034
10045
|
}
|
|
10035
10046
|
)
|
|
10036
10047
|
}
|
|
@@ -10048,11 +10059,11 @@ const Ke = ({
|
|
|
10048
10059
|
flex items-center justify-center
|
|
10049
10060
|
transition-opacity duration-300
|
|
10050
10061
|
${g ? "opacity-100" : "opacity-0"}
|
|
10051
|
-
${
|
|
10052
|
-
${
|
|
10062
|
+
${$ ? "backdrop-blur-[12px]" : ""}
|
|
10063
|
+
${M}
|
|
10053
10064
|
`,
|
|
10054
10065
|
style: {
|
|
10055
|
-
background:
|
|
10066
|
+
background: $ ? "color-mix(in srgb, var(--color-bg-primary) 75%, transparent)" : "var(--color-bg-primary)"
|
|
10056
10067
|
},
|
|
10057
10068
|
role: "status",
|
|
10058
10069
|
"aria-live": "polite",
|
|
@@ -10072,7 +10083,7 @@ const Ke = ({
|
|
|
10072
10083
|
children: "DARA UI"
|
|
10073
10084
|
}
|
|
10074
10085
|
),
|
|
10075
|
-
|
|
10086
|
+
D[l],
|
|
10076
10087
|
s && /* @__PURE__ */ e("p", { className: "text-sm text-[var(--color-text-secondary)] font-mono tracking-wide", children: s }),
|
|
10077
10088
|
L && n !== void 0 && /* @__PURE__ */ r("div", { className: "w-56 flex flex-col items-center gap-2", children: [
|
|
10078
10089
|
/* @__PURE__ */ e("div", { className: "w-full h-1.5 rounded-full bg-[var(--color-bg-tertiary)] overflow-hidden", children: /* @__PURE__ */ e(
|
|
@@ -10116,30 +10127,30 @@ const et = Ae(
|
|
|
10116
10127
|
), ur = ({
|
|
10117
10128
|
children: t
|
|
10118
10129
|
}) => {
|
|
10119
|
-
const [l, a] = P(!1), [m, s] = P({}), [n, L] = P(void 0), p = Z(null),
|
|
10130
|
+
const [l, a] = P(!1), [m, s] = P({}), [n, L] = P(void 0), p = Z(null), $ = F((c) => {
|
|
10120
10131
|
p.current && (clearTimeout(p.current), p.current = null), s(c || {}), L(c != null && c.showProgress ? 0 : void 0), a(!0);
|
|
10121
10132
|
}, []), N = F(() => {
|
|
10122
10133
|
a(!1);
|
|
10123
|
-
}, []),
|
|
10134
|
+
}, []), x = F((c) => {
|
|
10124
10135
|
L(Math.max(0, Math.min(100, c)));
|
|
10125
10136
|
}, []), o = F(
|
|
10126
|
-
async (c,
|
|
10127
|
-
|
|
10137
|
+
async (c, y) => {
|
|
10138
|
+
$({ minDuration: 400, ...y });
|
|
10128
10139
|
try {
|
|
10129
10140
|
return await c();
|
|
10130
10141
|
} finally {
|
|
10131
10142
|
N();
|
|
10132
10143
|
}
|
|
10133
10144
|
},
|
|
10134
|
-
[
|
|
10135
|
-
),
|
|
10136
|
-
show:
|
|
10145
|
+
[$, N]
|
|
10146
|
+
), M = {
|
|
10147
|
+
show: $,
|
|
10137
10148
|
hide: N,
|
|
10138
10149
|
isLoading: l,
|
|
10139
|
-
setProgress:
|
|
10150
|
+
setProgress: x,
|
|
10140
10151
|
wrap: o
|
|
10141
10152
|
};
|
|
10142
|
-
return /* @__PURE__ */ r(et.Provider, { value:
|
|
10153
|
+
return /* @__PURE__ */ r(et.Provider, { value: M, children: [
|
|
10143
10154
|
t,
|
|
10144
10155
|
/* @__PURE__ */ e(
|
|
10145
10156
|
Ke,
|