@tailor-platform/app-shell 1.15.0 → 1.17.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-core.css +1 -1
- package/dist/app-shell.d.ts +811 -131
- package/dist/app-shell.js +7155 -5797
- package/dist/{appshell-DLVBFo5J.js → appshell-CahhZy7v.js} +656 -524
- package/dist/semantic-contrast.test.ts +154 -0
- package/dist/style-entry.d.ts +147 -92
- package/dist/testing.d.ts +152 -95
- package/dist/testing.js +1 -1
- package/dist/theme-bridge.test.ts +101 -1
- package/dist/theme.bridge.css +91 -0
- package/dist/theme.css +6 -1
- package/dist/themes/_template.css +7 -1
- package/dist/themes/bloom.css +0 -6
- package/dist/themes/cream.css +0 -6
- package/dist/themes/default.css +389 -69
- package/dist/vite-plugin.d.ts +147 -92
- package/package.json +8 -8
- package/skills/app-shell-patterns/SKILL.md +108 -19
- package/skills/app-shell-patterns/references/api/create-ai-gateway-client.md +115 -0
- package/skills/app-shell-patterns/references/api/create-typed-paths.md +117 -0
- package/skills/app-shell-patterns/references/api/define-i18n-labels.md +143 -0
- package/skills/app-shell-patterns/references/api/define-module.md +247 -0
- package/skills/app-shell-patterns/references/api/define-resource.md +307 -0
- package/skills/app-shell-patterns/references/api/guards/hidden.md +202 -0
- package/skills/app-shell-patterns/references/api/guards/overview.md +354 -0
- package/skills/app-shell-patterns/references/api/guards/pass.md +129 -0
- package/skills/app-shell-patterns/references/api/guards/redirect-to.md +307 -0
- package/skills/app-shell-patterns/references/api/router/use-location.md +240 -0
- package/skills/app-shell-patterns/references/api/router/use-navigate.md +138 -0
- package/skills/app-shell-patterns/references/api/router/use-params.md +218 -0
- package/skills/app-shell-patterns/references/api/use-ai-chat.md +110 -0
- package/skills/app-shell-patterns/references/api/use-app-shell-config.md +132 -0
- package/skills/app-shell-patterns/references/api/use-app-shell-data.md +150 -0
- package/skills/app-shell-patterns/references/api/use-app-shell.md +150 -0
- package/skills/app-shell-patterns/references/api/use-auth.md +145 -0
- package/skills/app-shell-patterns/references/api/use-override-breadcrumb.md +74 -0
- package/skills/app-shell-patterns/references/api/use-page-meta.md +96 -0
- package/skills/app-shell-patterns/references/api/use-register-command-palette-actions.md +90 -0
- package/skills/app-shell-patterns/references/api/use-resolved-locale.md +67 -0
- package/skills/app-shell-patterns/references/api/use-route-error.md +214 -0
- package/skills/app-shell-patterns/references/api/use-theme.md +108 -0
- package/skills/app-shell-patterns/references/api/use-time-zone.md +80 -0
- package/skills/app-shell-patterns/references/api/use-toast.md +104 -0
- package/skills/app-shell-patterns/references/components/action-panel.md +168 -0
- package/skills/app-shell-patterns/references/components/activity-card.md +142 -0
- package/skills/app-shell-patterns/references/components/ai-chat.md +315 -0
- package/skills/app-shell-patterns/references/components/alert.md +202 -0
- package/skills/app-shell-patterns/references/components/app-shell.md +530 -0
- package/skills/app-shell-patterns/references/components/appearance-switcher.md +87 -0
- package/skills/app-shell-patterns/references/components/attachment.md +138 -0
- package/skills/app-shell-patterns/references/components/autocomplete.md +278 -0
- package/skills/app-shell-patterns/references/components/avatar.md +80 -0
- package/skills/app-shell-patterns/references/components/badge.md +309 -0
- package/skills/app-shell-patterns/references/components/button.md +164 -0
- package/skills/app-shell-patterns/references/components/card.md +181 -0
- package/skills/app-shell-patterns/references/components/checkbox.md +169 -0
- package/skills/app-shell-patterns/references/components/combobox.md +318 -0
- package/skills/app-shell-patterns/references/components/command-palette.md +413 -0
- package/skills/app-shell-patterns/references/components/csv-importer.md +214 -0
- package/skills/app-shell-patterns/references/components/data-table.md +1168 -0
- package/skills/app-shell-patterns/references/components/date-picker.md +259 -0
- package/skills/app-shell-patterns/references/components/default-header.md +75 -0
- package/skills/app-shell-patterns/references/components/default-sidebar.md +136 -0
- package/skills/app-shell-patterns/references/components/description-card.md +569 -0
- package/skills/app-shell-patterns/references/components/dialog.md +164 -0
- package/skills/app-shell-patterns/references/components/document-progress-card.md +154 -0
- package/skills/app-shell-patterns/references/components/filter-rail.md +165 -0
- package/skills/app-shell-patterns/references/components/form.md +378 -0
- package/skills/app-shell-patterns/references/components/global-header-layout.md +132 -0
- package/skills/app-shell-patterns/references/components/grid.md +184 -0
- package/skills/app-shell-patterns/references/components/input.md +83 -0
- package/skills/app-shell-patterns/references/components/layout.md +539 -0
- package/skills/app-shell-patterns/references/components/menu.md +218 -0
- package/skills/app-shell-patterns/references/components/metric-card.md +94 -0
- package/skills/app-shell-patterns/references/components/select.md +283 -0
- package/skills/app-shell-patterns/references/components/sheet.md +237 -0
- package/skills/app-shell-patterns/references/components/sidebar-group.md +472 -0
- package/skills/app-shell-patterns/references/components/sidebar-item.md +458 -0
- package/skills/app-shell-patterns/references/components/sidebar-layout.md +258 -0
- package/skills/app-shell-patterns/references/components/sidebar-section.md +114 -0
- package/skills/app-shell-patterns/references/components/spinner.md +81 -0
- package/skills/app-shell-patterns/references/components/table.md +188 -0
- package/skills/app-shell-patterns/references/components/tabs.md +158 -0
- package/skills/app-shell-patterns/references/components/textarea.md +122 -0
- package/skills/app-shell-patterns/references/components/timeline.md +317 -0
- package/skills/app-shell-patterns/references/components/toolbar.md +138 -0
- package/skills/app-shell-patterns/references/components/tooltip.md +144 -0
- package/skills/app-shell-patterns/references/components/with-guard.md +445 -0
- package/skills/app-shell-patterns/references/concepts/authentication.md +301 -0
- package/skills/app-shell-patterns/references/concepts/custom-components.md +59 -0
- package/skills/app-shell-patterns/references/concepts/file-based-routing.md +356 -0
- package/skills/app-shell-patterns/references/{fundamental → concepts}/graphql.md +31 -18
- package/skills/app-shell-patterns/references/concepts/modules-and-resources.md +229 -0
- package/skills/app-shell-patterns/references/concepts/routing-navigation.md +425 -0
- package/skills/app-shell-patterns/references/concepts/sidebar-navigation.md +420 -0
- package/skills/app-shell-patterns/references/concepts/styling-theming.md +785 -0
- package/skills/app-shell-patterns/references/migrations.md +55 -0
- package/skills/app-shell-patterns/references/pages/{detail.md → document-detail.md} +10 -33
- package/skills/app-shell-patterns/references/patterns/form-composer.md +43 -45
- package/skills/app-shell-patterns/references/patterns/form-modal.md +37 -92
- package/skills/app-shell-patterns/references/patterns/form-sectioned.md +12 -38
- package/skills/app-shell-patterns/references/patterns/form-single-page.md +11 -32
- package/skills/app-shell-patterns/references/patterns/form-wizard.md +12 -53
- package/skills/app-shell-patterns/references/patterns/interaction-confirm.md +11 -27
- package/skills/app-shell-patterns/references/patterns/interaction-multi-select.md +136 -139
- package/skills/app-shell-patterns/references/patterns/interaction-toast.md +10 -34
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +13 -88
- package/skills/app-shell-patterns/references/fundamental/components.md +0 -1009
- package/skills/app-shell-patterns/references/fundamental/design-system.md +0 -440
|
@@ -1,30 +1,151 @@
|
|
|
1
1
|
import { capitalCase as e } from "change-case";
|
|
2
2
|
import { Await as t, Link as n, NavLink as r, Navigate as i, Outlet as a, createBrowserRouter as o, createMemoryRouter as s, isRouteErrorResponse as c, matchRoutes as l, redirect as u, useLocation as d, useMatch as f, useNavigate as p, useRouteError as m, useRouteLoaderData as h } from "react-router";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
3
|
+
import * as g from "react";
|
|
4
|
+
import { Suspense as _, createContext as v, useCallback as y, useContext as b, useEffect as x, useId as S, useMemo as C, useReducer as w, useRef as T, useState as E, useSyncExternalStore as D } from "react";
|
|
5
|
+
import { cva as O } from "class-variance-authority";
|
|
6
|
+
import { useRender as k } from "@base-ui/react/use-render";
|
|
7
|
+
import { clsx as A } from "clsx";
|
|
8
|
+
import { extendTailwindMerge as j } from "tailwind-merge";
|
|
9
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
10
|
+
import { AlertCircle as ee, ChevronRight as te, HouseIcon as ne, SearchIcon as re, Table as ie, XIcon as ae } from "lucide-react";
|
|
11
|
+
import { getLocalTimeZone as oe, now as se, today as ce } from "@internationalized/date";
|
|
12
|
+
import { RouterProvider as le } from "react-router/dom";
|
|
13
|
+
import { Toaster as ue } from "sonner";
|
|
14
|
+
import { Dialog as F } from "@base-ui/react/dialog";
|
|
15
|
+
import { parsePath as de } from "@tailor-platform/vite-plugin-app-shell/parser";
|
|
15
16
|
//#region src/lib/utils.ts
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
var fe = j({ extend: { classGroups: { "font-size": [{ text: [
|
|
18
|
+
"heading-lg",
|
|
19
|
+
"heading-md",
|
|
20
|
+
"heading-sm",
|
|
21
|
+
"body-md",
|
|
22
|
+
"body-sm",
|
|
23
|
+
"label-md",
|
|
24
|
+
"label-sm",
|
|
25
|
+
"code-sm",
|
|
26
|
+
"body-md-relaxed",
|
|
27
|
+
"body-sm-relaxed"
|
|
28
|
+
] }] } } });
|
|
29
|
+
function I(...e) {
|
|
30
|
+
return fe(A(e));
|
|
18
31
|
}
|
|
19
32
|
//#endregion
|
|
20
|
-
//#region src/components/
|
|
21
|
-
|
|
33
|
+
//#region src/components/internals/separator/separator.tsx
|
|
34
|
+
function pe({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
|
|
35
|
+
return /* @__PURE__ */ N("div", {
|
|
36
|
+
"data-slot": "separator-root",
|
|
37
|
+
role: n ? "none" : "separator",
|
|
38
|
+
"aria-orientation": n ? void 0 : t,
|
|
39
|
+
"data-orientation": t,
|
|
40
|
+
className: I("astw:bg-border astw:shrink-0", t === "horizontal" ? "astw:h-px astw:w-full" : "astw:h-full astw:w-px", e),
|
|
41
|
+
...r
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/toolbar/toolbar.tsx
|
|
46
|
+
var me = g.createContext(null), he = typeof document > "u" ? g.useEffect : g.useLayoutEffect;
|
|
47
|
+
function L(...e) {
|
|
48
|
+
return (t) => {
|
|
49
|
+
for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function ge(e, t = {}) {
|
|
53
|
+
let n = g.useContext(me), { handlesDirectionalKeys: r = !1 } = t;
|
|
54
|
+
he(() => {
|
|
55
|
+
let t = e.current;
|
|
56
|
+
if (!(!n || !t)) return n.registerItem(t, { handlesDirectionalKeys: r }), () => n.unregisterItem(t);
|
|
57
|
+
}, [n, e]), he(() => {
|
|
58
|
+
let t = e.current;
|
|
59
|
+
n && t && n.updateItem(t, { handlesDirectionalKeys: r });
|
|
60
|
+
}, [
|
|
61
|
+
n,
|
|
62
|
+
e,
|
|
63
|
+
r
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
function _e(e) {
|
|
67
|
+
return e.isConnected && e.tabIndex >= 0 && !e.matches(":disabled") && e.getAttribute("aria-disabled") !== "true";
|
|
68
|
+
}
|
|
69
|
+
function ve({ className: e, ...t }) {
|
|
70
|
+
return /* @__PURE__ */ N("div", {
|
|
71
|
+
"data-slot": "toolbar",
|
|
72
|
+
className: I("astw:flex astw:w-full astw:flex-col astw:gap-2 astw:rounded-md astw:border astw:border-border astw:bg-card astw:p-2", e),
|
|
73
|
+
...t
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
ve.displayName = "Toolbar.Root";
|
|
77
|
+
function ye({ className: e, justify: t = "start", onKeyDown: n, ref: r, ...i }) {
|
|
78
|
+
let a = g.useRef(null), o = g.useRef(/* @__PURE__ */ new Map()), s = g.useCallback((e, t) => {
|
|
79
|
+
o.current.set(e, t);
|
|
80
|
+
}, []), c = g.useCallback((e) => {
|
|
81
|
+
o.current.delete(e);
|
|
82
|
+
}, []), l = g.useCallback((e, t) => {
|
|
83
|
+
o.current.has(e) && o.current.set(e, t);
|
|
84
|
+
}, []), u = g.useMemo(() => ({
|
|
85
|
+
registerItem: s,
|
|
86
|
+
unregisterItem: c,
|
|
87
|
+
updateItem: l
|
|
88
|
+
}), [
|
|
89
|
+
s,
|
|
90
|
+
c,
|
|
91
|
+
l
|
|
92
|
+
]);
|
|
93
|
+
return /* @__PURE__ */ N(me.Provider, {
|
|
94
|
+
value: u,
|
|
95
|
+
children: /* @__PURE__ */ N("div", {
|
|
96
|
+
ref: L(a, r),
|
|
97
|
+
"data-slot": "toolbar-row",
|
|
98
|
+
role: "toolbar",
|
|
99
|
+
tabIndex: -1,
|
|
100
|
+
"aria-orientation": "horizontal",
|
|
101
|
+
className: I("astw:flex astw:min-w-0 astw:flex-wrap astw:items-center astw:gap-2", t === "between" && "astw:justify-between", e),
|
|
102
|
+
onKeyDown: (e) => {
|
|
103
|
+
if (n?.(e), e.defaultPrevented || ![
|
|
104
|
+
"ArrowLeft",
|
|
105
|
+
"ArrowRight",
|
|
106
|
+
"Home",
|
|
107
|
+
"End"
|
|
108
|
+
].includes(e.key)) return;
|
|
109
|
+
let t = Array.from(o.current).filter(([e]) => a.current?.contains(e) && _e(e)).toSorted(([e], [t]) => e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1), r = t.findIndex(([e]) => e === document.activeElement);
|
|
110
|
+
if (r === -1 || t[r][1].handlesDirectionalKeys) return;
|
|
111
|
+
let i = r;
|
|
112
|
+
e.key === "Home" && (i = 0), e.key === "End" && (i = t.length - 1), e.key === "ArrowLeft" && (i = (r - 1 + t.length) % t.length), e.key === "ArrowRight" && (i = (r + 1) % t.length), e.preventDefault(), t[i]?.[0].focus();
|
|
113
|
+
},
|
|
114
|
+
...i
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
ye.displayName = "Toolbar.Row";
|
|
119
|
+
function be({ className: e, ...t }) {
|
|
120
|
+
return /* @__PURE__ */ N("div", {
|
|
121
|
+
"data-slot": "toolbar-group",
|
|
122
|
+
className: I("astw:flex astw:min-w-0 astw:flex-wrap astw:items-center astw:gap-1.5", e),
|
|
123
|
+
...t
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
be.displayName = "Toolbar.Group";
|
|
127
|
+
function xe({ className: e, ...t }) {
|
|
128
|
+
return /* @__PURE__ */ N(pe, {
|
|
129
|
+
"data-slot": "toolbar-separator",
|
|
130
|
+
decorative: !1,
|
|
131
|
+
orientation: "vertical",
|
|
132
|
+
className: I("astw:h-6", e),
|
|
133
|
+
...t
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
xe.displayName = "Toolbar.Separator";
|
|
137
|
+
var Se = {
|
|
138
|
+
Root: ve,
|
|
139
|
+
Row: ye,
|
|
140
|
+
Group: be,
|
|
141
|
+
Separator: xe
|
|
142
|
+
}, Ce = O("astw:inline-flex astw:cursor-pointer 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", {
|
|
22
143
|
variants: {
|
|
23
144
|
variant: {
|
|
24
145
|
default: "astw:bg-primary astw:text-primary-foreground astw:shadow-xs astw:hover:bg-primary/90",
|
|
25
146
|
destructive: "astw:bg-destructive astw:text-white astw:shadow-xs astw:hover:bg-destructive/90 astw:focus-visible:ring-destructive/20 astw:dark:focus-visible:ring-destructive/40 astw:dark:bg-destructive/60",
|
|
26
|
-
outline: "astw:border astw:border-border astw:bg-
|
|
27
|
-
secondary: "astw:bg-secondary astw:text-secondary-foreground astw:
|
|
147
|
+
outline: "astw:border astw:border-border astw:bg-transparent astw:hover:bg-accent astw:hover:text-accent-foreground astw:dark:bg-input/30 astw:dark:border-input astw:dark:hover:bg-input/50",
|
|
148
|
+
secondary: "astw:bg-secondary astw:text-secondary-foreground astw:hover:bg-secondary/80",
|
|
28
149
|
ghost: "astw:hover:bg-accent astw:hover:text-accent-foreground astw:dark:hover:bg-accent/50",
|
|
29
150
|
link: "astw:text-primary astw:underline-offset-4 astw:hover:underline"
|
|
30
151
|
},
|
|
@@ -41,23 +162,27 @@ var le = g("astw:inline-flex astw:cursor-pointer astw:items-center astw:justify-
|
|
|
41
162
|
size: "default"
|
|
42
163
|
}
|
|
43
164
|
});
|
|
44
|
-
function
|
|
45
|
-
|
|
165
|
+
function R({ className: e, variant: t, size: n, render: r, children: i, ref: a, ...o }) {
|
|
166
|
+
let s = g.useRef(null);
|
|
167
|
+
return ge(s), k({
|
|
46
168
|
defaultTagName: "button",
|
|
47
169
|
render: r,
|
|
170
|
+
ref: L(s, a),
|
|
48
171
|
props: {
|
|
49
172
|
"data-slot": "button",
|
|
50
|
-
className:
|
|
173
|
+
className: I(Ce({
|
|
51
174
|
variant: t,
|
|
52
175
|
size: n,
|
|
53
176
|
className: e
|
|
54
177
|
})),
|
|
55
178
|
children: i,
|
|
56
|
-
...
|
|
179
|
+
...o
|
|
57
180
|
}
|
|
58
181
|
});
|
|
59
182
|
}
|
|
60
|
-
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/lib/i18n.ts
|
|
185
|
+
var we = Symbol("localized-label"), Te = () => {
|
|
61
186
|
try {
|
|
62
187
|
if (typeof navigator > "u") return "en";
|
|
63
188
|
let e = navigator.languages?.[0] ?? navigator.language;
|
|
@@ -65,61 +190,61 @@ var ue = () => {
|
|
|
65
190
|
} catch {
|
|
66
191
|
return "en";
|
|
67
192
|
}
|
|
68
|
-
},
|
|
193
|
+
}, Ee = () => {
|
|
69
194
|
try {
|
|
70
195
|
return typeof navigator > "u" ? "en" : navigator.languages?.[0] ?? navigator.language ?? "en";
|
|
71
196
|
} catch {
|
|
72
197
|
return "en";
|
|
73
198
|
}
|
|
74
|
-
},
|
|
199
|
+
}, De = (e) => {
|
|
75
200
|
try {
|
|
76
201
|
return new Intl.Locale(e).language;
|
|
77
202
|
} catch {
|
|
78
203
|
return e;
|
|
79
204
|
}
|
|
80
|
-
},
|
|
81
|
-
let n =
|
|
205
|
+
}, z = (e) => (t, n) => t ? typeof t == "string" ? t : t(e) ?? n : n, Oe = (t) => {
|
|
206
|
+
let n = z(t);
|
|
82
207
|
return (t, r) => n(t, typeof t == "string" ? t : e(r));
|
|
83
|
-
},
|
|
208
|
+
}, ke = (e) => ({
|
|
84
209
|
modules: e.modules,
|
|
85
210
|
settingsResources: e.settingsResources ?? [],
|
|
86
|
-
errorBoundary: e.errorBoundary ?? /* @__PURE__ */
|
|
211
|
+
errorBoundary: e.errorBoundary ?? /* @__PURE__ */ N(U, {}),
|
|
87
212
|
basePath: e.basePath,
|
|
88
|
-
locale: e.locale ?
|
|
89
|
-
resolvedLocale: e.locale ??
|
|
213
|
+
locale: e.locale ? De(e.locale) : Te(),
|
|
214
|
+
resolvedLocale: e.locale ?? Ee(),
|
|
90
215
|
timeZone: e.timeZone
|
|
91
|
-
}),
|
|
216
|
+
}), B = v({ configurations: {
|
|
92
217
|
modules: [],
|
|
93
218
|
settingsResources: [],
|
|
94
219
|
locale: "en",
|
|
95
220
|
errorBoundary: null
|
|
96
|
-
} }),
|
|
97
|
-
let e =
|
|
221
|
+
} }), Ae = v({ contextData: {} }), V = () => b(B), je = () => b(Ae), Me = () => {
|
|
222
|
+
let e = b(B), t = b(Ae);
|
|
98
223
|
return {
|
|
99
224
|
...e,
|
|
100
225
|
...t
|
|
101
226
|
};
|
|
102
|
-
},
|
|
103
|
-
let { configurations: e } =
|
|
227
|
+
}, Ne = () => {
|
|
228
|
+
let { configurations: e } = b(B);
|
|
104
229
|
return {
|
|
105
230
|
locale: e.resolvedLocale ?? e.locale,
|
|
106
231
|
language: e.locale
|
|
107
232
|
};
|
|
108
|
-
},
|
|
109
|
-
let { configurations: e } =
|
|
233
|
+
}, Pe = () => {
|
|
234
|
+
let { configurations: e } = b(B), t = e.timeZone ?? oe();
|
|
110
235
|
return {
|
|
111
236
|
value: t,
|
|
112
|
-
today: () =>
|
|
113
|
-
now: () =>
|
|
237
|
+
today: () => ce(t),
|
|
238
|
+
now: () => se(t)
|
|
114
239
|
};
|
|
115
|
-
},
|
|
116
|
-
let { configurations: e } =
|
|
240
|
+
}, Fe = () => {
|
|
241
|
+
let { configurations: e } = V(), t = z(e.locale);
|
|
117
242
|
return (e, n) => t(e, n);
|
|
118
|
-
},
|
|
243
|
+
}, Ie = (e) => {
|
|
119
244
|
let t = (t) => (n) => e[t]?.[n] ?? e.en[n];
|
|
120
245
|
return {
|
|
121
246
|
useT: () => {
|
|
122
|
-
let { configurations: n } =
|
|
247
|
+
let { configurations: n } = V(), r = t(n.locale), i = ((e, ...t) => {
|
|
123
248
|
let n = r(e);
|
|
124
249
|
return typeof n == "function" ? n(t[0]) : n;
|
|
125
250
|
});
|
|
@@ -128,12 +253,12 @@ var ue = () => {
|
|
|
128
253
|
return i === void 0 || typeof i == "function" ? r : i;
|
|
129
254
|
}, i;
|
|
130
255
|
},
|
|
131
|
-
t: (e, ...n) => (r) => {
|
|
256
|
+
t: (e, ...n) => Object.assign((r) => {
|
|
132
257
|
let i = t(r)(e);
|
|
133
258
|
return typeof i == "function" ? i(n[0]) : i;
|
|
134
|
-
}
|
|
259
|
+
}, { [we]: !0 })
|
|
135
260
|
};
|
|
136
|
-
},
|
|
261
|
+
}, Le = Ie({
|
|
137
262
|
en: {
|
|
138
263
|
home: "Home",
|
|
139
264
|
error404Title: "404 Not Found",
|
|
@@ -232,26 +357,26 @@ var ue = () => {
|
|
|
232
357
|
aiChatToolResult: "結果",
|
|
233
358
|
aiChatSourcesUsed: (e) => `${e.count} 件の出典を使用`
|
|
234
359
|
}
|
|
235
|
-
}),
|
|
236
|
-
let e = m(), t =
|
|
360
|
+
}), H = Le.useT, U = () => {
|
|
361
|
+
let e = m(), t = H(), n = {
|
|
237
362
|
role: "alert",
|
|
238
363
|
"aria-label": "default-error-boundary"
|
|
239
364
|
};
|
|
240
|
-
if (c(e) && e.status === 404) return /* @__PURE__ */
|
|
365
|
+
if (c(e) && e.status === 404) return /* @__PURE__ */ N("div", {
|
|
241
366
|
...n,
|
|
242
367
|
className: "astw:p-6",
|
|
243
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ P("div", {
|
|
244
369
|
className: "astw:flex astw:items-start astw:gap-4",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ N(ee, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ P("div", { children: [
|
|
371
|
+
/* @__PURE__ */ N("h1", {
|
|
247
372
|
className: "astw:font-semibold astw:text-lg",
|
|
248
373
|
children: t("error404Title")
|
|
249
374
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ N("p", {
|
|
251
376
|
className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
|
|
252
377
|
children: t("error404Body")
|
|
253
378
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ N(R, {
|
|
255
380
|
variant: "outline",
|
|
256
381
|
size: "sm",
|
|
257
382
|
className: "astw:mt-4",
|
|
@@ -262,21 +387,21 @@ var ue = () => {
|
|
|
262
387
|
})
|
|
263
388
|
});
|
|
264
389
|
let r = e instanceof Error ? e.message : t("errorUnexpected");
|
|
265
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ N("div", {
|
|
266
391
|
...n,
|
|
267
392
|
className: "astw:p-6",
|
|
268
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ P("div", {
|
|
269
394
|
className: "astw:flex astw:items-start astw:gap-4",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ N(ee, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ P("div", { children: [
|
|
396
|
+
/* @__PURE__ */ N("h1", {
|
|
272
397
|
className: "astw:font-semibold astw:text-lg",
|
|
273
398
|
children: t("errorTitle")
|
|
274
399
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ N("p", {
|
|
276
401
|
className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
|
|
277
402
|
children: r
|
|
278
403
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ N(R, {
|
|
280
405
|
variant: "outline",
|
|
281
406
|
size: "sm",
|
|
282
407
|
className: "astw:mt-4",
|
|
@@ -286,37 +411,37 @@ var ue = () => {
|
|
|
286
411
|
] })]
|
|
287
412
|
})
|
|
288
413
|
});
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
},
|
|
414
|
+
}, Re = {}, ze = (e) => {
|
|
415
|
+
Re = e;
|
|
416
|
+
}, Be = () => ({ type: "pass" }), Ve = () => ({ type: "hidden" }), He = (e) => ({
|
|
292
417
|
type: "redirect",
|
|
293
418
|
to: e
|
|
294
|
-
}),
|
|
419
|
+
}), W = () => new Response("Not Found", { status: 404 }), G = async (e) => {
|
|
295
420
|
if (!e || e.length === 0) return { type: "pass" };
|
|
296
|
-
let t = { context:
|
|
421
|
+
let t = { context: Re };
|
|
297
422
|
for (let n of e) {
|
|
298
423
|
let e = await n(t);
|
|
299
424
|
if (e.type !== "pass") return e;
|
|
300
425
|
}
|
|
301
426
|
return { type: "pass" };
|
|
302
|
-
},
|
|
303
|
-
let r = await
|
|
427
|
+
}, K = (e, t) => async (n) => {
|
|
428
|
+
let r = await G(e);
|
|
304
429
|
switch (r.type) {
|
|
305
|
-
case "hidden": throw
|
|
430
|
+
case "hidden": throw W();
|
|
306
431
|
case "redirect": return u(r.to);
|
|
307
432
|
case "pass": return t ? t(n) : null;
|
|
308
433
|
}
|
|
309
|
-
},
|
|
310
|
-
let { configurations: n } =
|
|
311
|
-
return t(
|
|
434
|
+
}, Ue = (t) => t === "" || t === "/" ? Le.t("home") : e(t), We = (e, t) => () => {
|
|
435
|
+
let { configurations: n } = V(), { metaTitle: r, fallbackTitle: i } = e;
|
|
436
|
+
return t(z(n.locale)(r, typeof i == "function" ? i(n.locale) : i));
|
|
312
437
|
};
|
|
313
|
-
function
|
|
314
|
-
let { path: t, meta: n, component: r, resources: i, errorBoundary: a, guards: o } = e, s = n?.title ??
|
|
438
|
+
function Ge(e) {
|
|
439
|
+
let { path: t, meta: n, component: r, resources: i, errorBoundary: a, guards: o } = e, s = n?.title ?? Ue(t), c = Ue(t), l = o && o.length > 0 ? K(o) : void 0;
|
|
315
440
|
return {
|
|
316
441
|
path: t,
|
|
317
442
|
type: "component",
|
|
318
443
|
_type: "module",
|
|
319
|
-
component: r ?
|
|
444
|
+
component: r ? We({
|
|
320
445
|
metaTitle: s,
|
|
321
446
|
fallbackTitle: c
|
|
322
447
|
}, (e) => r({
|
|
@@ -332,12 +457,12 @@ function Ae(e) {
|
|
|
332
457
|
icon: e.meta?.icon
|
|
333
458
|
},
|
|
334
459
|
resources: i,
|
|
335
|
-
errorBoundary: a || /* @__PURE__ */
|
|
460
|
+
errorBoundary: a || /* @__PURE__ */ N(U, {}),
|
|
336
461
|
guards: o
|
|
337
462
|
};
|
|
338
463
|
}
|
|
339
|
-
function
|
|
340
|
-
let { path: n, component: r, subResources: i, meta: a, errorBoundary: o, guards: s } = t, c = a?.title ?? e(n), l = e(n), u = s && s.length > 0 ?
|
|
464
|
+
function Ke(t) {
|
|
465
|
+
let { path: n, component: r, subResources: i, meta: a, errorBoundary: o, guards: s } = t, c = a?.title ?? e(n), l = e(n), u = s && s.length > 0 ? K(s) : void 0, d = r ? We({
|
|
341
466
|
metaTitle: c,
|
|
342
467
|
fallbackTitle: l
|
|
343
468
|
}, (e) => r({
|
|
@@ -355,14 +480,14 @@ function je(t) {
|
|
|
355
480
|
},
|
|
356
481
|
component: d,
|
|
357
482
|
subResources: i,
|
|
358
|
-
errorBoundary: o ?? /* @__PURE__ */
|
|
483
|
+
errorBoundary: o ?? /* @__PURE__ */ N(U, {}),
|
|
359
484
|
guards: s,
|
|
360
485
|
loader: u
|
|
361
486
|
};
|
|
362
487
|
}
|
|
363
|
-
var
|
|
488
|
+
var qe = {
|
|
364
489
|
name: "@tailor-platform/app-shell",
|
|
365
|
-
version: "1.
|
|
490
|
+
version: "1.17.0",
|
|
366
491
|
description: "An opinionated React application framework for building ERP applications on Tailor Platform",
|
|
367
492
|
keywords: [
|
|
368
493
|
"app-shell",
|
|
@@ -412,9 +537,9 @@ var Me = {
|
|
|
412
537
|
},
|
|
413
538
|
dependencies: {
|
|
414
539
|
"@base-ui/react": "1.8.0",
|
|
415
|
-
"@internationalized/date": "3.12.
|
|
540
|
+
"@internationalized/date": "3.12.4",
|
|
416
541
|
"@standard-schema/spec": "^1.1.0",
|
|
417
|
-
"@tailor-platform/auth-public-client": "^0.
|
|
542
|
+
"@tailor-platform/auth-public-client": "^0.7.0",
|
|
418
543
|
"@tailor-platform/vite-plugin-app-shell": "workspace:*",
|
|
419
544
|
"change-case": "^5.4.4",
|
|
420
545
|
"class-variance-authority": "^0.7.1",
|
|
@@ -424,7 +549,7 @@ var Me = {
|
|
|
424
549
|
openai: "6.45.0",
|
|
425
550
|
papaparse: "^5.5.3",
|
|
426
551
|
"react-router": "^8.3.0",
|
|
427
|
-
sonner: "^2.0.
|
|
552
|
+
sonner: "^2.0.8",
|
|
428
553
|
"tailwind-merge": "^3.6.0"
|
|
429
554
|
},
|
|
430
555
|
devDependencies: {
|
|
@@ -439,8 +564,8 @@ var Me = {
|
|
|
439
564
|
"@types/react": "catalog:",
|
|
440
565
|
"@types/react-dom": "catalog:",
|
|
441
566
|
"@vitejs/plugin-react": "catalog:",
|
|
442
|
-
"@vitest/coverage-v8": "4.1.
|
|
443
|
-
"happy-dom": "20.
|
|
567
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
568
|
+
"happy-dom": "20.14.5",
|
|
444
569
|
postcss: "8.5.28",
|
|
445
570
|
react: "catalog:",
|
|
446
571
|
"react-dom": "catalog:",
|
|
@@ -459,26 +584,26 @@ var Me = {
|
|
|
459
584
|
};
|
|
460
585
|
//#endregion
|
|
461
586
|
//#region src/components/card/card.tsx
|
|
462
|
-
function
|
|
463
|
-
return /* @__PURE__ */
|
|
587
|
+
function Je({ className: e, ...t }) {
|
|
588
|
+
return /* @__PURE__ */ N("div", {
|
|
464
589
|
"data-slot": "card",
|
|
465
|
-
className:
|
|
590
|
+
className: I("astw:bg-card astw:text-card-foreground astw:flex astw:flex-col astw:rounded-xl astw:border astw:border-border astw:shadow-xs", e),
|
|
466
591
|
...t
|
|
467
592
|
});
|
|
468
593
|
}
|
|
469
|
-
|
|
470
|
-
function
|
|
471
|
-
return /* @__PURE__ */
|
|
594
|
+
Je.displayName = "Card.Root";
|
|
595
|
+
function Ye({ className: e, title: t, description: n, children: r, ...i }) {
|
|
596
|
+
return /* @__PURE__ */ P("div", {
|
|
472
597
|
"data-slot": "card-header",
|
|
473
|
-
className:
|
|
598
|
+
className: I("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", e),
|
|
474
599
|
...i,
|
|
475
600
|
children: [
|
|
476
|
-
t && /* @__PURE__ */
|
|
601
|
+
t && /* @__PURE__ */ N("h3", {
|
|
477
602
|
"data-slot": "card-title",
|
|
478
603
|
className: "astw:text-lg astw:font-semibold astw:leading-none astw:text-card-foreground",
|
|
479
604
|
children: t
|
|
480
605
|
}),
|
|
481
|
-
n && /* @__PURE__ */
|
|
606
|
+
n && /* @__PURE__ */ N("div", {
|
|
482
607
|
"data-slot": "card-description",
|
|
483
608
|
className: "astw:text-muted-foreground astw:text-sm",
|
|
484
609
|
children: n
|
|
@@ -487,33 +612,35 @@ function Pe({ className: e, title: t, description: n, children: r, ...i }) {
|
|
|
487
612
|
]
|
|
488
613
|
});
|
|
489
614
|
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
615
|
+
Ye.displayName = "Card.Header";
|
|
616
|
+
var Xe = I("astw:first:rounded-t-[inherit] astw:last:rounded-b-[inherit]", "astw:[&>[data-slot=table-container]]:rounded-[inherit]", "astw:[&>[data-slot=data-table]]:rounded-[inherit] astw:[&>[data-slot=data-table]]:border-0");
|
|
617
|
+
function Ze({ className: e, padding: t = "default", ...n }) {
|
|
618
|
+
return /* @__PURE__ */ N("div", {
|
|
493
619
|
"data-slot": "card-content",
|
|
494
|
-
|
|
495
|
-
|
|
620
|
+
"data-padding": t,
|
|
621
|
+
className: I(t === "none" ? Xe : "astw:px-6 astw:pb-6 astw:first:pt-6", e),
|
|
622
|
+
...n
|
|
496
623
|
});
|
|
497
624
|
}
|
|
498
|
-
|
|
499
|
-
var
|
|
500
|
-
Root:
|
|
501
|
-
Header:
|
|
502
|
-
Content:
|
|
503
|
-
},
|
|
504
|
-
let [t, n] =
|
|
625
|
+
Ze.displayName = "Card.Content";
|
|
626
|
+
var Qe = {
|
|
627
|
+
Root: Je,
|
|
628
|
+
Header: Ye,
|
|
629
|
+
Content: Ze
|
|
630
|
+
}, $e = v(null), et = ({ children: e }) => {
|
|
631
|
+
let [t, n] = E(() => /* @__PURE__ */ new Map()), r = y((e, t) => {
|
|
505
632
|
n((n) => {
|
|
506
633
|
let r = new Map(n);
|
|
507
634
|
return r.set(e, t), r;
|
|
508
635
|
});
|
|
509
|
-
}, []), i =
|
|
636
|
+
}, []), i = y((e) => {
|
|
510
637
|
n((t) => {
|
|
511
638
|
if (!t.has(e)) return t;
|
|
512
639
|
let n = new Map(t);
|
|
513
640
|
return n.delete(e), n;
|
|
514
641
|
});
|
|
515
642
|
}, []);
|
|
516
|
-
return /* @__PURE__ */
|
|
643
|
+
return /* @__PURE__ */ N($e.Provider, {
|
|
517
644
|
value: {
|
|
518
645
|
overrides: t,
|
|
519
646
|
register: r,
|
|
@@ -521,16 +648,16 @@ var Ie = {
|
|
|
521
648
|
},
|
|
522
649
|
children: e
|
|
523
650
|
});
|
|
524
|
-
},
|
|
525
|
-
let e =
|
|
651
|
+
}, tt = () => {
|
|
652
|
+
let e = b($e);
|
|
526
653
|
if (!e) throw Error("useBreadcrumbOverride must be used within BreadcrumbOverrideProvider");
|
|
527
654
|
return e;
|
|
528
|
-
},
|
|
655
|
+
}, nt = () => b($e);
|
|
529
656
|
//#endregion
|
|
530
657
|
//#region src/hooks/use-override-breadcrumb.ts
|
|
531
|
-
function
|
|
532
|
-
let t = d(), { register: n, unregister: r } =
|
|
533
|
-
|
|
658
|
+
function rt(e) {
|
|
659
|
+
let t = d(), { register: n, unregister: r } = tt(), i = t.pathname;
|
|
660
|
+
x(() => (e ? n(i, e) : r(i), () => r(i)), [
|
|
534
661
|
i,
|
|
535
662
|
e,
|
|
536
663
|
n,
|
|
@@ -539,25 +666,25 @@ function Ve(e) {
|
|
|
539
666
|
}
|
|
540
667
|
//#endregion
|
|
541
668
|
//#region src/components/internals/app-info/app-info.tsx
|
|
542
|
-
var
|
|
669
|
+
var it = "__appinfo", at = `/${it}`, ot = qe.version, st = (e) => e == null ? "-" : String(e), ct = (e) => e.map((e) => `${e.label}: ${st(e.value)}`).join("\n"), lt = ({ label: e, value: t }) => /* @__PURE__ */ P("div", {
|
|
543
670
|
className: "astw:grid astw:gap-1 astw:py-3 astw:sm:grid-cols-[12rem_minmax(0,1fr)] astw:sm:gap-4",
|
|
544
|
-
children: [/* @__PURE__ */
|
|
671
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
545
672
|
className: "astw:text-sm astw:text-muted-foreground",
|
|
546
673
|
children: e
|
|
547
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ N("dd", {
|
|
548
675
|
className: "astw:min-w-0 astw:text-sm astw:break-all",
|
|
549
|
-
children:
|
|
676
|
+
children: st(t)
|
|
550
677
|
})]
|
|
551
|
-
}),
|
|
552
|
-
let e =
|
|
678
|
+
}), ut = () => {
|
|
679
|
+
let e = H();
|
|
553
680
|
return {
|
|
554
|
-
path:
|
|
681
|
+
path: at,
|
|
555
682
|
title: e("appInfoTitle"),
|
|
556
683
|
breadcrumb: [e("appInfoTitle")]
|
|
557
684
|
};
|
|
558
|
-
},
|
|
559
|
-
let e =
|
|
560
|
-
|
|
685
|
+
}, dt = () => {
|
|
686
|
+
let e = H(), { title: t, appInfo: n } = V();
|
|
687
|
+
rt(e("appInfoTitle"));
|
|
561
688
|
let r = [
|
|
562
689
|
...t ? [{
|
|
563
690
|
label: e("appInfoAppName"),
|
|
@@ -565,37 +692,37 @@ var He = "__appinfo", Ue = `/${He}`, We = Me.version, Ge = (e) => e == null ? "-
|
|
|
565
692
|
}] : [],
|
|
566
693
|
{
|
|
567
694
|
label: e("appInfoAppShellVersion"),
|
|
568
|
-
value:
|
|
695
|
+
value: ot
|
|
569
696
|
},
|
|
570
697
|
...n?.metadata ?? []
|
|
571
698
|
];
|
|
572
|
-
return /* @__PURE__ */
|
|
699
|
+
return /* @__PURE__ */ N("div", {
|
|
573
700
|
className: "astw:w-full astw:max-w-xl",
|
|
574
|
-
children: /* @__PURE__ */
|
|
701
|
+
children: /* @__PURE__ */ P(Qe.Root, { children: [/* @__PURE__ */ P("div", {
|
|
575
702
|
className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:pt-6 astw:pb-4",
|
|
576
|
-
children: [/* @__PURE__ */
|
|
703
|
+
children: [/* @__PURE__ */ N("h1", {
|
|
577
704
|
className: "astw:text-lg astw:font-semibold astw:leading-none",
|
|
578
705
|
children: e("appInfoTitle")
|
|
579
|
-
}), /* @__PURE__ */
|
|
706
|
+
}), /* @__PURE__ */ N(R, {
|
|
580
707
|
variant: "outline",
|
|
581
708
|
size: "sm",
|
|
582
709
|
onClick: async () => {
|
|
583
710
|
try {
|
|
584
|
-
await navigator.clipboard.writeText(
|
|
711
|
+
await navigator.clipboard.writeText(ct(r));
|
|
585
712
|
} catch {}
|
|
586
713
|
},
|
|
587
714
|
children: e("appInfoCopy")
|
|
588
715
|
})]
|
|
589
|
-
}), /* @__PURE__ */
|
|
716
|
+
}), /* @__PURE__ */ N(Qe.Content, { children: /* @__PURE__ */ N("dl", { children: r.map((e, t) => /* @__PURE__ */ N("div", {
|
|
590
717
|
className: t > 0 ? "astw:border-t astw:border-border" : void 0,
|
|
591
|
-
children: /* @__PURE__ */
|
|
718
|
+
children: /* @__PURE__ */ N(lt, { ...e })
|
|
592
719
|
}, `${e.label}-${t}`)) }) })] })
|
|
593
720
|
});
|
|
594
|
-
},
|
|
721
|
+
}, ft = [
|
|
595
722
|
"light",
|
|
596
723
|
"dark",
|
|
597
724
|
"system"
|
|
598
|
-
],
|
|
725
|
+
], pt = [
|
|
599
726
|
{
|
|
600
727
|
value: "light",
|
|
601
728
|
label: "Light"
|
|
@@ -608,8 +735,8 @@ var He = "__appinfo", Ue = `/${He}`, We = Me.version, Ge = (e) => e == null ? "-
|
|
|
608
735
|
value: "system",
|
|
609
736
|
label: "System"
|
|
610
737
|
}
|
|
611
|
-
],
|
|
612
|
-
function
|
|
738
|
+
], mt = "appshell-ui-theme";
|
|
739
|
+
function ht(e, t, n) {
|
|
613
740
|
if (typeof window > "u") return n;
|
|
614
741
|
try {
|
|
615
742
|
let r = localStorage.getItem(e);
|
|
@@ -618,22 +745,22 @@ function $e(e, t, n) {
|
|
|
618
745
|
return n;
|
|
619
746
|
}
|
|
620
747
|
}
|
|
621
|
-
function
|
|
748
|
+
function gt(e, t) {
|
|
622
749
|
return e === "system" ? t ? "dark" : "light" : e;
|
|
623
750
|
}
|
|
624
|
-
function
|
|
751
|
+
function _t() {
|
|
625
752
|
return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
626
753
|
}
|
|
627
|
-
var
|
|
628
|
-
function
|
|
629
|
-
let [n, r] =
|
|
754
|
+
var vt = v(void 0);
|
|
755
|
+
function yt({ children: e, defaultColorTheme: t = "system" }) {
|
|
756
|
+
let [n, r] = E(() => ht(mt, ft, t)), [i, a] = E(() => gt(ht(mt, ft, t), _t())), o = y((e) => {
|
|
630
757
|
let t = window.document.documentElement;
|
|
631
758
|
t.classList.remove("light", "dark"), t.classList.add(e);
|
|
632
759
|
}, []);
|
|
633
|
-
|
|
760
|
+
x(() => {
|
|
634
761
|
o(i);
|
|
635
762
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => {
|
|
636
|
-
let t =
|
|
763
|
+
let t = gt(n, e.matches);
|
|
637
764
|
a(t);
|
|
638
765
|
};
|
|
639
766
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
@@ -642,14 +769,14 @@ function rt({ children: e, defaultColorTheme: t = "system" }) {
|
|
|
642
769
|
i,
|
|
643
770
|
o
|
|
644
771
|
]);
|
|
645
|
-
let s =
|
|
772
|
+
let s = y((e) => {
|
|
646
773
|
try {
|
|
647
|
-
localStorage.setItem(
|
|
774
|
+
localStorage.setItem(mt, e);
|
|
648
775
|
} catch {}
|
|
649
776
|
r(e);
|
|
650
|
-
let t =
|
|
777
|
+
let t = gt(e, _t());
|
|
651
778
|
a(t), o(t);
|
|
652
|
-
}, [o]), c =
|
|
779
|
+
}, [o]), c = C(() => ({
|
|
653
780
|
colorTheme: n,
|
|
654
781
|
resolvedColorTheme: i,
|
|
655
782
|
setColorTheme: s
|
|
@@ -658,16 +785,16 @@ function rt({ children: e, defaultColorTheme: t = "system" }) {
|
|
|
658
785
|
i,
|
|
659
786
|
s
|
|
660
787
|
]);
|
|
661
|
-
return /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ N(vt.Provider, {
|
|
662
789
|
value: c,
|
|
663
790
|
children: e
|
|
664
791
|
});
|
|
665
792
|
}
|
|
666
|
-
var
|
|
667
|
-
let e =
|
|
793
|
+
var bt = () => {
|
|
794
|
+
let e = b(vt);
|
|
668
795
|
if (e === void 0) throw Error("useTheme must be used within a ThemeProvider");
|
|
669
796
|
let { colorTheme: t, resolvedColorTheme: n, setColorTheme: r } = e;
|
|
670
|
-
return
|
|
797
|
+
return C(() => ({
|
|
671
798
|
theme: t,
|
|
672
799
|
resolvedTheme: n,
|
|
673
800
|
setTheme: r
|
|
@@ -676,9 +803,9 @@ var it = () => {
|
|
|
676
803
|
n,
|
|
677
804
|
r
|
|
678
805
|
]);
|
|
679
|
-
},
|
|
680
|
-
let { resolvedTheme: t } =
|
|
681
|
-
return /* @__PURE__ */
|
|
806
|
+
}, xt = ({ ...e }) => {
|
|
807
|
+
let { resolvedTheme: t } = bt();
|
|
808
|
+
return /* @__PURE__ */ N(ue, {
|
|
682
809
|
theme: t,
|
|
683
810
|
className: "astw:toaster astw:group",
|
|
684
811
|
style: {
|
|
@@ -688,41 +815,41 @@ var it = () => {
|
|
|
688
815
|
},
|
|
689
816
|
...e
|
|
690
817
|
});
|
|
691
|
-
},
|
|
692
|
-
let e =
|
|
693
|
-
return /* @__PURE__ */
|
|
818
|
+
}, St = () => {
|
|
819
|
+
let e = H();
|
|
820
|
+
return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("p", {
|
|
694
821
|
className: "astw:font-semibold astw:leading-none astw:tracking-tight",
|
|
695
822
|
children: e("welcomeTitle")
|
|
696
|
-
}), /* @__PURE__ */
|
|
823
|
+
}), /* @__PURE__ */ N("p", {
|
|
697
824
|
className: "pt-4",
|
|
698
825
|
children: e("welcomeBody")
|
|
699
826
|
})] });
|
|
700
|
-
},
|
|
701
|
-
let { configurations: e } =
|
|
702
|
-
return /* @__PURE__ */
|
|
827
|
+
}, Ct = () => /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(a, {}), /* @__PURE__ */ N(xt, {})] }), wt = () => {
|
|
828
|
+
let { configurations: e } = Me(), t = H(), n = Fe();
|
|
829
|
+
return /* @__PURE__ */ P("div", {
|
|
703
830
|
className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full",
|
|
704
|
-
children: [/* @__PURE__ */
|
|
831
|
+
children: [/* @__PURE__ */ N("div", { children: /* @__PURE__ */ P("nav", {
|
|
705
832
|
className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:border-border astw:p-3 astw:shadow-xs",
|
|
706
|
-
children: [/* @__PURE__ */
|
|
833
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
707
834
|
className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ",
|
|
708
835
|
children: t("settings")
|
|
709
|
-
}), /* @__PURE__ */
|
|
836
|
+
}), /* @__PURE__ */ N("ul", {
|
|
710
837
|
className: "astw:flex astw:flex-col astw:gap-1",
|
|
711
|
-
children: e.settingsResources.map((e) => /* @__PURE__ */
|
|
838
|
+
children: e.settingsResources.map((e) => /* @__PURE__ */ N("li", { children: /* @__PURE__ */ N(r, {
|
|
712
839
|
to: `./${e.path}`,
|
|
713
|
-
children: ({ isActive: t }) => /* @__PURE__ */
|
|
840
|
+
children: ({ isActive: t }) => /* @__PURE__ */ P(R, {
|
|
714
841
|
variant: t ? "secondary" : "ghost",
|
|
715
842
|
className: "astw:w-full astw:justify-start",
|
|
716
843
|
children: [e.meta.icon, n(e.meta.title, e.path)]
|
|
717
844
|
})
|
|
718
845
|
}) }, e.path))
|
|
719
846
|
})]
|
|
720
|
-
}) }), /* @__PURE__ */
|
|
847
|
+
}) }), /* @__PURE__ */ N("section", {
|
|
721
848
|
className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:border-border astw:shadow-xs",
|
|
722
|
-
children: /* @__PURE__ */
|
|
849
|
+
children: /* @__PURE__ */ N(a, {})
|
|
723
850
|
})]
|
|
724
851
|
});
|
|
725
|
-
},
|
|
852
|
+
}, Tt = (e) => () => /* @__PURE__ */ N(M, { children: e }), Et = (e) => e.component ? {
|
|
726
853
|
index: !0,
|
|
727
854
|
Component: e.component,
|
|
728
855
|
...e.loader && { loader: e.loader }
|
|
@@ -732,71 +859,74 @@ var it = () => {
|
|
|
732
859
|
loader: async (t) => {
|
|
733
860
|
let n = await e.loader(t);
|
|
734
861
|
if (n instanceof Response) return n;
|
|
735
|
-
throw
|
|
862
|
+
throw W();
|
|
736
863
|
}
|
|
737
864
|
} : {
|
|
738
865
|
index: !0,
|
|
739
866
|
Component: () => null,
|
|
740
867
|
loader: () => {
|
|
741
|
-
throw
|
|
868
|
+
throw W();
|
|
742
869
|
}
|
|
743
|
-
},
|
|
744
|
-
let r = e.errorBoundary || n, i = (t ?? []).map((e) =>
|
|
870
|
+
}, Dt = (e, t, n) => {
|
|
871
|
+
let r = e.errorBoundary || n, i = (t ?? []).map((e) => Dt(e, e.subResources, r)), a = [Et(e), ...i];
|
|
745
872
|
return {
|
|
746
873
|
path: e.path,
|
|
747
874
|
handle: { node: e },
|
|
748
|
-
...e.errorBoundary && { ErrorBoundary:
|
|
875
|
+
...e.errorBoundary && { ErrorBoundary: Tt(e.errorBoundary) },
|
|
749
876
|
...a.length > 0 ? { children: a } : {}
|
|
750
877
|
};
|
|
751
|
-
},
|
|
752
|
-
let n = e.some((e) => e.path === "") ? null :
|
|
878
|
+
}, Ot = (e) => e.map((e) => Dt(e, e.resources, e.errorBoundary)), kt = ({ modules: e, settingsResources: t }) => {
|
|
879
|
+
let n = e.some((e) => e.path === "") ? null : Et({
|
|
753
880
|
path: "",
|
|
754
|
-
component:
|
|
881
|
+
component: St
|
|
755
882
|
}), r = t.length > 0 ? [{
|
|
756
883
|
path: "settings",
|
|
757
884
|
index: !0,
|
|
758
|
-
Component: () => /* @__PURE__ */
|
|
885
|
+
Component: () => /* @__PURE__ */ N(i, {
|
|
759
886
|
to: t[0].path,
|
|
760
887
|
relative: "path",
|
|
761
888
|
replace: !0
|
|
762
889
|
})
|
|
763
890
|
}, {
|
|
764
891
|
path: "settings",
|
|
765
|
-
Component:
|
|
892
|
+
Component: wt,
|
|
766
893
|
children: t.map((e) => {
|
|
767
894
|
if (!e.component) throw Error(`Settings resource "${e.path}" must have a component.`);
|
|
768
895
|
return {
|
|
769
896
|
path: e.path,
|
|
770
897
|
Component: e.component,
|
|
771
|
-
...e.errorBoundary && { ErrorBoundary:
|
|
898
|
+
...e.errorBoundary && { ErrorBoundary: Tt(e.errorBoundary) }
|
|
772
899
|
};
|
|
773
900
|
})
|
|
774
901
|
}] : [];
|
|
775
902
|
return [
|
|
776
903
|
...n ? [n] : [],
|
|
777
|
-
{ children:
|
|
904
|
+
{ children: Ot(e) },
|
|
778
905
|
{
|
|
779
|
-
path:
|
|
780
|
-
Component:
|
|
906
|
+
path: it,
|
|
907
|
+
Component: dt
|
|
781
908
|
},
|
|
782
909
|
...r,
|
|
783
910
|
{
|
|
784
911
|
path: "*",
|
|
785
912
|
loader: () => {
|
|
786
|
-
throw
|
|
913
|
+
throw W();
|
|
787
914
|
},
|
|
788
915
|
Component: () => null,
|
|
789
|
-
ErrorBoundary:
|
|
916
|
+
ErrorBoundary: U
|
|
790
917
|
}
|
|
791
918
|
];
|
|
792
|
-
},
|
|
793
|
-
function
|
|
919
|
+
}, q = (e) => e.startsWith(":") ? e.slice(1) : null, At = (e) => e.split("/").some((e) => q(e) !== null);
|
|
920
|
+
function jt(e, t) {
|
|
794
921
|
if (!t.trim()) return e;
|
|
795
922
|
let n = t.toLowerCase();
|
|
796
923
|
return e.filter((e) => e.title.toLowerCase().includes(n) || e.path.toLowerCase().includes(n));
|
|
797
924
|
}
|
|
798
|
-
var
|
|
799
|
-
let
|
|
925
|
+
var Mt = (e, t, n) => {
|
|
926
|
+
let r = typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(we in e.breadcrumbTitle ? n : t) : e.breadcrumbTitle;
|
|
927
|
+
return typeof r == "function" ? z(n)(r, e.title) : r ?? e.title;
|
|
928
|
+
}, Nt = (e, t) => {
|
|
929
|
+
let n = Oe(t);
|
|
800
930
|
return e.reduce((e, t) => {
|
|
801
931
|
let r = n(t.meta.title, t.path);
|
|
802
932
|
e[t.path] = {
|
|
@@ -817,8 +947,8 @@ var gt = (e, t) => typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(t)
|
|
|
817
947
|
return t.resources && t.resources.length > 0 && i(t.resources, t.path), e;
|
|
818
948
|
}, {});
|
|
819
949
|
};
|
|
820
|
-
function
|
|
821
|
-
let i = e.split("/").filter((e) => e !== ""), a = t && i[0] === t ? i.slice(1) : i, o =
|
|
950
|
+
function Pt(e, t, n, r) {
|
|
951
|
+
let i = e.split("/").filter((e) => e !== ""), a = t && i[0] === t ? i.slice(1) : i, o = Nt(n, r);
|
|
822
952
|
if (a.length === 0) {
|
|
823
953
|
let e = o[""];
|
|
824
954
|
if (e) return {
|
|
@@ -826,26 +956,26 @@ function vt(e, t, n, r) {
|
|
|
826
956
|
segments: [{
|
|
827
957
|
segment: "",
|
|
828
958
|
path: "",
|
|
829
|
-
title:
|
|
959
|
+
title: Mt(e, "", r),
|
|
830
960
|
clickable: e.clickable
|
|
831
961
|
}]
|
|
832
962
|
};
|
|
833
963
|
}
|
|
834
964
|
let s = a.map((e, t) => {
|
|
835
|
-
let n = a.slice(0, t + 1).join("/"),
|
|
836
|
-
if (!
|
|
965
|
+
let n = a.slice(0, t + 1).join("/"), i = o[n];
|
|
966
|
+
if (!i) {
|
|
837
967
|
let e = Object.entries(o).find(([e]) => {
|
|
838
|
-
let t = e.split("/").map((e) =>
|
|
968
|
+
let t = e.split("/").map((e) => q(e) === null ? e : "[^/]+").join("/");
|
|
839
969
|
return RegExp(`^${t}$`).test(n);
|
|
840
970
|
})?.[1];
|
|
841
|
-
e && (
|
|
971
|
+
e && (i = e);
|
|
842
972
|
}
|
|
843
|
-
let
|
|
844
|
-
return
|
|
973
|
+
let s;
|
|
974
|
+
return s = i ? Mt(i, e, r) : decodeURIComponent(e), {
|
|
845
975
|
segment: e,
|
|
846
976
|
path: n,
|
|
847
|
-
title:
|
|
848
|
-
clickable:
|
|
977
|
+
title: s,
|
|
978
|
+
clickable: i?.clickable ?? !0
|
|
849
979
|
};
|
|
850
980
|
});
|
|
851
981
|
return {
|
|
@@ -855,14 +985,14 @@ function vt(e, t, n, r) {
|
|
|
855
985
|
}
|
|
856
986
|
//#endregion
|
|
857
987
|
//#region src/routing/navigation.tsx
|
|
858
|
-
var
|
|
859
|
-
loaderID:
|
|
860
|
-
loader: async () => ({ navItems:
|
|
861
|
-
}),
|
|
862
|
-
let t =
|
|
988
|
+
var Ft = "appshell-root-nav", It = (e) => ({
|
|
989
|
+
loaderID: Ft,
|
|
990
|
+
loader: async () => ({ navItems: Rt(e) })
|
|
991
|
+
}), Lt = () => h(Ft)?.navItems, Rt = async (e) => {
|
|
992
|
+
let t = Oe(e.locale);
|
|
863
993
|
return (await Promise.all(e.modules.map(async (e) => {
|
|
864
|
-
if (
|
|
865
|
-
let n = await
|
|
994
|
+
if (q(e.path) !== null || (await G(e.guards)).type !== "pass") return null;
|
|
995
|
+
let n = await zt(e.resources, e.path, t);
|
|
866
996
|
return n.length === 0 && !e.meta.menuItemClickable ? null : {
|
|
867
997
|
module: e,
|
|
868
998
|
resources: n
|
|
@@ -870,73 +1000,73 @@ var yt = "appshell-root-nav", bt = (e) => ({
|
|
|
870
1000
|
}))).filter((e) => e !== null).map(({ module: e, resources: n }) => ({
|
|
871
1001
|
title: t(e.meta.title, e.path),
|
|
872
1002
|
url: e.meta.menuItemClickable ? e.path || "/" : void 0,
|
|
873
|
-
icon: e.meta.icon || /* @__PURE__ */
|
|
1003
|
+
icon: e.meta.icon || /* @__PURE__ */ N(ie, {}),
|
|
874
1004
|
items: n
|
|
875
1005
|
}));
|
|
876
|
-
},
|
|
877
|
-
if (
|
|
878
|
-
let r = `${t}/${e.path}`, i = n(e.meta.title, e.path), a = e.component !== void 0, o = e.subResources ? await
|
|
1006
|
+
}, zt = async (e, t, n) => (await Promise.all(e.map(async (e) => {
|
|
1007
|
+
if (q(e.path) !== null || (await G(e.guards)).type !== "pass") return null;
|
|
1008
|
+
let r = `${t}/${e.path}`, i = n(e.meta.title, e.path), a = e.component !== void 0, o = e.subResources ? await zt(e.subResources, r, n) : void 0, s = o && o.length > 0;
|
|
879
1009
|
return !a && !s ? null : {
|
|
880
1010
|
title: i,
|
|
881
1011
|
url: a ? r : void 0,
|
|
882
1012
|
items: s ? o : void 0
|
|
883
1013
|
};
|
|
884
|
-
}))).filter((e) => e !== null),
|
|
885
|
-
let n =
|
|
1014
|
+
}))).filter((e) => e !== null), J = (e) => e.split("/").filter((e) => e !== ""), Bt = (e, t) => {
|
|
1015
|
+
let n = J(e), r = t && n[0] === t ? n.slice(1) : n;
|
|
886
1016
|
return r.length > 0 ? `/${r.join("/")}` : "/";
|
|
887
|
-
},
|
|
888
|
-
let n =
|
|
1017
|
+
}, Vt = (e) => e.join("/") || "/", Ht = 8, Ut = (e, t) => J(e).map((e) => {
|
|
1018
|
+
let n = q(e);
|
|
889
1019
|
if (n === null) return e;
|
|
890
1020
|
let r = t[n] ?? "";
|
|
891
|
-
return r.length >
|
|
892
|
-
}),
|
|
893
|
-
let i =
|
|
1021
|
+
return r.length > Ht ? `${r.slice(0, Ht)}...` : r;
|
|
1022
|
+
}), Wt = async ({ modules: e, locale: t, basePath: n, pathname: r }) => {
|
|
1023
|
+
let i = Oe(t), a = l(kt({
|
|
894
1024
|
modules: e,
|
|
895
1025
|
settingsResources: []
|
|
896
|
-
}),
|
|
1026
|
+
}), Bt(r, n));
|
|
897
1027
|
if (!a) return [];
|
|
898
1028
|
let o = /* @__PURE__ */ new Map(), s = a.map((e) => {
|
|
899
1029
|
let t = e.route.handle;
|
|
900
1030
|
return t?.node ? {
|
|
901
1031
|
node: t.node,
|
|
902
1032
|
params: e.params,
|
|
903
|
-
pathnameBase:
|
|
1033
|
+
pathnameBase: Vt(J(e.pathnameBase))
|
|
904
1034
|
} : null;
|
|
905
1035
|
}).filter((e) => e !== null);
|
|
906
1036
|
for (let [e, t] of s.entries()) {
|
|
907
|
-
if (!
|
|
908
|
-
let n = s.slice(0, e + 1).map(({ node: e }) => i(e.meta.title, e.path)), r = s.slice(0, e + 1).toReversed().find(({ node: e }) => "resources" in e), a = r && "resources" in r.node && r.node.meta.icon || /* @__PURE__ */
|
|
909
|
-
await
|
|
1037
|
+
if (!At(t.node.path)) continue;
|
|
1038
|
+
let n = s.slice(0, e + 1).map(({ node: e }) => i(e.meta.title, e.path)), r = s.slice(0, e + 1).toReversed().find(({ node: e }) => "resources" in e), a = r && "resources" in r.node && r.node.meta.icon || /* @__PURE__ */ N(ie, {});
|
|
1039
|
+
await Gt({
|
|
910
1040
|
node: t.node,
|
|
911
1041
|
params: t.params,
|
|
912
1042
|
icon: a,
|
|
913
|
-
baseSegments:
|
|
914
|
-
baseDisplaySegments: s.slice(0, e + 1).flatMap(({ node: e, params: t }) =>
|
|
1043
|
+
baseSegments: J(t.pathnameBase),
|
|
1044
|
+
baseDisplaySegments: s.slice(0, e + 1).flatMap(({ node: e, params: t }) => Ut(e.path, t)),
|
|
915
1045
|
breadcrumb: n,
|
|
916
1046
|
resolveTitle: i,
|
|
917
1047
|
routeMap: o
|
|
918
1048
|
});
|
|
919
1049
|
}
|
|
920
1050
|
return [...o.values()];
|
|
921
|
-
},
|
|
922
|
-
if ((await
|
|
1051
|
+
}, Gt = async ({ node: e, params: t, icon: n, baseSegments: r, baseDisplaySegments: i, breadcrumb: a, resolveTitle: o, routeMap: s }) => {
|
|
1052
|
+
if ((await G(e.guards)).type !== "pass") return;
|
|
923
1053
|
if ("resources" in e ? e.meta.menuItemClickable : e.component !== void 0) {
|
|
924
|
-
let t =
|
|
1054
|
+
let t = Vt(r);
|
|
925
1055
|
s.set(t, {
|
|
926
1056
|
path: t,
|
|
927
|
-
displayPath:
|
|
1057
|
+
displayPath: Vt(i),
|
|
928
1058
|
title: o(e.meta.title, e.path),
|
|
929
1059
|
icon: n,
|
|
930
1060
|
breadcrumb: a
|
|
931
1061
|
});
|
|
932
1062
|
}
|
|
933
1063
|
let c = "resources" in e ? e.resources : e.subResources;
|
|
934
|
-
if (!(!c || c.length === 0)) for (let e of c)
|
|
1064
|
+
if (!(!c || c.length === 0)) for (let e of c) At(e.path) || await Gt({
|
|
935
1065
|
node: e,
|
|
936
1066
|
params: t,
|
|
937
1067
|
icon: n,
|
|
938
|
-
baseSegments: [...r, ...
|
|
939
|
-
baseDisplaySegments: [...i, ...
|
|
1068
|
+
baseSegments: [...r, ...J(e.path)],
|
|
1069
|
+
baseDisplaySegments: [...i, ...Ut(e.path, t)],
|
|
940
1070
|
breadcrumb: [...a, o(e.meta.title, e.path)],
|
|
941
1071
|
resolveTitle: o,
|
|
942
1072
|
routeMap: s
|
|
@@ -944,32 +1074,32 @@ var yt = "appshell-root-nav", bt = (e) => ({
|
|
|
944
1074
|
};
|
|
945
1075
|
//#endregion
|
|
946
1076
|
//#region src/components/internals/breadcrumb/breadcrumb.tsx
|
|
947
|
-
function
|
|
948
|
-
return /* @__PURE__ */
|
|
1077
|
+
function Kt({ ...e }) {
|
|
1078
|
+
return /* @__PURE__ */ N("nav", {
|
|
949
1079
|
"aria-label": "breadcrumb",
|
|
950
1080
|
"data-slot": "breadcrumb",
|
|
951
1081
|
...e
|
|
952
1082
|
});
|
|
953
1083
|
}
|
|
954
|
-
function
|
|
955
|
-
return /* @__PURE__ */
|
|
1084
|
+
function qt({ className: e, ...t }) {
|
|
1085
|
+
return /* @__PURE__ */ N("ol", {
|
|
956
1086
|
"data-slot": "breadcrumb-list",
|
|
957
|
-
className:
|
|
1087
|
+
className: I("astw:text-muted-foreground astw:flex astw:flex-wrap astw:items-center astw:gap-1.5 astw:text-sm astw:break-words astw:sm:gap-2.5", e),
|
|
958
1088
|
...t
|
|
959
1089
|
});
|
|
960
1090
|
}
|
|
961
|
-
function
|
|
962
|
-
return /* @__PURE__ */
|
|
1091
|
+
function Jt({ className: e, ...t }) {
|
|
1092
|
+
return /* @__PURE__ */ N("li", {
|
|
963
1093
|
"data-slot": "breadcrumb-item",
|
|
964
|
-
className:
|
|
1094
|
+
className: I("astw:inline-flex astw:items-center astw:gap-1.5", e),
|
|
965
1095
|
...t
|
|
966
1096
|
});
|
|
967
1097
|
}
|
|
968
|
-
function
|
|
969
|
-
let o =
|
|
970
|
-
return
|
|
1098
|
+
function Yt({ render: e, className: t, children: r, to: i, ...a }) {
|
|
1099
|
+
let o = I("astw:hover:text-foreground astw:transition-colors", t);
|
|
1100
|
+
return k({
|
|
971
1101
|
defaultTagName: "a",
|
|
972
|
-
render: e ?? /* @__PURE__ */
|
|
1102
|
+
render: e ?? /* @__PURE__ */ N(n, { to: i }),
|
|
973
1103
|
props: {
|
|
974
1104
|
"data-slot": "breadcrumb-link",
|
|
975
1105
|
className: o,
|
|
@@ -981,52 +1111,52 @@ function Nt({ render: e, className: t, children: r, to: i, ...a }) {
|
|
|
981
1111
|
}
|
|
982
1112
|
});
|
|
983
1113
|
}
|
|
984
|
-
function
|
|
985
|
-
return /* @__PURE__ */
|
|
1114
|
+
function Xt({ className: e, ariaCurrent: t = "location", ...n }) {
|
|
1115
|
+
return /* @__PURE__ */ N("span", {
|
|
986
1116
|
"data-slot": "breadcrumb-page",
|
|
987
1117
|
"aria-disabled": "true",
|
|
988
1118
|
"aria-current": t,
|
|
989
|
-
className:
|
|
1119
|
+
className: I("astw:text-foreground astw:font-normal", e),
|
|
990
1120
|
...n
|
|
991
1121
|
});
|
|
992
1122
|
}
|
|
993
|
-
function
|
|
994
|
-
return /* @__PURE__ */
|
|
1123
|
+
function Zt({ children: e, className: t, ...n }) {
|
|
1124
|
+
return /* @__PURE__ */ N("li", {
|
|
995
1125
|
"data-slot": "breadcrumb-separator",
|
|
996
1126
|
role: "presentation",
|
|
997
1127
|
"aria-hidden": "true",
|
|
998
|
-
className:
|
|
1128
|
+
className: I("astw:[&>svg]:size-3.5", t),
|
|
999
1129
|
...n,
|
|
1000
|
-
children: e ?? /* @__PURE__ */
|
|
1130
|
+
children: e ?? /* @__PURE__ */ N(te, {})
|
|
1001
1131
|
});
|
|
1002
1132
|
}
|
|
1003
1133
|
//#endregion
|
|
1004
1134
|
//#region src/components/sidebar/dynamic-breadcrumb.tsx
|
|
1005
|
-
var
|
|
1006
|
-
let { configurations: e } =
|
|
1007
|
-
return
|
|
1008
|
-
},
|
|
1009
|
-
let { basePath: e, segments: t } =
|
|
1010
|
-
return r ? /* @__PURE__ */
|
|
1135
|
+
var Qt = () => {
|
|
1136
|
+
let { configurations: e } = V();
|
|
1137
|
+
return Pt(d().pathname, e.basePath, e.modules, e.locale);
|
|
1138
|
+
}, $t = () => {
|
|
1139
|
+
let { basePath: e, segments: t } = Qt(), { overrides: n } = tt(), r = f("/:prefix/settings/:suffix"), i = H();
|
|
1140
|
+
return r ? /* @__PURE__ */ N(Kt, { children: /* @__PURE__ */ N(qt, { children: /* @__PURE__ */ N("div", {
|
|
1011
1141
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
1012
|
-
children: /* @__PURE__ */
|
|
1142
|
+
children: /* @__PURE__ */ N(Jt, { children: /* @__PURE__ */ N(Yt, {
|
|
1013
1143
|
to: `/${r.params.prefix}/settings`,
|
|
1014
1144
|
children: i("settings")
|
|
1015
1145
|
}) })
|
|
1016
|
-
}) }) }) : /* @__PURE__ */
|
|
1146
|
+
}) }) }) : /* @__PURE__ */ N(Kt, { children: /* @__PURE__ */ N(qt, { children: t.map((r, i) => {
|
|
1017
1147
|
let a = e ? `/${e}/${r.path}` : `/${r.path}`, o = n.get(a) ?? r.title;
|
|
1018
|
-
return /* @__PURE__ */
|
|
1148
|
+
return /* @__PURE__ */ P("div", {
|
|
1019
1149
|
className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
|
|
1020
|
-
children: [/* @__PURE__ */
|
|
1150
|
+
children: [/* @__PURE__ */ N(Jt, { children: r.clickable ? /* @__PURE__ */ N(Yt, {
|
|
1021
1151
|
to: r.path,
|
|
1022
1152
|
children: o
|
|
1023
|
-
}) : /* @__PURE__ */
|
|
1153
|
+
}) : /* @__PURE__ */ N(Xt, {
|
|
1024
1154
|
ariaCurrent: i === t.length - 1 && "location",
|
|
1025
1155
|
children: o
|
|
1026
|
-
}) }), i < t.length - 1 && /* @__PURE__ */
|
|
1156
|
+
}) }), i < t.length - 1 && /* @__PURE__ */ N(Zt, {})]
|
|
1027
1157
|
}, i);
|
|
1028
1158
|
}) }) });
|
|
1029
|
-
},
|
|
1159
|
+
}, en = [
|
|
1030
1160
|
{
|
|
1031
1161
|
rel: "icon",
|
|
1032
1162
|
type: "image/png",
|
|
@@ -1044,54 +1174,54 @@ var It = () => {
|
|
|
1044
1174
|
sizes: "180x180",
|
|
1045
1175
|
href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAQAElEQVR4AexdCZwU5ZX/v+o5GA4RjDCY9V5Xo8YYE+MRj2jWxANEGAZhAI+ojBzDocCAV1pFGG4ZD06vACMyQBBBcN0oXllRQ9Zdc4hRMSjMjDKIcs3R9fZfKNkAMz1d09XV1T1f/9433VXf9b7/+9dXr95XVWPBfAwCaYSAIXQaGdMMBTCENixIKwQModPKnGYwhtCGA2mFgCF0Wpkz2mBaRp4hdMuwc4sZpSG0j6ZeskRDpaV62Jw5+p2HH9YjnghrKx+7bxFdGUL7YOY5Jdp+9gzt+eVWzMgCluherMqMYGVNB8yfPVO7+6BCi+nCEDphplYJh9WaVapD7Rx8yADpMhsoguKX7PIcBc7ndz+mFXNK9QFAhb+NxImAIXScADZUnbPuSbNLcWduB2wUxUNk6hENldu/TxVFsx5Ez/3b5rv5CBhCA2g+fAfWdPzj2aV6L2ffV6EIAziRKRZpJ4LCWAqaMtERMISOjk9MuU/xAm/uw9qb/vHrJPI9nJFzWTHE5EYuKuPFopsKpuyhCBhCH4pJzHvCYfrID2rengiW2/VYQDJ/P+bKhxbM3rEb+YfuNnvcIGAI7Qatb8sy7JbJC7kTO3fAEroKS7n7Igg4QfNXHGKFcEkc1U1VImAxGXGBgENkuwYTeSH3Gl2LPBdVmyzKNn/cZCFTICoChtBR4fn/TLoXGQzBDSPp3mLk4jbmdGHyWo55+WXN8LrRltReE4RuSVA0PNbHHtN2jFx0y+2IF0nk6SzVkYmTM/96LWx140YcDvNpNgKG0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XbNQqseVl3uzfueGFnY6W8wREaiP1aiO2hp7TtuhPMQqvPIU1nZ4dtN1MJfBhhC+4u36S3BCBhCJxhg07y/CHhNaH+1N70ZBA5CwBD6IEDMZmojYAid2vYz2h+EgCH0QYCYzdRG4P8AAAD//yMEVw4AAAAGSURBVAMA/Nw14Yt9Hn0AAAAASUVORK5CYII="
|
|
1046
1176
|
}
|
|
1047
|
-
],
|
|
1177
|
+
], tn = " · ", nn = "data-app-shell-favicon", rn = (e) => {
|
|
1048
1178
|
if (e.startsWith("data:")) return e.match(/^data:([^;,]+)/)?.[1];
|
|
1049
1179
|
if (e.endsWith(".svg")) return "image/svg+xml";
|
|
1050
1180
|
if (e.endsWith(".png")) return "image/png";
|
|
1051
1181
|
if (e.endsWith(".ico")) return "image/x-icon";
|
|
1052
|
-
},
|
|
1053
|
-
let { title: e, favicon: t } =
|
|
1182
|
+
}, an = () => {
|
|
1183
|
+
let { title: e, favicon: t } = V(), { basePath: n, segments: r } = Qt(), i = nt()?.overrides, a = r.at(-1), o;
|
|
1054
1184
|
if (a) {
|
|
1055
1185
|
let e = n ? `/${n}/${a.path}` : `/${a.path}`;
|
|
1056
1186
|
o = i?.get(e) ?? a.title;
|
|
1057
1187
|
}
|
|
1058
|
-
let s = [o, e].filter(Boolean).join(
|
|
1188
|
+
let s = [o, e].filter(Boolean).join(tn), c = typeof document < "u" && document.head.querySelector(`link[rel~="icon"]:not([${nn}])`), l;
|
|
1059
1189
|
return l = t ? [{
|
|
1060
1190
|
rel: "icon",
|
|
1061
1191
|
href: t,
|
|
1062
|
-
type:
|
|
1063
|
-
}] : c ? [] :
|
|
1192
|
+
type: rn(t)
|
|
1193
|
+
}] : c ? [] : en, /* @__PURE__ */ P(M, { children: [s ? /* @__PURE__ */ N("title", { children: s }) : null, l.map(({ rel: e, href: t, type: n, sizes: r }) => /* @__PURE__ */ N("link", {
|
|
1064
1194
|
rel: e,
|
|
1065
1195
|
href: t,
|
|
1066
1196
|
"data-app-shell-favicon": "",
|
|
1067
1197
|
...n ? { type: n } : {},
|
|
1068
1198
|
...r ? { sizes: r } : {}
|
|
1069
1199
|
}, `${e}-${r ?? "any"}`))] });
|
|
1070
|
-
},
|
|
1071
|
-
let { configurations: t, contentRoutes: n, children: r } = e, { loaderID: i, loader: o } =
|
|
1200
|
+
}, on = (e) => {
|
|
1201
|
+
let { configurations: t, contentRoutes: n, children: r } = e, { loaderID: i, loader: o } = It({
|
|
1072
1202
|
modules: t.modules,
|
|
1073
1203
|
locale: t.locale,
|
|
1074
1204
|
basePath: t.basePath
|
|
1075
1205
|
}), s = t.errorBoundary, c = s ? [{
|
|
1076
|
-
element: /* @__PURE__ */
|
|
1077
|
-
ErrorBoundary:
|
|
1206
|
+
element: /* @__PURE__ */ N(a, {}),
|
|
1207
|
+
ErrorBoundary: Tt(s),
|
|
1078
1208
|
children: n
|
|
1079
1209
|
}] : n;
|
|
1080
1210
|
return {
|
|
1081
1211
|
id: i,
|
|
1082
1212
|
loader: o,
|
|
1083
|
-
element: /* @__PURE__ */
|
|
1213
|
+
element: /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(an, {}), r] }),
|
|
1084
1214
|
children: c,
|
|
1085
1215
|
HydrateFallback: () => null
|
|
1086
1216
|
};
|
|
1087
|
-
},
|
|
1217
|
+
}, sn = {
|
|
1088
1218
|
createBrowserRouter: o,
|
|
1089
1219
|
createMemoryRouter: s
|
|
1090
|
-
},
|
|
1091
|
-
let { children: t } = e, { configurations: n } =
|
|
1220
|
+
}, cn = (e) => {
|
|
1221
|
+
let { children: t } = e, { configurations: n } = V(), r = C(() => kt({
|
|
1092
1222
|
modules: n.modules,
|
|
1093
1223
|
settingsResources: n.settingsResources
|
|
1094
|
-
}), [n.modules, n.settingsResources]), i =
|
|
1224
|
+
}), [n.modules, n.settingsResources]), i = C(() => [on({
|
|
1095
1225
|
configurations: n,
|
|
1096
1226
|
contentRoutes: r,
|
|
1097
1227
|
children: t
|
|
@@ -1099,73 +1229,73 @@ var It = () => {
|
|
|
1099
1229
|
n,
|
|
1100
1230
|
r,
|
|
1101
1231
|
t
|
|
1102
|
-
]), a = n.basePath ? "/" + n.basePath : void 0, o = e.memory ? e.initialEntries : void 0, s =
|
|
1232
|
+
]), a = n.basePath ? "/" + n.basePath : void 0, o = e.memory ? e.initialEntries : void 0, s = C(() => e.memory ? sn.createMemoryRouter(i, {
|
|
1103
1233
|
basename: a,
|
|
1104
1234
|
...o ? { initialEntries: o } : {}
|
|
1105
|
-
}) :
|
|
1235
|
+
}) : sn.createBrowserRouter(i, { basename: a }), [
|
|
1106
1236
|
a,
|
|
1107
1237
|
o,
|
|
1108
1238
|
e.memory,
|
|
1109
1239
|
i
|
|
1110
1240
|
]);
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
-
},
|
|
1113
|
-
function
|
|
1114
|
-
let { pathname: n } = d(), { configurations: r } =
|
|
1241
|
+
return /* @__PURE__ */ N(le, { router: s });
|
|
1242
|
+
}, ln = v(null), Y = v(null);
|
|
1243
|
+
function un({ children: e, searchSources: t = [] }) {
|
|
1244
|
+
let { pathname: n } = d(), { configurations: r } = V(), i = T(/* @__PURE__ */ new Map()), a = T(0), o = T(n), [s, c] = E([]), [l, u] = E(!1), [f, p] = E(null), [m, h] = E([]), [g, _] = E(null), [v, b] = E(!1), S = y(() => {
|
|
1115
1245
|
c(Array.from(i.current.values()).flat());
|
|
1116
|
-
}, []),
|
|
1117
|
-
i.current.delete(e),
|
|
1118
|
-
}), [
|
|
1246
|
+
}, []), w = y((e, t) => (i.current.set(e, t), S(), () => {
|
|
1247
|
+
i.current.delete(e), S();
|
|
1248
|
+
}), [S]), D = y(() => {
|
|
1119
1249
|
p(null);
|
|
1120
|
-
}, []),
|
|
1121
|
-
a.current += 1, u(!1), h([]), _(null),
|
|
1122
|
-
}, []),
|
|
1250
|
+
}, []), O = y(() => {
|
|
1251
|
+
a.current += 1, u(!1), h([]), _(null), b(!1);
|
|
1252
|
+
}, []), k = y(() => {
|
|
1123
1253
|
let e = a.current + 1;
|
|
1124
|
-
a.current = e, h([]), _(n),
|
|
1254
|
+
a.current = e, h([]), _(n), b(!0), Wt({
|
|
1125
1255
|
modules: r.modules,
|
|
1126
1256
|
locale: r.locale,
|
|
1127
1257
|
basePath: r.basePath,
|
|
1128
1258
|
pathname: n
|
|
1129
1259
|
}).then((t) => {
|
|
1130
|
-
a.current === e && (h(t),
|
|
1260
|
+
a.current === e && (h(t), b(!1));
|
|
1131
1261
|
}).catch(() => {
|
|
1132
|
-
a.current === e &&
|
|
1262
|
+
a.current === e && b(!1);
|
|
1133
1263
|
});
|
|
1134
1264
|
}, [
|
|
1135
1265
|
r.basePath,
|
|
1136
1266
|
r.locale,
|
|
1137
1267
|
r.modules,
|
|
1138
1268
|
n
|
|
1139
|
-
]),
|
|
1140
|
-
u(!0), p({ search: e.search }),
|
|
1141
|
-
}, [
|
|
1142
|
-
e ?
|
|
1143
|
-
}, [
|
|
1144
|
-
|
|
1269
|
+
]), A = y((e = {}) => {
|
|
1270
|
+
u(!0), p({ search: e.search }), k();
|
|
1271
|
+
}, [k]), j = y((e) => {
|
|
1272
|
+
e ? A() : O();
|
|
1273
|
+
}, [O, A]);
|
|
1274
|
+
x(() => {
|
|
1145
1275
|
let e = o.current !== n;
|
|
1146
|
-
o.current = n, e && l &&
|
|
1276
|
+
o.current = n, e && l && O();
|
|
1147
1277
|
}, [
|
|
1148
|
-
|
|
1278
|
+
O,
|
|
1149
1279
|
l,
|
|
1150
1280
|
n
|
|
1151
|
-
]),
|
|
1281
|
+
]), x(() => {
|
|
1152
1282
|
let e = (e) => {
|
|
1153
|
-
(e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), l ?
|
|
1283
|
+
(e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), l ? O() : A());
|
|
1154
1284
|
};
|
|
1155
1285
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1156
1286
|
}, [
|
|
1157
|
-
|
|
1287
|
+
O,
|
|
1158
1288
|
l,
|
|
1159
|
-
|
|
1289
|
+
A
|
|
1160
1290
|
]);
|
|
1161
|
-
let
|
|
1291
|
+
let M = C(() => ({ register: w }), [w]), P = C(() => ({
|
|
1162
1292
|
actions: s,
|
|
1163
1293
|
searchSources: t,
|
|
1164
1294
|
open: l,
|
|
1165
|
-
setOpen:
|
|
1295
|
+
setOpen: j,
|
|
1166
1296
|
openRequest: f,
|
|
1167
|
-
clearOpenRequest:
|
|
1168
|
-
openCommandPalette:
|
|
1297
|
+
clearOpenRequest: D,
|
|
1298
|
+
openCommandPalette: A,
|
|
1169
1299
|
dynamicRoutes: g === n ? m : [],
|
|
1170
1300
|
isLoadingDynamicRoutes: v || l && g !== n
|
|
1171
1301
|
}), [
|
|
@@ -1173,32 +1303,32 @@ function qt({ children: e, searchSources: t = [] }) {
|
|
|
1173
1303
|
t,
|
|
1174
1304
|
l,
|
|
1175
1305
|
f,
|
|
1176
|
-
|
|
1177
|
-
|
|
1306
|
+
D,
|
|
1307
|
+
A,
|
|
1178
1308
|
m,
|
|
1179
1309
|
g,
|
|
1180
1310
|
v,
|
|
1181
1311
|
n,
|
|
1182
|
-
|
|
1312
|
+
j
|
|
1183
1313
|
]);
|
|
1184
|
-
return /* @__PURE__ */
|
|
1185
|
-
value:
|
|
1186
|
-
children: /* @__PURE__ */
|
|
1187
|
-
value:
|
|
1314
|
+
return /* @__PURE__ */ N(ln.Provider, {
|
|
1315
|
+
value: M,
|
|
1316
|
+
children: /* @__PURE__ */ N(Y.Provider, {
|
|
1317
|
+
value: P,
|
|
1188
1318
|
children: e
|
|
1189
1319
|
})
|
|
1190
1320
|
});
|
|
1191
1321
|
}
|
|
1192
|
-
function
|
|
1193
|
-
let e =
|
|
1322
|
+
function dn() {
|
|
1323
|
+
let e = b(ln);
|
|
1194
1324
|
if (!e) throw Error("useCommandPaletteDispatch must be used within CommandPaletteProvider");
|
|
1195
1325
|
return e;
|
|
1196
1326
|
}
|
|
1197
|
-
function
|
|
1198
|
-
let n =
|
|
1327
|
+
function fn(e, t) {
|
|
1328
|
+
let n = S(), { register: r } = dn(), i = T(t);
|
|
1199
1329
|
i.current = t;
|
|
1200
1330
|
let a = t.map((e) => `${e.key}\0${e.label}`).join("\n");
|
|
1201
|
-
|
|
1331
|
+
x(() => r(n, i.current.map((t) => ({
|
|
1202
1332
|
...t,
|
|
1203
1333
|
group: t.group ?? e,
|
|
1204
1334
|
onSelect: () => i.current.find((e) => e.key === t.key)?.onSelect()
|
|
@@ -1209,69 +1339,69 @@ function Yt(e, t) {
|
|
|
1209
1339
|
e
|
|
1210
1340
|
]);
|
|
1211
1341
|
}
|
|
1212
|
-
function
|
|
1213
|
-
let e =
|
|
1342
|
+
function pn() {
|
|
1343
|
+
let e = b(Y);
|
|
1214
1344
|
if (!e) throw Error("useCommandPaletteState must be used within CommandPaletteProvider");
|
|
1215
1345
|
return e;
|
|
1216
1346
|
}
|
|
1217
|
-
function
|
|
1218
|
-
let e =
|
|
1347
|
+
function mn() {
|
|
1348
|
+
let e = b(Y);
|
|
1219
1349
|
if (!e) throw Error("useOpenCommandPalette must be used within CommandPaletteProvider");
|
|
1220
1350
|
return e.openCommandPalette;
|
|
1221
1351
|
}
|
|
1222
|
-
function
|
|
1223
|
-
let e =
|
|
1352
|
+
function hn() {
|
|
1353
|
+
let e = b(Y);
|
|
1224
1354
|
if (!e) throw Error("useCommandPaletteActions must be used within CommandPaletteProvider");
|
|
1225
1355
|
return e.actions;
|
|
1226
1356
|
}
|
|
1227
1357
|
//#endregion
|
|
1228
1358
|
//#region src/components/dialog/dialog.tsx
|
|
1229
|
-
function
|
|
1230
|
-
return /* @__PURE__ */ F
|
|
1359
|
+
function gn({ ...e }) {
|
|
1360
|
+
return /* @__PURE__ */ N(F.Root, {
|
|
1231
1361
|
"data-slot": "dialog",
|
|
1232
1362
|
...e
|
|
1233
1363
|
});
|
|
1234
1364
|
}
|
|
1235
|
-
|
|
1236
|
-
function
|
|
1237
|
-
return /* @__PURE__ */ F
|
|
1365
|
+
gn.displayName = "Dialog.Root";
|
|
1366
|
+
function _n({ ...e }) {
|
|
1367
|
+
return /* @__PURE__ */ N(F.Trigger, {
|
|
1238
1368
|
"data-slot": "dialog-trigger",
|
|
1239
1369
|
...e
|
|
1240
1370
|
});
|
|
1241
1371
|
}
|
|
1242
|
-
|
|
1243
|
-
function
|
|
1244
|
-
return /* @__PURE__ */ F
|
|
1372
|
+
_n.displayName = "Dialog.Trigger";
|
|
1373
|
+
function vn({ ...e }) {
|
|
1374
|
+
return /* @__PURE__ */ N(F.Portal, {
|
|
1245
1375
|
"data-slot": "dialog-portal",
|
|
1246
1376
|
...e
|
|
1247
1377
|
});
|
|
1248
1378
|
}
|
|
1249
|
-
|
|
1250
|
-
function
|
|
1251
|
-
return /* @__PURE__ */ F
|
|
1379
|
+
vn.displayName = "Dialog.Portal";
|
|
1380
|
+
function yn({ ...e }) {
|
|
1381
|
+
return /* @__PURE__ */ N(F.Close, {
|
|
1252
1382
|
"data-slot": "dialog-close",
|
|
1253
1383
|
...e
|
|
1254
1384
|
});
|
|
1255
1385
|
}
|
|
1256
|
-
|
|
1257
|
-
function
|
|
1258
|
-
return /* @__PURE__ */ F
|
|
1386
|
+
yn.displayName = "Dialog.Close";
|
|
1387
|
+
function bn({ className: e, ...t }) {
|
|
1388
|
+
return /* @__PURE__ */ N(F.Backdrop, {
|
|
1259
1389
|
"data-slot": "dialog-overlay",
|
|
1260
|
-
className:
|
|
1390
|
+
className: I("astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fill-mode-forwards astw:fixed astw:inset-0 astw:z-(--z-overlay) astw:bg-black/50", e),
|
|
1261
1391
|
...t
|
|
1262
1392
|
});
|
|
1263
1393
|
}
|
|
1264
|
-
|
|
1265
|
-
function
|
|
1266
|
-
return /* @__PURE__ */
|
|
1394
|
+
bn.displayName = "Dialog.Overlay";
|
|
1395
|
+
function xn({ className: e, children: t, ...n }) {
|
|
1396
|
+
return /* @__PURE__ */ P(vn, {
|
|
1267
1397
|
"data-slot": "dialog-portal",
|
|
1268
|
-
children: [/* @__PURE__ */
|
|
1398
|
+
children: [/* @__PURE__ */ N(bn, {}), /* @__PURE__ */ P(F.Popup, {
|
|
1269
1399
|
"data-slot": "dialog-content",
|
|
1270
|
-
className:
|
|
1400
|
+
className: I("astw:bg-card astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:fill-mode-forwards astw:fixed astw:top-[50%] astw:left-[50%] astw:z-(--z-overlay) astw:grid astw:w-full astw:max-w-[calc(100%-2rem)] astw:translate-x-[-50%] astw:translate-y-[-50%] astw:gap-4 astw:rounded-lg astw:border astw:border-border astw:p-6 astw:shadow-lg astw:duration-200 astw:sm:max-w-lg", e),
|
|
1271
1401
|
...n,
|
|
1272
|
-
children: [t, /* @__PURE__ */
|
|
1402
|
+
children: [t, /* @__PURE__ */ P(F.Close, {
|
|
1273
1403
|
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",
|
|
1274
|
-
children: [/* @__PURE__ */
|
|
1404
|
+
children: [/* @__PURE__ */ N(ae, {}), /* @__PURE__ */ N("span", {
|
|
1275
1405
|
className: "astw:sr-only",
|
|
1276
1406
|
children: "Close"
|
|
1277
1407
|
})]
|
|
@@ -1279,77 +1409,79 @@ function an({ className: e, children: t, ...n }) {
|
|
|
1279
1409
|
})]
|
|
1280
1410
|
});
|
|
1281
1411
|
}
|
|
1282
|
-
|
|
1283
|
-
function
|
|
1284
|
-
return /* @__PURE__ */
|
|
1412
|
+
xn.displayName = "Dialog.Content";
|
|
1413
|
+
function Sn({ className: e, ...t }) {
|
|
1414
|
+
return /* @__PURE__ */ N("div", {
|
|
1285
1415
|
"data-slot": "dialog-header",
|
|
1286
|
-
className:
|
|
1416
|
+
className: I("astw:flex astw:flex-col astw:gap-2 astw:text-center astw:sm:text-left", e),
|
|
1287
1417
|
...t
|
|
1288
1418
|
});
|
|
1289
1419
|
}
|
|
1290
|
-
|
|
1291
|
-
function
|
|
1292
|
-
return /* @__PURE__ */
|
|
1420
|
+
Sn.displayName = "Dialog.Header";
|
|
1421
|
+
function Cn({ className: e, ...t }) {
|
|
1422
|
+
return /* @__PURE__ */ N("div", {
|
|
1293
1423
|
"data-slot": "dialog-footer",
|
|
1294
|
-
className:
|
|
1424
|
+
className: I("astw:flex astw:flex-col-reverse astw:gap-2 astw:sm:flex-row astw:sm:justify-end", e),
|
|
1295
1425
|
...t
|
|
1296
1426
|
});
|
|
1297
1427
|
}
|
|
1298
|
-
|
|
1299
|
-
function
|
|
1300
|
-
return /* @__PURE__ */ F
|
|
1428
|
+
Cn.displayName = "Dialog.Footer";
|
|
1429
|
+
function wn({ className: e, ...t }) {
|
|
1430
|
+
return /* @__PURE__ */ N(F.Title, {
|
|
1301
1431
|
"data-slot": "dialog-title",
|
|
1302
|
-
className:
|
|
1432
|
+
className: I("astw:text-lg astw:leading-none astw:font-semibold", e),
|
|
1303
1433
|
...t
|
|
1304
1434
|
});
|
|
1305
1435
|
}
|
|
1306
|
-
|
|
1307
|
-
function
|
|
1308
|
-
return /* @__PURE__ */ F
|
|
1436
|
+
wn.displayName = "Dialog.Title";
|
|
1437
|
+
function Tn({ className: e, ...t }) {
|
|
1438
|
+
return /* @__PURE__ */ N(F.Description, {
|
|
1309
1439
|
"data-slot": "dialog-description",
|
|
1310
|
-
className:
|
|
1440
|
+
className: I("astw:text-muted-foreground astw:text-sm", e),
|
|
1311
1441
|
...t
|
|
1312
1442
|
});
|
|
1313
1443
|
}
|
|
1314
|
-
|
|
1315
|
-
var
|
|
1316
|
-
Root:
|
|
1317
|
-
Close:
|
|
1318
|
-
Content:
|
|
1319
|
-
Description:
|
|
1320
|
-
Footer:
|
|
1321
|
-
Header:
|
|
1322
|
-
Title:
|
|
1323
|
-
Trigger:
|
|
1324
|
-
},
|
|
1325
|
-
"astw:border-input astw:flex astw:w-full astw:min-w-0 astw:rounded-md astw:border astw:bg-transparent astw:px-3 astw:text-base astw:
|
|
1444
|
+
Tn.displayName = "Dialog.Description";
|
|
1445
|
+
var X = {
|
|
1446
|
+
Root: gn,
|
|
1447
|
+
Close: yn,
|
|
1448
|
+
Content: xn,
|
|
1449
|
+
Description: Tn,
|
|
1450
|
+
Footer: Cn,
|
|
1451
|
+
Header: Sn,
|
|
1452
|
+
Title: wn,
|
|
1453
|
+
Trigger: _n
|
|
1454
|
+
}, En = [
|
|
1455
|
+
"astw:border-input astw:flex astw:w-full astw:min-w-0 astw:rounded-md astw:border astw:bg-transparent astw:px-3 astw:text-base astw:outline-none astw:md:text-sm",
|
|
1326
1456
|
"astw:dark:bg-input/30 astw:transition-[color,box-shadow]",
|
|
1327
1457
|
"astw:selection:bg-primary astw:selection:text-primary-foreground",
|
|
1328
1458
|
"astw:placeholder:text-muted-foreground",
|
|
1329
1459
|
"astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
|
|
1330
1460
|
"astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50"
|
|
1331
|
-
],
|
|
1461
|
+
], Dn = [...En, "astw:h-9 astw:py-1"], On = [...En, "astw:min-h-16 astw:py-2 astw:resize-y"];
|
|
1332
1462
|
//#endregion
|
|
1333
1463
|
//#region src/components/input/input.tsx
|
|
1334
|
-
function
|
|
1335
|
-
|
|
1464
|
+
function kn({ className: e, type: t, ref: n, ...r }) {
|
|
1465
|
+
let i = g.useRef(null);
|
|
1466
|
+
return ge(i, { handlesDirectionalKeys: !0 }), /* @__PURE__ */ N("input", {
|
|
1467
|
+
ref: L(i, n),
|
|
1336
1468
|
type: t,
|
|
1337
1469
|
"data-slot": "input",
|
|
1338
|
-
className:
|
|
1339
|
-
...
|
|
1470
|
+
className: I(Dn, "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", "astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive", e),
|
|
1471
|
+
...r
|
|
1340
1472
|
});
|
|
1341
1473
|
}
|
|
1342
1474
|
//#endregion
|
|
1343
1475
|
//#region src/components/spinner/spinner.tsx
|
|
1344
|
-
var
|
|
1476
|
+
var An = {
|
|
1345
1477
|
xs: 12,
|
|
1346
1478
|
sm: 14,
|
|
1347
1479
|
default: 16,
|
|
1348
1480
|
lg: 20
|
|
1349
1481
|
};
|
|
1350
|
-
function
|
|
1351
|
-
let a = i["aria-label"] != null || i["aria-labelledby"] != null, o = i["aria-hidden"] === !0 || i["aria-hidden"] == null && i.role == null && !a, s =
|
|
1352
|
-
return /* @__PURE__ */
|
|
1482
|
+
function jn({ className: e, size: t = "default", width: n, height: r, ...i }) {
|
|
1483
|
+
let a = i["aria-label"] != null || i["aria-labelledby"] != null, o = i["aria-hidden"] === !0 || i["aria-hidden"] == null && i.role == null && !a, s = An[t];
|
|
1484
|
+
return /* @__PURE__ */ N("svg", {
|
|
1353
1485
|
"data-slot": "spinner",
|
|
1354
1486
|
viewBox: "0 0 16 16",
|
|
1355
1487
|
fill: "none",
|
|
@@ -1357,10 +1489,10 @@ function hn({ className: e, size: t = "default", width: n, height: r, ...i }) {
|
|
|
1357
1489
|
...i,
|
|
1358
1490
|
width: n ?? s,
|
|
1359
1491
|
height: r ?? s,
|
|
1360
|
-
className:
|
|
1492
|
+
className: I("astw:animate-spin astw:shrink-0", e),
|
|
1361
1493
|
role: o ? void 0 : i.role ?? "status",
|
|
1362
1494
|
"aria-hidden": o ? !0 : i["aria-hidden"],
|
|
1363
|
-
children: /* @__PURE__ */
|
|
1495
|
+
children: /* @__PURE__ */ N("circle", {
|
|
1364
1496
|
cx: "8",
|
|
1365
1497
|
cy: "8",
|
|
1366
1498
|
r: "6",
|
|
@@ -1374,8 +1506,8 @@ function hn({ className: e, size: t = "default", width: n, height: r, ...i }) {
|
|
|
1374
1506
|
}
|
|
1375
1507
|
//#endregion
|
|
1376
1508
|
//#region src/components/command-palette/command-palette.tsx
|
|
1377
|
-
var
|
|
1378
|
-
function
|
|
1509
|
+
var Z = "astw:relative astw:flex astw:w-full astw:cursor-pointer astw:select-none astw:rounded-sm astw:px-2 astw:py-2 astw:text-sm astw:outline-none astw:text-left", Q = (e) => e ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground";
|
|
1510
|
+
function Mn(e) {
|
|
1379
1511
|
let t = [], n = (e, r, i) => {
|
|
1380
1512
|
e.forEach((e) => {
|
|
1381
1513
|
let a = [...i, e.title];
|
|
@@ -1396,17 +1528,17 @@ function _n(e) {
|
|
|
1396
1528
|
}), n(e.items, e.icon, [e.title]);
|
|
1397
1529
|
}), t;
|
|
1398
1530
|
}
|
|
1399
|
-
function
|
|
1531
|
+
function Nn(e, t) {
|
|
1400
1532
|
if (!t.trim()) return e;
|
|
1401
1533
|
let n = t.toLowerCase();
|
|
1402
1534
|
return e.filter((e) => e.label.toLowerCase().includes(n));
|
|
1403
1535
|
}
|
|
1404
|
-
var
|
|
1536
|
+
var Pn = 300, Fn = (e) => e === "/" || e.startsWith("/_"), In = {
|
|
1405
1537
|
mode: "browse",
|
|
1406
1538
|
search: "",
|
|
1407
1539
|
selectedIndex: 0
|
|
1408
|
-
},
|
|
1409
|
-
function
|
|
1540
|
+
}, Ln = [];
|
|
1541
|
+
function Rn(e, t) {
|
|
1410
1542
|
switch (t.type) {
|
|
1411
1543
|
case "SET_SEARCH": return e.mode === "search" ? {
|
|
1412
1544
|
...e,
|
|
@@ -1444,7 +1576,7 @@ function Cn(e, t) {
|
|
|
1444
1576
|
results: [],
|
|
1445
1577
|
isSearching: !1
|
|
1446
1578
|
};
|
|
1447
|
-
case "EXIT_SEARCH_MODE": return
|
|
1579
|
+
case "EXIT_SEARCH_MODE": return In;
|
|
1448
1580
|
case "SEARCH_START": return e.mode === "search" ? {
|
|
1449
1581
|
...e,
|
|
1450
1582
|
isSearching: !0,
|
|
@@ -1468,10 +1600,10 @@ function Cn(e, t) {
|
|
|
1468
1600
|
...e,
|
|
1469
1601
|
selectedIndex: Math.max(e.selectedIndex - 1, 0)
|
|
1470
1602
|
};
|
|
1471
|
-
case "RESET": return
|
|
1603
|
+
case "RESET": return In;
|
|
1472
1604
|
}
|
|
1473
1605
|
}
|
|
1474
|
-
function
|
|
1606
|
+
function zn(e, t) {
|
|
1475
1607
|
let n = e.indexOf(":");
|
|
1476
1608
|
if (n < 1) return {
|
|
1477
1609
|
activeSource: null,
|
|
@@ -1486,20 +1618,20 @@ function wn(e, t) {
|
|
|
1486
1618
|
searchQuery: e
|
|
1487
1619
|
};
|
|
1488
1620
|
}
|
|
1489
|
-
function
|
|
1490
|
-
let a = p(), o =
|
|
1621
|
+
function Bn({ routes: e, contextualActions: t = [], searchSources: n = [], open: r, setOpen: i }) {
|
|
1622
|
+
let a = p(), o = T(null), [s, c] = w(Rn, In), l = T(null), u = s.mode === "search" ? s.query : s.search, d = s.selectedIndex, f = s.mode === "search" ? s.source : null, m = s.mode === "search" ? s.results : Ln, h = s.mode === "search" && s.isSearching, g = C(() => f ? [] : Nn(t, u), [
|
|
1491
1623
|
t,
|
|
1492
1624
|
u,
|
|
1493
1625
|
f
|
|
1494
|
-
]), _ =
|
|
1495
|
-
let n =
|
|
1626
|
+
]), _ = C(() => f ? [] : jt(e, u).toSorted((e, t) => {
|
|
1627
|
+
let n = Fn(e.path), r = Fn(t.path);
|
|
1496
1628
|
return Number(n) - Number(r) || e.path.localeCompare(t.path);
|
|
1497
1629
|
}), [
|
|
1498
1630
|
e,
|
|
1499
1631
|
u,
|
|
1500
1632
|
f
|
|
1501
1633
|
]);
|
|
1502
|
-
|
|
1634
|
+
x(() => {
|
|
1503
1635
|
if (!f) {
|
|
1504
1636
|
l.current?.abort(), l.current = null;
|
|
1505
1637
|
return;
|
|
@@ -1515,12 +1647,12 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1515
1647
|
}).catch(() => {
|
|
1516
1648
|
e.signal.aborted || c({ type: "SEARCH_FAIL" });
|
|
1517
1649
|
});
|
|
1518
|
-
},
|
|
1650
|
+
}, Pn);
|
|
1519
1651
|
return () => {
|
|
1520
1652
|
clearTimeout(e), l.current?.abort(), l.current = null;
|
|
1521
1653
|
};
|
|
1522
1654
|
}, [f, u]);
|
|
1523
|
-
let v =
|
|
1655
|
+
let v = C(() => {
|
|
1524
1656
|
if (f) return m.map((e) => ({
|
|
1525
1657
|
type: "search-result",
|
|
1526
1658
|
result: e,
|
|
@@ -1548,7 +1680,7 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1548
1680
|
n,
|
|
1549
1681
|
g,
|
|
1550
1682
|
_
|
|
1551
|
-
]),
|
|
1683
|
+
]), b = y((e) => {
|
|
1552
1684
|
if (s.mode === "search") {
|
|
1553
1685
|
c({
|
|
1554
1686
|
type: "SET_SEARCH",
|
|
@@ -1556,28 +1688,28 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1556
1688
|
});
|
|
1557
1689
|
return;
|
|
1558
1690
|
}
|
|
1559
|
-
let t =
|
|
1691
|
+
let t = zn(e, n);
|
|
1560
1692
|
c({
|
|
1561
1693
|
type: "SET_SEARCH",
|
|
1562
1694
|
value: e,
|
|
1563
1695
|
detectedSource: t.activeSource ?? void 0,
|
|
1564
1696
|
detectedQuery: t.activeSource ? t.searchQuery : void 0
|
|
1565
1697
|
});
|
|
1566
|
-
}, [s.mode, n]),
|
|
1567
|
-
let t =
|
|
1698
|
+
}, [s.mode, n]), S = y((e) => {
|
|
1699
|
+
let t = zn(e, n);
|
|
1568
1700
|
c({
|
|
1569
1701
|
type: "INITIALIZE_SEARCH",
|
|
1570
1702
|
value: e,
|
|
1571
1703
|
detectedSource: t.activeSource ?? void 0,
|
|
1572
1704
|
detectedQuery: t.activeSource ? t.searchQuery : void 0
|
|
1573
1705
|
});
|
|
1574
|
-
}, [n]),
|
|
1706
|
+
}, [n]), E = y((e) => {
|
|
1575
1707
|
i(e), e || (c({ type: "RESET" }), l.current?.abort(), l.current = null);
|
|
1576
1708
|
}, [i]);
|
|
1577
|
-
|
|
1709
|
+
x(() => {
|
|
1578
1710
|
o.current && o.current.querySelector(`[data-index="${d}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1579
1711
|
}, [d]);
|
|
1580
|
-
let
|
|
1712
|
+
let D = y((e) => {
|
|
1581
1713
|
if (e.type === "search-mode") {
|
|
1582
1714
|
c({
|
|
1583
1715
|
type: "ENTER_SEARCH_MODE",
|
|
@@ -1595,10 +1727,10 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1595
1727
|
}, [a, i]);
|
|
1596
1728
|
return {
|
|
1597
1729
|
open: r,
|
|
1598
|
-
handleOpenChange:
|
|
1730
|
+
handleOpenChange: E,
|
|
1599
1731
|
search: u,
|
|
1600
|
-
setSearch:
|
|
1601
|
-
initializeSearch:
|
|
1732
|
+
setSearch: b,
|
|
1733
|
+
initializeSearch: S,
|
|
1602
1734
|
selectedIndex: d,
|
|
1603
1735
|
filteredActions: g,
|
|
1604
1736
|
filteredRoutes: _,
|
|
@@ -1606,8 +1738,8 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1606
1738
|
activeSearchSource: f,
|
|
1607
1739
|
isSearching: h,
|
|
1608
1740
|
selectableItems: v,
|
|
1609
|
-
handleSelectItem:
|
|
1610
|
-
handleKeyDown:
|
|
1741
|
+
handleSelectItem: D,
|
|
1742
|
+
handleKeyDown: y((e) => {
|
|
1611
1743
|
if (!e.nativeEvent.isComposing) switch (e.key) {
|
|
1612
1744
|
case "ArrowDown":
|
|
1613
1745
|
e.preventDefault(), c({
|
|
@@ -1619,24 +1751,24 @@ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
|
|
|
1619
1751
|
e.preventDefault(), c({ type: "ARROW_UP" });
|
|
1620
1752
|
break;
|
|
1621
1753
|
case "Enter":
|
|
1622
|
-
e.preventDefault(), v[d] &&
|
|
1754
|
+
e.preventDefault(), v[d] && D(v[d]);
|
|
1623
1755
|
break;
|
|
1624
1756
|
case "Backspace": f && u === "" && (e.preventDefault(), c({ type: "EXIT_SEARCH_MODE" }), l.current?.abort(), l.current = null);
|
|
1625
1757
|
}
|
|
1626
1758
|
}, [
|
|
1627
1759
|
v,
|
|
1628
1760
|
d,
|
|
1629
|
-
|
|
1761
|
+
D,
|
|
1630
1762
|
f,
|
|
1631
1763
|
u
|
|
1632
1764
|
]),
|
|
1633
1765
|
listRef: o
|
|
1634
1766
|
};
|
|
1635
1767
|
}
|
|
1636
|
-
function
|
|
1637
|
-
let n =
|
|
1638
|
-
routes:
|
|
1639
|
-
...
|
|
1768
|
+
function Vn({ navItems: e, extraRoutes: t = [] }) {
|
|
1769
|
+
let n = H(), r = hn(), { searchSources: i, open: a, setOpen: o, openRequest: s, clearOpenRequest: c, dynamicRoutes: l, isLoadingDynamicRoutes: u } = pn(), { open: d, handleOpenChange: f, search: p, setSearch: m, initializeSearch: h, selectedIndex: g, filteredActions: _, filteredRoutes: v, searchResults: y, activeSearchSource: b, isSearching: S, selectableItems: w, handleSelectItem: T, handleKeyDown: E, listRef: D } = Bn({
|
|
1770
|
+
routes: C(() => [
|
|
1771
|
+
...Mn(e),
|
|
1640
1772
|
...t,
|
|
1641
1773
|
...l
|
|
1642
1774
|
], [
|
|
@@ -1649,35 +1781,35 @@ function En({ navItems: e, extraRoutes: t = [] }) {
|
|
|
1649
1781
|
open: a,
|
|
1650
1782
|
setOpen: o
|
|
1651
1783
|
});
|
|
1652
|
-
|
|
1784
|
+
x(() => {
|
|
1653
1785
|
s && (h(s.search ?? ""), c());
|
|
1654
1786
|
}, [
|
|
1655
1787
|
s,
|
|
1656
1788
|
h,
|
|
1657
1789
|
c
|
|
1658
1790
|
]);
|
|
1659
|
-
let
|
|
1660
|
-
return /* @__PURE__ */
|
|
1791
|
+
let O = b ? [] : w.filter((e) => e.type === "search-mode"), k = O.length, A = k, j = A + _.length;
|
|
1792
|
+
return /* @__PURE__ */ N(X.Root, {
|
|
1661
1793
|
open: d,
|
|
1662
1794
|
onOpenChange: f,
|
|
1663
|
-
children: /* @__PURE__ */
|
|
1795
|
+
children: /* @__PURE__ */ P(X.Content, {
|
|
1664
1796
|
className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:lg:max-w-4xl astw:overflow-hidden astw:top-[30%] astw:translate-y-[-30%]",
|
|
1665
|
-
onKeyDown:
|
|
1797
|
+
onKeyDown: E,
|
|
1666
1798
|
"aria-describedby": void 0,
|
|
1667
1799
|
children: [
|
|
1668
|
-
/* @__PURE__ */
|
|
1800
|
+
/* @__PURE__ */ N(X.Title, {
|
|
1669
1801
|
className: "astw:sr-only",
|
|
1670
1802
|
children: n("commandPaletteSearch")
|
|
1671
1803
|
}),
|
|
1672
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ P("div", {
|
|
1673
1805
|
className: "astw:flex astw:items-center astw:border-b astw:border-border astw:px-3 astw:py-1",
|
|
1674
1806
|
children: [
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
b && /* @__PURE__ */
|
|
1807
|
+
/* @__PURE__ */ N(re, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
|
|
1808
|
+
b && /* @__PURE__ */ N("span", {
|
|
1677
1809
|
className: "astw:inline-flex astw:items-center astw:shrink-0 astw:rounded astw:bg-muted astw:px-1.5 astw:py-0.5 astw:mr-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1678
1810
|
children: b.prefix
|
|
1679
1811
|
}),
|
|
1680
|
-
/* @__PURE__ */
|
|
1812
|
+
/* @__PURE__ */ N(kn, {
|
|
1681
1813
|
value: p,
|
|
1682
1814
|
onChange: (e) => m(e.target.value),
|
|
1683
1815
|
placeholder: n("commandPaletteSearch"),
|
|
@@ -1686,141 +1818,141 @@ function En({ navItems: e, extraRoutes: t = [] }) {
|
|
|
1686
1818
|
})
|
|
1687
1819
|
]
|
|
1688
1820
|
}),
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
ref:
|
|
1821
|
+
/* @__PURE__ */ P("div", {
|
|
1822
|
+
ref: D,
|
|
1691
1823
|
className: "astw:max-h-[50vh] astw:overflow-y-auto astw:overflow-x-hidden",
|
|
1692
|
-
children: [
|
|
1824
|
+
children: [w.length === 0 && !S && !u ? /* @__PURE__ */ N("div", {
|
|
1693
1825
|
className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground",
|
|
1694
1826
|
children: n("commandPaletteNoResults")
|
|
1695
|
-
}) : /* @__PURE__ */
|
|
1827
|
+
}) : /* @__PURE__ */ P("div", {
|
|
1696
1828
|
className: "astw:p-1",
|
|
1697
1829
|
children: [
|
|
1698
|
-
u && /* @__PURE__ */
|
|
1830
|
+
u && /* @__PURE__ */ P("output", {
|
|
1699
1831
|
className: "astw:flex astw:items-center astw:justify-center astw:gap-2 astw:py-4 astw:text-sm astw:text-muted-foreground",
|
|
1700
|
-
children: [/* @__PURE__ */
|
|
1832
|
+
children: [/* @__PURE__ */ N(jn, { "aria-label": n("commandPaletteLoadingRoutes") }), n("commandPaletteLoadingRoutes")]
|
|
1701
1833
|
}),
|
|
1702
|
-
|
|
1834
|
+
k > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1703
1835
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1704
1836
|
children: n("commandPaletteSearchModes")
|
|
1705
|
-
}),
|
|
1837
|
+
}), O.map((e, t) => {
|
|
1706
1838
|
let n = e.type === "search-mode" ? e.source : null;
|
|
1707
|
-
return n ? /* @__PURE__ */
|
|
1839
|
+
return n ? /* @__PURE__ */ P("button", {
|
|
1708
1840
|
"data-index": t,
|
|
1709
|
-
onClick: () =>
|
|
1841
|
+
onClick: () => T({
|
|
1710
1842
|
type: "search-mode",
|
|
1711
1843
|
source: n
|
|
1712
1844
|
}),
|
|
1713
|
-
className:
|
|
1845
|
+
className: I(Z, "astw:items-center astw:gap-2", Q(t === g)),
|
|
1714
1846
|
children: [
|
|
1715
|
-
n.icon && /* @__PURE__ */
|
|
1847
|
+
n.icon && /* @__PURE__ */ N("span", {
|
|
1716
1848
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1717
1849
|
children: n.icon
|
|
1718
1850
|
}),
|
|
1719
|
-
/* @__PURE__ */
|
|
1851
|
+
/* @__PURE__ */ P("span", {
|
|
1720
1852
|
className: "astw:font-mono astw:text-xs astw:text-muted-foreground astw:shrink-0",
|
|
1721
1853
|
children: [n.prefix, ":"]
|
|
1722
1854
|
}),
|
|
1723
|
-
/* @__PURE__ */
|
|
1855
|
+
/* @__PURE__ */ N("span", {
|
|
1724
1856
|
className: "astw:truncate",
|
|
1725
1857
|
children: n.title
|
|
1726
1858
|
})
|
|
1727
1859
|
]
|
|
1728
1860
|
}, `search-mode-${n.prefix}`) : null;
|
|
1729
1861
|
})] }),
|
|
1730
|
-
_.length > 0 && /* @__PURE__ */
|
|
1862
|
+
_.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1731
1863
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1732
1864
|
children: n("commandPaletteActions")
|
|
1733
1865
|
}), _.map((e, t) => {
|
|
1734
|
-
let n =
|
|
1735
|
-
return /* @__PURE__ */
|
|
1866
|
+
let n = A + t;
|
|
1867
|
+
return /* @__PURE__ */ P("button", {
|
|
1736
1868
|
"data-index": n,
|
|
1737
|
-
onClick: () =>
|
|
1869
|
+
onClick: () => T({
|
|
1738
1870
|
type: "action",
|
|
1739
1871
|
action: e
|
|
1740
1872
|
}),
|
|
1741
|
-
className:
|
|
1873
|
+
className: I(Z, "astw:items-center astw:gap-2", Q(n === g)),
|
|
1742
1874
|
children: [
|
|
1743
|
-
e.icon && /* @__PURE__ */
|
|
1875
|
+
e.icon && /* @__PURE__ */ N("span", {
|
|
1744
1876
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1745
1877
|
children: e.icon
|
|
1746
1878
|
}),
|
|
1747
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ N("span", {
|
|
1748
1880
|
className: "astw:truncate",
|
|
1749
1881
|
children: e.label
|
|
1750
1882
|
}),
|
|
1751
|
-
e.group && /* @__PURE__ */
|
|
1883
|
+
e.group && /* @__PURE__ */ N("span", {
|
|
1752
1884
|
className: "astw:ml-auto astw:text-xs astw:text-muted-foreground astw:shrink-0",
|
|
1753
1885
|
children: e.group
|
|
1754
1886
|
})
|
|
1755
1887
|
]
|
|
1756
1888
|
}, `action-${e.key}`);
|
|
1757
1889
|
})] }),
|
|
1758
|
-
v.length > 0 && /* @__PURE__ */
|
|
1890
|
+
v.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1759
1891
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1760
1892
|
children: n("commandPalettePages")
|
|
1761
1893
|
}), v.map((e, t) => {
|
|
1762
|
-
let n =
|
|
1763
|
-
return /* @__PURE__ */
|
|
1894
|
+
let n = j + t, r = e.displayPath ?? e.path;
|
|
1895
|
+
return /* @__PURE__ */ P("button", {
|
|
1764
1896
|
"data-index": n,
|
|
1765
|
-
onClick: () =>
|
|
1897
|
+
onClick: () => T({
|
|
1766
1898
|
type: "route",
|
|
1767
1899
|
route: e
|
|
1768
1900
|
}),
|
|
1769
|
-
className:
|
|
1770
|
-
children: [/* @__PURE__ */
|
|
1901
|
+
className: I(Z, "astw:flex-col astw:items-start", Q(n === g)),
|
|
1902
|
+
children: [/* @__PURE__ */ N("span", {
|
|
1771
1903
|
className: "astw:truncate astw:w-full astw:text-left",
|
|
1772
1904
|
children: e.breadcrumb.join(" > ")
|
|
1773
|
-
}), /* @__PURE__ */
|
|
1905
|
+
}), /* @__PURE__ */ N("span", {
|
|
1774
1906
|
className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
|
|
1775
1907
|
children: r.startsWith("/") ? r : `/${r}`
|
|
1776
1908
|
})]
|
|
1777
1909
|
}, e.path);
|
|
1778
1910
|
})] }),
|
|
1779
|
-
b && y.length > 0 && /* @__PURE__ */
|
|
1911
|
+
b && y.length > 0 && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
|
|
1780
1912
|
className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
|
|
1781
1913
|
children: b.title
|
|
1782
|
-
}), y.map((e, t) => /* @__PURE__ */
|
|
1914
|
+
}), y.map((e, t) => /* @__PURE__ */ P("button", {
|
|
1783
1915
|
"data-index": t,
|
|
1784
|
-
onClick: () =>
|
|
1916
|
+
onClick: () => T({
|
|
1785
1917
|
type: "search-result",
|
|
1786
1918
|
result: e,
|
|
1787
1919
|
source: b
|
|
1788
1920
|
}),
|
|
1789
|
-
className:
|
|
1790
|
-
children: [/* @__PURE__ */
|
|
1921
|
+
className: I(Z, "astw:flex-col astw:items-start", Q(t === g)),
|
|
1922
|
+
children: [/* @__PURE__ */ P("span", {
|
|
1791
1923
|
className: "astw:flex astw:items-center astw:gap-2 astw:w-full",
|
|
1792
|
-
children: [(e.icon || b.icon) && /* @__PURE__ */
|
|
1924
|
+
children: [(e.icon || b.icon) && /* @__PURE__ */ N("span", {
|
|
1793
1925
|
className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
|
|
1794
1926
|
children: e.icon ?? b.icon
|
|
1795
|
-
}), /* @__PURE__ */
|
|
1927
|
+
}), /* @__PURE__ */ N("span", {
|
|
1796
1928
|
className: "astw:truncate",
|
|
1797
1929
|
children: e.label
|
|
1798
1930
|
})]
|
|
1799
|
-
}), e.description && /* @__PURE__ */
|
|
1931
|
+
}), e.description && /* @__PURE__ */ N("span", {
|
|
1800
1932
|
className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
|
|
1801
1933
|
children: e.description
|
|
1802
1934
|
})]
|
|
1803
1935
|
}, `search-result-${e.key}`))] })
|
|
1804
1936
|
]
|
|
1805
|
-
}),
|
|
1937
|
+
}), S && /* @__PURE__ */ P("div", {
|
|
1806
1938
|
className: "astw:flex astw:items-center astw:justify-center astw:gap-2 astw:py-4 astw:text-sm astw:text-muted-foreground",
|
|
1807
|
-
children: [/* @__PURE__ */
|
|
1939
|
+
children: [/* @__PURE__ */ N(jn, {}), n("commandPaletteSearching")]
|
|
1808
1940
|
})]
|
|
1809
1941
|
})
|
|
1810
1942
|
]
|
|
1811
1943
|
})
|
|
1812
1944
|
});
|
|
1813
1945
|
}
|
|
1814
|
-
function
|
|
1946
|
+
function Hn() {
|
|
1815
1947
|
return null;
|
|
1816
1948
|
}
|
|
1817
|
-
function
|
|
1818
|
-
let e =
|
|
1819
|
-
return /* @__PURE__ */
|
|
1949
|
+
function Un() {
|
|
1950
|
+
let e = Lt(), n = ut();
|
|
1951
|
+
return /* @__PURE__ */ N(_, {
|
|
1820
1952
|
fallback: null,
|
|
1821
|
-
children: /* @__PURE__ */
|
|
1953
|
+
children: /* @__PURE__ */ N(t, {
|
|
1822
1954
|
resolve: e,
|
|
1823
|
-
children: (e) => /* @__PURE__ */
|
|
1955
|
+
children: (e) => /* @__PURE__ */ N(Vn, {
|
|
1824
1956
|
navItems: e ?? [],
|
|
1825
1957
|
extraRoutes: [n]
|
|
1826
1958
|
})
|
|
@@ -1829,13 +1961,13 @@ function On() {
|
|
|
1829
1961
|
}
|
|
1830
1962
|
//#endregion
|
|
1831
1963
|
//#region src/hooks/use-is-client.ts
|
|
1832
|
-
var
|
|
1833
|
-
function
|
|
1834
|
-
return
|
|
1964
|
+
var Wn = () => () => {}, Gn = () => !0, Kn = () => !1;
|
|
1965
|
+
function qn() {
|
|
1966
|
+
return D(Wn, Gn, Kn);
|
|
1835
1967
|
}
|
|
1836
1968
|
//#endregion
|
|
1837
1969
|
//#region src/fs-routes/converter.tsx
|
|
1838
|
-
function
|
|
1970
|
+
function Jn(e) {
|
|
1839
1971
|
let t = {
|
|
1840
1972
|
path: "",
|
|
1841
1973
|
fullPath: "",
|
|
@@ -1843,7 +1975,7 @@ function Nn(e) {
|
|
|
1843
1975
|
children: /* @__PURE__ */ new Map()
|
|
1844
1976
|
};
|
|
1845
1977
|
for (let n of e) {
|
|
1846
|
-
let e =
|
|
1978
|
+
let e = de(n.path), r = t, i = "";
|
|
1847
1979
|
for (let t of e) t.type !== "group" && (i = i ? `${i}/${t.converted}` : t.converted, r.children.has(t.converted) || r.children.set(t.converted, {
|
|
1848
1980
|
path: t.converted,
|
|
1849
1981
|
fullPath: i,
|
|
@@ -1854,12 +1986,12 @@ function Nn(e) {
|
|
|
1854
1986
|
}
|
|
1855
1987
|
return t;
|
|
1856
1988
|
}
|
|
1857
|
-
function
|
|
1858
|
-
return e?.appShellPageProps?.meta?.title ??
|
|
1989
|
+
function Yn(e, t) {
|
|
1990
|
+
return e?.appShellPageProps?.meta?.title ?? Ue(t);
|
|
1859
1991
|
}
|
|
1860
|
-
function
|
|
1861
|
-
let t = e.component, n =
|
|
1862
|
-
for (let t of e.children.values()) o.push(
|
|
1992
|
+
function Xn(e) {
|
|
1993
|
+
let t = e.component, n = Yn(t, e.path), r = t?.appShellPageProps?.meta?.icon, i = t?.appShellPageProps?.meta?.breadcrumbTitle, a = e.guards && e.guards.length > 0 ? K(e.guards) : void 0, o = [];
|
|
1994
|
+
for (let t of e.children.values()) o.push(Xn(t));
|
|
1863
1995
|
return {
|
|
1864
1996
|
_type: "resource",
|
|
1865
1997
|
type: "component",
|
|
@@ -1869,16 +2001,16 @@ function Fn(e) {
|
|
|
1869
2001
|
icon: r,
|
|
1870
2002
|
...i === void 0 ? {} : { breadcrumbTitle: i }
|
|
1871
2003
|
},
|
|
1872
|
-
component: t ? () => /* @__PURE__ */
|
|
2004
|
+
component: t ? () => /* @__PURE__ */ N(t, {}) : void 0,
|
|
1873
2005
|
subResources: o.length > 0 ? o : void 0,
|
|
1874
|
-
errorBoundary: /* @__PURE__ */
|
|
2006
|
+
errorBoundary: /* @__PURE__ */ N(U, {}),
|
|
1875
2007
|
guards: e.guards,
|
|
1876
2008
|
loader: a
|
|
1877
2009
|
};
|
|
1878
2010
|
}
|
|
1879
|
-
function
|
|
1880
|
-
let t = e.component, n =
|
|
1881
|
-
for (let t of e.children.values()) o.push(
|
|
2011
|
+
function Zn(e) {
|
|
2012
|
+
let t = e.component, n = Yn(t, e.path), r = t?.appShellPageProps?.meta?.icon, i = t?.appShellPageProps?.meta?.breadcrumbTitle, a = e.guards && e.guards.length > 0 ? K(e.guards) : void 0, o = [];
|
|
2013
|
+
for (let t of e.children.values()) o.push(Xn(t));
|
|
1882
2014
|
return {
|
|
1883
2015
|
_type: "module",
|
|
1884
2016
|
type: "component",
|
|
@@ -1889,41 +2021,41 @@ function In(e) {
|
|
|
1889
2021
|
...i === void 0 ? {} : { breadcrumbTitle: i },
|
|
1890
2022
|
menuItemClickable: t !== void 0
|
|
1891
2023
|
},
|
|
1892
|
-
component: t ? () => /* @__PURE__ */
|
|
2024
|
+
component: t ? () => /* @__PURE__ */ N(t, {}) : void 0,
|
|
1893
2025
|
resources: o,
|
|
1894
|
-
errorBoundary: /* @__PURE__ */
|
|
2026
|
+
errorBoundary: /* @__PURE__ */ N(U, {}),
|
|
1895
2027
|
guards: e.guards,
|
|
1896
2028
|
loader: a
|
|
1897
2029
|
};
|
|
1898
2030
|
}
|
|
1899
|
-
function
|
|
2031
|
+
function Qn(e) {
|
|
1900
2032
|
if (e.length === 0) return [];
|
|
1901
|
-
let t =
|
|
2033
|
+
let t = Jn(e), n = [];
|
|
1902
2034
|
if (t.component) {
|
|
1903
|
-
let e =
|
|
2035
|
+
let e = Zn({
|
|
1904
2036
|
...t,
|
|
1905
2037
|
path: "",
|
|
1906
2038
|
children: /* @__PURE__ */ new Map()
|
|
1907
2039
|
});
|
|
1908
2040
|
n.push(e);
|
|
1909
2041
|
}
|
|
1910
|
-
for (let e of t.children.values()) n.push(
|
|
2042
|
+
for (let e of t.children.values()) n.push(Zn(e));
|
|
1911
2043
|
return n;
|
|
1912
2044
|
}
|
|
1913
2045
|
//#endregion
|
|
1914
2046
|
//#region src/components/appshell/appshell.tsx
|
|
1915
2047
|
var $ = (e) => {
|
|
1916
|
-
let t =
|
|
1917
|
-
|
|
2048
|
+
let t = qn();
|
|
2049
|
+
ze(e.contextData ?? {});
|
|
1918
2050
|
let { modules: n, rootComponent: r, rootGuards: i } = e, a = e.memory ? {
|
|
1919
2051
|
memory: !0,
|
|
1920
2052
|
initialEntries: e.initialEntries
|
|
1921
|
-
} : { memory: !1 }, o =
|
|
2053
|
+
} : { memory: !1 }, o = C(() => n && (n.some((e) => e.path === "") ? ((r || i?.length) && console.warn("[AppShell] Both a root module (path=\"\") and rootComponent/rootGuards are provided. The root module takes precedence; rootComponent and rootGuards will be ignored. Define guards directly on the root module instead."), n) : r || i?.length ? [Ge({
|
|
1922
2054
|
path: "",
|
|
1923
2055
|
...r ? {
|
|
1924
2056
|
meta: {
|
|
1925
|
-
title:
|
|
1926
|
-
icon: /* @__PURE__ */
|
|
2057
|
+
title: Le.t("home"),
|
|
2058
|
+
icon: /* @__PURE__ */ N(ne, {})
|
|
1927
2059
|
},
|
|
1928
2060
|
component: () => r()
|
|
1929
2061
|
} : { meta: {} },
|
|
@@ -1933,7 +2065,7 @@ var $ = (e) => {
|
|
|
1933
2065
|
n,
|
|
1934
2066
|
r,
|
|
1935
2067
|
i
|
|
1936
|
-
]), s =
|
|
2068
|
+
]), s = C(() => o ? ke({
|
|
1937
2069
|
modules: o,
|
|
1938
2070
|
settingsResources: e.settingsResources,
|
|
1939
2071
|
basePath: e.basePath,
|
|
@@ -1947,7 +2079,7 @@ var $ = (e) => {
|
|
|
1947
2079
|
e.errorBoundary,
|
|
1948
2080
|
e.locale,
|
|
1949
2081
|
e.timeZone
|
|
1950
|
-
]), c =
|
|
2082
|
+
]), c = C(() => s ? {
|
|
1951
2083
|
title: e.title,
|
|
1952
2084
|
icon: e.icon,
|
|
1953
2085
|
favicon: e.favicon,
|
|
@@ -1959,34 +2091,34 @@ var $ = (e) => {
|
|
|
1959
2091
|
e.favicon,
|
|
1960
2092
|
e.appInfo,
|
|
1961
2093
|
s
|
|
1962
|
-
]), l =
|
|
2094
|
+
]), l = C(() => ({ contextData: e.contextData ?? {} }), [e.contextData]);
|
|
1963
2095
|
if (!o || !c) {
|
|
1964
2096
|
let e = "[AppShell] No routes configured. Either use the appShellRoutes() vite-plugin for automatic page configuration, or pass the 'modules' prop for manual configuration.";
|
|
1965
|
-
return console.error(e), /* @__PURE__ */
|
|
2097
|
+
return console.error(e), /* @__PURE__ */ N("div", {
|
|
1966
2098
|
className: "astw:flex astw:min-h-screen astw:items-center astw:justify-center astw:bg-background astw:p-4",
|
|
1967
|
-
children: /* @__PURE__ */
|
|
2099
|
+
children: /* @__PURE__ */ P("div", {
|
|
1968
2100
|
className: "astw:max-w-md astw:rounded-lg astw:border astw:border-destructive/50 astw:bg-destructive/10 astw:p-6 astw:text-center",
|
|
1969
|
-
children: [/* @__PURE__ */
|
|
2101
|
+
children: [/* @__PURE__ */ N("h1", {
|
|
1970
2102
|
className: "astw:mb-2 astw:text-lg astw:font-semibold astw:text-destructive",
|
|
1971
2103
|
children: "Configuration Error"
|
|
1972
|
-
}), /* @__PURE__ */
|
|
2104
|
+
}), /* @__PURE__ */ N("p", {
|
|
1973
2105
|
className: "astw:text-sm astw:text-muted-foreground",
|
|
1974
2106
|
children: e
|
|
1975
2107
|
})]
|
|
1976
2108
|
})
|
|
1977
2109
|
});
|
|
1978
2110
|
}
|
|
1979
|
-
return t ? /* @__PURE__ */
|
|
2111
|
+
return t ? /* @__PURE__ */ N(B.Provider, {
|
|
1980
2112
|
value: c,
|
|
1981
|
-
children: /* @__PURE__ */
|
|
2113
|
+
children: /* @__PURE__ */ N(Ae.Provider, {
|
|
1982
2114
|
value: l,
|
|
1983
|
-
children: /* @__PURE__ */
|
|
2115
|
+
children: /* @__PURE__ */ N(et, { children: /* @__PURE__ */ N(yt, {
|
|
1984
2116
|
defaultColorTheme: e.defaultColorTheme,
|
|
1985
|
-
children: /* @__PURE__ */
|
|
2117
|
+
children: /* @__PURE__ */ N(cn, {
|
|
1986
2118
|
...a,
|
|
1987
|
-
children: /* @__PURE__ */
|
|
2119
|
+
children: /* @__PURE__ */ P(un, {
|
|
1988
2120
|
searchSources: e.searchSources,
|
|
1989
|
-
children: [e.children, /* @__PURE__ */
|
|
2121
|
+
children: [e.children, /* @__PURE__ */ N(Un, {})]
|
|
1990
2122
|
})
|
|
1991
2123
|
})
|
|
1992
2124
|
}) })
|
|
@@ -1994,18 +2126,18 @@ var $ = (e) => {
|
|
|
1994
2126
|
}) : null;
|
|
1995
2127
|
};
|
|
1996
2128
|
$.WithPages = (e) => {
|
|
1997
|
-
let t =
|
|
1998
|
-
return (e) => /* @__PURE__ */
|
|
2129
|
+
let t = Qn(e);
|
|
2130
|
+
return (e) => /* @__PURE__ */ N($, {
|
|
1999
2131
|
...e,
|
|
2000
2132
|
modules: t,
|
|
2001
2133
|
memory: !1
|
|
2002
2134
|
});
|
|
2003
2135
|
};
|
|
2004
|
-
var
|
|
2136
|
+
var $n = (e) => /* @__PURE__ */ N($, {
|
|
2005
2137
|
...e,
|
|
2006
2138
|
memory: !1
|
|
2007
2139
|
});
|
|
2008
|
-
|
|
2009
|
-
var
|
|
2140
|
+
$n.WithPages = $.WithPages;
|
|
2141
|
+
var er = $n;
|
|
2010
2142
|
//#endregion
|
|
2011
|
-
export {
|
|
2143
|
+
export { je as A, I as B, Ve as C, Ie as D, H as E, Ce as F, Se as I, L, Pe as M, z as N, Me as O, R as P, ge as R, Ke as S, He as T, pt as _, kn as a, Qe as b, X as c, fn as d, $t as f, Ct as g, q as h, jn as i, Ne as j, V as k, pn as l, Lt as m, $ as n, Dn as o, Qt as p, Hn as r, On as s, er as t, mn as u, bt as v, Be as w, Ge as x, rt as y, pe as z };
|