@tailor-platform/app-shell 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-shell.css +1 -1
- package/dist/app-shell.d.ts +657 -56
- package/dist/app-shell.js +1628 -1160
- package/dist/theme.css +1 -0
- package/package.json +9 -9
package/dist/app-shell.js
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
import { jsx as a, jsxs as d, Fragment as
|
|
2
|
-
import { capitalCase as
|
|
3
|
-
import { useRouteError as
|
|
4
|
-
import { Link as
|
|
5
|
-
import { cva as
|
|
6
|
-
import { useRender as
|
|
7
|
-
import { clsx as
|
|
8
|
-
import { twMerge as
|
|
9
|
-
import { AlertCircle as
|
|
10
|
-
import * as
|
|
11
|
-
import { createContext as
|
|
12
|
-
import { Toaster as
|
|
13
|
-
import { parsePath as
|
|
14
|
-
import { Drawer as
|
|
1
|
+
import { jsx as a, jsxs as d, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { capitalCase as et } from "change-case";
|
|
3
|
+
import { useRouteError as Ks, isRouteErrorResponse as Ys, redirect as qs, Outlet as ne, NavLink as Xs, Navigate as Qs, useRouteLoaderData as Zs, createMemoryRouter as Js, createBrowserRouter as tn, RouterProvider as en, useLocation as Bt, Link as mt, Await as Qe, useMatch as an, useNavigate as sn } from "react-router";
|
|
4
|
+
import { Link as Di, useLocation as Mi, useNavigate as Vi, useParams as Ei, useRouteError as _i, useSearchParams as zi } from "react-router";
|
|
5
|
+
import { cva as Ft } from "class-variance-authority";
|
|
6
|
+
import { useRender as xt } from "@base-ui/react/use-render";
|
|
7
|
+
import { clsx as nn } from "clsx";
|
|
8
|
+
import { twMerge as rn } from "tailwind-merge";
|
|
9
|
+
import { AlertCircle as $e, Table as on, XIcon as vt, PanelLeftIcon as ln, ExternalLink as Ze, ChevronRight as pt, SunIcon as cn, SearchIcon as dn, Check as un, Copy as wn, CheckIcon as Je, ChevronDownIcon as re } from "lucide-react";
|
|
10
|
+
import * as v from "react";
|
|
11
|
+
import { createContext as Ot, useContext as at, useState as M, useMemo as H, useEffect as Q, useSyncExternalStore as ta, Suspense as oe, useRef as U, useCallback as P } from "react";
|
|
12
|
+
import { Toaster as mn, toast as pn } from "sonner";
|
|
13
|
+
import { parsePath as fn } from "@tailor-platform/app-shell-vite-plugin/parser";
|
|
14
|
+
import { Drawer as z } from "@base-ui/react/drawer";
|
|
15
15
|
import { Tooltip as q } from "@base-ui/react/tooltip";
|
|
16
16
|
import { Collapsible as F } from "@base-ui/react/collapsible";
|
|
17
17
|
import { Dialog as W } from "@base-ui/react/dialog";
|
|
18
|
-
import { createAuthClient as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
18
|
+
import { createAuthClient as hn } from "@tailor-platform/auth-public-client";
|
|
19
|
+
import { Avatar as ie } from "@base-ui/react/avatar";
|
|
20
|
+
import { Field as lt } from "@base-ui/react/field";
|
|
21
|
+
import { Fieldset as ea } from "@base-ui/react/fieldset";
|
|
22
|
+
import { Form as gn } from "@base-ui/react/form";
|
|
23
|
+
import { Menu as R } from "@base-ui/react/menu";
|
|
24
|
+
import { Select as V } from "@base-ui/react/select";
|
|
25
|
+
import { Combobox as k } from "@base-ui/react/combobox";
|
|
26
|
+
import { Autocomplete as A } from "@base-ui/react/autocomplete";
|
|
23
27
|
function c(...t) {
|
|
24
|
-
return
|
|
28
|
+
return rn(nn(t));
|
|
25
29
|
}
|
|
26
|
-
const
|
|
30
|
+
const bn = Ft(
|
|
27
31
|
"astw:inline-flex astw:items-center astw:justify-center astw:gap-2 astw:whitespace-nowrap astw:rounded-md astw:text-sm astw:font-medium astw:transition-all astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:[&_svg]:pointer-events-none astw:[&_svg:not([class*='size-'])]:size-4 astw:shrink-0 astw:[&_svg]:shrink-0 astw:outline-none astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px] astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive",
|
|
28
32
|
{
|
|
29
33
|
variants: {
|
|
@@ -37,6 +41,7 @@ const js = ee(
|
|
|
37
41
|
},
|
|
38
42
|
size: {
|
|
39
43
|
default: "astw:h-9 astw:px-4 astw:py-2 astw:has-[>svg]:px-3",
|
|
44
|
+
xs: "astw:h-7 astw:rounded-md astw:gap-1 astw:px-2.5 astw:text-xs astw:has-[>svg]:px-1.5",
|
|
40
45
|
sm: "astw:h-8 astw:rounded-md astw:gap-1.5 astw:px-3 astw:has-[>svg]:px-2.5",
|
|
41
46
|
lg: "astw:h-10 astw:rounded-md astw:px-6 astw:has-[>svg]:px-4",
|
|
42
47
|
icon: "astw:size-9"
|
|
@@ -48,41 +53,41 @@ const js = ee(
|
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
);
|
|
51
|
-
function
|
|
52
|
-
return
|
|
56
|
+
function ft({ className: t, variant: e, size: s, render: n, children: r, ...o }) {
|
|
57
|
+
return xt({
|
|
53
58
|
defaultTagName: "button",
|
|
54
59
|
render: n,
|
|
55
60
|
props: {
|
|
56
61
|
"data-slot": "button",
|
|
57
|
-
className: c(
|
|
62
|
+
className: c(bn({ variant: e, size: s, className: t })),
|
|
58
63
|
children: r,
|
|
59
64
|
...o
|
|
60
65
|
}
|
|
61
66
|
});
|
|
62
67
|
}
|
|
63
|
-
const
|
|
68
|
+
const Pt = "en", xn = () => {
|
|
64
69
|
try {
|
|
65
70
|
if (typeof navigator > "u")
|
|
66
|
-
return
|
|
71
|
+
return Pt;
|
|
67
72
|
const t = navigator.languages?.[0] ?? navigator.language;
|
|
68
|
-
return t ? new Intl.Locale(t).language :
|
|
73
|
+
return t ? new Intl.Locale(t).language : Pt;
|
|
69
74
|
} catch {
|
|
70
|
-
return
|
|
75
|
+
return Pt;
|
|
71
76
|
}
|
|
72
|
-
},
|
|
73
|
-
const e =
|
|
74
|
-
return (s, n) => e(s, typeof s == "string" ? s :
|
|
75
|
-
},
|
|
77
|
+
}, yt = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, aa = (t) => {
|
|
78
|
+
const e = yt(t);
|
|
79
|
+
return (s, n) => e(s, typeof s == "string" ? s : et(n));
|
|
80
|
+
}, vn = (t) => ({
|
|
76
81
|
modules: t.modules,
|
|
77
82
|
settingsResources: t.settingsResources ?? [],
|
|
78
|
-
errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(
|
|
83
|
+
errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(ct, {}),
|
|
79
84
|
basePath: t.basePath,
|
|
80
|
-
locale: t.locale ??
|
|
81
|
-
}),
|
|
85
|
+
locale: t.locale ?? xn()
|
|
86
|
+
}), le = Ot({
|
|
82
87
|
configurations: {
|
|
83
88
|
modules: [],
|
|
84
89
|
settingsResources: [],
|
|
85
|
-
locale:
|
|
90
|
+
locale: Pt,
|
|
86
91
|
// Using null! to avoid circular dependency issues.
|
|
87
92
|
// DefaultErrorBoundary imports useT from i18n-labels, which imports
|
|
88
93
|
// defineI18nLabels from hooks/i18n, which imports useAppShellConfig
|
|
@@ -91,18 +96,18 @@ const kt = "en", Ws = () => {
|
|
|
91
96
|
// always provides the context via AppShellConfigContext.Provider.
|
|
92
97
|
errorBoundary: null
|
|
93
98
|
}
|
|
94
|
-
}),
|
|
99
|
+
}), ce = Ot({
|
|
95
100
|
contextData: {}
|
|
96
|
-
}), K = () =>
|
|
97
|
-
const t =
|
|
101
|
+
}), K = () => at(le), ei = () => at(ce), sa = () => {
|
|
102
|
+
const t = at(le), e = at(ce);
|
|
98
103
|
return {
|
|
99
104
|
...t,
|
|
100
105
|
...e
|
|
101
106
|
};
|
|
102
|
-
},
|
|
103
|
-
const { configurations: t } = K(), e =
|
|
107
|
+
}, yn = () => {
|
|
108
|
+
const { configurations: t } = K(), e = yt(t.locale);
|
|
104
109
|
return (s, n) => e(s, n);
|
|
105
|
-
},
|
|
110
|
+
}, Nn = (t) => {
|
|
106
111
|
const e = (s) => (n) => t[s]?.[n] ?? t.en[n];
|
|
107
112
|
return {
|
|
108
113
|
/**
|
|
@@ -161,7 +166,7 @@ const kt = "en", Ws = () => {
|
|
|
161
166
|
return typeof o == "function" ? o(n[0]) : o;
|
|
162
167
|
}
|
|
163
168
|
};
|
|
164
|
-
},
|
|
169
|
+
}, Cn = Nn({
|
|
165
170
|
en: {
|
|
166
171
|
error404Title: "404 Not Found",
|
|
167
172
|
error404Body: "The page you requested could not be found.",
|
|
@@ -200,19 +205,19 @@ const kt = "en", Ws = () => {
|
|
|
200
205
|
commandPaletteSearch: "ページを検索...",
|
|
201
206
|
commandPaletteNoResults: "結果が見つかりません"
|
|
202
207
|
}
|
|
203
|
-
}),
|
|
204
|
-
const t =
|
|
208
|
+
}), Z = Cn.useT, ct = () => {
|
|
209
|
+
const t = Ks(), e = Z(), s = {
|
|
205
210
|
role: "alert",
|
|
206
211
|
"aria-label": "default-error-boundary"
|
|
207
212
|
};
|
|
208
|
-
if (
|
|
213
|
+
if (Ys(t) && t.status === 404)
|
|
209
214
|
return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
|
|
210
|
-
/* @__PURE__ */ a(
|
|
215
|
+
/* @__PURE__ */ a($e, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
|
|
211
216
|
/* @__PURE__ */ d("div", { children: [
|
|
212
217
|
/* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("error404Title") }),
|
|
213
218
|
/* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: e("error404Body") }),
|
|
214
219
|
/* @__PURE__ */ a(
|
|
215
|
-
|
|
220
|
+
ft,
|
|
216
221
|
{
|
|
217
222
|
variant: "outline",
|
|
218
223
|
size: "sm",
|
|
@@ -225,12 +230,12 @@ const kt = "en", Ws = () => {
|
|
|
225
230
|
] }) });
|
|
226
231
|
const n = t instanceof Error ? t.message : e("errorUnexpected");
|
|
227
232
|
return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
|
|
228
|
-
/* @__PURE__ */ a(
|
|
233
|
+
/* @__PURE__ */ a($e, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
|
|
229
234
|
/* @__PURE__ */ d("div", { children: [
|
|
230
235
|
/* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("errorTitle") }),
|
|
231
236
|
/* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: n }),
|
|
232
237
|
/* @__PURE__ */ a(
|
|
233
|
-
|
|
238
|
+
ft,
|
|
234
239
|
{
|
|
235
240
|
variant: "outline",
|
|
236
241
|
size: "sm",
|
|
@@ -242,16 +247,16 @@ const kt = "en", Ws = () => {
|
|
|
242
247
|
] })
|
|
243
248
|
] }) });
|
|
244
249
|
};
|
|
245
|
-
let
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
},
|
|
250
|
+
let na = {};
|
|
251
|
+
const Sn = (t) => {
|
|
252
|
+
na = t;
|
|
253
|
+
}, ai = () => ({ type: "pass" }), si = () => ({ type: "hidden" }), ni = (t) => ({
|
|
249
254
|
type: "redirect",
|
|
250
255
|
to: t
|
|
251
|
-
}),
|
|
256
|
+
}), Dt = () => new Response("Not Found", { status: 404 }), de = async (t) => {
|
|
252
257
|
if (!t || t.length === 0) return { type: "pass" };
|
|
253
258
|
const e = {
|
|
254
|
-
context:
|
|
259
|
+
context: na
|
|
255
260
|
};
|
|
256
261
|
for (const s of t) {
|
|
257
262
|
const n = await s(e);
|
|
@@ -259,22 +264,22 @@ const qs = (t) => {
|
|
|
259
264
|
return n;
|
|
260
265
|
}
|
|
261
266
|
return { type: "pass" };
|
|
262
|
-
},
|
|
263
|
-
const n = await
|
|
267
|
+
}, ra = (t, e) => async (s) => {
|
|
268
|
+
const n = await de(t);
|
|
264
269
|
switch (n.type) {
|
|
265
270
|
case "hidden":
|
|
266
|
-
throw
|
|
271
|
+
throw Dt();
|
|
267
272
|
case "redirect":
|
|
268
|
-
return
|
|
273
|
+
return qs(n.to);
|
|
269
274
|
case "pass":
|
|
270
275
|
return e ? e(s) : null;
|
|
271
276
|
}
|
|
272
|
-
},
|
|
273
|
-
const { configurations: s } = K(), { metaTitle: n, fallbackTitle: r } = t, i =
|
|
277
|
+
}, oa = (t, e) => () => {
|
|
278
|
+
const { configurations: s } = K(), { metaTitle: n, fallbackTitle: r } = t, i = yt(s.locale)(n, r);
|
|
274
279
|
return e(i);
|
|
275
280
|
};
|
|
276
|
-
function
|
|
277
|
-
const { path: e, meta: s, component: n, resources: r, errorBoundary: o, guards: i } = t, l = s?.title ??
|
|
281
|
+
function ri(t) {
|
|
282
|
+
const { path: e, meta: s, component: n, resources: r, errorBoundary: o, guards: i } = t, l = s?.title ?? et(e), m = et(e), u = i && i.length > 0 ? ra(i) : void 0, w = n ? oa({ metaTitle: l, fallbackTitle: m }, (p) => n({ title: p, resources: r })) : void 0;
|
|
278
283
|
return {
|
|
279
284
|
path: e,
|
|
280
285
|
type: "component",
|
|
@@ -289,12 +294,12 @@ function go(t) {
|
|
|
289
294
|
icon: t.meta?.icon
|
|
290
295
|
},
|
|
291
296
|
resources: r,
|
|
292
|
-
errorBoundary: o || /* @__PURE__ */ a(
|
|
297
|
+
errorBoundary: o || /* @__PURE__ */ a(ct, {}),
|
|
293
298
|
guards: i
|
|
294
299
|
};
|
|
295
300
|
}
|
|
296
|
-
function
|
|
297
|
-
const { path: e, component: s, subResources: n, meta: r, errorBoundary: o, guards: i } = t, l = r?.title ??
|
|
301
|
+
function oi(t) {
|
|
302
|
+
const { path: e, component: s, subResources: n, meta: r, errorBoundary: o, guards: i } = t, l = r?.title ?? et(e), m = et(e), u = i && i.length > 0 ? ra(i) : void 0, w = s ? oa(
|
|
298
303
|
{ metaTitle: l, fallbackTitle: m },
|
|
299
304
|
(p) => s({ title: p, resources: n })
|
|
300
305
|
) : void 0;
|
|
@@ -309,27 +314,27 @@ function bo(t) {
|
|
|
309
314
|
},
|
|
310
315
|
component: w,
|
|
311
316
|
subResources: n,
|
|
312
|
-
errorBoundary: o ?? /* @__PURE__ */ a(
|
|
317
|
+
errorBoundary: o ?? /* @__PURE__ */ a(ct, {}),
|
|
313
318
|
guards: i,
|
|
314
319
|
loader: u
|
|
315
320
|
};
|
|
316
321
|
}
|
|
317
|
-
const
|
|
318
|
-
const t =
|
|
319
|
-
return /* @__PURE__ */ d(
|
|
322
|
+
const Tn = () => {
|
|
323
|
+
const t = Z();
|
|
324
|
+
return /* @__PURE__ */ d(D, { children: [
|
|
320
325
|
/* @__PURE__ */ a("p", { className: "astw:font-semibold astw:leading-none astw:tracking-tight", children: t("welcomeTitle") }),
|
|
321
326
|
/* @__PURE__ */ a("p", { className: "pt-4", children: t("welcomeBody") })
|
|
322
327
|
] });
|
|
323
|
-
},
|
|
324
|
-
/* @__PURE__ */ a(
|
|
325
|
-
/* @__PURE__ */ a(
|
|
326
|
-
] }),
|
|
327
|
-
const { configurations: t } =
|
|
328
|
+
}, Be = () => /* @__PURE__ */ d(D, { children: [
|
|
329
|
+
/* @__PURE__ */ a(ne, {}),
|
|
330
|
+
/* @__PURE__ */ a(mn, {})
|
|
331
|
+
] }), kn = () => {
|
|
332
|
+
const { configurations: t } = sa(), e = Z(), s = yn();
|
|
328
333
|
return /* @__PURE__ */ d("div", { className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full", children: [
|
|
329
334
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ d("nav", { className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:p-3 astw:shadow-xs", children: [
|
|
330
335
|
/* @__PURE__ */ a("h2", { className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ", children: e("settings") }),
|
|
331
|
-
/* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
332
|
-
|
|
336
|
+
/* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(Xs, { to: `./${n.path}`, children: ({ isActive: r }) => /* @__PURE__ */ d(
|
|
337
|
+
ft,
|
|
333
338
|
{
|
|
334
339
|
variant: r ? "secondary" : "ghost",
|
|
335
340
|
className: "astw:w-full astw:justify-start",
|
|
@@ -340,9 +345,9 @@ const Xs = () => {
|
|
|
340
345
|
}
|
|
341
346
|
) }) }, n.path)) })
|
|
342
347
|
] }) }),
|
|
343
|
-
/* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(
|
|
348
|
+
/* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(ne, {}) })
|
|
344
349
|
] });
|
|
345
|
-
},
|
|
350
|
+
}, ue = (t) => () => /* @__PURE__ */ a(D, { children: t }), In = (t) => t.component ? {
|
|
346
351
|
index: !0,
|
|
347
352
|
Component: t.component,
|
|
348
353
|
...t.loader && { loader: t.loader }
|
|
@@ -355,42 +360,42 @@ const Xs = () => {
|
|
|
355
360
|
loader: async (e) => {
|
|
356
361
|
const s = await t.loader(e);
|
|
357
362
|
if (s instanceof Response) return s;
|
|
358
|
-
throw
|
|
363
|
+
throw Dt();
|
|
359
364
|
}
|
|
360
365
|
} : {
|
|
361
366
|
index: !0,
|
|
362
367
|
Component: () => null,
|
|
363
368
|
loader: () => {
|
|
364
|
-
throw
|
|
369
|
+
throw Dt();
|
|
365
370
|
}
|
|
366
|
-
},
|
|
371
|
+
}, ia = (t, e, s) => {
|
|
367
372
|
const n = t.errorBoundary || s, r = (e ?? []).map(
|
|
368
|
-
(l) =>
|
|
369
|
-
), i = [
|
|
373
|
+
(l) => ia(l, l.subResources, n)
|
|
374
|
+
), i = [In(t), ...r];
|
|
370
375
|
return {
|
|
371
376
|
path: t.path,
|
|
372
377
|
...t.errorBoundary && {
|
|
373
|
-
ErrorBoundary:
|
|
378
|
+
ErrorBoundary: ue(t.errorBoundary)
|
|
374
379
|
},
|
|
375
380
|
...i.length > 0 ? { children: i } : {}
|
|
376
381
|
};
|
|
377
|
-
},
|
|
382
|
+
}, Rn = (t) => t.map((e) => ia(e, e.resources, e.errorBoundary)), An = ({
|
|
378
383
|
modules: t,
|
|
379
384
|
settingsResources: e,
|
|
380
385
|
rootComponent: s
|
|
381
386
|
}) => {
|
|
382
387
|
const n = {
|
|
383
388
|
index: !0,
|
|
384
|
-
Component: s ??
|
|
389
|
+
Component: s ?? Tn
|
|
385
390
|
}, r = e.length > 0 ? [
|
|
386
391
|
{
|
|
387
392
|
path: "settings",
|
|
388
393
|
index: !0,
|
|
389
|
-
Component: () => /* @__PURE__ */ a(
|
|
394
|
+
Component: () => /* @__PURE__ */ a(Qs, { to: e[0].path, relative: "path", replace: !0 })
|
|
390
395
|
},
|
|
391
396
|
{
|
|
392
397
|
path: "settings",
|
|
393
|
-
Component:
|
|
398
|
+
Component: kn,
|
|
394
399
|
children: e.map((o) => {
|
|
395
400
|
if (!o.component)
|
|
396
401
|
throw new Error(`Settings resource "${o.path}" must have a component.`);
|
|
@@ -398,7 +403,7 @@ const Xs = () => {
|
|
|
398
403
|
path: o.path,
|
|
399
404
|
Component: o.component,
|
|
400
405
|
...o.errorBoundary && {
|
|
401
|
-
ErrorBoundary:
|
|
406
|
+
ErrorBoundary: ue(o.errorBoundary)
|
|
402
407
|
}
|
|
403
408
|
};
|
|
404
409
|
})
|
|
@@ -407,29 +412,29 @@ const Xs = () => {
|
|
|
407
412
|
return [
|
|
408
413
|
n,
|
|
409
414
|
{
|
|
410
|
-
children:
|
|
415
|
+
children: Rn(t)
|
|
411
416
|
},
|
|
412
417
|
...r,
|
|
413
418
|
{
|
|
414
419
|
path: "*",
|
|
415
420
|
loader: () => {
|
|
416
|
-
throw
|
|
421
|
+
throw Dt();
|
|
417
422
|
},
|
|
418
423
|
// Component is required to suppress React Router's warning about empty leaf routes,
|
|
419
424
|
// even though the loader always throws and this component will never render.
|
|
420
425
|
Component: () => null,
|
|
421
|
-
ErrorBoundary:
|
|
426
|
+
ErrorBoundary: ct
|
|
422
427
|
}
|
|
423
428
|
];
|
|
424
|
-
},
|
|
425
|
-
loaderID:
|
|
426
|
-
loader: async () => ({ navItems:
|
|
427
|
-
}),
|
|
428
|
-
const e =
|
|
429
|
+
}, la = "appshell-root-nav", Ln = (t) => ({
|
|
430
|
+
loaderID: la,
|
|
431
|
+
loader: async () => ({ navItems: Pn(t) })
|
|
432
|
+
}), ca = () => Zs(la)?.navItems, Pn = async (t) => {
|
|
433
|
+
const e = aa(t.locale);
|
|
429
434
|
return (await Promise.all(
|
|
430
435
|
t.modules.map(async (n) => {
|
|
431
|
-
if (n.path.startsWith(":") || (await
|
|
432
|
-
const o = await
|
|
436
|
+
if (n.path.startsWith(":") || (await de(n.guards)).type !== "pass") return null;
|
|
437
|
+
const o = await da(
|
|
433
438
|
n.resources,
|
|
434
439
|
n.path,
|
|
435
440
|
e
|
|
@@ -439,25 +444,25 @@ const Xs = () => {
|
|
|
439
444
|
)).filter((n) => n !== null).map(({ module: n, resources: r }) => ({
|
|
440
445
|
title: e(n.meta.title, n.path),
|
|
441
446
|
url: n.meta.menuItemClickable ? n.path : void 0,
|
|
442
|
-
icon: n.meta.icon || /* @__PURE__ */ a(
|
|
447
|
+
icon: n.meta.icon || /* @__PURE__ */ a(on, {}),
|
|
443
448
|
items: r
|
|
444
449
|
}));
|
|
445
|
-
},
|
|
450
|
+
}, da = async (t, e, s) => (await Promise.all(
|
|
446
451
|
t.map(async (r) => {
|
|
447
|
-
if (r.path.startsWith(":") || (await
|
|
448
|
-
const i = `${e}/${r.path}`, l = s(r.meta.title, r.path), m = r.component !== void 0, u = r.subResources ? await
|
|
452
|
+
if (r.path.startsWith(":") || (await de(r.guards)).type !== "pass") return null;
|
|
453
|
+
const i = `${e}/${r.path}`, l = s(r.meta.title, r.path), m = r.component !== void 0, u = r.subResources ? await da(r.subResources, i, s) : void 0, w = u && u.length > 0;
|
|
449
454
|
return !m && !w ? null : {
|
|
450
455
|
title: l,
|
|
451
456
|
url: m ? i : void 0,
|
|
452
457
|
items: w ? u : void 0
|
|
453
458
|
};
|
|
454
459
|
})
|
|
455
|
-
)).filter((r) => r !== null),
|
|
456
|
-
const { configurations: e } = K(), { rootComponent: s, children: n } = t, r =
|
|
460
|
+
)).filter((r) => r !== null), Dn = (t) => {
|
|
461
|
+
const { configurations: e } = K(), { rootComponent: s, children: n } = t, r = An({
|
|
457
462
|
modules: e.modules,
|
|
458
463
|
settingsResources: e.settingsResources,
|
|
459
464
|
rootComponent: s
|
|
460
|
-
}), o = e.errorBoundary, { loaderID: i, loader: l } =
|
|
465
|
+
}), o = e.errorBoundary, { loaderID: i, loader: l } = Ln({
|
|
461
466
|
modules: e.modules,
|
|
462
467
|
locale: e.locale
|
|
463
468
|
}), m = [
|
|
@@ -467,8 +472,8 @@ const Xs = () => {
|
|
|
467
472
|
element: n,
|
|
468
473
|
children: o ? [
|
|
469
474
|
{
|
|
470
|
-
element: /* @__PURE__ */ a(
|
|
471
|
-
ErrorBoundary:
|
|
475
|
+
element: /* @__PURE__ */ a(ne, {}),
|
|
476
|
+
ErrorBoundary: ue(o),
|
|
472
477
|
children: r
|
|
473
478
|
}
|
|
474
479
|
] : r,
|
|
@@ -478,28 +483,28 @@ const Xs = () => {
|
|
|
478
483
|
*/
|
|
479
484
|
HydrateFallback: () => null
|
|
480
485
|
}
|
|
481
|
-
], u = e.basePath ? "/" + e.basePath : void 0, w = t.memory ?
|
|
486
|
+
], u = e.basePath ? "/" + e.basePath : void 0, w = t.memory ? Js(m, {
|
|
482
487
|
basename: u,
|
|
483
488
|
...t.initialEntries ? { initialEntries: t.initialEntries } : {}
|
|
484
|
-
}) :
|
|
489
|
+
}) : tn(m, {
|
|
485
490
|
basename: u
|
|
486
491
|
});
|
|
487
|
-
return /* @__PURE__ */ a(
|
|
488
|
-
},
|
|
492
|
+
return /* @__PURE__ */ a(en, { router: w });
|
|
493
|
+
}, Mn = {
|
|
489
494
|
resolvedTheme: "light",
|
|
490
495
|
theme: "system",
|
|
491
496
|
setTheme: () => null
|
|
492
|
-
},
|
|
493
|
-
function
|
|
497
|
+
}, ua = Ot(Mn);
|
|
498
|
+
function Vn({
|
|
494
499
|
children: t,
|
|
495
500
|
storageKey: e,
|
|
496
501
|
defaultTheme: s = "system",
|
|
497
502
|
...n
|
|
498
503
|
}) {
|
|
499
|
-
const [r, o] =
|
|
504
|
+
const [r, o] = M(
|
|
500
505
|
() => localStorage.getItem(e) || s
|
|
501
506
|
), i = H(() => r !== "system" ? r : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", [r]);
|
|
502
|
-
|
|
507
|
+
Q(() => {
|
|
503
508
|
const m = window.document.documentElement;
|
|
504
509
|
m.classList.remove("light", "dark"), m.classList.add(i);
|
|
505
510
|
}, [i]);
|
|
@@ -510,18 +515,18 @@ function rn({
|
|
|
510
515
|
localStorage.setItem(e, m), o(m);
|
|
511
516
|
}
|
|
512
517
|
};
|
|
513
|
-
return /* @__PURE__ */ a(
|
|
518
|
+
return /* @__PURE__ */ a(ua.Provider, { ...n, value: l, children: t });
|
|
514
519
|
}
|
|
515
|
-
const
|
|
516
|
-
const t =
|
|
520
|
+
const En = () => {
|
|
521
|
+
const t = at(ua);
|
|
517
522
|
if (t === void 0) throw new Error("useTheme must be used within a ThemeProvider");
|
|
518
523
|
return t;
|
|
519
|
-
},
|
|
520
|
-
},
|
|
521
|
-
function
|
|
522
|
-
return
|
|
524
|
+
}, _n = () => () => {
|
|
525
|
+
}, zn = () => !0, $n = () => !1;
|
|
526
|
+
function Bn() {
|
|
527
|
+
return ta(_n, zn, $n);
|
|
523
528
|
}
|
|
524
|
-
function
|
|
529
|
+
function Fn(t) {
|
|
525
530
|
const e = {
|
|
526
531
|
path: "",
|
|
527
532
|
fullPath: "",
|
|
@@ -529,7 +534,7 @@ function wn(t) {
|
|
|
529
534
|
children: /* @__PURE__ */ new Map()
|
|
530
535
|
};
|
|
531
536
|
for (const s of t) {
|
|
532
|
-
const n =
|
|
537
|
+
const n = fn(s.path);
|
|
533
538
|
let r = e, o = "";
|
|
534
539
|
for (const i of n)
|
|
535
540
|
i.type !== "group" && (o = o ? `${o}/${i.converted}` : i.converted, r.children.has(i.converted) || r.children.set(i.converted, {
|
|
@@ -542,32 +547,33 @@ function wn(t) {
|
|
|
542
547
|
}
|
|
543
548
|
return e;
|
|
544
549
|
}
|
|
545
|
-
function
|
|
546
|
-
return t?.appShellPageProps?.meta?.title ??
|
|
550
|
+
function wa(t, e) {
|
|
551
|
+
return t?.appShellPageProps?.meta?.title ?? et(e || "home");
|
|
547
552
|
}
|
|
548
|
-
function
|
|
549
|
-
const e = t.component, s =
|
|
550
|
-
for (const
|
|
551
|
-
|
|
553
|
+
function ma(t) {
|
|
554
|
+
const e = t.component, s = wa(e, t.path), n = e?.appShellPageProps?.meta?.icon, r = e?.appShellPageProps?.meta?.breadcrumbTitle, o = e?.appShellPageProps?.loader, i = [];
|
|
555
|
+
for (const l of t.children.values())
|
|
556
|
+
i.push(ma(l));
|
|
552
557
|
return {
|
|
553
558
|
_type: "resource",
|
|
554
559
|
type: "component",
|
|
555
560
|
path: t.path,
|
|
556
561
|
meta: {
|
|
557
562
|
title: s,
|
|
558
|
-
icon: n
|
|
563
|
+
icon: n,
|
|
564
|
+
...r !== void 0 ? { breadcrumbTitle: r } : {}
|
|
559
565
|
},
|
|
560
566
|
component: e ? () => /* @__PURE__ */ a(e, {}) : void 0,
|
|
561
|
-
subResources:
|
|
562
|
-
errorBoundary: /* @__PURE__ */ a(
|
|
567
|
+
subResources: i.length > 0 ? i : void 0,
|
|
568
|
+
errorBoundary: /* @__PURE__ */ a(ct, {}),
|
|
563
569
|
guards: t.guards,
|
|
564
|
-
loader:
|
|
570
|
+
loader: o
|
|
565
571
|
};
|
|
566
572
|
}
|
|
567
|
-
function
|
|
568
|
-
const e = t.component, s =
|
|
569
|
-
for (const
|
|
570
|
-
|
|
573
|
+
function Fe(t) {
|
|
574
|
+
const e = t.component, s = wa(e, t.path), n = e?.appShellPageProps?.meta?.icon, r = e?.appShellPageProps?.meta?.breadcrumbTitle, o = e?.appShellPageProps?.loader, i = [];
|
|
575
|
+
for (const l of t.children.values())
|
|
576
|
+
i.push(ma(l));
|
|
571
577
|
return {
|
|
572
578
|
_type: "module",
|
|
573
579
|
type: "component",
|
|
@@ -575,21 +581,22 @@ function Ve(t) {
|
|
|
575
581
|
meta: {
|
|
576
582
|
title: s,
|
|
577
583
|
icon: n,
|
|
584
|
+
...r !== void 0 ? { breadcrumbTitle: r } : {},
|
|
578
585
|
menuItemClickable: e !== void 0
|
|
579
586
|
},
|
|
580
587
|
component: e ? () => /* @__PURE__ */ a(e, {}) : void 0,
|
|
581
|
-
resources:
|
|
582
|
-
errorBoundary: /* @__PURE__ */ a(
|
|
588
|
+
resources: i,
|
|
589
|
+
errorBoundary: /* @__PURE__ */ a(ct, {}),
|
|
583
590
|
guards: t.guards,
|
|
584
|
-
loader:
|
|
591
|
+
loader: o
|
|
585
592
|
};
|
|
586
593
|
}
|
|
587
|
-
function
|
|
594
|
+
function On(t) {
|
|
588
595
|
if (t.length === 0)
|
|
589
596
|
return [];
|
|
590
|
-
const e =
|
|
597
|
+
const e = Fn(t), s = [];
|
|
591
598
|
if (e.component) {
|
|
592
|
-
const n =
|
|
599
|
+
const n = Fe({
|
|
593
600
|
...e,
|
|
594
601
|
path: "",
|
|
595
602
|
children: /* @__PURE__ */ new Map()
|
|
@@ -598,14 +605,14 @@ function mn(t) {
|
|
|
598
605
|
s.push(n);
|
|
599
606
|
}
|
|
600
607
|
for (const n of e.children.values())
|
|
601
|
-
s.push(
|
|
608
|
+
s.push(Fe(n));
|
|
602
609
|
return s;
|
|
603
610
|
}
|
|
604
|
-
const
|
|
605
|
-
const e =
|
|
606
|
-
|
|
611
|
+
const pa = (t) => {
|
|
612
|
+
const e = Bn(), s = t.contextData ?? {};
|
|
613
|
+
Sn(s);
|
|
607
614
|
const n = t.modules, r = H(
|
|
608
|
-
() => n ?
|
|
615
|
+
() => n ? vn({
|
|
609
616
|
modules: n,
|
|
610
617
|
settingsResources: t.settingsResources,
|
|
611
618
|
basePath: t.basePath,
|
|
@@ -627,12 +634,12 @@ const sa = (t) => {
|
|
|
627
634
|
/* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: l })
|
|
628
635
|
] }) });
|
|
629
636
|
}
|
|
630
|
-
return e ? /* @__PURE__ */ a(
|
|
637
|
+
return e ? /* @__PURE__ */ a(le.Provider, { value: o, children: /* @__PURE__ */ a(ce.Provider, { value: i, children: /* @__PURE__ */ a(Vn, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(Dn, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
|
|
631
638
|
};
|
|
632
|
-
function
|
|
633
|
-
const e =
|
|
639
|
+
function Gn(t) {
|
|
640
|
+
const e = On(t), s = e.find((o) => o.path === ""), n = e.filter((o) => o.path !== "");
|
|
634
641
|
return (o) => /* @__PURE__ */ a(
|
|
635
|
-
|
|
642
|
+
pa,
|
|
636
643
|
{
|
|
637
644
|
...o,
|
|
638
645
|
modules: n,
|
|
@@ -640,42 +647,50 @@ function pn(t) {
|
|
|
640
647
|
}
|
|
641
648
|
);
|
|
642
649
|
}
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
function
|
|
646
|
-
const [t, e] =
|
|
647
|
-
return
|
|
648
|
-
const s = window.matchMedia(`(max-width: ${
|
|
649
|
-
e(window.innerWidth <
|
|
650
|
+
pa.WithPages = Gn;
|
|
651
|
+
const Qt = 768;
|
|
652
|
+
function jn() {
|
|
653
|
+
const [t, e] = v.useState(void 0);
|
|
654
|
+
return v.useEffect(() => {
|
|
655
|
+
const s = window.matchMedia(`(max-width: ${Qt - 1}px)`), n = () => {
|
|
656
|
+
e(window.innerWidth < Qt);
|
|
650
657
|
};
|
|
651
|
-
return s.addEventListener("change", n), e(window.innerWidth <
|
|
658
|
+
return s.addEventListener("change", n), e(window.innerWidth < Qt), () => s.removeEventListener("change", n);
|
|
652
659
|
}, []), !!t;
|
|
653
660
|
}
|
|
654
|
-
const
|
|
655
|
-
function
|
|
656
|
-
const [t, e] =
|
|
657
|
-
return
|
|
661
|
+
const Zt = 768, Jt = 1199;
|
|
662
|
+
function Wn() {
|
|
663
|
+
const [t, e] = v.useState(void 0);
|
|
664
|
+
return v.useEffect(() => {
|
|
658
665
|
const s = window.matchMedia(
|
|
659
|
-
`(min-width: ${
|
|
666
|
+
`(min-width: ${Zt}px) and (max-width: ${Jt}px)`
|
|
660
667
|
), n = () => {
|
|
661
668
|
e(
|
|
662
|
-
window.innerWidth >=
|
|
669
|
+
window.innerWidth >= Zt && window.innerWidth <= Jt
|
|
663
670
|
);
|
|
664
671
|
};
|
|
665
672
|
return s.addEventListener("change", n), e(
|
|
666
|
-
window.innerWidth >=
|
|
673
|
+
window.innerWidth >= Zt && window.innerWidth <= Jt
|
|
667
674
|
), () => s.removeEventListener("change", n);
|
|
668
675
|
}, []), !!t;
|
|
669
676
|
}
|
|
670
|
-
|
|
677
|
+
const fa = [
|
|
678
|
+
"astw:border-input astw:flex astw:h-9 astw:w-full astw:min-w-0 astw:rounded-md astw:border astw:bg-transparent astw:px-3 astw:py-1 astw:text-base astw:shadow-xs astw:outline-none astw:md:text-sm",
|
|
679
|
+
"astw:dark:bg-input/30 astw:transition-[color,box-shadow]",
|
|
680
|
+
"astw:selection:bg-primary astw:selection:text-primary-foreground",
|
|
681
|
+
"astw:placeholder:text-muted-foreground",
|
|
682
|
+
"astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
|
|
683
|
+
"astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50"
|
|
684
|
+
];
|
|
685
|
+
function Hn({ className: t, type: e, ...s }) {
|
|
671
686
|
return /* @__PURE__ */ a(
|
|
672
687
|
"input",
|
|
673
688
|
{
|
|
674
689
|
type: e,
|
|
675
690
|
"data-slot": "input",
|
|
676
691
|
className: c(
|
|
677
|
-
|
|
678
|
-
"astw:
|
|
692
|
+
fa,
|
|
693
|
+
"astw:file:text-foreground astw:file:inline-flex astw:file:h-7 astw:file:border-0 astw:file:bg-transparent astw:file:text-sm astw:file:font-medium",
|
|
679
694
|
"astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive",
|
|
680
695
|
t
|
|
681
696
|
),
|
|
@@ -683,7 +698,7 @@ function gn({ className: t, type: e, ...s }) {
|
|
|
683
698
|
}
|
|
684
699
|
);
|
|
685
700
|
}
|
|
686
|
-
function
|
|
701
|
+
function Un({
|
|
687
702
|
className: t,
|
|
688
703
|
orientation: e = "horizontal",
|
|
689
704
|
decorative: s = !0,
|
|
@@ -705,31 +720,31 @@ function bn({
|
|
|
705
720
|
}
|
|
706
721
|
);
|
|
707
722
|
}
|
|
708
|
-
const
|
|
723
|
+
const Kn = {
|
|
709
724
|
top: "up",
|
|
710
725
|
right: "right",
|
|
711
726
|
bottom: "down",
|
|
712
727
|
left: "left"
|
|
713
|
-
},
|
|
714
|
-
function
|
|
715
|
-
return /* @__PURE__ */ a(
|
|
728
|
+
}, ha = v.createContext("right");
|
|
729
|
+
function ga({ side: t = "right", ...e }) {
|
|
730
|
+
return /* @__PURE__ */ a(ha.Provider, { value: t, children: /* @__PURE__ */ a(z.Root, { "data-slot": "sheet", swipeDirection: Kn[t], ...e }) });
|
|
716
731
|
}
|
|
717
|
-
|
|
718
|
-
function
|
|
719
|
-
return /* @__PURE__ */ a(
|
|
732
|
+
ga.displayName = "Sheet.Root";
|
|
733
|
+
function ba({ ...t }) {
|
|
734
|
+
return /* @__PURE__ */ a(z.Trigger, { "data-slot": "sheet-trigger", ...t });
|
|
720
735
|
}
|
|
721
|
-
|
|
722
|
-
function
|
|
723
|
-
return /* @__PURE__ */ a(
|
|
736
|
+
ba.displayName = "Sheet.Trigger";
|
|
737
|
+
function xa({ ...t }) {
|
|
738
|
+
return /* @__PURE__ */ a(z.Close, { "data-slot": "sheet-close", ...t });
|
|
724
739
|
}
|
|
725
|
-
|
|
726
|
-
function
|
|
727
|
-
return /* @__PURE__ */ a(
|
|
740
|
+
xa.displayName = "Sheet.Close";
|
|
741
|
+
function va({ ...t }) {
|
|
742
|
+
return /* @__PURE__ */ a(z.Portal, { "data-slot": "sheet-portal", ...t });
|
|
728
743
|
}
|
|
729
|
-
|
|
730
|
-
function
|
|
744
|
+
va.displayName = "Sheet.Portal";
|
|
745
|
+
function ya({ className: t, ...e }) {
|
|
731
746
|
return /* @__PURE__ */ a(
|
|
732
|
-
|
|
747
|
+
z.Backdrop,
|
|
733
748
|
{
|
|
734
749
|
"data-slot": "sheet-overlay",
|
|
735
750
|
className: c(
|
|
@@ -740,13 +755,13 @@ function ca({ className: t, ...e }) {
|
|
|
740
755
|
}
|
|
741
756
|
);
|
|
742
757
|
}
|
|
743
|
-
|
|
744
|
-
function
|
|
745
|
-
const n =
|
|
746
|
-
return /* @__PURE__ */ d(
|
|
747
|
-
/* @__PURE__ */ a(
|
|
758
|
+
ya.displayName = "Sheet.Overlay";
|
|
759
|
+
function Na({ className: t, children: e, ...s }) {
|
|
760
|
+
const n = v.useContext(ha);
|
|
761
|
+
return /* @__PURE__ */ d(va, { children: [
|
|
762
|
+
/* @__PURE__ */ a(ya, {}),
|
|
748
763
|
/* @__PURE__ */ a(
|
|
749
|
-
|
|
764
|
+
z.Viewport,
|
|
750
765
|
{
|
|
751
766
|
"data-slot": "sheet-viewport",
|
|
752
767
|
className: c(
|
|
@@ -757,7 +772,7 @@ function da({ className: t, children: e, ...s }) {
|
|
|
757
772
|
n === "bottom" && "astw:items-end astw:justify-stretch"
|
|
758
773
|
),
|
|
759
774
|
children: /* @__PURE__ */ d(
|
|
760
|
-
|
|
775
|
+
z.Popup,
|
|
761
776
|
{
|
|
762
777
|
"data-slot": "sheet-content",
|
|
763
778
|
className: c(
|
|
@@ -771,9 +786,9 @@ function da({ className: t, children: e, ...s }) {
|
|
|
771
786
|
),
|
|
772
787
|
...s,
|
|
773
788
|
children: [
|
|
774
|
-
/* @__PURE__ */ a(
|
|
775
|
-
/* @__PURE__ */ d(
|
|
776
|
-
/* @__PURE__ */ a(
|
|
789
|
+
/* @__PURE__ */ a(z.Content, { "data-slot": "sheet-inner-content", className: "astw:contents", children: e }),
|
|
790
|
+
/* @__PURE__ */ d(z.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-secondary astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none", children: [
|
|
791
|
+
/* @__PURE__ */ a(vt, { className: "astw:size-4" }),
|
|
777
792
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
|
|
778
793
|
] })
|
|
779
794
|
]
|
|
@@ -783,8 +798,8 @@ function da({ className: t, children: e, ...s }) {
|
|
|
783
798
|
)
|
|
784
799
|
] });
|
|
785
800
|
}
|
|
786
|
-
|
|
787
|
-
function
|
|
801
|
+
Na.displayName = "Sheet.Content";
|
|
802
|
+
function Ca({ className: t, ...e }) {
|
|
788
803
|
return /* @__PURE__ */ a(
|
|
789
804
|
"div",
|
|
790
805
|
{
|
|
@@ -794,8 +809,8 @@ function ua({ className: t, ...e }) {
|
|
|
794
809
|
}
|
|
795
810
|
);
|
|
796
811
|
}
|
|
797
|
-
|
|
798
|
-
function
|
|
812
|
+
Ca.displayName = "Sheet.Header";
|
|
813
|
+
function Sa({ className: t, ...e }) {
|
|
799
814
|
return /* @__PURE__ */ a(
|
|
800
815
|
"div",
|
|
801
816
|
{
|
|
@@ -805,10 +820,10 @@ function wa({ className: t, ...e }) {
|
|
|
805
820
|
}
|
|
806
821
|
);
|
|
807
822
|
}
|
|
808
|
-
|
|
809
|
-
function
|
|
823
|
+
Sa.displayName = "Sheet.Footer";
|
|
824
|
+
function Ta({ className: t, ...e }) {
|
|
810
825
|
return /* @__PURE__ */ a(
|
|
811
|
-
|
|
826
|
+
z.Title,
|
|
812
827
|
{
|
|
813
828
|
"data-slot": "sheet-title",
|
|
814
829
|
className: c("astw:text-foreground astw:font-semibold", t),
|
|
@@ -816,10 +831,10 @@ function ma({ className: t, ...e }) {
|
|
|
816
831
|
}
|
|
817
832
|
);
|
|
818
833
|
}
|
|
819
|
-
|
|
820
|
-
function
|
|
834
|
+
Ta.displayName = "Sheet.Title";
|
|
835
|
+
function ka({ className: t, ...e }) {
|
|
821
836
|
return /* @__PURE__ */ a(
|
|
822
|
-
|
|
837
|
+
z.Description,
|
|
823
838
|
{
|
|
824
839
|
"data-slot": "sheet-description",
|
|
825
840
|
className: c("astw:text-muted-foreground astw:text-sm", t),
|
|
@@ -827,30 +842,30 @@ function pa({ className: t, ...e }) {
|
|
|
827
842
|
}
|
|
828
843
|
);
|
|
829
844
|
}
|
|
830
|
-
|
|
831
|
-
const
|
|
832
|
-
Root:
|
|
833
|
-
Trigger:
|
|
834
|
-
Close:
|
|
835
|
-
Content:
|
|
836
|
-
Header:
|
|
837
|
-
Footer:
|
|
838
|
-
Title:
|
|
839
|
-
Description:
|
|
845
|
+
ka.displayName = "Sheet.Description";
|
|
846
|
+
const B = {
|
|
847
|
+
Root: ga,
|
|
848
|
+
Trigger: ba,
|
|
849
|
+
Close: xa,
|
|
850
|
+
Content: Na,
|
|
851
|
+
Header: Ca,
|
|
852
|
+
Footer: Sa,
|
|
853
|
+
Title: Ta,
|
|
854
|
+
Description: ka
|
|
840
855
|
};
|
|
841
|
-
function
|
|
856
|
+
function Ia({ delay: t = 0, children: e, ...s }) {
|
|
842
857
|
return /* @__PURE__ */ a(q.Provider, { "data-slot": "tooltip-provider", delay: t, ...s, children: e });
|
|
843
858
|
}
|
|
844
|
-
|
|
845
|
-
function
|
|
859
|
+
Ia.displayName = "Tooltip.Provider";
|
|
860
|
+
function Ra({ children: t, ...e }) {
|
|
846
861
|
return /* @__PURE__ */ a(q.Root, { "data-slot": "tooltip", ...e, children: t });
|
|
847
862
|
}
|
|
848
|
-
|
|
849
|
-
function
|
|
863
|
+
Ra.displayName = "Tooltip.Root";
|
|
864
|
+
function Aa({ ...t }) {
|
|
850
865
|
return /* @__PURE__ */ a(q.Trigger, { "data-slot": "tooltip-trigger", ...t });
|
|
851
866
|
}
|
|
852
|
-
|
|
853
|
-
function
|
|
867
|
+
Aa.displayName = "Tooltip.Trigger";
|
|
868
|
+
function La({
|
|
854
869
|
className: t,
|
|
855
870
|
position: e,
|
|
856
871
|
side: s,
|
|
@@ -880,20 +895,20 @@ function ba({
|
|
|
880
895
|
}
|
|
881
896
|
) }) });
|
|
882
897
|
}
|
|
883
|
-
|
|
884
|
-
const
|
|
885
|
-
Root:
|
|
886
|
-
Trigger:
|
|
887
|
-
Content:
|
|
888
|
-
Provider:
|
|
889
|
-
},
|
|
890
|
-
function
|
|
891
|
-
const t =
|
|
898
|
+
La.displayName = "Tooltip.Content";
|
|
899
|
+
const $ = {
|
|
900
|
+
Root: Ra,
|
|
901
|
+
Trigger: Aa,
|
|
902
|
+
Content: La,
|
|
903
|
+
Provider: Ia
|
|
904
|
+
}, Pa = "16rem", Yn = "18rem", qn = "3rem", Xn = "b", Da = v.createContext(null);
|
|
905
|
+
function dt() {
|
|
906
|
+
const t = v.useContext(Da);
|
|
892
907
|
if (!t)
|
|
893
908
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
894
909
|
return t;
|
|
895
910
|
}
|
|
896
|
-
function
|
|
911
|
+
function Qn({
|
|
897
912
|
defaultOpen: t = !0,
|
|
898
913
|
open: e,
|
|
899
914
|
onOpenChange: s,
|
|
@@ -902,52 +917,52 @@ function Cn({
|
|
|
902
917
|
children: o,
|
|
903
918
|
...i
|
|
904
919
|
}) {
|
|
905
|
-
const l =
|
|
906
|
-
(
|
|
907
|
-
const x = typeof
|
|
908
|
-
s ? s(x) :
|
|
920
|
+
const l = jn(), m = Wn(), [u, w] = v.useState(!1), [p, f] = v.useState(!1), [b, h] = v.useState(t), g = e ?? b, N = v.useCallback(
|
|
921
|
+
(I) => {
|
|
922
|
+
const x = typeof I == "function" ? I(g) : I;
|
|
923
|
+
s ? s(x) : h(x);
|
|
909
924
|
},
|
|
910
925
|
[s, g]
|
|
911
|
-
),
|
|
912
|
-
|
|
913
|
-
const
|
|
914
|
-
x.key ===
|
|
926
|
+
), y = m && !l, S = v.useCallback(() => l ? w((I) => !I) : y ? f((I) => !I) : N((I) => !I), [l, y, N, w]);
|
|
927
|
+
v.useEffect(() => {
|
|
928
|
+
const I = (x) => {
|
|
929
|
+
x.key === Xn && (x.metaKey || x.ctrlKey) && (x.preventDefault(), S());
|
|
915
930
|
};
|
|
916
|
-
return window.addEventListener("keydown",
|
|
931
|
+
return window.addEventListener("keydown", I), () => window.removeEventListener("keydown", I);
|
|
917
932
|
}, [S]);
|
|
918
|
-
const T = g ? "expanded" : "collapsed",
|
|
933
|
+
const T = g ? "expanded" : "collapsed", L = v.useMemo(
|
|
919
934
|
() => ({
|
|
920
935
|
state: T,
|
|
921
936
|
open: g,
|
|
922
|
-
setOpen:
|
|
937
|
+
setOpen: N,
|
|
923
938
|
isMobile: l,
|
|
924
939
|
openMobile: u,
|
|
925
940
|
setOpenMobile: w,
|
|
926
941
|
toggleSidebar: S,
|
|
927
|
-
isIconMode:
|
|
942
|
+
isIconMode: y,
|
|
928
943
|
openIconMode: p,
|
|
929
|
-
setOpenIconMode:
|
|
944
|
+
setOpenIconMode: f
|
|
930
945
|
}),
|
|
931
946
|
[
|
|
932
947
|
T,
|
|
933
948
|
g,
|
|
934
|
-
|
|
949
|
+
N,
|
|
935
950
|
l,
|
|
936
951
|
u,
|
|
937
952
|
w,
|
|
938
953
|
S,
|
|
939
|
-
|
|
954
|
+
y,
|
|
940
955
|
p,
|
|
941
|
-
|
|
956
|
+
f
|
|
942
957
|
]
|
|
943
958
|
);
|
|
944
|
-
return /* @__PURE__ */ a(
|
|
959
|
+
return /* @__PURE__ */ a(Da.Provider, { value: L, children: /* @__PURE__ */ a($.Provider, { delay: 0, children: /* @__PURE__ */ a(
|
|
945
960
|
"div",
|
|
946
961
|
{
|
|
947
962
|
"data-slot": "sidebar-wrapper",
|
|
948
963
|
style: {
|
|
949
|
-
"--sidebar-width":
|
|
950
|
-
"--sidebar-width-icon":
|
|
964
|
+
"--sidebar-width": Pa,
|
|
965
|
+
"--sidebar-width-icon": qn,
|
|
951
966
|
...r
|
|
952
967
|
},
|
|
953
968
|
className: c(
|
|
@@ -959,7 +974,7 @@ function Cn({
|
|
|
959
974
|
}
|
|
960
975
|
) }) });
|
|
961
976
|
}
|
|
962
|
-
function
|
|
977
|
+
function Zn({
|
|
963
978
|
side: t = "left",
|
|
964
979
|
variant: e = "sidebar",
|
|
965
980
|
collapsible: s = "offcanvas",
|
|
@@ -967,7 +982,7 @@ function Sn({
|
|
|
967
982
|
children: r,
|
|
968
983
|
...o
|
|
969
984
|
}) {
|
|
970
|
-
const { isMobile: i, state: l, openMobile: m, setOpenMobile: u, isIconMode: w, openIconMode: p, setOpenIconMode:
|
|
985
|
+
const { isMobile: i, state: l, openMobile: m, setOpenMobile: u, isIconMode: w, openIconMode: p, setOpenIconMode: f } = dt();
|
|
971
986
|
return s === "none" ? /* @__PURE__ */ a(
|
|
972
987
|
"div",
|
|
973
988
|
{
|
|
@@ -979,25 +994,25 @@ function Sn({
|
|
|
979
994
|
...o,
|
|
980
995
|
children: r
|
|
981
996
|
}
|
|
982
|
-
) : i ? /* @__PURE__ */ a(
|
|
983
|
-
|
|
997
|
+
) : i ? /* @__PURE__ */ a(B.Root, { open: m, onOpenChange: u, side: t, ...o, children: /* @__PURE__ */ d(
|
|
998
|
+
B.Content,
|
|
984
999
|
{
|
|
985
1000
|
"data-sidebar": "sidebar",
|
|
986
1001
|
"data-slot": "sidebar",
|
|
987
1002
|
"data-mobile": "true",
|
|
988
1003
|
className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
|
|
989
1004
|
style: {
|
|
990
|
-
"--sidebar-width":
|
|
1005
|
+
"--sidebar-width": Yn
|
|
991
1006
|
},
|
|
992
1007
|
children: [
|
|
993
|
-
/* @__PURE__ */ d(
|
|
994
|
-
/* @__PURE__ */ a(
|
|
995
|
-
/* @__PURE__ */ a(
|
|
1008
|
+
/* @__PURE__ */ d(B.Header, { className: "astw:sr-only", children: [
|
|
1009
|
+
/* @__PURE__ */ a(B.Title, { children: "Sidebar" }),
|
|
1010
|
+
/* @__PURE__ */ a(B.Description, { children: "Displays the mobile sidebar." })
|
|
996
1011
|
] }),
|
|
997
1012
|
/* @__PURE__ */ a("div", { className: "astw:flex astw:h-full astw:w-full astw:flex-col", children: r })
|
|
998
1013
|
]
|
|
999
1014
|
}
|
|
1000
|
-
) }) : w && s === "icon" ? /* @__PURE__ */ d(
|
|
1015
|
+
) }) : w && s === "icon" ? /* @__PURE__ */ d(D, { children: [
|
|
1001
1016
|
/* @__PURE__ */ d(
|
|
1002
1017
|
"div",
|
|
1003
1018
|
{
|
|
@@ -1042,20 +1057,20 @@ function Sn({
|
|
|
1042
1057
|
]
|
|
1043
1058
|
}
|
|
1044
1059
|
),
|
|
1045
|
-
/* @__PURE__ */ a(
|
|
1046
|
-
|
|
1060
|
+
/* @__PURE__ */ a(B.Root, { open: p, onOpenChange: f, side: t, ...o, children: /* @__PURE__ */ d(
|
|
1061
|
+
B.Content,
|
|
1047
1062
|
{
|
|
1048
1063
|
"data-sidebar": "sidebar",
|
|
1049
1064
|
"data-slot": "sidebar-overlay",
|
|
1050
1065
|
"data-icon-mode": "true",
|
|
1051
1066
|
className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
|
|
1052
1067
|
style: {
|
|
1053
|
-
"--sidebar-width":
|
|
1068
|
+
"--sidebar-width": Pa
|
|
1054
1069
|
},
|
|
1055
1070
|
children: [
|
|
1056
|
-
/* @__PURE__ */ d(
|
|
1057
|
-
/* @__PURE__ */ a(
|
|
1058
|
-
/* @__PURE__ */ a(
|
|
1071
|
+
/* @__PURE__ */ d(B.Header, { className: "astw:sr-only", children: [
|
|
1072
|
+
/* @__PURE__ */ a(B.Title, { children: "Sidebar" }),
|
|
1073
|
+
/* @__PURE__ */ a(B.Description, { children: "Displays the sidebar overlay." })
|
|
1059
1074
|
] }),
|
|
1060
1075
|
/* @__PURE__ */ a("div", { className: "astw:flex astw:h-full astw:w-full astw:flex-col", children: r })
|
|
1061
1076
|
]
|
|
@@ -1111,10 +1126,10 @@ function Sn({
|
|
|
1111
1126
|
}
|
|
1112
1127
|
);
|
|
1113
1128
|
}
|
|
1114
|
-
function
|
|
1115
|
-
const { toggleSidebar: n } =
|
|
1129
|
+
function Ma({ className: t, onClick: e, ...s }) {
|
|
1130
|
+
const { toggleSidebar: n } = dt();
|
|
1116
1131
|
return /* @__PURE__ */ d(
|
|
1117
|
-
|
|
1132
|
+
ft,
|
|
1118
1133
|
{
|
|
1119
1134
|
"data-sidebar": "trigger",
|
|
1120
1135
|
"data-slot": "sidebar-trigger",
|
|
@@ -1126,19 +1141,19 @@ function ya({ className: t, onClick: e, ...s }) {
|
|
|
1126
1141
|
},
|
|
1127
1142
|
...s,
|
|
1128
1143
|
children: [
|
|
1129
|
-
/* @__PURE__ */ a(
|
|
1144
|
+
/* @__PURE__ */ a(ln, { className: "astw:size-4.5" }),
|
|
1130
1145
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Toggle Sidebar" })
|
|
1131
1146
|
]
|
|
1132
1147
|
}
|
|
1133
1148
|
);
|
|
1134
1149
|
}
|
|
1135
|
-
function
|
|
1150
|
+
function Jn({ className: t, ...e }) {
|
|
1136
1151
|
return /* @__PURE__ */ a(
|
|
1137
1152
|
"main",
|
|
1138
1153
|
{
|
|
1139
1154
|
"data-slot": "sidebar-inset",
|
|
1140
1155
|
className: c(
|
|
1141
|
-
"astw:bg-background astw:relative astw:flex astw:w-full astw:flex-1 astw:flex-col",
|
|
1156
|
+
"astw:bg-background astw:relative astw:flex astw:min-h-0 astw:w-full astw:flex-1 astw:flex-col",
|
|
1142
1157
|
"astw:px-4 astw:md:peer-data-[variant=inset]:px-8 astw:md:peer-data-[variant=inset]:py-2",
|
|
1143
1158
|
// astw:md:peer-data-[variant=inset]:peer-data-[state=collapsed]:pl-2
|
|
1144
1159
|
t
|
|
@@ -1147,7 +1162,7 @@ function Tn({ className: t, ...e }) {
|
|
|
1147
1162
|
}
|
|
1148
1163
|
);
|
|
1149
1164
|
}
|
|
1150
|
-
function
|
|
1165
|
+
function tr({ className: t, ...e }) {
|
|
1151
1166
|
return /* @__PURE__ */ a(
|
|
1152
1167
|
"div",
|
|
1153
1168
|
{
|
|
@@ -1158,9 +1173,9 @@ function In({ className: t, ...e }) {
|
|
|
1158
1173
|
}
|
|
1159
1174
|
);
|
|
1160
1175
|
}
|
|
1161
|
-
function
|
|
1176
|
+
function er({ className: t, ...e }) {
|
|
1162
1177
|
return /* @__PURE__ */ a(
|
|
1163
|
-
|
|
1178
|
+
Un,
|
|
1164
1179
|
{
|
|
1165
1180
|
"data-slot": "sidebar-separator",
|
|
1166
1181
|
"data-sidebar": "separator",
|
|
@@ -1169,7 +1184,7 @@ function Rn({ className: t, ...e }) {
|
|
|
1169
1184
|
}
|
|
1170
1185
|
);
|
|
1171
1186
|
}
|
|
1172
|
-
function
|
|
1187
|
+
function ar({ className: t, ...e }) {
|
|
1173
1188
|
return /* @__PURE__ */ a(
|
|
1174
1189
|
"div",
|
|
1175
1190
|
{
|
|
@@ -1183,7 +1198,7 @@ function kn({ className: t, ...e }) {
|
|
|
1183
1198
|
}
|
|
1184
1199
|
);
|
|
1185
1200
|
}
|
|
1186
|
-
function
|
|
1201
|
+
function we({ className: t, ...e }) {
|
|
1187
1202
|
return /* @__PURE__ */ a(
|
|
1188
1203
|
"div",
|
|
1189
1204
|
{
|
|
@@ -1197,7 +1212,7 @@ function le({ className: t, ...e }) {
|
|
|
1197
1212
|
}
|
|
1198
1213
|
);
|
|
1199
1214
|
}
|
|
1200
|
-
function
|
|
1215
|
+
function me({ className: t, ...e }) {
|
|
1201
1216
|
return /* @__PURE__ */ a(
|
|
1202
1217
|
"ul",
|
|
1203
1218
|
{
|
|
@@ -1208,7 +1223,7 @@ function ce({ className: t, ...e }) {
|
|
|
1208
1223
|
}
|
|
1209
1224
|
);
|
|
1210
1225
|
}
|
|
1211
|
-
function
|
|
1226
|
+
function st({ className: t, ...e }) {
|
|
1212
1227
|
return /* @__PURE__ */ a(
|
|
1213
1228
|
"li",
|
|
1214
1229
|
{
|
|
@@ -1219,7 +1234,7 @@ function et({ className: t, ...e }) {
|
|
|
1219
1234
|
}
|
|
1220
1235
|
);
|
|
1221
1236
|
}
|
|
1222
|
-
const
|
|
1237
|
+
const sr = Ft(
|
|
1223
1238
|
"astw:peer/menu-button astw:flex astw:w-full astw:items-center astw:gap-2 astw:overflow-hidden astw:rounded-md astw:p-2 astw:text-left astw:text-sm astw:outline-hidden astw:ring-sidebar-ring astw:transition-[width,height,padding] astw:hover:bg-sidebar-accent astw:hover:text-sidebar-accent-foreground astw:focus-visible:ring-2 astw:active:bg-sidebar-accent astw:active:text-sidebar-accent-foreground astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:group-has-data-[sidebar=menu-action]/menu-item:pr-8 astw:aria-disabled:pointer-events-none astw:aria-disabled:opacity-50 astw:data-[active=true]:bg-sidebar-accent astw:data-[active=true]:font-medium astw:data-[active=true]:text-sidebar-accent-foreground astw:data-[state=open]:hover:bg-sidebar-accent astw:data-[state=open]:hover:text-sidebar-accent-foreground astw:group-data-[collapsible=icon]:size-8! astw:group-data-[collapsible=icon]:p-2! astw:[&>span:last-child]:truncate astw:group-data-[collapsible=icon]:[&>span:last-child]:hidden astw:[&>svg]:size-4 astw:[&>svg]:shrink-0",
|
|
1224
1239
|
{
|
|
1225
1240
|
variants: {
|
|
@@ -1239,7 +1254,7 @@ const Ln = ee(
|
|
|
1239
1254
|
}
|
|
1240
1255
|
}
|
|
1241
1256
|
);
|
|
1242
|
-
function
|
|
1257
|
+
function nt({
|
|
1243
1258
|
render: t,
|
|
1244
1259
|
isActive: e = !1,
|
|
1245
1260
|
variant: s = "default",
|
|
@@ -1250,12 +1265,12 @@ function at({
|
|
|
1250
1265
|
onClick: l,
|
|
1251
1266
|
...m
|
|
1252
1267
|
}) {
|
|
1253
|
-
const { isMobile: u, state: w, setOpenMobile: p, openIconMode:
|
|
1254
|
-
(
|
|
1255
|
-
l?.(
|
|
1268
|
+
const { isMobile: u, state: w, setOpenMobile: p, openIconMode: f, setOpenIconMode: b } = dt(), h = v.useCallback(
|
|
1269
|
+
(N) => {
|
|
1270
|
+
l?.(N), !N.defaultPrevented && (u ? p(!1) : f && b(!1));
|
|
1256
1271
|
},
|
|
1257
|
-
[l, u, p,
|
|
1258
|
-
), g =
|
|
1272
|
+
[l, u, p, f, b]
|
|
1273
|
+
), g = xt({
|
|
1259
1274
|
defaultTagName: "button",
|
|
1260
1275
|
render: t,
|
|
1261
1276
|
props: {
|
|
@@ -1263,18 +1278,18 @@ function at({
|
|
|
1263
1278
|
"data-sidebar": "menu-button",
|
|
1264
1279
|
"data-size": n,
|
|
1265
1280
|
"data-active": e,
|
|
1266
|
-
className: c(
|
|
1267
|
-
onClick:
|
|
1281
|
+
className: c(sr({ variant: s, size: n }), o),
|
|
1282
|
+
onClick: h,
|
|
1268
1283
|
children: i,
|
|
1269
1284
|
...m
|
|
1270
1285
|
}
|
|
1271
1286
|
});
|
|
1272
1287
|
return r ? (typeof r == "string" && (r = {
|
|
1273
1288
|
children: r
|
|
1274
|
-
}), /* @__PURE__ */ d(
|
|
1275
|
-
/* @__PURE__ */ a(
|
|
1289
|
+
}), /* @__PURE__ */ d($.Root, { children: [
|
|
1290
|
+
/* @__PURE__ */ a($.Trigger, { render: g }),
|
|
1276
1291
|
/* @__PURE__ */ a(
|
|
1277
|
-
|
|
1292
|
+
$.Content,
|
|
1278
1293
|
{
|
|
1279
1294
|
position: { side: "right", align: "center" },
|
|
1280
1295
|
hidden: w !== "collapsed" || u,
|
|
@@ -1283,14 +1298,14 @@ function at({
|
|
|
1283
1298
|
)
|
|
1284
1299
|
] })) : g;
|
|
1285
1300
|
}
|
|
1286
|
-
function
|
|
1301
|
+
function Mt({
|
|
1287
1302
|
className: t,
|
|
1288
1303
|
render: e,
|
|
1289
1304
|
showOnHover: s = !1,
|
|
1290
1305
|
children: n,
|
|
1291
1306
|
...r
|
|
1292
1307
|
}) {
|
|
1293
|
-
return
|
|
1308
|
+
return xt({
|
|
1294
1309
|
defaultTagName: "button",
|
|
1295
1310
|
render: e,
|
|
1296
1311
|
props: {
|
|
@@ -1312,7 +1327,7 @@ function Pt({
|
|
|
1312
1327
|
}
|
|
1313
1328
|
});
|
|
1314
1329
|
}
|
|
1315
|
-
function
|
|
1330
|
+
function ee({ className: t, ...e }) {
|
|
1316
1331
|
return /* @__PURE__ */ a(
|
|
1317
1332
|
"ul",
|
|
1318
1333
|
{
|
|
@@ -1327,7 +1342,7 @@ function Qt({ className: t, ...e }) {
|
|
|
1327
1342
|
}
|
|
1328
1343
|
);
|
|
1329
1344
|
}
|
|
1330
|
-
function
|
|
1345
|
+
function nr({ className: t, ...e }) {
|
|
1331
1346
|
return /* @__PURE__ */ a(
|
|
1332
1347
|
"li",
|
|
1333
1348
|
{
|
|
@@ -1338,7 +1353,7 @@ function Pn({ className: t, ...e }) {
|
|
|
1338
1353
|
}
|
|
1339
1354
|
);
|
|
1340
1355
|
}
|
|
1341
|
-
function
|
|
1356
|
+
function rr({
|
|
1342
1357
|
render: t,
|
|
1343
1358
|
size: e = "md",
|
|
1344
1359
|
isActive: s = !1,
|
|
@@ -1347,13 +1362,13 @@ function An({
|
|
|
1347
1362
|
onClick: o,
|
|
1348
1363
|
...i
|
|
1349
1364
|
}) {
|
|
1350
|
-
const { isMobile: l, setOpenMobile: m, openIconMode: u, setOpenIconMode: w } =
|
|
1351
|
-
(
|
|
1352
|
-
o?.(
|
|
1365
|
+
const { isMobile: l, setOpenMobile: m, openIconMode: u, setOpenIconMode: w } = dt(), p = v.useCallback(
|
|
1366
|
+
(f) => {
|
|
1367
|
+
o?.(f), !f.defaultPrevented && (l ? m(!1) : u && w(!1));
|
|
1353
1368
|
},
|
|
1354
1369
|
[o, l, m, u, w]
|
|
1355
1370
|
);
|
|
1356
|
-
return
|
|
1371
|
+
return xt({
|
|
1357
1372
|
defaultTagName: "a",
|
|
1358
1373
|
render: t,
|
|
1359
1374
|
props: {
|
|
@@ -1375,46 +1390,46 @@ function An({
|
|
|
1375
1390
|
}
|
|
1376
1391
|
});
|
|
1377
1392
|
}
|
|
1378
|
-
const
|
|
1393
|
+
const or = (t) => {
|
|
1379
1394
|
const { configurations: e } = K(), { modules: s, locale: n } = e;
|
|
1380
|
-
return
|
|
1381
|
-
},
|
|
1382
|
-
const n =
|
|
1395
|
+
return ir(t) ? null : lr(t, s, n);
|
|
1396
|
+
}, ir = (t) => t.startsWith("http://") || t.startsWith("https://"), lr = (t, e, s) => {
|
|
1397
|
+
const n = yt(s), r = Oe(t);
|
|
1383
1398
|
for (const o of e) {
|
|
1384
|
-
const i =
|
|
1385
|
-
if (
|
|
1399
|
+
const i = Oe(o.path);
|
|
1400
|
+
if (Va(r, i))
|
|
1386
1401
|
return {
|
|
1387
1402
|
title: n(o.meta.title, o.path),
|
|
1388
1403
|
icon: o.meta.icon
|
|
1389
1404
|
};
|
|
1390
|
-
const l =
|
|
1405
|
+
const l = Ea(r, i, o.resources, n);
|
|
1391
1406
|
if (l)
|
|
1392
1407
|
return l;
|
|
1393
1408
|
}
|
|
1394
1409
|
return null;
|
|
1395
|
-
},
|
|
1410
|
+
}, Va = (t, e) => {
|
|
1396
1411
|
if (t === e) return !0;
|
|
1397
1412
|
const s = t.split("/"), n = e.split("/");
|
|
1398
1413
|
return s.length !== n.length ? !1 : n.every((r, o) => r.startsWith(":") || r === s[o]);
|
|
1399
|
-
},
|
|
1414
|
+
}, Oe = (t) => {
|
|
1400
1415
|
let e = t;
|
|
1401
1416
|
return e.startsWith("/") || (e = `/${e}`), e.length > 1 && e.endsWith("/") && (e = e.slice(0, -1)), e;
|
|
1402
|
-
},
|
|
1417
|
+
}, Ea = (t, e, s, n) => {
|
|
1403
1418
|
for (const r of s) {
|
|
1404
1419
|
const o = `${e}/${r.path}`;
|
|
1405
|
-
if (
|
|
1420
|
+
if (Va(t, o))
|
|
1406
1421
|
return {
|
|
1407
1422
|
title: n(r.meta.title, r.path),
|
|
1408
1423
|
icon: r.meta.icon
|
|
1409
1424
|
};
|
|
1410
1425
|
if (r.subResources) {
|
|
1411
|
-
const i =
|
|
1426
|
+
const i = Ea(t, o, r.subResources, n);
|
|
1412
1427
|
if (i)
|
|
1413
1428
|
return i;
|
|
1414
1429
|
}
|
|
1415
1430
|
}
|
|
1416
1431
|
return null;
|
|
1417
|
-
},
|
|
1432
|
+
}, ii = (t) => {
|
|
1418
1433
|
const {
|
|
1419
1434
|
to: e,
|
|
1420
1435
|
external: s,
|
|
@@ -1422,14 +1437,14 @@ const Mn = (t) => {
|
|
|
1422
1437
|
activeMatch: r = "prefix",
|
|
1423
1438
|
title: o,
|
|
1424
1439
|
icon: i
|
|
1425
|
-
} = t, { pathname: l } =
|
|
1440
|
+
} = t, { pathname: l } = Bt(), m = or(e), u = r === "exact" ? l === e : l === e || l.startsWith(`${e}/`), w = o ?? m?.title ?? cr(e), p = i ?? m?.icon, f = {
|
|
1426
1441
|
title: w,
|
|
1427
1442
|
url: e,
|
|
1428
1443
|
icon: p,
|
|
1429
1444
|
isActive: u
|
|
1430
1445
|
};
|
|
1431
|
-
return s ||
|
|
1432
|
-
|
|
1446
|
+
return s || _a(e) ? /* @__PURE__ */ a(st, { children: /* @__PURE__ */ a(
|
|
1447
|
+
nt,
|
|
1433
1448
|
{
|
|
1434
1449
|
render: (
|
|
1435
1450
|
// oxlint-disable-next-line jsx-a11y/anchor-has-content -- content is provided by SidebarMenuButton's children
|
|
@@ -1444,30 +1459,30 @@ const Mn = (t) => {
|
|
|
1444
1459
|
)
|
|
1445
1460
|
),
|
|
1446
1461
|
tooltip: w,
|
|
1447
|
-
children: n ? n(
|
|
1448
|
-
p ?? /* @__PURE__ */ a(
|
|
1462
|
+
children: n ? n(f) : /* @__PURE__ */ d(D, { children: [
|
|
1463
|
+
p ?? /* @__PURE__ */ a(Ze, { className: "astw:size-4" }),
|
|
1449
1464
|
/* @__PURE__ */ a("span", { children: w })
|
|
1450
1465
|
] })
|
|
1451
1466
|
}
|
|
1452
|
-
) }) : /* @__PURE__ */ a(
|
|
1453
|
-
|
|
1467
|
+
) }) : /* @__PURE__ */ a(st, { children: /* @__PURE__ */ a(
|
|
1468
|
+
nt,
|
|
1454
1469
|
{
|
|
1455
1470
|
render: /* @__PURE__ */ a(
|
|
1456
|
-
|
|
1471
|
+
mt,
|
|
1457
1472
|
{
|
|
1458
1473
|
to: e,
|
|
1459
1474
|
className: u ? "astw:bg-sidebar-accent astw:font-medium" : void 0
|
|
1460
1475
|
}
|
|
1461
1476
|
),
|
|
1462
1477
|
tooltip: w,
|
|
1463
|
-
children: n ? n(
|
|
1478
|
+
children: n ? n(f) : /* @__PURE__ */ d(D, { children: [
|
|
1464
1479
|
p,
|
|
1465
1480
|
/* @__PURE__ */ a("span", { children: w })
|
|
1466
1481
|
] })
|
|
1467
1482
|
}
|
|
1468
1483
|
) });
|
|
1469
|
-
},
|
|
1470
|
-
if (
|
|
1484
|
+
}, _a = (t) => t.startsWith("http://") || t.startsWith("https://"), cr = (t) => {
|
|
1485
|
+
if (_a(t))
|
|
1471
1486
|
try {
|
|
1472
1487
|
return new URL(t).hostname;
|
|
1473
1488
|
} catch {
|
|
@@ -1475,14 +1490,14 @@ const Mn = (t) => {
|
|
|
1475
1490
|
}
|
|
1476
1491
|
const e = t.split("/").filter(Boolean);
|
|
1477
1492
|
return (e[e.length - 1] ?? t).split("-").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ");
|
|
1478
|
-
},
|
|
1479
|
-
const { title: e, icon: s, to: n, defaultOpen: r = !0, children: o } = t, { pathname: i } =
|
|
1480
|
-
return n ? /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(
|
|
1493
|
+
}, li = (t) => {
|
|
1494
|
+
const { title: e, icon: s, to: n, defaultOpen: r = !0, children: o } = t, { pathname: i } = Bt(), { configurations: l } = K(), m = yt(l.locale), u = Z(), w = m(e, typeof e == "string" ? e : ""), p = n ? i === n : !1;
|
|
1495
|
+
return n ? /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(st, {}), defaultOpen: r, children: [
|
|
1481
1496
|
/* @__PURE__ */ d(
|
|
1482
|
-
|
|
1497
|
+
nt,
|
|
1483
1498
|
{
|
|
1484
1499
|
render: /* @__PURE__ */ a(
|
|
1485
|
-
|
|
1500
|
+
mt,
|
|
1486
1501
|
{
|
|
1487
1502
|
to: n,
|
|
1488
1503
|
className: p ? "astw:bg-sidebar-accent astw:font-medium" : void 0
|
|
@@ -1498,69 +1513,69 @@ const Mn = (t) => {
|
|
|
1498
1513
|
/* @__PURE__ */ d(
|
|
1499
1514
|
F.Trigger,
|
|
1500
1515
|
{
|
|
1501
|
-
render: /* @__PURE__ */ a(
|
|
1516
|
+
render: /* @__PURE__ */ a(Mt, { className: "astw:data-panel-open:rotate-90" }),
|
|
1502
1517
|
children: [
|
|
1503
|
-
/* @__PURE__ */ a(
|
|
1518
|
+
/* @__PURE__ */ a(pt, {}),
|
|
1504
1519
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: u("toggle") })
|
|
1505
1520
|
]
|
|
1506
1521
|
}
|
|
1507
1522
|
),
|
|
1508
|
-
/* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(
|
|
1509
|
-
] }) : /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(
|
|
1523
|
+
/* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(ee, { children: o }) })
|
|
1524
|
+
] }) : /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(st, {}), defaultOpen: r, children: [
|
|
1510
1525
|
/* @__PURE__ */ d(F.Trigger, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
|
|
1511
1526
|
/* @__PURE__ */ d(
|
|
1512
|
-
|
|
1527
|
+
nt,
|
|
1513
1528
|
{
|
|
1514
1529
|
render: /* @__PURE__ */ a("span", { className: "astw:flex astw:w-full" }),
|
|
1515
1530
|
tooltip: w,
|
|
1516
|
-
onClick: (
|
|
1531
|
+
onClick: (f) => f.preventDefault(),
|
|
1517
1532
|
children: [
|
|
1518
1533
|
s,
|
|
1519
1534
|
/* @__PURE__ */ a("span", { children: w })
|
|
1520
1535
|
]
|
|
1521
1536
|
}
|
|
1522
1537
|
),
|
|
1523
|
-
/* @__PURE__ */ d(
|
|
1524
|
-
/* @__PURE__ */ a(
|
|
1538
|
+
/* @__PURE__ */ d(Mt, { className: "astw-rotate-target", render: /* @__PURE__ */ a("span", {}), children: [
|
|
1539
|
+
/* @__PURE__ */ a(pt, {}),
|
|
1525
1540
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: u("toggle") })
|
|
1526
1541
|
] })
|
|
1527
1542
|
] }),
|
|
1528
|
-
/* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(
|
|
1543
|
+
/* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(ee, { children: o }) })
|
|
1529
1544
|
] });
|
|
1530
|
-
},
|
|
1531
|
-
const { title: e, icon: s } = K(), { pathname: n } =
|
|
1545
|
+
}, ci = () => /* @__PURE__ */ a(er, {}), dr = (t) => {
|
|
1546
|
+
const { title: e, icon: s } = K(), { pathname: n } = Bt(), { isIconMode: r } = dt(), o = /* @__PURE__ */ d(tr, { children: [
|
|
1532
1547
|
s,
|
|
1533
1548
|
/* @__PURE__ */ a("h1", { className: c("astw:text-sm astw:mb-2 astw:mt-2 astw:px-2", r && "astw:hidden"), children: e })
|
|
1534
1549
|
] });
|
|
1535
|
-
return /* @__PURE__ */ d(
|
|
1550
|
+
return /* @__PURE__ */ d(Zn, { variant: "inset", collapsible: r ? "icon" : "offcanvas", children: [
|
|
1536
1551
|
!r && /* @__PURE__ */ d("div", { className: "astw:flex astw:justify-between astw:items-center", children: [
|
|
1537
1552
|
t.header ?? o,
|
|
1538
|
-
/* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(
|
|
1553
|
+
/* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(Ma, { className: "astw:-ml-1" }) })
|
|
1539
1554
|
] }),
|
|
1540
|
-
/* @__PURE__ */ a(
|
|
1555
|
+
/* @__PURE__ */ a(ar, { children: t.children ? (
|
|
1541
1556
|
// New API: children-based explicit definition
|
|
1542
|
-
/* @__PURE__ */ a(
|
|
1557
|
+
/* @__PURE__ */ a(we, { children: /* @__PURE__ */ a(me, { children: t.children }) })
|
|
1543
1558
|
) : (
|
|
1544
1559
|
// Existing behavior: auto-generation from resources
|
|
1545
|
-
/* @__PURE__ */ a(
|
|
1560
|
+
/* @__PURE__ */ a(oe, { fallback: /* @__PURE__ */ a(pr, {}), children: /* @__PURE__ */ a(ur, { currentPath: n }) })
|
|
1546
1561
|
) }),
|
|
1547
1562
|
t.footer ?? null
|
|
1548
1563
|
] });
|
|
1549
|
-
},
|
|
1550
|
-
const e =
|
|
1551
|
-
return /* @__PURE__ */ a(
|
|
1552
|
-
},
|
|
1553
|
-
const e =
|
|
1554
|
-
return /* @__PURE__ */ a(
|
|
1555
|
-
s.url ? /* @__PURE__ */ d(
|
|
1564
|
+
}, ur = ({ currentPath: t }) => {
|
|
1565
|
+
const e = ca();
|
|
1566
|
+
return /* @__PURE__ */ a(Qe, { resolve: e, children: (s) => /* @__PURE__ */ a(wr, { items: s ?? [], currentPath: t }) });
|
|
1567
|
+
}, Ge = (t, e) => t ? (t.startsWith("/") ? t : `/${t}`) === e : !1, wr = (t) => {
|
|
1568
|
+
const e = Z();
|
|
1569
|
+
return /* @__PURE__ */ a(we, { children: /* @__PURE__ */ a(me, { children: t.items.map((s) => /* @__PURE__ */ d(F.Root, { render: /* @__PURE__ */ a(st, {}), defaultOpen: !0, children: [
|
|
1570
|
+
s.url ? /* @__PURE__ */ d(D, { children: [
|
|
1556
1571
|
/* @__PURE__ */ d(
|
|
1557
|
-
|
|
1572
|
+
nt,
|
|
1558
1573
|
{
|
|
1559
1574
|
render: /* @__PURE__ */ a(
|
|
1560
|
-
|
|
1575
|
+
mt,
|
|
1561
1576
|
{
|
|
1562
1577
|
to: s.url,
|
|
1563
|
-
className: s.url
|
|
1578
|
+
className: Ge(s.url, t.currentPath) ? "astw:bg-sidebar-accent astw:font-medium" : void 0
|
|
1564
1579
|
}
|
|
1565
1580
|
),
|
|
1566
1581
|
tooltip: s.title,
|
|
@@ -1573,16 +1588,16 @@ const Mn = (t) => {
|
|
|
1573
1588
|
!!s.items?.length && /* @__PURE__ */ d(
|
|
1574
1589
|
F.Trigger,
|
|
1575
1590
|
{
|
|
1576
|
-
render: /* @__PURE__ */ a(
|
|
1591
|
+
render: /* @__PURE__ */ a(Mt, { className: "astw:data-panel-open:rotate-90" }),
|
|
1577
1592
|
children: [
|
|
1578
|
-
/* @__PURE__ */ a(
|
|
1593
|
+
/* @__PURE__ */ a(pt, {}),
|
|
1579
1594
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
|
|
1580
1595
|
]
|
|
1581
1596
|
}
|
|
1582
1597
|
)
|
|
1583
|
-
] }) : /* @__PURE__ */ a(
|
|
1598
|
+
] }) : /* @__PURE__ */ a(D, { children: /* @__PURE__ */ d(F.Trigger, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
|
|
1584
1599
|
/* @__PURE__ */ d(
|
|
1585
|
-
|
|
1600
|
+
nt,
|
|
1586
1601
|
{
|
|
1587
1602
|
render: /* @__PURE__ */ a("span", { className: "astw:flex astw:w-full" }),
|
|
1588
1603
|
tooltip: s.title,
|
|
@@ -1597,26 +1612,26 @@ const Mn = (t) => {
|
|
|
1597
1612
|
]
|
|
1598
1613
|
}
|
|
1599
1614
|
),
|
|
1600
|
-
!!s.items?.length && /* @__PURE__ */ d(
|
|
1601
|
-
/* @__PURE__ */ a(
|
|
1615
|
+
!!s.items?.length && /* @__PURE__ */ d(Mt, { className: "astw-rotate-target", render: /* @__PURE__ */ a("span", {}), children: [
|
|
1616
|
+
/* @__PURE__ */ a(pt, {}),
|
|
1602
1617
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
|
|
1603
1618
|
] })
|
|
1604
1619
|
] }) }),
|
|
1605
|
-
!!s.items?.length && /* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(
|
|
1606
|
-
|
|
1620
|
+
!!s.items?.length && /* @__PURE__ */ a(F.Panel, { children: /* @__PURE__ */ a(ee, { children: s.items?.filter((n) => n.url).map((n) => /* @__PURE__ */ a(nr, { children: /* @__PURE__ */ a(
|
|
1621
|
+
rr,
|
|
1607
1622
|
{
|
|
1608
1623
|
render: /* @__PURE__ */ a(
|
|
1609
|
-
|
|
1624
|
+
mt,
|
|
1610
1625
|
{
|
|
1611
1626
|
to: n.url,
|
|
1612
|
-
className: n.url
|
|
1627
|
+
className: Ge(n.url, t.currentPath) ? "astw:bg-sidebar-accent astw:font-medium" : void 0
|
|
1613
1628
|
}
|
|
1614
1629
|
),
|
|
1615
1630
|
children: /* @__PURE__ */ a("span", { children: n.title })
|
|
1616
1631
|
}
|
|
1617
1632
|
) }, n.title)) }) })
|
|
1618
1633
|
] }, s.title)) }) });
|
|
1619
|
-
},
|
|
1634
|
+
}, mr = [104, 80, 112, 88, 96, 100, 84, 92], pr = () => /* @__PURE__ */ a(we, { children: /* @__PURE__ */ a(me, { className: "astw:px-2", children: mr.map((t, e) => /* @__PURE__ */ a(st, { children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
|
|
1620
1635
|
/* @__PURE__ */ a("div", { className: "astw:h-4 astw:w-4 astw:rounded-md astw:bg-muted" }),
|
|
1621
1636
|
/* @__PURE__ */ a(
|
|
1622
1637
|
"div",
|
|
@@ -1626,10 +1641,10 @@ const Mn = (t) => {
|
|
|
1626
1641
|
}
|
|
1627
1642
|
)
|
|
1628
1643
|
] }) }, e)) }) });
|
|
1629
|
-
function
|
|
1644
|
+
function je({ ...t }) {
|
|
1630
1645
|
return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...t });
|
|
1631
1646
|
}
|
|
1632
|
-
function
|
|
1647
|
+
function We({ className: t, ...e }) {
|
|
1633
1648
|
return /* @__PURE__ */ a(
|
|
1634
1649
|
"ol",
|
|
1635
1650
|
{
|
|
@@ -1642,7 +1657,7 @@ function Ee({ className: t, ...e }) {
|
|
|
1642
1657
|
}
|
|
1643
1658
|
);
|
|
1644
1659
|
}
|
|
1645
|
-
function
|
|
1660
|
+
function He({ className: t, ...e }) {
|
|
1646
1661
|
return /* @__PURE__ */ a(
|
|
1647
1662
|
"li",
|
|
1648
1663
|
{
|
|
@@ -1652,7 +1667,7 @@ function Be({ className: t, ...e }) {
|
|
|
1652
1667
|
}
|
|
1653
1668
|
);
|
|
1654
1669
|
}
|
|
1655
|
-
function
|
|
1670
|
+
function Ue({
|
|
1656
1671
|
render: t,
|
|
1657
1672
|
className: e,
|
|
1658
1673
|
children: s,
|
|
@@ -1660,9 +1675,9 @@ function ze({
|
|
|
1660
1675
|
...r
|
|
1661
1676
|
}) {
|
|
1662
1677
|
const o = c("astw:hover:text-foreground astw:transition-colors", e);
|
|
1663
|
-
return
|
|
1678
|
+
return xt({
|
|
1664
1679
|
defaultTagName: "a",
|
|
1665
|
-
render: t ?? /* @__PURE__ */ a(
|
|
1680
|
+
render: t ?? /* @__PURE__ */ a(mt, { to: n }),
|
|
1666
1681
|
props: {
|
|
1667
1682
|
"data-slot": "breadcrumb-link",
|
|
1668
1683
|
className: o,
|
|
@@ -1671,7 +1686,23 @@ function ze({
|
|
|
1671
1686
|
}
|
|
1672
1687
|
});
|
|
1673
1688
|
}
|
|
1674
|
-
function
|
|
1689
|
+
function fr({
|
|
1690
|
+
className: t,
|
|
1691
|
+
ariaCurrent: e = "location",
|
|
1692
|
+
...s
|
|
1693
|
+
}) {
|
|
1694
|
+
return /* @__PURE__ */ a(
|
|
1695
|
+
"span",
|
|
1696
|
+
{
|
|
1697
|
+
"data-slot": "breadcrumb-page",
|
|
1698
|
+
"aria-disabled": "true",
|
|
1699
|
+
"aria-current": e,
|
|
1700
|
+
className: c("astw:text-foreground astw:font-normal", t),
|
|
1701
|
+
...s
|
|
1702
|
+
}
|
|
1703
|
+
);
|
|
1704
|
+
}
|
|
1705
|
+
function hr({ children: t, className: e, ...s }) {
|
|
1675
1706
|
return /* @__PURE__ */ a(
|
|
1676
1707
|
"li",
|
|
1677
1708
|
{
|
|
@@ -1680,34 +1711,34 @@ function On({ children: t, className: e, ...s }) {
|
|
|
1680
1711
|
"aria-hidden": "true",
|
|
1681
1712
|
className: c("astw:[&>svg]:size-3.5", e),
|
|
1682
1713
|
...s,
|
|
1683
|
-
children: t ?? /* @__PURE__ */ a(
|
|
1714
|
+
children: t ?? /* @__PURE__ */ a(pt, {})
|
|
1684
1715
|
}
|
|
1685
1716
|
);
|
|
1686
1717
|
}
|
|
1687
|
-
function
|
|
1718
|
+
function gr(t, e) {
|
|
1688
1719
|
if (!e.trim()) return t;
|
|
1689
1720
|
const s = e.toLowerCase();
|
|
1690
1721
|
return t.filter(
|
|
1691
1722
|
(n) => n.title.toLowerCase().includes(s) || n.path.toLowerCase().includes(s)
|
|
1692
1723
|
);
|
|
1693
1724
|
}
|
|
1694
|
-
const
|
|
1695
|
-
const s =
|
|
1725
|
+
const br = (t, e) => {
|
|
1726
|
+
const s = aa(e);
|
|
1696
1727
|
return t.reduce(
|
|
1697
1728
|
(n, r) => {
|
|
1698
1729
|
const o = s(r.meta.title, r.path);
|
|
1699
1730
|
n[r.path] = {
|
|
1700
1731
|
title: o,
|
|
1701
|
-
|
|
1702
|
-
|
|
1732
|
+
breadcrumbTitle: r.meta.breadcrumbTitle,
|
|
1733
|
+
clickable: r.meta.menuItemClickable
|
|
1703
1734
|
};
|
|
1704
1735
|
const i = (l, m) => {
|
|
1705
1736
|
!l || l.length === 0 || l.forEach((u) => {
|
|
1706
1737
|
const w = `${m}/${u.path}`, p = s(u.meta.title, u.path);
|
|
1707
1738
|
n[w] = {
|
|
1708
1739
|
title: p,
|
|
1709
|
-
|
|
1710
|
-
|
|
1740
|
+
breadcrumbTitle: u.meta.breadcrumbTitle,
|
|
1741
|
+
clickable: !0
|
|
1711
1742
|
}, u.subResources && u.subResources.length > 0 && i(u.subResources, w);
|
|
1712
1743
|
});
|
|
1713
1744
|
};
|
|
@@ -1716,22 +1747,23 @@ const jn = (t, e) => {
|
|
|
1716
1747
|
{}
|
|
1717
1748
|
);
|
|
1718
1749
|
};
|
|
1719
|
-
function
|
|
1720
|
-
const r = t.split("/").filter((m) => m !== ""), o = e && r[0] === e ? r.slice(1) : r, i =
|
|
1750
|
+
function xr(t, e, s, n) {
|
|
1751
|
+
const r = t.split("/").filter((m) => m !== ""), o = e && r[0] === e ? r.slice(1) : r, i = br(s, n), l = o.map((m, u) => {
|
|
1721
1752
|
const w = o.slice(0, u + 1).join("/");
|
|
1722
1753
|
let p = i[w];
|
|
1723
1754
|
if (!p) {
|
|
1724
|
-
const b = Object.entries(i).find(([
|
|
1725
|
-
const g =
|
|
1755
|
+
const b = Object.entries(i).find(([h]) => {
|
|
1756
|
+
const g = h.split("/").map((y) => y.startsWith(":") ? "[^/]+" : y).join("/");
|
|
1726
1757
|
return new RegExp(`^${g}$`).test(w);
|
|
1727
1758
|
})?.[1];
|
|
1728
1759
|
b && (p = b);
|
|
1729
1760
|
}
|
|
1730
|
-
let
|
|
1731
|
-
return p ? typeof p.breadcrumbTitle == "function" ?
|
|
1761
|
+
let f;
|
|
1762
|
+
return p ? typeof p.breadcrumbTitle == "function" ? f = p.breadcrumbTitle(m) : typeof p.breadcrumbTitle == "string" ? f = p.breadcrumbTitle : f = p.title : f = decodeURIComponent(m), {
|
|
1732
1763
|
segment: m,
|
|
1733
1764
|
path: w,
|
|
1734
|
-
title:
|
|
1765
|
+
title: f,
|
|
1766
|
+
clickable: p?.clickable ?? !0
|
|
1735
1767
|
};
|
|
1736
1768
|
});
|
|
1737
1769
|
return {
|
|
@@ -1739,65 +1771,69 @@ function Wn(t, e, s, n) {
|
|
|
1739
1771
|
segments: l
|
|
1740
1772
|
};
|
|
1741
1773
|
}
|
|
1742
|
-
const
|
|
1743
|
-
const { configurations: t } = K(), e =
|
|
1744
|
-
return
|
|
1774
|
+
const vr = () => {
|
|
1775
|
+
const { configurations: t } = K(), e = Bt();
|
|
1776
|
+
return xr(
|
|
1745
1777
|
e.pathname,
|
|
1746
1778
|
t.basePath,
|
|
1747
1779
|
t.modules,
|
|
1748
1780
|
t.locale
|
|
1749
1781
|
);
|
|
1750
|
-
},
|
|
1751
|
-
const { segments: t } =
|
|
1752
|
-
return e ? /* @__PURE__ */ a(
|
|
1782
|
+
}, yr = () => {
|
|
1783
|
+
const { segments: t } = vr(), e = an("/:prefix/settings/:suffix"), s = Z();
|
|
1784
|
+
return e ? /* @__PURE__ */ a(je, { children: /* @__PURE__ */ a(We, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(He, { children: /* @__PURE__ */ a(Ue, { to: `/${e.params.prefix}/settings`, children: s("settings") }) }) }) }) }) : /* @__PURE__ */ a(je, { children: /* @__PURE__ */ a(We, { children: t.map((n, r) => /* @__PURE__ */ d(
|
|
1753
1785
|
"div",
|
|
1754
1786
|
{
|
|
1755
1787
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
1756
1788
|
children: [
|
|
1757
|
-
/* @__PURE__ */ a(
|
|
1758
|
-
|
|
1789
|
+
/* @__PURE__ */ a(He, { children: n.clickable ? /* @__PURE__ */ a(Ue, { to: n.path, children: n.title }) : (
|
|
1790
|
+
// Non-last segments use ariaCurrent={false} to avoid announcing
|
|
1791
|
+
// intermediate items as the current location to screen readers.
|
|
1792
|
+
/* @__PURE__ */ a(fr, { ariaCurrent: r === t.length - 1 ? "location" : !1, children: n.title })
|
|
1793
|
+
) }),
|
|
1794
|
+
r < t.length - 1 && /* @__PURE__ */ a(hr, {})
|
|
1759
1795
|
]
|
|
1760
1796
|
},
|
|
1761
1797
|
r
|
|
1762
1798
|
)) }) });
|
|
1763
|
-
},
|
|
1764
|
-
const { open: t, isIconMode: e } =
|
|
1765
|
-
return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(
|
|
1766
|
-
},
|
|
1767
|
-
const e = t.children ? t.children({ Outlet:
|
|
1799
|
+
}, Nr = () => {
|
|
1800
|
+
const { open: t, isIconMode: e } = dt();
|
|
1801
|
+
return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(Ma, { className: "astw:-ml-2.5" }) });
|
|
1802
|
+
}, di = (t) => {
|
|
1803
|
+
const e = t.children ? t.children({ Outlet: Be }) : null, s = En(), n = () => {
|
|
1768
1804
|
s.setTheme(s.theme === "dark" ? "light" : "dark");
|
|
1769
1805
|
};
|
|
1770
|
-
return /* @__PURE__ */ a(
|
|
1771
|
-
t.sidebar ?? /* @__PURE__ */ a(
|
|
1772
|
-
/* @__PURE__ */ d(
|
|
1806
|
+
return /* @__PURE__ */ a(Qn, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:flex-1", children: [
|
|
1807
|
+
t.sidebar ?? /* @__PURE__ */ a(dr, {}),
|
|
1808
|
+
/* @__PURE__ */ d(Jn, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
|
|
1773
1809
|
/* @__PURE__ */ a("header", { className: "astw:flex astw:h-14 astw:shrink-0 astw:items-center astw:gap-2 astw:transition-[width,height] astw:ease-linear astw:group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:w-full astw:items-center astw:justify-between", children: [
|
|
1774
1810
|
/* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2", children: [
|
|
1775
|
-
/* @__PURE__ */ a(
|
|
1776
|
-
/* @__PURE__ */ a(
|
|
1811
|
+
/* @__PURE__ */ a(Nr, {}),
|
|
1812
|
+
/* @__PURE__ */ a(yr, {})
|
|
1777
1813
|
] }),
|
|
1778
|
-
/* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(
|
|
1814
|
+
/* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(ft, { variant: "outline", size: "icon", onClick: n, children: /* @__PURE__ */ a(cn, {}) }) })
|
|
1779
1815
|
] }) }),
|
|
1780
|
-
/* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4 astw:flex-1 astw:min-h-0", children: e ?? /* @__PURE__ */ a(
|
|
1816
|
+
/* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4 astw:flex-1 astw:min-h-0", children: e ?? /* @__PURE__ */ a(Be, {}) })
|
|
1781
1817
|
] })
|
|
1782
1818
|
] }) });
|
|
1783
1819
|
};
|
|
1784
|
-
function
|
|
1820
|
+
function za({ ...t }) {
|
|
1785
1821
|
return /* @__PURE__ */ a(W.Root, { "data-slot": "dialog", ...t });
|
|
1786
1822
|
}
|
|
1787
|
-
|
|
1788
|
-
function
|
|
1823
|
+
za.displayName = "Dialog.Root";
|
|
1824
|
+
function $a({ ...t }) {
|
|
1789
1825
|
return /* @__PURE__ */ a(W.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
1790
1826
|
}
|
|
1791
|
-
|
|
1792
|
-
function
|
|
1827
|
+
$a.displayName = "Dialog.Trigger";
|
|
1828
|
+
function Ba({ ...t }) {
|
|
1793
1829
|
return /* @__PURE__ */ a(W.Portal, { "data-slot": "dialog-portal", ...t });
|
|
1794
1830
|
}
|
|
1795
|
-
|
|
1796
|
-
function
|
|
1831
|
+
Ba.displayName = "Dialog.Portal";
|
|
1832
|
+
function Fa({ ...t }) {
|
|
1797
1833
|
return /* @__PURE__ */ a(W.Close, { "data-slot": "dialog-close", ...t });
|
|
1798
1834
|
}
|
|
1799
|
-
|
|
1800
|
-
function
|
|
1835
|
+
Fa.displayName = "Dialog.Close";
|
|
1836
|
+
function Oa({ className: t, ...e }) {
|
|
1801
1837
|
return /* @__PURE__ */ a(
|
|
1802
1838
|
W.Backdrop,
|
|
1803
1839
|
{
|
|
@@ -1810,10 +1846,10 @@ function La({ className: t, ...e }) {
|
|
|
1810
1846
|
}
|
|
1811
1847
|
);
|
|
1812
1848
|
}
|
|
1813
|
-
|
|
1814
|
-
function
|
|
1815
|
-
return /* @__PURE__ */ d(
|
|
1816
|
-
/* @__PURE__ */ a(
|
|
1849
|
+
Oa.displayName = "Dialog.Overlay";
|
|
1850
|
+
function Ga({ className: t, children: e, ...s }) {
|
|
1851
|
+
return /* @__PURE__ */ d(Ba, { "data-slot": "dialog-portal", children: [
|
|
1852
|
+
/* @__PURE__ */ a(Oa, {}),
|
|
1817
1853
|
/* @__PURE__ */ d(
|
|
1818
1854
|
W.Popup,
|
|
1819
1855
|
{
|
|
@@ -1826,7 +1862,7 @@ function Pa({ className: t, children: e, ...s }) {
|
|
|
1826
1862
|
children: [
|
|
1827
1863
|
e,
|
|
1828
1864
|
/* @__PURE__ */ d(W.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-accent astw:data-open:text-muted-foreground astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4", children: [
|
|
1829
|
-
/* @__PURE__ */ a(
|
|
1865
|
+
/* @__PURE__ */ a(vt, {}),
|
|
1830
1866
|
/* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
|
|
1831
1867
|
] })
|
|
1832
1868
|
]
|
|
@@ -1834,8 +1870,8 @@ function Pa({ className: t, children: e, ...s }) {
|
|
|
1834
1870
|
)
|
|
1835
1871
|
] });
|
|
1836
1872
|
}
|
|
1837
|
-
|
|
1838
|
-
function
|
|
1873
|
+
Ga.displayName = "Dialog.Content";
|
|
1874
|
+
function ja({ className: t, ...e }) {
|
|
1839
1875
|
return /* @__PURE__ */ a(
|
|
1840
1876
|
"div",
|
|
1841
1877
|
{
|
|
@@ -1848,8 +1884,8 @@ function Aa({ className: t, ...e }) {
|
|
|
1848
1884
|
}
|
|
1849
1885
|
);
|
|
1850
1886
|
}
|
|
1851
|
-
|
|
1852
|
-
function
|
|
1887
|
+
ja.displayName = "Dialog.Header";
|
|
1888
|
+
function Wa({ className: t, ...e }) {
|
|
1853
1889
|
return /* @__PURE__ */ a(
|
|
1854
1890
|
"div",
|
|
1855
1891
|
{
|
|
@@ -1862,8 +1898,8 @@ function Ma({ className: t, ...e }) {
|
|
|
1862
1898
|
}
|
|
1863
1899
|
);
|
|
1864
1900
|
}
|
|
1865
|
-
|
|
1866
|
-
function
|
|
1901
|
+
Wa.displayName = "Dialog.Footer";
|
|
1902
|
+
function Ha({ className: t, ...e }) {
|
|
1867
1903
|
return /* @__PURE__ */ a(
|
|
1868
1904
|
W.Title,
|
|
1869
1905
|
{
|
|
@@ -1873,8 +1909,8 @@ function Va({ className: t, ...e }) {
|
|
|
1873
1909
|
}
|
|
1874
1910
|
);
|
|
1875
1911
|
}
|
|
1876
|
-
|
|
1877
|
-
function
|
|
1912
|
+
Ha.displayName = "Dialog.Title";
|
|
1913
|
+
function Ua({ className: t, ...e }) {
|
|
1878
1914
|
return /* @__PURE__ */ a(
|
|
1879
1915
|
W.Description,
|
|
1880
1916
|
{
|
|
@@ -1884,18 +1920,18 @@ function Da({ className: t, ...e }) {
|
|
|
1884
1920
|
}
|
|
1885
1921
|
);
|
|
1886
1922
|
}
|
|
1887
|
-
|
|
1888
|
-
const
|
|
1889
|
-
Root:
|
|
1890
|
-
Close:
|
|
1891
|
-
Content:
|
|
1892
|
-
Description:
|
|
1893
|
-
Footer:
|
|
1894
|
-
Header:
|
|
1895
|
-
Title:
|
|
1896
|
-
Trigger:
|
|
1923
|
+
Ua.displayName = "Dialog.Description";
|
|
1924
|
+
const X = {
|
|
1925
|
+
Root: za,
|
|
1926
|
+
Close: Fa,
|
|
1927
|
+
Content: Ga,
|
|
1928
|
+
Description: Ua,
|
|
1929
|
+
Footer: Wa,
|
|
1930
|
+
Header: ja,
|
|
1931
|
+
Title: Ha,
|
|
1932
|
+
Trigger: $a
|
|
1897
1933
|
};
|
|
1898
|
-
function
|
|
1934
|
+
function Cr(t) {
|
|
1899
1935
|
const e = [], s = (n, r, o) => {
|
|
1900
1936
|
n.forEach((i) => {
|
|
1901
1937
|
const l = [...o, i.title];
|
|
@@ -1916,43 +1952,43 @@ function Yn(t) {
|
|
|
1916
1952
|
}), s(n.items, n.icon, [n.title]);
|
|
1917
1953
|
}), e;
|
|
1918
1954
|
}
|
|
1919
|
-
function
|
|
1920
|
-
const e =
|
|
1921
|
-
i(
|
|
1955
|
+
function Sr({ routes: t }) {
|
|
1956
|
+
const e = sn(), s = U(null), [n, r] = M(!1), [o, i] = M(""), [l, m] = M(0), u = H(() => gr(t, o), [t, o]), w = P((h) => {
|
|
1957
|
+
i(h), m(0);
|
|
1922
1958
|
}, []);
|
|
1923
|
-
|
|
1924
|
-
const
|
|
1925
|
-
(g.metaKey || g.ctrlKey) && g.key === "k" && (g.preventDefault(), r((
|
|
1959
|
+
Q(() => {
|
|
1960
|
+
const h = (g) => {
|
|
1961
|
+
(g.metaKey || g.ctrlKey) && g.key === "k" && (g.preventDefault(), r((N) => !N));
|
|
1926
1962
|
};
|
|
1927
|
-
return document.addEventListener("keydown",
|
|
1963
|
+
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
1928
1964
|
}, []);
|
|
1929
|
-
const p =
|
|
1930
|
-
r(
|
|
1965
|
+
const p = P((h) => {
|
|
1966
|
+
r(h), h || (i(""), m(0));
|
|
1931
1967
|
}, []);
|
|
1932
|
-
|
|
1968
|
+
Q(() => {
|
|
1933
1969
|
s.current && s.current.querySelector(`[data-index="${l}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1934
1970
|
}, [l]);
|
|
1935
|
-
const
|
|
1936
|
-
(
|
|
1937
|
-
e(
|
|
1971
|
+
const f = P(
|
|
1972
|
+
(h) => {
|
|
1973
|
+
e(h.path), r(!1), i("");
|
|
1938
1974
|
},
|
|
1939
1975
|
[e]
|
|
1940
|
-
), b =
|
|
1941
|
-
(
|
|
1942
|
-
if (!
|
|
1943
|
-
switch (
|
|
1976
|
+
), b = P(
|
|
1977
|
+
(h) => {
|
|
1978
|
+
if (!h.nativeEvent.isComposing)
|
|
1979
|
+
switch (h.key) {
|
|
1944
1980
|
case "ArrowDown":
|
|
1945
|
-
|
|
1981
|
+
h.preventDefault(), m((g) => g < u.length - 1 ? g + 1 : g);
|
|
1946
1982
|
break;
|
|
1947
1983
|
case "ArrowUp":
|
|
1948
|
-
|
|
1984
|
+
h.preventDefault(), m((g) => g > 0 ? g - 1 : g);
|
|
1949
1985
|
break;
|
|
1950
1986
|
case "Enter":
|
|
1951
|
-
|
|
1987
|
+
h.preventDefault(), u[l] && f(u[l]);
|
|
1952
1988
|
break;
|
|
1953
1989
|
}
|
|
1954
1990
|
},
|
|
1955
|
-
[u, l,
|
|
1991
|
+
[u, l, f]
|
|
1956
1992
|
);
|
|
1957
1993
|
return {
|
|
1958
1994
|
open: n,
|
|
@@ -1961,13 +1997,13 @@ function qn({ routes: t }) {
|
|
|
1961
1997
|
setSearch: w,
|
|
1962
1998
|
selectedIndex: l,
|
|
1963
1999
|
filteredRoutes: u,
|
|
1964
|
-
handleSelect:
|
|
2000
|
+
handleSelect: f,
|
|
1965
2001
|
handleKeyDown: b,
|
|
1966
2002
|
listRef: s
|
|
1967
2003
|
};
|
|
1968
2004
|
}
|
|
1969
|
-
function
|
|
1970
|
-
const e =
|
|
2005
|
+
function Tr({ navItems: t }) {
|
|
2006
|
+
const e = Z(), s = H(() => Cr(t), [t]), {
|
|
1971
2007
|
open: n,
|
|
1972
2008
|
handleOpenChange: r,
|
|
1973
2009
|
search: o,
|
|
@@ -1977,58 +2013,58 @@ function Xn({ navItems: t }) {
|
|
|
1977
2013
|
handleSelect: u,
|
|
1978
2014
|
handleKeyDown: w,
|
|
1979
2015
|
listRef: p
|
|
1980
|
-
} =
|
|
1981
|
-
return /* @__PURE__ */ a(
|
|
1982
|
-
|
|
2016
|
+
} = Sr({ routes: s });
|
|
2017
|
+
return /* @__PURE__ */ a(X.Root, { open: n, onOpenChange: r, children: /* @__PURE__ */ d(
|
|
2018
|
+
X.Content,
|
|
1983
2019
|
{
|
|
1984
2020
|
className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:overflow-hidden",
|
|
1985
2021
|
onKeyDown: w,
|
|
1986
2022
|
"aria-describedby": void 0,
|
|
1987
2023
|
children: [
|
|
1988
|
-
/* @__PURE__ */ a(
|
|
2024
|
+
/* @__PURE__ */ a(X.Title, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
|
|
1989
2025
|
/* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:border-b astw:px-3 astw:py-1", children: [
|
|
1990
|
-
/* @__PURE__ */ a(
|
|
2026
|
+
/* @__PURE__ */ a(dn, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
|
|
1991
2027
|
/* @__PURE__ */ a(
|
|
1992
|
-
|
|
2028
|
+
Hn,
|
|
1993
2029
|
{
|
|
1994
2030
|
value: o,
|
|
1995
|
-
onChange: (
|
|
2031
|
+
onChange: (f) => i(f.target.value),
|
|
1996
2032
|
placeholder: e("commandPaletteSearch"),
|
|
1997
2033
|
className: "astw:flex astw:h-10 astw:w-full astw:rounded-md astw:bg-transparent astw:py-3 astw:text-sm astw:outline-none astw:border-0 astw:shadow-none astw:focus-visible:ring-0 astw:placeholder:text-muted-foreground astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
|
|
1998
2034
|
autoFocus: !0
|
|
1999
2035
|
}
|
|
2000
2036
|
)
|
|
2001
2037
|
] }),
|
|
2002
|
-
/* @__PURE__ */ a("div", { ref: p, className: "astw:max-h-75 astw:overflow-y-auto astw:overflow-x-hidden", children: m.length === 0 ? /* @__PURE__ */ a("div", { className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground", children: e("commandPaletteNoResults") }) : /* @__PURE__ */ a("div", { className: "astw:p-1", children: m.map((
|
|
2038
|
+
/* @__PURE__ */ a("div", { ref: p, className: "astw:max-h-75 astw:overflow-y-auto astw:overflow-x-hidden", children: m.length === 0 ? /* @__PURE__ */ a("div", { className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground", children: e("commandPaletteNoResults") }) : /* @__PURE__ */ a("div", { className: "astw:p-1", children: m.map((f, b) => /* @__PURE__ */ d(
|
|
2003
2039
|
"button",
|
|
2004
2040
|
{
|
|
2005
2041
|
"data-index": b,
|
|
2006
|
-
onClick: () => u(
|
|
2042
|
+
onClick: () => u(f),
|
|
2007
2043
|
className: c(
|
|
2008
2044
|
"astw:relative astw:flex astw:flex-col astw:w-full astw:cursor-pointer astw:select-none astw:items-start astw:rounded-sm astw:px-2 astw:py-2 astw:text-sm astw:outline-none astw:text-left",
|
|
2009
2045
|
b === l ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground"
|
|
2010
2046
|
),
|
|
2011
2047
|
children: [
|
|
2012
|
-
/* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children:
|
|
2048
|
+
/* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children: f.breadcrumb.join(" > ") }),
|
|
2013
2049
|
/* @__PURE__ */ d("span", { className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left", children: [
|
|
2014
2050
|
"/",
|
|
2015
|
-
|
|
2051
|
+
f.path
|
|
2016
2052
|
] })
|
|
2017
2053
|
]
|
|
2018
2054
|
},
|
|
2019
|
-
|
|
2055
|
+
f.path
|
|
2020
2056
|
)) }) })
|
|
2021
2057
|
]
|
|
2022
2058
|
}
|
|
2023
2059
|
) });
|
|
2024
2060
|
}
|
|
2025
|
-
function
|
|
2026
|
-
const t =
|
|
2027
|
-
return /* @__PURE__ */ a(
|
|
2061
|
+
function ui() {
|
|
2062
|
+
const t = ca();
|
|
2063
|
+
return /* @__PURE__ */ a(oe, { fallback: null, children: /* @__PURE__ */ a(Qe, { resolve: t, children: (e) => /* @__PURE__ */ a(Tr, { navItems: e ?? [] }) }) });
|
|
2028
2064
|
}
|
|
2029
|
-
function
|
|
2065
|
+
function kr(t, e, s) {
|
|
2030
2066
|
if (s.current === null || s.current.contextData !== e || s.current.guards !== t) {
|
|
2031
|
-
const n =
|
|
2067
|
+
const n = Ar(t, e), r = {
|
|
2032
2068
|
contextData: e,
|
|
2033
2069
|
guards: t,
|
|
2034
2070
|
promise: n,
|
|
@@ -2045,7 +2081,7 @@ function Qn(t, e, s) {
|
|
|
2045
2081
|
}
|
|
2046
2082
|
return s.current;
|
|
2047
2083
|
}
|
|
2048
|
-
function
|
|
2084
|
+
function Ir(t) {
|
|
2049
2085
|
const { state: e } = t;
|
|
2050
2086
|
switch (e.status) {
|
|
2051
2087
|
case "fulfilled":
|
|
@@ -2056,10 +2092,10 @@ function Zn(t) {
|
|
|
2056
2092
|
throw e.promise;
|
|
2057
2093
|
}
|
|
2058
2094
|
}
|
|
2059
|
-
const
|
|
2060
|
-
const { guards: e, children: s, fallback: n = null, loading: r = null } = t, { contextData: o } =
|
|
2061
|
-
return /* @__PURE__ */ a(
|
|
2062
|
-
},
|
|
2095
|
+
const wi = (t) => {
|
|
2096
|
+
const { guards: e, children: s, fallback: n = null, loading: r = null } = t, { contextData: o } = sa(), i = U(null), l = kr(e, o, i);
|
|
2097
|
+
return /* @__PURE__ */ a(oe, { fallback: r, children: /* @__PURE__ */ a(Rr, { cache: l, fallback: n, children: s }) });
|
|
2098
|
+
}, Rr = (t) => Ir(t.cache).type === "pass" ? /* @__PURE__ */ a(D, { children: t.children }) : /* @__PURE__ */ a(D, { children: t.fallback }), Ar = async (t, e) => {
|
|
2063
2099
|
const s = { context: e };
|
|
2064
2100
|
for (const n of t) {
|
|
2065
2101
|
const r = await n(s);
|
|
@@ -2068,8 +2104,8 @@ const So = (t) => {
|
|
|
2068
2104
|
}
|
|
2069
2105
|
return { type: "pass" };
|
|
2070
2106
|
};
|
|
2071
|
-
function
|
|
2072
|
-
const e =
|
|
2107
|
+
function mi(t) {
|
|
2108
|
+
const e = hn(t), { appUri: s } = t;
|
|
2073
2109
|
return {
|
|
2074
2110
|
...e,
|
|
2075
2111
|
getAppUri() {
|
|
@@ -2077,25 +2113,25 @@ function To(t) {
|
|
|
2077
2113
|
}
|
|
2078
2114
|
};
|
|
2079
2115
|
}
|
|
2080
|
-
function
|
|
2116
|
+
function Lr(t) {
|
|
2081
2117
|
const e = new URLSearchParams(t.search);
|
|
2082
2118
|
e.delete("code"), e.delete("state");
|
|
2083
2119
|
const s = e.toString();
|
|
2084
2120
|
return t.pathname + (s ? `?${s}` : "") + t.hash;
|
|
2085
2121
|
}
|
|
2086
|
-
const
|
|
2087
|
-
const e = t.client, s =
|
|
2122
|
+
const Ka = Ot(null), pi = (t) => {
|
|
2123
|
+
const e = t.client, s = P(
|
|
2088
2124
|
(l) => e.addEventListener((m) => {
|
|
2089
2125
|
m.type === "auth_state_changed" && l();
|
|
2090
2126
|
}),
|
|
2091
2127
|
[e]
|
|
2092
|
-
), n =
|
|
2093
|
-
|
|
2128
|
+
), n = P(() => e.getState(), [e]), r = ta(s, n);
|
|
2129
|
+
Q(() => {
|
|
2094
2130
|
(async () => {
|
|
2095
2131
|
if (new URLSearchParams(window.location.search).has("code"))
|
|
2096
2132
|
try {
|
|
2097
2133
|
await e.handleCallback();
|
|
2098
|
-
const u =
|
|
2134
|
+
const u = Lr(new URL(window.location.href));
|
|
2099
2135
|
window.history.replaceState({}, "", u);
|
|
2100
2136
|
} catch (u) {
|
|
2101
2137
|
console.error("Failed to handle callback:", u);
|
|
@@ -2103,12 +2139,12 @@ const _a = Bt(null), Io = (t) => {
|
|
|
2103
2139
|
else
|
|
2104
2140
|
await e.checkAuthStatus();
|
|
2105
2141
|
})();
|
|
2106
|
-
}, [e]),
|
|
2142
|
+
}, [e]), Q(() => {
|
|
2107
2143
|
t.autoLogin && (!r.isReady || r.isAuthenticated || e.login());
|
|
2108
2144
|
}, [r.isReady, r.isAuthenticated, t.autoLogin, e]);
|
|
2109
2145
|
const o = r.isAuthenticated, i = t.guardComponent && (!r.isReady || !o) ? /* @__PURE__ */ a(t.guardComponent, {}) : t.children;
|
|
2110
2146
|
return /* @__PURE__ */ a(
|
|
2111
|
-
|
|
2147
|
+
Ka.Provider,
|
|
2112
2148
|
{
|
|
2113
2149
|
value: {
|
|
2114
2150
|
authState: r,
|
|
@@ -2120,13 +2156,13 @@ const _a = Bt(null), Io = (t) => {
|
|
|
2120
2156
|
children: i
|
|
2121
2157
|
}
|
|
2122
2158
|
);
|
|
2123
|
-
},
|
|
2124
|
-
const t =
|
|
2159
|
+
}, Ya = () => {
|
|
2160
|
+
const t = at(Ka);
|
|
2125
2161
|
if (!t)
|
|
2126
2162
|
throw new Error("useAuth/useAuthSuspense must be used within an AuthProvider");
|
|
2127
2163
|
return t;
|
|
2128
|
-
},
|
|
2129
|
-
const t =
|
|
2164
|
+
}, fi = () => {
|
|
2165
|
+
const t = Ya(), { isAuthenticated: e, error: s, isReady: n } = t.authState;
|
|
2130
2166
|
return {
|
|
2131
2167
|
error: s,
|
|
2132
2168
|
isAuthenticated: e,
|
|
@@ -2135,8 +2171,8 @@ const _a = Bt(null), Io = (t) => {
|
|
|
2135
2171
|
logout: t.logout,
|
|
2136
2172
|
checkAuthStatus: t.checkAuthStatus
|
|
2137
2173
|
};
|
|
2138
|
-
},
|
|
2139
|
-
const t =
|
|
2174
|
+
}, hi = () => {
|
|
2175
|
+
const t = Ya();
|
|
2140
2176
|
if (!t.authState.isReady)
|
|
2141
2177
|
throw t.ready();
|
|
2142
2178
|
const { isAuthenticated: e, error: s } = t.authState;
|
|
@@ -2148,7 +2184,7 @@ const _a = Bt(null), Io = (t) => {
|
|
|
2148
2184
|
checkAuthStatus: t.checkAuthStatus
|
|
2149
2185
|
};
|
|
2150
2186
|
};
|
|
2151
|
-
function
|
|
2187
|
+
function gi() {
|
|
2152
2188
|
return {
|
|
2153
2189
|
for(t, ...e) {
|
|
2154
2190
|
const s = e[0];
|
|
@@ -2156,7 +2192,7 @@ function Lo() {
|
|
|
2156
2192
|
}
|
|
2157
2193
|
};
|
|
2158
2194
|
}
|
|
2159
|
-
const
|
|
2195
|
+
const bi = () => pn, Pr = Ft(
|
|
2160
2196
|
"astw:inline-flex astw:items-center astw:rounded-md astw:border astw:px-2 astw:py-0.5 astw:text-xs astw:font-medium astw:transition-colors astw:focus:outline-none astw:focus:ring-2 astw:focus:ring-ring astw:focus:ring-offset-2",
|
|
2161
2197
|
{
|
|
2162
2198
|
variants: {
|
|
@@ -2178,44 +2214,82 @@ const Po = () => Fs, ar = ee(
|
|
|
2178
2214
|
variant: "default"
|
|
2179
2215
|
}
|
|
2180
2216
|
}
|
|
2181
|
-
),
|
|
2217
|
+
), Dr = {
|
|
2182
2218
|
"outline-success": "astw:bg-green-500",
|
|
2183
2219
|
"outline-warning": "astw:bg-orange-500",
|
|
2184
2220
|
"outline-error": "astw:bg-red-500",
|
|
2185
2221
|
"outline-info": "astw:bg-blue-500",
|
|
2186
2222
|
"outline-neutral": "astw:bg-neutral-400"
|
|
2187
2223
|
};
|
|
2188
|
-
function
|
|
2189
|
-
const e =
|
|
2224
|
+
function Mr({ variant: t }) {
|
|
2225
|
+
const e = Dr[t];
|
|
2190
2226
|
return e ? /* @__PURE__ */ a("div", { className: "astw:size-3 astw:shrink-0 astw:flex astw:items-center astw:justify-center", children: /* @__PURE__ */ a("div", { className: c("astw:size-1.75 astw:rounded-full", e) }) }) : null;
|
|
2191
2227
|
}
|
|
2192
|
-
function
|
|
2228
|
+
function Vr({ className: t, variant: e, children: s, ...n }) {
|
|
2193
2229
|
const r = e?.toString().startsWith("outline-");
|
|
2194
|
-
return /* @__PURE__ */ d("div", { className: c(
|
|
2195
|
-
r && /* @__PURE__ */ a(
|
|
2230
|
+
return /* @__PURE__ */ d("div", { className: c(Pr({ variant: e }), t), ...n, children: [
|
|
2231
|
+
r && /* @__PURE__ */ a(Mr, { variant: e }),
|
|
2196
2232
|
s
|
|
2197
2233
|
] });
|
|
2198
2234
|
}
|
|
2199
|
-
function
|
|
2235
|
+
function qa({ className: t, ...e }) {
|
|
2236
|
+
return /* @__PURE__ */ a(
|
|
2237
|
+
"div",
|
|
2238
|
+
{
|
|
2239
|
+
"data-slot": "card",
|
|
2240
|
+
className: c(
|
|
2241
|
+
"astw:bg-card astw:text-card-foreground astw:flex astw:flex-col astw:rounded-xl astw:border astw:shadow-xs",
|
|
2242
|
+
t
|
|
2243
|
+
),
|
|
2244
|
+
...e
|
|
2245
|
+
}
|
|
2246
|
+
);
|
|
2247
|
+
}
|
|
2248
|
+
qa.displayName = "Card.Root";
|
|
2249
|
+
function Xa({ className: t, title: e, description: s, children: n, ...r }) {
|
|
2250
|
+
return /* @__PURE__ */ d(
|
|
2251
|
+
"div",
|
|
2252
|
+
{
|
|
2253
|
+
"data-slot": "card-header",
|
|
2254
|
+
className: c(
|
|
2255
|
+
"astw:@container/card-header astw:grid astw:auto-rows-min astw:grid-rows-[auto_auto] astw:items-start astw:gap-2 astw:px-6 astw:pt-6 astw:pb-4 astw:[.border-b]:pb-6",
|
|
2256
|
+
t
|
|
2257
|
+
),
|
|
2258
|
+
...r,
|
|
2259
|
+
children: [
|
|
2260
|
+
e && /* @__PURE__ */ a("h3", { "data-slot": "card-title", className: "astw:leading-none astw:font-semibold", children: e }),
|
|
2261
|
+
s && /* @__PURE__ */ a("div", { "data-slot": "card-description", className: "astw:text-muted-foreground astw:text-sm", children: s }),
|
|
2262
|
+
n
|
|
2263
|
+
]
|
|
2264
|
+
}
|
|
2265
|
+
);
|
|
2266
|
+
}
|
|
2267
|
+
Xa.displayName = "Card.Header";
|
|
2268
|
+
function Qa({ className: t, ...e }) {
|
|
2269
|
+
return /* @__PURE__ */ a("div", { "data-slot": "card-content", className: c("astw:px-6 astw:pb-6", t), ...e });
|
|
2270
|
+
}
|
|
2271
|
+
Qa.displayName = "Card.Content";
|
|
2272
|
+
const tt = { Root: qa, Header: Xa, Content: Qa };
|
|
2273
|
+
function Er(t) {
|
|
2200
2274
|
return t.type === "divider";
|
|
2201
2275
|
}
|
|
2202
|
-
function
|
|
2276
|
+
function _r(t) {
|
|
2203
2277
|
return t.type !== "divider" && "key" in t;
|
|
2204
2278
|
}
|
|
2205
|
-
function
|
|
2279
|
+
function Gt(t, e) {
|
|
2206
2280
|
return e.split(".").reduce((s, n) => {
|
|
2207
2281
|
if (s && typeof s == "object" && n in s)
|
|
2208
2282
|
return s[n];
|
|
2209
2283
|
}, t);
|
|
2210
2284
|
}
|
|
2211
|
-
function
|
|
2285
|
+
function E(t) {
|
|
2212
2286
|
return t == null || t === "";
|
|
2213
2287
|
}
|
|
2214
|
-
function
|
|
2288
|
+
function zr(t) {
|
|
2215
2289
|
return t.toLowerCase().replace(/_/g, " ").replace(/^\w/, (e) => e.toUpperCase());
|
|
2216
2290
|
}
|
|
2217
|
-
function
|
|
2218
|
-
if (
|
|
2291
|
+
function $r(t, e = "medium") {
|
|
2292
|
+
if (E(t)) return "";
|
|
2219
2293
|
const s = t instanceof Date ? t : new Date(String(t));
|
|
2220
2294
|
if (isNaN(s.getTime())) return String(t);
|
|
2221
2295
|
switch (e) {
|
|
@@ -2246,8 +2320,8 @@ function cr(t, e = "medium") {
|
|
|
2246
2320
|
return s.toLocaleDateString();
|
|
2247
2321
|
}
|
|
2248
2322
|
}
|
|
2249
|
-
function
|
|
2250
|
-
if (
|
|
2323
|
+
function Br(t, e) {
|
|
2324
|
+
if (E(t)) return "";
|
|
2251
2325
|
const s = typeof t == "number" ? t : parseFloat(String(t));
|
|
2252
2326
|
if (isNaN(s)) return String(t);
|
|
2253
2327
|
try {
|
|
@@ -2259,8 +2333,8 @@ function dr(t, e) {
|
|
|
2259
2333
|
return `${e || "$"}${s.toFixed(2)}`;
|
|
2260
2334
|
}
|
|
2261
2335
|
}
|
|
2262
|
-
function
|
|
2263
|
-
if (
|
|
2336
|
+
function Fr(t) {
|
|
2337
|
+
if (E(t)) return [];
|
|
2264
2338
|
if (typeof t == "string")
|
|
2265
2339
|
return t.split(/[,\n]/).map((e) => e.trim()).filter(Boolean);
|
|
2266
2340
|
if (typeof t == "object" && t !== null) {
|
|
@@ -2271,17 +2345,17 @@ function ur(t) {
|
|
|
2271
2345
|
}
|
|
2272
2346
|
return [String(t)];
|
|
2273
2347
|
}
|
|
2274
|
-
function
|
|
2275
|
-
const [e, s] =
|
|
2348
|
+
function Za({ value: t }) {
|
|
2349
|
+
const [e, s] = v.useState(!1), n = async (r) => {
|
|
2276
2350
|
r.stopPropagation();
|
|
2277
2351
|
try {
|
|
2278
2352
|
await navigator.clipboard.writeText(t), s(!0), setTimeout(() => s(!1), 2e3);
|
|
2279
2353
|
} catch {
|
|
2280
2354
|
}
|
|
2281
2355
|
};
|
|
2282
|
-
return /* @__PURE__ */ d(
|
|
2356
|
+
return /* @__PURE__ */ d($.Root, { children: [
|
|
2283
2357
|
/* @__PURE__ */ a(
|
|
2284
|
-
|
|
2358
|
+
$.Trigger,
|
|
2285
2359
|
{
|
|
2286
2360
|
render: /* @__PURE__ */ a(
|
|
2287
2361
|
"button",
|
|
@@ -2290,16 +2364,16 @@ function Ba({ value: t }) {
|
|
|
2290
2364
|
className: "astw:ml-0.5 astw:inline-flex astw:items-center astw:justify-center astw:p-1 astw:rounded astw:hover:bg-muted astw:transition-colors astw:text-muted-foreground astw:hover:text-foreground"
|
|
2291
2365
|
}
|
|
2292
2366
|
),
|
|
2293
|
-
children: e ? /* @__PURE__ */ a(
|
|
2367
|
+
children: e ? /* @__PURE__ */ a(un, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(wn, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
|
|
2294
2368
|
}
|
|
2295
2369
|
),
|
|
2296
|
-
/* @__PURE__ */ a(
|
|
2370
|
+
/* @__PURE__ */ a($.Content, { position: { side: "top" }, children: e ? "Copied!" : "Copy" })
|
|
2297
2371
|
] });
|
|
2298
2372
|
}
|
|
2299
2373
|
const Y = "–";
|
|
2300
|
-
function
|
|
2301
|
-
const e =
|
|
2302
|
-
|
|
2374
|
+
function Or({ field: t }) {
|
|
2375
|
+
const e = E(t.value) ? Y : String(t.value), s = t.meta?.copyable && !E(t.value), n = t.meta?.truncateLines, r = v.useRef(null), [o, i] = v.useState(!1);
|
|
2376
|
+
v.useEffect(() => {
|
|
2303
2377
|
if (!n) {
|
|
2304
2378
|
i(!1);
|
|
2305
2379
|
return;
|
|
@@ -2329,35 +2403,35 @@ function wr({ field: t }) {
|
|
|
2329
2403
|
children: e
|
|
2330
2404
|
}
|
|
2331
2405
|
),
|
|
2332
|
-
s && /* @__PURE__ */ a(
|
|
2406
|
+
s && /* @__PURE__ */ a(Za, { value: String(t.value) })
|
|
2333
2407
|
] });
|
|
2334
|
-
return n && o ? /* @__PURE__ */ d(
|
|
2335
|
-
/* @__PURE__ */ a(
|
|
2336
|
-
/* @__PURE__ */ a(
|
|
2408
|
+
return n && o ? /* @__PURE__ */ d($.Root, { children: [
|
|
2409
|
+
/* @__PURE__ */ a($.Trigger, { render: /* @__PURE__ */ a("span", { className: "astw:cursor-default" }), children: m }),
|
|
2410
|
+
/* @__PURE__ */ a($.Content, { position: { side: "bottom" }, style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
|
|
2337
2411
|
] }) : m;
|
|
2338
2412
|
}
|
|
2339
|
-
function
|
|
2340
|
-
if (
|
|
2413
|
+
function Gr({ field: t }) {
|
|
2414
|
+
if (E(t.value))
|
|
2341
2415
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
|
|
2342
2416
|
const e = String(t.value), s = t.meta?.badgeVariantMap || {}, n = e.toLowerCase(), r = s[e] || s[n] || "outline-neutral";
|
|
2343
|
-
return /* @__PURE__ */ a(
|
|
2417
|
+
return /* @__PURE__ */ a(Vr, { variant: r, className: "astw:w-fit", children: zr(e) });
|
|
2344
2418
|
}
|
|
2345
|
-
function
|
|
2346
|
-
if (
|
|
2419
|
+
function jr({ field: t }) {
|
|
2420
|
+
if (E(t.value))
|
|
2347
2421
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
|
|
2348
|
-
const e = t.meta?.currencyKey || "currency", s =
|
|
2422
|
+
const e = t.meta?.currencyKey || "currency", s = Gt(t.data, e), n = Br(t.value, s);
|
|
2349
2423
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:tabular-nums", children: n });
|
|
2350
2424
|
}
|
|
2351
|
-
function
|
|
2352
|
-
if (
|
|
2425
|
+
function Wr({ field: t }) {
|
|
2426
|
+
if (E(t.value))
|
|
2353
2427
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
|
|
2354
|
-
const e = t.meta?.dateFormat || "medium", s =
|
|
2428
|
+
const e = t.meta?.dateFormat || "medium", s = $r(t.value, e);
|
|
2355
2429
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: s });
|
|
2356
2430
|
}
|
|
2357
|
-
function
|
|
2358
|
-
if (
|
|
2431
|
+
function Hr({ field: t }) {
|
|
2432
|
+
if (E(t.value))
|
|
2359
2433
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
|
|
2360
|
-
const e = t.meta?.hrefKey, s = e ?
|
|
2434
|
+
const e = t.meta?.hrefKey, s = e ? Gt(t.data, e) : void 0, n = t.meta?.external ?? !1, r = String(t.value);
|
|
2361
2435
|
return s ? /* @__PURE__ */ d(
|
|
2362
2436
|
"a",
|
|
2363
2437
|
{
|
|
@@ -2367,63 +2441,63 @@ function fr({ field: t }) {
|
|
|
2367
2441
|
className: "astw:inline-flex astw:items-center astw:gap-1 astw:text-sm astw:text-primary astw:hover:underline",
|
|
2368
2442
|
children: [
|
|
2369
2443
|
r,
|
|
2370
|
-
n && /* @__PURE__ */ a(
|
|
2444
|
+
n && /* @__PURE__ */ a(Ze, { className: "astw:h-3 astw:w-3" })
|
|
2371
2445
|
]
|
|
2372
2446
|
}
|
|
2373
2447
|
) : /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: r });
|
|
2374
2448
|
}
|
|
2375
|
-
function
|
|
2376
|
-
if (
|
|
2449
|
+
function Ur({ field: t }) {
|
|
2450
|
+
if (E(t.value))
|
|
2377
2451
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
|
|
2378
|
-
const e =
|
|
2452
|
+
const e = Fr(t.value), s = t.meta?.copyable && !E(t.value), n = e.join(`
|
|
2379
2453
|
`);
|
|
2380
2454
|
return /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
|
|
2381
|
-
/* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((r, o) => /* @__PURE__ */ d(
|
|
2455
|
+
/* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((r, o) => /* @__PURE__ */ d(v.Fragment, { children: [
|
|
2382
2456
|
r,
|
|
2383
2457
|
o < e.length - 1 && /* @__PURE__ */ a("br", {})
|
|
2384
2458
|
] }, o)) }),
|
|
2385
|
-
s && /* @__PURE__ */ a(
|
|
2459
|
+
s && /* @__PURE__ */ a(Za, { value: n })
|
|
2386
2460
|
] });
|
|
2387
2461
|
}
|
|
2388
|
-
function
|
|
2389
|
-
if (
|
|
2462
|
+
function Kr({ field: t }) {
|
|
2463
|
+
if (E(t.value))
|
|
2390
2464
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
|
|
2391
|
-
const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, n = e ?
|
|
2465
|
+
const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, n = e ? Gt(t.data, e) : void 0, r = String(t.value);
|
|
2392
2466
|
if (!n || !s)
|
|
2393
2467
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: r });
|
|
2394
2468
|
const o = s.replace("{id}", n);
|
|
2395
2469
|
return /* @__PURE__ */ a("a", { href: o, className: "astw:text-sm astw:text-primary astw:hover:underline", children: r });
|
|
2396
2470
|
}
|
|
2397
|
-
function
|
|
2471
|
+
function Ke(t) {
|
|
2398
2472
|
switch (t.type) {
|
|
2399
2473
|
case "text":
|
|
2400
|
-
return /* @__PURE__ */ a(
|
|
2474
|
+
return /* @__PURE__ */ a(Or, { field: t });
|
|
2401
2475
|
case "badge":
|
|
2402
|
-
return /* @__PURE__ */ a(
|
|
2476
|
+
return /* @__PURE__ */ a(Gr, { field: t });
|
|
2403
2477
|
case "money":
|
|
2404
|
-
return /* @__PURE__ */ a(
|
|
2478
|
+
return /* @__PURE__ */ a(jr, { field: t });
|
|
2405
2479
|
case "date":
|
|
2406
|
-
return /* @__PURE__ */ a(
|
|
2480
|
+
return /* @__PURE__ */ a(Wr, { field: t });
|
|
2407
2481
|
case "link":
|
|
2408
|
-
return /* @__PURE__ */ a(
|
|
2482
|
+
return /* @__PURE__ */ a(Hr, { field: t });
|
|
2409
2483
|
case "address":
|
|
2410
|
-
return /* @__PURE__ */ a(
|
|
2484
|
+
return /* @__PURE__ */ a(Ur, { field: t });
|
|
2411
2485
|
case "reference":
|
|
2412
|
-
return /* @__PURE__ */ a(
|
|
2486
|
+
return /* @__PURE__ */ a(Kr, { field: t });
|
|
2413
2487
|
default:
|
|
2414
2488
|
return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: Y });
|
|
2415
2489
|
}
|
|
2416
2490
|
}
|
|
2417
|
-
function
|
|
2491
|
+
function Yr(t) {
|
|
2418
2492
|
if (t.emptyBehavior !== "hide") return !1;
|
|
2419
2493
|
const e = t.value;
|
|
2420
2494
|
return e == null || e === "";
|
|
2421
2495
|
}
|
|
2422
|
-
function
|
|
2496
|
+
function qr(t) {
|
|
2423
2497
|
return !1;
|
|
2424
2498
|
}
|
|
2425
|
-
function
|
|
2426
|
-
const n =
|
|
2499
|
+
function Xr(t, e, s) {
|
|
2500
|
+
const n = Gt(e, t.key);
|
|
2427
2501
|
return {
|
|
2428
2502
|
id: `${t.key}-${s}`,
|
|
2429
2503
|
label: t.label,
|
|
@@ -2434,22 +2508,22 @@ function yr(t, e, s) {
|
|
|
2434
2508
|
data: e
|
|
2435
2509
|
};
|
|
2436
2510
|
}
|
|
2437
|
-
function
|
|
2511
|
+
function Qr(t, e) {
|
|
2438
2512
|
const s = [];
|
|
2439
2513
|
let n = [], r = 0, o = 0;
|
|
2440
2514
|
for (const i of t)
|
|
2441
|
-
if (
|
|
2515
|
+
if (Er(i))
|
|
2442
2516
|
n.length > 0 && (s.push({
|
|
2443
2517
|
id: `section-${r}`,
|
|
2444
2518
|
fields: n
|
|
2445
2519
|
}), r++, n = []);
|
|
2446
|
-
else if (
|
|
2447
|
-
const l =
|
|
2448
|
-
o++,
|
|
2520
|
+
else if (_r(i)) {
|
|
2521
|
+
const l = Xr(i, e, o);
|
|
2522
|
+
o++, Yr(l) || n.push(l);
|
|
2449
2523
|
}
|
|
2450
2524
|
return n.length > 0 && s.push({ id: `section-${r}`, fields: n }), s;
|
|
2451
2525
|
}
|
|
2452
|
-
function
|
|
2526
|
+
function Ye({ label: t, children: e, fullWidth: s }) {
|
|
2453
2527
|
return /* @__PURE__ */ d(
|
|
2454
2528
|
"div",
|
|
2455
2529
|
{
|
|
@@ -2464,7 +2538,7 @@ function Fe({ label: t, children: e, fullWidth: s }) {
|
|
|
2464
2538
|
}
|
|
2465
2539
|
);
|
|
2466
2540
|
}
|
|
2467
|
-
function
|
|
2541
|
+
function xi({
|
|
2468
2542
|
data: t,
|
|
2469
2543
|
title: e,
|
|
2470
2544
|
fields: s,
|
|
@@ -2473,7 +2547,7 @@ function Ao({
|
|
|
2473
2547
|
style: o,
|
|
2474
2548
|
headerAction: i
|
|
2475
2549
|
}) {
|
|
2476
|
-
const l =
|
|
2550
|
+
const l = Qr(s, t), m = l.some((p) => p.fields.length > 0), u = c(
|
|
2477
2551
|
"astw:grid astw:gap-x-6 astw:gap-y-4",
|
|
2478
2552
|
// Default: 1 column
|
|
2479
2553
|
"astw:grid-cols-1",
|
|
@@ -2486,34 +2560,280 @@ function Ao({
|
|
|
2486
2560
|
"astw:@[400px]:grid-cols-2 astw:@[600px]:grid-cols-3"
|
|
2487
2561
|
)
|
|
2488
2562
|
), w = (p) => {
|
|
2489
|
-
const
|
|
2563
|
+
const f = p.fields.filter((h) => !0), b = p.fields.filter((h) => qr());
|
|
2490
2564
|
return /* @__PURE__ */ d("div", { className: "astw:space-y-4", children: [
|
|
2491
|
-
|
|
2492
|
-
b.length > 0 && /* @__PURE__ */ a("div", { className: u, children: b.map((
|
|
2565
|
+
f.length > 0 && /* @__PURE__ */ a("div", { className: u, children: f.map((h) => /* @__PURE__ */ a(Ye, { label: h.label, children: Ke(h) }, h.id)) }),
|
|
2566
|
+
b.length > 0 && /* @__PURE__ */ a("div", { className: u, children: b.map((h) => /* @__PURE__ */ a(Ye, { label: h.label, fullWidth: !0, children: Ke(h) }, h.id)) })
|
|
2493
2567
|
] }, p.id);
|
|
2494
2568
|
};
|
|
2495
|
-
return /* @__PURE__ */ a(
|
|
2569
|
+
return /* @__PURE__ */ a($.Provider, { delay: 300, children: /* @__PURE__ */ d(tt.Root, { className: c("astw:@container", r), style: o, children: [
|
|
2570
|
+
/* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:py-6", children: [
|
|
2571
|
+
/* @__PURE__ */ a("h3", { className: "astw:text-lg astw:font-semibold astw:leading-none", children: e }),
|
|
2572
|
+
i && /* @__PURE__ */ a("div", { children: i })
|
|
2573
|
+
] }),
|
|
2574
|
+
/* @__PURE__ */ a(tt.Content, { className: "astw:pb-4", children: m ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: l.map((p, f) => /* @__PURE__ */ d(v.Fragment, { children: [
|
|
2575
|
+
f > 0 && /* @__PURE__ */ a("div", { className: "astw:h-px astw:bg-border", role: "separator" }),
|
|
2576
|
+
w(p)
|
|
2577
|
+
] }, p.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
|
|
2578
|
+
] }) });
|
|
2579
|
+
}
|
|
2580
|
+
const Zr = Ft(
|
|
2581
|
+
"astw:relative astw:flex astw:shrink-0 astw:items-center astw:justify-center astw:overflow-hidden astw:rounded-full astw:bg-muted astw:text-muted-foreground astw:font-medium",
|
|
2582
|
+
{
|
|
2583
|
+
variants: {
|
|
2584
|
+
size: {
|
|
2585
|
+
sm: "astw:size-6 astw:text-[10px]",
|
|
2586
|
+
default: "astw:size-7 astw:text-xs",
|
|
2587
|
+
lg: "astw:size-10 astw:text-sm"
|
|
2588
|
+
}
|
|
2589
|
+
},
|
|
2590
|
+
defaultVariants: {
|
|
2591
|
+
size: "default"
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
);
|
|
2595
|
+
function Ja({ className: t, size: e, ...s }) {
|
|
2596
|
+
return /* @__PURE__ */ a(
|
|
2597
|
+
ie.Root,
|
|
2598
|
+
{
|
|
2599
|
+
"data-slot": "avatar",
|
|
2600
|
+
className: c(Zr({ size: e }), t),
|
|
2601
|
+
...s
|
|
2602
|
+
}
|
|
2603
|
+
);
|
|
2604
|
+
}
|
|
2605
|
+
Ja.displayName = "Avatar.Root";
|
|
2606
|
+
function ts({ className: t, ...e }) {
|
|
2607
|
+
return /* @__PURE__ */ a(
|
|
2608
|
+
ie.Image,
|
|
2609
|
+
{
|
|
2610
|
+
"data-slot": "avatar-image",
|
|
2611
|
+
className: c("astw:size-full astw:object-cover", t),
|
|
2612
|
+
...e
|
|
2613
|
+
}
|
|
2614
|
+
);
|
|
2615
|
+
}
|
|
2616
|
+
ts.displayName = "Avatar.Image";
|
|
2617
|
+
function es({ className: t, ...e }) {
|
|
2618
|
+
return /* @__PURE__ */ a(
|
|
2619
|
+
ie.Fallback,
|
|
2620
|
+
{
|
|
2621
|
+
"data-slot": "avatar-fallback",
|
|
2622
|
+
className: c("astw:flex astw:size-full astw:items-center astw:justify-center", t),
|
|
2623
|
+
...e
|
|
2624
|
+
}
|
|
2625
|
+
);
|
|
2626
|
+
}
|
|
2627
|
+
es.displayName = "Avatar.Fallback";
|
|
2628
|
+
const te = {
|
|
2629
|
+
Root: Ja,
|
|
2630
|
+
Image: ts,
|
|
2631
|
+
Fallback: es
|
|
2632
|
+
};
|
|
2633
|
+
function Jr(t) {
|
|
2634
|
+
const e = typeof t == "string" ? new Date(t) : t, s = /* @__PURE__ */ new Date(), n = new Date(s);
|
|
2635
|
+
n.setDate(n.getDate() - 1);
|
|
2636
|
+
const r = e.toDateString();
|
|
2637
|
+
return r === s.toDateString() ? "TODAY" : r === n.toDateString() ? "YESTERDAY" : e.toLocaleDateString(void 0, {
|
|
2638
|
+
day: "numeric",
|
|
2639
|
+
month: "short",
|
|
2640
|
+
year: "numeric"
|
|
2641
|
+
});
|
|
2642
|
+
}
|
|
2643
|
+
function to(t) {
|
|
2644
|
+
const e = typeof t == "string" ? new Date(t) : t;
|
|
2645
|
+
return Number.isNaN(e.getTime()) ? typeof t == "string" ? t : "" : e.toLocaleDateString(void 0, {
|
|
2646
|
+
day: "numeric",
|
|
2647
|
+
month: "short",
|
|
2648
|
+
year: "numeric",
|
|
2649
|
+
hour: "numeric",
|
|
2650
|
+
minute: "2-digit"
|
|
2651
|
+
});
|
|
2652
|
+
}
|
|
2653
|
+
function eo(t) {
|
|
2654
|
+
return t.trim().split(/\s+/).map((e) => e[0]).slice(0, 2).join("").toUpperCase();
|
|
2655
|
+
}
|
|
2656
|
+
const as = v.createContext(null);
|
|
2657
|
+
function ao() {
|
|
2658
|
+
const t = v.useContext(as);
|
|
2659
|
+
if (!t)
|
|
2660
|
+
throw new Error("ActivityCard compound components must be used within ActivityCard.Root");
|
|
2661
|
+
return t;
|
|
2662
|
+
}
|
|
2663
|
+
function pe({
|
|
2664
|
+
items: t,
|
|
2665
|
+
title: e,
|
|
2666
|
+
maxVisible: s = 6,
|
|
2667
|
+
overflowLabel: n = "more",
|
|
2668
|
+
groupBy: r = "none",
|
|
2669
|
+
className: o,
|
|
2670
|
+
children: i
|
|
2671
|
+
}) {
|
|
2672
|
+
const l = v.useMemo(
|
|
2673
|
+
() => ({ items: t, maxVisible: s, overflowLabel: n, groupBy: r }),
|
|
2674
|
+
[t, s, n, r]
|
|
2675
|
+
);
|
|
2676
|
+
return /* @__PURE__ */ a(as.Provider, { value: l, children: /* @__PURE__ */ d(
|
|
2496
2677
|
"div",
|
|
2497
2678
|
{
|
|
2679
|
+
"data-slot": "activity-card",
|
|
2498
2680
|
className: c(
|
|
2499
|
-
"astw
|
|
2500
|
-
|
|
2681
|
+
"astw:min-w-[278px] astw:w-full astw:bg-card astw:text-card-foreground astw:rounded-xl astw:border",
|
|
2682
|
+
o
|
|
2501
2683
|
),
|
|
2502
|
-
style: o,
|
|
2503
2684
|
children: [
|
|
2504
|
-
/* @__PURE__ */
|
|
2505
|
-
|
|
2506
|
-
i && /* @__PURE__ */ a("div", { children: i })
|
|
2507
|
-
] }),
|
|
2508
|
-
/* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: m ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: l.map((p, h) => /* @__PURE__ */ d(N.Fragment, { children: [
|
|
2509
|
-
h > 0 && /* @__PURE__ */ a("div", { className: "astw:h-px astw:bg-border", role: "separator" }),
|
|
2510
|
-
w(p)
|
|
2511
|
-
] }, p.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
|
|
2685
|
+
e != null && /* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:px-6 astw:pt-5 astw:pb-2", children: /* @__PURE__ */ a("h3", { className: "astw:text-lg astw:font-semibold astw:leading-7 astw:text-card-foreground", children: e }) }),
|
|
2686
|
+
i
|
|
2512
2687
|
]
|
|
2513
2688
|
}
|
|
2514
2689
|
) });
|
|
2515
2690
|
}
|
|
2516
|
-
|
|
2691
|
+
pe.displayName = "ActivityCard.Root";
|
|
2692
|
+
function qe(t, e, s) {
|
|
2693
|
+
return /* @__PURE__ */ d("div", { className: "astw:flex astw:flex-col astw:gap-5", children: [
|
|
2694
|
+
s != null && /* @__PURE__ */ a("p", { className: "astw:text-xs astw:font-semibold astw:leading-none astw:opacity-60 astw:text-foreground", children: s }),
|
|
2695
|
+
/* @__PURE__ */ a("div", { className: "astw:relative astw:flex astw:flex-col astw:gap-5", children: t.map((n, r) => /* @__PURE__ */ d("div", { className: "astw:relative", children: [
|
|
2696
|
+
r > 0 && /* @__PURE__ */ a(
|
|
2697
|
+
"div",
|
|
2698
|
+
{
|
|
2699
|
+
"aria-hidden": !0,
|
|
2700
|
+
className: "astw:absolute astw:left-3.5 astw:-translate-x-1/2 astw:top-0 astw:h-3.5 astw:w-px astw:bg-border"
|
|
2701
|
+
}
|
|
2702
|
+
),
|
|
2703
|
+
r < t.length - 1 && /* @__PURE__ */ a(
|
|
2704
|
+
"div",
|
|
2705
|
+
{
|
|
2706
|
+
"aria-hidden": !0,
|
|
2707
|
+
className: "astw:absolute astw:left-3.5 astw:-translate-x-1/2 astw:top-3.5 astw:-bottom-5 astw:w-px astw:bg-border"
|
|
2708
|
+
}
|
|
2709
|
+
),
|
|
2710
|
+
e(n)
|
|
2711
|
+
] }, n.id)) })
|
|
2712
|
+
] }, s ?? "single");
|
|
2713
|
+
}
|
|
2714
|
+
function Xe(t, e, s) {
|
|
2715
|
+
if (s === "day") {
|
|
2716
|
+
const n = /* @__PURE__ */ new Map();
|
|
2717
|
+
for (const o of t) {
|
|
2718
|
+
const i = Jr(o.timestamp);
|
|
2719
|
+
n.has(i) || n.set(i, []), n.get(i).push(o);
|
|
2720
|
+
}
|
|
2721
|
+
const r = Array.from(n.entries());
|
|
2722
|
+
return /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-8", children: r.map(([o, i]) => qe(i, e, o)) });
|
|
2723
|
+
}
|
|
2724
|
+
return /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-5", children: qe(t, e, null) });
|
|
2725
|
+
}
|
|
2726
|
+
function fe({ children: t }) {
|
|
2727
|
+
const { items: e, maxVisible: s, overflowLabel: n, groupBy: r } = ao(), [o, i] = v.useState(!1), [l, m] = v.useState(!1), u = v.useRef(null), w = e.slice(0, s), p = e.length - s, f = p > 0, b = v.useCallback(() => {
|
|
2728
|
+
m(!0), u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
2729
|
+
m(!1), u.current = null;
|
|
2730
|
+
}, 600);
|
|
2731
|
+
}, []);
|
|
2732
|
+
return v.useEffect(() => () => {
|
|
2733
|
+
u.current && clearTimeout(u.current);
|
|
2734
|
+
}, []), /* @__PURE__ */ d(D, { children: [
|
|
2735
|
+
/* @__PURE__ */ a("div", { className: "astw:relative astw:px-6 astw:pb-5", children: /* @__PURE__ */ a("div", { className: "astw:relative astw:flex astw:flex-col", children: w.length === 0 ? /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No activities yet" }) : Xe(w, t, r) }) }),
|
|
2736
|
+
f && /* @__PURE__ */ a(
|
|
2737
|
+
"button",
|
|
2738
|
+
{
|
|
2739
|
+
type: "button",
|
|
2740
|
+
onClick: () => i(!0),
|
|
2741
|
+
className: "astw:cursor-pointer astw:w-full astw:border-t astw:border-border astw:py-4 astw:text-sm astw:font-medium astw:text-center astw:text-foreground astw:opacity-60 astw:transition-colors astw:hover:opacity-100 astw:hover:bg-secondary/50 astw:focus:outline-none astw:focus-visible:ring-2 astw:focus-visible:ring-ring astw:focus-visible:ring-inset",
|
|
2742
|
+
children: n === "count" ? `+${p}` : `${p} more activities`
|
|
2743
|
+
}
|
|
2744
|
+
),
|
|
2745
|
+
/* @__PURE__ */ a(X.Root, { open: o, onOpenChange: i, children: /* @__PURE__ */ d(X.Content, { className: "astw:max-w-md astw:max-h-[85vh] astw:flex astw:flex-col", children: [
|
|
2746
|
+
/* @__PURE__ */ a(X.Header, { children: /* @__PURE__ */ a(X.Title, { children: "All activities" }) }),
|
|
2747
|
+
/* @__PURE__ */ a(
|
|
2748
|
+
"div",
|
|
2749
|
+
{
|
|
2750
|
+
onScroll: b,
|
|
2751
|
+
className: c(
|
|
2752
|
+
"astw:overflow-y-auto astw:flex-1 astw:min-h-0 astw:-mr-6 astw:pr-6 astw:pl-1",
|
|
2753
|
+
"astw:[scrollbar-width:thin]",
|
|
2754
|
+
"astw:[&::-webkit-scrollbar]:w-1.5",
|
|
2755
|
+
"astw:[&::-webkit-scrollbar-track]:bg-transparent",
|
|
2756
|
+
"astw:[&::-webkit-scrollbar-thumb]:rounded-full astw:[&::-webkit-scrollbar-thumb]:bg-border",
|
|
2757
|
+
"astw:[&::-webkit-scrollbar-thumb]:transition-opacity astw:[&::-webkit-scrollbar-thumb]:duration-300",
|
|
2758
|
+
l ? "astw:[&::-webkit-scrollbar-thumb]:opacity-100" : "astw:[&::-webkit-scrollbar-thumb]:opacity-0 astw:hover:[&::-webkit-scrollbar-thumb]:opacity-100"
|
|
2759
|
+
),
|
|
2760
|
+
children: Xe(e, t, r)
|
|
2761
|
+
}
|
|
2762
|
+
)
|
|
2763
|
+
] }) })
|
|
2764
|
+
] });
|
|
2765
|
+
}
|
|
2766
|
+
fe.displayName = "ActivityCard.Items";
|
|
2767
|
+
function he({ indicator: t, children: e, className: s }) {
|
|
2768
|
+
const n = t != null;
|
|
2769
|
+
return /* @__PURE__ */ d(
|
|
2770
|
+
"div",
|
|
2771
|
+
{
|
|
2772
|
+
"data-slot": "activity-card-item",
|
|
2773
|
+
className: c("astw:relative astw:flex astw:gap-3 astw:min-w-0", s),
|
|
2774
|
+
children: [
|
|
2775
|
+
/* @__PURE__ */ a(
|
|
2776
|
+
"div",
|
|
2777
|
+
{
|
|
2778
|
+
"data-slot": "activity-card-indicator",
|
|
2779
|
+
className: c(
|
|
2780
|
+
"astw:relative astw:z-10 astw:flex astw:size-7 astw:shrink-0 astw:justify-center astw:rounded-full",
|
|
2781
|
+
n ? "astw:items-center astw:bg-card" : "astw:items-start astw:pt-1.5 astw:bg-transparent"
|
|
2782
|
+
),
|
|
2783
|
+
children: t ?? /* @__PURE__ */ a("div", { className: "astw:size-2.5 astw:rounded-full astw:bg-border" })
|
|
2784
|
+
}
|
|
2785
|
+
),
|
|
2786
|
+
/* @__PURE__ */ a("div", { className: "astw:flex astw:min-w-0 astw:flex-1 astw:flex-col astw:gap-1", children: e })
|
|
2787
|
+
]
|
|
2788
|
+
}
|
|
2789
|
+
);
|
|
2790
|
+
}
|
|
2791
|
+
he.displayName = "ActivityCard.Item";
|
|
2792
|
+
function so({
|
|
2793
|
+
items: t,
|
|
2794
|
+
title: e,
|
|
2795
|
+
maxVisible: s = 6,
|
|
2796
|
+
overflowLabel: n = "more",
|
|
2797
|
+
groupBy: r = "none",
|
|
2798
|
+
className: o
|
|
2799
|
+
}) {
|
|
2800
|
+
return /* @__PURE__ */ a(
|
|
2801
|
+
pe,
|
|
2802
|
+
{
|
|
2803
|
+
items: t,
|
|
2804
|
+
title: e,
|
|
2805
|
+
maxVisible: s,
|
|
2806
|
+
overflowLabel: n,
|
|
2807
|
+
groupBy: r,
|
|
2808
|
+
className: o,
|
|
2809
|
+
children: /* @__PURE__ */ a(fe, { children: (i) => {
|
|
2810
|
+
const l = i.actor?.name;
|
|
2811
|
+
return /* @__PURE__ */ d(
|
|
2812
|
+
he,
|
|
2813
|
+
{
|
|
2814
|
+
indicator: l ? /* @__PURE__ */ d(te.Root, { "aria-hidden": !0, children: [
|
|
2815
|
+
i.actor?.avatarUrl ? /* @__PURE__ */ a(te.Image, { src: i.actor.avatarUrl, alt: "" }) : null,
|
|
2816
|
+
/* @__PURE__ */ a(te.Fallback, { children: eo(l) })
|
|
2817
|
+
] }) : void 0,
|
|
2818
|
+
children: [
|
|
2819
|
+
/* @__PURE__ */ d("p", { className: "astw:text-sm astw:font-medium astw:leading-normal astw:text-foreground", children: [
|
|
2820
|
+
l ? /* @__PURE__ */ a("span", { children: l }) : null,
|
|
2821
|
+
l ? " " : null,
|
|
2822
|
+
/* @__PURE__ */ a("span", { className: "astw:text-muted-foreground", children: i.description })
|
|
2823
|
+
] }),
|
|
2824
|
+
/* @__PURE__ */ a("p", { className: "astw:text-xs astw:leading-none astw:text-muted-foreground", children: to(i.timestamp) })
|
|
2825
|
+
]
|
|
2826
|
+
}
|
|
2827
|
+
);
|
|
2828
|
+
} })
|
|
2829
|
+
}
|
|
2830
|
+
);
|
|
2831
|
+
}
|
|
2832
|
+
const vi = Object.assign(so, {
|
|
2833
|
+
Root: pe,
|
|
2834
|
+
Items: fe,
|
|
2835
|
+
Item: he
|
|
2836
|
+
}), no = "astw:flex astw:size-4 astw:items-center astw:justify-center", ro = () => /* @__PURE__ */ a(
|
|
2517
2837
|
"svg",
|
|
2518
2838
|
{
|
|
2519
2839
|
className: "astw:size-4 astw:animate-spin",
|
|
@@ -2535,18 +2855,18 @@ const Cr = "astw:flex astw:size-4 astw:items-center astw:justify-center", Sr = (
|
|
|
2535
2855
|
}
|
|
2536
2856
|
)
|
|
2537
2857
|
}
|
|
2538
|
-
),
|
|
2858
|
+
), oo = c(
|
|
2539
2859
|
"astw:flex astw:items-center astw:gap-2 astw:w-full astw:rounded-md astw:px-3 astw:py-2",
|
|
2540
2860
|
"astw:text-sm astw:font-medium astw:transition-colors astw:border astw:border-transparent",
|
|
2541
2861
|
"astw:bg-transparent astw:text-left astw:cursor-pointer astw:[&_svg]:size-4 astw:[&_svg]:shrink-0"
|
|
2542
|
-
),
|
|
2543
|
-
function
|
|
2544
|
-
const { key: e, label: s, icon: n, onClick: r, disabled: o, loading: i } = t, l = !!o || !!i, m = /* @__PURE__ */ d(
|
|
2545
|
-
/* @__PURE__ */ a("span", { className:
|
|
2862
|
+
), io = "astw:hover:bg-accent astw:hover:text-accent-foreground astw:outline-none astw:focus-visible:ring-2 astw:focus-visible:ring-ring astw:focus-visible:ring-offset-2", lo = "astw:pointer-events-none astw:opacity-50";
|
|
2863
|
+
function co({ action: t }) {
|
|
2864
|
+
const { key: e, label: s, icon: n, onClick: r, disabled: o, loading: i } = t, l = !!o || !!i, m = /* @__PURE__ */ d(D, { children: [
|
|
2865
|
+
/* @__PURE__ */ a("span", { className: no, "aria-hidden": !0, children: i ? /* @__PURE__ */ a(ro, {}) : n }),
|
|
2546
2866
|
/* @__PURE__ */ a("span", { className: "astw:min-w-0 astw:truncate", children: s })
|
|
2547
2867
|
] }), u = c(
|
|
2548
|
-
|
|
2549
|
-
l ?
|
|
2868
|
+
oo,
|
|
2869
|
+
l ? lo : io
|
|
2550
2870
|
);
|
|
2551
2871
|
return /* @__PURE__ */ a(
|
|
2552
2872
|
"button",
|
|
@@ -2563,22 +2883,49 @@ function kr({ action: t }) {
|
|
|
2563
2883
|
}
|
|
2564
2884
|
);
|
|
2565
2885
|
}
|
|
2566
|
-
function
|
|
2886
|
+
function yi({ title: t, actions: e, className: s }) {
|
|
2887
|
+
return /* @__PURE__ */ d(tt.Root, { className: c("astw:min-w-69.5 astw:w-full", s), children: [
|
|
2888
|
+
/* @__PURE__ */ a(tt.Header, { title: t, className: "astw:text-lg astw:px-8" }),
|
|
2889
|
+
/* @__PURE__ */ a(tt.Content, { className: "astw:px-4 astw:pb-4", children: e.length === 0 ? /* @__PURE__ */ a("p", { className: "astw:py-2 astw:pl-3 astw:text-sm astw:text-muted-foreground", children: "No actions available" }) : /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-0", role: "list", children: e.map((n) => /* @__PURE__ */ a("div", { role: "listitem", children: /* @__PURE__ */ a(co, { action: n }) }, n.key)) }) })
|
|
2890
|
+
] });
|
|
2891
|
+
}
|
|
2892
|
+
const uo = "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0 astw:text-muted-foreground", wo = {
|
|
2893
|
+
up: "astw:text-green-600 dark:astw:text-green-400",
|
|
2894
|
+
down: "astw:text-red-600 dark:astw:text-red-400",
|
|
2895
|
+
neutral: "astw:text-muted-foreground"
|
|
2896
|
+
};
|
|
2897
|
+
function Ni({ title: t, value: e, trend: s, description: n, icon: r, className: o }) {
|
|
2898
|
+
const i = s != null || n != null && n !== "";
|
|
2567
2899
|
return /* @__PURE__ */ d(
|
|
2568
|
-
|
|
2900
|
+
tt.Root,
|
|
2569
2901
|
{
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
s
|
|
2573
|
-
),
|
|
2902
|
+
"data-slot": "metric-card",
|
|
2903
|
+
className: c("astw:min-w-0 astw:w-full astw:px-4 astw:py-4", o),
|
|
2574
2904
|
children: [
|
|
2575
|
-
/* @__PURE__ */
|
|
2576
|
-
|
|
2905
|
+
/* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2 astw:mb-6", children: [
|
|
2906
|
+
r != null && /* @__PURE__ */ a("span", { className: uo, "aria-hidden": !0, children: r }),
|
|
2907
|
+
/* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-muted-foreground astw:min-w-0 astw:truncate", children: t })
|
|
2908
|
+
] }),
|
|
2909
|
+
/* @__PURE__ */ a("div", { className: "astw:text-2xl astw:font-bold astw:tracking-tight astw:break-words", children: e }),
|
|
2910
|
+
i && /* @__PURE__ */ d("div", { className: "astw:mt-2 astw:flex astw:items-center astw:gap-2 astw:flex-wrap", children: [
|
|
2911
|
+
s != null && /* @__PURE__ */ a(
|
|
2912
|
+
"span",
|
|
2913
|
+
{
|
|
2914
|
+
className: c(
|
|
2915
|
+
"astw:text-sm astw:font-medium",
|
|
2916
|
+
wo[s.direction]
|
|
2917
|
+
),
|
|
2918
|
+
"data-direction": s.direction,
|
|
2919
|
+
children: s.value
|
|
2920
|
+
}
|
|
2921
|
+
),
|
|
2922
|
+
n != null && n !== "" && /* @__PURE__ */ a("span", { className: "astw:text-sm astw:text-muted-foreground astw:truncate", children: n })
|
|
2923
|
+
] })
|
|
2577
2924
|
]
|
|
2578
2925
|
}
|
|
2579
2926
|
);
|
|
2580
2927
|
}
|
|
2581
|
-
const
|
|
2928
|
+
const ge = v.forwardRef(
|
|
2582
2929
|
({ className: t, style: e, children: s, area: n, ...r }, o) => /* @__PURE__ */ a(
|
|
2583
2930
|
"div",
|
|
2584
2931
|
{
|
|
@@ -2592,65 +2939,65 @@ const de = N.forwardRef(
|
|
|
2592
2939
|
}
|
|
2593
2940
|
)
|
|
2594
2941
|
);
|
|
2595
|
-
|
|
2596
|
-
function
|
|
2942
|
+
ge.displayName = "Layout.Column";
|
|
2943
|
+
function be({ title: t, actions: e, children: s }) {
|
|
2597
2944
|
const n = t || e != null && e.length > 0;
|
|
2598
2945
|
return /* @__PURE__ */ d("header", { "data-layout-header": "", className: "astw:flex astw:w-full astw:flex-col", children: [
|
|
2599
2946
|
n && /* @__PURE__ */ d("div", { className: "astw:flex astw:w-full astw:flex-1 astw:items-center astw:justify-between astw:pt-4", children: [
|
|
2600
2947
|
t && /* @__PURE__ */ a("h1", { className: "astw:text-2xl astw:font-bold astw:tracking-tight", children: t }),
|
|
2601
|
-
e != null && e.length > 0 && /* @__PURE__ */ a("div", { className: "astw:ml-auto astw:flex astw:gap-2 astw:items-center", children: e.map((r, o) => /* @__PURE__ */ a(
|
|
2948
|
+
e != null && e.length > 0 && /* @__PURE__ */ a("div", { className: "astw:ml-auto astw:flex astw:gap-2 astw:items-center", children: e.map((r, o) => /* @__PURE__ */ a(v.Fragment, { children: r }, o)) })
|
|
2602
2949
|
] }),
|
|
2603
2950
|
s != null && s !== !1 && /* @__PURE__ */ a("div", { className: "astw:w-full", children: s })
|
|
2604
2951
|
] });
|
|
2605
2952
|
}
|
|
2606
|
-
|
|
2607
|
-
const
|
|
2953
|
+
be.displayName = "Layout.Header";
|
|
2954
|
+
const mo = {
|
|
2608
2955
|
left: "320px",
|
|
2609
2956
|
main: "1fr",
|
|
2610
2957
|
right: "280px"
|
|
2611
|
-
},
|
|
2958
|
+
}, po = {
|
|
2612
2959
|
2: "1fr 280px",
|
|
2613
2960
|
3: "320px 1fr 280px"
|
|
2614
2961
|
};
|
|
2615
|
-
function
|
|
2962
|
+
function ss({ columns: t, className: e, style: s, gap: n, title: r, actions: o, children: i }) {
|
|
2616
2963
|
const l = [];
|
|
2617
2964
|
let m = !1;
|
|
2618
|
-
|
|
2619
|
-
|
|
2965
|
+
v.Children.forEach(i, (g) => {
|
|
2966
|
+
v.isValidElement(g) && (g.type === be ? m = !0 : g.type === ge && l.push(g.props.area));
|
|
2620
2967
|
});
|
|
2621
2968
|
const u = l.length, w = t ?? u;
|
|
2622
2969
|
t !== void 0 && t !== u && console.warn(
|
|
2623
2970
|
`Layout: \`columns\` prop (${t}) does not match Layout.Column child count (${u}). The \`columns\` prop is deprecated; remove it to use auto-detection.`
|
|
2624
2971
|
);
|
|
2625
2972
|
const p = l.some((g) => g != null);
|
|
2626
|
-
let
|
|
2627
|
-
w >= 2 && (p ?
|
|
2628
|
-
const b = n === void 0 || n === 4 ? "astw:gap-4" : n === 6 ? "astw:gap-6" : n === 8 ? "astw:gap-8" : "astw:gap-4",
|
|
2973
|
+
let f;
|
|
2974
|
+
w >= 2 && (p ? f = l.map((g) => g ? mo[g] : "1fr").join(" ") : f = po[w] ?? `repeat(${w}, 1fr)`);
|
|
2975
|
+
const b = n === void 0 || n === 4 ? "astw:gap-4" : n === 6 ? "astw:gap-6" : n === 8 ? "astw:gap-8" : "astw:gap-4", h = !m && (r || o != null && o.length > 0);
|
|
2629
2976
|
return /* @__PURE__ */ d(
|
|
2630
2977
|
"div",
|
|
2631
2978
|
{
|
|
2632
2979
|
className: c(
|
|
2633
2980
|
"astw:grid astw:grid-cols-1 astw:w-full",
|
|
2634
|
-
m ||
|
|
2981
|
+
m || h ? "astw:pb-4" : "astw:py-4",
|
|
2635
2982
|
b,
|
|
2636
2983
|
"astw:[&>[data-layout-header]]:col-span-full",
|
|
2637
|
-
w === 2 &&
|
|
2638
|
-
w >= 3 &&
|
|
2984
|
+
w === 2 && f && "astw:lg:grid-cols-[var(--layout-cols)]",
|
|
2985
|
+
w >= 3 && f && "astw:xl:grid-cols-[var(--layout-cols)]",
|
|
2639
2986
|
e
|
|
2640
2987
|
),
|
|
2641
2988
|
style: {
|
|
2642
2989
|
...s,
|
|
2643
|
-
...
|
|
2990
|
+
...f ? { "--layout-cols": f } : void 0
|
|
2644
2991
|
},
|
|
2645
2992
|
children: [
|
|
2646
|
-
|
|
2993
|
+
h && /* @__PURE__ */ d(
|
|
2647
2994
|
"header",
|
|
2648
2995
|
{
|
|
2649
2996
|
"data-layout-header": "",
|
|
2650
2997
|
className: "astw:w-full astw:flex astw:justify-between astw:items-center astw:pt-4",
|
|
2651
2998
|
children: [
|
|
2652
2999
|
r && /* @__PURE__ */ a("h1", { className: "astw:text-2xl astw:font-bold astw:tracking-tight", children: r }),
|
|
2653
|
-
o != null && o.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: o.map((g,
|
|
3000
|
+
o != null && o.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: o.map((g, N) => /* @__PURE__ */ a(v.Fragment, { children: g }, N)) })
|
|
2654
3001
|
]
|
|
2655
3002
|
}
|
|
2656
3003
|
),
|
|
@@ -2659,9 +3006,9 @@ function za({ columns: t, className: e, style: s, gap: n, title: r, actions: o,
|
|
|
2659
3006
|
}
|
|
2660
3007
|
);
|
|
2661
3008
|
}
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
function
|
|
3009
|
+
ss.Column = ge;
|
|
3010
|
+
ss.Header = be;
|
|
3011
|
+
function ns({ className: t, containerClassName: e, ...s }) {
|
|
2665
3012
|
return /* @__PURE__ */ a(
|
|
2666
3013
|
"div",
|
|
2667
3014
|
{
|
|
@@ -2678,12 +3025,12 @@ function $a({ className: t, containerClassName: e, ...s }) {
|
|
|
2678
3025
|
}
|
|
2679
3026
|
);
|
|
2680
3027
|
}
|
|
2681
|
-
|
|
2682
|
-
function
|
|
3028
|
+
ns.displayName = "Table.Root";
|
|
3029
|
+
function rs({ className: t, ...e }) {
|
|
2683
3030
|
return /* @__PURE__ */ a("thead", { "data-slot": "table-header", className: c("astw:[&_tr]:border-b", t), ...e });
|
|
2684
3031
|
}
|
|
2685
|
-
|
|
2686
|
-
function
|
|
3032
|
+
rs.displayName = "Table.Header";
|
|
3033
|
+
function os({ className: t, ...e }) {
|
|
2687
3034
|
return /* @__PURE__ */ a(
|
|
2688
3035
|
"tbody",
|
|
2689
3036
|
{
|
|
@@ -2693,8 +3040,8 @@ function Oa({ className: t, ...e }) {
|
|
|
2693
3040
|
}
|
|
2694
3041
|
);
|
|
2695
3042
|
}
|
|
2696
|
-
|
|
2697
|
-
function
|
|
3043
|
+
os.displayName = "Table.Body";
|
|
3044
|
+
function is({ className: t, ...e }) {
|
|
2698
3045
|
return /* @__PURE__ */ a(
|
|
2699
3046
|
"tfoot",
|
|
2700
3047
|
{
|
|
@@ -2704,8 +3051,8 @@ function Ga({ className: t, ...e }) {
|
|
|
2704
3051
|
}
|
|
2705
3052
|
);
|
|
2706
3053
|
}
|
|
2707
|
-
|
|
2708
|
-
function
|
|
3054
|
+
is.displayName = "Table.Footer";
|
|
3055
|
+
function ls({ className: t, ...e }) {
|
|
2709
3056
|
return /* @__PURE__ */ a(
|
|
2710
3057
|
"tr",
|
|
2711
3058
|
{
|
|
@@ -2718,8 +3065,8 @@ function ja({ className: t, ...e }) {
|
|
|
2718
3065
|
}
|
|
2719
3066
|
);
|
|
2720
3067
|
}
|
|
2721
|
-
|
|
2722
|
-
function
|
|
3068
|
+
ls.displayName = "Table.Row";
|
|
3069
|
+
function cs({ className: t, ...e }) {
|
|
2723
3070
|
return /* @__PURE__ */ a(
|
|
2724
3071
|
"th",
|
|
2725
3072
|
{
|
|
@@ -2732,8 +3079,8 @@ function Wa({ className: t, ...e }) {
|
|
|
2732
3079
|
}
|
|
2733
3080
|
);
|
|
2734
3081
|
}
|
|
2735
|
-
|
|
2736
|
-
function
|
|
3082
|
+
cs.displayName = "Table.Head";
|
|
3083
|
+
function ds({ className: t, ...e }) {
|
|
2737
3084
|
return /* @__PURE__ */ a(
|
|
2738
3085
|
"td",
|
|
2739
3086
|
{
|
|
@@ -2746,8 +3093,8 @@ function Ha({ className: t, ...e }) {
|
|
|
2746
3093
|
}
|
|
2747
3094
|
);
|
|
2748
3095
|
}
|
|
2749
|
-
|
|
2750
|
-
function
|
|
3096
|
+
ds.displayName = "Table.Cell";
|
|
3097
|
+
function us({ className: t, ...e }) {
|
|
2751
3098
|
return /* @__PURE__ */ a(
|
|
2752
3099
|
"caption",
|
|
2753
3100
|
{
|
|
@@ -2757,25 +3104,138 @@ function Ua({ className: t, ...e }) {
|
|
|
2757
3104
|
}
|
|
2758
3105
|
);
|
|
2759
3106
|
}
|
|
2760
|
-
|
|
2761
|
-
const
|
|
2762
|
-
function
|
|
2763
|
-
|
|
3107
|
+
us.displayName = "Table.Caption";
|
|
3108
|
+
const Ci = { Root: ns, Header: rs, Body: os, Footer: is, Row: ls, Head: cs, Cell: ds, Caption: us };
|
|
3109
|
+
function ws({
|
|
3110
|
+
className: t,
|
|
3111
|
+
children: e,
|
|
3112
|
+
isTouched: s,
|
|
3113
|
+
isDirty: n,
|
|
3114
|
+
invalid: r,
|
|
3115
|
+
error: o,
|
|
3116
|
+
// Absorb RHF's isValidating so it doesn't leak to the DOM.
|
|
3117
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3118
|
+
isValidating: i,
|
|
3119
|
+
...l
|
|
3120
|
+
}) {
|
|
3121
|
+
return /* @__PURE__ */ a(
|
|
3122
|
+
lt.Root,
|
|
3123
|
+
{
|
|
3124
|
+
"data-slot": "field",
|
|
3125
|
+
className: c("astw:flex astw:flex-col astw:items-start astw:gap-1", t),
|
|
3126
|
+
touched: s,
|
|
3127
|
+
dirty: n,
|
|
3128
|
+
invalid: !!o || !!r,
|
|
3129
|
+
...l,
|
|
3130
|
+
children: e
|
|
3131
|
+
}
|
|
3132
|
+
);
|
|
2764
3133
|
}
|
|
2765
|
-
|
|
2766
|
-
function
|
|
2767
|
-
return /* @__PURE__ */ a(
|
|
3134
|
+
ws.displayName = "Field.Root";
|
|
3135
|
+
function ms({ className: t, ...e }) {
|
|
3136
|
+
return /* @__PURE__ */ a(
|
|
3137
|
+
lt.Label,
|
|
3138
|
+
{
|
|
3139
|
+
"data-slot": "field-label",
|
|
3140
|
+
className: c("astw:text-sm astw:font-medium", t),
|
|
3141
|
+
...e
|
|
3142
|
+
}
|
|
3143
|
+
);
|
|
2768
3144
|
}
|
|
2769
|
-
|
|
2770
|
-
function
|
|
3145
|
+
ms.displayName = "Field.Label";
|
|
3146
|
+
function ps({ className: t, ...e }) {
|
|
3147
|
+
return /* @__PURE__ */ a(
|
|
3148
|
+
lt.Control,
|
|
3149
|
+
{
|
|
3150
|
+
"data-slot": "field-control",
|
|
3151
|
+
className: c(
|
|
3152
|
+
fa,
|
|
3153
|
+
"astw:data-invalid:ring-destructive/20 astw:dark:data-invalid:ring-destructive/40 astw:data-invalid:border-destructive",
|
|
3154
|
+
t
|
|
3155
|
+
),
|
|
3156
|
+
...e
|
|
3157
|
+
}
|
|
3158
|
+
);
|
|
3159
|
+
}
|
|
3160
|
+
ps.displayName = "Field.Control";
|
|
3161
|
+
function fs({ className: t, ...e }) {
|
|
3162
|
+
return /* @__PURE__ */ a(
|
|
3163
|
+
lt.Description,
|
|
3164
|
+
{
|
|
3165
|
+
"data-slot": "field-description",
|
|
3166
|
+
className: c("astw:text-muted-foreground astw:text-sm", t),
|
|
3167
|
+
...e
|
|
3168
|
+
}
|
|
3169
|
+
);
|
|
3170
|
+
}
|
|
3171
|
+
fs.displayName = "Field.Description";
|
|
3172
|
+
function hs({ className: t, ...e }) {
|
|
3173
|
+
return /* @__PURE__ */ a(
|
|
3174
|
+
lt.Error,
|
|
3175
|
+
{
|
|
3176
|
+
"data-slot": "field-error",
|
|
3177
|
+
className: c("astw:text-destructive astw:text-sm astw:font-medium", t),
|
|
3178
|
+
...e
|
|
3179
|
+
}
|
|
3180
|
+
);
|
|
3181
|
+
}
|
|
3182
|
+
hs.displayName = "Field.Error";
|
|
3183
|
+
function gs({ ...t }) {
|
|
3184
|
+
return /* @__PURE__ */ a(lt.Validity, { ...t });
|
|
3185
|
+
}
|
|
3186
|
+
gs.displayName = "Field.Validity";
|
|
3187
|
+
const Si = {
|
|
3188
|
+
Root: ws,
|
|
3189
|
+
Label: ms,
|
|
3190
|
+
Control: ps,
|
|
3191
|
+
Description: fs,
|
|
3192
|
+
Error: hs,
|
|
3193
|
+
Validity: gs
|
|
3194
|
+
};
|
|
3195
|
+
function bs({ className: t, ...e }) {
|
|
3196
|
+
return /* @__PURE__ */ a(ea.Root, { "data-slot": "fieldset", className: c(t), ...e });
|
|
3197
|
+
}
|
|
3198
|
+
bs.displayName = "Fieldset.Root";
|
|
3199
|
+
function xs({ className: t, ...e }) {
|
|
3200
|
+
return /* @__PURE__ */ a(
|
|
3201
|
+
ea.Legend,
|
|
3202
|
+
{
|
|
3203
|
+
"data-slot": "fieldset-legend",
|
|
3204
|
+
className: c("astw:text-sm astw:font-medium", t),
|
|
3205
|
+
...e
|
|
3206
|
+
}
|
|
3207
|
+
);
|
|
3208
|
+
}
|
|
3209
|
+
xs.displayName = "Fieldset.Legend";
|
|
3210
|
+
const Ti = {
|
|
3211
|
+
Root: bs,
|
|
3212
|
+
Legend: xs
|
|
3213
|
+
};
|
|
3214
|
+
function fo({
|
|
3215
|
+
className: t,
|
|
3216
|
+
children: e,
|
|
3217
|
+
...s
|
|
3218
|
+
}) {
|
|
3219
|
+
return /* @__PURE__ */ a(gn, { "data-slot": "form", className: c(t), ...s, children: e });
|
|
3220
|
+
}
|
|
3221
|
+
fo.displayName = "Form";
|
|
3222
|
+
function vs({ children: t, ...e }) {
|
|
3223
|
+
return /* @__PURE__ */ a(R.Root, { "data-slot": "menu", ...e, children: t });
|
|
3224
|
+
}
|
|
3225
|
+
vs.displayName = "Menu.Root";
|
|
3226
|
+
function ys({ ...t }) {
|
|
3227
|
+
return /* @__PURE__ */ a(R.Trigger, { "data-slot": "menu-trigger", ...t });
|
|
3228
|
+
}
|
|
3229
|
+
ys.displayName = "Menu.Trigger";
|
|
3230
|
+
function Ns({
|
|
2771
3231
|
className: t,
|
|
2772
3232
|
position: e,
|
|
2773
3233
|
children: s,
|
|
2774
3234
|
...n
|
|
2775
3235
|
}) {
|
|
2776
3236
|
const { side: r = "bottom", align: o = "start", sideOffset: i = 4 } = e ?? {};
|
|
2777
|
-
return /* @__PURE__ */ a(
|
|
2778
|
-
|
|
3237
|
+
return /* @__PURE__ */ a(R.Portal, { children: /* @__PURE__ */ a(R.Positioner, { sideOffset: i, side: r, align: o, children: /* @__PURE__ */ a(
|
|
3238
|
+
R.Popup,
|
|
2779
3239
|
{
|
|
2780
3240
|
"data-slot": "menu-content",
|
|
2781
3241
|
className: c(
|
|
@@ -2789,10 +3249,10 @@ function qa({
|
|
|
2789
3249
|
}
|
|
2790
3250
|
) }) });
|
|
2791
3251
|
}
|
|
2792
|
-
|
|
2793
|
-
function
|
|
3252
|
+
Ns.displayName = "Menu.Content";
|
|
3253
|
+
function Cs({ className: t, ...e }) {
|
|
2794
3254
|
return /* @__PURE__ */ a(
|
|
2795
|
-
|
|
3255
|
+
R.Item,
|
|
2796
3256
|
{
|
|
2797
3257
|
"data-slot": "menu-item",
|
|
2798
3258
|
className: c(
|
|
@@ -2806,10 +3266,10 @@ function Xa({ className: t, ...e }) {
|
|
|
2806
3266
|
}
|
|
2807
3267
|
);
|
|
2808
3268
|
}
|
|
2809
|
-
|
|
2810
|
-
function
|
|
3269
|
+
Cs.displayName = "Menu.Item";
|
|
3270
|
+
function Ss({ className: t, ...e }) {
|
|
2811
3271
|
return /* @__PURE__ */ a(
|
|
2812
|
-
|
|
3272
|
+
R.LinkItem,
|
|
2813
3273
|
{
|
|
2814
3274
|
"data-slot": "menu-link-item",
|
|
2815
3275
|
className: c(
|
|
@@ -2822,10 +3282,10 @@ function Qa({ className: t, ...e }) {
|
|
|
2822
3282
|
}
|
|
2823
3283
|
);
|
|
2824
3284
|
}
|
|
2825
|
-
|
|
2826
|
-
function
|
|
3285
|
+
Ss.displayName = "Menu.LinkItem";
|
|
3286
|
+
function Ts({ className: t, ...e }) {
|
|
2827
3287
|
return /* @__PURE__ */ a(
|
|
2828
|
-
|
|
3288
|
+
R.CheckboxItem,
|
|
2829
3289
|
{
|
|
2830
3290
|
"data-slot": "menu-checkbox-item",
|
|
2831
3291
|
className: c(
|
|
@@ -2838,13 +3298,13 @@ function Za({ className: t, ...e }) {
|
|
|
2838
3298
|
}
|
|
2839
3299
|
);
|
|
2840
3300
|
}
|
|
2841
|
-
|
|
2842
|
-
function
|
|
3301
|
+
Ts.displayName = "Menu.CheckboxItem";
|
|
3302
|
+
function ks({
|
|
2843
3303
|
className: t,
|
|
2844
3304
|
...e
|
|
2845
3305
|
}) {
|
|
2846
3306
|
return /* @__PURE__ */ a(
|
|
2847
|
-
|
|
3307
|
+
R.CheckboxItemIndicator,
|
|
2848
3308
|
{
|
|
2849
3309
|
"data-slot": "menu-checkbox-item-indicator",
|
|
2850
3310
|
className: c(
|
|
@@ -2855,10 +3315,10 @@ function Ja({
|
|
|
2855
3315
|
}
|
|
2856
3316
|
);
|
|
2857
3317
|
}
|
|
2858
|
-
|
|
2859
|
-
function
|
|
3318
|
+
ks.displayName = "Menu.CheckboxItemIndicator";
|
|
3319
|
+
function Is({ className: t, ...e }) {
|
|
2860
3320
|
return /* @__PURE__ */ a(
|
|
2861
|
-
|
|
3321
|
+
R.RadioItem,
|
|
2862
3322
|
{
|
|
2863
3323
|
"data-slot": "menu-radio-item",
|
|
2864
3324
|
className: c(
|
|
@@ -2871,13 +3331,13 @@ function ts({ className: t, ...e }) {
|
|
|
2871
3331
|
}
|
|
2872
3332
|
);
|
|
2873
3333
|
}
|
|
2874
|
-
|
|
2875
|
-
function
|
|
3334
|
+
Is.displayName = "Menu.RadioItem";
|
|
3335
|
+
function Rs({
|
|
2876
3336
|
className: t,
|
|
2877
3337
|
...e
|
|
2878
3338
|
}) {
|
|
2879
3339
|
return /* @__PURE__ */ a(
|
|
2880
|
-
|
|
3340
|
+
R.RadioItemIndicator,
|
|
2881
3341
|
{
|
|
2882
3342
|
"data-slot": "menu-radio-item-indicator",
|
|
2883
3343
|
className: c(
|
|
@@ -2888,18 +3348,18 @@ function es({
|
|
|
2888
3348
|
}
|
|
2889
3349
|
);
|
|
2890
3350
|
}
|
|
2891
|
-
|
|
2892
|
-
function
|
|
2893
|
-
return /* @__PURE__ */ a(
|
|
3351
|
+
Rs.displayName = "Menu.RadioItemIndicator";
|
|
3352
|
+
function As({ ...t }) {
|
|
3353
|
+
return /* @__PURE__ */ a(R.RadioGroup, { "data-slot": "menu-radio-group", ...t });
|
|
2894
3354
|
}
|
|
2895
|
-
|
|
2896
|
-
function
|
|
2897
|
-
return /* @__PURE__ */ a(
|
|
3355
|
+
As.displayName = "Menu.RadioGroup";
|
|
3356
|
+
function Ls({ ...t }) {
|
|
3357
|
+
return /* @__PURE__ */ a(R.Group, { "data-slot": "menu-group", ...t });
|
|
2898
3358
|
}
|
|
2899
|
-
|
|
2900
|
-
function
|
|
3359
|
+
Ls.displayName = "Menu.Group";
|
|
3360
|
+
function Ps({ className: t, ...e }) {
|
|
2901
3361
|
return /* @__PURE__ */ a(
|
|
2902
|
-
|
|
3362
|
+
R.GroupLabel,
|
|
2903
3363
|
{
|
|
2904
3364
|
"data-slot": "menu-group-label",
|
|
2905
3365
|
className: c(
|
|
@@ -2910,10 +3370,10 @@ function ns({ className: t, ...e }) {
|
|
|
2910
3370
|
}
|
|
2911
3371
|
);
|
|
2912
3372
|
}
|
|
2913
|
-
|
|
2914
|
-
function
|
|
3373
|
+
Ps.displayName = "Menu.GroupLabel";
|
|
3374
|
+
function Ds({ className: t, ...e }) {
|
|
2915
3375
|
return /* @__PURE__ */ a(
|
|
2916
|
-
|
|
3376
|
+
R.Separator,
|
|
2917
3377
|
{
|
|
2918
3378
|
"data-slot": "menu-separator",
|
|
2919
3379
|
className: c("astw:bg-border astw:-mx-1 astw:my-1 astw:h-px", t),
|
|
@@ -2921,17 +3381,17 @@ function rs({ className: t, ...e }) {
|
|
|
2921
3381
|
}
|
|
2922
3382
|
);
|
|
2923
3383
|
}
|
|
2924
|
-
|
|
2925
|
-
function
|
|
2926
|
-
return /* @__PURE__ */ a(
|
|
3384
|
+
Ds.displayName = "Menu.Separator";
|
|
3385
|
+
function Ms({ children: t, ...e }) {
|
|
3386
|
+
return /* @__PURE__ */ a(R.SubmenuRoot, { "data-slot": "menu-submenu", ...e, children: t });
|
|
2927
3387
|
}
|
|
2928
|
-
|
|
2929
|
-
function
|
|
3388
|
+
Ms.displayName = "Menu.SubmenuRoot";
|
|
3389
|
+
function Vs({
|
|
2930
3390
|
className: t,
|
|
2931
3391
|
...e
|
|
2932
3392
|
}) {
|
|
2933
3393
|
return /* @__PURE__ */ a(
|
|
2934
|
-
|
|
3394
|
+
R.SubmenuTrigger,
|
|
2935
3395
|
{
|
|
2936
3396
|
"data-slot": "menu-submenu-trigger",
|
|
2937
3397
|
className: c(
|
|
@@ -2945,35 +3405,35 @@ function is({
|
|
|
2945
3405
|
}
|
|
2946
3406
|
);
|
|
2947
3407
|
}
|
|
2948
|
-
|
|
2949
|
-
const
|
|
2950
|
-
Root:
|
|
2951
|
-
Trigger:
|
|
2952
|
-
Content:
|
|
2953
|
-
Item:
|
|
2954
|
-
LinkItem:
|
|
2955
|
-
CheckboxItem:
|
|
2956
|
-
CheckboxItemIndicator:
|
|
2957
|
-
RadioItem:
|
|
2958
|
-
RadioItemIndicator:
|
|
2959
|
-
RadioGroup:
|
|
2960
|
-
Group:
|
|
2961
|
-
GroupLabel:
|
|
2962
|
-
Separator:
|
|
2963
|
-
SubmenuRoot:
|
|
2964
|
-
SubmenuTrigger:
|
|
3408
|
+
Vs.displayName = "Menu.SubmenuTrigger";
|
|
3409
|
+
const ki = {
|
|
3410
|
+
Root: vs,
|
|
3411
|
+
Trigger: ys,
|
|
3412
|
+
Content: Ns,
|
|
3413
|
+
Item: Cs,
|
|
3414
|
+
LinkItem: Ss,
|
|
3415
|
+
CheckboxItem: Ts,
|
|
3416
|
+
CheckboxItemIndicator: ks,
|
|
3417
|
+
RadioItem: Is,
|
|
3418
|
+
RadioItemIndicator: Rs,
|
|
3419
|
+
RadioGroup: As,
|
|
3420
|
+
Group: Ls,
|
|
3421
|
+
GroupLabel: Ps,
|
|
3422
|
+
Separator: Ds,
|
|
3423
|
+
SubmenuRoot: Ms,
|
|
3424
|
+
SubmenuTrigger: Vs
|
|
2965
3425
|
};
|
|
2966
|
-
function
|
|
2967
|
-
return /* @__PURE__ */ a(
|
|
3426
|
+
function rt(t) {
|
|
3427
|
+
return /* @__PURE__ */ a(V.Root, { "data-slot": "select", ...t });
|
|
2968
3428
|
}
|
|
2969
|
-
|
|
2970
|
-
function
|
|
3429
|
+
rt.displayName = "Select.Root";
|
|
3430
|
+
function ot({
|
|
2971
3431
|
className: t,
|
|
2972
3432
|
children: e,
|
|
2973
3433
|
...s
|
|
2974
3434
|
}) {
|
|
2975
3435
|
return /* @__PURE__ */ d(
|
|
2976
|
-
|
|
3436
|
+
V.Trigger,
|
|
2977
3437
|
{
|
|
2978
3438
|
"data-slot": "select-trigger",
|
|
2979
3439
|
className: c(
|
|
@@ -2987,19 +3447,19 @@ function nt({
|
|
|
2987
3447
|
...s,
|
|
2988
3448
|
children: [
|
|
2989
3449
|
e,
|
|
2990
|
-
/* @__PURE__ */ a(
|
|
3450
|
+
/* @__PURE__ */ a(V.Icon, { children: /* @__PURE__ */ a(re, { className: "astw:size-4 astw:opacity-50" }) })
|
|
2991
3451
|
]
|
|
2992
3452
|
}
|
|
2993
3453
|
);
|
|
2994
3454
|
}
|
|
2995
|
-
|
|
3455
|
+
ot.displayName = "Select.Trigger";
|
|
2996
3456
|
function O({ ...t }) {
|
|
2997
|
-
return /* @__PURE__ */ a(
|
|
3457
|
+
return /* @__PURE__ */ a(V.Value, { "data-slot": "select-value", ...t });
|
|
2998
3458
|
}
|
|
2999
3459
|
O.displayName = "Select.Value";
|
|
3000
|
-
function
|
|
3001
|
-
return /* @__PURE__ */ a(
|
|
3002
|
-
|
|
3460
|
+
function it({ className: t, ...e }) {
|
|
3461
|
+
return /* @__PURE__ */ a(V.Portal, { children: /* @__PURE__ */ a(V.Positioner, { children: /* @__PURE__ */ a(
|
|
3462
|
+
V.Popup,
|
|
3003
3463
|
{
|
|
3004
3464
|
"data-slot": "select-content",
|
|
3005
3465
|
className: c(
|
|
@@ -3010,14 +3470,14 @@ function rt({ className: t, ...e }) {
|
|
|
3010
3470
|
}
|
|
3011
3471
|
) }) });
|
|
3012
3472
|
}
|
|
3013
|
-
|
|
3014
|
-
function
|
|
3473
|
+
it.displayName = "Select.Content";
|
|
3474
|
+
function xe({
|
|
3015
3475
|
className: t,
|
|
3016
3476
|
children: e,
|
|
3017
3477
|
...s
|
|
3018
3478
|
}) {
|
|
3019
3479
|
return /* @__PURE__ */ d(
|
|
3020
|
-
|
|
3480
|
+
V.Item,
|
|
3021
3481
|
{
|
|
3022
3482
|
"data-slot": "select-item",
|
|
3023
3483
|
className: c(
|
|
@@ -3029,23 +3489,23 @@ function we({
|
|
|
3029
3489
|
),
|
|
3030
3490
|
...s,
|
|
3031
3491
|
children: [
|
|
3032
|
-
/* @__PURE__ */ a("span", { className: "astw:absolute astw:right-2 astw:flex astw:size-3.5 astw:items-center astw:justify-center", children: /* @__PURE__ */ a(
|
|
3033
|
-
/* @__PURE__ */ a(
|
|
3492
|
+
/* @__PURE__ */ a("span", { className: "astw:absolute astw:right-2 astw:flex astw:size-3.5 astw:items-center astw:justify-center", children: /* @__PURE__ */ a(V.ItemIndicator, { children: /* @__PURE__ */ a(Je, { className: "astw:size-4" }) }) }),
|
|
3493
|
+
/* @__PURE__ */ a(V.ItemText, { children: e })
|
|
3034
3494
|
]
|
|
3035
3495
|
}
|
|
3036
3496
|
);
|
|
3037
3497
|
}
|
|
3038
|
-
|
|
3039
|
-
function
|
|
3040
|
-
return /* @__PURE__ */ a(
|
|
3498
|
+
xe.displayName = "Select.Item";
|
|
3499
|
+
function ve({ ...t }) {
|
|
3500
|
+
return /* @__PURE__ */ a(V.Group, { "data-slot": "select-group", ...t });
|
|
3041
3501
|
}
|
|
3042
|
-
|
|
3043
|
-
function
|
|
3502
|
+
ve.displayName = "Select.Group";
|
|
3503
|
+
function ye({
|
|
3044
3504
|
className: t,
|
|
3045
3505
|
...e
|
|
3046
3506
|
}) {
|
|
3047
3507
|
return /* @__PURE__ */ a(
|
|
3048
|
-
|
|
3508
|
+
V.GroupLabel,
|
|
3049
3509
|
{
|
|
3050
3510
|
"data-slot": "select-group-label",
|
|
3051
3511
|
className: c(
|
|
@@ -3056,8 +3516,8 @@ function pe({
|
|
|
3056
3516
|
}
|
|
3057
3517
|
);
|
|
3058
3518
|
}
|
|
3059
|
-
|
|
3060
|
-
function
|
|
3519
|
+
ye.displayName = "Select.GroupLabel";
|
|
3520
|
+
function Es({ className: t, ...e }) {
|
|
3061
3521
|
return /* @__PURE__ */ a(
|
|
3062
3522
|
"div",
|
|
3063
3523
|
{
|
|
@@ -3067,68 +3527,68 @@ function ls({ className: t, ...e }) {
|
|
|
3067
3527
|
}
|
|
3068
3528
|
);
|
|
3069
3529
|
}
|
|
3070
|
-
|
|
3071
|
-
const
|
|
3072
|
-
Root:
|
|
3073
|
-
Trigger:
|
|
3530
|
+
Es.displayName = "Select.Separator";
|
|
3531
|
+
const ho = {
|
|
3532
|
+
Root: rt,
|
|
3533
|
+
Trigger: ot,
|
|
3074
3534
|
Value: O,
|
|
3075
|
-
Content:
|
|
3076
|
-
Item:
|
|
3077
|
-
Group:
|
|
3078
|
-
GroupLabel:
|
|
3079
|
-
Separator:
|
|
3080
|
-
},
|
|
3535
|
+
Content: it,
|
|
3536
|
+
Item: xe,
|
|
3537
|
+
Group: ve,
|
|
3538
|
+
GroupLabel: ye,
|
|
3539
|
+
Separator: Es
|
|
3540
|
+
}, ut = (t) => ({
|
|
3081
3541
|
label: String(t)
|
|
3082
3542
|
});
|
|
3083
|
-
function
|
|
3543
|
+
function Ne(t) {
|
|
3084
3544
|
return t.length > 0 && typeof t[0] == "object" && t[0] !== null && "label" in t[0] && "items" in t[0];
|
|
3085
3545
|
}
|
|
3086
|
-
function
|
|
3546
|
+
function ae(t, e) {
|
|
3087
3547
|
return t.map((s) => {
|
|
3088
3548
|
const n = e(s);
|
|
3089
|
-
return /* @__PURE__ */ a(
|
|
3549
|
+
return /* @__PURE__ */ a(xe, { value: s, children: n.render ?? n.label }, n.key ?? n.label);
|
|
3090
3550
|
});
|
|
3091
3551
|
}
|
|
3092
|
-
function
|
|
3093
|
-
const { items: e, placeholder: s, mapItem: n, className: r, disabled: o, ...i } = t, l = n ??
|
|
3094
|
-
/* @__PURE__ */ a(
|
|
3095
|
-
|
|
3096
|
-
] },
|
|
3552
|
+
function go(t) {
|
|
3553
|
+
const { items: e, placeholder: s, mapItem: n, className: r, disabled: o, ...i } = t, l = n ?? ut, m = (h) => l(h).label, u = Ne(e) ? e.map((h) => /* @__PURE__ */ d(ve, { children: [
|
|
3554
|
+
/* @__PURE__ */ a(ye, { children: h.label }),
|
|
3555
|
+
ae(h.items, l)
|
|
3556
|
+
] }, h.label)) : ae(e, l);
|
|
3097
3557
|
if (i.multiple) {
|
|
3098
|
-
const { value:
|
|
3558
|
+
const { value: h, defaultValue: g, onValueChange: N, renderValue: y } = i;
|
|
3099
3559
|
return /* @__PURE__ */ a("div", { className: r, children: /* @__PURE__ */ d(
|
|
3100
|
-
|
|
3560
|
+
rt,
|
|
3101
3561
|
{
|
|
3102
3562
|
multiple: !0,
|
|
3103
|
-
value:
|
|
3563
|
+
value: h,
|
|
3104
3564
|
defaultValue: g,
|
|
3105
|
-
onValueChange:
|
|
3565
|
+
onValueChange: N && ((S) => N(S)),
|
|
3106
3566
|
itemToStringLabel: m,
|
|
3107
3567
|
disabled: o,
|
|
3108
3568
|
children: [
|
|
3109
|
-
/* @__PURE__ */ a(
|
|
3110
|
-
/* @__PURE__ */ a(
|
|
3569
|
+
/* @__PURE__ */ a(ot, { children: y ? /* @__PURE__ */ a(O, { placeholder: s, children: (S) => y(S) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
|
|
3570
|
+
/* @__PURE__ */ a(it, { children: u })
|
|
3111
3571
|
]
|
|
3112
3572
|
}
|
|
3113
3573
|
) });
|
|
3114
3574
|
}
|
|
3115
|
-
const { value: w, defaultValue: p, onValueChange:
|
|
3575
|
+
const { value: w, defaultValue: p, onValueChange: f, renderValue: b } = i;
|
|
3116
3576
|
return /* @__PURE__ */ a("div", { className: r, children: /* @__PURE__ */ d(
|
|
3117
|
-
|
|
3577
|
+
rt,
|
|
3118
3578
|
{
|
|
3119
3579
|
value: w,
|
|
3120
3580
|
defaultValue: p,
|
|
3121
|
-
onValueChange:
|
|
3581
|
+
onValueChange: f && ((h) => f(h)),
|
|
3122
3582
|
itemToStringLabel: m,
|
|
3123
3583
|
disabled: o,
|
|
3124
3584
|
children: [
|
|
3125
|
-
/* @__PURE__ */ a(
|
|
3126
|
-
/* @__PURE__ */ a(
|
|
3585
|
+
/* @__PURE__ */ a(ot, { children: b ? /* @__PURE__ */ a(O, { placeholder: s, children: (h) => b(h) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
|
|
3586
|
+
/* @__PURE__ */ a(it, { children: u })
|
|
3127
3587
|
]
|
|
3128
3588
|
}
|
|
3129
3589
|
) });
|
|
3130
3590
|
}
|
|
3131
|
-
function
|
|
3591
|
+
function bo(t) {
|
|
3132
3592
|
const {
|
|
3133
3593
|
fetcher: e,
|
|
3134
3594
|
placeholder: s,
|
|
@@ -3137,13 +3597,13 @@ function Vr(t) {
|
|
|
3137
3597
|
className: o,
|
|
3138
3598
|
disabled: i,
|
|
3139
3599
|
...l
|
|
3140
|
-
} = t, [m, u] =
|
|
3141
|
-
|
|
3142
|
-
const b = U(null),
|
|
3600
|
+
} = t, [m, u] = M([]), [w, p] = M(!1), f = U(e);
|
|
3601
|
+
f.current = e;
|
|
3602
|
+
const b = U(null), h = v.useCallback((x) => {
|
|
3143
3603
|
if (x) {
|
|
3144
3604
|
b.current?.abort();
|
|
3145
3605
|
const G = new AbortController();
|
|
3146
|
-
b.current = G, p(!0),
|
|
3606
|
+
b.current = G, p(!0), f.current({ signal: G.signal }).then((j) => {
|
|
3147
3607
|
G.signal.aborted || u(j);
|
|
3148
3608
|
}).catch((j) => {
|
|
3149
3609
|
j instanceof DOMException && j.name === "AbortError" || G.signal.aborted || u([]);
|
|
@@ -3152,90 +3612,90 @@ function Vr(t) {
|
|
|
3152
3612
|
});
|
|
3153
3613
|
}
|
|
3154
3614
|
}, []);
|
|
3155
|
-
|
|
3156
|
-
const g = r ??
|
|
3615
|
+
Q(() => () => b.current?.abort(), []);
|
|
3616
|
+
const g = r ?? ut, N = (x) => g(x).label, y = w ? /* @__PURE__ */ a("div", { className: "astw:px-4 astw:pt-2 astw:pb-4 astw:text-center astw:text-sm astw:text-muted-foreground", children: n }) : ae(m, g);
|
|
3157
3617
|
if (l.multiple) {
|
|
3158
|
-
const { value: x, defaultValue: G, onValueChange: j, renderValue:
|
|
3618
|
+
const { value: x, defaultValue: G, onValueChange: j, renderValue: Tt } = l;
|
|
3159
3619
|
return /* @__PURE__ */ a("div", { className: o, children: /* @__PURE__ */ d(
|
|
3160
|
-
|
|
3620
|
+
rt,
|
|
3161
3621
|
{
|
|
3162
3622
|
multiple: !0,
|
|
3163
3623
|
value: x,
|
|
3164
3624
|
defaultValue: G,
|
|
3165
|
-
onValueChange: j && ((
|
|
3166
|
-
onOpenChange:
|
|
3167
|
-
itemToStringLabel:
|
|
3625
|
+
onValueChange: j && ((wt) => j(wt)),
|
|
3626
|
+
onOpenChange: h,
|
|
3627
|
+
itemToStringLabel: N,
|
|
3168
3628
|
disabled: i,
|
|
3169
3629
|
children: [
|
|
3170
|
-
/* @__PURE__ */ a(
|
|
3171
|
-
/* @__PURE__ */ a(
|
|
3630
|
+
/* @__PURE__ */ a(ot, { children: Tt ? /* @__PURE__ */ a(O, { placeholder: s, children: (wt) => Tt(wt) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
|
|
3631
|
+
/* @__PURE__ */ a(it, { children: y })
|
|
3172
3632
|
]
|
|
3173
3633
|
}
|
|
3174
3634
|
) });
|
|
3175
3635
|
}
|
|
3176
|
-
const { value: S, defaultValue: T, onValueChange:
|
|
3636
|
+
const { value: S, defaultValue: T, onValueChange: L, renderValue: I } = l;
|
|
3177
3637
|
return /* @__PURE__ */ a("div", { className: o, children: /* @__PURE__ */ d(
|
|
3178
|
-
|
|
3638
|
+
rt,
|
|
3179
3639
|
{
|
|
3180
3640
|
value: S,
|
|
3181
3641
|
defaultValue: T,
|
|
3182
|
-
onValueChange:
|
|
3183
|
-
onOpenChange:
|
|
3184
|
-
itemToStringLabel:
|
|
3642
|
+
onValueChange: L && ((x) => L(x)),
|
|
3643
|
+
onOpenChange: h,
|
|
3644
|
+
itemToStringLabel: N,
|
|
3185
3645
|
disabled: i,
|
|
3186
3646
|
children: [
|
|
3187
|
-
/* @__PURE__ */ a(
|
|
3188
|
-
/* @__PURE__ */ a(
|
|
3647
|
+
/* @__PURE__ */ a(ot, { children: I ? /* @__PURE__ */ a(O, { placeholder: s, children: (x) => I(x) }) : /* @__PURE__ */ a(O, { placeholder: s }) }),
|
|
3648
|
+
/* @__PURE__ */ a(it, { children: y })
|
|
3189
3649
|
]
|
|
3190
3650
|
}
|
|
3191
3651
|
) });
|
|
3192
3652
|
}
|
|
3193
|
-
const
|
|
3194
|
-
Async:
|
|
3195
|
-
Parts:
|
|
3196
|
-
}),
|
|
3197
|
-
function
|
|
3198
|
-
return typeof t == "function" ? { fn: t, debounceMs:
|
|
3653
|
+
const Ii = Object.assign(go, {
|
|
3654
|
+
Async: bo,
|
|
3655
|
+
Parts: ho
|
|
3656
|
+
}), xo = 300;
|
|
3657
|
+
function vo(t) {
|
|
3658
|
+
return typeof t == "function" ? { fn: t, debounceMs: xo } : t;
|
|
3199
3659
|
}
|
|
3200
|
-
function
|
|
3201
|
-
const { fn: e, debounceMs: s } =
|
|
3660
|
+
function _s({ fetcher: t }) {
|
|
3661
|
+
const { fn: e, debounceMs: s } = vo(t), [n, r] = M([]), [o, i] = M(!1), [l, m] = M(""), [u, w] = M(void 0), p = U(null), f = U(null), b = U(e);
|
|
3202
3662
|
b.current = e;
|
|
3203
|
-
const
|
|
3663
|
+
const h = P(
|
|
3204
3664
|
(g) => {
|
|
3205
|
-
if (m(g),
|
|
3665
|
+
if (m(g), f.current && (clearTimeout(f.current), f.current = null), g.trim().length === 0) {
|
|
3206
3666
|
p.current?.abort(), p.current = null, r([]), w(void 0), i(!1);
|
|
3207
3667
|
return;
|
|
3208
3668
|
}
|
|
3209
|
-
i(!0),
|
|
3669
|
+
i(!0), f.current = setTimeout(async () => {
|
|
3210
3670
|
p.current?.abort();
|
|
3211
|
-
const
|
|
3212
|
-
p.current =
|
|
3671
|
+
const N = new AbortController();
|
|
3672
|
+
p.current = N;
|
|
3213
3673
|
try {
|
|
3214
|
-
const
|
|
3215
|
-
signal:
|
|
3674
|
+
const y = await b.current(g.trim(), {
|
|
3675
|
+
signal: N.signal
|
|
3216
3676
|
});
|
|
3217
|
-
|
|
3218
|
-
} catch (
|
|
3219
|
-
if (
|
|
3220
|
-
|
|
3677
|
+
N.signal.aborted || (r(y), w(void 0));
|
|
3678
|
+
} catch (y) {
|
|
3679
|
+
if (y instanceof DOMException && y.name === "AbortError") return;
|
|
3680
|
+
N.signal.aborted || (r([]), w(y));
|
|
3221
3681
|
} finally {
|
|
3222
|
-
|
|
3682
|
+
N.signal.aborted || i(!1);
|
|
3223
3683
|
}
|
|
3224
3684
|
}, s);
|
|
3225
3685
|
},
|
|
3226
3686
|
[s]
|
|
3227
3687
|
);
|
|
3228
|
-
return
|
|
3229
|
-
|
|
3230
|
-
}, []), { items: n, loading: o, query: l, error: u, onInputValueChange:
|
|
3688
|
+
return Q(() => () => {
|
|
3689
|
+
f.current && clearTimeout(f.current), p.current?.abort();
|
|
3690
|
+
}, []), { items: n, loading: o, query: l, error: u, onInputValueChange: h };
|
|
3231
3691
|
}
|
|
3232
|
-
function
|
|
3233
|
-
return /* @__PURE__ */ a(
|
|
3692
|
+
function Vt(t) {
|
|
3693
|
+
return /* @__PURE__ */ a(k.Root, { "data-slot": "combobox", ...t });
|
|
3234
3694
|
}
|
|
3235
|
-
|
|
3236
|
-
function
|
|
3695
|
+
Vt.displayName = "Combobox.Root";
|
|
3696
|
+
function ht({ className: t, ...e }) {
|
|
3237
3697
|
return /* @__PURE__ */ a(
|
|
3238
|
-
|
|
3698
|
+
k.Input,
|
|
3239
3699
|
{
|
|
3240
3700
|
"data-slot": "combobox-input",
|
|
3241
3701
|
className: c(
|
|
@@ -3248,14 +3708,14 @@ function mt({ className: t, ...e }) {
|
|
|
3248
3708
|
}
|
|
3249
3709
|
);
|
|
3250
3710
|
}
|
|
3251
|
-
|
|
3252
|
-
function
|
|
3711
|
+
ht.displayName = "Combobox.Input";
|
|
3712
|
+
function jt({
|
|
3253
3713
|
className: t,
|
|
3254
3714
|
children: e,
|
|
3255
3715
|
...s
|
|
3256
3716
|
}) {
|
|
3257
3717
|
return /* @__PURE__ */ a(
|
|
3258
|
-
|
|
3718
|
+
k.Trigger,
|
|
3259
3719
|
{
|
|
3260
3720
|
"data-slot": "combobox-trigger",
|
|
3261
3721
|
className: c(
|
|
@@ -3265,34 +3725,34 @@ function $t({
|
|
|
3265
3725
|
t
|
|
3266
3726
|
),
|
|
3267
3727
|
...s,
|
|
3268
|
-
children: e ?? /* @__PURE__ */ a(
|
|
3728
|
+
children: e ?? /* @__PURE__ */ a(k.Icon, { children: /* @__PURE__ */ a(re, { className: "astw:size-4" }) })
|
|
3269
3729
|
}
|
|
3270
3730
|
);
|
|
3271
3731
|
}
|
|
3272
|
-
|
|
3273
|
-
function
|
|
3732
|
+
jt.displayName = "Combobox.Trigger";
|
|
3733
|
+
function Et({
|
|
3274
3734
|
className: t,
|
|
3275
3735
|
children: e,
|
|
3276
3736
|
...s
|
|
3277
3737
|
}) {
|
|
3278
3738
|
return /* @__PURE__ */ a(
|
|
3279
|
-
|
|
3739
|
+
k.InputGroup,
|
|
3280
3740
|
{
|
|
3281
3741
|
"data-slot": "combobox-input-group",
|
|
3282
3742
|
className: c("astw:relative astw:flex astw:items-center", t),
|
|
3283
3743
|
...s,
|
|
3284
|
-
children: e ?? /* @__PURE__ */ d(
|
|
3285
|
-
/* @__PURE__ */ a(
|
|
3286
|
-
/* @__PURE__ */ a(
|
|
3287
|
-
/* @__PURE__ */ a(
|
|
3744
|
+
children: e ?? /* @__PURE__ */ d(D, { children: [
|
|
3745
|
+
/* @__PURE__ */ a(ht, {}),
|
|
3746
|
+
/* @__PURE__ */ a(Wt, {}),
|
|
3747
|
+
/* @__PURE__ */ a(jt, {})
|
|
3288
3748
|
] })
|
|
3289
3749
|
}
|
|
3290
3750
|
);
|
|
3291
3751
|
}
|
|
3292
|
-
|
|
3293
|
-
function
|
|
3294
|
-
return /* @__PURE__ */ a(
|
|
3295
|
-
|
|
3752
|
+
Et.displayName = "Combobox.InputGroup";
|
|
3753
|
+
function _t({ className: t, ...e }) {
|
|
3754
|
+
return /* @__PURE__ */ a(k.Portal, { children: /* @__PURE__ */ a(k.Positioner, { children: /* @__PURE__ */ a(
|
|
3755
|
+
k.Popup,
|
|
3296
3756
|
{
|
|
3297
3757
|
"data-slot": "combobox-content",
|
|
3298
3758
|
className: c(
|
|
@@ -3303,10 +3763,10 @@ function Vt({ className: t, ...e }) {
|
|
|
3303
3763
|
}
|
|
3304
3764
|
) }) });
|
|
3305
3765
|
}
|
|
3306
|
-
|
|
3307
|
-
function
|
|
3766
|
+
_t.displayName = "Combobox.Content";
|
|
3767
|
+
function zt({ className: t, ...e }) {
|
|
3308
3768
|
return /* @__PURE__ */ a(
|
|
3309
|
-
|
|
3769
|
+
k.List,
|
|
3310
3770
|
{
|
|
3311
3771
|
"data-slot": "combobox-list",
|
|
3312
3772
|
className: c("astw:max-h-60 astw:overflow-y-auto astw:p-1", t),
|
|
@@ -3314,14 +3774,14 @@ function Dt({ className: t, ...e }) {
|
|
|
3314
3774
|
}
|
|
3315
3775
|
);
|
|
3316
3776
|
}
|
|
3317
|
-
|
|
3318
|
-
function
|
|
3777
|
+
zt.displayName = "Combobox.List";
|
|
3778
|
+
function gt({
|
|
3319
3779
|
className: t,
|
|
3320
3780
|
children: e,
|
|
3321
3781
|
...s
|
|
3322
3782
|
}) {
|
|
3323
3783
|
return /* @__PURE__ */ d(
|
|
3324
|
-
|
|
3784
|
+
k.Item,
|
|
3325
3785
|
{
|
|
3326
3786
|
"data-slot": "combobox-item",
|
|
3327
3787
|
className: c(
|
|
@@ -3332,16 +3792,16 @@ function pt({
|
|
|
3332
3792
|
),
|
|
3333
3793
|
...s,
|
|
3334
3794
|
children: [
|
|
3335
|
-
/* @__PURE__ */ a("span", { className: "astw:absolute astw:right-2 astw:flex astw:size-3.5 astw:items-center astw:justify-center", children: /* @__PURE__ */ a(
|
|
3795
|
+
/* @__PURE__ */ a("span", { className: "astw:absolute astw:right-2 astw:flex astw:size-3.5 astw:items-center astw:justify-center", children: /* @__PURE__ */ a(k.ItemIndicator, { children: /* @__PURE__ */ a(Je, { className: "astw:size-4" }) }) }),
|
|
3336
3796
|
e
|
|
3337
3797
|
]
|
|
3338
3798
|
}
|
|
3339
3799
|
);
|
|
3340
3800
|
}
|
|
3341
|
-
|
|
3342
|
-
function
|
|
3801
|
+
gt.displayName = "Combobox.Item";
|
|
3802
|
+
function $t({ className: t, ...e }) {
|
|
3343
3803
|
return /* @__PURE__ */ a(
|
|
3344
|
-
|
|
3804
|
+
k.Empty,
|
|
3345
3805
|
{
|
|
3346
3806
|
"data-slot": "combobox-empty",
|
|
3347
3807
|
className: c(
|
|
@@ -3352,17 +3812,17 @@ function _t({ className: t, ...e }) {
|
|
|
3352
3812
|
}
|
|
3353
3813
|
);
|
|
3354
3814
|
}
|
|
3355
|
-
|
|
3356
|
-
function
|
|
3357
|
-
return /* @__PURE__ */ a(
|
|
3815
|
+
$t.displayName = "Combobox.Empty";
|
|
3816
|
+
function Ce({ ...t }) {
|
|
3817
|
+
return /* @__PURE__ */ a(k.Group, { "data-slot": "combobox-group", ...t });
|
|
3358
3818
|
}
|
|
3359
|
-
|
|
3360
|
-
function
|
|
3819
|
+
Ce.displayName = "Combobox.Group";
|
|
3820
|
+
function Se({
|
|
3361
3821
|
className: t,
|
|
3362
3822
|
...e
|
|
3363
3823
|
}) {
|
|
3364
3824
|
return /* @__PURE__ */ a(
|
|
3365
|
-
|
|
3825
|
+
k.GroupLabel,
|
|
3366
3826
|
{
|
|
3367
3827
|
"data-slot": "combobox-group-label",
|
|
3368
3828
|
className: c(
|
|
@@ -3373,14 +3833,14 @@ function ge({
|
|
|
3373
3833
|
}
|
|
3374
3834
|
);
|
|
3375
3835
|
}
|
|
3376
|
-
|
|
3377
|
-
function
|
|
3836
|
+
Se.displayName = "Combobox.GroupLabel";
|
|
3837
|
+
function Wt({
|
|
3378
3838
|
className: t,
|
|
3379
3839
|
children: e,
|
|
3380
3840
|
...s
|
|
3381
3841
|
}) {
|
|
3382
3842
|
return /* @__PURE__ */ a(
|
|
3383
|
-
|
|
3843
|
+
k.Clear,
|
|
3384
3844
|
{
|
|
3385
3845
|
"data-slot": "combobox-clear",
|
|
3386
3846
|
className: c(
|
|
@@ -3389,14 +3849,14 @@ function Ft({
|
|
|
3389
3849
|
t
|
|
3390
3850
|
),
|
|
3391
3851
|
...s,
|
|
3392
|
-
children: e ?? /* @__PURE__ */ a(
|
|
3852
|
+
children: e ?? /* @__PURE__ */ a(vt, { className: "astw:size-3.5" })
|
|
3393
3853
|
}
|
|
3394
3854
|
);
|
|
3395
3855
|
}
|
|
3396
|
-
|
|
3397
|
-
function
|
|
3856
|
+
Wt.displayName = "Combobox.Clear";
|
|
3857
|
+
function Te({ className: t, ...e }) {
|
|
3398
3858
|
return /* @__PURE__ */ a(
|
|
3399
|
-
|
|
3859
|
+
k.Chips,
|
|
3400
3860
|
{
|
|
3401
3861
|
"data-slot": "combobox-chips",
|
|
3402
3862
|
className: c(
|
|
@@ -3412,10 +3872,10 @@ function be({ className: t, ...e }) {
|
|
|
3412
3872
|
}
|
|
3413
3873
|
);
|
|
3414
3874
|
}
|
|
3415
|
-
|
|
3416
|
-
function
|
|
3875
|
+
Te.displayName = "Combobox.Chips";
|
|
3876
|
+
function ke({ className: t, ...e }) {
|
|
3417
3877
|
return /* @__PURE__ */ a(
|
|
3418
|
-
|
|
3878
|
+
k.Chip,
|
|
3419
3879
|
{
|
|
3420
3880
|
"data-slot": "combobox-chip",
|
|
3421
3881
|
className: c(
|
|
@@ -3428,14 +3888,14 @@ function xe({ className: t, ...e }) {
|
|
|
3428
3888
|
}
|
|
3429
3889
|
);
|
|
3430
3890
|
}
|
|
3431
|
-
|
|
3432
|
-
function
|
|
3891
|
+
ke.displayName = "Combobox.Chip";
|
|
3892
|
+
function Ie({
|
|
3433
3893
|
className: t,
|
|
3434
3894
|
children: e,
|
|
3435
3895
|
...s
|
|
3436
3896
|
}) {
|
|
3437
3897
|
return /* @__PURE__ */ a(
|
|
3438
|
-
|
|
3898
|
+
k.ChipRemove,
|
|
3439
3899
|
{
|
|
3440
3900
|
"data-slot": "combobox-chip-remove",
|
|
3441
3901
|
className: c(
|
|
@@ -3444,18 +3904,18 @@ function ve({
|
|
|
3444
3904
|
t
|
|
3445
3905
|
),
|
|
3446
3906
|
...s,
|
|
3447
|
-
children: e ?? /* @__PURE__ */ a(
|
|
3907
|
+
children: e ?? /* @__PURE__ */ a(vt, { className: "astw:size-3" })
|
|
3448
3908
|
}
|
|
3449
3909
|
);
|
|
3450
3910
|
}
|
|
3451
|
-
|
|
3452
|
-
function
|
|
3453
|
-
return /* @__PURE__ */ a(
|
|
3911
|
+
Ie.displayName = "Combobox.ChipRemove";
|
|
3912
|
+
function Re({ ...t }) {
|
|
3913
|
+
return /* @__PURE__ */ a(k.Value, { "data-slot": "combobox-value", ...t });
|
|
3454
3914
|
}
|
|
3455
|
-
|
|
3456
|
-
function
|
|
3915
|
+
Re.displayName = "Combobox.Value";
|
|
3916
|
+
function zs({ className: t, ...e }) {
|
|
3457
3917
|
return /* @__PURE__ */ a(
|
|
3458
|
-
|
|
3918
|
+
k.Status,
|
|
3459
3919
|
{
|
|
3460
3920
|
"data-slot": "combobox-status",
|
|
3461
3921
|
className: c("astw:sr-only", t),
|
|
@@ -3463,64 +3923,64 @@ function ds({ className: t, ...e }) {
|
|
|
3463
3923
|
}
|
|
3464
3924
|
);
|
|
3465
3925
|
}
|
|
3466
|
-
|
|
3467
|
-
function
|
|
3468
|
-
return /* @__PURE__ */ a(
|
|
3926
|
+
zs.displayName = "Combobox.Status";
|
|
3927
|
+
function Ae({ ...t }) {
|
|
3928
|
+
return /* @__PURE__ */ a(k.Collection, { "data-slot": "combobox-collection", ...t });
|
|
3469
3929
|
}
|
|
3470
|
-
|
|
3471
|
-
const
|
|
3472
|
-
function
|
|
3930
|
+
Ae.displayName = "Combobox.Collection";
|
|
3931
|
+
const yo = (t) => `Create "${t}"`;
|
|
3932
|
+
function Le(t) {
|
|
3473
3933
|
const {
|
|
3474
3934
|
items: e,
|
|
3475
3935
|
getLabel: s,
|
|
3476
3936
|
createItem: n,
|
|
3477
3937
|
onItemCreated: r,
|
|
3478
|
-
formatCreateLabel: o =
|
|
3479
|
-
} = t, i = "multiple" in t && t.multiple === !0, [l, m] =
|
|
3938
|
+
formatCreateLabel: o = yo
|
|
3939
|
+
} = t, i = "multiple" in t && t.multiple === !0, [l, m] = M(
|
|
3480
3940
|
() => i ? t.defaultValue ?? [] : t.defaultValue ?? null
|
|
3481
|
-
), [u, w] =
|
|
3941
|
+
), [u, w] = M(""), [p, f] = M(!1), b = l, h = l, g = m, N = m, y = U(null), S = t.onValueChange, T = u.trim(), L = T.toLocaleLowerCase(), I = T !== "" && e.some((C) => s(C).trim().toLocaleLowerCase() === L), x = H(() => p || T === "" || I ? null : { item: n(T), label: T }, [p, T, I, n]), G = H(() => x ? [...e, x.item] : e, [e, x]), j = P(
|
|
3482
3942
|
(C) => x !== null && C === x.item,
|
|
3483
3943
|
[x]
|
|
3484
|
-
),
|
|
3944
|
+
), Tt = P(
|
|
3485
3945
|
(C) => x !== null && C === x.item ? x.label : void 0,
|
|
3486
3946
|
[x]
|
|
3487
|
-
),
|
|
3947
|
+
), wt = P(
|
|
3488
3948
|
(C) => x !== null && C === x.item ? o(x.label) : s(C),
|
|
3489
3949
|
[x, s, o]
|
|
3490
|
-
),
|
|
3950
|
+
), Ws = P(
|
|
3491
3951
|
(C) => x !== null && C === x.item ? "" : s(C),
|
|
3492
3952
|
[x, s]
|
|
3493
|
-
),
|
|
3494
|
-
(C,
|
|
3953
|
+
), kt = P(
|
|
3954
|
+
(C, It) => {
|
|
3495
3955
|
if (p) return;
|
|
3496
|
-
const
|
|
3497
|
-
const
|
|
3956
|
+
const J = n(C), Rt = (_) => {
|
|
3957
|
+
const Lt = _ ?? J;
|
|
3498
3958
|
if (i) {
|
|
3499
|
-
const
|
|
3500
|
-
g(
|
|
3959
|
+
const ze = [...It ?? [], Lt];
|
|
3960
|
+
g(ze), S?.(ze);
|
|
3501
3961
|
} else
|
|
3502
|
-
|
|
3503
|
-
w(i ? "" : s(
|
|
3962
|
+
N(Lt), S?.(Lt);
|
|
3963
|
+
w(i ? "" : s(Lt));
|
|
3504
3964
|
};
|
|
3505
3965
|
if (!r) {
|
|
3506
|
-
|
|
3966
|
+
Rt();
|
|
3507
3967
|
return;
|
|
3508
3968
|
}
|
|
3509
|
-
i || (
|
|
3510
|
-
const
|
|
3511
|
-
if (
|
|
3969
|
+
i || (y.current = C, w(C));
|
|
3970
|
+
const At = (_) => {
|
|
3971
|
+
if (y.current = null, f(!1), _ === !1) {
|
|
3512
3972
|
w("");
|
|
3513
3973
|
return;
|
|
3514
3974
|
}
|
|
3515
|
-
|
|
3516
|
-
},
|
|
3517
|
-
|
|
3975
|
+
Rt(_ != null && typeof _ == "object" ? _ : void 0);
|
|
3976
|
+
}, _e = () => {
|
|
3977
|
+
y.current = null, f(!1), w("");
|
|
3518
3978
|
};
|
|
3519
3979
|
try {
|
|
3520
|
-
const
|
|
3521
|
-
|
|
3980
|
+
const _ = r(J);
|
|
3981
|
+
_ != null && typeof _.then == "function" ? (f(!0), _.then(At, _e)) : At(_);
|
|
3522
3982
|
} catch {
|
|
3523
|
-
|
|
3983
|
+
_e();
|
|
3524
3984
|
}
|
|
3525
3985
|
},
|
|
3526
3986
|
[
|
|
@@ -3530,80 +3990,80 @@ function Ce(t) {
|
|
|
3530
3990
|
r,
|
|
3531
3991
|
S,
|
|
3532
3992
|
s,
|
|
3533
|
-
|
|
3993
|
+
N,
|
|
3534
3994
|
g
|
|
3535
3995
|
]
|
|
3536
|
-
),
|
|
3996
|
+
), Hs = P(
|
|
3537
3997
|
(C) => {
|
|
3538
|
-
if (C.find((
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3998
|
+
if (C.find((J) => x !== null && J === x.item) && x) {
|
|
3999
|
+
const J = x.label, Rt = C.filter((At) => !(x !== null && At === x.item));
|
|
4000
|
+
kt(J, Rt);
|
|
3541
4001
|
return;
|
|
3542
4002
|
}
|
|
3543
4003
|
g(C), S?.(C), w("");
|
|
3544
4004
|
},
|
|
3545
|
-
[
|
|
3546
|
-
),
|
|
4005
|
+
[kt, S, x, g]
|
|
4006
|
+
), Us = P(
|
|
3547
4007
|
(C) => {
|
|
3548
4008
|
if (C && x !== null && C === x.item) {
|
|
3549
|
-
const
|
|
3550
|
-
|
|
4009
|
+
const It = x.label;
|
|
4010
|
+
kt(It);
|
|
3551
4011
|
return;
|
|
3552
4012
|
}
|
|
3553
|
-
|
|
4013
|
+
N(C), S?.(C), w("");
|
|
3554
4014
|
},
|
|
3555
|
-
[
|
|
3556
|
-
),
|
|
4015
|
+
[kt, S, x, N]
|
|
4016
|
+
), Ee = {
|
|
3557
4017
|
items: G,
|
|
3558
4018
|
inputValue: u,
|
|
3559
|
-
onInputValueChange:
|
|
3560
|
-
|
|
4019
|
+
onInputValueChange: P((C) => {
|
|
4020
|
+
y.current !== null && C === "" || w(C);
|
|
3561
4021
|
}, []),
|
|
3562
|
-
itemToStringLabel:
|
|
3563
|
-
itemToStringValue:
|
|
4022
|
+
itemToStringLabel: wt,
|
|
4023
|
+
itemToStringValue: Ws,
|
|
3564
4024
|
isCreateItem: j,
|
|
3565
|
-
getCreateLabel:
|
|
4025
|
+
getCreateLabel: Tt,
|
|
3566
4026
|
formatCreateLabel: o,
|
|
3567
4027
|
creating: p
|
|
3568
4028
|
};
|
|
3569
4029
|
return i ? {
|
|
3570
|
-
...
|
|
4030
|
+
...Ee,
|
|
3571
4031
|
value: b,
|
|
3572
|
-
onValueChange:
|
|
4032
|
+
onValueChange: Hs,
|
|
3573
4033
|
multiple: !0
|
|
3574
4034
|
} : {
|
|
3575
|
-
...
|
|
3576
|
-
value:
|
|
3577
|
-
onValueChange:
|
|
4035
|
+
...Ee,
|
|
4036
|
+
value: h,
|
|
4037
|
+
onValueChange: Us,
|
|
3578
4038
|
multiple: !1
|
|
3579
4039
|
};
|
|
3580
4040
|
}
|
|
3581
|
-
function
|
|
3582
|
-
return
|
|
3583
|
-
}
|
|
3584
|
-
const
|
|
3585
|
-
Root:
|
|
3586
|
-
InputGroup:
|
|
3587
|
-
Input:
|
|
3588
|
-
Trigger:
|
|
3589
|
-
Content:
|
|
3590
|
-
List:
|
|
3591
|
-
Item:
|
|
3592
|
-
Empty:
|
|
3593
|
-
Group:
|
|
3594
|
-
GroupLabel:
|
|
3595
|
-
Clear:
|
|
3596
|
-
Chips:
|
|
3597
|
-
Chip:
|
|
3598
|
-
ChipRemove:
|
|
3599
|
-
Value:
|
|
3600
|
-
Collection:
|
|
3601
|
-
Status:
|
|
3602
|
-
useFilter:
|
|
3603
|
-
useCreatable:
|
|
3604
|
-
useAsync:
|
|
4041
|
+
function Pe(t) {
|
|
4042
|
+
return _s(t);
|
|
4043
|
+
}
|
|
4044
|
+
const No = {
|
|
4045
|
+
Root: Vt,
|
|
4046
|
+
InputGroup: Et,
|
|
4047
|
+
Input: ht,
|
|
4048
|
+
Trigger: jt,
|
|
4049
|
+
Content: _t,
|
|
4050
|
+
List: zt,
|
|
4051
|
+
Item: gt,
|
|
4052
|
+
Empty: $t,
|
|
4053
|
+
Group: Ce,
|
|
4054
|
+
GroupLabel: Se,
|
|
4055
|
+
Clear: Wt,
|
|
4056
|
+
Chips: Te,
|
|
4057
|
+
Chip: ke,
|
|
4058
|
+
ChipRemove: Ie,
|
|
4059
|
+
Value: Re,
|
|
4060
|
+
Collection: Ae,
|
|
4061
|
+
Status: zs,
|
|
4062
|
+
useFilter: k.useFilter,
|
|
4063
|
+
useCreatable: Le,
|
|
4064
|
+
useAsync: Pe
|
|
3605
4065
|
};
|
|
3606
|
-
function
|
|
4066
|
+
function Ht({
|
|
3607
4067
|
className: t,
|
|
3608
4068
|
placeholder: e,
|
|
3609
4069
|
disabled: s,
|
|
@@ -3613,48 +4073,48 @@ function Ot({
|
|
|
3613
4073
|
multiple: i,
|
|
3614
4074
|
rootProps: l
|
|
3615
4075
|
}) {
|
|
3616
|
-
return i ? /* @__PURE__ */ a("div", { className: t, children: /* @__PURE__ */ d(
|
|
3617
|
-
/* @__PURE__ */ a(
|
|
4076
|
+
return i ? /* @__PURE__ */ a("div", { className: t, children: /* @__PURE__ */ d(Vt, { multiple: !0, ...l, disabled: s, children: [
|
|
4077
|
+
/* @__PURE__ */ a(Et, { children: /* @__PURE__ */ a(Te, { children: /* @__PURE__ */ a(Re, { children: (m) => /* @__PURE__ */ d(D, { children: [
|
|
3618
4078
|
m.map((u) => {
|
|
3619
4079
|
const w = r(u);
|
|
3620
|
-
return /* @__PURE__ */ d(
|
|
4080
|
+
return /* @__PURE__ */ d(ke, { "aria-label": w.label, children: [
|
|
3621
4081
|
w.label,
|
|
3622
|
-
/* @__PURE__ */ a(
|
|
4082
|
+
/* @__PURE__ */ a(Ie, {})
|
|
3623
4083
|
] }, w.key ?? w.label);
|
|
3624
4084
|
}),
|
|
3625
|
-
/* @__PURE__ */ a(
|
|
4085
|
+
/* @__PURE__ */ a(ht, { placeholder: m.length > 0 ? "" : e })
|
|
3626
4086
|
] }) }) }) }),
|
|
3627
|
-
/* @__PURE__ */ d(
|
|
3628
|
-
/* @__PURE__ */ a(
|
|
3629
|
-
/* @__PURE__ */ a(
|
|
4087
|
+
/* @__PURE__ */ d(_t, { children: [
|
|
4088
|
+
/* @__PURE__ */ a($t, { children: n }),
|
|
4089
|
+
/* @__PURE__ */ a(zt, { children: o })
|
|
3630
4090
|
] })
|
|
3631
|
-
] }) }) : /* @__PURE__ */ a("div", { className: t, children: /* @__PURE__ */ d(
|
|
3632
|
-
/* @__PURE__ */ d(
|
|
3633
|
-
/* @__PURE__ */ a(
|
|
3634
|
-
/* @__PURE__ */ a(
|
|
3635
|
-
/* @__PURE__ */ a(
|
|
4091
|
+
] }) }) : /* @__PURE__ */ a("div", { className: t, children: /* @__PURE__ */ d(Vt, { ...l, disabled: s, children: [
|
|
4092
|
+
/* @__PURE__ */ d(Et, { children: [
|
|
4093
|
+
/* @__PURE__ */ a(ht, { placeholder: e }),
|
|
4094
|
+
/* @__PURE__ */ a(Wt, {}),
|
|
4095
|
+
/* @__PURE__ */ a(jt, {})
|
|
3636
4096
|
] }),
|
|
3637
|
-
/* @__PURE__ */ d(
|
|
3638
|
-
/* @__PURE__ */ a(
|
|
3639
|
-
/* @__PURE__ */ a(
|
|
4097
|
+
/* @__PURE__ */ d(_t, { children: [
|
|
4098
|
+
/* @__PURE__ */ a($t, { children: n }),
|
|
4099
|
+
/* @__PURE__ */ a(zt, { children: o })
|
|
3640
4100
|
] })
|
|
3641
4101
|
] }) });
|
|
3642
4102
|
}
|
|
3643
|
-
function
|
|
4103
|
+
function se(t) {
|
|
3644
4104
|
return (e) => {
|
|
3645
4105
|
const s = t(e);
|
|
3646
|
-
return /* @__PURE__ */ a(
|
|
4106
|
+
return /* @__PURE__ */ a(gt, { value: e, children: s.render ?? s.label }, s.key ?? s.label);
|
|
3647
4107
|
};
|
|
3648
4108
|
}
|
|
3649
|
-
function
|
|
4109
|
+
function $s(t, e) {
|
|
3650
4110
|
return (s) => {
|
|
3651
4111
|
if (e.isCreateItem(s))
|
|
3652
|
-
return /* @__PURE__ */ a(
|
|
4112
|
+
return /* @__PURE__ */ a(gt, { value: s, children: e.formatCreateLabel(e.getCreateLabel(s) ?? "") }, "__create__");
|
|
3653
4113
|
const n = t(s);
|
|
3654
|
-
return /* @__PURE__ */ a(
|
|
4114
|
+
return /* @__PURE__ */ a(gt, { value: s, children: n.render ?? n.label }, n.key ?? n.label);
|
|
3655
4115
|
};
|
|
3656
4116
|
}
|
|
3657
|
-
function
|
|
4117
|
+
function Co(t) {
|
|
3658
4118
|
const {
|
|
3659
4119
|
items: e,
|
|
3660
4120
|
placeholder: s,
|
|
@@ -3664,15 +4124,15 @@ function zr(t) {
|
|
|
3664
4124
|
disabled: i,
|
|
3665
4125
|
multiple: l,
|
|
3666
4126
|
...m
|
|
3667
|
-
} = t, u = r ??
|
|
3668
|
-
const b =
|
|
3669
|
-
return /* @__PURE__ */ d(
|
|
3670
|
-
/* @__PURE__ */ a(
|
|
3671
|
-
/* @__PURE__ */ a(
|
|
4127
|
+
} = t, u = r ?? ut, w = (f) => u(f).label, p = Ne(e) ? (f) => {
|
|
4128
|
+
const b = f;
|
|
4129
|
+
return /* @__PURE__ */ d(Ce, { items: b.items, children: [
|
|
4130
|
+
/* @__PURE__ */ a(Se, { children: b.label }),
|
|
4131
|
+
/* @__PURE__ */ a(Ae, { children: se(u) })
|
|
3672
4132
|
] }, b.label);
|
|
3673
|
-
} :
|
|
4133
|
+
} : se(u);
|
|
3674
4134
|
return /* @__PURE__ */ a(
|
|
3675
|
-
|
|
4135
|
+
Ht,
|
|
3676
4136
|
{
|
|
3677
4137
|
className: o,
|
|
3678
4138
|
placeholder: s,
|
|
@@ -3689,7 +4149,7 @@ function zr(t) {
|
|
|
3689
4149
|
}
|
|
3690
4150
|
);
|
|
3691
4151
|
}
|
|
3692
|
-
function
|
|
4152
|
+
function So(t) {
|
|
3693
4153
|
const {
|
|
3694
4154
|
items: e,
|
|
3695
4155
|
placeholder: s,
|
|
@@ -3702,8 +4162,8 @@ function $r(t) {
|
|
|
3702
4162
|
multiple: u,
|
|
3703
4163
|
value: w,
|
|
3704
4164
|
defaultValue: p,
|
|
3705
|
-
onValueChange:
|
|
3706
|
-
} = t,
|
|
4165
|
+
onValueChange: f
|
|
4166
|
+
} = t, y = Le({
|
|
3707
4167
|
items: e,
|
|
3708
4168
|
multiple: u,
|
|
3709
4169
|
getLabel: (S) => r(S).label,
|
|
@@ -3711,34 +4171,34 @@ function $r(t) {
|
|
|
3711
4171
|
onItemCreated: (S) => o(S.__value),
|
|
3712
4172
|
formatCreateLabel: i,
|
|
3713
4173
|
defaultValue: p,
|
|
3714
|
-
onValueChange:
|
|
4174
|
+
onValueChange: f
|
|
3715
4175
|
});
|
|
3716
4176
|
return /* @__PURE__ */ a(
|
|
3717
|
-
|
|
4177
|
+
Ht,
|
|
3718
4178
|
{
|
|
3719
4179
|
className: l,
|
|
3720
4180
|
placeholder: s,
|
|
3721
|
-
disabled: m ||
|
|
4181
|
+
disabled: m || y.creating,
|
|
3722
4182
|
emptyContent: n,
|
|
3723
4183
|
mapItem: r,
|
|
3724
|
-
listChildren:
|
|
4184
|
+
listChildren: $s(r, y),
|
|
3725
4185
|
multiple: u,
|
|
3726
4186
|
rootProps: {
|
|
3727
|
-
items:
|
|
3728
|
-
value: w ??
|
|
3729
|
-
onValueChange:
|
|
3730
|
-
inputValue:
|
|
3731
|
-
onInputValueChange:
|
|
3732
|
-
itemToStringLabel:
|
|
3733
|
-
itemToStringValue:
|
|
4187
|
+
items: y.items,
|
|
4188
|
+
value: w ?? y.value,
|
|
4189
|
+
onValueChange: y.onValueChange,
|
|
4190
|
+
inputValue: y.inputValue,
|
|
4191
|
+
onInputValueChange: y.onInputValueChange,
|
|
4192
|
+
itemToStringLabel: y.itemToStringLabel,
|
|
4193
|
+
itemToStringValue: y.itemToStringValue
|
|
3734
4194
|
}
|
|
3735
4195
|
}
|
|
3736
4196
|
);
|
|
3737
4197
|
}
|
|
3738
|
-
function
|
|
3739
|
-
return "onCreateItem" in t ? /* @__PURE__ */ a(
|
|
4198
|
+
function To(t) {
|
|
4199
|
+
return "onCreateItem" in t ? /* @__PURE__ */ a(So, { ...t }) : /* @__PURE__ */ a(Co, { ...t });
|
|
3740
4200
|
}
|
|
3741
|
-
function
|
|
4201
|
+
function ko(t) {
|
|
3742
4202
|
const {
|
|
3743
4203
|
fetcher: e,
|
|
3744
4204
|
placeholder: s,
|
|
@@ -3749,28 +4209,28 @@ function Or(t) {
|
|
|
3749
4209
|
disabled: l,
|
|
3750
4210
|
multiple: m,
|
|
3751
4211
|
...u
|
|
3752
|
-
} = t, w =
|
|
4212
|
+
} = t, w = Pe({ fetcher: e }), p = o ?? ut, f = (b) => p(b).label;
|
|
3753
4213
|
return /* @__PURE__ */ a(
|
|
3754
|
-
|
|
4214
|
+
Ht,
|
|
3755
4215
|
{
|
|
3756
4216
|
className: i,
|
|
3757
4217
|
placeholder: s,
|
|
3758
4218
|
disabled: l,
|
|
3759
4219
|
emptyContent: w.loading ? r : n,
|
|
3760
4220
|
mapItem: p,
|
|
3761
|
-
listChildren:
|
|
4221
|
+
listChildren: se(p),
|
|
3762
4222
|
multiple: m,
|
|
3763
4223
|
rootProps: {
|
|
3764
4224
|
items: w.items,
|
|
3765
4225
|
filter: null,
|
|
3766
4226
|
onInputValueChange: w.onInputValueChange,
|
|
3767
4227
|
...u,
|
|
3768
|
-
itemToStringLabel:
|
|
4228
|
+
itemToStringLabel: f
|
|
3769
4229
|
}
|
|
3770
4230
|
}
|
|
3771
4231
|
);
|
|
3772
4232
|
}
|
|
3773
|
-
function
|
|
4233
|
+
function Io(t) {
|
|
3774
4234
|
const {
|
|
3775
4235
|
fetcher: e,
|
|
3776
4236
|
placeholder: s,
|
|
@@ -3783,27 +4243,27 @@ function Gr(t) {
|
|
|
3783
4243
|
disabled: u,
|
|
3784
4244
|
multiple: w,
|
|
3785
4245
|
value: p,
|
|
3786
|
-
defaultValue:
|
|
4246
|
+
defaultValue: f,
|
|
3787
4247
|
onValueChange: b
|
|
3788
|
-
} = t,
|
|
3789
|
-
items:
|
|
4248
|
+
} = t, h = Pe({ fetcher: e }), g = (L) => o(L).label, N = (L) => ({ __pending: !0, __value: L }), y = (L) => i(L.__value), S = {
|
|
4249
|
+
items: h.items,
|
|
3790
4250
|
multiple: w,
|
|
3791
4251
|
getLabel: g,
|
|
3792
|
-
createItem:
|
|
3793
|
-
onItemCreated:
|
|
4252
|
+
createItem: N,
|
|
4253
|
+
onItemCreated: y,
|
|
3794
4254
|
formatCreateLabel: l,
|
|
3795
|
-
defaultValue:
|
|
4255
|
+
defaultValue: f,
|
|
3796
4256
|
onValueChange: b
|
|
3797
|
-
}, T =
|
|
4257
|
+
}, T = Le(S);
|
|
3798
4258
|
return /* @__PURE__ */ a(
|
|
3799
|
-
|
|
4259
|
+
Ht,
|
|
3800
4260
|
{
|
|
3801
4261
|
className: m,
|
|
3802
4262
|
placeholder: s,
|
|
3803
4263
|
disabled: u || T.creating,
|
|
3804
|
-
emptyContent:
|
|
4264
|
+
emptyContent: h.loading ? r : n,
|
|
3805
4265
|
mapItem: o,
|
|
3806
|
-
listChildren:
|
|
4266
|
+
listChildren: $s(o, T),
|
|
3807
4267
|
multiple: w,
|
|
3808
4268
|
rootProps: {
|
|
3809
4269
|
items: T.items,
|
|
@@ -3811,8 +4271,8 @@ function Gr(t) {
|
|
|
3811
4271
|
value: p ?? T.value,
|
|
3812
4272
|
onValueChange: T.onValueChange,
|
|
3813
4273
|
inputValue: T.inputValue,
|
|
3814
|
-
onInputValueChange: (
|
|
3815
|
-
T.onInputValueChange(
|
|
4274
|
+
onInputValueChange: (L) => {
|
|
4275
|
+
T.onInputValueChange(L), h.onInputValueChange(L);
|
|
3816
4276
|
},
|
|
3817
4277
|
itemToStringLabel: T.itemToStringLabel,
|
|
3818
4278
|
itemToStringValue: T.itemToStringValue
|
|
@@ -3820,33 +4280,33 @@ function Gr(t) {
|
|
|
3820
4280
|
}
|
|
3821
4281
|
);
|
|
3822
4282
|
}
|
|
3823
|
-
function
|
|
3824
|
-
return "onCreateItem" in t ? /* @__PURE__ */ a(
|
|
4283
|
+
function Ro(t) {
|
|
4284
|
+
return "onCreateItem" in t ? /* @__PURE__ */ a(Io, { ...t }) : /* @__PURE__ */ a(ko, { ...t });
|
|
3825
4285
|
}
|
|
3826
|
-
const
|
|
3827
|
-
Async:
|
|
3828
|
-
Parts:
|
|
4286
|
+
const Ri = Object.assign(To, {
|
|
4287
|
+
Async: Ro,
|
|
4288
|
+
Parts: No
|
|
3829
4289
|
});
|
|
3830
|
-
function
|
|
4290
|
+
function Ut(t) {
|
|
3831
4291
|
return /* @__PURE__ */ a(
|
|
3832
|
-
|
|
4292
|
+
A.Root,
|
|
3833
4293
|
{
|
|
3834
4294
|
"data-slot": "autocomplete",
|
|
3835
4295
|
...t
|
|
3836
4296
|
}
|
|
3837
4297
|
);
|
|
3838
4298
|
}
|
|
3839
|
-
|
|
3840
|
-
function
|
|
3841
|
-
return /* @__PURE__ */ a(
|
|
4299
|
+
Ut.displayName = "Autocomplete.Root";
|
|
4300
|
+
function Bs({ ...t }) {
|
|
4301
|
+
return /* @__PURE__ */ a(A.Value, { "data-slot": "autocomplete-value", ...t });
|
|
3842
4302
|
}
|
|
3843
|
-
|
|
3844
|
-
function
|
|
4303
|
+
Bs.displayName = "Autocomplete.Value";
|
|
4304
|
+
function Nt({
|
|
3845
4305
|
className: t,
|
|
3846
4306
|
...e
|
|
3847
4307
|
}) {
|
|
3848
4308
|
return /* @__PURE__ */ a(
|
|
3849
|
-
|
|
4309
|
+
A.Input,
|
|
3850
4310
|
{
|
|
3851
4311
|
"data-slot": "autocomplete-input",
|
|
3852
4312
|
className: c(
|
|
@@ -3859,14 +4319,14 @@ function xt({
|
|
|
3859
4319
|
}
|
|
3860
4320
|
);
|
|
3861
4321
|
}
|
|
3862
|
-
|
|
3863
|
-
function
|
|
4322
|
+
Nt.displayName = "Autocomplete.Input";
|
|
4323
|
+
function Ct({
|
|
3864
4324
|
className: t,
|
|
3865
4325
|
children: e,
|
|
3866
4326
|
...s
|
|
3867
4327
|
}) {
|
|
3868
4328
|
return /* @__PURE__ */ a(
|
|
3869
|
-
|
|
4329
|
+
A.Trigger,
|
|
3870
4330
|
{
|
|
3871
4331
|
"data-slot": "autocomplete-trigger",
|
|
3872
4332
|
className: c(
|
|
@@ -3876,33 +4336,33 @@ function vt({
|
|
|
3876
4336
|
t
|
|
3877
4337
|
),
|
|
3878
4338
|
...s,
|
|
3879
|
-
children: e ?? /* @__PURE__ */ a(
|
|
4339
|
+
children: e ?? /* @__PURE__ */ a(A.Icon, { children: /* @__PURE__ */ a(re, { className: "astw:size-4" }) })
|
|
3880
4340
|
}
|
|
3881
4341
|
);
|
|
3882
4342
|
}
|
|
3883
|
-
|
|
3884
|
-
function
|
|
4343
|
+
Ct.displayName = "Autocomplete.Trigger";
|
|
4344
|
+
function Kt({ className: t, children: e, ...s }) {
|
|
3885
4345
|
return /* @__PURE__ */ a(
|
|
3886
4346
|
"div",
|
|
3887
4347
|
{
|
|
3888
4348
|
"data-slot": "autocomplete-input-group",
|
|
3889
4349
|
className: c("astw:relative astw:flex astw:items-center", t),
|
|
3890
4350
|
...s,
|
|
3891
|
-
children: e ?? /* @__PURE__ */ d(
|
|
3892
|
-
/* @__PURE__ */ a(
|
|
3893
|
-
/* @__PURE__ */ a(
|
|
3894
|
-
/* @__PURE__ */ a(
|
|
4351
|
+
children: e ?? /* @__PURE__ */ d(D, { children: [
|
|
4352
|
+
/* @__PURE__ */ a(Nt, {}),
|
|
4353
|
+
/* @__PURE__ */ a(St, {}),
|
|
4354
|
+
/* @__PURE__ */ a(Ct, {})
|
|
3895
4355
|
] })
|
|
3896
4356
|
}
|
|
3897
4357
|
);
|
|
3898
4358
|
}
|
|
3899
|
-
|
|
3900
|
-
function
|
|
4359
|
+
Kt.displayName = "Autocomplete.InputGroup";
|
|
4360
|
+
function Yt({
|
|
3901
4361
|
className: t,
|
|
3902
4362
|
...e
|
|
3903
4363
|
}) {
|
|
3904
|
-
return /* @__PURE__ */ a(
|
|
3905
|
-
|
|
4364
|
+
return /* @__PURE__ */ a(A.Portal, { children: /* @__PURE__ */ a(A.Positioner, { children: /* @__PURE__ */ a(
|
|
4365
|
+
A.Popup,
|
|
3906
4366
|
{
|
|
3907
4367
|
"data-slot": "autocomplete-content",
|
|
3908
4368
|
className: c(
|
|
@@ -3913,13 +4373,13 @@ function Wt({
|
|
|
3913
4373
|
}
|
|
3914
4374
|
) }) });
|
|
3915
4375
|
}
|
|
3916
|
-
|
|
3917
|
-
function
|
|
4376
|
+
Yt.displayName = "Autocomplete.Content";
|
|
4377
|
+
function qt({
|
|
3918
4378
|
className: t,
|
|
3919
4379
|
...e
|
|
3920
4380
|
}) {
|
|
3921
4381
|
return /* @__PURE__ */ a(
|
|
3922
|
-
|
|
4382
|
+
A.List,
|
|
3923
4383
|
{
|
|
3924
4384
|
"data-slot": "autocomplete-list",
|
|
3925
4385
|
className: c("astw:max-h-60 astw:overflow-y-auto astw:p-1", t),
|
|
@@ -3927,13 +4387,13 @@ function Ht({
|
|
|
3927
4387
|
}
|
|
3928
4388
|
);
|
|
3929
4389
|
}
|
|
3930
|
-
|
|
3931
|
-
function
|
|
4390
|
+
qt.displayName = "Autocomplete.List";
|
|
4391
|
+
function bt({
|
|
3932
4392
|
className: t,
|
|
3933
4393
|
...e
|
|
3934
4394
|
}) {
|
|
3935
4395
|
return /* @__PURE__ */ a(
|
|
3936
|
-
|
|
4396
|
+
A.Item,
|
|
3937
4397
|
{
|
|
3938
4398
|
"data-slot": "autocomplete-item",
|
|
3939
4399
|
className: c(
|
|
@@ -3946,13 +4406,13 @@ function ht({
|
|
|
3946
4406
|
}
|
|
3947
4407
|
);
|
|
3948
4408
|
}
|
|
3949
|
-
|
|
3950
|
-
function
|
|
4409
|
+
bt.displayName = "Autocomplete.Item";
|
|
4410
|
+
function Xt({
|
|
3951
4411
|
className: t,
|
|
3952
4412
|
...e
|
|
3953
4413
|
}) {
|
|
3954
4414
|
return /* @__PURE__ */ a(
|
|
3955
|
-
|
|
4415
|
+
A.Empty,
|
|
3956
4416
|
{
|
|
3957
4417
|
"data-slot": "autocomplete-empty",
|
|
3958
4418
|
className: c(
|
|
@@ -3963,14 +4423,14 @@ function Ut({
|
|
|
3963
4423
|
}
|
|
3964
4424
|
);
|
|
3965
4425
|
}
|
|
3966
|
-
|
|
3967
|
-
function
|
|
4426
|
+
Xt.displayName = "Autocomplete.Empty";
|
|
4427
|
+
function St({
|
|
3968
4428
|
className: t,
|
|
3969
4429
|
children: e,
|
|
3970
4430
|
...s
|
|
3971
4431
|
}) {
|
|
3972
4432
|
return /* @__PURE__ */ a(
|
|
3973
|
-
|
|
4433
|
+
A.Clear,
|
|
3974
4434
|
{
|
|
3975
4435
|
"data-slot": "autocomplete-clear",
|
|
3976
4436
|
className: c(
|
|
@@ -3979,21 +4439,21 @@ function yt({
|
|
|
3979
4439
|
t
|
|
3980
4440
|
),
|
|
3981
4441
|
...s,
|
|
3982
|
-
children: e ?? /* @__PURE__ */ a(
|
|
4442
|
+
children: e ?? /* @__PURE__ */ a(vt, { className: "astw:size-3.5" })
|
|
3983
4443
|
}
|
|
3984
4444
|
);
|
|
3985
4445
|
}
|
|
3986
|
-
|
|
3987
|
-
function
|
|
3988
|
-
return /* @__PURE__ */ a(
|
|
4446
|
+
St.displayName = "Autocomplete.Clear";
|
|
4447
|
+
function De({ ...t }) {
|
|
4448
|
+
return /* @__PURE__ */ a(A.Group, { "data-slot": "autocomplete-group", ...t });
|
|
3989
4449
|
}
|
|
3990
|
-
|
|
3991
|
-
function
|
|
4450
|
+
De.displayName = "Autocomplete.Group";
|
|
4451
|
+
function Me({
|
|
3992
4452
|
className: t,
|
|
3993
4453
|
...e
|
|
3994
4454
|
}) {
|
|
3995
4455
|
return /* @__PURE__ */ a(
|
|
3996
|
-
|
|
4456
|
+
A.GroupLabel,
|
|
3997
4457
|
{
|
|
3998
4458
|
"data-slot": "autocomplete-group-label",
|
|
3999
4459
|
className: c(
|
|
@@ -4004,19 +4464,19 @@ function Ie({
|
|
|
4004
4464
|
}
|
|
4005
4465
|
);
|
|
4006
4466
|
}
|
|
4007
|
-
|
|
4008
|
-
function
|
|
4467
|
+
Me.displayName = "Autocomplete.GroupLabel";
|
|
4468
|
+
function Ve({
|
|
4009
4469
|
...t
|
|
4010
4470
|
}) {
|
|
4011
|
-
return /* @__PURE__ */ a(
|
|
4471
|
+
return /* @__PURE__ */ a(A.Collection, { "data-slot": "autocomplete-collection", ...t });
|
|
4012
4472
|
}
|
|
4013
|
-
|
|
4014
|
-
function
|
|
4473
|
+
Ve.displayName = "Autocomplete.Collection";
|
|
4474
|
+
function Fs({
|
|
4015
4475
|
className: t,
|
|
4016
4476
|
...e
|
|
4017
4477
|
}) {
|
|
4018
4478
|
return /* @__PURE__ */ a(
|
|
4019
|
-
|
|
4479
|
+
A.Status,
|
|
4020
4480
|
{
|
|
4021
4481
|
"data-slot": "autocomplete-status",
|
|
4022
4482
|
className: c("astw:sr-only", t),
|
|
@@ -4024,9 +4484,9 @@ function ms({
|
|
|
4024
4484
|
}
|
|
4025
4485
|
);
|
|
4026
4486
|
}
|
|
4027
|
-
|
|
4028
|
-
function
|
|
4029
|
-
const { items: e, loading: s, query: n, error: r, onInputValueChange: o } =
|
|
4487
|
+
Fs.displayName = "Autocomplete.Status";
|
|
4488
|
+
function Os(t) {
|
|
4489
|
+
const { items: e, loading: s, query: n, error: r, onInputValueChange: o } = _s(t);
|
|
4030
4490
|
return {
|
|
4031
4491
|
items: e,
|
|
4032
4492
|
loading: s,
|
|
@@ -4035,25 +4495,25 @@ function ps(t) {
|
|
|
4035
4495
|
onValueChange: o
|
|
4036
4496
|
};
|
|
4037
4497
|
}
|
|
4038
|
-
const
|
|
4039
|
-
Root:
|
|
4040
|
-
Value:
|
|
4041
|
-
InputGroup:
|
|
4042
|
-
Input:
|
|
4043
|
-
Trigger:
|
|
4044
|
-
Content:
|
|
4045
|
-
List:
|
|
4046
|
-
Item:
|
|
4047
|
-
Empty:
|
|
4048
|
-
Clear:
|
|
4049
|
-
Group:
|
|
4050
|
-
GroupLabel:
|
|
4051
|
-
Collection:
|
|
4052
|
-
Status:
|
|
4053
|
-
useFilter:
|
|
4054
|
-
useAsync:
|
|
4498
|
+
const Ao = {
|
|
4499
|
+
Root: Ut,
|
|
4500
|
+
Value: Bs,
|
|
4501
|
+
InputGroup: Kt,
|
|
4502
|
+
Input: Nt,
|
|
4503
|
+
Trigger: Ct,
|
|
4504
|
+
Content: Yt,
|
|
4505
|
+
List: qt,
|
|
4506
|
+
Item: bt,
|
|
4507
|
+
Empty: Xt,
|
|
4508
|
+
Clear: St,
|
|
4509
|
+
Group: De,
|
|
4510
|
+
GroupLabel: Me,
|
|
4511
|
+
Collection: Ve,
|
|
4512
|
+
Status: Fs,
|
|
4513
|
+
useFilter: A.useFilter,
|
|
4514
|
+
useAsync: Os
|
|
4055
4515
|
};
|
|
4056
|
-
function
|
|
4516
|
+
function Gs(t) {
|
|
4057
4517
|
const {
|
|
4058
4518
|
items: e,
|
|
4059
4519
|
placeholder: s,
|
|
@@ -4064,18 +4524,18 @@ function hs(t) {
|
|
|
4064
4524
|
value: l,
|
|
4065
4525
|
defaultValue: m,
|
|
4066
4526
|
onValueChange: u
|
|
4067
|
-
} = t, w = r ??
|
|
4068
|
-
/* @__PURE__ */ a(
|
|
4069
|
-
/* @__PURE__ */ a(
|
|
4070
|
-
const
|
|
4071
|
-
return /* @__PURE__ */ a(
|
|
4527
|
+
} = t, w = r ?? ut, p = Ne(e) ? (f) => /* @__PURE__ */ d(De, { items: f.items, children: [
|
|
4528
|
+
/* @__PURE__ */ a(Me, { children: f.label }),
|
|
4529
|
+
/* @__PURE__ */ a(Ve, { children: (b) => {
|
|
4530
|
+
const h = w(b);
|
|
4531
|
+
return /* @__PURE__ */ a(bt, { value: h.label, children: h.render ?? h.label }, h.key ?? h.label);
|
|
4072
4532
|
} })
|
|
4073
|
-
] },
|
|
4074
|
-
const b = w(
|
|
4075
|
-
return /* @__PURE__ */ a(
|
|
4533
|
+
] }, f.label) : (f) => {
|
|
4534
|
+
const b = w(f);
|
|
4535
|
+
return /* @__PURE__ */ a(bt, { value: b.label, children: b.render ?? b.label }, b.key ?? b.label);
|
|
4076
4536
|
};
|
|
4077
4537
|
return /* @__PURE__ */ a("div", { className: o, children: /* @__PURE__ */ d(
|
|
4078
|
-
|
|
4538
|
+
Ut,
|
|
4079
4539
|
{
|
|
4080
4540
|
items: e,
|
|
4081
4541
|
value: l,
|
|
@@ -4083,21 +4543,21 @@ function hs(t) {
|
|
|
4083
4543
|
onValueChange: u,
|
|
4084
4544
|
disabled: i,
|
|
4085
4545
|
children: [
|
|
4086
|
-
/* @__PURE__ */ d(
|
|
4087
|
-
/* @__PURE__ */ a(
|
|
4088
|
-
/* @__PURE__ */ a(
|
|
4089
|
-
/* @__PURE__ */ a(
|
|
4546
|
+
/* @__PURE__ */ d(Kt, { children: [
|
|
4547
|
+
/* @__PURE__ */ a(Nt, { placeholder: s }),
|
|
4548
|
+
/* @__PURE__ */ a(St, {}),
|
|
4549
|
+
/* @__PURE__ */ a(Ct, {})
|
|
4090
4550
|
] }),
|
|
4091
|
-
/* @__PURE__ */ d(
|
|
4092
|
-
/* @__PURE__ */ a(
|
|
4093
|
-
/* @__PURE__ */ a(
|
|
4551
|
+
/* @__PURE__ */ d(Yt, { children: [
|
|
4552
|
+
/* @__PURE__ */ a(Xt, { children: n }),
|
|
4553
|
+
/* @__PURE__ */ a(qt, { children: p })
|
|
4094
4554
|
] })
|
|
4095
4555
|
]
|
|
4096
4556
|
}
|
|
4097
4557
|
) });
|
|
4098
4558
|
}
|
|
4099
|
-
|
|
4100
|
-
function
|
|
4559
|
+
Gs.displayName = "Autocomplete";
|
|
4560
|
+
function js(t) {
|
|
4101
4561
|
const {
|
|
4102
4562
|
fetcher: e,
|
|
4103
4563
|
placeholder: s,
|
|
@@ -4109,14 +4569,14 @@ function fs(t) {
|
|
|
4109
4569
|
value: m,
|
|
4110
4570
|
defaultValue: u,
|
|
4111
4571
|
onValueChange: w
|
|
4112
|
-
} = t, p =
|
|
4113
|
-
(
|
|
4114
|
-
p.onValueChange(
|
|
4572
|
+
} = t, p = Os({ fetcher: e }), f = o ?? ut, b = v.useCallback(
|
|
4573
|
+
(h) => {
|
|
4574
|
+
p.onValueChange(h), w?.(h);
|
|
4115
4575
|
},
|
|
4116
4576
|
[p, w]
|
|
4117
4577
|
);
|
|
4118
4578
|
return /* @__PURE__ */ a("div", { className: i, children: /* @__PURE__ */ d(
|
|
4119
|
-
|
|
4579
|
+
Ut,
|
|
4120
4580
|
{
|
|
4121
4581
|
items: p.items,
|
|
4122
4582
|
value: m !== void 0 ? m : p.value,
|
|
@@ -4125,73 +4585,81 @@ function fs(t) {
|
|
|
4125
4585
|
filter: null,
|
|
4126
4586
|
disabled: l,
|
|
4127
4587
|
children: [
|
|
4128
|
-
/* @__PURE__ */ d(
|
|
4129
|
-
/* @__PURE__ */ a(
|
|
4130
|
-
/* @__PURE__ */ a(
|
|
4131
|
-
/* @__PURE__ */ a(
|
|
4588
|
+
/* @__PURE__ */ d(Kt, { children: [
|
|
4589
|
+
/* @__PURE__ */ a(Nt, { placeholder: s }),
|
|
4590
|
+
/* @__PURE__ */ a(St, {}),
|
|
4591
|
+
/* @__PURE__ */ a(Ct, {})
|
|
4132
4592
|
] }),
|
|
4133
|
-
/* @__PURE__ */ d(
|
|
4134
|
-
/* @__PURE__ */ a(
|
|
4135
|
-
/* @__PURE__ */ a(
|
|
4136
|
-
const g = h
|
|
4137
|
-
return /* @__PURE__ */ a(
|
|
4593
|
+
/* @__PURE__ */ d(Yt, { children: [
|
|
4594
|
+
/* @__PURE__ */ a(Xt, { children: p.loading ? r : n }),
|
|
4595
|
+
/* @__PURE__ */ a(qt, { children: (h) => {
|
|
4596
|
+
const g = f(h);
|
|
4597
|
+
return /* @__PURE__ */ a(bt, { value: g.label, children: g.render ?? g.label }, g.key ?? g.label);
|
|
4138
4598
|
} })
|
|
4139
4599
|
] })
|
|
4140
4600
|
]
|
|
4141
4601
|
}
|
|
4142
4602
|
) });
|
|
4143
4603
|
}
|
|
4144
|
-
|
|
4145
|
-
const
|
|
4146
|
-
Async:
|
|
4147
|
-
Parts:
|
|
4604
|
+
js.displayName = "Autocomplete.Async";
|
|
4605
|
+
const Ai = Object.assign(Gs, {
|
|
4606
|
+
Async: js,
|
|
4607
|
+
Parts: Ao
|
|
4148
4608
|
});
|
|
4149
4609
|
export {
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4610
|
+
yi as ActionPanel,
|
|
4611
|
+
vi as ActivityCard,
|
|
4612
|
+
pa as AppShell,
|
|
4613
|
+
pi as AuthProvider,
|
|
4614
|
+
Ai as Autocomplete,
|
|
4615
|
+
te as Avatar,
|
|
4616
|
+
Vr as Badge,
|
|
4617
|
+
ft as Button,
|
|
4618
|
+
tt as Card,
|
|
4619
|
+
Ri as Combobox,
|
|
4620
|
+
ui as CommandPalette,
|
|
4621
|
+
dr as DefaultSidebar,
|
|
4622
|
+
xi as DescriptionCard,
|
|
4623
|
+
X as Dialog,
|
|
4624
|
+
Si as Field,
|
|
4625
|
+
Ti as Fieldset,
|
|
4626
|
+
fo as Form,
|
|
4627
|
+
Hn as Input,
|
|
4628
|
+
ss as Layout,
|
|
4629
|
+
Di as Link,
|
|
4630
|
+
ki as Menu,
|
|
4631
|
+
Ni as MetricCard,
|
|
4632
|
+
Ii as Select,
|
|
4633
|
+
B as Sheet,
|
|
4634
|
+
li as SidebarGroup,
|
|
4635
|
+
ii as SidebarItem,
|
|
4636
|
+
di as SidebarLayout,
|
|
4637
|
+
ci as SidebarSeparator,
|
|
4638
|
+
Ci as Table,
|
|
4639
|
+
$ as Tooltip,
|
|
4640
|
+
wi as WithGuard,
|
|
4641
|
+
Zr as avatarVariants,
|
|
4642
|
+
Pr as badgeVariants,
|
|
4643
|
+
bn as buttonVariants,
|
|
4644
|
+
mi as createAuthClient,
|
|
4645
|
+
gi as createTypedPaths,
|
|
4646
|
+
Nn as defineI18nLabels,
|
|
4647
|
+
ri as defineModule,
|
|
4648
|
+
oi as defineResource,
|
|
4649
|
+
si as hidden,
|
|
4650
|
+
ai as pass,
|
|
4651
|
+
ni as redirectTo,
|
|
4652
|
+
sa as useAppShell,
|
|
4185
4653
|
K as useAppShellConfig,
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4654
|
+
ei as useAppShellData,
|
|
4655
|
+
fi as useAuth,
|
|
4656
|
+
hi as useAuthSuspense,
|
|
4657
|
+
Mi as useLocation,
|
|
4658
|
+
Vi as useNavigate,
|
|
4659
|
+
or as usePageMeta,
|
|
4660
|
+
Ei as useParams,
|
|
4661
|
+
_i as useRouteError,
|
|
4662
|
+
zi as useSearchParams,
|
|
4663
|
+
En as useTheme,
|
|
4664
|
+
bi as useToast
|
|
4197
4665
|
};
|