@viglet/viglet-design-system 2026.3.13 → 2026.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -7
- package/dist/bento/bento-entity-shell.d.ts +9 -1
- package/dist/bento/bento-entity-shell.d.ts.map +1 -1
- package/dist/bento/bento-form-hero.d.ts +1 -1
- package/dist/bento/bento-form-hero.d.ts.map +1 -1
- package/dist/bento/bento-hero.d.ts +14 -1
- package/dist/bento/bento-hero.d.ts.map +1 -1
- package/dist/bento/bento-list-page.d.ts +43 -11
- package/dist/bento/bento-list-page.d.ts.map +1 -1
- package/dist/bento/bento-nav-rail.d.ts +8 -2
- package/dist/bento/bento-nav-rail.d.ts.map +1 -1
- package/dist/bento/bento-nav.d.ts +7 -0
- package/dist/bento/bento-nav.d.ts.map +1 -1
- package/dist/bento/bento-shell.d.ts +5 -3
- package/dist/bento/bento-shell.d.ts.map +1 -1
- package/dist/bento/bento-trail.d.ts +27 -0
- package/dist/bento/bento-trail.d.ts.map +1 -0
- package/dist/bento/index.d.ts +1 -0
- package/dist/bento/index.d.ts.map +1 -1
- package/dist/bento.cjs +4 -4
- package/dist/bento.css +3 -3
- package/dist/bento.es.js +1101 -973
- package/dist/catalogue.json +102 -18
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/viglet-assistant.d.ts +11 -1
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -1
- package/dist/exports.json +7 -1
- package/dist/i18n/index.d.ts +8 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/bento.json.d.ts +6 -2
- package/dist/i18n/locales/pt/bento.json.d.ts +6 -2
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.es.js +12 -4
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +762 -718
- package/dist/lib/corner-slot.d.ts +11 -0
- package/dist/lib/corner-slot.d.ts.map +1 -1
- package/dist/{user.context-D3kmD3_y.js → user.context-DUs2lT6D.js} +201 -197
- package/dist/user.context-uYif5Mp2.cjs +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/docs/BENTO-AUTHORING.md +18 -10
- package/docs/reference/README.md +9 -1
- package/docs/reference/canvas.json +1 -1
- package/docs/reference/detail.dc.html +18 -22
- package/docs/reference/form-hero.dc.html +11 -14
- package/docs/reference/list.dc.html +74 -56
- package/docs/reference/page-anatomy.dc.html +10 -9
- package/docs/reference/panel.dc.html +8 -6
- package/docs/reference/shell.dc.html +7 -4
- package/docs/reference/split.dc.html +8 -13
- package/package.json +2 -1
- package/dist/user.context-gQvBxcwr.cjs +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as e, n as t, r as n, t as r } from "./utils-Fk5jmzzb.js";
|
|
3
|
-
import { C as i, S as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, r as ee, s as b, t as x, u as S, x as
|
|
4
|
-
import { A as
|
|
5
|
-
import { FloatingFormulasBg as
|
|
6
|
-
import { i as
|
|
7
|
-
import * as
|
|
3
|
+
import { C as i, S as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, r as ee, s as b, t as x, u as S, x as te } from "./badge-locale-Bx7m7tg2.js";
|
|
4
|
+
import { A as C, B as ne, C as w, D as T, E, F as D, G as re, H as O, I as k, J as A, K as j, L as M, M as N, N as P, O as ie, P as F, Q as ae, R as I, S as oe, T as se, U as ce, V as le, W as ue, X as de, Y as L, Z as fe, _ as pe, a as R, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, n as we, o as Te, p as Ee, q as De, s as Oe, t as ke, u as Ae, v as je, w as Me, x as Ne, y as Pe, z as Fe } from "./user.context-DUs2lT6D.js";
|
|
5
|
+
import { FloatingFormulasBg as Ie } from "./floating-formulas-bg.es.js";
|
|
6
|
+
import { i as Le, n as Re, r as ze } from "./products-Du9KB6Xl.js";
|
|
7
|
+
import * as Be from "@radix-ui/react-accordion";
|
|
8
8
|
import * as z from "react";
|
|
9
|
-
import
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import * as
|
|
12
|
-
import { Slot as
|
|
13
|
-
import { cva as
|
|
9
|
+
import Ve, { createContext as He, useCallback as Ue, useContext as We, useEffect as B, useMemo as Ge, useRef as V, useState as Ke } from "react";
|
|
10
|
+
import { Fragment as qe, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
11
|
+
import * as Je from "@radix-ui/react-avatar";
|
|
12
|
+
import { Slot as Ye } from "@radix-ui/react-slot";
|
|
13
|
+
import { cva as Xe } from "class-variance-authority";
|
|
14
14
|
import { useTranslation as W } from "react-i18next";
|
|
15
15
|
import * as G from "@radix-ui/react-dialog";
|
|
16
16
|
import { Drawer as K } from "vaul";
|
|
17
|
-
import { Controller as
|
|
18
|
-
import * as
|
|
19
|
-
import { IconAlertTriangle as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
17
|
+
import { Controller as Ze, FormProvider as Qe, useFormContext as $e, useFormState as et } from "react-hook-form";
|
|
18
|
+
import * as tt from "@radix-ui/react-label";
|
|
19
|
+
import { IconAlertTriangle as nt, IconAlertTriangleFilled as rt, IconCheck as it, IconCircleCheck as at, IconDeviceFloppy as ot, IconLoader2 as st, IconLogout as ct, IconRefresh as lt, IconTrash as ut, IconUserCircle as dt, IconX as ft } from "@tabler/icons-react";
|
|
20
|
+
import * as pt from "@radix-ui/react-switch";
|
|
21
|
+
import * as mt from "@radix-ui/react-hover-card";
|
|
22
22
|
import * as q from "@radix-ui/react-navigation-menu";
|
|
23
|
-
import { Progress as
|
|
23
|
+
import { Progress as ht } from "radix-ui";
|
|
24
24
|
import * as J from "@radix-ui/react-select";
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
27
|
-
import { ThemeProvider as
|
|
28
|
-
import { useSonner as
|
|
29
|
-
import * as
|
|
30
|
-
import * as
|
|
25
|
+
import * as gt from "@radix-ui/react-separator";
|
|
26
|
+
import * as _t from "@radix-ui/react-slider";
|
|
27
|
+
import { ThemeProvider as vt, useTheme as yt } from "next-themes";
|
|
28
|
+
import { useSonner as bt } from "sonner";
|
|
29
|
+
import * as xt from "@radix-ui/react-toggle";
|
|
30
|
+
import * as St from "@radix-ui/react-toggle-group";
|
|
31
31
|
import Y from "axios";
|
|
32
|
-
import { enUS as
|
|
33
|
-
import * as
|
|
32
|
+
import { enUS as Ct, ptBR as wt } from "date-fns/locale";
|
|
33
|
+
import * as Tt from "xlsx";
|
|
34
34
|
//#region node_modules/lucide-react/dist/esm/icons/book.mjs
|
|
35
|
-
var
|
|
35
|
+
var Et = {
|
|
36
36
|
name: "book",
|
|
37
37
|
size: 24,
|
|
38
38
|
node: [["path", {
|
|
@@ -40,8 +40,8 @@ var Tt = {
|
|
|
40
40
|
key: "k3hazp"
|
|
41
41
|
}]]
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
var
|
|
43
|
+
Et.node;
|
|
44
|
+
var Dt = i(Et), Ot = {
|
|
45
45
|
name: "chevron-down",
|
|
46
46
|
size: 24,
|
|
47
47
|
node: [["path", {
|
|
@@ -49,8 +49,8 @@ var Et = i(Tt), Dt = {
|
|
|
49
49
|
key: "qrunsl"
|
|
50
50
|
}]]
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
var
|
|
52
|
+
Ot.node;
|
|
53
|
+
var kt = i(Ot), At = {
|
|
54
54
|
name: "chevron-left",
|
|
55
55
|
size: 24,
|
|
56
56
|
node: [["path", {
|
|
@@ -58,8 +58,8 @@ var Ot = i(Dt), kt = {
|
|
|
58
58
|
key: "1wnfg3"
|
|
59
59
|
}]]
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
var
|
|
61
|
+
At.node;
|
|
62
|
+
var jt = i(At), Mt = {
|
|
63
63
|
name: "chevron-up",
|
|
64
64
|
size: 24,
|
|
65
65
|
node: [["path", {
|
|
@@ -67,8 +67,8 @@ var At = i(kt), jt = {
|
|
|
67
67
|
key: "153udz"
|
|
68
68
|
}]]
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
var
|
|
70
|
+
Mt.node;
|
|
71
|
+
var Nt = i(Mt), Pt = {
|
|
72
72
|
name: "cloud",
|
|
73
73
|
size: 24,
|
|
74
74
|
node: [["path", {
|
|
@@ -76,8 +76,8 @@ var Mt = i(jt), Nt = {
|
|
|
76
76
|
key: "p7xjir"
|
|
77
77
|
}]]
|
|
78
78
|
};
|
|
79
|
-
|
|
80
|
-
var
|
|
79
|
+
Pt.node;
|
|
80
|
+
var Ft = i(Pt), It = {
|
|
81
81
|
name: "ellipsis",
|
|
82
82
|
size: 24,
|
|
83
83
|
node: [
|
|
@@ -102,8 +102,8 @@ var Pt = i(Nt), Ft = {
|
|
|
102
102
|
],
|
|
103
103
|
aliases: ["more-horizontal"]
|
|
104
104
|
};
|
|
105
|
-
|
|
106
|
-
var
|
|
105
|
+
It.node;
|
|
106
|
+
var Lt = i(It), Rt = {
|
|
107
107
|
name: "external-link",
|
|
108
108
|
size: 24,
|
|
109
109
|
node: [
|
|
@@ -121,8 +121,8 @@ var It = i(Ft), Lt = {
|
|
|
121
121
|
}]
|
|
122
122
|
]
|
|
123
123
|
};
|
|
124
|
-
|
|
125
|
-
var
|
|
124
|
+
Rt.node;
|
|
125
|
+
var zt = i(Rt), Bt = {
|
|
126
126
|
name: "languages",
|
|
127
127
|
size: 24,
|
|
128
128
|
node: [
|
|
@@ -152,8 +152,8 @@ var Rt = i(Lt), zt = {
|
|
|
152
152
|
}]
|
|
153
153
|
]
|
|
154
154
|
};
|
|
155
|
-
|
|
156
|
-
var
|
|
155
|
+
Bt.node;
|
|
156
|
+
var Vt = i(Bt), Ht = {
|
|
157
157
|
name: "layout-grid",
|
|
158
158
|
size: 24,
|
|
159
159
|
node: [
|
|
@@ -191,8 +191,8 @@ var Bt = i(zt), Vt = {
|
|
|
191
191
|
}]
|
|
192
192
|
]
|
|
193
193
|
};
|
|
194
|
-
|
|
195
|
-
var
|
|
194
|
+
Ht.node;
|
|
195
|
+
var Ut = i(Ht), Wt = {
|
|
196
196
|
name: "menu",
|
|
197
197
|
size: 24,
|
|
198
198
|
node: [
|
|
@@ -210,8 +210,8 @@ var Ht = i(Vt), Ut = {
|
|
|
210
210
|
}]
|
|
211
211
|
]
|
|
212
212
|
};
|
|
213
|
-
|
|
214
|
-
var
|
|
213
|
+
Wt.node;
|
|
214
|
+
var Gt = i(Wt), Kt = {
|
|
215
215
|
name: "monitor",
|
|
216
216
|
size: 24,
|
|
217
217
|
node: [
|
|
@@ -239,8 +239,8 @@ var Wt = i(Ut), Gt = {
|
|
|
239
239
|
}]
|
|
240
240
|
]
|
|
241
241
|
};
|
|
242
|
-
|
|
243
|
-
var
|
|
242
|
+
Kt.node;
|
|
243
|
+
var qt = i(Kt), Jt = {
|
|
244
244
|
name: "moon",
|
|
245
245
|
size: 24,
|
|
246
246
|
node: [["path", {
|
|
@@ -248,8 +248,8 @@ var Kt = i(Gt), qt = {
|
|
|
248
248
|
key: "kfwtm"
|
|
249
249
|
}]]
|
|
250
250
|
};
|
|
251
|
-
|
|
252
|
-
var
|
|
251
|
+
Jt.node;
|
|
252
|
+
var Yt = i(Jt), Xt = {
|
|
253
253
|
name: "panel-left",
|
|
254
254
|
size: 24,
|
|
255
255
|
node: [["rect", {
|
|
@@ -265,8 +265,8 @@ var Jt = i(qt), Yt = {
|
|
|
265
265
|
}]],
|
|
266
266
|
aliases: ["sidebar"]
|
|
267
267
|
};
|
|
268
|
-
|
|
269
|
-
var
|
|
268
|
+
Xt.node;
|
|
269
|
+
var Zt = i(Xt), Qt = {
|
|
270
270
|
name: "sun",
|
|
271
271
|
size: 24,
|
|
272
272
|
node: [
|
|
@@ -310,24 +310,24 @@ var Xt = i(Yt), Zt = {
|
|
|
310
310
|
}]
|
|
311
311
|
]
|
|
312
312
|
};
|
|
313
|
-
|
|
314
|
-
var
|
|
313
|
+
Qt.node;
|
|
314
|
+
var $t = i(Qt), en = Be.Root, tn = z.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ H(Be.Item, {
|
|
315
315
|
ref: n,
|
|
316
316
|
className: r("border-b", e),
|
|
317
317
|
...t
|
|
318
318
|
}));
|
|
319
|
-
|
|
320
|
-
var
|
|
319
|
+
tn.displayName = "AccordionItem";
|
|
320
|
+
var nn = z.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ H(Be.Header, {
|
|
321
321
|
className: "flex",
|
|
322
|
-
children: /* @__PURE__ */ U(
|
|
322
|
+
children: /* @__PURE__ */ U(Be.Trigger, {
|
|
323
323
|
ref: i,
|
|
324
324
|
className: r("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", e),
|
|
325
325
|
...n,
|
|
326
|
-
children: [t, /* @__PURE__ */ H(
|
|
326
|
+
children: [t, /* @__PURE__ */ H(kt, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })]
|
|
327
327
|
})
|
|
328
328
|
}));
|
|
329
|
-
|
|
330
|
-
var
|
|
329
|
+
nn.displayName = Be.Trigger.displayName;
|
|
330
|
+
var rn = z.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ H(Be.Content, {
|
|
331
331
|
ref: i,
|
|
332
332
|
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
333
333
|
...n,
|
|
@@ -336,25 +336,25 @@ var nn = z.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ *
|
|
|
336
336
|
children: t
|
|
337
337
|
})
|
|
338
338
|
}));
|
|
339
|
-
|
|
339
|
+
rn.displayName = Be.Content.displayName;
|
|
340
340
|
//#endregion
|
|
341
341
|
//#region src/components/ui/avatar.tsx
|
|
342
|
-
function
|
|
343
|
-
return /* @__PURE__ */ H(
|
|
342
|
+
function an({ className: e, ...t }) {
|
|
343
|
+
return /* @__PURE__ */ H(Je.Root, {
|
|
344
344
|
"data-slot": "avatar",
|
|
345
345
|
className: r("relative flex size-8 shrink-0 overflow-hidden rounded-full", e),
|
|
346
346
|
...t
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
return /* @__PURE__ */ H(
|
|
349
|
+
function on({ className: e, ...t }) {
|
|
350
|
+
return /* @__PURE__ */ H(Je.Image, {
|
|
351
351
|
"data-slot": "avatar-image",
|
|
352
352
|
className: r("aspect-square size-full", e),
|
|
353
353
|
...t
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
return /* @__PURE__ */ H(
|
|
356
|
+
function sn({ className: e, ...t }) {
|
|
357
|
+
return /* @__PURE__ */ H(Je.Fallback, {
|
|
358
358
|
"data-slot": "avatar-fallback",
|
|
359
359
|
className: r("bg-muted flex size-full items-center justify-center rounded-full", e),
|
|
360
360
|
...t
|
|
@@ -362,7 +362,7 @@ function on({ className: e, ...t }) {
|
|
|
362
362
|
}
|
|
363
363
|
//#endregion
|
|
364
364
|
//#region src/components/ui/breadcrumb.tsx
|
|
365
|
-
function
|
|
365
|
+
function cn({ ...e }) {
|
|
366
366
|
let { t } = W();
|
|
367
367
|
return /* @__PURE__ */ H("nav", {
|
|
368
368
|
"aria-label": t("common.breadcrumb", { defaultValue: "Breadcrumb" }),
|
|
@@ -370,28 +370,28 @@ function sn({ ...e }) {
|
|
|
370
370
|
...e
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function ln({ className: e, ...t }) {
|
|
374
374
|
return /* @__PURE__ */ H("ol", {
|
|
375
375
|
"data-slot": "breadcrumb-list",
|
|
376
376
|
className: r("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5", e),
|
|
377
377
|
...t
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function un({ className: e, ...t }) {
|
|
381
381
|
return /* @__PURE__ */ H("li", {
|
|
382
382
|
"data-slot": "breadcrumb-item",
|
|
383
383
|
className: r("inline-flex items-center gap-1.5", e),
|
|
384
384
|
...t
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
return /* @__PURE__ */ H(e ?
|
|
387
|
+
function dn({ asChild: e, className: t, ...n }) {
|
|
388
|
+
return /* @__PURE__ */ H(e ? Ye : "a", {
|
|
389
389
|
"data-slot": "breadcrumb-link",
|
|
390
390
|
className: r("hover:text-foreground transition-colors", t),
|
|
391
391
|
...n
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function fn({ className: e, ...t }) {
|
|
395
395
|
return /* @__PURE__ */ H("span", {
|
|
396
396
|
"data-slot": "breadcrumb-page",
|
|
397
397
|
role: "link",
|
|
@@ -401,7 +401,7 @@ function dn({ className: e, ...t }) {
|
|
|
401
401
|
...t
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function pn({ children: e, className: t, ...n }) {
|
|
405
405
|
return /* @__PURE__ */ H("li", {
|
|
406
406
|
"data-slot": "breadcrumb-separator",
|
|
407
407
|
role: "presentation",
|
|
@@ -411,7 +411,7 @@ function fn({ children: e, className: t, ...n }) {
|
|
|
411
411
|
children: e ?? /* @__PURE__ */ H(fe, {})
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function mn({ className: e, ...t }) {
|
|
415
415
|
let { t: n } = W();
|
|
416
416
|
return /* @__PURE__ */ U("span", {
|
|
417
417
|
"data-slot": "breadcrumb-ellipsis",
|
|
@@ -419,7 +419,7 @@ function pn({ className: e, ...t }) {
|
|
|
419
419
|
"aria-hidden": "true",
|
|
420
420
|
className: r("flex size-9 items-center justify-center", e),
|
|
421
421
|
...t,
|
|
422
|
-
children: [/* @__PURE__ */ H(
|
|
422
|
+
children: [/* @__PURE__ */ H(Lt, { className: "size-4" }), /* @__PURE__ */ H("span", {
|
|
423
423
|
className: "sr-only",
|
|
424
424
|
children: n("common.more", { defaultValue: "More" })
|
|
425
425
|
})]
|
|
@@ -427,49 +427,49 @@ function pn({ className: e, ...t }) {
|
|
|
427
427
|
}
|
|
428
428
|
//#endregion
|
|
429
429
|
//#region src/components/ui/card.tsx
|
|
430
|
-
function
|
|
430
|
+
function hn({ className: e, ...t }) {
|
|
431
431
|
return /* @__PURE__ */ H("div", {
|
|
432
432
|
"data-slot": "card",
|
|
433
433
|
className: r("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", e),
|
|
434
434
|
...t
|
|
435
435
|
});
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function gn({ className: e, ...t }) {
|
|
438
438
|
return /* @__PURE__ */ H("div", {
|
|
439
439
|
"data-slot": "card-header",
|
|
440
440
|
className: r("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", e),
|
|
441
441
|
...t
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function _n({ className: e, ...t }) {
|
|
445
445
|
return /* @__PURE__ */ H("div", {
|
|
446
446
|
"data-slot": "card-title",
|
|
447
447
|
className: r("leading-none font-semibold", e),
|
|
448
448
|
...t
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function vn({ className: e, ...t }) {
|
|
452
452
|
return /* @__PURE__ */ H("div", {
|
|
453
453
|
"data-slot": "card-description",
|
|
454
454
|
className: r("text-muted-foreground text-sm", e),
|
|
455
455
|
...t
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function yn({ className: e, ...t }) {
|
|
459
459
|
return /* @__PURE__ */ H("div", {
|
|
460
460
|
"data-slot": "card-action",
|
|
461
461
|
className: r("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
|
|
462
462
|
...t
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function bn({ className: e, ...t }) {
|
|
466
466
|
return /* @__PURE__ */ H("div", {
|
|
467
467
|
"data-slot": "card-content",
|
|
468
468
|
className: r("px-6", e),
|
|
469
469
|
...t
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function xn({ className: e, ...t }) {
|
|
473
473
|
return /* @__PURE__ */ H("div", {
|
|
474
474
|
"data-slot": "card-footer",
|
|
475
475
|
className: r("flex items-center px-6 [.border-t]:pt-6", e),
|
|
@@ -478,41 +478,41 @@ function bn({ className: e, ...t }) {
|
|
|
478
478
|
}
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region src/components/ui/drawer.tsx
|
|
481
|
-
function
|
|
481
|
+
function Sn({ ...e }) {
|
|
482
482
|
return /* @__PURE__ */ H(K.Root, {
|
|
483
483
|
"data-slot": "drawer",
|
|
484
484
|
...e
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function Cn({ ...e }) {
|
|
488
488
|
return /* @__PURE__ */ H(K.Trigger, {
|
|
489
489
|
"data-slot": "drawer-trigger",
|
|
490
490
|
...e
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function wn({ ...e }) {
|
|
494
494
|
return /* @__PURE__ */ H(K.Portal, {
|
|
495
495
|
"data-slot": "drawer-portal",
|
|
496
496
|
...e
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function Tn({ ...e }) {
|
|
500
500
|
return /* @__PURE__ */ H(K.Close, {
|
|
501
501
|
"data-slot": "drawer-close",
|
|
502
502
|
...e
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function En({ className: e, ...t }) {
|
|
506
506
|
return /* @__PURE__ */ H(K.Overlay, {
|
|
507
507
|
"data-slot": "drawer-overlay",
|
|
508
508
|
className: r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
509
509
|
...t
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
return /* @__PURE__ */ U(
|
|
512
|
+
function Dn({ className: e, children: t, ...n }) {
|
|
513
|
+
return /* @__PURE__ */ U(wn, {
|
|
514
514
|
"data-slot": "drawer-portal",
|
|
515
|
-
children: [/* @__PURE__ */ H(
|
|
515
|
+
children: [/* @__PURE__ */ H(En, {}), /* @__PURE__ */ U(K.Content, {
|
|
516
516
|
"data-slot": "drawer-content",
|
|
517
517
|
className: r("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", e),
|
|
518
518
|
...n,
|
|
@@ -520,28 +520,28 @@ function En({ className: e, children: t, ...n }) {
|
|
|
520
520
|
})]
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function On({ className: e, ...t }) {
|
|
524
524
|
return /* @__PURE__ */ H("div", {
|
|
525
525
|
"data-slot": "drawer-header",
|
|
526
526
|
className: r("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", e),
|
|
527
527
|
...t
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function kn({ className: e, ...t }) {
|
|
531
531
|
return /* @__PURE__ */ H("div", {
|
|
532
532
|
"data-slot": "drawer-footer",
|
|
533
533
|
className: r("mt-auto flex flex-col gap-2 p-4", e),
|
|
534
534
|
...t
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function An({ className: e, ...t }) {
|
|
538
538
|
return /* @__PURE__ */ H(K.Title, {
|
|
539
539
|
"data-slot": "drawer-title",
|
|
540
540
|
className: r("text-foreground font-semibold", e),
|
|
541
541
|
...t
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function jn({ className: e, ...t }) {
|
|
545
545
|
return /* @__PURE__ */ H(K.Description, {
|
|
546
546
|
"data-slot": "drawer-description",
|
|
547
547
|
className: r("text-muted-foreground text-sm", e),
|
|
@@ -550,8 +550,8 @@ function An({ className: e, ...t }) {
|
|
|
550
550
|
}
|
|
551
551
|
//#endregion
|
|
552
552
|
//#region src/components/ui/label.tsx
|
|
553
|
-
function
|
|
554
|
-
return /* @__PURE__ */ H(
|
|
553
|
+
function Mn({ className: e, ...t }) {
|
|
554
|
+
return /* @__PURE__ */ H(tt.Root, {
|
|
555
555
|
"data-slot": "label",
|
|
556
556
|
className: r("flex items-center gap-2 text-sm leading-none font-medium text-foreground select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
557
557
|
...t
|
|
@@ -559,17 +559,17 @@ function jn({ className: e, ...t }) {
|
|
|
559
559
|
}
|
|
560
560
|
//#endregion
|
|
561
561
|
//#region src/components/ui/form.tsx
|
|
562
|
-
var
|
|
562
|
+
var Nn = Qe, Pn = z.createContext({}), Fn = ({ ...e }) => {
|
|
563
563
|
let t = !!e.rules?.required, n = z.useMemo(() => ({
|
|
564
564
|
name: e.name,
|
|
565
565
|
required: t
|
|
566
566
|
}), [e.name, t]);
|
|
567
|
-
return /* @__PURE__ */ H(
|
|
567
|
+
return /* @__PURE__ */ H(Pn.Provider, {
|
|
568
568
|
value: n,
|
|
569
|
-
children: /* @__PURE__ */ H(
|
|
569
|
+
children: /* @__PURE__ */ H(Ze, { ...e })
|
|
570
570
|
});
|
|
571
|
-
},
|
|
572
|
-
let e = z.useContext(
|
|
571
|
+
}, In = () => {
|
|
572
|
+
let e = z.useContext(Pn), t = z.useContext(Ln), { getFieldState: n } = $e(), r = et({ name: e.name }), i = n(e.name, r);
|
|
573
573
|
if (!e) throw Error("useFormField should be used within <FormField>");
|
|
574
574
|
let { id: a } = t;
|
|
575
575
|
return {
|
|
@@ -581,10 +581,10 @@ var Mn = Ze, Nn = z.createContext({}), Pn = ({ ...e }) => {
|
|
|
581
581
|
formMessageId: `${a}-form-item-message`,
|
|
582
582
|
...i
|
|
583
583
|
};
|
|
584
|
-
},
|
|
585
|
-
function
|
|
584
|
+
}, Ln = z.createContext({});
|
|
585
|
+
function Rn({ className: e, ...t }) {
|
|
586
586
|
let n = z.useId(), i = z.useMemo(() => ({ id: n }), [n]);
|
|
587
|
-
return /* @__PURE__ */ H(
|
|
587
|
+
return /* @__PURE__ */ H(Ln.Provider, {
|
|
588
588
|
value: i,
|
|
589
589
|
children: /* @__PURE__ */ H("div", {
|
|
590
590
|
"data-slot": "form-item",
|
|
@@ -593,9 +593,9 @@ function Ln({ className: e, ...t }) {
|
|
|
593
593
|
})
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
let { error: i, formItemId: a, required: o } =
|
|
598
|
-
return /* @__PURE__ */ U(
|
|
596
|
+
function zn({ className: e, children: t, ...n }) {
|
|
597
|
+
let { error: i, formItemId: a, required: o } = In();
|
|
598
|
+
return /* @__PURE__ */ U(Mn, {
|
|
599
599
|
"data-slot": "form-label",
|
|
600
600
|
"data-error": !!i,
|
|
601
601
|
className: r("data-[error=true]:text-destructive", e),
|
|
@@ -607,9 +607,9 @@ function Rn({ className: e, children: t, ...n }) {
|
|
|
607
607
|
}) : null]
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
let { error: t, formItemId: n, formDescriptionId: r, formMessageId: i } =
|
|
612
|
-
return /* @__PURE__ */ H(
|
|
610
|
+
function Bn({ ...e }) {
|
|
611
|
+
let { error: t, formItemId: n, formDescriptionId: r, formMessageId: i } = In();
|
|
612
|
+
return /* @__PURE__ */ H(Ye, {
|
|
613
613
|
"data-slot": "form-control",
|
|
614
614
|
id: n,
|
|
615
615
|
"aria-describedby": t ? `${r} ${i}` : `${r}`,
|
|
@@ -617,8 +617,8 @@ function zn({ ...e }) {
|
|
|
617
617
|
...e
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
let { formDescriptionId: n } =
|
|
620
|
+
function Vn({ className: e, ...t }) {
|
|
621
|
+
let { formDescriptionId: n } = In();
|
|
622
622
|
return /* @__PURE__ */ H("p", {
|
|
623
623
|
"data-slot": "form-description",
|
|
624
624
|
id: n,
|
|
@@ -626,8 +626,8 @@ function Bn({ className: e, ...t }) {
|
|
|
626
626
|
...t
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
let { error: n, formMessageId: i } =
|
|
629
|
+
function Hn({ className: e, ...t }) {
|
|
630
|
+
let { error: n, formMessageId: i } = In(), a = n ? String(n?.message ?? "") : t.children;
|
|
631
631
|
return a ? /* @__PURE__ */ H("p", {
|
|
632
632
|
"data-slot": "form-message",
|
|
633
633
|
id: i,
|
|
@@ -638,43 +638,43 @@ function Vn({ className: e, ...t }) {
|
|
|
638
638
|
}
|
|
639
639
|
//#endregion
|
|
640
640
|
//#region src/components/ui/form-actions.tsx
|
|
641
|
-
function
|
|
641
|
+
function Un({ children: e, className: t }) {
|
|
642
642
|
return /* @__PURE__ */ H("div", {
|
|
643
643
|
className: r("flex items-center justify-end gap-3 pt-4 border-t", t),
|
|
644
644
|
children: e
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function Wn({ onClick: e, children: t, className: n }) {
|
|
648
648
|
let { t: r } = W();
|
|
649
649
|
return /* @__PURE__ */ U(v, {
|
|
650
650
|
type: "button",
|
|
651
651
|
variant: "outline",
|
|
652
652
|
onClick: e,
|
|
653
653
|
className: n,
|
|
654
|
-
children: [/* @__PURE__ */ H(
|
|
654
|
+
children: [/* @__PURE__ */ H(ft, { className: "size-4" }), t ?? r("forms.formActions.cancel")]
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Gn({ loading: e, disabled: t, children: n, className: r }) {
|
|
658
658
|
let { t: i } = W();
|
|
659
659
|
return /* @__PURE__ */ U(v, {
|
|
660
660
|
type: "submit",
|
|
661
661
|
disabled: t || e,
|
|
662
662
|
className: r,
|
|
663
|
-
children: [e ? /* @__PURE__ */ H(
|
|
663
|
+
children: [e ? /* @__PURE__ */ H(st, { className: "size-4 animate-spin" }) : /* @__PURE__ */ H(ot, { className: "size-4" }), n ?? i("forms.formActions.saveChanges")]
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function Kn({ onClick: e, children: t, className: n }) {
|
|
667
667
|
let { t: i } = W();
|
|
668
668
|
return /* @__PURE__ */ U(v, {
|
|
669
669
|
type: "button",
|
|
670
670
|
variant: "outline",
|
|
671
671
|
onClick: e,
|
|
672
672
|
className: r("md:hidden text-destructive border-destructive/30 hover:bg-destructive/10 mr-auto", n),
|
|
673
|
-
children: [/* @__PURE__ */ H(
|
|
673
|
+
children: [/* @__PURE__ */ H(ut, { className: "size-4" }), t ?? i("forms.formActions.delete")]
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
|
|
677
|
-
var
|
|
676
|
+
Un.Cancel = Wn, Un.Submit = Gn, Un.Delete = Kn;
|
|
677
|
+
var qn = Object.assign(({ className: e, ...t }) => /* @__PURE__ */ H(Rn, { children: /* @__PURE__ */ H("div", {
|
|
678
678
|
className: r("flex w-full flex-row items-center gap-4", e),
|
|
679
679
|
...t
|
|
680
680
|
}) }), {
|
|
@@ -686,15 +686,15 @@ var Kn = Object.assign(({ className: e, ...t }) => /* @__PURE__ */ H(Ln, { child
|
|
|
686
686
|
className: r("flex w-1/2 justify-end", e),
|
|
687
687
|
...t
|
|
688
688
|
}),
|
|
689
|
-
Label: ({ className: e, ...t }) => /* @__PURE__ */ H(
|
|
689
|
+
Label: ({ className: e, ...t }) => /* @__PURE__ */ H(zn, {
|
|
690
690
|
className: r(e),
|
|
691
691
|
...t
|
|
692
692
|
}),
|
|
693
|
-
Description: ({ className: e, ...t }) => /* @__PURE__ */ H(
|
|
693
|
+
Description: ({ className: e, ...t }) => /* @__PURE__ */ H(Vn, {
|
|
694
694
|
className: r(e),
|
|
695
695
|
...t
|
|
696
696
|
})
|
|
697
|
-
}),
|
|
697
|
+
}), Jn = Xe("peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", {
|
|
698
698
|
variants: { variant: {
|
|
699
699
|
default: [
|
|
700
700
|
"data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-[var(--vg-accent-fill-from)] data-[state=checked]:to-[var(--vg-accent-fill-to)]",
|
|
@@ -729,12 +729,12 @@ var Kn = Object.assign(({ className: e, ...t }) => /* @__PURE__ */ H(Ln, { child
|
|
|
729
729
|
} },
|
|
730
730
|
defaultVariants: { variant: "default" }
|
|
731
731
|
});
|
|
732
|
-
function
|
|
733
|
-
return /* @__PURE__ */ H(
|
|
732
|
+
function Yn({ className: e, variant: t, ...n }) {
|
|
733
|
+
return /* @__PURE__ */ H(pt.Root, {
|
|
734
734
|
"data-slot": "gradient-switch",
|
|
735
|
-
className: r(
|
|
735
|
+
className: r(Jn({ variant: t }), e),
|
|
736
736
|
...n,
|
|
737
|
-
children: /* @__PURE__ */ H(
|
|
737
|
+
children: /* @__PURE__ */ H(pt.Thumb, {
|
|
738
738
|
"data-slot": "gradient-switch-thumb",
|
|
739
739
|
className: r("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-primary-foreground")
|
|
740
740
|
})
|
|
@@ -742,11 +742,11 @@ function Jn({ className: e, variant: t, ...n }) {
|
|
|
742
742
|
}
|
|
743
743
|
//#endregion
|
|
744
744
|
//#region src/components/ui/glass-card.tsx
|
|
745
|
-
var
|
|
746
|
-
function
|
|
745
|
+
var Xn = "rounded-2xl p-6 sm:p-8";
|
|
746
|
+
function Zn({ children: e, color: t, colorDark: n, className: i, style: a, ...o }) {
|
|
747
747
|
let s = {};
|
|
748
748
|
return t && (s["--glass-card-color"] = t), n ? s["--glass-card-color-dark"] = n : t && (s["--glass-card-color-dark"] = t), /* @__PURE__ */ H("div", {
|
|
749
|
-
className: r("vig-glass-card",
|
|
749
|
+
className: r("vig-glass-card", Xn, i),
|
|
750
750
|
style: {
|
|
751
751
|
...a ?? {},
|
|
752
752
|
...s
|
|
@@ -757,7 +757,7 @@ function Xn({ children: e, color: t, colorDark: n, className: i, style: a, ...o
|
|
|
757
757
|
}
|
|
758
758
|
//#endregion
|
|
759
759
|
//#region src/components/ui/pulse-ring.tsx
|
|
760
|
-
function
|
|
760
|
+
function Qn({ children: e, color: t, colorDark: n, paused: i, className: a, style: o, ...s }) {
|
|
761
761
|
let c = {};
|
|
762
762
|
return t && (c["--pulse-ring-color"] = t), n ? c["--pulse-ring-color-dark"] = n : t && (c["--pulse-ring-color-dark"] = t), /* @__PURE__ */ H("div", {
|
|
763
763
|
className: r("vig-pulse-ring", !i && "vig-pulse-ring--active", a),
|
|
@@ -771,17 +771,17 @@ function Zn({ children: e, color: t, colorDark: n, paused: i, className: a, styl
|
|
|
771
771
|
}
|
|
772
772
|
//#endregion
|
|
773
773
|
//#region src/components/ui/hover-card.tsx
|
|
774
|
-
var
|
|
774
|
+
var $n = mt.Root, er = mt.Trigger, tr = z.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...i }, a) => /* @__PURE__ */ H(mt.Content, {
|
|
775
775
|
ref: a,
|
|
776
776
|
align: t,
|
|
777
777
|
sideOffset: n,
|
|
778
778
|
className: r("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", e),
|
|
779
779
|
...i
|
|
780
780
|
}));
|
|
781
|
-
|
|
781
|
+
tr.displayName = mt.Content.displayName;
|
|
782
782
|
//#endregion
|
|
783
783
|
//#region src/components/ui/navigation-menu.tsx
|
|
784
|
-
function
|
|
784
|
+
function nr({ className: e, children: t, viewport: n = !0, ...i }) {
|
|
785
785
|
let { t: a } = W();
|
|
786
786
|
return /* @__PURE__ */ U(q.Root, {
|
|
787
787
|
"data-slot": "navigation-menu",
|
|
@@ -789,47 +789,47 @@ function tr({ className: e, children: t, viewport: n = !0, ...i }) {
|
|
|
789
789
|
"aria-label": a("common.mainNavigation", { defaultValue: "Main navigation" }),
|
|
790
790
|
className: r("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", e),
|
|
791
791
|
...i,
|
|
792
|
-
children: [t, n && /* @__PURE__ */ H(
|
|
792
|
+
children: [t, n && /* @__PURE__ */ H(cr, {})]
|
|
793
793
|
});
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function rr({ className: e, ...t }) {
|
|
796
796
|
return /* @__PURE__ */ H(q.List, {
|
|
797
797
|
"data-slot": "navigation-menu-list",
|
|
798
798
|
className: r("group flex flex-1 list-none items-center justify-center gap-1", e),
|
|
799
799
|
...t
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function ir({ className: e, ...t }) {
|
|
803
803
|
return /* @__PURE__ */ H(q.Item, {
|
|
804
804
|
"data-slot": "navigation-menu-item",
|
|
805
805
|
className: r("relative", e),
|
|
806
806
|
...t
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
|
-
var
|
|
810
|
-
function
|
|
809
|
+
var ar = Xe("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");
|
|
810
|
+
function or({ className: e, children: t, ...n }) {
|
|
811
811
|
return /* @__PURE__ */ U(q.Trigger, {
|
|
812
812
|
"data-slot": "navigation-menu-trigger",
|
|
813
|
-
className: r(
|
|
813
|
+
className: r(ar(), "group", e),
|
|
814
814
|
...n,
|
|
815
815
|
children: [
|
|
816
816
|
t,
|
|
817
817
|
" ",
|
|
818
|
-
/* @__PURE__ */ H(
|
|
818
|
+
/* @__PURE__ */ H(kt, {
|
|
819
819
|
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
820
820
|
"aria-hidden": "true"
|
|
821
821
|
})
|
|
822
822
|
]
|
|
823
823
|
});
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function sr({ className: e, ...t }) {
|
|
826
826
|
return /* @__PURE__ */ H(q.Content, {
|
|
827
827
|
"data-slot": "navigation-menu-content",
|
|
828
828
|
className: r("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none", e),
|
|
829
829
|
...t
|
|
830
830
|
});
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function cr({ className: e, ...t }) {
|
|
833
833
|
return /* @__PURE__ */ H("div", {
|
|
834
834
|
className: r("absolute top-full left-0 isolate z-50 flex justify-center"),
|
|
835
835
|
children: /* @__PURE__ */ H(q.Viewport, {
|
|
@@ -839,14 +839,14 @@ function sr({ className: e, ...t }) {
|
|
|
839
839
|
})
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function lr({ className: e, ...t }) {
|
|
843
843
|
return /* @__PURE__ */ H(q.Link, {
|
|
844
844
|
"data-slot": "navigation-menu-link",
|
|
845
845
|
className: r("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4", e),
|
|
846
846
|
...t
|
|
847
847
|
});
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function ur({ className: e, ...t }) {
|
|
850
850
|
return /* @__PURE__ */ H(q.Indicator, {
|
|
851
851
|
"data-slot": "navigation-menu-indicator",
|
|
852
852
|
className: r("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden", e),
|
|
@@ -856,7 +856,7 @@ function lr({ className: e, ...t }) {
|
|
|
856
856
|
}
|
|
857
857
|
//#endregion
|
|
858
858
|
//#region src/components/ui/pagination.tsx
|
|
859
|
-
function
|
|
859
|
+
function dr({ className: e, ...t }) {
|
|
860
860
|
let { t: n } = W();
|
|
861
861
|
return /* @__PURE__ */ H("nav", {
|
|
862
862
|
role: "navigation",
|
|
@@ -865,22 +865,22 @@ function ur({ className: e, ...t }) {
|
|
|
865
865
|
...t
|
|
866
866
|
});
|
|
867
867
|
}
|
|
868
|
-
var
|
|
868
|
+
var fr = z.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ H("ol", {
|
|
869
869
|
ref: n,
|
|
870
870
|
className: r("flex flex-row items-center gap-1", e),
|
|
871
871
|
...t
|
|
872
872
|
}));
|
|
873
|
-
|
|
874
|
-
var
|
|
873
|
+
fr.displayName = "PaginationContent";
|
|
874
|
+
var pr = z.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ H("li", {
|
|
875
875
|
ref: n,
|
|
876
876
|
className: r("", e),
|
|
877
877
|
...t
|
|
878
878
|
}));
|
|
879
|
-
|
|
880
|
-
function
|
|
879
|
+
pr.displayName = "PaginationItem";
|
|
880
|
+
function mr({ className: e, isActive: t, size: n = "icon", children: i, ...a }) {
|
|
881
881
|
return /* @__PURE__ */ H("a", {
|
|
882
882
|
"aria-current": t ? "page" : void 0,
|
|
883
|
-
className: r(
|
|
883
|
+
className: r(de({
|
|
884
884
|
variant: t ? "outline" : "ghost",
|
|
885
885
|
size: n
|
|
886
886
|
}), t && "bg-accent text-accent-foreground", e),
|
|
@@ -888,19 +888,19 @@ function pr({ className: e, isActive: t, size: n = "icon", children: i, ...a })
|
|
|
888
888
|
children: i
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function hr({ className: e, ...t }) {
|
|
892
892
|
let { t: n } = W();
|
|
893
|
-
return /* @__PURE__ */ U(
|
|
893
|
+
return /* @__PURE__ */ U(mr, {
|
|
894
894
|
"aria-label": n("common.goToPreviousPage", { defaultValue: "Go to previous page" }),
|
|
895
895
|
size: "default",
|
|
896
896
|
className: r("gap-1 pl-2.5", e),
|
|
897
897
|
...t,
|
|
898
|
-
children: [/* @__PURE__ */ H(
|
|
898
|
+
children: [/* @__PURE__ */ H(jt, { className: "h-4 w-4" }), /* @__PURE__ */ H("span", { children: n("common.previous", { defaultValue: "Previous" }) })]
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function gr({ className: e, ...t }) {
|
|
902
902
|
let { t: n } = W();
|
|
903
|
-
return /* @__PURE__ */ U(
|
|
903
|
+
return /* @__PURE__ */ U(mr, {
|
|
904
904
|
"aria-label": n("common.goToNextPage", { defaultValue: "Go to next page" }),
|
|
905
905
|
size: "default",
|
|
906
906
|
className: r("gap-1 pr-2.5", e),
|
|
@@ -908,13 +908,13 @@ function hr({ className: e, ...t }) {
|
|
|
908
908
|
children: [/* @__PURE__ */ H("span", { children: n("common.next", { defaultValue: "Next" }) }), /* @__PURE__ */ H(fe, { className: "h-4 w-4" })]
|
|
909
909
|
});
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function _r({ className: e, ...t }) {
|
|
912
912
|
let { t: n } = W();
|
|
913
913
|
return /* @__PURE__ */ U("span", {
|
|
914
914
|
"aria-hidden": "true",
|
|
915
915
|
className: r("flex h-9 w-9 items-center justify-center", e),
|
|
916
916
|
...t,
|
|
917
|
-
children: [/* @__PURE__ */ H(
|
|
917
|
+
children: [/* @__PURE__ */ H(Lt, { className: "h-4 w-4" }), /* @__PURE__ */ H("span", {
|
|
918
918
|
className: "sr-only",
|
|
919
919
|
children: n("common.morePages", { defaultValue: "More pages" })
|
|
920
920
|
})]
|
|
@@ -922,12 +922,12 @@ function gr({ className: e, ...t }) {
|
|
|
922
922
|
}
|
|
923
923
|
//#endregion
|
|
924
924
|
//#region src/components/ui/progress.tsx
|
|
925
|
-
function
|
|
926
|
-
return /* @__PURE__ */ H(
|
|
925
|
+
function vr({ className: e, value: t, ...n }) {
|
|
926
|
+
return /* @__PURE__ */ H(ht.Root, {
|
|
927
927
|
"data-slot": "progress",
|
|
928
928
|
className: r("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", e),
|
|
929
929
|
...n,
|
|
930
|
-
children: /* @__PURE__ */ H(
|
|
930
|
+
children: /* @__PURE__ */ H(ht.Indicator, {
|
|
931
931
|
"data-slot": "progress-indicator",
|
|
932
932
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
933
933
|
style: { transform: `translateX(-${100 - (t || 0)}%)` }
|
|
@@ -936,25 +936,25 @@ function _r({ className: e, value: t, ...n }) {
|
|
|
936
936
|
}
|
|
937
937
|
//#endregion
|
|
938
938
|
//#region src/components/ui/select.tsx
|
|
939
|
-
function
|
|
939
|
+
function yr({ ...e }) {
|
|
940
940
|
return /* @__PURE__ */ H(J.Root, {
|
|
941
941
|
"data-slot": "select",
|
|
942
942
|
...e
|
|
943
943
|
});
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function br({ ...e }) {
|
|
946
946
|
return /* @__PURE__ */ H(J.Group, {
|
|
947
947
|
"data-slot": "select-group",
|
|
948
948
|
...e
|
|
949
949
|
});
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function xr({ ...e }) {
|
|
952
952
|
return /* @__PURE__ */ H(J.Value, {
|
|
953
953
|
"data-slot": "select-value",
|
|
954
954
|
...e
|
|
955
955
|
});
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Sr({ className: e, size: t = "default", children: n, ...i }) {
|
|
958
958
|
return /* @__PURE__ */ U(J.Trigger, {
|
|
959
959
|
"data-slot": "select-trigger",
|
|
960
960
|
"data-size": t,
|
|
@@ -962,11 +962,11 @@ function xr({ className: e, size: t = "default", children: n, ...i }) {
|
|
|
962
962
|
...i,
|
|
963
963
|
children: [n, /* @__PURE__ */ H(J.Icon, {
|
|
964
964
|
asChild: !0,
|
|
965
|
-
children: /* @__PURE__ */ H(
|
|
965
|
+
children: /* @__PURE__ */ H(kt, { className: "size-4 opacity-50" })
|
|
966
966
|
})]
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function Cr({ className: e, children: t, position: n = "popper", align: i = "center", ...a }) {
|
|
970
970
|
return /* @__PURE__ */ H(J.Portal, { children: /* @__PURE__ */ U(J.Content, {
|
|
971
971
|
"data-slot": "select-content",
|
|
972
972
|
className: r("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", e),
|
|
@@ -974,60 +974,60 @@ function Sr({ className: e, children: t, position: n = "popper", align: i = "cen
|
|
|
974
974
|
align: i,
|
|
975
975
|
...a,
|
|
976
976
|
children: [
|
|
977
|
-
/* @__PURE__ */ H(
|
|
977
|
+
/* @__PURE__ */ H(Dr, {}),
|
|
978
978
|
/* @__PURE__ */ H(J.Viewport, {
|
|
979
979
|
className: r("p-1", n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
980
980
|
children: t
|
|
981
981
|
}),
|
|
982
|
-
/* @__PURE__ */ H(
|
|
982
|
+
/* @__PURE__ */ H(Or, {})
|
|
983
983
|
]
|
|
984
984
|
}) });
|
|
985
985
|
}
|
|
986
|
-
function
|
|
986
|
+
function wr({ className: e, ...t }) {
|
|
987
987
|
return /* @__PURE__ */ H(J.Label, {
|
|
988
988
|
"data-slot": "select-label",
|
|
989
989
|
className: r("text-muted-foreground px-2 py-1.5 text-xs", e),
|
|
990
990
|
...t
|
|
991
991
|
});
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Tr({ className: e, children: t, ...n }) {
|
|
994
994
|
return /* @__PURE__ */ U(J.Item, {
|
|
995
995
|
"data-slot": "select-item",
|
|
996
996
|
className: r("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", e),
|
|
997
997
|
...n,
|
|
998
998
|
children: [/* @__PURE__ */ H("span", {
|
|
999
999
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1000
|
-
children: /* @__PURE__ */ H(J.ItemIndicator, { children: /* @__PURE__ */ H(
|
|
1000
|
+
children: /* @__PURE__ */ H(J.ItemIndicator, { children: /* @__PURE__ */ H(ae, { className: "size-4" }) })
|
|
1001
1001
|
}), /* @__PURE__ */ H(J.ItemText, { children: t })]
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Er({ className: e, ...t }) {
|
|
1005
1005
|
return /* @__PURE__ */ H(J.Separator, {
|
|
1006
1006
|
"data-slot": "select-separator",
|
|
1007
1007
|
className: r("bg-border pointer-events-none -mx-1 my-1 h-px", e),
|
|
1008
1008
|
...t
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function Dr({ className: e, ...t }) {
|
|
1012
1012
|
return /* @__PURE__ */ H(J.ScrollUpButton, {
|
|
1013
1013
|
"data-slot": "select-scroll-up-button",
|
|
1014
1014
|
className: r("flex cursor-default items-center justify-center py-1", e),
|
|
1015
1015
|
...t,
|
|
1016
|
-
children: /* @__PURE__ */ H(
|
|
1016
|
+
children: /* @__PURE__ */ H(Nt, { className: "size-4" })
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function Or({ className: e, ...t }) {
|
|
1020
1020
|
return /* @__PURE__ */ H(J.ScrollDownButton, {
|
|
1021
1021
|
"data-slot": "select-scroll-down-button",
|
|
1022
1022
|
className: r("flex cursor-default items-center justify-center py-1", e),
|
|
1023
1023
|
...t,
|
|
1024
|
-
children: /* @__PURE__ */ H(
|
|
1024
|
+
children: /* @__PURE__ */ H(kt, { className: "size-4" })
|
|
1025
1025
|
});
|
|
1026
1026
|
}
|
|
1027
1027
|
//#endregion
|
|
1028
1028
|
//#region src/components/ui/separator.tsx
|
|
1029
|
-
function
|
|
1030
|
-
return /* @__PURE__ */ H(
|
|
1029
|
+
function kr({ className: e, orientation: t = "horizontal", decorative: n = !0, ...i }) {
|
|
1030
|
+
return /* @__PURE__ */ H(gt.Root, {
|
|
1031
1031
|
"data-slot": "separator",
|
|
1032
1032
|
decorative: n,
|
|
1033
1033
|
orientation: t,
|
|
@@ -1037,40 +1037,40 @@ function Or({ className: e, orientation: t = "horizontal", decorative: n = !0, .
|
|
|
1037
1037
|
}
|
|
1038
1038
|
//#endregion
|
|
1039
1039
|
//#region src/components/ui/sheet.tsx
|
|
1040
|
-
function
|
|
1040
|
+
function Ar({ ...e }) {
|
|
1041
1041
|
return /* @__PURE__ */ H(G.Root, {
|
|
1042
1042
|
"data-slot": "sheet",
|
|
1043
1043
|
...e
|
|
1044
1044
|
});
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1046
|
+
function jr({ ...e }) {
|
|
1047
1047
|
return /* @__PURE__ */ H(G.Trigger, {
|
|
1048
1048
|
"data-slot": "sheet-trigger",
|
|
1049
1049
|
...e
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function Mr({ ...e }) {
|
|
1053
1053
|
return /* @__PURE__ */ H(G.Close, {
|
|
1054
1054
|
"data-slot": "sheet-close",
|
|
1055
1055
|
...e
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1058
|
+
function Nr({ ...e }) {
|
|
1059
1059
|
return /* @__PURE__ */ H(G.Portal, {
|
|
1060
1060
|
"data-slot": "sheet-portal",
|
|
1061
1061
|
...e
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Pr({ className: e, ...t }) {
|
|
1065
1065
|
return /* @__PURE__ */ H(G.Overlay, {
|
|
1066
1066
|
"data-slot": "sheet-overlay",
|
|
1067
1067
|
className: r("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
1068
1068
|
...t
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function Fr({ className: e, children: t, side: n = "right", ...i }) {
|
|
1072
1072
|
let { t: o } = W();
|
|
1073
|
-
return /* @__PURE__ */ U(
|
|
1073
|
+
return /* @__PURE__ */ U(Nr, { children: [/* @__PURE__ */ H(Pr, {}), /* @__PURE__ */ U(G.Content, {
|
|
1074
1074
|
"data-slot": "sheet-content",
|
|
1075
1075
|
className: r("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", n === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", n === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", n === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", n === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", e),
|
|
1076
1076
|
...i,
|
|
@@ -1083,28 +1083,28 @@ function Pr({ className: e, children: t, side: n = "right", ...i }) {
|
|
|
1083
1083
|
})]
|
|
1084
1084
|
})] });
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function Ir({ className: e, ...t }) {
|
|
1087
1087
|
return /* @__PURE__ */ H("div", {
|
|
1088
1088
|
"data-slot": "sheet-header",
|
|
1089
1089
|
className: r("flex flex-col gap-1.5 p-4", e),
|
|
1090
1090
|
...t
|
|
1091
1091
|
});
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function Lr({ className: e, ...t }) {
|
|
1094
1094
|
return /* @__PURE__ */ H("div", {
|
|
1095
1095
|
"data-slot": "sheet-footer",
|
|
1096
1096
|
className: r("mt-auto flex flex-col gap-2 p-4", e),
|
|
1097
1097
|
...t
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Rr({ className: e, ...t }) {
|
|
1101
1101
|
return /* @__PURE__ */ H(G.Title, {
|
|
1102
1102
|
"data-slot": "sheet-title",
|
|
1103
1103
|
className: r("text-foreground font-semibold", e),
|
|
1104
1104
|
...t
|
|
1105
1105
|
});
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function zr({ className: e, ...t }) {
|
|
1108
1108
|
return /* @__PURE__ */ H(G.Description, {
|
|
1109
1109
|
"data-slot": "sheet-description",
|
|
1110
1110
|
className: r("text-muted-foreground text-sm", e),
|
|
@@ -1113,19 +1113,19 @@ function Rr({ className: e, ...t }) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/components/ui/sidebar.tsx
|
|
1116
|
-
var
|
|
1117
|
-
function
|
|
1118
|
-
let e = z.useContext(
|
|
1116
|
+
var Br = "sidebar_state", Vr = 604800, Hr = "16rem", Ur = "18rem", Wr = "3rem", Gr = "b", Kr = z.createContext(null);
|
|
1117
|
+
function qr() {
|
|
1118
|
+
let e = z.useContext(Kr);
|
|
1119
1119
|
if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
1120
1120
|
return e;
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1123
|
-
return z.useContext(
|
|
1122
|
+
function Jr() {
|
|
1123
|
+
return z.useContext(Kr);
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1126
|
-
let c =
|
|
1125
|
+
function Yr({ defaultOpen: e = !0, open: t, onOpenChange: n, className: i, style: a, children: o, ...s }) {
|
|
1126
|
+
let c = ye(), [l, u] = z.useState(!1), [d, f] = z.useState(e), p = t ?? d, m = z.useCallback((e) => {
|
|
1127
1127
|
let t = typeof e == "function" ? e(p) : e;
|
|
1128
|
-
n ? n(t) : f(t), document.cookie = `${
|
|
1128
|
+
n ? n(t) : f(t), document.cookie = `${Br}=${t}; path=/; max-age=${Vr}`;
|
|
1129
1129
|
}, [n, p]), h = z.useCallback(() => c ? u((e) => !e) : m((e) => !e), [
|
|
1130
1130
|
c,
|
|
1131
1131
|
m,
|
|
@@ -1133,7 +1133,7 @@ function Jr({ defaultOpen: e = !0, open: t, onOpenChange: n, className: i, style
|
|
|
1133
1133
|
]);
|
|
1134
1134
|
z.useEffect(() => {
|
|
1135
1135
|
let e = (e) => {
|
|
1136
|
-
e.key ===
|
|
1136
|
+
e.key === Gr && (e.metaKey || e.ctrlKey) && (e.preventDefault(), h());
|
|
1137
1137
|
};
|
|
1138
1138
|
return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
|
|
1139
1139
|
}, [h]);
|
|
@@ -1154,15 +1154,15 @@ function Jr({ defaultOpen: e = !0, open: t, onOpenChange: n, className: i, style
|
|
|
1154
1154
|
u,
|
|
1155
1155
|
h
|
|
1156
1156
|
]);
|
|
1157
|
-
return /* @__PURE__ */ H(
|
|
1157
|
+
return /* @__PURE__ */ H(Kr.Provider, {
|
|
1158
1158
|
value: _,
|
|
1159
|
-
children: /* @__PURE__ */ H(
|
|
1159
|
+
children: /* @__PURE__ */ H(je, {
|
|
1160
1160
|
delayDuration: 0,
|
|
1161
1161
|
children: /* @__PURE__ */ H("div", {
|
|
1162
1162
|
"data-slot": "sidebar-wrapper",
|
|
1163
1163
|
style: {
|
|
1164
|
-
"--sidebar-width":
|
|
1165
|
-
"--sidebar-width-icon":
|
|
1164
|
+
"--sidebar-width": Hr,
|
|
1165
|
+
"--sidebar-width-icon": Wr,
|
|
1166
1166
|
...a
|
|
1167
1167
|
},
|
|
1168
1168
|
className: r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", i),
|
|
@@ -1172,8 +1172,8 @@ function Jr({ defaultOpen: e = !0, open: t, onOpenChange: n, className: i, style
|
|
|
1172
1172
|
})
|
|
1173
1173
|
});
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
let { isMobile: c, state: l, openMobile: u, setOpenMobile: d } =
|
|
1175
|
+
function Xr({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcanvas", position: i = "fixed", className: a, children: o, ...s }) {
|
|
1176
|
+
let { isMobile: c, state: l, openMobile: u, setOpenMobile: d } = qr(), { t: f } = W();
|
|
1177
1177
|
if (n === "none") return /* @__PURE__ */ H("div", {
|
|
1178
1178
|
"data-slot": "sidebar",
|
|
1179
1179
|
className: r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", a),
|
|
@@ -1182,10 +1182,10 @@ function Yr({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcan
|
|
|
1182
1182
|
});
|
|
1183
1183
|
if (c) {
|
|
1184
1184
|
let { style: t, ...n } = s;
|
|
1185
|
-
return /* @__PURE__ */ H(
|
|
1185
|
+
return /* @__PURE__ */ H(Ar, {
|
|
1186
1186
|
open: u,
|
|
1187
1187
|
onOpenChange: d,
|
|
1188
|
-
children: /* @__PURE__ */ U(
|
|
1188
|
+
children: /* @__PURE__ */ U(Fr, {
|
|
1189
1189
|
"data-sidebar": "sidebar",
|
|
1190
1190
|
"data-slot": "sidebar",
|
|
1191
1191
|
"data-mobile": "true",
|
|
@@ -1193,12 +1193,12 @@ function Yr({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcan
|
|
|
1193
1193
|
...n,
|
|
1194
1194
|
className: r("bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", a),
|
|
1195
1195
|
style: {
|
|
1196
|
-
"--sidebar-width":
|
|
1196
|
+
"--sidebar-width": Ur,
|
|
1197
1197
|
...t
|
|
1198
1198
|
},
|
|
1199
|
-
children: [/* @__PURE__ */ U(
|
|
1199
|
+
children: [/* @__PURE__ */ U(Ir, {
|
|
1200
1200
|
className: "sr-only",
|
|
1201
|
-
children: [/* @__PURE__ */ H(
|
|
1201
|
+
children: [/* @__PURE__ */ H(Rr, { children: f("sidebar.title", { defaultValue: "Sidebar" }) }), /* @__PURE__ */ H(zr, { children: f("sidebar.description", { defaultValue: "Displays the mobile sidebar." }) })]
|
|
1202
1202
|
}), /* @__PURE__ */ H("div", {
|
|
1203
1203
|
className: "flex h-full w-full flex-col",
|
|
1204
1204
|
children: o
|
|
@@ -1229,8 +1229,8 @@ function Yr({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcan
|
|
|
1229
1229
|
})]
|
|
1230
1230
|
});
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1233
|
-
let i =
|
|
1232
|
+
function Zr({ className: e, onClick: t, ...n }) {
|
|
1233
|
+
let i = Jr(), { t: a } = W();
|
|
1234
1234
|
if (!i) return null;
|
|
1235
1235
|
let { toggleSidebar: o, isMobile: s } = i;
|
|
1236
1236
|
return /* @__PURE__ */ U(v, {
|
|
@@ -1243,14 +1243,14 @@ function Xr({ className: e, onClick: t, ...n }) {
|
|
|
1243
1243
|
t?.(e), o();
|
|
1244
1244
|
},
|
|
1245
1245
|
...n,
|
|
1246
|
-
children: [H(s ?
|
|
1246
|
+
children: [H(s ? Gt : Zt, {}), /* @__PURE__ */ H("span", {
|
|
1247
1247
|
className: "sr-only",
|
|
1248
1248
|
children: a("sidebar.toggle", { defaultValue: "Toggle Sidebar" })
|
|
1249
1249
|
})]
|
|
1250
1250
|
});
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1253
|
-
let { toggleSidebar: n } =
|
|
1252
|
+
function Qr({ className: e, ...t }) {
|
|
1253
|
+
let { toggleSidebar: n } = qr(), { t: i } = W(), a = i("sidebar.toggle", { defaultValue: "Toggle Sidebar" });
|
|
1254
1254
|
return /* @__PURE__ */ H("button", {
|
|
1255
1255
|
"data-sidebar": "rail",
|
|
1256
1256
|
"data-slot": "sidebar-rail",
|
|
@@ -1262,14 +1262,14 @@ function Zr({ className: e, ...t }) {
|
|
|
1262
1262
|
...t
|
|
1263
1263
|
});
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function $r({ className: e, ...t }) {
|
|
1266
1266
|
return /* @__PURE__ */ H("main", {
|
|
1267
1267
|
"data-slot": "sidebar-inset",
|
|
1268
1268
|
className: r("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", e),
|
|
1269
1269
|
...t
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function ei({ className: e, ...t }) {
|
|
1273
1273
|
return /* @__PURE__ */ H(s, {
|
|
1274
1274
|
"data-slot": "sidebar-input",
|
|
1275
1275
|
"data-sidebar": "input",
|
|
@@ -1277,7 +1277,7 @@ function $r({ className: e, ...t }) {
|
|
|
1277
1277
|
...t
|
|
1278
1278
|
});
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function ti({ className: e, ...t }) {
|
|
1281
1281
|
return /* @__PURE__ */ H("div", {
|
|
1282
1282
|
"data-slot": "sidebar-header",
|
|
1283
1283
|
"data-sidebar": "header",
|
|
@@ -1285,7 +1285,7 @@ function ei({ className: e, ...t }) {
|
|
|
1285
1285
|
...t
|
|
1286
1286
|
});
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function ni({ className: e, ...t }) {
|
|
1289
1289
|
return /* @__PURE__ */ H("div", {
|
|
1290
1290
|
"data-slot": "sidebar-footer",
|
|
1291
1291
|
"data-sidebar": "footer",
|
|
@@ -1293,15 +1293,15 @@ function ti({ className: e, ...t }) {
|
|
|
1293
1293
|
...t
|
|
1294
1294
|
});
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
return /* @__PURE__ */ H(
|
|
1296
|
+
function ri({ className: e, ...t }) {
|
|
1297
|
+
return /* @__PURE__ */ H(kr, {
|
|
1298
1298
|
"data-slot": "sidebar-separator",
|
|
1299
1299
|
"data-sidebar": "separator",
|
|
1300
1300
|
className: r("bg-sidebar-border mx-2 w-auto", e),
|
|
1301
1301
|
...t
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function ii({ className: e, ...t }) {
|
|
1305
1305
|
return /* @__PURE__ */ H("div", {
|
|
1306
1306
|
"data-slot": "sidebar-content",
|
|
1307
1307
|
"data-sidebar": "content",
|
|
@@ -1309,7 +1309,7 @@ function ri({ className: e, ...t }) {
|
|
|
1309
1309
|
...t
|
|
1310
1310
|
});
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function ai({ className: e, ...t }) {
|
|
1313
1313
|
return /* @__PURE__ */ H("div", {
|
|
1314
1314
|
"data-slot": "sidebar-group",
|
|
1315
1315
|
"data-sidebar": "group",
|
|
@@ -1317,23 +1317,23 @@ function ii({ className: e, ...t }) {
|
|
|
1317
1317
|
...t
|
|
1318
1318
|
});
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
return /* @__PURE__ */ H(t ?
|
|
1320
|
+
function oi({ className: e, asChild: t = !1, ...n }) {
|
|
1321
|
+
return /* @__PURE__ */ H(t ? Ye : "div", {
|
|
1322
1322
|
"data-slot": "sidebar-group-label",
|
|
1323
1323
|
"data-sidebar": "group-label",
|
|
1324
1324
|
className: r("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", e),
|
|
1325
1325
|
...n
|
|
1326
1326
|
});
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
return /* @__PURE__ */ H(t ?
|
|
1328
|
+
function si({ className: e, asChild: t = !1, ...n }) {
|
|
1329
|
+
return /* @__PURE__ */ H(t ? Ye : "button", {
|
|
1330
1330
|
"data-slot": "sidebar-group-action",
|
|
1331
1331
|
"data-sidebar": "group-action",
|
|
1332
1332
|
className: r("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", e),
|
|
1333
1333
|
...n
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function ci({ className: e, ...t }) {
|
|
1337
1337
|
return /* @__PURE__ */ H("div", {
|
|
1338
1338
|
"data-slot": "sidebar-group-content",
|
|
1339
1339
|
"data-sidebar": "group-content",
|
|
@@ -1341,7 +1341,7 @@ function si({ className: e, ...t }) {
|
|
|
1341
1341
|
...t
|
|
1342
1342
|
});
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function li({ className: e, ...t }) {
|
|
1345
1345
|
return /* @__PURE__ */ H("ul", {
|
|
1346
1346
|
"data-slot": "sidebar-menu",
|
|
1347
1347
|
"data-sidebar": "menu",
|
|
@@ -1349,7 +1349,7 @@ function ci({ className: e, ...t }) {
|
|
|
1349
1349
|
...t
|
|
1350
1350
|
});
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1352
|
+
function ui({ className: e, ...t }) {
|
|
1353
1353
|
return /* @__PURE__ */ H("li", {
|
|
1354
1354
|
"data-slot": "sidebar-menu-item",
|
|
1355
1355
|
"data-sidebar": "menu-item",
|
|
@@ -1357,7 +1357,7 @@ function li({ className: e, ...t }) {
|
|
|
1357
1357
|
...t
|
|
1358
1358
|
});
|
|
1359
1359
|
}
|
|
1360
|
-
var
|
|
1360
|
+
var di = Xe("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
|
|
1361
1361
|
variants: {
|
|
1362
1362
|
variant: {
|
|
1363
1363
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
@@ -1374,37 +1374,37 @@ var ui = Ye("peer/menu-button flex w-full items-center gap-2 overflow-hidden rou
|
|
|
1374
1374
|
size: "default"
|
|
1375
1375
|
}
|
|
1376
1376
|
});
|
|
1377
|
-
function
|
|
1378
|
-
let c = e ?
|
|
1377
|
+
function fi({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: i = "default", tooltip: a, className: o, ...s }) {
|
|
1378
|
+
let c = e ? Ye : "button", { isMobile: l, state: u } = qr(), d = /* @__PURE__ */ H(c, {
|
|
1379
1379
|
"data-slot": "sidebar-menu-button",
|
|
1380
1380
|
"data-sidebar": "menu-button",
|
|
1381
1381
|
"data-size": i,
|
|
1382
1382
|
"data-active": t,
|
|
1383
|
-
className: r(
|
|
1383
|
+
className: r(di({
|
|
1384
1384
|
variant: n,
|
|
1385
1385
|
size: i
|
|
1386
1386
|
}), o),
|
|
1387
1387
|
...s
|
|
1388
1388
|
});
|
|
1389
|
-
return a ? (typeof a == "string" && (a = { children: a }), /* @__PURE__ */ U(
|
|
1389
|
+
return a ? (typeof a == "string" && (a = { children: a }), /* @__PURE__ */ U(ve, { children: [/* @__PURE__ */ H(Pe, {
|
|
1390
1390
|
asChild: !0,
|
|
1391
1391
|
children: d
|
|
1392
|
-
}), /* @__PURE__ */ H(
|
|
1392
|
+
}), /* @__PURE__ */ H(pe, {
|
|
1393
1393
|
side: "right",
|
|
1394
1394
|
align: "center",
|
|
1395
1395
|
hidden: u !== "collapsed" || l,
|
|
1396
1396
|
...a
|
|
1397
1397
|
})] })) : d;
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1400
|
-
return /* @__PURE__ */ H(t ?
|
|
1399
|
+
function pi({ className: e, asChild: t = !1, showOnHover: n = !1, ...i }) {
|
|
1400
|
+
return /* @__PURE__ */ H(t ? Ye : "button", {
|
|
1401
1401
|
"data-slot": "sidebar-menu-action",
|
|
1402
1402
|
"data-sidebar": "menu-action",
|
|
1403
1403
|
className: r("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", n && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", e),
|
|
1404
1404
|
...i
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function mi({ className: e, ...t }) {
|
|
1408
1408
|
return /* @__PURE__ */ H("div", {
|
|
1409
1409
|
"data-slot": "sidebar-menu-badge",
|
|
1410
1410
|
"data-sidebar": "menu-badge",
|
|
@@ -1412,13 +1412,13 @@ function pi({ className: e, ...t }) {
|
|
|
1412
1412
|
...t
|
|
1413
1413
|
});
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function hi(e) {
|
|
1416
1416
|
let t = 0;
|
|
1417
1417
|
for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
|
|
1418
1418
|
return Math.abs(t);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1421
|
-
let i = `${50 +
|
|
1420
|
+
function gi({ className: e, showIcon: t = !1, ...n }) {
|
|
1421
|
+
let i = `${50 + hi(z.useId()) % 40}%`;
|
|
1422
1422
|
return /* @__PURE__ */ U("div", {
|
|
1423
1423
|
"data-slot": "sidebar-menu-skeleton",
|
|
1424
1424
|
"data-sidebar": "menu-skeleton",
|
|
@@ -1434,7 +1434,7 @@ function hi({ className: e, showIcon: t = !1, ...n }) {
|
|
|
1434
1434
|
})]
|
|
1435
1435
|
});
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1437
|
+
function _i({ className: e, ...t }) {
|
|
1438
1438
|
return /* @__PURE__ */ H("ul", {
|
|
1439
1439
|
"data-slot": "sidebar-menu-sub",
|
|
1440
1440
|
"data-sidebar": "menu-sub",
|
|
@@ -1442,7 +1442,7 @@ function gi({ className: e, ...t }) {
|
|
|
1442
1442
|
...t
|
|
1443
1443
|
});
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function vi({ className: e, ...t }) {
|
|
1446
1446
|
return /* @__PURE__ */ H("li", {
|
|
1447
1447
|
"data-slot": "sidebar-menu-sub-item",
|
|
1448
1448
|
"data-sidebar": "menu-sub-item",
|
|
@@ -1450,8 +1450,8 @@ function _i({ className: e, ...t }) {
|
|
|
1450
1450
|
...t
|
|
1451
1451
|
});
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1454
|
-
return /* @__PURE__ */ H(e ?
|
|
1453
|
+
function yi({ asChild: e = !1, size: t = "md", isActive: n = !1, className: i, ...a }) {
|
|
1454
|
+
return /* @__PURE__ */ H(e ? Ye : "a", {
|
|
1455
1455
|
"data-slot": "sidebar-menu-sub-button",
|
|
1456
1456
|
"data-sidebar": "menu-sub-button",
|
|
1457
1457
|
"data-size": t,
|
|
@@ -1462,16 +1462,16 @@ function vi({ asChild: e = !1, size: t = "md", isActive: n = !1, className: i, .
|
|
|
1462
1462
|
}
|
|
1463
1463
|
//#endregion
|
|
1464
1464
|
//#region src/components/ui/sticky-save-bar.tsx
|
|
1465
|
-
var
|
|
1465
|
+
var bi = {
|
|
1466
1466
|
gray: "bg-gray-50 dark:bg-gray-950/30",
|
|
1467
1467
|
blue: "bg-blue-50 dark:bg-blue-950/30",
|
|
1468
1468
|
orange: "bg-orange-50 dark:bg-orange-950/30",
|
|
1469
1469
|
green: "bg-green-50 dark:bg-green-950/30"
|
|
1470
1470
|
};
|
|
1471
|
-
function
|
|
1471
|
+
function xi({ title: e, badges: t, actions: n, onCancel: r, loading: i, disabled: a, variant: o = "gray" }) {
|
|
1472
1472
|
let { t: s } = W();
|
|
1473
1473
|
return /* @__PURE__ */ U("div", {
|
|
1474
|
-
className: `sticky top-0 z-10 border rounded-lg px-4 py-3 flex items-center justify-between gap-4 ${
|
|
1474
|
+
className: `sticky top-0 z-10 border rounded-lg px-4 py-3 flex items-center justify-between gap-4 ${bi[o]}`,
|
|
1475
1475
|
children: [/* @__PURE__ */ U("div", {
|
|
1476
1476
|
className: "flex items-center gap-3 min-w-0",
|
|
1477
1477
|
children: [/* @__PURE__ */ H("h3", {
|
|
@@ -1483,40 +1483,40 @@ function bi({ title: e, badges: t, actions: n, onCancel: r, loading: i, disabled
|
|
|
1483
1483
|
})]
|
|
1484
1484
|
}), /* @__PURE__ */ H("div", {
|
|
1485
1485
|
className: "flex gap-2 shrink-0",
|
|
1486
|
-
children: n ?? /* @__PURE__ */ U(
|
|
1486
|
+
children: n ?? /* @__PURE__ */ U(qe, { children: [/* @__PURE__ */ U(v, {
|
|
1487
1487
|
type: "submit",
|
|
1488
1488
|
size: "sm",
|
|
1489
1489
|
loading: i,
|
|
1490
1490
|
disabled: a,
|
|
1491
|
-
children: [/* @__PURE__ */ H(
|
|
1491
|
+
children: [/* @__PURE__ */ H(ot, { className: "size-4" }), s("forms.formActions.saveChanges")]
|
|
1492
1492
|
}), r && /* @__PURE__ */ U(v, {
|
|
1493
1493
|
type: "button",
|
|
1494
1494
|
variant: "outline",
|
|
1495
1495
|
size: "sm",
|
|
1496
1496
|
onClick: r,
|
|
1497
|
-
children: [/* @__PURE__ */ H(
|
|
1497
|
+
children: [/* @__PURE__ */ H(ft, { className: "size-4" }), s("forms.formActions.cancel")]
|
|
1498
1498
|
})] })
|
|
1499
1499
|
})]
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function Si({ children: e }) {
|
|
1503
1503
|
return /* @__PURE__ */ H(c, {
|
|
1504
1504
|
variant: "outline",
|
|
1505
1505
|
className: "text-xs",
|
|
1506
1506
|
children: e
|
|
1507
1507
|
});
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
xi.Badge = Si;
|
|
1510
1510
|
//#endregion
|
|
1511
1511
|
//#region src/components/ui/slider.tsx
|
|
1512
|
-
function
|
|
1512
|
+
function Ci({ className: e, defaultValue: t, value: n, min: i = 0, max: a = 100, "aria-label": o, "aria-labelledby": s, ...c }) {
|
|
1513
1513
|
let l = z.useMemo(() => Array.isArray(n) ? n : Array.isArray(t) ? t : [i, a], [
|
|
1514
1514
|
n,
|
|
1515
1515
|
t,
|
|
1516
1516
|
i,
|
|
1517
1517
|
a
|
|
1518
1518
|
]);
|
|
1519
|
-
return /* @__PURE__ */ U(
|
|
1519
|
+
return /* @__PURE__ */ U(_t.Root, {
|
|
1520
1520
|
"data-slot": "slider",
|
|
1521
1521
|
defaultValue: t,
|
|
1522
1522
|
value: n,
|
|
@@ -1524,14 +1524,14 @@ function Si({ className: e, defaultValue: t, value: n, min: i = 0, max: a = 100,
|
|
|
1524
1524
|
max: a,
|
|
1525
1525
|
className: r("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", e),
|
|
1526
1526
|
...c,
|
|
1527
|
-
children: [/* @__PURE__ */ H(
|
|
1527
|
+
children: [/* @__PURE__ */ H(_t.Track, {
|
|
1528
1528
|
"data-slot": "slider-track",
|
|
1529
1529
|
className: r("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
1530
|
-
children: /* @__PURE__ */ H(
|
|
1530
|
+
children: /* @__PURE__ */ H(_t.Range, {
|
|
1531
1531
|
"data-slot": "slider-range",
|
|
1532
1532
|
className: r("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
1533
1533
|
})
|
|
1534
|
-
}), Array.from({ length: l.length }, (e, t) => /* @__PURE__ */ H(
|
|
1534
|
+
}), Array.from({ length: l.length }, (e, t) => /* @__PURE__ */ H(_t.Thumb, {
|
|
1535
1535
|
"data-slot": "slider-thumb",
|
|
1536
1536
|
"aria-label": o && l.length > 1 ? `${o} ${t + 1}` : o,
|
|
1537
1537
|
"aria-labelledby": s,
|
|
@@ -1541,43 +1541,43 @@ function Si({ className: e, defaultValue: t, value: n, min: i = 0, max: a = 100,
|
|
|
1541
1541
|
}
|
|
1542
1542
|
//#endregion
|
|
1543
1543
|
//#region src/components/ui/tree.tsx
|
|
1544
|
-
var
|
|
1545
|
-
function
|
|
1546
|
-
return e === "" ? t : `${e}${
|
|
1544
|
+
var wi = "/";
|
|
1545
|
+
function Ti(e, t) {
|
|
1546
|
+
return e === "" ? t : `${e}${wi}${t}`;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function Ei(e) {
|
|
1549
1549
|
return e.children !== void 0 && e.children.length > 0;
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1552
|
-
if (!n || !
|
|
1551
|
+
function Di(e, t, n) {
|
|
1552
|
+
if (!n || !Ei(e)) return {
|
|
1553
1553
|
node: e,
|
|
1554
1554
|
ids: t
|
|
1555
1555
|
};
|
|
1556
1556
|
let r = e.children?.length === 1 ? e.children[0] : void 0;
|
|
1557
|
-
return r === void 0 || !
|
|
1557
|
+
return r === void 0 || !Ei(r) ? {
|
|
1558
1558
|
node: e,
|
|
1559
1559
|
ids: t
|
|
1560
|
-
} :
|
|
1560
|
+
} : Di(r, [...t, r.id], n);
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Oi(e, t, n, r = "", i = 1) {
|
|
1563
1563
|
let a = [];
|
|
1564
1564
|
for (let o of e) {
|
|
1565
|
-
let e =
|
|
1565
|
+
let e = Di(o, [o.id], n), s = e.ids.reduce((e, t) => Ti(e, t), r), c = Ei(e.node);
|
|
1566
1566
|
a.push({
|
|
1567
1567
|
key: s,
|
|
1568
1568
|
node: e.node,
|
|
1569
1569
|
ids: e.ids,
|
|
1570
1570
|
level: i,
|
|
1571
1571
|
hasChildren: c
|
|
1572
|
-
}), c && t.has(s) && a.push(...
|
|
1572
|
+
}), c && t.has(s) && a.push(...Oi(e.node.children ?? [], t, n, s, i + 1));
|
|
1573
1573
|
}
|
|
1574
1574
|
return a;
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1577
|
-
return e.ids.length > 1 ? e.ids.join(
|
|
1576
|
+
function ki(e) {
|
|
1577
|
+
return e.ids.length > 1 ? e.ids.join(wi) : e.node.label;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1580
|
-
let [f, p] = z.useState(i ?? []), m = z.useMemo(() => new Set(n ?? f), [n, f]), h = z.useMemo(() =>
|
|
1579
|
+
function Ai({ nodes: e, label: t, expanded: n, defaultExpanded: i, onExpandedChange: a, selected: o, onSelect: s, renderAfter: c, compact: l = !0, className: u, ...d }) {
|
|
1580
|
+
let [f, p] = z.useState(i ?? []), m = z.useMemo(() => new Set(n ?? f), [n, f]), h = z.useMemo(() => Oi(e, m, l), [
|
|
1581
1581
|
e,
|
|
1582
1582
|
m,
|
|
1583
1583
|
l
|
|
@@ -1669,7 +1669,7 @@ function ki({ nodes: e, label: t, expanded: n, defaultExpanded: i, onExpandedCha
|
|
|
1669
1669
|
}),
|
|
1670
1670
|
/* @__PURE__ */ H("span", {
|
|
1671
1671
|
className: "min-w-0 truncate",
|
|
1672
|
-
children:
|
|
1672
|
+
children: ki(e)
|
|
1673
1673
|
}),
|
|
1674
1674
|
c?.(e.node, e.key)
|
|
1675
1675
|
]
|
|
@@ -1677,8 +1677,8 @@ function ki({ nodes: e, label: t, expanded: n, defaultExpanded: i, onExpandedCha
|
|
|
1677
1677
|
})
|
|
1678
1678
|
});
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1681
|
-
let n = t.separator ??
|
|
1680
|
+
function ji(e, t = {}) {
|
|
1681
|
+
let n = t.separator ?? wi, r = [], i = /* @__PURE__ */ new Map();
|
|
1682
1682
|
for (let t of e) {
|
|
1683
1683
|
let e = t.split(n).filter((e) => e !== ""), a = r, o = "";
|
|
1684
1684
|
for (let t of e) {
|
|
@@ -1695,13 +1695,13 @@ function Ai(e, t = {}) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
//#endregion
|
|
1697
1697
|
//#region src/components/ui/stepper.tsx
|
|
1698
|
-
var
|
|
1698
|
+
var Mi = He({
|
|
1699
1699
|
completedSteps: [],
|
|
1700
1700
|
allDone: !1
|
|
1701
1701
|
});
|
|
1702
|
-
function
|
|
1702
|
+
function Ni({ completedSteps: e, children: t, className: n }) {
|
|
1703
1703
|
let i = e.length > 0 && e.every(Boolean);
|
|
1704
|
-
return /* @__PURE__ */ H(
|
|
1704
|
+
return /* @__PURE__ */ H(Mi.Provider, {
|
|
1705
1705
|
value: {
|
|
1706
1706
|
completedSteps: e,
|
|
1707
1707
|
allDone: i
|
|
@@ -1712,15 +1712,15 @@ function Mi({ completedSteps: e, children: t, className: n }) {
|
|
|
1712
1712
|
})
|
|
1713
1713
|
});
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1716
|
-
let { completedSteps: i } =
|
|
1715
|
+
function Pi({ index: e, children: t, className: n }) {
|
|
1716
|
+
let { completedSteps: i } = We(Mi), a = i[e] ?? !1, o = e + 1;
|
|
1717
1717
|
return /* @__PURE__ */ U("div", {
|
|
1718
1718
|
className: r("relative flex items-start gap-4 pb-8", n),
|
|
1719
1719
|
children: [/* @__PURE__ */ H("div", {
|
|
1720
1720
|
className: "flex flex-col items-center",
|
|
1721
1721
|
children: /* @__PURE__ */ H("div", {
|
|
1722
1722
|
className: r("relative z-10 flex h-8 w-8 items-center justify-center rounded-full text-xs font-bold transition-all duration-500", a ? "bg-emerald-500 text-white shadow-md shadow-emerald-500/30 scale-105" : "bg-primary text-primary-foreground"),
|
|
1723
|
-
children: a ? /* @__PURE__ */ H(
|
|
1723
|
+
children: a ? /* @__PURE__ */ H(it, { className: "h-4 w-4" }) : o
|
|
1724
1724
|
})
|
|
1725
1725
|
}), /* @__PURE__ */ H("div", {
|
|
1726
1726
|
className: "flex-1 pt-0.5",
|
|
@@ -1728,15 +1728,15 @@ function Ni({ index: e, children: t, className: n }) {
|
|
|
1728
1728
|
})]
|
|
1729
1729
|
});
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1732
|
-
let { allDone: i } =
|
|
1731
|
+
function Fi({ readyLabel: e, pendingLabel: t, className: n }) {
|
|
1732
|
+
let { allDone: i } = We(Mi), { t: a } = W(), o = e ?? a("common.readyToSubmit"), s = t ?? a("common.completeAllSteps");
|
|
1733
1733
|
return /* @__PURE__ */ U("div", {
|
|
1734
1734
|
className: r("relative flex items-center gap-4", n),
|
|
1735
1735
|
children: [/* @__PURE__ */ H("div", {
|
|
1736
1736
|
className: "flex flex-col items-center",
|
|
1737
1737
|
children: /* @__PURE__ */ H("div", {
|
|
1738
1738
|
className: r("relative z-10 flex h-8 w-8 items-center justify-center rounded-full transition-all duration-700", i ? "stepper-ready bg-emerald-500 text-white shadow-lg shadow-emerald-500/40 scale-110" : "bg-muted text-muted-foreground/40"),
|
|
1739
|
-
children: /* @__PURE__ */ H(
|
|
1739
|
+
children: /* @__PURE__ */ H(at, { className: "h-5 w-5" })
|
|
1740
1740
|
})
|
|
1741
1741
|
}), /* @__PURE__ */ H("span", {
|
|
1742
1742
|
className: r("text-sm font-medium transition-all duration-500", i ? "text-emerald-700 dark:text-emerald-400" : "text-muted-foreground"),
|
|
@@ -1744,15 +1744,15 @@ function Pi({ readyLabel: e, pendingLabel: t, className: n }) {
|
|
|
1744
1744
|
})]
|
|
1745
1745
|
});
|
|
1746
1746
|
}
|
|
1747
|
-
|
|
1747
|
+
Ni.Step = Pi, Ni.Completion = Fi;
|
|
1748
1748
|
//#endregion
|
|
1749
1749
|
//#region src/components/ui/switch.tsx
|
|
1750
|
-
function
|
|
1751
|
-
return /* @__PURE__ */ H(
|
|
1750
|
+
function Ii({ className: e, ...t }) {
|
|
1751
|
+
return /* @__PURE__ */ H(pt.Root, {
|
|
1752
1752
|
"data-slot": "switch",
|
|
1753
1753
|
className: r("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
1754
1754
|
...t,
|
|
1755
|
-
children: /* @__PURE__ */ H(
|
|
1755
|
+
children: /* @__PURE__ */ H(pt.Thumb, {
|
|
1756
1756
|
"data-slot": "switch-thumb",
|
|
1757
1757
|
className: r("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
|
|
1758
1758
|
})
|
|
@@ -1760,7 +1760,7 @@ function Fi({ className: e, ...t }) {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
//#endregion
|
|
1762
1762
|
//#region src/components/ui/table.tsx
|
|
1763
|
-
function
|
|
1763
|
+
function Li({ className: e, ...t }) {
|
|
1764
1764
|
return /* @__PURE__ */ H("div", {
|
|
1765
1765
|
"data-slot": "table-container",
|
|
1766
1766
|
className: "relative w-full overflow-x-auto",
|
|
@@ -1771,49 +1771,49 @@ function Ii({ className: e, ...t }) {
|
|
|
1771
1771
|
})
|
|
1772
1772
|
});
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function Ri({ className: e, ...t }) {
|
|
1775
1775
|
return /* @__PURE__ */ H("thead", {
|
|
1776
1776
|
"data-slot": "table-header",
|
|
1777
1777
|
className: r("[&_tr]:border-b", e),
|
|
1778
1778
|
...t
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function zi({ className: e, ...t }) {
|
|
1782
1782
|
return /* @__PURE__ */ H("tbody", {
|
|
1783
1783
|
"data-slot": "table-body",
|
|
1784
1784
|
className: r("[&_tr:last-child]:border-0", e),
|
|
1785
1785
|
...t
|
|
1786
1786
|
});
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function Bi({ className: e, ...t }) {
|
|
1789
1789
|
return /* @__PURE__ */ H("tfoot", {
|
|
1790
1790
|
"data-slot": "table-footer",
|
|
1791
1791
|
className: r("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e),
|
|
1792
1792
|
...t
|
|
1793
1793
|
});
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function Vi({ className: e, ...t }) {
|
|
1796
1796
|
return /* @__PURE__ */ H("tr", {
|
|
1797
1797
|
"data-slot": "table-row",
|
|
1798
1798
|
className: r("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", e),
|
|
1799
1799
|
...t
|
|
1800
1800
|
});
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function Hi({ className: e, ...t }) {
|
|
1803
1803
|
return /* @__PURE__ */ H("th", {
|
|
1804
1804
|
"data-slot": "table-head",
|
|
1805
1805
|
className: r("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e),
|
|
1806
1806
|
...t
|
|
1807
1807
|
});
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1809
|
+
function Ui({ className: e, ...t }) {
|
|
1810
1810
|
return /* @__PURE__ */ H("td", {
|
|
1811
1811
|
"data-slot": "table-cell",
|
|
1812
1812
|
className: r("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e),
|
|
1813
1813
|
...t
|
|
1814
1814
|
});
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function Wi({ className: e, ...t }) {
|
|
1817
1817
|
return /* @__PURE__ */ H("caption", {
|
|
1818
1818
|
"data-slot": "table-caption",
|
|
1819
1819
|
className: r("text-muted-foreground mt-4 text-sm", e),
|
|
@@ -1822,7 +1822,7 @@ function Ui({ className: e, ...t }) {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
//#endregion
|
|
1824
1824
|
//#region src/components/ui/textarea.tsx
|
|
1825
|
-
function
|
|
1825
|
+
function Gi({ className: e, ...t }) {
|
|
1826
1826
|
return /* @__PURE__ */ H("textarea", {
|
|
1827
1827
|
"data-slot": "textarea",
|
|
1828
1828
|
className: r("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
|
|
@@ -1831,7 +1831,7 @@ function Wi({ className: e, ...t }) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
//#endregion
|
|
1833
1833
|
//#region src/components/ui/toggle.tsx
|
|
1834
|
-
var
|
|
1834
|
+
var Ki = Xe("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
1835
1835
|
variants: {
|
|
1836
1836
|
variant: {
|
|
1837
1837
|
default: "bg-transparent",
|
|
@@ -1848,10 +1848,10 @@ var Gi = Ye("inline-flex items-center justify-center gap-2 rounded-md text-sm fo
|
|
|
1848
1848
|
size: "default"
|
|
1849
1849
|
}
|
|
1850
1850
|
});
|
|
1851
|
-
function
|
|
1852
|
-
return /* @__PURE__ */ H(
|
|
1851
|
+
function qi({ className: e, variant: t, size: n, ...i }) {
|
|
1852
|
+
return /* @__PURE__ */ H(xt.Root, {
|
|
1853
1853
|
"data-slot": "toggle",
|
|
1854
|
-
className: r(
|
|
1854
|
+
className: r(Ki({
|
|
1855
1855
|
variant: t,
|
|
1856
1856
|
size: n,
|
|
1857
1857
|
className: e
|
|
@@ -1861,13 +1861,13 @@ function Ki({ className: e, variant: t, size: n, ...i }) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
//#endregion
|
|
1863
1863
|
//#region src/components/ui/toggle-group.tsx
|
|
1864
|
-
var
|
|
1864
|
+
var Ji = z.createContext({
|
|
1865
1865
|
size: "default",
|
|
1866
1866
|
variant: "default",
|
|
1867
1867
|
spacing: 0
|
|
1868
1868
|
});
|
|
1869
|
-
function
|
|
1870
|
-
return /* @__PURE__ */ H(
|
|
1869
|
+
function Yi({ className: e, variant: t, size: n, spacing: i = 0, children: a, ...o }) {
|
|
1870
|
+
return /* @__PURE__ */ H(St.Root, {
|
|
1871
1871
|
"data-slot": "toggle-group",
|
|
1872
1872
|
"data-variant": t,
|
|
1873
1873
|
"data-size": n,
|
|
@@ -1875,7 +1875,7 @@ function Ji({ className: e, variant: t, size: n, spacing: i = 0, children: a, ..
|
|
|
1875
1875
|
style: { "--gap": i },
|
|
1876
1876
|
className: r("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs", e),
|
|
1877
1877
|
...o,
|
|
1878
|
-
children: /* @__PURE__ */ H(
|
|
1878
|
+
children: /* @__PURE__ */ H(Ji.Provider, {
|
|
1879
1879
|
value: {
|
|
1880
1880
|
variant: t,
|
|
1881
1881
|
size: n,
|
|
@@ -1885,14 +1885,14 @@ function Ji({ className: e, variant: t, size: n, spacing: i = 0, children: a, ..
|
|
|
1885
1885
|
})
|
|
1886
1886
|
});
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1889
|
-
let o = z.useContext(
|
|
1890
|
-
return /* @__PURE__ */ H(
|
|
1888
|
+
function Xi({ className: e, children: t, variant: n, size: i, ...a }) {
|
|
1889
|
+
let o = z.useContext(Ji);
|
|
1890
|
+
return /* @__PURE__ */ H(St.Item, {
|
|
1891
1891
|
"data-slot": "toggle-group-item",
|
|
1892
1892
|
"data-variant": o.variant || n,
|
|
1893
1893
|
"data-size": o.size || i,
|
|
1894
1894
|
"data-spacing": o.spacing,
|
|
1895
|
-
className: r(
|
|
1895
|
+
className: r(Ki({
|
|
1896
1896
|
variant: o.variant || n,
|
|
1897
1897
|
size: o.size || i
|
|
1898
1898
|
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l", e),
|
|
@@ -1902,11 +1902,11 @@ function Yi({ className: e, children: t, variant: n, size: i, ...a }) {
|
|
|
1902
1902
|
}
|
|
1903
1903
|
//#endregion
|
|
1904
1904
|
//#region src/components/ui/viglet-avatar.tsx
|
|
1905
|
-
var
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
],
|
|
1905
|
+
var Zi = (e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4, Qi = (e) => e <= .0031308 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - .055, X = (e) => [
|
|
1906
|
+
Zi((e >> 16 & 255) / 255),
|
|
1907
|
+
Zi((e >> 8 & 255) / 255),
|
|
1908
|
+
Zi((e & 255) / 255)
|
|
1909
|
+
], $i = {
|
|
1910
1910
|
idle: {
|
|
1911
1911
|
center: X(14916170),
|
|
1912
1912
|
rim: X(11022874),
|
|
@@ -1932,8 +1932,8 @@ var Xi = (e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4, Zi = (e)
|
|
|
1932
1932
|
rim: X(11812382),
|
|
1933
1933
|
glow: .42
|
|
1934
1934
|
}
|
|
1935
|
-
},
|
|
1936
|
-
function
|
|
1935
|
+
}, ea = 2;
|
|
1936
|
+
function ta(e) {
|
|
1937
1937
|
let t = (1 + Math.sqrt(5)) / 2, n = [
|
|
1938
1938
|
-1,
|
|
1939
1939
|
t,
|
|
@@ -2069,12 +2069,12 @@ function ea(e) {
|
|
|
2069
2069
|
count: u
|
|
2070
2070
|
};
|
|
2071
2071
|
}
|
|
2072
|
-
var
|
|
2073
|
-
function
|
|
2074
|
-
let r =
|
|
2072
|
+
var na = ta(ea), ra = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Z = (e, t, n) => e + (t - e) * n;
|
|
2073
|
+
function ia(e, t, n) {
|
|
2074
|
+
let r = ra((n - e) / (t - e));
|
|
2075
2075
|
return r * r * (3 - 2 * r);
|
|
2076
2076
|
}
|
|
2077
|
-
var
|
|
2077
|
+
var aa = .78, oa = [
|
|
2078
2078
|
[
|
|
2079
2079
|
.59719,
|
|
2080
2080
|
.35458,
|
|
@@ -2090,7 +2090,7 @@ var ia = .78, aa = [
|
|
|
2090
2090
|
.13383,
|
|
2091
2091
|
.83777
|
|
2092
2092
|
]
|
|
2093
|
-
],
|
|
2093
|
+
], sa = [
|
|
2094
2094
|
[
|
|
2095
2095
|
1.60475,
|
|
2096
2096
|
-.53108,
|
|
@@ -2106,30 +2106,30 @@ var ia = .78, aa = [
|
|
|
2106
2106
|
-.07276,
|
|
2107
2107
|
1.07602
|
|
2108
2108
|
]
|
|
2109
|
-
],
|
|
2110
|
-
function
|
|
2111
|
-
let i = t *
|
|
2109
|
+
], ca = (e) => (e * (e + .0245786) - 90537e-9) / (e * (.983729 * e + .432951) + .238081);
|
|
2110
|
+
function la(e, t, n, r) {
|
|
2111
|
+
let i = t * aa, a = n * aa, o = r * aa;
|
|
2112
2112
|
for (let t = 0; t < 3; t += 1) {
|
|
2113
|
-
let [n, r, s] =
|
|
2114
|
-
e[t] =
|
|
2113
|
+
let [n, r, s] = oa[t];
|
|
2114
|
+
e[t] = ca(n * i + r * a + s * o);
|
|
2115
2115
|
}
|
|
2116
2116
|
let [s, c, l] = e;
|
|
2117
2117
|
for (let t = 0; t < 3; t += 1) {
|
|
2118
|
-
let [n, r, i] =
|
|
2119
|
-
e[t] = Math.round(
|
|
2118
|
+
let [n, r, i] = sa[t];
|
|
2119
|
+
e[t] = Math.round(Qi(ra(n * s + r * c + i * l)) * 255);
|
|
2120
2120
|
}
|
|
2121
2121
|
}
|
|
2122
2122
|
function Q(e) {
|
|
2123
|
-
let t = e *
|
|
2124
|
-
return Math.round(
|
|
2123
|
+
let t = e * aa;
|
|
2124
|
+
return Math.round(Qi(ra(ca(t))) * 255);
|
|
2125
2125
|
}
|
|
2126
|
-
var
|
|
2127
|
-
function
|
|
2126
|
+
var ua = 60, da = "rgba(255,214,150,0.34)";
|
|
2127
|
+
function fa(e) {
|
|
2128
2128
|
let t = Math.abs(Math.trunc(e)) % 2147483646 + 1;
|
|
2129
2129
|
return () => (t = t * 16807 % 2147483647, (t - 1) / 2147483646);
|
|
2130
2130
|
}
|
|
2131
|
-
var
|
|
2132
|
-
function
|
|
2131
|
+
var pa = 1618033;
|
|
2132
|
+
function ma({ state: e = "idle", size: t = 128, compact: n = !1, activity: r = 0, unread: i = !1, paused: a = !1, seed: o = pa, className: s, style: c }) {
|
|
2133
2133
|
let l = V(null), u = V(e), d = V(0), f = V(n), p = V(i), m = V(a), h = V(-Infinity), g = V(null);
|
|
2134
2134
|
return B(() => {
|
|
2135
2135
|
u.current = e, d.current = typeof performance > "u" ? 0 : performance.now(), g.current?.();
|
|
@@ -2148,138 +2148,138 @@ function pa({ state: e = "idle", size: t = 128, compact: n = !1, activity: r = 0
|
|
|
2148
2148
|
if (!i) return;
|
|
2149
2149
|
let a = i, s = typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, c = Math.min(window.devicePixelRatio || 1, 2);
|
|
2150
2150
|
r.width = Math.round(t * c), r.height = Math.round(t * c), a.scale(c, c);
|
|
2151
|
-
let _ = t / 2, v = t / 2, y =
|
|
2151
|
+
let _ = t / 2, v = t / 2, y = fa(o), ee = Array.from({ length: 34 }, () => ({
|
|
2152
2152
|
x: (y() - .5) * 1.9,
|
|
2153
2153
|
y: y() * 2.8 - .4,
|
|
2154
2154
|
z: (y() - .5) * 1.9,
|
|
2155
2155
|
speed: .05 + y() * .09
|
|
2156
2156
|
})), b = {
|
|
2157
|
-
center: [
|
|
2158
|
-
rim: [
|
|
2159
|
-
glow:
|
|
2160
|
-
}, x = 0, S =
|
|
2157
|
+
center: [...$i[e].center],
|
|
2158
|
+
rim: [...$i[e].rim],
|
|
2159
|
+
glow: $i[e].glow
|
|
2160
|
+
}, x = 0, S = ua, te = 0, C = 0, ne = performance.now(), w = 0, T = .34, E = n ? 7.4 : 9, D = -Infinity, re = {
|
|
2161
2161
|
x: 0,
|
|
2162
2162
|
y: 0
|
|
2163
|
-
},
|
|
2163
|
+
}, O = {
|
|
2164
2164
|
x: 0,
|
|
2165
2165
|
y: 0
|
|
2166
|
-
},
|
|
2167
|
-
|
|
2168
|
-
},
|
|
2169
|
-
let i =
|
|
2170
|
-
return [_ + e * r * i *
|
|
2166
|
+
}, k = (e) => {
|
|
2167
|
+
re.x = e.clientX / window.innerWidth * 2 - 1, re.y = -(e.clientY / window.innerHeight * 2 - 1), D = performance.now(), S = ua, x ||= requestAnimationFrame(F);
|
|
2168
|
+
}, A = t * (n ? .27 : .24), j = (e, t, n, r) => {
|
|
2169
|
+
let i = E / (E - n * r);
|
|
2170
|
+
return [_ + e * r * i * A, v - t * r * i * A];
|
|
2171
2171
|
};
|
|
2172
|
-
function
|
|
2172
|
+
function M(e, t, n, r) {
|
|
2173
2173
|
let i = a.createRadialGradient(e, t, 0, e, t, Math.max(n, .01));
|
|
2174
2174
|
for (let [e, t] of r) i.addColorStop(e, t);
|
|
2175
2175
|
return i;
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2177
|
+
function N(e, t, n, r, i, o) {
|
|
2178
2178
|
if (i <= .002) return;
|
|
2179
2179
|
a.save(), a.globalCompositeOperation = "lighter", a.strokeStyle = r, a.lineWidth = n, a.lineCap = "round", a.beginPath();
|
|
2180
2180
|
let s = !1;
|
|
2181
2181
|
for (let n = 0; n <= 96; n += 1) {
|
|
2182
|
-
let r = n / 96 * Math.PI * 2, i = Math.cos(r) * t, c = Math.sin(r) * t, l = c * Math.cos(
|
|
2182
|
+
let r = n / 96 * Math.PI * 2, i = Math.cos(r) * t, c = Math.sin(r) * t, l = c * Math.cos(T), u = c * Math.sin(T), d = u >= 0 ? 1 : -1, f = !o || r >= o[0] && r <= o[1];
|
|
2183
2183
|
if (d !== e || !f) {
|
|
2184
2184
|
s = !1;
|
|
2185
2185
|
continue;
|
|
2186
2186
|
}
|
|
2187
|
-
let [p, m] =
|
|
2187
|
+
let [p, m] = j(i, l, u, 1);
|
|
2188
2188
|
s ? a.lineTo(p, m) : (a.moveTo(p, m), s = !0);
|
|
2189
2189
|
}
|
|
2190
2190
|
a.globalAlpha = e === -1 ? i * .32 : i, a.stroke(), a.restore();
|
|
2191
2191
|
}
|
|
2192
|
-
let
|
|
2192
|
+
let P = new Float64Array(na.points.length), ie = [
|
|
2193
2193
|
0,
|
|
2194
2194
|
0,
|
|
2195
2195
|
0
|
|
2196
2196
|
];
|
|
2197
|
-
function
|
|
2197
|
+
function F(e) {
|
|
2198
2198
|
x = 0;
|
|
2199
|
-
let n = a, r = Math.min((e -
|
|
2200
|
-
|
|
2201
|
-
let i = u.current, o =
|
|
2202
|
-
|
|
2203
|
-
let
|
|
2204
|
-
|
|
2205
|
-
let
|
|
2206
|
-
for (let e = 0; e < 3; e += 1) b.center[e] = Z(b.center[e], o.center[e],
|
|
2207
|
-
let
|
|
2208
|
-
|
|
2209
|
-
let
|
|
2210
|
-
if (
|
|
2211
|
-
let e =
|
|
2212
|
-
|
|
2199
|
+
let n = a, r = Math.min((e - ne) / 1e3, .05);
|
|
2200
|
+
ne = e;
|
|
2201
|
+
let i = u.current, o = $i[i], c = f.current, l = m.current || s, g = l ? 0 : e / 1e3, k = l ? 0 : (e - d.current) / 1e3, ae = l ? Infinity : (e - h.current) / 1e3, I = !l && e - D < 1200;
|
|
2202
|
+
C = l ? 0 : Z(C, +!!I, I ? .05 : .02), l || (te += r * (.25 + C * .75));
|
|
2203
|
+
let oe = c ? 7.4 : 9, se = !l && Math.abs(E - oe) > .01;
|
|
2204
|
+
E = l ? oe : Z(E, oe, .12), (i !== "idle" || ae < 2.2 || p.current || C > .004 || se) && (S = ua);
|
|
2205
|
+
let ce = l ? 1 : .06;
|
|
2206
|
+
for (let e = 0; e < 3; e += 1) b.center[e] = Z(b.center[e], o.center[e], ce), b.rim[e] = Z(b.rim[e], o.rim[e], ce);
|
|
2207
|
+
let le = o.glow, ue = 1;
|
|
2208
|
+
le += Math.sin(te * .9) * .05 * C;
|
|
2209
|
+
let de = ae < 1.8 ? Math.sin(ra(ae / 1.8) * Math.PI) * .14 : 0;
|
|
2210
|
+
if (le += de, i === "working" && (le += Math.sin(g * 2.2) * .06), i === "success") {
|
|
2211
|
+
let e = ra(k / 1.4);
|
|
2212
|
+
ue = 1 + Math.sin((1 - (1 - e) ** 3) * Math.PI) * .06, k > 1.4 && (le = Z(o.glow, $i.idle.glow + .25, ra((k - 1.4) / 2)));
|
|
2213
2213
|
}
|
|
2214
|
-
i === "error" && (
|
|
2215
|
-
let
|
|
2216
|
-
l || (
|
|
2217
|
-
let
|
|
2218
|
-
n.clearRect(0, 0, t, t), n.fillStyle =
|
|
2214
|
+
i === "error" && (ue = .94), b.glow = Z(b.glow, le, l ? 1 : .08);
|
|
2215
|
+
let L = b.glow;
|
|
2216
|
+
l || (w += r * (.06 + C * .1), T = .34 + Math.sin(te * .6) * .12, O.x = Z(O.x, re.x, .02), O.y = Z(O.y, re.y, .02));
|
|
2217
|
+
let fe = l ? 0 : Math.sin(te * .35) * .05 + O.x * .12, pe = l ? 0 : -O.y * .08, R = ue * (1 + de * .08);
|
|
2218
|
+
n.clearRect(0, 0, t, t), n.fillStyle = M(_, v, A * 1.95, [
|
|
2219
2219
|
[0, "rgba(9,11,15,0.5)"],
|
|
2220
2220
|
[.52, "rgba(9,11,15,0.3)"],
|
|
2221
2221
|
[.8, "rgba(9,11,15,0.08)"],
|
|
2222
2222
|
[1, "rgba(9,11,15,0)"]
|
|
2223
2223
|
]), n.fillRect(0, 0, t, t), n.save(), n.globalCompositeOperation = "lighter";
|
|
2224
|
-
let
|
|
2225
|
-
n.fillStyle =
|
|
2226
|
-
[0, `rgba(${Q(b.center[0])},${Q(b.center[1])},${Q(b.center[2])},${
|
|
2227
|
-
[.34, `rgba(${Q(b.rim[0] * 1.4)},${Q(b.rim[1] * 1.4)},${Q(b.rim[2] * 1.4)},${
|
|
2224
|
+
let me = A * (1.5 + L * .5) * R, he = .06 + L * .24;
|
|
2225
|
+
n.fillStyle = M(_, v, me, [
|
|
2226
|
+
[0, `rgba(${Q(b.center[0])},${Q(b.center[1])},${Q(b.center[2])},${he * .5})`],
|
|
2227
|
+
[.34, `rgba(${Q(b.rim[0] * 1.4)},${Q(b.rim[1] * 1.4)},${Q(b.rim[2] * 1.4)},${he * .2})`],
|
|
2228
2228
|
[1, "rgba(160,50,10,0)"]
|
|
2229
2229
|
]), n.fillRect(0, 0, t, t), n.restore();
|
|
2230
|
-
let
|
|
2231
|
-
|
|
2230
|
+
let ge = i === "working" ? .55 : p.current ? .26 + Math.sin(g * .8) * .07 : 0, _e = g * 1.6 % (Math.PI * 2), ve = 1.5 * R, ye = Math.max(1, t * .007), be = Math.max(1, t * .011), xe = (e) => {
|
|
2231
|
+
N(e, ve, ye, "rgba(255,224,160,1)", ge * .45), i === "working" && N(e, ve, be, "rgba(255,236,190,1)", .75, [_e, _e + 1.1]);
|
|
2232
2232
|
};
|
|
2233
|
-
|
|
2234
|
-
let
|
|
2235
|
-
n.fillStyle = `rgba(${Q(b.center[0])},${Q(b.center[1])},${Q(b.center[2])},${
|
|
2233
|
+
xe(-1), n.save(), n.globalCompositeOperation = "lighter";
|
|
2234
|
+
let Se = l ? 0 : i === "success" || i === "attention" ? 1 : Math.max(C, .12), Ce = .08 + L * .4;
|
|
2235
|
+
n.fillStyle = `rgba(${Q(b.center[0])},${Q(b.center[1])},${Q(b.center[2])},${Ce})`;
|
|
2236
2236
|
for (let e of ee) {
|
|
2237
|
-
e.y += e.speed * r * (.4 +
|
|
2238
|
-
let [i, a] =
|
|
2237
|
+
e.y += e.speed * r * (.4 + L) * Se, e.y > 2.4 && (e.y = -.4, e.x = (y() - .5) * 1.9, e.z = (y() - .5) * 1.9);
|
|
2238
|
+
let [i, a] = j(e.x, e.y, e.z, 1), o = Math.max(t * .005, 1) * (e.z > 0 ? 1 : .7);
|
|
2239
2239
|
n.beginPath(), n.arc(i, a, o, 0, Math.PI * 2), n.fill();
|
|
2240
2240
|
}
|
|
2241
2241
|
n.restore();
|
|
2242
|
-
let
|
|
2242
|
+
let we = Math.cos(w + fe), Te = Math.sin(w + fe), Ee = Math.cos(.32 + pe), De = Math.sin(.32 + pe), { points: Oe, grain: ke, count: Ae } = na;
|
|
2243
2243
|
for (let e = 0; e < Oe.length; e += 3) {
|
|
2244
|
-
let t = Oe[e], n = Oe[e + 1], r = Oe[e + 2], i = t *
|
|
2245
|
-
|
|
2244
|
+
let t = Oe[e], n = Oe[e + 1], r = Oe[e + 2], i = t * we + r * Te, a = -t * Te + r * we, o = n * Ee - a * De, s = n * De + a * Ee;
|
|
2245
|
+
P[e] = i, P[e + 1] = o, P[e + 2] = s;
|
|
2246
2246
|
}
|
|
2247
2247
|
for (let e = 0; e < Ae; e += 1) {
|
|
2248
|
-
let t = e * 9, r = t + 3, i = t + 6, a =
|
|
2248
|
+
let t = e * 9, r = t + 3, i = t + 6, a = P[r] - P[t], o = P[r + 1] - P[t + 1], s = P[r + 2] - P[t + 2], c = P[i] - P[t], l = P[i + 1] - P[t + 1], u = P[i + 2] - P[t + 2], d = o * u - s * l, f = s * c - a * u, p = a * l - o * c;
|
|
2249
2249
|
if (p <= 0) continue;
|
|
2250
|
-
let m = 1 - p / Math.hypot(d, f, p), h = ke[e], g = .9 + .14 * h + .06 * Math.sin(
|
|
2251
|
-
|
|
2252
|
-
let ee = `rgb(${
|
|
2253
|
-
n.beginPath(), n.moveTo(x, S), n.lineTo(
|
|
2250
|
+
let m = 1 - p / Math.hypot(d, f, p), h = ke[e], g = .9 + .14 * h + .06 * Math.sin(te * .8 + h * 6.28), _ = ia(.08, .82, m), v = ia(.66, 0, m) * L * .62, y = 1 - .18 * ia(.82, 1, m);
|
|
2251
|
+
la(ie, (Z(b.center[0], b.rim[0], _) * g + v) * y, (Z(b.center[1], b.rim[1], _) * g + v * .72) * y, (Z(b.center[2], b.rim[2], _) * g + v * .3) * y);
|
|
2252
|
+
let ee = `rgb(${ie[0]},${ie[1]},${ie[2]})`, [x, S] = j(P[t], P[t + 1], P[t + 2], R), [C, ne] = j(P[r], P[r + 1], P[r + 2], R), [w, T] = j(P[i], P[i + 1], P[i + 2], R);
|
|
2253
|
+
n.beginPath(), n.moveTo(x, S), n.lineTo(C, ne), n.lineTo(w, T), n.closePath(), n.fillStyle = ee, n.fill(), n.strokeStyle = da, n.lineWidth = 1, n.stroke();
|
|
2254
2254
|
}
|
|
2255
|
-
|
|
2256
|
-
let je =
|
|
2257
|
-
if (n.fillStyle =
|
|
2258
|
-
[0, `rgba(255,246,228,${.05 +
|
|
2259
|
-
[.5, `rgba(255,240,214,${.015 +
|
|
2255
|
+
xe(1), n.save(), n.globalCompositeOperation = "lighter";
|
|
2256
|
+
let je = A * .34 * R;
|
|
2257
|
+
if (n.fillStyle = M(_ - A * .38 * R, v - A * .44 * R, je, [
|
|
2258
|
+
[0, `rgba(255,246,228,${.05 + L * .09})`],
|
|
2259
|
+
[.5, `rgba(255,240,214,${.015 + L * .03})`],
|
|
2260
2260
|
[1, "rgba(255,240,214,0)"]
|
|
2261
|
-
]), n.fillRect(0, 0, t, t), i === "success" &&
|
|
2262
|
-
let e =
|
|
2263
|
-
|
|
2261
|
+
]), n.fillRect(0, 0, t, t), i === "success" && k < 2.6) {
|
|
2262
|
+
let e = k / 2.6, n = 1.05 + e * 1.5, r = Math.max(1, t * .009), i = .65 * (1 - e);
|
|
2263
|
+
N(-1, n, r, "rgba(255,241,192,1)", i), N(1, n, r, "rgba(255,241,192,1)", i);
|
|
2264
2264
|
}
|
|
2265
2265
|
if (n.restore(), i === "attention") {
|
|
2266
|
-
let e =
|
|
2266
|
+
let e = ra(k / 2.4), r = Z(-1.9, .25, 1 - (1 - e) ** 2), i = e < 1 ? .7 : .7 * Math.max(0, 1 - (k - 2.4) / 2.5);
|
|
2267
2267
|
if (i > .002) {
|
|
2268
2268
|
n.save(), n.globalCompositeOperation = "lighter", n.globalAlpha = i, n.strokeStyle = "rgba(255,230,160,1)", n.lineWidth = Math.max(1, t * .009);
|
|
2269
|
-
let [, e] =
|
|
2270
|
-
n.beginPath(), n.ellipse(_, e,
|
|
2269
|
+
let [, e] = j(0, r, 0, 1);
|
|
2270
|
+
n.beginPath(), n.ellipse(_, e, A * 1.6, A * .42, 0, 0, Math.PI * 2), n.stroke(), n.restore();
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
2273
|
if (!c) {
|
|
2274
|
-
let e = v +
|
|
2275
|
-
n.save(), n.globalCompositeOperation = "lighter", n.fillStyle =
|
|
2274
|
+
let e = v + A * 1.5;
|
|
2275
|
+
n.save(), n.globalCompositeOperation = "lighter", n.fillStyle = M(_, e, A * 1.5, [[0, `rgba(220,140,60,${.1 + L * .2})`], [1, "rgba(220,140,60,0)"]]), n.fillRect(0, 0, t, t), n.restore();
|
|
2276
2276
|
}
|
|
2277
|
-
l || (--S, S > 0 && (x = requestAnimationFrame(
|
|
2277
|
+
l || (--S, S > 0 && (x = requestAnimationFrame(F)));
|
|
2278
2278
|
}
|
|
2279
2279
|
return g.current = () => {
|
|
2280
|
-
S =
|
|
2281
|
-
}, s || window.addEventListener("mousemove",
|
|
2282
|
-
g.current = null, x && cancelAnimationFrame(x), window.removeEventListener("mousemove",
|
|
2280
|
+
S = ua, ne = performance.now(), x ||= requestAnimationFrame(F);
|
|
2281
|
+
}, s || window.addEventListener("mousemove", k, { passive: !0 }), F(performance.now()), () => {
|
|
2282
|
+
g.current = null, x && cancelAnimationFrame(x), window.removeEventListener("mousemove", k);
|
|
2283
2283
|
};
|
|
2284
2284
|
}, [t, o]), /* @__PURE__ */ H("canvas", {
|
|
2285
2285
|
ref: l,
|
|
@@ -2296,47 +2296,65 @@ function pa({ state: e = "idle", size: t = 128, compact: n = !1, activity: r = 0
|
|
|
2296
2296
|
}
|
|
2297
2297
|
//#endregion
|
|
2298
2298
|
//#region src/components/ui/viglet-assistant.tsx
|
|
2299
|
-
var
|
|
2299
|
+
var ha = {
|
|
2300
|
+
sm: 44,
|
|
2301
|
+
md: 88,
|
|
2302
|
+
lg: 132
|
|
2303
|
+
}, ga = 76;
|
|
2304
|
+
function _a(e) {
|
|
2305
|
+
return typeof e == "number" ? Math.max(24, Math.round(e)) : ha[e];
|
|
2306
|
+
}
|
|
2307
|
+
function va(e) {
|
|
2308
|
+
let t = Math.round(e * .88 + 8);
|
|
2309
|
+
return {
|
|
2310
|
+
captionRight: t,
|
|
2311
|
+
captionBottom: Math.round(e * .3),
|
|
2312
|
+
captionMaxWidth: `min(23rem, calc(100vw - ${t + 20}px))`,
|
|
2313
|
+
badgeInset: Math.round(e * .2) - 8
|
|
2314
|
+
};
|
|
2315
|
+
}
|
|
2316
|
+
var ya = {
|
|
2300
2317
|
idle: "assistant.idle",
|
|
2301
2318
|
working: "assistant.working",
|
|
2302
2319
|
success: "assistant.success",
|
|
2303
2320
|
error: "assistant.error",
|
|
2304
2321
|
attention: "assistant.attention"
|
|
2305
|
-
},
|
|
2322
|
+
}, ba = {
|
|
2306
2323
|
idle: "text-muted-foreground",
|
|
2307
2324
|
working: "text-amber-700 dark:text-amber-400",
|
|
2308
2325
|
success: "text-emerald-700 dark:text-emerald-400",
|
|
2309
2326
|
error: "text-destructive",
|
|
2310
2327
|
attention: "text-amber-800 dark:text-amber-300"
|
|
2311
|
-
},
|
|
2312
|
-
function
|
|
2328
|
+
}, xa = 3;
|
|
2329
|
+
function Sa(e) {
|
|
2313
2330
|
return e.role === "report";
|
|
2314
2331
|
}
|
|
2315
|
-
function
|
|
2332
|
+
function Ca() {
|
|
2316
2333
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2317
2334
|
}
|
|
2318
|
-
function
|
|
2319
|
-
let [
|
|
2335
|
+
function wa({ text: e, still: t = !1, className: n, style: r }) {
|
|
2336
|
+
let [i, a] = Ke(0);
|
|
2320
2337
|
return B(() => {
|
|
2321
2338
|
let n = e.length;
|
|
2322
2339
|
if (n === 0) return;
|
|
2323
|
-
if (t ||
|
|
2324
|
-
let e = setTimeout(() =>
|
|
2340
|
+
if (t || Ca()) {
|
|
2341
|
+
let e = setTimeout(() => a(n), 0);
|
|
2325
2342
|
return () => clearTimeout(e);
|
|
2326
2343
|
}
|
|
2327
|
-
let r = Math.max(14, Math.min(34, 1400 / n)),
|
|
2328
|
-
|
|
2344
|
+
let r = Math.max(14, Math.min(34, 1400 / n)), i = setInterval(() => {
|
|
2345
|
+
a((e) => e >= n ? (clearInterval(i), e) : e + 1);
|
|
2329
2346
|
}, r);
|
|
2330
|
-
return () => clearInterval(
|
|
2347
|
+
return () => clearInterval(i);
|
|
2331
2348
|
}, [e, t]), /* @__PURE__ */ H("span", {
|
|
2332
2349
|
className: n,
|
|
2350
|
+
style: r,
|
|
2333
2351
|
children: /* @__PURE__ */ U("span", {
|
|
2334
2352
|
"aria-hidden": "true",
|
|
2335
|
-
children: [e.slice(0,
|
|
2353
|
+
children: [e.slice(0, i), i < e.length && /* @__PURE__ */ H("span", { className: "ml-px inline-block h-[0.95em] w-px translate-y-[0.15em] bg-current align-baseline motion-safe:animate-pulse" })]
|
|
2336
2354
|
})
|
|
2337
2355
|
});
|
|
2338
2356
|
}
|
|
2339
|
-
function
|
|
2357
|
+
function Ta({ at: e, locale: t }) {
|
|
2340
2358
|
let n = new Date(e);
|
|
2341
2359
|
if (Number.isNaN(n.getTime())) return null;
|
|
2342
2360
|
let r = n.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), i = new Intl.DateTimeFormat(t, r ? { timeStyle: "short" } : {
|
|
@@ -2349,111 +2367,137 @@ function ba({ at: e, locale: t }) {
|
|
|
2349
2367
|
children: i
|
|
2350
2368
|
});
|
|
2351
2369
|
}
|
|
2352
|
-
function
|
|
2353
|
-
let
|
|
2354
|
-
source:
|
|
2355
|
-
text:
|
|
2370
|
+
function Ea({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open: a, defaultOpen: o = !1, onOpenChange: c, unread: l, onRead: u, onDismiss: d, activity: f = 0, inline: p = !1, paused: m = !1, size: h = "sm", className: g }) {
|
|
2371
|
+
let _ = Te(), v = R(), y = _ ? v : "corner", ee = _a(h), b = y === "corner" ? ee : Math.min(ee, ha.sm), x = va(b), { t: S, i18n: te } = W(), [C, ne] = Ke(o), [w, T] = Ke(""), E = V(null), D = n ?? [], re = D.filter(Sa), O = re.filter((e) => !e.read), k = O[O.length - 1], A = a ?? C, j = typeof i == "function", M = e ?? k?.tone ?? "idle", N = t === void 0 ? k?.text ?? null : t, P = typeof l == "number" ? l : O.length, ie = l === !0 || P > 0, [F, ae] = Ke({
|
|
2372
|
+
source: N,
|
|
2373
|
+
text: A ? "" : N ?? ""
|
|
2356
2374
|
});
|
|
2357
|
-
|
|
2358
|
-
source:
|
|
2359
|
-
text:
|
|
2375
|
+
F.source !== N && ae({
|
|
2376
|
+
source: N,
|
|
2377
|
+
text: A ? "" : N ?? ""
|
|
2360
2378
|
});
|
|
2361
|
-
let
|
|
2362
|
-
if (e !==
|
|
2363
|
-
a === void 0 &&
|
|
2379
|
+
let I = (e) => {
|
|
2380
|
+
if (e !== A) for (let e of O) u?.(e.id);
|
|
2381
|
+
a === void 0 && ne(e), c?.(e);
|
|
2364
2382
|
};
|
|
2365
2383
|
B(() => {
|
|
2366
|
-
let e =
|
|
2384
|
+
let e = E.current;
|
|
2367
2385
|
e && (e.scrollTop = e.scrollHeight);
|
|
2368
2386
|
}, [n, r]);
|
|
2369
|
-
let
|
|
2370
|
-
let e =
|
|
2371
|
-
!e || r || !i || (i(e),
|
|
2372
|
-
},
|
|
2373
|
-
|
|
2387
|
+
let oe = () => {
|
|
2388
|
+
let e = w.trim();
|
|
2389
|
+
!e || r || !i || (i(e), T(""));
|
|
2390
|
+
}, se = A ? S("assistant.collapse") : [S("assistant.open"), P > 0 ? S("assistant.unreadCount", { count: P }) : null].filter(Boolean).join(", "), ce = y === "header" && A, le = y === "rail" ? {
|
|
2391
|
+
left: x.captionRight,
|
|
2392
|
+
bottom: x.captionBottom,
|
|
2393
|
+
maxWidth: x.captionMaxWidth
|
|
2394
|
+
} : y === "header" ? {
|
|
2395
|
+
right: 0,
|
|
2396
|
+
top: b + 8,
|
|
2397
|
+
maxWidth: x.captionMaxWidth
|
|
2398
|
+
} : {
|
|
2399
|
+
right: x.captionRight,
|
|
2400
|
+
bottom: x.captionBottom,
|
|
2401
|
+
maxWidth: x.captionMaxWidth
|
|
2402
|
+
};
|
|
2403
|
+
return /* @__PURE__ */ U(qe, { children: [ce && /* @__PURE__ */ H("span", {
|
|
2404
|
+
"aria-hidden": "true",
|
|
2405
|
+
className: "block flex-none",
|
|
2406
|
+
style: {
|
|
2407
|
+
width: b,
|
|
2408
|
+
height: b
|
|
2409
|
+
}
|
|
2410
|
+
}), /* @__PURE__ */ U("div", {
|
|
2411
|
+
"data-dock-edge": _ ? y : void 0,
|
|
2374
2412
|
className: [
|
|
2375
|
-
p ||
|
|
2376
|
-
|
|
2413
|
+
ce ? "absolute right-0 top-0 z-50" : p || _ ? "relative" : "fixed bottom-5 right-5 z-50",
|
|
2414
|
+
_ ? "pointer-events-auto" : "",
|
|
2377
2415
|
"flex flex-col",
|
|
2378
|
-
|
|
2379
|
-
|
|
2416
|
+
A ? "w-[min(22.5rem,calc(100vw-2.5rem))] rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-2xl" : `w-[var(--vg-assistant-orb)] ${y === "rail" ? "items-start" : "items-end"}`,
|
|
2417
|
+
g ?? ""
|
|
2380
2418
|
].join(" "),
|
|
2419
|
+
style: { "--vg-assistant-orb": `${b}px` },
|
|
2381
2420
|
onKeyDown: (e) => {
|
|
2382
|
-
e.key === "Escape" &&
|
|
2421
|
+
e.key === "Escape" && A && I(!1);
|
|
2383
2422
|
},
|
|
2384
2423
|
children: [
|
|
2385
2424
|
/* @__PURE__ */ H("span", {
|
|
2386
2425
|
role: "status",
|
|
2387
2426
|
"aria-live": "polite",
|
|
2388
2427
|
className: "sr-only",
|
|
2389
|
-
children:
|
|
2428
|
+
children: F.text
|
|
2390
2429
|
}),
|
|
2391
|
-
!
|
|
2392
|
-
text:
|
|
2430
|
+
!A && N && /* @__PURE__ */ H(wa, {
|
|
2431
|
+
text: N,
|
|
2393
2432
|
still: m,
|
|
2394
|
-
|
|
2395
|
-
|
|
2433
|
+
style: le,
|
|
2434
|
+
className: `pointer-events-none absolute w-max ${y === "rail" ? "text-left" : "text-right"} text-sm font-semibold leading-snug text-foreground drop-shadow-sm`
|
|
2435
|
+
}, N),
|
|
2396
2436
|
/* @__PURE__ */ U("div", {
|
|
2397
2437
|
className: "flex flex-none items-center gap-3",
|
|
2398
2438
|
children: [
|
|
2399
2439
|
/* @__PURE__ */ U("button", {
|
|
2400
2440
|
type: "button",
|
|
2401
|
-
"aria-label":
|
|
2402
|
-
"aria-expanded":
|
|
2403
|
-
onClick: () =>
|
|
2441
|
+
"aria-label": se,
|
|
2442
|
+
"aria-expanded": A,
|
|
2443
|
+
onClick: () => I(!A),
|
|
2404
2444
|
className: "relative flex-none rounded-full focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
2405
|
-
children: [/* @__PURE__ */ H(
|
|
2406
|
-
state:
|
|
2407
|
-
compact: !
|
|
2408
|
-
unread:
|
|
2445
|
+
children: [/* @__PURE__ */ H(ma, {
|
|
2446
|
+
state: M,
|
|
2447
|
+
compact: !A,
|
|
2448
|
+
unread: ie,
|
|
2409
2449
|
activity: f,
|
|
2410
2450
|
paused: m,
|
|
2411
|
-
size:
|
|
2412
|
-
}), !
|
|
2451
|
+
size: A ? ga : b
|
|
2452
|
+
}), !A && P > 0 && /* @__PURE__ */ H("span", {
|
|
2413
2453
|
"aria-hidden": "true",
|
|
2414
|
-
|
|
2415
|
-
|
|
2454
|
+
style: {
|
|
2455
|
+
right: x.badgeInset,
|
|
2456
|
+
top: x.badgeInset
|
|
2457
|
+
},
|
|
2458
|
+
className: "absolute grid h-5 min-w-5 place-items-center rounded-full bg-primary px-1 text-[0.6875rem] font-semibold leading-none text-primary-foreground",
|
|
2459
|
+
children: P
|
|
2416
2460
|
})]
|
|
2417
2461
|
}),
|
|
2418
|
-
|
|
2462
|
+
A && /* @__PURE__ */ U("div", {
|
|
2419
2463
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
2420
2464
|
children: [
|
|
2421
2465
|
/* @__PURE__ */ H("span", {
|
|
2422
2466
|
className: "text-xs text-muted-foreground",
|
|
2423
|
-
children:
|
|
2467
|
+
children: S("assistant.state")
|
|
2424
2468
|
}),
|
|
2425
2469
|
/* @__PURE__ */ H("span", {
|
|
2426
|
-
className: `text-sm font-semibold ${
|
|
2427
|
-
children:
|
|
2470
|
+
className: `text-sm font-semibold ${ba[M]}`,
|
|
2471
|
+
children: S(ya[M])
|
|
2428
2472
|
}),
|
|
2429
|
-
|
|
2430
|
-
text:
|
|
2473
|
+
N && /* @__PURE__ */ H(wa, {
|
|
2474
|
+
text: N,
|
|
2431
2475
|
still: m,
|
|
2432
2476
|
className: "text-xs leading-snug text-muted-foreground"
|
|
2433
|
-
},
|
|
2477
|
+
}, N)
|
|
2434
2478
|
]
|
|
2435
2479
|
}),
|
|
2436
|
-
|
|
2480
|
+
A && /* @__PURE__ */ H(L, {
|
|
2437
2481
|
variant: "ghost",
|
|
2438
2482
|
size: "sm",
|
|
2439
2483
|
className: "flex-none self-start",
|
|
2440
|
-
onClick: () =>
|
|
2441
|
-
children:
|
|
2484
|
+
onClick: () => I(!1),
|
|
2485
|
+
children: S("assistant.collapseAction")
|
|
2442
2486
|
})
|
|
2443
2487
|
]
|
|
2444
2488
|
}),
|
|
2445
|
-
|
|
2446
|
-
ref:
|
|
2489
|
+
A && (j || re.length > 0) && /* @__PURE__ */ U("div", {
|
|
2490
|
+
ref: E,
|
|
2447
2491
|
role: "log",
|
|
2448
|
-
"aria-label":
|
|
2492
|
+
"aria-label": S("assistant.transcript"),
|
|
2449
2493
|
"aria-busy": r,
|
|
2450
2494
|
className: "mt-3 flex max-h-96 min-h-32 flex-1 flex-col gap-2.5 overflow-y-auto pr-1",
|
|
2451
2495
|
children: [
|
|
2452
|
-
|
|
2496
|
+
D.length === 0 && !r && /* @__PURE__ */ H("p", {
|
|
2453
2497
|
className: "m-auto max-w-52 text-center text-xs leading-relaxed text-muted-foreground",
|
|
2454
|
-
children:
|
|
2498
|
+
children: S("assistant.empty")
|
|
2455
2499
|
}),
|
|
2456
|
-
|
|
2500
|
+
D.map((e, t) => Sa(e) ? /* @__PURE__ */ U("div", {
|
|
2457
2501
|
"data-kind": "report",
|
|
2458
2502
|
className: `w-full rounded-lg border px-3 py-2 text-sm ${e.read ? "border-border/60" : "border-border bg-muted/50"}`,
|
|
2459
2503
|
children: [
|
|
@@ -2462,27 +2506,27 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2462
2506
|
children: [
|
|
2463
2507
|
/* @__PURE__ */ H("span", {
|
|
2464
2508
|
"aria-hidden": "true",
|
|
2465
|
-
className: `size-2 flex-none rounded-full bg-current ${
|
|
2509
|
+
className: `size-2 flex-none rounded-full bg-current ${ba[e.tone]}`
|
|
2466
2510
|
}),
|
|
2467
2511
|
/* @__PURE__ */ H("span", {
|
|
2468
2512
|
className: "font-semibold",
|
|
2469
|
-
children:
|
|
2513
|
+
children: S(ya[e.tone])
|
|
2470
2514
|
}),
|
|
2471
|
-
/* @__PURE__ */ H(
|
|
2515
|
+
/* @__PURE__ */ H(Ta, {
|
|
2472
2516
|
at: e.at,
|
|
2473
|
-
locale:
|
|
2517
|
+
locale: te?.resolvedLanguage
|
|
2474
2518
|
}),
|
|
2475
2519
|
!e.read && /* @__PURE__ */ H("span", {
|
|
2476
2520
|
className: "rounded-full border border-border px-1.5 leading-4",
|
|
2477
|
-
children:
|
|
2521
|
+
children: S("assistant.new")
|
|
2478
2522
|
}),
|
|
2479
|
-
d && /* @__PURE__ */ H(
|
|
2523
|
+
d && /* @__PURE__ */ H(L, {
|
|
2480
2524
|
variant: "ghost",
|
|
2481
2525
|
size: "icon",
|
|
2482
2526
|
className: "ml-auto size-6",
|
|
2483
|
-
"aria-label":
|
|
2527
|
+
"aria-label": S("assistant.dismiss"),
|
|
2484
2528
|
onClick: () => d(e.id),
|
|
2485
|
-
children: /* @__PURE__ */ H(
|
|
2529
|
+
children: /* @__PURE__ */ H(ft, {
|
|
2486
2530
|
"aria-hidden": "true",
|
|
2487
2531
|
size: 14
|
|
2488
2532
|
})
|
|
@@ -2495,7 +2539,7 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2495
2539
|
}),
|
|
2496
2540
|
e.actions && e.actions.length > 0 && /* @__PURE__ */ H("div", {
|
|
2497
2541
|
className: "mt-2 flex flex-wrap gap-2",
|
|
2498
|
-
children: e.actions.slice(0,
|
|
2542
|
+
children: e.actions.slice(0, xa).map((e) => /* @__PURE__ */ H(L, {
|
|
2499
2543
|
variant: "outline",
|
|
2500
2544
|
size: "sm",
|
|
2501
2545
|
onClick: e.onSelect,
|
|
@@ -2509,7 +2553,7 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2509
2553
|
children: [/* @__PURE__ */ H("p", {
|
|
2510
2554
|
className: "m-0 whitespace-pre-wrap leading-snug",
|
|
2511
2555
|
children: e.text
|
|
2512
|
-
}), e.action && /* @__PURE__ */ H(
|
|
2556
|
+
}), e.action && /* @__PURE__ */ H(L, {
|
|
2513
2557
|
variant: "link",
|
|
2514
2558
|
size: "sm",
|
|
2515
2559
|
className: "mt-1 h-auto whitespace-normal p-0 text-left",
|
|
@@ -2519,42 +2563,42 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2519
2563
|
}, e.id ?? t)),
|
|
2520
2564
|
r && /* @__PURE__ */ H("p", {
|
|
2521
2565
|
className: "m-0 self-start px-3 py-2 text-sm text-muted-foreground",
|
|
2522
|
-
children:
|
|
2566
|
+
children: S("assistant.thinking")
|
|
2523
2567
|
})
|
|
2524
2568
|
]
|
|
2525
2569
|
}),
|
|
2526
|
-
|
|
2570
|
+
A && j && /* @__PURE__ */ U("div", {
|
|
2527
2571
|
className: "mt-3 flex flex-none gap-2",
|
|
2528
2572
|
children: [/* @__PURE__ */ H(s, {
|
|
2529
|
-
value:
|
|
2573
|
+
value: w,
|
|
2530
2574
|
disabled: r,
|
|
2531
|
-
placeholder:
|
|
2532
|
-
"aria-label":
|
|
2533
|
-
onChange: (e) =>
|
|
2575
|
+
placeholder: S("assistant.placeholder"),
|
|
2576
|
+
"aria-label": S("assistant.placeholder"),
|
|
2577
|
+
onChange: (e) => T(e.target.value),
|
|
2534
2578
|
onKeyDown: (e) => {
|
|
2535
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
2579
|
+
e.key === "Enter" && (e.preventDefault(), oe());
|
|
2536
2580
|
}
|
|
2537
|
-
}), /* @__PURE__ */ H(
|
|
2581
|
+
}), /* @__PURE__ */ H(L, {
|
|
2538
2582
|
variant: "outline",
|
|
2539
|
-
disabled: r ||
|
|
2540
|
-
onClick:
|
|
2541
|
-
children:
|
|
2583
|
+
disabled: r || w.trim().length === 0,
|
|
2584
|
+
onClick: oe,
|
|
2585
|
+
children: S("assistant.send")
|
|
2542
2586
|
})]
|
|
2543
2587
|
})
|
|
2544
2588
|
]
|
|
2545
|
-
});
|
|
2589
|
+
})] });
|
|
2546
2590
|
}
|
|
2547
2591
|
//#endregion
|
|
2548
2592
|
//#region src/components/ui/user-menu.tsx
|
|
2549
|
-
function
|
|
2593
|
+
function Da({ user: e, onAccount: t, onSignOut: n, extraItems: i, className: a, align: o = "end" }) {
|
|
2550
2594
|
let { t: s } = W(), c = `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim() || e.username || "";
|
|
2551
|
-
return /* @__PURE__ */ U(
|
|
2595
|
+
return /* @__PURE__ */ U(P, { children: [/* @__PURE__ */ H(De, {
|
|
2552
2596
|
asChild: !0,
|
|
2553
2597
|
children: /* @__PURE__ */ H("button", {
|
|
2554
2598
|
type: "button",
|
|
2555
2599
|
title: c || e.username,
|
|
2556
2600
|
className: r("cursor-pointer rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring", a),
|
|
2557
|
-
children: /* @__PURE__ */ H(
|
|
2601
|
+
children: /* @__PURE__ */ H(Oe, {
|
|
2558
2602
|
givenName: e.firstName,
|
|
2559
2603
|
familyName: e.lastName,
|
|
2560
2604
|
name: c || e.username,
|
|
@@ -2563,16 +2607,16 @@ function Sa({ user: e, onAccount: t, onSignOut: n, extraItems: i, className: a,
|
|
|
2563
2607
|
className: "hover:ring-2 hover:ring-border transition-all"
|
|
2564
2608
|
})
|
|
2565
2609
|
})
|
|
2566
|
-
}), /* @__PURE__ */ U(
|
|
2610
|
+
}), /* @__PURE__ */ U(D, {
|
|
2567
2611
|
className: "min-w-56 rounded-lg",
|
|
2568
2612
|
align: o,
|
|
2569
2613
|
sideOffset: 8,
|
|
2570
2614
|
children: [
|
|
2571
|
-
/* @__PURE__ */ H(
|
|
2615
|
+
/* @__PURE__ */ H(I, {
|
|
2572
2616
|
className: "p-0 font-normal",
|
|
2573
2617
|
children: /* @__PURE__ */ U("div", {
|
|
2574
2618
|
className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm",
|
|
2575
|
-
children: [/* @__PURE__ */ H(
|
|
2619
|
+
children: [/* @__PURE__ */ H(Oe, {
|
|
2576
2620
|
givenName: e.firstName,
|
|
2577
2621
|
familyName: e.lastName,
|
|
2578
2622
|
name: c || e.username,
|
|
@@ -2590,25 +2634,25 @@ function Sa({ user: e, onAccount: t, onSignOut: n, extraItems: i, className: a,
|
|
|
2590
2634
|
})]
|
|
2591
2635
|
})
|
|
2592
2636
|
}),
|
|
2593
|
-
/* @__PURE__ */ H(
|
|
2594
|
-
/* @__PURE__ */ U(
|
|
2637
|
+
/* @__PURE__ */ H(O, {}),
|
|
2638
|
+
/* @__PURE__ */ U(k, { children: [t && /* @__PURE__ */ U(M, {
|
|
2595
2639
|
onSelect: t,
|
|
2596
2640
|
className: "cursor-pointer",
|
|
2597
|
-
children: [/* @__PURE__ */ H(
|
|
2641
|
+
children: [/* @__PURE__ */ H(dt, {}), s("nav.account")]
|
|
2598
2642
|
}), i] }),
|
|
2599
|
-
(t || i) && /* @__PURE__ */ H(
|
|
2600
|
-
n && /* @__PURE__ */ U(
|
|
2643
|
+
(t || i) && /* @__PURE__ */ H(O, {}),
|
|
2644
|
+
n && /* @__PURE__ */ U(M, {
|
|
2601
2645
|
onSelect: n,
|
|
2602
2646
|
className: "cursor-pointer text-red-500 focus:text-red-500 focus:bg-red-50 dark:focus:bg-red-950",
|
|
2603
|
-
children: [/* @__PURE__ */ H(
|
|
2647
|
+
children: [/* @__PURE__ */ H(ct, {}), s("nav.logOut")]
|
|
2604
2648
|
})
|
|
2605
2649
|
]
|
|
2606
2650
|
})] });
|
|
2607
2651
|
}
|
|
2608
2652
|
//#endregion
|
|
2609
2653
|
//#region src/components/login/login.tsx
|
|
2610
|
-
var
|
|
2611
|
-
function
|
|
2654
|
+
var Oa = He({});
|
|
2655
|
+
function ka(e) {
|
|
2612
2656
|
if (!e) return null;
|
|
2613
2657
|
let t = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());
|
|
2614
2658
|
if (t) {
|
|
@@ -2622,13 +2666,13 @@ function wa(e) {
|
|
|
2622
2666
|
}
|
|
2623
2667
|
return null;
|
|
2624
2668
|
}
|
|
2625
|
-
function
|
|
2669
|
+
function Aa({ color: e, colorDark: t, children: n, className: i, style: a, ...o }) {
|
|
2626
2670
|
let s = {};
|
|
2627
2671
|
e && (s["--ff-color"] = e), t ? s["--ff-color-dark"] = t : e && (s["--ff-color-dark"] = e);
|
|
2628
|
-
let c =
|
|
2672
|
+
let c = ka(e);
|
|
2629
2673
|
c && (s["--ff-color-rgb"] = c);
|
|
2630
|
-
let l =
|
|
2631
|
-
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(
|
|
2674
|
+
let l = ka(t) ?? c;
|
|
2675
|
+
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(Oa.Provider, {
|
|
2632
2676
|
value: {
|
|
2633
2677
|
color: e,
|
|
2634
2678
|
colorDark: t
|
|
@@ -2644,33 +2688,33 @@ function Ta({ color: e, colorDark: t, children: n, className: i, style: a, ...o
|
|
|
2644
2688
|
})
|
|
2645
2689
|
});
|
|
2646
2690
|
}
|
|
2647
|
-
function
|
|
2648
|
-
let { color: t, colorDark: n } =
|
|
2649
|
-
return /* @__PURE__ */ H(
|
|
2691
|
+
function ja(e) {
|
|
2692
|
+
let { color: t, colorDark: n } = We(Oa);
|
|
2693
|
+
return /* @__PURE__ */ H(Ie, {
|
|
2650
2694
|
color: t,
|
|
2651
2695
|
colorDark: n,
|
|
2652
2696
|
...e
|
|
2653
2697
|
});
|
|
2654
2698
|
}
|
|
2655
|
-
function
|
|
2699
|
+
function Ma({ children: e, className: t, ...n }) {
|
|
2656
2700
|
return /* @__PURE__ */ H("div", {
|
|
2657
2701
|
className: r("absolute top-4 right-4 z-30 flex items-center gap-2", t),
|
|
2658
2702
|
...n,
|
|
2659
2703
|
children: e
|
|
2660
2704
|
});
|
|
2661
2705
|
}
|
|
2662
|
-
function
|
|
2706
|
+
function Na({ children: e, className: t, ...n }) {
|
|
2663
2707
|
return /* @__PURE__ */ H("div", {
|
|
2664
2708
|
className: r("relative z-20 flex flex-col items-center w-full max-w-md px-6 py-4", t),
|
|
2665
2709
|
...n,
|
|
2666
2710
|
children: e
|
|
2667
2711
|
});
|
|
2668
2712
|
}
|
|
2669
|
-
function
|
|
2713
|
+
function Pa({ children: e, pulsePaused: t, className: n, ...i }) {
|
|
2670
2714
|
return /* @__PURE__ */ H("div", {
|
|
2671
2715
|
className: r("vig-login__fade-in mb-3", n),
|
|
2672
2716
|
...i,
|
|
2673
|
-
children: /* @__PURE__ */ H(
|
|
2717
|
+
children: /* @__PURE__ */ H(Qn, {
|
|
2674
2718
|
paused: t,
|
|
2675
2719
|
children: /* @__PURE__ */ H("div", {
|
|
2676
2720
|
className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-lg ring-1 ring-[rgba(var(--ff-color-rgb,37,99,235),0.2)] dark:ring-[rgba(var(--ff-color-dark-rgb,96,165,250),0.2)]",
|
|
@@ -2679,7 +2723,7 @@ function ka({ children: e, pulsePaused: t, className: n, ...i }) {
|
|
|
2679
2723
|
})
|
|
2680
2724
|
});
|
|
2681
2725
|
}
|
|
2682
|
-
function
|
|
2726
|
+
function Fa({ children: e, className: t, ...n }) {
|
|
2683
2727
|
return /* @__PURE__ */ H("div", {
|
|
2684
2728
|
className: "vig-login__fade-in-d1 text-center mb-1",
|
|
2685
2729
|
children: /* @__PURE__ */ H("h1", {
|
|
@@ -2689,7 +2733,7 @@ function Aa({ children: e, className: t, ...n }) {
|
|
|
2689
2733
|
})
|
|
2690
2734
|
});
|
|
2691
2735
|
}
|
|
2692
|
-
function
|
|
2736
|
+
function Ia({ children: e, className: t, ...n }) {
|
|
2693
2737
|
return /* @__PURE__ */ H("div", {
|
|
2694
2738
|
className: "vig-login__fade-in-d1 text-center mb-4",
|
|
2695
2739
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2699,14 +2743,14 @@ function ja({ children: e, className: t, ...n }) {
|
|
|
2699
2743
|
})
|
|
2700
2744
|
});
|
|
2701
2745
|
}
|
|
2702
|
-
function
|
|
2746
|
+
function La({ children: e, className: t, ...n }) {
|
|
2703
2747
|
return /* @__PURE__ */ H("div", {
|
|
2704
2748
|
className: r("vig-login__fade-in-d2 flex flex-wrap justify-center gap-2 mb-5", t),
|
|
2705
2749
|
...n,
|
|
2706
2750
|
children: e
|
|
2707
2751
|
});
|
|
2708
2752
|
}
|
|
2709
|
-
function
|
|
2753
|
+
function Ra({ icon: e, children: t, className: n, ...i }) {
|
|
2710
2754
|
return /* @__PURE__ */ U("div", {
|
|
2711
2755
|
className: r("vig-login__feature-pill flex items-center gap-1.5 rounded-full px-3 py-1", n),
|
|
2712
2756
|
...i,
|
|
@@ -2716,14 +2760,14 @@ function Na({ icon: e, children: t, className: n, ...i }) {
|
|
|
2716
2760
|
})]
|
|
2717
2761
|
});
|
|
2718
2762
|
}
|
|
2719
|
-
function
|
|
2763
|
+
function za({ children: e, className: t, ...n }) {
|
|
2720
2764
|
return /* @__PURE__ */ H("div", {
|
|
2721
2765
|
className: r("vig-login__fade-in-d3 w-full", t),
|
|
2722
2766
|
...n,
|
|
2723
|
-
children: /* @__PURE__ */ H(
|
|
2767
|
+
children: /* @__PURE__ */ H(Zn, { children: e })
|
|
2724
2768
|
});
|
|
2725
2769
|
}
|
|
2726
|
-
function
|
|
2770
|
+
function Ba({ children: e, className: t, ...n }) {
|
|
2727
2771
|
return /* @__PURE__ */ H("div", {
|
|
2728
2772
|
className: "vig-login__fade-in-d3 mt-4 text-center",
|
|
2729
2773
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2733,19 +2777,19 @@ function Fa({ children: e, className: t, ...n }) {
|
|
|
2733
2777
|
})
|
|
2734
2778
|
});
|
|
2735
2779
|
}
|
|
2736
|
-
var
|
|
2737
|
-
Background:
|
|
2738
|
-
Settings:
|
|
2739
|
-
Content:
|
|
2740
|
-
Logo:
|
|
2741
|
-
Title:
|
|
2742
|
-
Tagline:
|
|
2743
|
-
Features:
|
|
2744
|
-
FeaturePill:
|
|
2745
|
-
Card:
|
|
2746
|
-
Footer:
|
|
2747
|
-
}),
|
|
2748
|
-
function
|
|
2780
|
+
var Va = Object.assign(Aa, {
|
|
2781
|
+
Background: ja,
|
|
2782
|
+
Settings: Ma,
|
|
2783
|
+
Content: Na,
|
|
2784
|
+
Logo: Pa,
|
|
2785
|
+
Title: Fa,
|
|
2786
|
+
Tagline: Ia,
|
|
2787
|
+
Features: La,
|
|
2788
|
+
FeaturePill: Ra,
|
|
2789
|
+
Card: za,
|
|
2790
|
+
Footer: Ba
|
|
2791
|
+
}), Ha = He({});
|
|
2792
|
+
function Ua(e) {
|
|
2749
2793
|
if (!e) return null;
|
|
2750
2794
|
let t = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());
|
|
2751
2795
|
if (t) {
|
|
@@ -2759,13 +2803,13 @@ function Ra(e) {
|
|
|
2759
2803
|
}
|
|
2760
2804
|
return null;
|
|
2761
2805
|
}
|
|
2762
|
-
function
|
|
2806
|
+
function Wa({ color: e, colorDark: t, children: n, className: i, style: a, ...o }) {
|
|
2763
2807
|
let s = {};
|
|
2764
2808
|
e && (s["--ff-color"] = e), t ? s["--ff-color-dark"] = t : e && (s["--ff-color-dark"] = e);
|
|
2765
|
-
let c =
|
|
2809
|
+
let c = Ua(e);
|
|
2766
2810
|
c && (s["--ff-color-rgb"] = c);
|
|
2767
|
-
let l =
|
|
2768
|
-
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(
|
|
2811
|
+
let l = Ua(t) ?? c;
|
|
2812
|
+
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(Ha.Provider, {
|
|
2769
2813
|
value: {
|
|
2770
2814
|
color: e,
|
|
2771
2815
|
colorDark: t
|
|
@@ -2781,22 +2825,22 @@ function za({ color: e, colorDark: t, children: n, className: i, style: a, ...o
|
|
|
2781
2825
|
})
|
|
2782
2826
|
});
|
|
2783
2827
|
}
|
|
2784
|
-
function
|
|
2785
|
-
let { color: t, colorDark: n } =
|
|
2786
|
-
return /* @__PURE__ */ H(
|
|
2828
|
+
function Ga(e) {
|
|
2829
|
+
let { color: t, colorDark: n } = We(Ha);
|
|
2830
|
+
return /* @__PURE__ */ H(Ie, {
|
|
2787
2831
|
color: t,
|
|
2788
2832
|
colorDark: n,
|
|
2789
2833
|
...e
|
|
2790
2834
|
});
|
|
2791
2835
|
}
|
|
2792
|
-
function
|
|
2836
|
+
function Ka({ children: e, className: t, ...n }) {
|
|
2793
2837
|
return /* @__PURE__ */ H("div", {
|
|
2794
2838
|
className: r("relative z-20 flex flex-col items-center w-full max-w-lg px-6 py-6", t),
|
|
2795
2839
|
...n,
|
|
2796
2840
|
children: e
|
|
2797
2841
|
});
|
|
2798
2842
|
}
|
|
2799
|
-
function
|
|
2843
|
+
function qa({ current: e, total: t, className: n, ...i }) {
|
|
2800
2844
|
let { t: a } = W();
|
|
2801
2845
|
return /* @__PURE__ */ H("div", {
|
|
2802
2846
|
className: r("vig-sf__fade-in flex items-center gap-2 mb-4", n),
|
|
@@ -2813,12 +2857,12 @@ function Ha({ current: e, total: t, className: n, ...i }) {
|
|
|
2813
2857
|
}, `step-${n + 1}`))
|
|
2814
2858
|
});
|
|
2815
2859
|
}
|
|
2816
|
-
function
|
|
2860
|
+
function Ja({ children: e, pulsePaused: t, size: n = 80, className: i, style: a, ...o }) {
|
|
2817
2861
|
return /* @__PURE__ */ H("div", {
|
|
2818
2862
|
className: r("vig-sf__fade-in mb-4", i),
|
|
2819
2863
|
style: a,
|
|
2820
2864
|
...o,
|
|
2821
|
-
children: /* @__PURE__ */ H(
|
|
2865
|
+
children: /* @__PURE__ */ H(Qn, {
|
|
2822
2866
|
paused: t,
|
|
2823
2867
|
children: /* @__PURE__ */ H("div", {
|
|
2824
2868
|
className: "flex items-center justify-center rounded-3xl bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-xl ring-1 ring-[rgba(var(--ff-color-rgb,37,99,235),0.2)] dark:ring-[rgba(var(--ff-color-dark-rgb,96,165,250),0.2)]",
|
|
@@ -2831,7 +2875,7 @@ function Ua({ children: e, pulsePaused: t, size: n = 80, className: i, style: a,
|
|
|
2831
2875
|
})
|
|
2832
2876
|
});
|
|
2833
2877
|
}
|
|
2834
|
-
function
|
|
2878
|
+
function Ya({ children: e, className: t, ...n }) {
|
|
2835
2879
|
return /* @__PURE__ */ H("div", {
|
|
2836
2880
|
className: "vig-sf__fade-in-d1 text-center mb-2",
|
|
2837
2881
|
children: /* @__PURE__ */ H("h1", {
|
|
@@ -2841,7 +2885,7 @@ function Wa({ children: e, className: t, ...n }) {
|
|
|
2841
2885
|
})
|
|
2842
2886
|
});
|
|
2843
2887
|
}
|
|
2844
|
-
function
|
|
2888
|
+
function Xa({ children: e, className: t, ...n }) {
|
|
2845
2889
|
return /* @__PURE__ */ H("div", {
|
|
2846
2890
|
className: "vig-sf__fade-in-d1 text-center mb-5",
|
|
2847
2891
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2851,21 +2895,21 @@ function Ga({ children: e, className: t, ...n }) {
|
|
|
2851
2895
|
})
|
|
2852
2896
|
});
|
|
2853
2897
|
}
|
|
2854
|
-
function
|
|
2898
|
+
function Za({ children: e, className: t, ...n }) {
|
|
2855
2899
|
return /* @__PURE__ */ H("div", {
|
|
2856
2900
|
className: r("vig-sf__fade-in-d2 w-full", t),
|
|
2857
2901
|
...n,
|
|
2858
|
-
children: /* @__PURE__ */ H(
|
|
2902
|
+
children: /* @__PURE__ */ H(Zn, { children: e })
|
|
2859
2903
|
});
|
|
2860
2904
|
}
|
|
2861
|
-
function
|
|
2905
|
+
function Qa({ children: e, className: t, ...n }) {
|
|
2862
2906
|
return /* @__PURE__ */ H("div", {
|
|
2863
2907
|
className: r("vig-sf__fade-in-d3 w-full mt-4 flex items-center justify-between gap-3", t),
|
|
2864
2908
|
...n,
|
|
2865
2909
|
children: e
|
|
2866
2910
|
});
|
|
2867
2911
|
}
|
|
2868
|
-
function
|
|
2912
|
+
function $a({ children: e, className: t, ...n }) {
|
|
2869
2913
|
return /* @__PURE__ */ H("div", {
|
|
2870
2914
|
className: "vig-sf__fade-in-d3 mt-6 text-center",
|
|
2871
2915
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2875,28 +2919,28 @@ function Ja({ children: e, className: t, ...n }) {
|
|
|
2875
2919
|
})
|
|
2876
2920
|
});
|
|
2877
2921
|
}
|
|
2878
|
-
function
|
|
2922
|
+
function eo({ icon: e, children: t, className: n, ...i }) {
|
|
2879
2923
|
return /* @__PURE__ */ U("div", {
|
|
2880
2924
|
className: r("vig-sf__hint flex items-start gap-2 rounded-lg px-3 py-2 text-xs text-slate-600 dark:text-slate-300", n),
|
|
2881
2925
|
...i,
|
|
2882
2926
|
children: [e, /* @__PURE__ */ H("span", { children: t })]
|
|
2883
2927
|
});
|
|
2884
2928
|
}
|
|
2885
|
-
var
|
|
2886
|
-
Background:
|
|
2887
|
-
Content:
|
|
2888
|
-
Steps:
|
|
2889
|
-
Logo:
|
|
2890
|
-
Title:
|
|
2891
|
-
Description:
|
|
2892
|
-
Card:
|
|
2893
|
-
Actions:
|
|
2894
|
-
Footer:
|
|
2895
|
-
Hint:
|
|
2929
|
+
var to = Object.assign(Wa, {
|
|
2930
|
+
Background: Ga,
|
|
2931
|
+
Content: Ka,
|
|
2932
|
+
Steps: qa,
|
|
2933
|
+
Logo: Ja,
|
|
2934
|
+
Title: Ya,
|
|
2935
|
+
Description: Xa,
|
|
2936
|
+
Card: Za,
|
|
2937
|
+
Actions: Qa,
|
|
2938
|
+
Footer: $a,
|
|
2939
|
+
Hint: eo
|
|
2896
2940
|
});
|
|
2897
2941
|
//#endregion
|
|
2898
2942
|
//#region src/components/app-footer.tsx
|
|
2899
|
-
function
|
|
2943
|
+
function no({ logo: e, productName: t, version: n, links: r = [] }) {
|
|
2900
2944
|
return /* @__PURE__ */ U("footer", {
|
|
2901
2945
|
className: "mt-auto",
|
|
2902
2946
|
children: [/* @__PURE__ */ H("div", { className: "mx-6 border-t" }), /* @__PURE__ */ U("div", {
|
|
@@ -2907,7 +2951,7 @@ function Za({ logo: e, productName: t, version: n, links: r = [] }) {
|
|
|
2907
2951
|
className: "text-xs text-muted-foreground",
|
|
2908
2952
|
children: [t, n ? ` ${n}` : ""]
|
|
2909
2953
|
}),
|
|
2910
|
-
r.map((e) => /* @__PURE__ */ U(
|
|
2954
|
+
r.map((e) => /* @__PURE__ */ U(Ve.Fragment, { children: [/* @__PURE__ */ H("span", {
|
|
2911
2955
|
"aria-hidden": "true",
|
|
2912
2956
|
className: "text-xs text-muted-foreground/40",
|
|
2913
2957
|
children: "·"
|
|
@@ -2924,18 +2968,18 @@ function Za({ logo: e, productName: t, version: n, links: r = [] }) {
|
|
|
2924
2968
|
}
|
|
2925
2969
|
//#endregion
|
|
2926
2970
|
//#region src/components/app-switcher.tsx
|
|
2927
|
-
function
|
|
2971
|
+
function ro({ open: e, onToggle: t, apps: n, triggerTitle: r, closeLabel: i, showTrigger: a = !0, headerHeight: o = 56 }) {
|
|
2928
2972
|
let { t: s } = W(), c = r ?? s("common.apps"), l = i ?? s("common.closeAppSwitcher"), u = {
|
|
2929
2973
|
top: `${o}px`,
|
|
2930
2974
|
height: `calc(100vh - ${o}px)`
|
|
2931
2975
|
};
|
|
2932
|
-
return /* @__PURE__ */ U(
|
|
2976
|
+
return /* @__PURE__ */ U(qe, { children: [
|
|
2933
2977
|
a && /* @__PURE__ */ H("button", {
|
|
2934
2978
|
type: "button",
|
|
2935
2979
|
title: c,
|
|
2936
2980
|
onClick: t,
|
|
2937
2981
|
className: `inline-flex items-center justify-center rounded-full w-9 h-9 transition-colors ${e ? "text-foreground bg-accent" : "text-muted-foreground hover:text-foreground hover:bg-accent"}`,
|
|
2938
|
-
children: /* @__PURE__ */ H(
|
|
2982
|
+
children: /* @__PURE__ */ H(Ut, { className: "h-5 w-5" })
|
|
2939
2983
|
}),
|
|
2940
2984
|
e && /* @__PURE__ */ H("button", {
|
|
2941
2985
|
type: "button",
|
|
@@ -2949,7 +2993,7 @@ function Qa({ open: e, onToggle: t, apps: n, triggerTitle: r, closeLabel: i, sho
|
|
|
2949
2993
|
style: u,
|
|
2950
2994
|
children: /* @__PURE__ */ H("div", {
|
|
2951
2995
|
className: "p-4",
|
|
2952
|
-
children: n.map((e) => /* @__PURE__ */ H(
|
|
2996
|
+
children: n.map((e) => /* @__PURE__ */ H(io, {
|
|
2953
2997
|
app: e,
|
|
2954
2998
|
onToggle: t
|
|
2955
2999
|
}, e.id))
|
|
@@ -2957,7 +3001,7 @@ function Qa({ open: e, onToggle: t, apps: n, triggerTitle: r, closeLabel: i, sho
|
|
|
2957
3001
|
})
|
|
2958
3002
|
] });
|
|
2959
3003
|
}
|
|
2960
|
-
function
|
|
3004
|
+
function io({ app: e, onToggle: t }) {
|
|
2961
3005
|
let { t: n } = W(), r = e.name.includes(".") ? n(e.name, { defaultValue: e.name }) : e.name;
|
|
2962
3006
|
return /* @__PURE__ */ U("a", {
|
|
2963
3007
|
href: e.href,
|
|
@@ -2966,7 +3010,7 @@ function $a({ app: e, onToggle: t }) {
|
|
|
2966
3010
|
onClick: t,
|
|
2967
3011
|
className: `flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors ${e.active ? "bg-accent font-medium" : "hover:bg-accent"}`,
|
|
2968
3012
|
children: [
|
|
2969
|
-
e.active && /* @__PURE__ */ H(
|
|
3013
|
+
e.active && /* @__PURE__ */ H(ae, { className: "h-4 w-4 text-[var(--vg-brand,#C2410C)] shrink-0" }),
|
|
2970
3014
|
e.image ? /* @__PURE__ */ H("img", {
|
|
2971
3015
|
src: e.image,
|
|
2972
3016
|
alt: "",
|
|
@@ -2983,11 +3027,11 @@ function $a({ app: e, onToggle: t }) {
|
|
|
2983
3027
|
className: "text-sm flex-1",
|
|
2984
3028
|
children: r
|
|
2985
3029
|
}),
|
|
2986
|
-
e.external && /* @__PURE__ */ H(
|
|
3030
|
+
e.external && /* @__PURE__ */ H(zt, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
2987
3031
|
]
|
|
2988
3032
|
});
|
|
2989
3033
|
}
|
|
2990
|
-
var
|
|
3034
|
+
var ao = new class {
|
|
2991
3035
|
status = "online";
|
|
2992
3036
|
listeners = /* @__PURE__ */ new Set();
|
|
2993
3037
|
get current() {
|
|
@@ -3002,27 +3046,27 @@ var eo = new class {
|
|
|
3002
3046
|
};
|
|
3003
3047
|
}
|
|
3004
3048
|
}();
|
|
3005
|
-
function
|
|
3006
|
-
|
|
3049
|
+
function oo() {
|
|
3050
|
+
ao.set("offline");
|
|
3007
3051
|
}
|
|
3008
|
-
function
|
|
3009
|
-
|
|
3052
|
+
function so() {
|
|
3053
|
+
ao.set("online");
|
|
3010
3054
|
}
|
|
3011
|
-
var
|
|
3012
|
-
function
|
|
3013
|
-
let e =
|
|
3055
|
+
var co = He(null);
|
|
3056
|
+
function lo() {
|
|
3057
|
+
let e = We(co);
|
|
3014
3058
|
if (!e) throw Error("useBackendStatus must be used inside <BackendStatusProvider>");
|
|
3015
3059
|
return e;
|
|
3016
3060
|
}
|
|
3017
|
-
function
|
|
3018
|
-
let [i, a] =
|
|
3019
|
-
B(() =>
|
|
3020
|
-
let o =
|
|
3021
|
-
|
|
3061
|
+
function uo({ healthEndpoint: e = "/api/v2/ping", pollInterval: t = 5e3, showBanner: n = !0, children: r }) {
|
|
3062
|
+
let [i, a] = Ke(ao.current);
|
|
3063
|
+
B(() => ao.subscribe(a), []);
|
|
3064
|
+
let o = Ue(async () => {
|
|
3065
|
+
ao.set("checking");
|
|
3022
3066
|
try {
|
|
3023
|
-
await Y.get(e, { timeout: 4e3 }),
|
|
3067
|
+
await Y.get(e, { timeout: 4e3 }), ao.set("online");
|
|
3024
3068
|
} catch {
|
|
3025
|
-
|
|
3069
|
+
ao.set("offline");
|
|
3026
3070
|
}
|
|
3027
3071
|
}, [e]);
|
|
3028
3072
|
return B(() => {
|
|
@@ -3033,16 +3077,16 @@ function ao({ healthEndpoint: e = "/api/v2/ping", pollInterval: t = 5e3, showBan
|
|
|
3033
3077
|
i,
|
|
3034
3078
|
t,
|
|
3035
3079
|
o
|
|
3036
|
-
]), /* @__PURE__ */ U(
|
|
3080
|
+
]), /* @__PURE__ */ U(co.Provider, {
|
|
3037
3081
|
value: {
|
|
3038
3082
|
status: i,
|
|
3039
3083
|
retry: o
|
|
3040
3084
|
},
|
|
3041
|
-
children: [n && /* @__PURE__ */ H(
|
|
3085
|
+
children: [n && /* @__PURE__ */ H(fo, {}), r]
|
|
3042
3086
|
});
|
|
3043
3087
|
}
|
|
3044
|
-
function
|
|
3045
|
-
let { status: e, retry: t } =
|
|
3088
|
+
function fo() {
|
|
3089
|
+
let { status: e, retry: t } = lo(), { t: n } = W();
|
|
3046
3090
|
if (e === "online") return null;
|
|
3047
3091
|
let r = e === "checking";
|
|
3048
3092
|
return /* @__PURE__ */ H("div", {
|
|
@@ -3052,7 +3096,7 @@ function oo() {
|
|
|
3052
3096
|
children: /* @__PURE__ */ U("div", {
|
|
3053
3097
|
className: "flex items-center gap-3 px-4 py-2 text-sm",
|
|
3054
3098
|
children: [
|
|
3055
|
-
r ? /* @__PURE__ */ H(
|
|
3099
|
+
r ? /* @__PURE__ */ H(st, { className: "size-4 animate-spin shrink-0" }) : /* @__PURE__ */ H(nt, { className: "size-4 shrink-0" }),
|
|
3056
3100
|
/* @__PURE__ */ H("span", {
|
|
3057
3101
|
className: "flex-1",
|
|
3058
3102
|
children: n(r ? "backendStatus.checking" : "backendStatus.offline", r ? "Reconnecting to the server..." : "Server unavailable. Retrying...")
|
|
@@ -3064,7 +3108,7 @@ function oo() {
|
|
|
3064
3108
|
onClick: t,
|
|
3065
3109
|
disabled: r,
|
|
3066
3110
|
className: "text-amber-900 dark:text-amber-100 hover:bg-amber-500/20",
|
|
3067
|
-
children: [/* @__PURE__ */ H(
|
|
3111
|
+
children: [/* @__PURE__ */ H(lt, { className: `size-4 ${r ? "animate-spin" : ""}` }), n("backendStatus.retry", "Retry now")]
|
|
3068
3112
|
})
|
|
3069
3113
|
]
|
|
3070
3114
|
})
|
|
@@ -3072,7 +3116,7 @@ function oo() {
|
|
|
3072
3116
|
}
|
|
3073
3117
|
//#endregion
|
|
3074
3118
|
//#region src/components/error-boundary.tsx
|
|
3075
|
-
var
|
|
3119
|
+
var po = class extends Ve.Component {
|
|
3076
3120
|
state = { hasError: !1 };
|
|
3077
3121
|
static getDerivedStateFromError(e) {
|
|
3078
3122
|
return {
|
|
@@ -3095,10 +3139,10 @@ var so = class extends Be.Component {
|
|
|
3095
3139
|
return this.props.fallback ? this.props.fallback({
|
|
3096
3140
|
error: e,
|
|
3097
3141
|
reset: this.reset
|
|
3098
|
-
}) : /* @__PURE__ */ H(
|
|
3142
|
+
}) : /* @__PURE__ */ H(mo, { error: e });
|
|
3099
3143
|
}
|
|
3100
3144
|
};
|
|
3101
|
-
function
|
|
3145
|
+
function mo({ error: e }) {
|
|
3102
3146
|
let { t } = W();
|
|
3103
3147
|
return /* @__PURE__ */ H("div", {
|
|
3104
3148
|
className: "flex items-center justify-center min-h-[80vh] px-6 py-16",
|
|
@@ -3111,7 +3155,7 @@ function co({ error: e }) {
|
|
|
3111
3155
|
className: "relative",
|
|
3112
3156
|
children: [/* @__PURE__ */ H("div", { className: "absolute inset-0 rounded-2xl bg-gradient-to-br from-red-500/20 to-rose-500/20 blur-xl animate-pulse" }), /* @__PURE__ */ H("div", {
|
|
3113
3157
|
className: "relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-red-600 to-rose-600 shadow-lg shadow-red-500/25 ring-4 ring-red-500/10",
|
|
3114
|
-
children: /* @__PURE__ */ H(
|
|
3158
|
+
children: /* @__PURE__ */ H(rt, {
|
|
3115
3159
|
className: "text-white",
|
|
3116
3160
|
size: 30
|
|
3117
3161
|
})
|
|
@@ -3137,7 +3181,7 @@ function co({ error: e }) {
|
|
|
3137
3181
|
/* @__PURE__ */ U(v, {
|
|
3138
3182
|
size: "lg",
|
|
3139
3183
|
onClick: () => window.location.reload(),
|
|
3140
|
-
children: [/* @__PURE__ */ H(
|
|
3184
|
+
children: [/* @__PURE__ */ H(lt, { className: "size-4" }), t("errorBoundary.reload", "Reload page")]
|
|
3141
3185
|
})
|
|
3142
3186
|
]
|
|
3143
3187
|
})
|
|
@@ -3146,7 +3190,7 @@ function co({ error: e }) {
|
|
|
3146
3190
|
}
|
|
3147
3191
|
//#endregion
|
|
3148
3192
|
//#region src/components/language-select.tsx
|
|
3149
|
-
function
|
|
3193
|
+
function ho({ value: e, onValueChange: t, locales: n, extraLocaleValues: r = [], placeholder: i, className: a }) {
|
|
3150
3194
|
let { t: o } = W(), s = i ?? o("forms.common.chooseLanguage"), c = /* @__PURE__ */ new Map();
|
|
3151
3195
|
n.forEach((e) => {
|
|
3152
3196
|
c.set(e.initials, {
|
|
@@ -3164,10 +3208,10 @@ function lo({ value: e, onValueChange: t, locales: n, extraLocaleValues: r = [],
|
|
|
3164
3208
|
name: t.name,
|
|
3165
3209
|
label: t.label
|
|
3166
3210
|
})), u = l.find((t) => t.value === e);
|
|
3167
|
-
return /* @__PURE__ */ U(
|
|
3211
|
+
return /* @__PURE__ */ U(yr, {
|
|
3168
3212
|
value: e,
|
|
3169
3213
|
onValueChange: t,
|
|
3170
|
-
children: [/* @__PURE__ */ H(
|
|
3214
|
+
children: [/* @__PURE__ */ H(Sr, {
|
|
3171
3215
|
className: a,
|
|
3172
3216
|
"aria-label": s,
|
|
3173
3217
|
children: u ? /* @__PURE__ */ U("div", {
|
|
@@ -3180,7 +3224,7 @@ function lo({ value: e, onValueChange: t, locales: n, extraLocaleValues: r = [],
|
|
|
3180
3224
|
className: "text-muted-foreground",
|
|
3181
3225
|
children: s
|
|
3182
3226
|
})
|
|
3183
|
-
}), /* @__PURE__ */ H(
|
|
3227
|
+
}), /* @__PURE__ */ H(Cr, { children: l.map((e) => /* @__PURE__ */ H(Tr, {
|
|
3184
3228
|
value: e.value,
|
|
3185
3229
|
children: /* @__PURE__ */ U("div", {
|
|
3186
3230
|
className: "flex items-center gap-2",
|
|
@@ -3191,7 +3235,7 @@ function lo({ value: e, onValueChange: t, locales: n, extraLocaleValues: r = [],
|
|
|
3191
3235
|
}
|
|
3192
3236
|
//#endregion
|
|
3193
3237
|
//#region src/components/language-switcher.tsx
|
|
3194
|
-
var
|
|
3238
|
+
var go = [{
|
|
3195
3239
|
code: "en",
|
|
3196
3240
|
label: "English",
|
|
3197
3241
|
flag: "🇺🇸"
|
|
@@ -3200,21 +3244,21 @@ var uo = [{
|
|
|
3200
3244
|
label: "Português",
|
|
3201
3245
|
flag: "🇧🇷"
|
|
3202
3246
|
}];
|
|
3203
|
-
function
|
|
3247
|
+
function _o({ languages: e = go }) {
|
|
3204
3248
|
let { i18n: t, t: n } = W();
|
|
3205
|
-
return /* @__PURE__ */ U(
|
|
3249
|
+
return /* @__PURE__ */ U(P, { children: [/* @__PURE__ */ H(De, {
|
|
3206
3250
|
asChild: !0,
|
|
3207
3251
|
children: /* @__PURE__ */ U(v, {
|
|
3208
3252
|
variant: "outline",
|
|
3209
3253
|
size: "sm",
|
|
3210
|
-
children: [/* @__PURE__ */ H(
|
|
3254
|
+
children: [/* @__PURE__ */ H(Vt, { className: "h-[1.2rem] w-[1.2rem]" }), /* @__PURE__ */ H("span", {
|
|
3211
3255
|
className: "sr-only",
|
|
3212
3256
|
children: n("language.toggle")
|
|
3213
3257
|
})]
|
|
3214
3258
|
})
|
|
3215
|
-
}), /* @__PURE__ */ H(
|
|
3259
|
+
}), /* @__PURE__ */ H(D, {
|
|
3216
3260
|
align: "end",
|
|
3217
|
-
children: e.map((e) => /* @__PURE__ */ U(
|
|
3261
|
+
children: e.map((e) => /* @__PURE__ */ U(M, {
|
|
3218
3262
|
onClick: () => t.changeLanguage(e.code),
|
|
3219
3263
|
className: t.language === e.code ? "font-semibold bg-accent" : "",
|
|
3220
3264
|
children: [e.flag && /* @__PURE__ */ H("span", {
|
|
@@ -3226,8 +3270,8 @@ function fo({ languages: e = uo }) {
|
|
|
3226
3270
|
}
|
|
3227
3271
|
//#endregion
|
|
3228
3272
|
//#region src/components/theme-provider.tsx
|
|
3229
|
-
function
|
|
3230
|
-
return /* @__PURE__ */ H(
|
|
3273
|
+
function vo({ children: e, defaultTheme: t = "system", storageKey: n = "vite-ui-theme", ...r }) {
|
|
3274
|
+
return /* @__PURE__ */ H(vt, {
|
|
3231
3275
|
attribute: "class",
|
|
3232
3276
|
enableSystem: !0,
|
|
3233
3277
|
defaultTheme: t,
|
|
@@ -3236,8 +3280,8 @@ function po({ children: e, defaultTheme: t = "system", storageKey: n = "vite-ui-
|
|
|
3236
3280
|
children: e
|
|
3237
3281
|
});
|
|
3238
3282
|
}
|
|
3239
|
-
var
|
|
3240
|
-
let { theme: e, setTheme: t } =
|
|
3283
|
+
var yo = () => {
|
|
3284
|
+
let { theme: e, setTheme: t } = yt();
|
|
3241
3285
|
return {
|
|
3242
3286
|
theme: e ?? "system",
|
|
3243
3287
|
setTheme: t
|
|
@@ -3245,61 +3289,61 @@ var mo = () => {
|
|
|
3245
3289
|
};
|
|
3246
3290
|
//#endregion
|
|
3247
3291
|
//#region src/components/mode-toggle.tsx
|
|
3248
|
-
function
|
|
3249
|
-
let { setTheme: e } =
|
|
3250
|
-
return /* @__PURE__ */ U(
|
|
3292
|
+
function bo() {
|
|
3293
|
+
let { setTheme: e } = yo(), { t } = W();
|
|
3294
|
+
return /* @__PURE__ */ U(P, { children: [/* @__PURE__ */ H(De, {
|
|
3251
3295
|
asChild: !0,
|
|
3252
3296
|
children: /* @__PURE__ */ U(v, {
|
|
3253
3297
|
variant: "outline",
|
|
3254
3298
|
size: "sm",
|
|
3255
3299
|
children: [
|
|
3256
|
-
/* @__PURE__ */ H(
|
|
3257
|
-
/* @__PURE__ */ H(
|
|
3300
|
+
/* @__PURE__ */ H($t, { className: "h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90" }),
|
|
3301
|
+
/* @__PURE__ */ H(Yt, { className: "absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0" }),
|
|
3258
3302
|
/* @__PURE__ */ H("span", {
|
|
3259
3303
|
className: "sr-only",
|
|
3260
3304
|
children: t("theme.toggle")
|
|
3261
3305
|
})
|
|
3262
3306
|
]
|
|
3263
3307
|
})
|
|
3264
|
-
}), /* @__PURE__ */ U(
|
|
3308
|
+
}), /* @__PURE__ */ U(D, {
|
|
3265
3309
|
align: "end",
|
|
3266
3310
|
children: [
|
|
3267
|
-
/* @__PURE__ */ H(
|
|
3311
|
+
/* @__PURE__ */ H(M, {
|
|
3268
3312
|
onClick: () => e("light"),
|
|
3269
3313
|
children: t("theme.light")
|
|
3270
3314
|
}),
|
|
3271
|
-
/* @__PURE__ */ H(
|
|
3315
|
+
/* @__PURE__ */ H(M, {
|
|
3272
3316
|
onClick: () => e("dark"),
|
|
3273
3317
|
children: t("theme.dark")
|
|
3274
3318
|
}),
|
|
3275
|
-
/* @__PURE__ */ H(
|
|
3319
|
+
/* @__PURE__ */ H(M, {
|
|
3276
3320
|
onClick: () => e("system"),
|
|
3277
3321
|
children: t("theme.system")
|
|
3278
3322
|
})
|
|
3279
3323
|
]
|
|
3280
3324
|
})] });
|
|
3281
3325
|
}
|
|
3282
|
-
var
|
|
3326
|
+
var xo = [
|
|
3283
3327
|
{
|
|
3284
3328
|
value: "light",
|
|
3285
3329
|
labelKey: "theme.light",
|
|
3286
|
-
icon:
|
|
3330
|
+
icon: $t
|
|
3287
3331
|
},
|
|
3288
3332
|
{
|
|
3289
3333
|
value: "dark",
|
|
3290
3334
|
labelKey: "theme.dark",
|
|
3291
|
-
icon:
|
|
3335
|
+
icon: Yt
|
|
3292
3336
|
},
|
|
3293
3337
|
{
|
|
3294
3338
|
value: "system",
|
|
3295
3339
|
labelKey: "theme.system",
|
|
3296
|
-
icon:
|
|
3340
|
+
icon: qt
|
|
3297
3341
|
}
|
|
3298
3342
|
];
|
|
3299
|
-
function
|
|
3300
|
-
let { theme: e, setTheme: t } =
|
|
3343
|
+
function So() {
|
|
3344
|
+
let { theme: e, setTheme: t } = yo(), { t: n } = W(), r = xo.find((t) => t.value === e) ?? xo[2];
|
|
3301
3345
|
function i() {
|
|
3302
|
-
let n =
|
|
3346
|
+
let n = xo[(xo.findIndex((t) => t.value === e) + 1) % xo.length];
|
|
3303
3347
|
t(n.value);
|
|
3304
3348
|
}
|
|
3305
3349
|
let a = r.icon;
|
|
@@ -3313,10 +3357,10 @@ function _o() {
|
|
|
3313
3357
|
}
|
|
3314
3358
|
//#endregion
|
|
3315
3359
|
//#region src/components/nav-secondary.tsx
|
|
3316
|
-
function
|
|
3317
|
-
return /* @__PURE__ */ H(
|
|
3360
|
+
function Co({ items: e, ...t }) {
|
|
3361
|
+
return /* @__PURE__ */ H(ai, {
|
|
3318
3362
|
...t,
|
|
3319
|
-
children: /* @__PURE__ */ H(
|
|
3363
|
+
children: /* @__PURE__ */ H(ci, { children: /* @__PURE__ */ H(li, { children: e.map((e) => /* @__PURE__ */ H(ui, { children: /* @__PURE__ */ H(fi, {
|
|
3320
3364
|
asChild: !0,
|
|
3321
3365
|
children: /* @__PURE__ */ U("a", {
|
|
3322
3366
|
href: e.url,
|
|
@@ -3327,22 +3371,22 @@ function vo({ items: e, ...t }) {
|
|
|
3327
3371
|
}
|
|
3328
3372
|
//#endregion
|
|
3329
3373
|
//#region src/components/viglet-app-switcher.tsx
|
|
3330
|
-
var
|
|
3374
|
+
var wo = {
|
|
3331
3375
|
cloud: "https://console.viglet.cloud",
|
|
3332
3376
|
turing: "https://turing.viglet.cloud",
|
|
3333
3377
|
shio: "https://shio.viglet.cloud",
|
|
3334
3378
|
dumont: "https://dumont.viglet.cloud",
|
|
3335
3379
|
docs: "https://docs.viglet.org"
|
|
3336
3380
|
};
|
|
3337
|
-
function
|
|
3381
|
+
function To({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i, closeLabel: a, headerHeight: o = 56 }) {
|
|
3338
3382
|
let { t: s } = W(), c = {
|
|
3339
|
-
...
|
|
3383
|
+
...wo,
|
|
3340
3384
|
...r
|
|
3341
3385
|
}, l = [
|
|
3342
3386
|
{
|
|
3343
3387
|
id: "cloud",
|
|
3344
3388
|
name: "Viglet Cloud",
|
|
3345
|
-
icon: /* @__PURE__ */ H(
|
|
3389
|
+
icon: /* @__PURE__ */ H(Ft, { className: "h-4 w-4" }),
|
|
3346
3390
|
iconBg: "bg-linear-to-br from-[#C2410C] to-[#F97316]",
|
|
3347
3391
|
href: n === "cloud" ? "/" : c.cloud,
|
|
3348
3392
|
external: n !== "cloud",
|
|
@@ -3351,7 +3395,7 @@ function bo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i,
|
|
|
3351
3395
|
{
|
|
3352
3396
|
id: "turing",
|
|
3353
3397
|
name: "Turing ES",
|
|
3354
|
-
image:
|
|
3398
|
+
image: Le,
|
|
3355
3399
|
href: n === "turing" ? "/" : c.turing,
|
|
3356
3400
|
external: n !== "turing",
|
|
3357
3401
|
active: n === "turing"
|
|
@@ -3359,7 +3403,7 @@ function bo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i,
|
|
|
3359
3403
|
{
|
|
3360
3404
|
id: "shio",
|
|
3361
3405
|
name: "Shio CMS",
|
|
3362
|
-
image:
|
|
3406
|
+
image: ze,
|
|
3363
3407
|
href: n === "shio" ? "/" : c.shio,
|
|
3364
3408
|
external: n !== "shio",
|
|
3365
3409
|
active: n === "shio"
|
|
@@ -3367,7 +3411,7 @@ function bo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i,
|
|
|
3367
3411
|
{
|
|
3368
3412
|
id: "dumont",
|
|
3369
3413
|
name: "Dumont DEP",
|
|
3370
|
-
image:
|
|
3414
|
+
image: Re,
|
|
3371
3415
|
href: n === "dumont" ? "/" : c.dumont,
|
|
3372
3416
|
external: n !== "dumont",
|
|
3373
3417
|
active: n === "dumont"
|
|
@@ -3375,13 +3419,13 @@ function bo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i,
|
|
|
3375
3419
|
{
|
|
3376
3420
|
id: "docs",
|
|
3377
3421
|
name: s("common.docs", { defaultValue: "Documentation" }),
|
|
3378
|
-
icon: /* @__PURE__ */ H(
|
|
3422
|
+
icon: /* @__PURE__ */ H(Dt, { className: "h-4 w-4" }),
|
|
3379
3423
|
iconBg: "bg-linear-to-br from-violet-500 to-purple-600",
|
|
3380
3424
|
href: c.docs,
|
|
3381
3425
|
external: !0
|
|
3382
3426
|
}
|
|
3383
3427
|
], u = i ?? s("common.apps", { defaultValue: "Apps" });
|
|
3384
|
-
return /* @__PURE__ */ H(
|
|
3428
|
+
return /* @__PURE__ */ H(ro, {
|
|
3385
3429
|
open: e,
|
|
3386
3430
|
onToggle: t,
|
|
3387
3431
|
apps: l,
|
|
@@ -3392,19 +3436,19 @@ function bo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i,
|
|
|
3392
3436
|
}
|
|
3393
3437
|
//#endregion
|
|
3394
3438
|
//#region src/hooks/use-date-locale.ts
|
|
3395
|
-
var
|
|
3396
|
-
en:
|
|
3397
|
-
pt:
|
|
3439
|
+
var Eo = {
|
|
3440
|
+
en: Ct,
|
|
3441
|
+
pt: wt
|
|
3398
3442
|
};
|
|
3399
|
-
function
|
|
3443
|
+
function Do() {
|
|
3400
3444
|
let { i18n: e } = W();
|
|
3401
|
-
return
|
|
3445
|
+
return Ge(() => Eo[e.language?.substring(0, 2)] ?? Ct, [e.language]);
|
|
3402
3446
|
}
|
|
3403
3447
|
//#endregion
|
|
3404
3448
|
//#region src/hooks/use-grid-adapter.ts
|
|
3405
|
-
function
|
|
3449
|
+
function Oo(e, t) {
|
|
3406
3450
|
let { id: n, name: r, description: i, url: a, icon: o } = t;
|
|
3407
|
-
return
|
|
3451
|
+
return Ge(() => {
|
|
3408
3452
|
if (!Array.isArray(e) || e.length === 0) return [];
|
|
3409
3453
|
let t = (e, t) => {
|
|
3410
3454
|
if (typeof t == "function") return t(e);
|
|
@@ -3435,15 +3479,15 @@ function Co(e, t) {
|
|
|
3435
3479
|
}
|
|
3436
3480
|
//#endregion
|
|
3437
3481
|
//#region src/contexts/breadcrumb.context.tsx
|
|
3438
|
-
var
|
|
3439
|
-
function
|
|
3440
|
-
let [t, n] =
|
|
3482
|
+
var ko = He(void 0);
|
|
3483
|
+
function Ao({ children: e }) {
|
|
3484
|
+
let [t, n] = Ke([]), r = Ue((e) => {
|
|
3441
3485
|
n((t) => t.length > 0 && t[t.length - 1].label === e.label ? t : [...t, e]);
|
|
3442
|
-
}, []), i =
|
|
3486
|
+
}, []), i = Ue(() => {
|
|
3443
3487
|
n((e) => e.slice(0, -1));
|
|
3444
|
-
}, []), a =
|
|
3488
|
+
}, []), a = Ue((e = []) => {
|
|
3445
3489
|
n(e);
|
|
3446
|
-
}, []), o =
|
|
3490
|
+
}, []), o = Ge(() => ({
|
|
3447
3491
|
items: t,
|
|
3448
3492
|
setItems: n,
|
|
3449
3493
|
pushItem: r,
|
|
@@ -3455,20 +3499,20 @@ function To({ children: e }) {
|
|
|
3455
3499
|
i,
|
|
3456
3500
|
a
|
|
3457
3501
|
]);
|
|
3458
|
-
return /* @__PURE__ */ H(
|
|
3502
|
+
return /* @__PURE__ */ H(ko.Provider, {
|
|
3459
3503
|
value: o,
|
|
3460
3504
|
children: e
|
|
3461
3505
|
});
|
|
3462
3506
|
}
|
|
3463
|
-
var
|
|
3464
|
-
let e =
|
|
3507
|
+
var jo = () => {
|
|
3508
|
+
let e = We(ko);
|
|
3465
3509
|
if (!e) throw Error("useBreadcrumb must be used within Provider");
|
|
3466
3510
|
return e;
|
|
3467
|
-
},
|
|
3511
|
+
}, Mo = () => We(ko);
|
|
3468
3512
|
//#endregion
|
|
3469
3513
|
//#region src/hooks/use-sub-page-breadcrumb.ts
|
|
3470
|
-
function
|
|
3471
|
-
let t =
|
|
3514
|
+
function No(e) {
|
|
3515
|
+
let t = Mo()?.setItems, n = V([]);
|
|
3472
3516
|
B(() => {
|
|
3473
3517
|
if (e === void 0 || !t) return;
|
|
3474
3518
|
let r = typeof e == "string" ? [{ label: e }] : Array.isArray(e) ? e : [e], i = n.current;
|
|
@@ -3495,28 +3539,28 @@ function Oo(e) {
|
|
|
3495
3539
|
}
|
|
3496
3540
|
//#endregion
|
|
3497
3541
|
//#region src/hooks/use-assistant-notifications.ts
|
|
3498
|
-
var
|
|
3542
|
+
var Po = {
|
|
3499
3543
|
loading: "working",
|
|
3500
3544
|
success: "success",
|
|
3501
3545
|
error: "error",
|
|
3502
3546
|
warning: "attention",
|
|
3503
3547
|
info: "attention"
|
|
3504
|
-
},
|
|
3548
|
+
}, Fo = [
|
|
3505
3549
|
"working",
|
|
3506
3550
|
"error",
|
|
3507
3551
|
"attention",
|
|
3508
3552
|
"success"
|
|
3509
3553
|
];
|
|
3510
|
-
function
|
|
3554
|
+
function Io(e) {
|
|
3511
3555
|
let { title: t } = e;
|
|
3512
3556
|
return typeof t == "string" ? t : typeof t == "number" ? String(t) : null;
|
|
3513
3557
|
}
|
|
3514
|
-
function
|
|
3515
|
-
let { toasts: e } =
|
|
3516
|
-
for (let e of
|
|
3517
|
-
let i = t.find((t) =>
|
|
3558
|
+
function Lo() {
|
|
3559
|
+
let { toasts: e } = bt(), t = e.filter((e) => !e.delete), n = "idle", r = null;
|
|
3560
|
+
for (let e of Fo) {
|
|
3561
|
+
let i = t.find((t) => Po[t.type ?? ""] === e);
|
|
3518
3562
|
if (i) {
|
|
3519
|
-
n = e, r =
|
|
3563
|
+
n = e, r = Io(i);
|
|
3520
3564
|
break;
|
|
3521
3565
|
}
|
|
3522
3566
|
}
|
|
@@ -3528,8 +3572,8 @@ function Mo() {
|
|
|
3528
3572
|
}
|
|
3529
3573
|
//#endregion
|
|
3530
3574
|
//#region src/lib/axios.ts
|
|
3531
|
-
var
|
|
3532
|
-
function
|
|
3575
|
+
var Ro = "X-XSRF-TOKEN", zo = "/csrf", $ = null, Bo = Y.create({ withCredentials: !0 });
|
|
3576
|
+
function Vo(e) {
|
|
3533
3577
|
return [
|
|
3534
3578
|
"post",
|
|
3535
3579
|
"put",
|
|
@@ -3537,58 +3581,58 @@ function Io(e) {
|
|
|
3537
3581
|
"patch"
|
|
3538
3582
|
].includes(e?.toLowerCase() || "");
|
|
3539
3583
|
}
|
|
3540
|
-
function
|
|
3541
|
-
return e ? typeof e == "object" && e && "get" in e && typeof e.get == "function" ? e.get(
|
|
3584
|
+
function Ho(e) {
|
|
3585
|
+
return e ? typeof e == "object" && e && "get" in e && typeof e.get == "function" ? e.get(Ro) || null : typeof e == "object" && e && e[Ro.toLowerCase()] || null : null;
|
|
3542
3586
|
}
|
|
3543
|
-
function
|
|
3587
|
+
function Uo(e, t) {
|
|
3544
3588
|
if (typeof e.headers == "object" && e.headers !== null && "set" in e.headers && typeof e.headers.set == "function") {
|
|
3545
|
-
e.headers.set(
|
|
3589
|
+
e.headers.set(Ro, t);
|
|
3546
3590
|
return;
|
|
3547
3591
|
}
|
|
3548
3592
|
let n = e.headers || {};
|
|
3549
|
-
n[
|
|
3593
|
+
n[Ro] = t, e.headers = n;
|
|
3550
3594
|
}
|
|
3551
|
-
function
|
|
3552
|
-
$ = null,
|
|
3595
|
+
function Wo() {
|
|
3596
|
+
$ = null, Ko = null;
|
|
3553
3597
|
}
|
|
3554
|
-
function
|
|
3598
|
+
function Go() {
|
|
3555
3599
|
let e = /(?:^|;\s*)XSRF-TOKEN=([^;]+)/.exec(globalThis.document.cookie);
|
|
3556
3600
|
return e ? decodeURIComponent(e[1]) : null;
|
|
3557
3601
|
}
|
|
3558
|
-
var
|
|
3559
|
-
async function
|
|
3560
|
-
|
|
3561
|
-
let e = await
|
|
3602
|
+
var Ko = null;
|
|
3603
|
+
async function qo() {
|
|
3604
|
+
Bo.defaults.baseURL = Y.defaults.baseURL;
|
|
3605
|
+
let e = await Bo.get(zo), t = Ho(e.headers), n = typeof e.data == "object" && e.data !== null ? e.data.token : void 0, r = Go();
|
|
3562
3606
|
$ = t || n || r || null;
|
|
3563
3607
|
}
|
|
3564
|
-
async function
|
|
3608
|
+
async function Jo() {
|
|
3565
3609
|
if (!$) {
|
|
3566
|
-
if (!
|
|
3567
|
-
let e =
|
|
3568
|
-
|
|
3610
|
+
if (!Ko) {
|
|
3611
|
+
let e = qo().finally(() => {
|
|
3612
|
+
Ko === e && (Ko = null);
|
|
3569
3613
|
});
|
|
3570
|
-
|
|
3614
|
+
Ko = e;
|
|
3571
3615
|
}
|
|
3572
|
-
await
|
|
3616
|
+
await Ko;
|
|
3573
3617
|
}
|
|
3574
3618
|
}
|
|
3575
|
-
function
|
|
3619
|
+
function Yo(e = {}) {
|
|
3576
3620
|
let t = e.loginPath ?? "/login";
|
|
3577
|
-
e.baseURL && (Y.defaults.baseURL = e.baseURL), Y.defaults.withCredentials = !0, Y.defaults.xsrfCookieName = "XSRF-TOKEN", Y.defaults.xsrfHeaderName =
|
|
3621
|
+
e.baseURL && (Y.defaults.baseURL = e.baseURL), Y.defaults.withCredentials = !0, Y.defaults.xsrfCookieName = "XSRF-TOKEN", Y.defaults.xsrfHeaderName = Ro, Y.interceptors.request.use(async (e) => {
|
|
3578
3622
|
let t = e.url || "", n = e.baseURL || Y.defaults.baseURL;
|
|
3579
|
-
if (
|
|
3580
|
-
if ($ || await
|
|
3581
|
-
return
|
|
3623
|
+
if (Bo.defaults.baseURL = n, t.includes(zo) || !Vo(e.method)) return e;
|
|
3624
|
+
if ($ || await Jo(), !$) throw Error("Unable to obtain CSRF token for mutating request.");
|
|
3625
|
+
return Uo(e, $), e;
|
|
3582
3626
|
}, (e) => Promise.reject(e)), Y.interceptors.response.use((e) => {
|
|
3583
|
-
let t =
|
|
3627
|
+
let t = Ho(e.headers);
|
|
3584
3628
|
return t && ($ = t), e;
|
|
3585
3629
|
}, async (e) => {
|
|
3586
|
-
let n =
|
|
3630
|
+
let n = Ho(e.response?.headers);
|
|
3587
3631
|
n && ($ = n);
|
|
3588
3632
|
let r = e.config;
|
|
3589
|
-
if (e.response?.status === 403 && r && !r._csrfRetried &&
|
|
3590
|
-
if (r._csrfRetried = !0,
|
|
3591
|
-
return
|
|
3633
|
+
if (e.response?.status === 403 && r && !r._csrfRetried && Vo(r.method)) {
|
|
3634
|
+
if (r._csrfRetried = !0, Wo(), Bo.defaults.baseURL = r.baseURL || Y.defaults.baseURL, await Jo(), !$) throw e;
|
|
3635
|
+
return Uo(r, $), Y.request(r);
|
|
3592
3636
|
}
|
|
3593
3637
|
if (e.response?.status === 401 && !globalThis.location.pathname.startsWith(t)) {
|
|
3594
3638
|
let e = globalThis.location.pathname + globalThis.location.search;
|
|
@@ -3599,15 +3643,15 @@ function Wo(e = {}) {
|
|
|
3599
3643
|
}
|
|
3600
3644
|
//#endregion
|
|
3601
3645
|
//#region src/lib/export-xlsx.ts
|
|
3602
|
-
var
|
|
3603
|
-
function
|
|
3604
|
-
return e.replace(
|
|
3646
|
+
var Xo = /[[\]:*?/\\]/g, Zo = 31;
|
|
3647
|
+
function Qo(e) {
|
|
3648
|
+
return e.replace(Xo, " ").trim().slice(0, Zo) || "Sheet1";
|
|
3605
3649
|
}
|
|
3606
|
-
function
|
|
3650
|
+
function $o(e) {
|
|
3607
3651
|
return Array.isArray(e) ? e.join(", ") : e instanceof Date ? e.toISOString() : e;
|
|
3608
3652
|
}
|
|
3609
|
-
function
|
|
3610
|
-
let i = t.map((e) => e.label), a = e.map((e) => t.map((t) =>
|
|
3653
|
+
function es(e, t, n, r) {
|
|
3654
|
+
let i = t.map((e) => e.label), a = e.map((e) => t.map((t) => $o(e[t.key]))), o = Tt.utils.aoa_to_sheet([i, ...a]);
|
|
3611
3655
|
o["!cols"] = t.map((e, t) => {
|
|
3612
3656
|
let n = e.label.length;
|
|
3613
3657
|
for (let e of a) {
|
|
@@ -3616,8 +3660,8 @@ function Yo(e, t, n, r) {
|
|
|
3616
3660
|
}
|
|
3617
3661
|
return { wch: Math.min(Math.max(n + 2, 12), 60) };
|
|
3618
3662
|
});
|
|
3619
|
-
let s =
|
|
3620
|
-
|
|
3663
|
+
let s = Tt.utils.book_new();
|
|
3664
|
+
Tt.utils.book_append_sheet(s, o, Qo(r ?? n)), Tt.writeFile(s, `${n}.xlsx`);
|
|
3621
3665
|
}
|
|
3622
3666
|
//#endregion
|
|
3623
|
-
export {
|
|
3667
|
+
export { en as Accordion, rn as AccordionContent, tn as AccordionItem, nn as AccordionTrigger, no as AppFooter, ro as AppSwitcher, an as Avatar, sn as AvatarFallback, on as AvatarImage, fo as BackendStatusBanner, uo as BackendStatusProvider, c as Badge, ee as BadgeColorful, x as BadgeLocale, cn as Breadcrumb, mn as BreadcrumbEllipsis, un as BreadcrumbItem, dn as BreadcrumbLink, ln as BreadcrumbList, fn as BreadcrumbPage, Ao as BreadcrumbProvider, pn as BreadcrumbSeparator, L as Button, hn as Card, yn as CardAction, bn as CardContent, vn as CardDescription, xn as CardFooter, gn as CardHeader, _n as CardTitle, A as Checkbox, l as Dialog, h as DialogClose, S as DialogContent, u as DialogDescription, d as DialogFooter, y as DialogHeader, g as DialogOverlay, p as DialogPortal, f as DialogTitle, o as DialogTrigger, Sn as Drawer, Tn as DrawerClose, Dn as DrawerContent, jn as DrawerDescription, kn as DrawerFooter, On as DrawerHeader, En as DrawerOverlay, wn as DrawerPortal, An as DrawerTitle, Cn as DrawerTrigger, P as DropdownMenu, F as DropdownMenuCheckboxItem, D as DropdownMenuContent, k as DropdownMenuGroup, M as DropdownMenuItem, I as DropdownMenuLabel, Fe as DropdownMenuPortal, ne as DropdownMenuRadioGroup, le as DropdownMenuRadioItem, O as DropdownMenuSeparator, ce as DropdownMenuShortcut, ue as DropdownMenuSub, re as DropdownMenuSubContent, j as DropdownMenuSubTrigger, De as DropdownMenuTrigger, po as ErrorBoundary, Ie as FloatingFormulasBg, Nn as Form, Un as FormActions, Bn as FormControl, Vn as FormDescription, Fn as FormField, Rn as FormItem, qn as FormItemTwoColumns, zn as FormLabel, Hn as FormMessage, Zn as GlassCard, v as GradientButton, Yn as GradientSwitch, $n as HoverCard, tr as HoverCardContent, er as HoverCardTrigger, N as IconPickerDialog, s as Input, Mn as Label, ho as LanguageSelect, _o as LanguageSwitcher, Va as Login, bo as ModeToggle, So as ModeToggleSidebar, Co as NavSecondary, nr as NavigationMenu, sr as NavigationMenuContent, ur as NavigationMenuIndicator, ir as NavigationMenuItem, lr as NavigationMenuLink, rr as NavigationMenuList, or as NavigationMenuTrigger, cr as NavigationMenuViewport, dr as Pagination, fr as PaginationContent, _r as PaginationEllipsis, pr as PaginationItem, mr as PaginationLink, gr as PaginationNext, hr as PaginationPrevious, se as Popover, E as PopoverAnchor, T as PopoverContent, ie as PopoverDescription, xe as PopoverHeader, C as PopoverTitle, be as PopoverTrigger, vr as Progress, Qn as PulseRing, oe as ResizableHandle, w as ResizablePanel, Me as ResizablePanelGroup, me as SectionCard, yr as Select, Cr as SelectContent, br as SelectGroup, Tr as SelectItem, wr as SelectLabel, Or as SelectScrollDownButton, Dr as SelectScrollUpButton, Er as SelectSeparator, Sr as SelectTrigger, xr as SelectValue, kr as Separator, Ar as Sheet, Mr as SheetClose, Fr as SheetContent, zr as SheetDescription, Lr as SheetFooter, Ir as SheetHeader, Rr as SheetTitle, jr as SheetTrigger, Xr as Sidebar, ii as SidebarContent, ni as SidebarFooter, ai as SidebarGroup, si as SidebarGroupAction, ci as SidebarGroupContent, oi as SidebarGroupLabel, ti as SidebarHeader, ei as SidebarInput, $r as SidebarInset, li as SidebarMenu, pi as SidebarMenuAction, mi as SidebarMenuBadge, fi as SidebarMenuButton, ui as SidebarMenuItem, gi as SidebarMenuSkeleton, _i as SidebarMenuSub, yi as SidebarMenuSubButton, vi as SidebarMenuSubItem, Yr as SidebarProvider, Qr as SidebarRail, ri as SidebarSeparator, Zr as SidebarTrigger, m as Skeleton, Ci as Slider, to as StartupFirst, Ni as Stepper, xi as StickySaveBar, Ii as Switch, Li as Table, zi as TableBody, Wi as TableCaption, Ui as TableCell, Bi as TableFooter, Hi as TableHead, Ri as TableHeader, Vi as TableRow, Se as Tabs, Ae as TabsContent, ge as TabsList, _e as TabsTrigger, Gi as Textarea, vo as ThemeProvider, Ee as Toaster, qi as Toggle, Yi as ToggleGroup, Xi as ToggleGroupItem, ve as Tooltip, pe as TooltipContent, je as TooltipProvider, Pe as TooltipTrigger, Ai as Tree, Oe as UserAvatar, Da as UserMenu, ke as UserProvider, ha as VIGLET_ASSISTANT_SIZES, To as VigletAppSwitcher, Ea as VigletAssistant, ma as VigletAvatar, te as badgeVariants, de as buttonVariants, r as cn, es as exportToXlsx, t as getFlagEmoji, n as getHashedColor, _ as getLocaleCountryCode, he as getUserInitials, b as gradientButtonVariants, Jn as gradientSwitchVariants, ar as navigationMenuTriggerStyle, oo as reportBackendOffline, so as reportBackendOnline, Ne as sectionCardColorVariants, Yo as setupAxiosInterceptors, Ce as toast, Ki as toggleVariants, ji as treeFromPaths, e as truncateMiddle, Lo as useAssistantNotifications, lo as useBackendStatus, jo as useBreadcrumb, Mo as useBreadcrumbOptional, we as useCurrentUser, Do as useDateLocale, In as useFormField, Oo as useGridAdapter, ye as useIsMobile, qr as useSidebar, Jr as useSidebarOptional, No as useSubPageBreadcrumb, yo as useTheme };
|