@tailor-platform/app-shell 1.14.0 → 1.15.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.
@@ -1,24 +1,24 @@
1
1
  import { capitalCase as e } from "change-case";
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, redirect as l, useLocation as u, useMatch as d, useNavigate as f, useRouteError as p, useRouteLoaderData as m } from "react-router";
3
- import { cva as h } from "class-variance-authority";
4
- import { useRender as g } from "@base-ui/react/use-render";
5
- import { clsx as _ } from "clsx";
6
- import { twMerge as v } from "tailwind-merge";
7
- import { AlertCircle as y, ChevronRight as b, HouseIcon as x, LoaderCircleIcon as S, SearchIcon as ee, Table as te, XIcon as ne } from "lucide-react";
8
- import { Suspense as C, createContext as w, useCallback as T, useContext as E, useEffect as D, useId as re, useMemo as O, useReducer as ie, useRef as k, useState as A, useSyncExternalStore as ae } from "react";
9
- import { getLocalTimeZone as oe, now as se, today as ce } from "@internationalized/date";
10
- import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
11
- import { RouterProvider as le } from "react-router/dom";
12
- import { Toaster as ue } from "sonner";
13
- import { Dialog as P } from "@base-ui/react/dialog";
14
- import { parsePath as de } from "@tailor-platform/vite-plugin-app-shell/parser";
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 { cva as g } from "class-variance-authority";
4
+ import { useRender as _ } from "@base-ui/react/use-render";
5
+ import { clsx as v } from "clsx";
6
+ import { twMerge as y } from "tailwind-merge";
7
+ import { AlertCircle as b, ChevronRight as x, HouseIcon as S, SearchIcon as C, Table as w, XIcon as T } from "lucide-react";
8
+ import { Suspense as E, createContext as D, useCallback as O, useContext as k, useEffect as A, useId as ee, useMemo as j, useReducer as te, useRef as M, useState as N, useSyncExternalStore as ne } from "react";
9
+ import { getLocalTimeZone as re, now as ie, today as ae } from "@internationalized/date";
10
+ import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
11
+ import { RouterProvider as oe } from "react-router/dom";
12
+ import { Toaster as se } from "sonner";
13
+ import { Dialog as L } from "@base-ui/react/dialog";
14
+ import { parsePath as ce } from "@tailor-platform/vite-plugin-app-shell/parser";
15
15
  //#region src/lib/utils.ts
16
- function F(...e) {
17
- return v(_(e));
16
+ function R(...e) {
17
+ return y(v(e));
18
18
  }
19
19
  //#endregion
20
20
  //#region src/components/button/button.tsx
21
- var fe = h("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", {
21
+ var le = g("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
22
  variants: {
23
23
  variant: {
24
24
  default: "astw:bg-primary astw:text-primary-foreground astw:shadow-xs astw:hover:bg-primary/90",
@@ -41,13 +41,13 @@ var fe = h("astw:inline-flex astw:cursor-pointer astw:items-center astw:justify-
41
41
  size: "default"
42
42
  }
43
43
  });
44
- function I({ className: e, variant: t, size: n, render: r, children: i, ...a }) {
45
- return g({
44
+ function z({ className: e, variant: t, size: n, render: r, children: i, ...a }) {
45
+ return _({
46
46
  defaultTagName: "button",
47
47
  render: r,
48
48
  props: {
49
49
  "data-slot": "button",
50
- className: F(fe({
50
+ className: R(le({
51
51
  variant: t,
52
52
  size: n,
53
53
  className: e
@@ -57,7 +57,7 @@ function I({ className: e, variant: t, size: n, render: r, children: i, ...a })
57
57
  }
58
58
  });
59
59
  }
60
- var pe = () => {
60
+ var ue = () => {
61
61
  try {
62
62
  if (typeof navigator > "u") return "en";
63
63
  let e = navigator.languages?.[0] ?? navigator.language;
@@ -65,61 +65,61 @@ var pe = () => {
65
65
  } catch {
66
66
  return "en";
67
67
  }
68
- }, me = () => {
68
+ }, de = () => {
69
69
  try {
70
70
  return typeof navigator > "u" ? "en" : navigator.languages?.[0] ?? navigator.language ?? "en";
71
71
  } catch {
72
72
  return "en";
73
73
  }
74
- }, he = (e) => {
74
+ }, fe = (e) => {
75
75
  try {
76
76
  return new Intl.Locale(e).language;
77
77
  } catch {
78
78
  return e;
79
79
  }
80
- }, L = (e) => (t, n) => t ? typeof t == "string" ? t : t(e) ?? n : n, ge = (t) => {
81
- let n = L(t);
80
+ }, B = (e) => (t, n) => t ? typeof t == "string" ? t : t(e) ?? n : n, pe = (t) => {
81
+ let n = B(t);
82
82
  return (t, r) => n(t, typeof t == "string" ? t : e(r));
83
- }, _e = (e) => ({
83
+ }, me = (e) => ({
84
84
  modules: e.modules,
85
85
  settingsResources: e.settingsResources ?? [],
86
- errorBoundary: e.errorBoundary ?? /* @__PURE__ */ M(U, {}),
86
+ errorBoundary: e.errorBoundary ?? /* @__PURE__ */ F(W, {}),
87
87
  basePath: e.basePath,
88
- locale: e.locale ? he(e.locale) : pe(),
89
- resolvedLocale: e.locale ?? me(),
88
+ locale: e.locale ? fe(e.locale) : ue(),
89
+ resolvedLocale: e.locale ?? de(),
90
90
  timeZone: e.timeZone
91
- }), R = w({ configurations: {
91
+ }), V = D({ configurations: {
92
92
  modules: [],
93
93
  settingsResources: [],
94
94
  locale: "en",
95
95
  errorBoundary: null
96
- } }), z = w({ contextData: {} }), B = () => E(R), ve = () => E(z), ye = () => {
97
- let e = E(R), t = E(z);
96
+ } }), he = D({ contextData: {} }), H = () => k(V), ge = () => k(he), _e = () => {
97
+ let e = k(V), t = k(he);
98
98
  return {
99
99
  ...e,
100
100
  ...t
101
101
  };
102
- }, be = () => {
103
- let { configurations: e } = E(R);
102
+ }, ve = () => {
103
+ let { configurations: e } = k(V);
104
104
  return {
105
105
  locale: e.resolvedLocale ?? e.locale,
106
106
  language: e.locale
107
107
  };
108
- }, xe = () => {
109
- let { configurations: e } = E(R), t = e.timeZone ?? oe();
108
+ }, ye = () => {
109
+ let { configurations: e } = k(V), t = e.timeZone ?? re();
110
110
  return {
111
111
  value: t,
112
- today: () => ce(t),
113
- now: () => se(t)
112
+ today: () => ae(t),
113
+ now: () => ie(t)
114
114
  };
115
- }, Se = () => {
116
- let { configurations: e } = B(), t = L(e.locale);
115
+ }, be = () => {
116
+ let { configurations: e } = H(), t = B(e.locale);
117
117
  return (e, n) => t(e, n);
118
- }, Ce = (e) => {
118
+ }, xe = (e) => {
119
119
  let t = (t) => (n) => e[t]?.[n] ?? e.en[n];
120
120
  return {
121
121
  useT: () => {
122
- let { configurations: n } = B(), r = t(n.locale), i = ((e, ...t) => {
122
+ let { configurations: n } = H(), r = t(n.locale), i = ((e, ...t) => {
123
123
  let n = r(e);
124
124
  return typeof n == "function" ? n(t[0]) : n;
125
125
  });
@@ -133,7 +133,7 @@ var pe = () => {
133
133
  return typeof i == "function" ? i(n[0]) : i;
134
134
  }
135
135
  };
136
- }, V = Ce({
136
+ }, Se = xe({
137
137
  en: {
138
138
  home: "Home",
139
139
  error404Title: "404 Not Found",
@@ -158,11 +158,30 @@ var pe = () => {
158
158
  commandPalettePages: "Pages",
159
159
  commandPaletteSearchModes: "Search Modes",
160
160
  commandPaletteSearching: "Searching...",
161
+ commandPaletteLoadingRoutes: "Loading current page routes...",
161
162
  appInfoTitle: "App info",
162
163
  appInfoDescription: "Information about the current app and AppShell.",
163
164
  appInfoAppName: "App name",
164
165
  appInfoAppShellVersion: "AppShell version",
165
- appInfoCopy: "Copy"
166
+ appInfoCopy: "Copy",
167
+ aiChatMessage: "Message",
168
+ aiChatSend: "Send",
169
+ aiChatSending: "Sending…",
170
+ aiChatStop: "Stop",
171
+ aiChatScrollToLatest: "Scroll to latest message",
172
+ aiChatDeleteConversation: (e) => `Delete "${e.title}"`,
173
+ aiChatConversationHistory: "Conversation history",
174
+ aiChatThinking: "Thinking…",
175
+ aiChatThoughtFor: (e) => `Thought for ${e.seconds}s`,
176
+ aiChatReasoning: "Reasoning",
177
+ aiChatChainOfThought: "Chain of thought",
178
+ aiChatToolPreparing: "Preparing",
179
+ aiChatToolRunning: "Running",
180
+ aiChatToolDone: "Done",
181
+ aiChatToolError: "Error",
182
+ aiChatToolParameters: "Parameters",
183
+ aiChatToolResult: "Result",
184
+ aiChatSourcesUsed: (e) => `Used ${e.count} ${e.count === 1 ? "source" : "sources"}`
166
185
  },
167
186
  ja: {
168
187
  home: "ホーム",
@@ -188,32 +207,51 @@ var pe = () => {
188
207
  commandPalettePages: "ページ",
189
208
  commandPaletteSearchModes: "検索モード",
190
209
  commandPaletteSearching: "検索中...",
210
+ commandPaletteLoadingRoutes: "現在のページの候補を読み込み中...",
191
211
  appInfoTitle: "アプリ情報",
192
212
  appInfoDescription: "現在のアプリと AppShell の情報です。",
193
213
  appInfoAppName: "アプリ名",
194
214
  appInfoAppShellVersion: "AppShell バージョン",
195
- appInfoCopy: "コピー"
215
+ appInfoCopy: "コピー",
216
+ aiChatMessage: "メッセージ",
217
+ aiChatSend: "送信",
218
+ aiChatSending: "送信中…",
219
+ aiChatStop: "停止",
220
+ aiChatScrollToLatest: "最新のメッセージまでスクロール",
221
+ aiChatDeleteConversation: (e) => `「${e.title}」を削除`,
222
+ aiChatConversationHistory: "会話履歴",
223
+ aiChatThinking: "思考中…",
224
+ aiChatThoughtFor: (e) => `${e.seconds}秒 思考しました`,
225
+ aiChatReasoning: "思考",
226
+ aiChatChainOfThought: "思考の流れ",
227
+ aiChatToolPreparing: "準備中",
228
+ aiChatToolRunning: "実行中",
229
+ aiChatToolDone: "完了",
230
+ aiChatToolError: "エラー",
231
+ aiChatToolParameters: "パラメータ",
232
+ aiChatToolResult: "結果",
233
+ aiChatSourcesUsed: (e) => `${e.count} 件の出典を使用`
196
234
  }
197
- }), H = V.useT, U = () => {
198
- let e = p(), t = H(), n = {
235
+ }), U = Se.useT, W = () => {
236
+ let e = m(), t = U(), n = {
199
237
  role: "alert",
200
238
  "aria-label": "default-error-boundary"
201
239
  };
202
- if (c(e) && e.status === 404) return /* @__PURE__ */ M("div", {
240
+ if (c(e) && e.status === 404) return /* @__PURE__ */ F("div", {
203
241
  ...n,
204
242
  className: "astw:p-6",
205
- children: /* @__PURE__ */ N("div", {
243
+ children: /* @__PURE__ */ I("div", {
206
244
  className: "astw:flex astw:items-start astw:gap-4",
207
- children: [/* @__PURE__ */ M(y, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ N("div", { children: [
208
- /* @__PURE__ */ M("h1", {
245
+ children: [/* @__PURE__ */ F(b, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ I("div", { children: [
246
+ /* @__PURE__ */ F("h1", {
209
247
  className: "astw:font-semibold astw:text-lg",
210
248
  children: t("error404Title")
211
249
  }),
212
- /* @__PURE__ */ M("p", {
250
+ /* @__PURE__ */ F("p", {
213
251
  className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
214
252
  children: t("error404Body")
215
253
  }),
216
- /* @__PURE__ */ M(I, {
254
+ /* @__PURE__ */ F(z, {
217
255
  variant: "outline",
218
256
  size: "sm",
219
257
  className: "astw:mt-4",
@@ -224,21 +262,21 @@ var pe = () => {
224
262
  })
225
263
  });
226
264
  let r = e instanceof Error ? e.message : t("errorUnexpected");
227
- return /* @__PURE__ */ M("div", {
265
+ return /* @__PURE__ */ F("div", {
228
266
  ...n,
229
267
  className: "astw:p-6",
230
- children: /* @__PURE__ */ N("div", {
268
+ children: /* @__PURE__ */ I("div", {
231
269
  className: "astw:flex astw:items-start astw:gap-4",
232
- children: [/* @__PURE__ */ M(y, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ N("div", { children: [
233
- /* @__PURE__ */ M("h1", {
270
+ children: [/* @__PURE__ */ F(b, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }), /* @__PURE__ */ I("div", { children: [
271
+ /* @__PURE__ */ F("h1", {
234
272
  className: "astw:font-semibold astw:text-lg",
235
273
  children: t("errorTitle")
236
274
  }),
237
- /* @__PURE__ */ M("p", {
275
+ /* @__PURE__ */ F("p", {
238
276
  className: "astw:text-sm astw:text-muted-foreground astw:mt-1",
239
277
  children: r
240
278
  }),
241
- /* @__PURE__ */ M(I, {
279
+ /* @__PURE__ */ F(z, {
242
280
  variant: "outline",
243
281
  size: "sm",
244
282
  className: "astw:mt-4",
@@ -248,32 +286,32 @@ var pe = () => {
248
286
  ] })]
249
287
  })
250
288
  });
251
- }, we = {}, Te = (e) => {
252
- we = e;
253
- }, Ee = () => ({ type: "pass" }), De = () => ({ type: "hidden" }), Oe = (e) => ({
289
+ }, Ce = {}, we = (e) => {
290
+ Ce = e;
291
+ }, Te = () => ({ type: "pass" }), Ee = () => ({ type: "hidden" }), De = (e) => ({
254
292
  type: "redirect",
255
293
  to: e
256
- }), W = () => new Response("Not Found", { status: 404 }), G = async (e) => {
294
+ }), G = () => new Response("Not Found", { status: 404 }), K = async (e) => {
257
295
  if (!e || e.length === 0) return { type: "pass" };
258
- let t = { context: we };
296
+ let t = { context: Ce };
259
297
  for (let n of e) {
260
298
  let e = await n(t);
261
299
  if (e.type !== "pass") return e;
262
300
  }
263
301
  return { type: "pass" };
264
- }, K = (e, t) => async (n) => {
265
- let r = await G(e);
302
+ }, q = (e, t) => async (n) => {
303
+ let r = await K(e);
266
304
  switch (r.type) {
267
- case "hidden": throw W();
268
- case "redirect": return l(r.to);
305
+ case "hidden": throw G();
306
+ case "redirect": return u(r.to);
269
307
  case "pass": return t ? t(n) : null;
270
308
  }
271
- }, q = (t) => t === "" || t === "/" ? V.t("home") : e(t), ke = (e, t) => () => {
272
- let { configurations: n } = B(), { metaTitle: r, fallbackTitle: i } = e;
273
- return t(L(n.locale)(r, typeof i == "function" ? i(n.locale) : i));
309
+ }, Oe = (t) => t === "" || t === "/" ? Se.t("home") : e(t), ke = (e, t) => () => {
310
+ let { configurations: n } = H(), { metaTitle: r, fallbackTitle: i } = e;
311
+ return t(B(n.locale)(r, typeof i == "function" ? i(n.locale) : i));
274
312
  };
275
313
  function Ae(e) {
276
- let { path: t, meta: n, component: r, resources: i, errorBoundary: a, guards: o } = e, s = n?.title ?? q(t), c = q(t), l = o && o.length > 0 ? K(o) : void 0;
314
+ let { path: t, meta: n, component: r, resources: i, errorBoundary: a, guards: o } = e, s = n?.title ?? Oe(t), c = Oe(t), l = o && o.length > 0 ? q(o) : void 0;
277
315
  return {
278
316
  path: t,
279
317
  type: "component",
@@ -294,12 +332,12 @@ function Ae(e) {
294
332
  icon: e.meta?.icon
295
333
  },
296
334
  resources: i,
297
- errorBoundary: a || /* @__PURE__ */ M(U, {}),
335
+ errorBoundary: a || /* @__PURE__ */ F(W, {}),
298
336
  guards: o
299
337
  };
300
338
  }
301
339
  function je(t) {
302
- 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 ? ke({
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 ? q(s) : void 0, d = r ? ke({
303
341
  metaTitle: c,
304
342
  fallbackTitle: l
305
343
  }, (e) => r({
@@ -317,14 +355,14 @@ function je(t) {
317
355
  },
318
356
  component: d,
319
357
  subResources: i,
320
- errorBoundary: o ?? /* @__PURE__ */ M(U, {}),
358
+ errorBoundary: o ?? /* @__PURE__ */ F(W, {}),
321
359
  guards: s,
322
360
  loader: u
323
361
  };
324
362
  }
325
363
  var Me = {
326
364
  name: "@tailor-platform/app-shell",
327
- version: "1.14.0",
365
+ version: "1.15.0",
328
366
  description: "An opinionated React application framework for building ERP applications on Tailor Platform",
329
367
  keywords: [
330
368
  "app-shell",
@@ -373,7 +411,7 @@ var Me = {
373
411
  "type-check": "tsc --incremental"
374
412
  },
375
413
  dependencies: {
376
- "@base-ui/react": "1.6.0",
414
+ "@base-ui/react": "1.8.0",
377
415
  "@internationalized/date": "3.12.2",
378
416
  "@standard-schema/spec": "^1.1.0",
379
417
  "@tailor-platform/auth-public-client": "^0.6.1",
@@ -382,7 +420,7 @@ var Me = {
382
420
  "class-variance-authority": "^0.7.1",
383
421
  clsx: "^2.1.1",
384
422
  "encoding-japanese": "^2.2.0",
385
- "lucide-react": "^1.8.0",
423
+ "lucide-react": "catalog:",
386
424
  openai: "6.45.0",
387
425
  papaparse: "^5.5.3",
388
426
  "react-router": "^8.3.0",
@@ -403,7 +441,7 @@ var Me = {
403
441
  "@vitejs/plugin-react": "catalog:",
404
442
  "@vitest/coverage-v8": "4.1.10",
405
443
  "happy-dom": "20.9.0",
406
- postcss: "8.5.26",
444
+ postcss: "8.5.28",
407
445
  react: "catalog:",
408
446
  "react-dom": "catalog:",
409
447
  "react-hook-form": "7.71.2",
@@ -422,25 +460,25 @@ var Me = {
422
460
  //#endregion
423
461
  //#region src/components/card/card.tsx
424
462
  function Ne({ className: e, ...t }) {
425
- return /* @__PURE__ */ M("div", {
463
+ return /* @__PURE__ */ F("div", {
426
464
  "data-slot": "card",
427
- className: F("astw:bg-card astw:text-card-foreground astw:flex astw:flex-col astw:rounded-xl astw:border astw:border-border astw:shadow-xs", e),
465
+ className: R("astw:bg-card astw:text-card-foreground astw:flex astw:flex-col astw:rounded-xl astw:border astw:border-border astw:shadow-xs", e),
428
466
  ...t
429
467
  });
430
468
  }
431
469
  Ne.displayName = "Card.Root";
432
470
  function Pe({ className: e, title: t, description: n, children: r, ...i }) {
433
- return /* @__PURE__ */ N("div", {
471
+ return /* @__PURE__ */ I("div", {
434
472
  "data-slot": "card-header",
435
- className: F("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),
473
+ className: R("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),
436
474
  ...i,
437
475
  children: [
438
- t && /* @__PURE__ */ M("h3", {
476
+ t && /* @__PURE__ */ F("h3", {
439
477
  "data-slot": "card-title",
440
478
  className: "astw:text-lg astw:font-semibold astw:leading-none astw:text-card-foreground",
441
479
  children: t
442
480
  }),
443
- n && /* @__PURE__ */ M("div", {
481
+ n && /* @__PURE__ */ F("div", {
444
482
  "data-slot": "card-description",
445
483
  className: "astw:text-muted-foreground astw:text-sm",
446
484
  children: n
@@ -451,31 +489,31 @@ function Pe({ className: e, title: t, description: n, children: r, ...i }) {
451
489
  }
452
490
  Pe.displayName = "Card.Header";
453
491
  function Fe({ className: e, ...t }) {
454
- return /* @__PURE__ */ M("div", {
492
+ return /* @__PURE__ */ F("div", {
455
493
  "data-slot": "card-content",
456
- className: F("astw:px-6 astw:pb-6 astw:first:pt-6", e),
494
+ className: R("astw:px-6 astw:pb-6 astw:first:pt-6", e),
457
495
  ...t
458
496
  });
459
497
  }
460
498
  Fe.displayName = "Card.Content";
461
- var J = {
499
+ var Ie = {
462
500
  Root: Ne,
463
501
  Header: Pe,
464
502
  Content: Fe
465
- }, Ie = w(null), Le = ({ children: e }) => {
466
- let [t, n] = A(() => /* @__PURE__ */ new Map()), r = T((e, t) => {
503
+ }, Le = D(null), Re = ({ children: e }) => {
504
+ let [t, n] = N(() => /* @__PURE__ */ new Map()), r = O((e, t) => {
467
505
  n((n) => {
468
506
  let r = new Map(n);
469
507
  return r.set(e, t), r;
470
508
  });
471
- }, []), i = T((e) => {
509
+ }, []), i = O((e) => {
472
510
  n((t) => {
473
511
  if (!t.has(e)) return t;
474
512
  let n = new Map(t);
475
513
  return n.delete(e), n;
476
514
  });
477
515
  }, []);
478
- return /* @__PURE__ */ M(Ie.Provider, {
516
+ return /* @__PURE__ */ F(Le.Provider, {
479
517
  value: {
480
518
  overrides: t,
481
519
  register: r,
@@ -483,16 +521,16 @@ var J = {
483
521
  },
484
522
  children: e
485
523
  });
486
- }, Re = () => {
487
- let e = E(Ie);
524
+ }, ze = () => {
525
+ let e = k(Le);
488
526
  if (!e) throw Error("useBreadcrumbOverride must be used within BreadcrumbOverrideProvider");
489
527
  return e;
490
- }, ze = () => E(Ie);
528
+ }, Be = () => k(Le);
491
529
  //#endregion
492
530
  //#region src/hooks/use-override-breadcrumb.ts
493
- function Be(e) {
494
- let t = u(), { register: n, unregister: r } = Re(), i = t.pathname;
495
- D(() => (e ? n(i, e) : r(i), () => r(i)), [
531
+ function Ve(e) {
532
+ let t = d(), { register: n, unregister: r } = ze(), i = t.pathname;
533
+ A(() => (e ? n(i, e) : r(i), () => r(i)), [
496
534
  i,
497
535
  e,
498
536
  n,
@@ -501,25 +539,25 @@ function Be(e) {
501
539
  }
502
540
  //#endregion
503
541
  //#region src/components/internals/app-info/app-info.tsx
504
- var Ve = "__appinfo", He = `/${Ve}`, Ue = Me.version, We = (e) => e == null ? "-" : String(e), Ge = (e) => e.map((e) => `${e.label}: ${We(e.value)}`).join("\n"), Ke = ({ label: e, value: t }) => /* @__PURE__ */ N("div", {
542
+ var He = "__appinfo", Ue = `/${He}`, We = Me.version, Ge = (e) => e == null ? "-" : String(e), Ke = (e) => e.map((e) => `${e.label}: ${Ge(e.value)}`).join("\n"), qe = ({ label: e, value: t }) => /* @__PURE__ */ I("div", {
505
543
  className: "astw:grid astw:gap-1 astw:py-3 astw:sm:grid-cols-[12rem_minmax(0,1fr)] astw:sm:gap-4",
506
- children: [/* @__PURE__ */ M("dt", {
544
+ children: [/* @__PURE__ */ F("dt", {
507
545
  className: "astw:text-sm astw:text-muted-foreground",
508
546
  children: e
509
- }), /* @__PURE__ */ M("dd", {
547
+ }), /* @__PURE__ */ F("dd", {
510
548
  className: "astw:min-w-0 astw:text-sm astw:break-all",
511
- children: We(t)
549
+ children: Ge(t)
512
550
  })]
513
- }), qe = () => {
514
- let e = H();
551
+ }), Je = () => {
552
+ let e = U();
515
553
  return {
516
- path: He,
554
+ path: Ue,
517
555
  title: e("appInfoTitle"),
518
556
  breadcrumb: [e("appInfoTitle")]
519
557
  };
520
- }, Je = () => {
521
- let e = H(), { title: t, appInfo: n } = B();
522
- Be(e("appInfoTitle"));
558
+ }, Ye = () => {
559
+ let e = U(), { title: t, appInfo: n } = H();
560
+ Ve(e("appInfoTitle"));
523
561
  let r = [
524
562
  ...t ? [{
525
563
  label: e("appInfoAppName"),
@@ -527,37 +565,37 @@ var Ve = "__appinfo", He = `/${Ve}`, Ue = Me.version, We = (e) => e == null ? "-
527
565
  }] : [],
528
566
  {
529
567
  label: e("appInfoAppShellVersion"),
530
- value: Ue
568
+ value: We
531
569
  },
532
570
  ...n?.metadata ?? []
533
571
  ];
534
- return /* @__PURE__ */ M("div", {
572
+ return /* @__PURE__ */ F("div", {
535
573
  className: "astw:w-full astw:max-w-xl",
536
- children: /* @__PURE__ */ N(J.Root, { children: [/* @__PURE__ */ N("div", {
574
+ children: /* @__PURE__ */ I(Ie.Root, { children: [/* @__PURE__ */ I("div", {
537
575
  className: "astw:flex astw:items-center astw:justify-between astw:px-6 astw:pt-6 astw:pb-4",
538
- children: [/* @__PURE__ */ M("h1", {
576
+ children: [/* @__PURE__ */ F("h1", {
539
577
  className: "astw:text-lg astw:font-semibold astw:leading-none",
540
578
  children: e("appInfoTitle")
541
- }), /* @__PURE__ */ M(I, {
579
+ }), /* @__PURE__ */ F(z, {
542
580
  variant: "outline",
543
581
  size: "sm",
544
582
  onClick: async () => {
545
583
  try {
546
- await navigator.clipboard.writeText(Ge(r));
584
+ await navigator.clipboard.writeText(Ke(r));
547
585
  } catch {}
548
586
  },
549
587
  children: e("appInfoCopy")
550
588
  })]
551
- }), /* @__PURE__ */ M(J.Content, { children: /* @__PURE__ */ M("dl", { children: r.map((e, t) => /* @__PURE__ */ M("div", {
589
+ }), /* @__PURE__ */ F(Ie.Content, { children: /* @__PURE__ */ F("dl", { children: r.map((e, t) => /* @__PURE__ */ F("div", {
552
590
  className: t > 0 ? "astw:border-t astw:border-border" : void 0,
553
- children: /* @__PURE__ */ M(Ke, { ...e })
591
+ children: /* @__PURE__ */ F(qe, { ...e })
554
592
  }, `${e.label}-${t}`)) }) })] })
555
593
  });
556
- }, Ye = [
594
+ }, Xe = [
557
595
  "light",
558
596
  "dark",
559
597
  "system"
560
- ], Xe = [
598
+ ], Ze = [
561
599
  {
562
600
  value: "light",
563
601
  label: "Light"
@@ -570,8 +608,8 @@ var Ve = "__appinfo", He = `/${Ve}`, Ue = Me.version, We = (e) => e == null ? "-
570
608
  value: "system",
571
609
  label: "System"
572
610
  }
573
- ], Ze = "appshell-ui-theme";
574
- function Qe(e, t, n) {
611
+ ], Qe = "appshell-ui-theme";
612
+ function $e(e, t, n) {
575
613
  if (typeof window > "u") return n;
576
614
  try {
577
615
  let r = localStorage.getItem(e);
@@ -580,22 +618,22 @@ function Qe(e, t, n) {
580
618
  return n;
581
619
  }
582
620
  }
583
- function $e(e, t) {
621
+ function et(e, t) {
584
622
  return e === "system" ? t ? "dark" : "light" : e;
585
623
  }
586
- function et() {
624
+ function tt() {
587
625
  return typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches;
588
626
  }
589
- var tt = w(void 0);
590
- function nt({ children: e, defaultColorTheme: t = "system" }) {
591
- let [n, r] = A(() => Qe(Ze, Ye, t)), [i, a] = A(() => $e(Qe(Ze, Ye, t), et())), o = T((e) => {
627
+ var nt = D(void 0);
628
+ function rt({ children: e, defaultColorTheme: t = "system" }) {
629
+ let [n, r] = N(() => $e(Qe, Xe, t)), [i, a] = N(() => et($e(Qe, Xe, t), tt())), o = O((e) => {
592
630
  let t = window.document.documentElement;
593
631
  t.classList.remove("light", "dark"), t.classList.add(e);
594
632
  }, []);
595
- D(() => {
633
+ A(() => {
596
634
  o(i);
597
635
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => {
598
- let t = $e(n, e.matches);
636
+ let t = et(n, e.matches);
599
637
  a(t);
600
638
  };
601
639
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
@@ -604,14 +642,14 @@ function nt({ children: e, defaultColorTheme: t = "system" }) {
604
642
  i,
605
643
  o
606
644
  ]);
607
- let s = T((e) => {
645
+ let s = O((e) => {
608
646
  try {
609
- localStorage.setItem(Ze, e);
647
+ localStorage.setItem(Qe, e);
610
648
  } catch {}
611
649
  r(e);
612
- let t = $e(e, et());
650
+ let t = et(e, tt());
613
651
  a(t), o(t);
614
- }, [o]), c = O(() => ({
652
+ }, [o]), c = j(() => ({
615
653
  colorTheme: n,
616
654
  resolvedColorTheme: i,
617
655
  setColorTheme: s
@@ -620,16 +658,16 @@ function nt({ children: e, defaultColorTheme: t = "system" }) {
620
658
  i,
621
659
  s
622
660
  ]);
623
- return /* @__PURE__ */ M(tt.Provider, {
661
+ return /* @__PURE__ */ F(nt.Provider, {
624
662
  value: c,
625
663
  children: e
626
664
  });
627
665
  }
628
- var rt = () => {
629
- let e = E(tt);
666
+ var it = () => {
667
+ let e = k(nt);
630
668
  if (e === void 0) throw Error("useTheme must be used within a ThemeProvider");
631
669
  let { colorTheme: t, resolvedColorTheme: n, setColorTheme: r } = e;
632
- return O(() => ({
670
+ return j(() => ({
633
671
  theme: t,
634
672
  resolvedTheme: n,
635
673
  setTheme: r
@@ -638,9 +676,9 @@ var rt = () => {
638
676
  n,
639
677
  r
640
678
  ]);
641
- }, it = ({ ...e }) => {
642
- let { resolvedTheme: t } = rt();
643
- return /* @__PURE__ */ M(ue, {
679
+ }, at = ({ ...e }) => {
680
+ let { resolvedTheme: t } = it();
681
+ return /* @__PURE__ */ F(se, {
644
682
  theme: t,
645
683
  className: "astw:toaster astw:group",
646
684
  style: {
@@ -650,41 +688,41 @@ var rt = () => {
650
688
  },
651
689
  ...e
652
690
  });
653
- }, at = () => {
654
- let e = H();
655
- return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("p", {
691
+ }, ot = () => {
692
+ let e = U();
693
+ return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("p", {
656
694
  className: "astw:font-semibold astw:leading-none astw:tracking-tight",
657
695
  children: e("welcomeTitle")
658
- }), /* @__PURE__ */ M("p", {
696
+ }), /* @__PURE__ */ F("p", {
659
697
  className: "pt-4",
660
698
  children: e("welcomeBody")
661
699
  })] });
662
- }, ot = () => /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(a, {}), /* @__PURE__ */ M(it, {})] }), st = () => {
663
- let { configurations: e } = ye(), t = H(), n = Se();
664
- return /* @__PURE__ */ N("div", {
700
+ }, st = () => /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(a, {}), /* @__PURE__ */ F(at, {})] }), ct = () => {
701
+ let { configurations: e } = _e(), t = U(), n = be();
702
+ return /* @__PURE__ */ I("div", {
665
703
  className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full",
666
- children: [/* @__PURE__ */ M("div", { children: /* @__PURE__ */ N("nav", {
704
+ children: [/* @__PURE__ */ F("div", { children: /* @__PURE__ */ I("nav", {
667
705
  className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:border-border astw:p-3 astw:shadow-xs",
668
- children: [/* @__PURE__ */ M("h2", {
706
+ children: [/* @__PURE__ */ F("h2", {
669
707
  className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ",
670
708
  children: t("settings")
671
- }), /* @__PURE__ */ M("ul", {
709
+ }), /* @__PURE__ */ F("ul", {
672
710
  className: "astw:flex astw:flex-col astw:gap-1",
673
- children: e.settingsResources.map((e) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ M(r, {
711
+ children: e.settingsResources.map((e) => /* @__PURE__ */ F("li", { children: /* @__PURE__ */ F(r, {
674
712
  to: `./${e.path}`,
675
- children: ({ isActive: t }) => /* @__PURE__ */ N(I, {
713
+ children: ({ isActive: t }) => /* @__PURE__ */ I(z, {
676
714
  variant: t ? "secondary" : "ghost",
677
715
  className: "astw:w-full astw:justify-start",
678
716
  children: [e.meta.icon, n(e.meta.title, e.path)]
679
717
  })
680
718
  }) }, e.path))
681
719
  })]
682
- }) }), /* @__PURE__ */ M("section", {
720
+ }) }), /* @__PURE__ */ F("section", {
683
721
  className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:border-border astw:shadow-xs",
684
- children: /* @__PURE__ */ M(a, {})
722
+ children: /* @__PURE__ */ F(a, {})
685
723
  })]
686
724
  });
687
- }, ct = (e) => () => /* @__PURE__ */ M(j, { children: e }), lt = (e) => e.component ? {
725
+ }, lt = (e) => () => /* @__PURE__ */ F(P, { children: e }), ut = (e) => e.component ? {
688
726
  index: !0,
689
727
  Component: e.component,
690
728
  ...e.loader && { loader: e.loader }
@@ -694,156 +732,71 @@ var rt = () => {
694
732
  loader: async (t) => {
695
733
  let n = await e.loader(t);
696
734
  if (n instanceof Response) return n;
697
- throw W();
735
+ throw G();
698
736
  }
699
737
  } : {
700
738
  index: !0,
701
739
  Component: () => null,
702
740
  loader: () => {
703
- throw W();
741
+ throw G();
704
742
  }
705
- }, ut = (e, t, n) => {
706
- let r = e.errorBoundary || n, i = (t ?? []).map((e) => ut(e, e.subResources, r)), a = [lt(e), ...i];
743
+ }, dt = (e, t, n) => {
744
+ let r = e.errorBoundary || n, i = (t ?? []).map((e) => dt(e, e.subResources, r)), a = [ut(e), ...i];
707
745
  return {
708
746
  path: e.path,
709
- ...e.errorBoundary && { ErrorBoundary: ct(e.errorBoundary) },
747
+ handle: { node: e },
748
+ ...e.errorBoundary && { ErrorBoundary: lt(e.errorBoundary) },
710
749
  ...a.length > 0 ? { children: a } : {}
711
750
  };
712
- }, dt = (e) => e.map((e) => ut(e, e.resources, e.errorBoundary)), ft = ({ modules: e, settingsResources: t }) => {
713
- let n = e.some((e) => e.path === "") ? null : lt({
751
+ }, ft = (e) => e.map((e) => dt(e, e.resources, e.errorBoundary)), pt = ({ modules: e, settingsResources: t }) => {
752
+ let n = e.some((e) => e.path === "") ? null : ut({
714
753
  path: "",
715
- component: at
754
+ component: ot
716
755
  }), r = t.length > 0 ? [{
717
756
  path: "settings",
718
757
  index: !0,
719
- Component: () => /* @__PURE__ */ M(i, {
758
+ Component: () => /* @__PURE__ */ F(i, {
720
759
  to: t[0].path,
721
760
  relative: "path",
722
761
  replace: !0
723
762
  })
724
763
  }, {
725
764
  path: "settings",
726
- Component: st,
765
+ Component: ct,
727
766
  children: t.map((e) => {
728
767
  if (!e.component) throw Error(`Settings resource "${e.path}" must have a component.`);
729
768
  return {
730
769
  path: e.path,
731
770
  Component: e.component,
732
- ...e.errorBoundary && { ErrorBoundary: ct(e.errorBoundary) }
771
+ ...e.errorBoundary && { ErrorBoundary: lt(e.errorBoundary) }
733
772
  };
734
773
  })
735
774
  }] : [];
736
775
  return [
737
776
  ...n ? [n] : [],
738
- { children: dt(e) },
777
+ { children: ft(e) },
739
778
  {
740
- path: Ve,
741
- Component: Je
779
+ path: He,
780
+ Component: Ye
742
781
  },
743
782
  ...r,
744
783
  {
745
784
  path: "*",
746
785
  loader: () => {
747
- throw W();
786
+ throw G();
748
787
  },
749
788
  Component: () => null,
750
- ErrorBoundary: U
789
+ ErrorBoundary: W
751
790
  }
752
791
  ];
753
- }, pt = "appshell-root-nav", mt = (e) => ({
754
- loaderID: pt,
755
- loader: async () => ({ navItems: gt(e) })
756
- }), ht = () => m(pt)?.navItems, gt = async (e) => {
757
- let t = ge(e.locale);
758
- return (await Promise.all(e.modules.map(async (e) => {
759
- if (e.path.startsWith(":") || (await G(e.guards)).type !== "pass") return null;
760
- let n = await _t(e.resources, e.path, t);
761
- return n.length === 0 && !e.meta.menuItemClickable ? null : {
762
- module: e,
763
- resources: n
764
- };
765
- }))).filter((e) => e !== null).map(({ module: e, resources: n }) => ({
766
- title: t(e.meta.title, e.path),
767
- url: e.meta.menuItemClickable ? e.path || "/" : void 0,
768
- icon: e.meta.icon || /* @__PURE__ */ M(te, {}),
769
- items: n
770
- }));
771
- }, _t = async (e, t, n) => (await Promise.all(e.map(async (e) => {
772
- if (e.path.startsWith(":") || (await G(e.guards)).type !== "pass") return null;
773
- let r = `${t}/${e.path}`, i = n(e.meta.title, e.path), a = e.component !== void 0, o = e.subResources ? await _t(e.subResources, r, n) : void 0, s = o && o.length > 0;
774
- return !a && !s ? null : {
775
- title: i,
776
- url: a ? r : void 0,
777
- items: s ? o : void 0
778
- };
779
- }))).filter((e) => e !== null);
780
- //#endregion
781
- //#region src/components/internals/breadcrumb/breadcrumb.tsx
782
- function vt({ ...e }) {
783
- return /* @__PURE__ */ M("nav", {
784
- "aria-label": "breadcrumb",
785
- "data-slot": "breadcrumb",
786
- ...e
787
- });
788
- }
789
- function yt({ className: e, ...t }) {
790
- return /* @__PURE__ */ M("ol", {
791
- "data-slot": "breadcrumb-list",
792
- className: F("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),
793
- ...t
794
- });
795
- }
796
- function bt({ className: e, ...t }) {
797
- return /* @__PURE__ */ M("li", {
798
- "data-slot": "breadcrumb-item",
799
- className: F("astw:inline-flex astw:items-center astw:gap-1.5", e),
800
- ...t
801
- });
802
- }
803
- function xt({ render: e, className: t, children: r, to: i, ...a }) {
804
- let o = F("astw:hover:text-foreground astw:transition-colors", t);
805
- return g({
806
- defaultTagName: "a",
807
- render: e ?? /* @__PURE__ */ M(n, { to: i }),
808
- props: {
809
- "data-slot": "breadcrumb-link",
810
- className: o,
811
- children: r,
812
- ...e ? a : {
813
- to: i,
814
- ...a
815
- }
816
- }
817
- });
818
- }
819
- function St({ className: e, ariaCurrent: t = "location", ...n }) {
820
- return /* @__PURE__ */ M("span", {
821
- "data-slot": "breadcrumb-page",
822
- "aria-disabled": "true",
823
- "aria-current": t,
824
- className: F("astw:text-foreground astw:font-normal", e),
825
- ...n
826
- });
827
- }
828
- function Ct({ children: e, className: t, ...n }) {
829
- return /* @__PURE__ */ M("li", {
830
- "data-slot": "breadcrumb-separator",
831
- role: "presentation",
832
- "aria-hidden": "true",
833
- className: F("astw:[&>svg]:size-3.5", t),
834
- ...n,
835
- children: e ?? /* @__PURE__ */ M(b, {})
836
- });
837
- }
838
- //#endregion
839
- //#region src/routing/path.ts
840
- function wt(e, t) {
792
+ }, J = (e) => e.startsWith(":") ? e.slice(1) : null, mt = (e) => e.split("/").some((e) => J(e) !== null);
793
+ function ht(e, t) {
841
794
  if (!t.trim()) return e;
842
795
  let n = t.toLowerCase();
843
796
  return e.filter((e) => e.title.toLowerCase().includes(n) || e.path.toLowerCase().includes(n));
844
797
  }
845
- var Tt = (e, t) => typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(t) : typeof e.breadcrumbTitle == "string" ? e.breadcrumbTitle : e.title, Et = (e, t) => {
846
- let n = ge(t);
798
+ var gt = (e, t) => typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(t) : typeof e.breadcrumbTitle == "string" ? e.breadcrumbTitle : e.title, _t = (e, t) => {
799
+ let n = pe(t);
847
800
  return e.reduce((e, t) => {
848
801
  let r = n(t.meta.title, t.path);
849
802
  e[t.path] = {
@@ -864,8 +817,8 @@ var Tt = (e, t) => typeof e.breadcrumbTitle == "function" ? e.breadcrumbTitle(t)
864
817
  return t.resources && t.resources.length > 0 && i(t.resources, t.path), e;
865
818
  }, {});
866
819
  };
867
- function Dt(e, t, n, r) {
868
- let i = e.split("/").filter((e) => e !== ""), a = t && i[0] === t ? i.slice(1) : i, o = Et(n, r);
820
+ function vt(e, t, n, r) {
821
+ let i = e.split("/").filter((e) => e !== ""), a = t && i[0] === t ? i.slice(1) : i, o = _t(n, r);
869
822
  if (a.length === 0) {
870
823
  let e = o[""];
871
824
  if (e) return {
@@ -873,7 +826,7 @@ function Dt(e, t, n, r) {
873
826
  segments: [{
874
827
  segment: "",
875
828
  path: "",
876
- title: Tt(e, ""),
829
+ title: gt(e, ""),
877
830
  clickable: e.clickable
878
831
  }]
879
832
  };
@@ -882,13 +835,13 @@ function Dt(e, t, n, r) {
882
835
  let n = a.slice(0, t + 1).join("/"), r = o[n];
883
836
  if (!r) {
884
837
  let e = Object.entries(o).find(([e]) => {
885
- let t = e.split("/").map((e) => e.startsWith(":") ? "[^/]+" : e).join("/");
838
+ let t = e.split("/").map((e) => J(e) === null ? e : "[^/]+").join("/");
886
839
  return RegExp(`^${t}$`).test(n);
887
840
  })?.[1];
888
841
  e && (r = e);
889
842
  }
890
843
  let i;
891
- return i = r ? Tt(r, e) : decodeURIComponent(e), {
844
+ return i = r ? gt(r, e) : decodeURIComponent(e), {
892
845
  segment: e,
893
846
  path: n,
894
847
  title: i,
@@ -901,32 +854,179 @@ function Dt(e, t, n, r) {
901
854
  };
902
855
  }
903
856
  //#endregion
857
+ //#region src/routing/navigation.tsx
858
+ var yt = "appshell-root-nav", bt = (e) => ({
859
+ loaderID: yt,
860
+ loader: async () => ({ navItems: St(e) })
861
+ }), xt = () => h(yt)?.navItems, St = async (e) => {
862
+ let t = pe(e.locale);
863
+ return (await Promise.all(e.modules.map(async (e) => {
864
+ if (J(e.path) !== null || (await K(e.guards)).type !== "pass") return null;
865
+ let n = await Ct(e.resources, e.path, t);
866
+ return n.length === 0 && !e.meta.menuItemClickable ? null : {
867
+ module: e,
868
+ resources: n
869
+ };
870
+ }))).filter((e) => e !== null).map(({ module: e, resources: n }) => ({
871
+ title: t(e.meta.title, e.path),
872
+ url: e.meta.menuItemClickable ? e.path || "/" : void 0,
873
+ icon: e.meta.icon || /* @__PURE__ */ F(w, {}),
874
+ items: n
875
+ }));
876
+ }, Ct = async (e, t, n) => (await Promise.all(e.map(async (e) => {
877
+ if (J(e.path) !== null || (await K(e.guards)).type !== "pass") return null;
878
+ let r = `${t}/${e.path}`, i = n(e.meta.title, e.path), a = e.component !== void 0, o = e.subResources ? await Ct(e.subResources, r, n) : void 0, s = o && o.length > 0;
879
+ return !a && !s ? null : {
880
+ title: i,
881
+ url: a ? r : void 0,
882
+ items: s ? o : void 0
883
+ };
884
+ }))).filter((e) => e !== null), Y = (e) => e.split("/").filter((e) => e !== ""), wt = (e, t) => {
885
+ let n = Y(e), r = t && n[0] === t ? n.slice(1) : n;
886
+ return r.length > 0 ? `/${r.join("/")}` : "/";
887
+ }, Tt = (e) => e.join("/") || "/", Et = 8, Dt = (e, t) => Y(e).map((e) => {
888
+ let n = J(e);
889
+ if (n === null) return e;
890
+ let r = t[n] ?? "";
891
+ return r.length > Et ? `${r.slice(0, Et)}...` : r;
892
+ }), Ot = async ({ modules: e, locale: t, basePath: n, pathname: r }) => {
893
+ let i = pe(t), a = l(pt({
894
+ modules: e,
895
+ settingsResources: []
896
+ }), wt(r, n));
897
+ if (!a) return [];
898
+ let o = /* @__PURE__ */ new Map(), s = a.map((e) => {
899
+ let t = e.route.handle;
900
+ return t?.node ? {
901
+ node: t.node,
902
+ params: e.params,
903
+ pathnameBase: Tt(Y(e.pathnameBase))
904
+ } : null;
905
+ }).filter((e) => e !== null);
906
+ for (let [e, t] of s.entries()) {
907
+ if (!mt(t.node.path)) continue;
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__ */ F(w, {});
909
+ await kt({
910
+ node: t.node,
911
+ params: t.params,
912
+ icon: a,
913
+ baseSegments: Y(t.pathnameBase),
914
+ baseDisplaySegments: s.slice(0, e + 1).flatMap(({ node: e, params: t }) => Dt(e.path, t)),
915
+ breadcrumb: n,
916
+ resolveTitle: i,
917
+ routeMap: o
918
+ });
919
+ }
920
+ return [...o.values()];
921
+ }, kt = async ({ node: e, params: t, icon: n, baseSegments: r, baseDisplaySegments: i, breadcrumb: a, resolveTitle: o, routeMap: s }) => {
922
+ if ((await K(e.guards)).type !== "pass") return;
923
+ if ("resources" in e ? e.meta.menuItemClickable : e.component !== void 0) {
924
+ let t = Tt(r);
925
+ s.set(t, {
926
+ path: t,
927
+ displayPath: Tt(i),
928
+ title: o(e.meta.title, e.path),
929
+ icon: n,
930
+ breadcrumb: a
931
+ });
932
+ }
933
+ let c = "resources" in e ? e.resources : e.subResources;
934
+ if (!(!c || c.length === 0)) for (let e of c) mt(e.path) || await kt({
935
+ node: e,
936
+ params: t,
937
+ icon: n,
938
+ baseSegments: [...r, ...Y(e.path)],
939
+ baseDisplaySegments: [...i, ...Dt(e.path, t)],
940
+ breadcrumb: [...a, o(e.meta.title, e.path)],
941
+ resolveTitle: o,
942
+ routeMap: s
943
+ });
944
+ };
945
+ //#endregion
946
+ //#region src/components/internals/breadcrumb/breadcrumb.tsx
947
+ function At({ ...e }) {
948
+ return /* @__PURE__ */ F("nav", {
949
+ "aria-label": "breadcrumb",
950
+ "data-slot": "breadcrumb",
951
+ ...e
952
+ });
953
+ }
954
+ function jt({ className: e, ...t }) {
955
+ return /* @__PURE__ */ F("ol", {
956
+ "data-slot": "breadcrumb-list",
957
+ className: R("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
+ ...t
959
+ });
960
+ }
961
+ function Mt({ className: e, ...t }) {
962
+ return /* @__PURE__ */ F("li", {
963
+ "data-slot": "breadcrumb-item",
964
+ className: R("astw:inline-flex astw:items-center astw:gap-1.5", e),
965
+ ...t
966
+ });
967
+ }
968
+ function Nt({ render: e, className: t, children: r, to: i, ...a }) {
969
+ let o = R("astw:hover:text-foreground astw:transition-colors", t);
970
+ return _({
971
+ defaultTagName: "a",
972
+ render: e ?? /* @__PURE__ */ F(n, { to: i }),
973
+ props: {
974
+ "data-slot": "breadcrumb-link",
975
+ className: o,
976
+ children: r,
977
+ ...e ? a : {
978
+ to: i,
979
+ ...a
980
+ }
981
+ }
982
+ });
983
+ }
984
+ function Pt({ className: e, ariaCurrent: t = "location", ...n }) {
985
+ return /* @__PURE__ */ F("span", {
986
+ "data-slot": "breadcrumb-page",
987
+ "aria-disabled": "true",
988
+ "aria-current": t,
989
+ className: R("astw:text-foreground astw:font-normal", e),
990
+ ...n
991
+ });
992
+ }
993
+ function Ft({ children: e, className: t, ...n }) {
994
+ return /* @__PURE__ */ F("li", {
995
+ "data-slot": "breadcrumb-separator",
996
+ role: "presentation",
997
+ "aria-hidden": "true",
998
+ className: R("astw:[&>svg]:size-3.5", t),
999
+ ...n,
1000
+ children: e ?? /* @__PURE__ */ F(x, {})
1001
+ });
1002
+ }
1003
+ //#endregion
904
1004
  //#region src/components/sidebar/dynamic-breadcrumb.tsx
905
- var Ot = () => {
906
- let { configurations: e } = B();
907
- return Dt(u().pathname, e.basePath, e.modules, e.locale);
908
- }, kt = () => {
909
- let { basePath: e, segments: t } = Ot(), { overrides: n } = Re(), r = d("/:prefix/settings/:suffix"), i = H();
910
- return r ? /* @__PURE__ */ M(vt, { children: /* @__PURE__ */ M(yt, { children: /* @__PURE__ */ M("div", {
1005
+ var It = () => {
1006
+ let { configurations: e } = H();
1007
+ return vt(d().pathname, e.basePath, e.modules, e.locale);
1008
+ }, Lt = () => {
1009
+ let { basePath: e, segments: t } = It(), { overrides: n } = ze(), r = f("/:prefix/settings/:suffix"), i = U();
1010
+ return r ? /* @__PURE__ */ F(At, { children: /* @__PURE__ */ F(jt, { children: /* @__PURE__ */ F("div", {
911
1011
  className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
912
- children: /* @__PURE__ */ M(bt, { children: /* @__PURE__ */ M(xt, {
1012
+ children: /* @__PURE__ */ F(Mt, { children: /* @__PURE__ */ F(Nt, {
913
1013
  to: `/${r.params.prefix}/settings`,
914
1014
  children: i("settings")
915
1015
  }) })
916
- }) }) }) : /* @__PURE__ */ M(vt, { children: /* @__PURE__ */ M(yt, { children: t.map((r, i) => {
1016
+ }) }) }) : /* @__PURE__ */ F(At, { children: /* @__PURE__ */ F(jt, { children: t.map((r, i) => {
917
1017
  let a = e ? `/${e}/${r.path}` : `/${r.path}`, o = n.get(a) ?? r.title;
918
- return /* @__PURE__ */ N("div", {
1018
+ return /* @__PURE__ */ I("div", {
919
1019
  className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
920
- children: [/* @__PURE__ */ M(bt, { children: r.clickable ? /* @__PURE__ */ M(xt, {
1020
+ children: [/* @__PURE__ */ F(Mt, { children: r.clickable ? /* @__PURE__ */ F(Nt, {
921
1021
  to: r.path,
922
1022
  children: o
923
- }) : /* @__PURE__ */ M(St, {
1023
+ }) : /* @__PURE__ */ F(Pt, {
924
1024
  ariaCurrent: i === t.length - 1 && "location",
925
1025
  children: o
926
- }) }), i < t.length - 1 && /* @__PURE__ */ M(Ct, {})]
1026
+ }) }), i < t.length - 1 && /* @__PURE__ */ F(Ft, {})]
927
1027
  }, i);
928
1028
  }) }) });
929
- }, At = [
1029
+ }, Rt = [
930
1030
  {
931
1031
  rel: "icon",
932
1032
  type: "image/png",
@@ -944,53 +1044,54 @@ var Ot = () => {
944
1044
  sizes: "180x180",
945
1045
  href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAQAElEQVR4AexdCZwU5ZX/v+o5GA4RjDCY9V5Xo8YYE+MRj2jWxANEGAZhAI+ojBzDocCAV1pF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L/A4qU/KFc5VtTb9tnWrVOGC432qpoSg7QrdKuCe22g3QvrwrfowYCLusL1kP0xl3VO3s8u/i7m8vLJZLuWMcyPkPoWFCKUkZEdkbJ9jxLodsVMsqqta5ZtqjLU36+xMXzwSSgQUPoeEFV9YXQAnxFP/kZQH+4rKxTaXl5p4p4VU/H+obQcVqVM3RlnE00VZ2uhKwRy7rWqq27cXnZUWm3XN0UAG7yDaHdoNVAWYWVKIIpu6vmn0LOyF3LF3Za2xLDcMTAlRhCu4KrgcJ2vfeRBUEVZ/7pJPPZy8tyHwPEhv+flOzREDpOs4nKhjibOKC6CFZDrQs6ttk8jmT2/mA5oLf02zCEjtOmbVvlvskLtl1xNlMPkQ0KuU5qO/eki/HB3DS6RzlObFxVN4R2Bdehhb95iFTieHRL6F7o8MyI1W15WecFjCcH9p0Xh44+eHsMoT2xie38ywVGI2JuTAWynSG4BXWKM5Yu6vLo4sVHbom5tinYKAKG0I1CE3tGfcT6LUt/wNS0CL4WkVmwpPu2LX/91cqnOyc67Ne0TmlUwhC6OcY8qM6KZzp/WBeyB3B3tHuOazgr/8ZqlXPc0kWdhi5d2Om1desuqWcdIx4iYAjtEZgrFxz1DmD9VBUPQrFOgbcEeAXQBUxFlmWdvrSs0w3lj7WvBoTZMJ8EIGAI7SGoTnSieutfRmdLTc9QnXbNQqseVl3uzfueGFnY6W8wREaiP1aiO2hp7TtuhPMQqvPIU1nZ4dtN1MJfBhhC+4u36S3BCBhCJxhg07y/CHhNaH+1N70ZBA5CwBD6IEDMZmojYAid2vYz2h+EgCH0QYCYzdRG4P8AAAD//yMEVw4AAAAGSURBVAMA/Nw14Yt9Hn0AAAAASUVORK5CYII="
946
1046
  }
947
- ], jt = " · ", Mt = "data-app-shell-favicon", Nt = (e) => {
1047
+ ], zt = " · ", Bt = "data-app-shell-favicon", Vt = (e) => {
948
1048
  if (e.startsWith("data:")) return e.match(/^data:([^;,]+)/)?.[1];
949
1049
  if (e.endsWith(".svg")) return "image/svg+xml";
950
1050
  if (e.endsWith(".png")) return "image/png";
951
1051
  if (e.endsWith(".ico")) return "image/x-icon";
952
- }, Pt = () => {
953
- let { title: e, favicon: t } = B(), { basePath: n, segments: r } = Ot(), i = ze()?.overrides, a = r.at(-1), o;
1052
+ }, Ht = () => {
1053
+ let { title: e, favicon: t } = H(), { basePath: n, segments: r } = It(), i = Be()?.overrides, a = r.at(-1), o;
954
1054
  if (a) {
955
1055
  let e = n ? `/${n}/${a.path}` : `/${a.path}`;
956
1056
  o = i?.get(e) ?? a.title;
957
1057
  }
958
- let s = [o, e].filter(Boolean).join(jt), c = typeof document < "u" && document.head.querySelector(`link[rel~="icon"]:not([${Mt}])`), l;
1058
+ let s = [o, e].filter(Boolean).join(zt), c = typeof document < "u" && document.head.querySelector(`link[rel~="icon"]:not([${Bt}])`), l;
959
1059
  return l = t ? [{
960
1060
  rel: "icon",
961
1061
  href: t,
962
- type: Nt(t)
963
- }] : c ? [] : At, /* @__PURE__ */ N(j, { children: [s ? /* @__PURE__ */ M("title", { children: s }) : null, l.map(({ rel: e, href: t, type: n, sizes: r }) => /* @__PURE__ */ M("link", {
1062
+ type: Vt(t)
1063
+ }] : c ? [] : Rt, /* @__PURE__ */ I(P, { children: [s ? /* @__PURE__ */ F("title", { children: s }) : null, l.map(({ rel: e, href: t, type: n, sizes: r }) => /* @__PURE__ */ F("link", {
964
1064
  rel: e,
965
1065
  href: t,
966
1066
  "data-app-shell-favicon": "",
967
1067
  ...n ? { type: n } : {},
968
1068
  ...r ? { sizes: r } : {}
969
1069
  }, `${e}-${r ?? "any"}`))] });
970
- }, Ft = (e) => {
971
- let { configurations: t, contentRoutes: n, children: r } = e, { loaderID: i, loader: o } = mt({
1070
+ }, Ut = (e) => {
1071
+ let { configurations: t, contentRoutes: n, children: r } = e, { loaderID: i, loader: o } = bt({
972
1072
  modules: t.modules,
973
- locale: t.locale
1073
+ locale: t.locale,
1074
+ basePath: t.basePath
974
1075
  }), s = t.errorBoundary, c = s ? [{
975
- element: /* @__PURE__ */ M(a, {}),
976
- ErrorBoundary: ct(s),
1076
+ element: /* @__PURE__ */ F(a, {}),
1077
+ ErrorBoundary: lt(s),
977
1078
  children: n
978
1079
  }] : n;
979
1080
  return {
980
1081
  id: i,
981
1082
  loader: o,
982
- element: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(Pt, {}), r] }),
1083
+ element: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(Ht, {}), r] }),
983
1084
  children: c,
984
1085
  HydrateFallback: () => null
985
1086
  };
986
- }, It = {
1087
+ }, Wt = {
987
1088
  createBrowserRouter: o,
988
1089
  createMemoryRouter: s
989
- }, Lt = (e) => {
990
- let { children: t } = e, { configurations: n } = B(), r = O(() => ft({
1090
+ }, Gt = (e) => {
1091
+ let { children: t } = e, { configurations: n } = H(), r = j(() => pt({
991
1092
  modules: n.modules,
992
1093
  settingsResources: n.settingsResources
993
- }), [n.modules, n.settingsResources]), i = O(() => [Ft({
1094
+ }), [n.modules, n.settingsResources]), i = j(() => [Ut({
994
1095
  configurations: n,
995
1096
  contentRoutes: r,
996
1097
  children: t
@@ -998,67 +1099,106 @@ var Ot = () => {
998
1099
  n,
999
1100
  r,
1000
1101
  t
1001
- ]), a = n.basePath ? "/" + n.basePath : void 0, o = e.memory ? e.initialEntries : void 0, s = O(() => e.memory ? It.createMemoryRouter(i, {
1102
+ ]), a = n.basePath ? "/" + n.basePath : void 0, o = e.memory ? e.initialEntries : void 0, s = j(() => e.memory ? Wt.createMemoryRouter(i, {
1002
1103
  basename: a,
1003
1104
  ...o ? { initialEntries: o } : {}
1004
- }) : It.createBrowserRouter(i, { basename: a }), [
1105
+ }) : Wt.createBrowserRouter(i, { basename: a }), [
1005
1106
  a,
1006
1107
  o,
1007
1108
  e.memory,
1008
1109
  i
1009
1110
  ]);
1010
- return /* @__PURE__ */ M(le, { router: s });
1011
- }, Rt = w(null), Y = w(null);
1012
- function zt({ children: e, searchSources: t = [] }) {
1013
- let n = k(/* @__PURE__ */ new Map()), [r, i] = A([]), [a, o] = A(!1), [s, c] = A(null), l = T(() => {
1014
- i(Array.from(n.current.values()).flat());
1015
- }, []), u = T((e, t) => (n.current.set(e, t), l(), () => {
1016
- n.current.delete(e), l();
1017
- }), [l]), d = T(() => {
1018
- c(null);
1019
- }, []), f = T((e = {}) => {
1020
- o(!0), c({ search: e.search });
1021
- }, []);
1022
- D(() => {
1111
+ return /* @__PURE__ */ F(oe, { router: s });
1112
+ }, Kt = D(null), X = D(null);
1113
+ function qt({ children: e, searchSources: t = [] }) {
1114
+ let { pathname: n } = d(), { configurations: r } = H(), i = M(/* @__PURE__ */ new Map()), a = M(0), o = M(n), [s, c] = N([]), [l, u] = N(!1), [f, p] = N(null), [m, h] = N([]), [g, _] = N(null), [v, y] = N(!1), b = O(() => {
1115
+ c(Array.from(i.current.values()).flat());
1116
+ }, []), x = O((e, t) => (i.current.set(e, t), b(), () => {
1117
+ i.current.delete(e), b();
1118
+ }), [b]), S = O(() => {
1119
+ p(null);
1120
+ }, []), C = O(() => {
1121
+ a.current += 1, u(!1), h([]), _(null), y(!1);
1122
+ }, []), w = O(() => {
1123
+ let e = a.current + 1;
1124
+ a.current = e, h([]), _(n), y(!0), Ot({
1125
+ modules: r.modules,
1126
+ locale: r.locale,
1127
+ basePath: r.basePath,
1128
+ pathname: n
1129
+ }).then((t) => {
1130
+ a.current === e && (h(t), y(!1));
1131
+ }).catch(() => {
1132
+ a.current === e && y(!1);
1133
+ });
1134
+ }, [
1135
+ r.basePath,
1136
+ r.locale,
1137
+ r.modules,
1138
+ n
1139
+ ]), T = O((e = {}) => {
1140
+ u(!0), p({ search: e.search }), w();
1141
+ }, [w]), E = O((e) => {
1142
+ e ? T() : C();
1143
+ }, [C, T]);
1144
+ A(() => {
1145
+ let e = o.current !== n;
1146
+ o.current = n, e && l && C();
1147
+ }, [
1148
+ C,
1149
+ l,
1150
+ n
1151
+ ]), A(() => {
1023
1152
  let e = (e) => {
1024
- (e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), o((e) => !e));
1153
+ (e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), l ? C() : T());
1025
1154
  };
1026
1155
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1027
- }, []);
1028
- let p = O(() => ({ register: u }), [u]), m = O(() => ({
1029
- actions: r,
1156
+ }, [
1157
+ C,
1158
+ l,
1159
+ T
1160
+ ]);
1161
+ let D = j(() => ({ register: x }), [x]), k = j(() => ({
1162
+ actions: s,
1030
1163
  searchSources: t,
1031
- open: a,
1032
- setOpen: o,
1033
- openRequest: s,
1034
- clearOpenRequest: d,
1035
- openCommandPalette: f
1164
+ open: l,
1165
+ setOpen: E,
1166
+ openRequest: f,
1167
+ clearOpenRequest: S,
1168
+ openCommandPalette: T,
1169
+ dynamicRoutes: g === n ? m : [],
1170
+ isLoadingDynamicRoutes: v || l && g !== n
1036
1171
  }), [
1037
- r,
1038
- t,
1039
- a,
1040
1172
  s,
1041
- d,
1042
- f
1173
+ t,
1174
+ l,
1175
+ f,
1176
+ S,
1177
+ T,
1178
+ m,
1179
+ g,
1180
+ v,
1181
+ n,
1182
+ E
1043
1183
  ]);
1044
- return /* @__PURE__ */ M(Rt.Provider, {
1045
- value: p,
1046
- children: /* @__PURE__ */ M(Y.Provider, {
1047
- value: m,
1184
+ return /* @__PURE__ */ F(Kt.Provider, {
1185
+ value: D,
1186
+ children: /* @__PURE__ */ F(X.Provider, {
1187
+ value: k,
1048
1188
  children: e
1049
1189
  })
1050
1190
  });
1051
1191
  }
1052
- function Bt() {
1053
- let e = E(Rt);
1192
+ function Jt() {
1193
+ let e = k(Kt);
1054
1194
  if (!e) throw Error("useCommandPaletteDispatch must be used within CommandPaletteProvider");
1055
1195
  return e;
1056
1196
  }
1057
- function Vt(e, t) {
1058
- let n = re(), { register: r } = Bt(), i = k(t);
1197
+ function Yt(e, t) {
1198
+ let n = ee(), { register: r } = Jt(), i = M(t);
1059
1199
  i.current = t;
1060
1200
  let a = t.map((e) => `${e.key}\0${e.label}`).join("\n");
1061
- D(() => r(n, i.current.map((t) => ({
1201
+ A(() => r(n, i.current.map((t) => ({
1062
1202
  ...t,
1063
1203
  group: t.group ?? e,
1064
1204
  onSelect: () => i.current.find((e) => e.key === t.key)?.onSelect()
@@ -1069,69 +1209,69 @@ function Vt(e, t) {
1069
1209
  e
1070
1210
  ]);
1071
1211
  }
1072
- function Ht() {
1073
- let e = E(Y);
1212
+ function Xt() {
1213
+ let e = k(X);
1074
1214
  if (!e) throw Error("useCommandPaletteState must be used within CommandPaletteProvider");
1075
1215
  return e;
1076
1216
  }
1077
- function Ut() {
1078
- let e = E(Y);
1217
+ function Zt() {
1218
+ let e = k(X);
1079
1219
  if (!e) throw Error("useOpenCommandPalette must be used within CommandPaletteProvider");
1080
1220
  return e.openCommandPalette;
1081
1221
  }
1082
- function Wt() {
1083
- let e = E(Y);
1222
+ function Qt() {
1223
+ let e = k(X);
1084
1224
  if (!e) throw Error("useCommandPaletteActions must be used within CommandPaletteProvider");
1085
1225
  return e.actions;
1086
1226
  }
1087
1227
  //#endregion
1088
1228
  //#region src/components/dialog/dialog.tsx
1089
- function Gt({ ...e }) {
1090
- return /* @__PURE__ */ M(P.Root, {
1229
+ function $t({ ...e }) {
1230
+ return /* @__PURE__ */ F(L.Root, {
1091
1231
  "data-slot": "dialog",
1092
1232
  ...e
1093
1233
  });
1094
1234
  }
1095
- Gt.displayName = "Dialog.Root";
1096
- function Kt({ ...e }) {
1097
- return /* @__PURE__ */ M(P.Trigger, {
1235
+ $t.displayName = "Dialog.Root";
1236
+ function en({ ...e }) {
1237
+ return /* @__PURE__ */ F(L.Trigger, {
1098
1238
  "data-slot": "dialog-trigger",
1099
1239
  ...e
1100
1240
  });
1101
1241
  }
1102
- Kt.displayName = "Dialog.Trigger";
1103
- function qt({ ...e }) {
1104
- return /* @__PURE__ */ M(P.Portal, {
1242
+ en.displayName = "Dialog.Trigger";
1243
+ function tn({ ...e }) {
1244
+ return /* @__PURE__ */ F(L.Portal, {
1105
1245
  "data-slot": "dialog-portal",
1106
1246
  ...e
1107
1247
  });
1108
1248
  }
1109
- qt.displayName = "Dialog.Portal";
1110
- function Jt({ ...e }) {
1111
- return /* @__PURE__ */ M(P.Close, {
1249
+ tn.displayName = "Dialog.Portal";
1250
+ function nn({ ...e }) {
1251
+ return /* @__PURE__ */ F(L.Close, {
1112
1252
  "data-slot": "dialog-close",
1113
1253
  ...e
1114
1254
  });
1115
1255
  }
1116
- Jt.displayName = "Dialog.Close";
1117
- function Yt({ className: e, ...t }) {
1118
- return /* @__PURE__ */ M(P.Backdrop, {
1256
+ nn.displayName = "Dialog.Close";
1257
+ function rn({ className: e, ...t }) {
1258
+ return /* @__PURE__ */ F(L.Backdrop, {
1119
1259
  "data-slot": "dialog-overlay",
1120
- className: F("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),
1260
+ className: R("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),
1121
1261
  ...t
1122
1262
  });
1123
1263
  }
1124
- Yt.displayName = "Dialog.Overlay";
1125
- function Xt({ className: e, children: t, ...n }) {
1126
- return /* @__PURE__ */ N(qt, {
1264
+ rn.displayName = "Dialog.Overlay";
1265
+ function an({ className: e, children: t, ...n }) {
1266
+ return /* @__PURE__ */ I(tn, {
1127
1267
  "data-slot": "dialog-portal",
1128
- children: [/* @__PURE__ */ M(Yt, {}), /* @__PURE__ */ N(P.Popup, {
1268
+ children: [/* @__PURE__ */ F(rn, {}), /* @__PURE__ */ I(L.Popup, {
1129
1269
  "data-slot": "dialog-content",
1130
- className: F("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),
1270
+ className: R("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),
1131
1271
  ...n,
1132
- children: [t, /* @__PURE__ */ N(P.Close, {
1272
+ children: [t, /* @__PURE__ */ I(L.Close, {
1133
1273
  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",
1134
- children: [/* @__PURE__ */ M(ne, {}), /* @__PURE__ */ M("span", {
1274
+ children: [/* @__PURE__ */ F(T, {}), /* @__PURE__ */ F("span", {
1135
1275
  className: "astw:sr-only",
1136
1276
  children: "Close"
1137
1277
  })]
@@ -1139,70 +1279,103 @@ function Xt({ className: e, children: t, ...n }) {
1139
1279
  })]
1140
1280
  });
1141
1281
  }
1142
- Xt.displayName = "Dialog.Content";
1143
- function Zt({ className: e, ...t }) {
1144
- return /* @__PURE__ */ M("div", {
1282
+ an.displayName = "Dialog.Content";
1283
+ function on({ className: e, ...t }) {
1284
+ return /* @__PURE__ */ F("div", {
1145
1285
  "data-slot": "dialog-header",
1146
- className: F("astw:flex astw:flex-col astw:gap-2 astw:text-center astw:sm:text-left", e),
1286
+ className: R("astw:flex astw:flex-col astw:gap-2 astw:text-center astw:sm:text-left", e),
1147
1287
  ...t
1148
1288
  });
1149
1289
  }
1150
- Zt.displayName = "Dialog.Header";
1151
- function Qt({ className: e, ...t }) {
1152
- return /* @__PURE__ */ M("div", {
1290
+ on.displayName = "Dialog.Header";
1291
+ function sn({ className: e, ...t }) {
1292
+ return /* @__PURE__ */ F("div", {
1153
1293
  "data-slot": "dialog-footer",
1154
- className: F("astw:flex astw:flex-col-reverse astw:gap-2 astw:sm:flex-row astw:sm:justify-end", e),
1294
+ className: R("astw:flex astw:flex-col-reverse astw:gap-2 astw:sm:flex-row astw:sm:justify-end", e),
1155
1295
  ...t
1156
1296
  });
1157
1297
  }
1158
- Qt.displayName = "Dialog.Footer";
1159
- function $t({ className: e, ...t }) {
1160
- return /* @__PURE__ */ M(P.Title, {
1298
+ sn.displayName = "Dialog.Footer";
1299
+ function cn({ className: e, ...t }) {
1300
+ return /* @__PURE__ */ F(L.Title, {
1161
1301
  "data-slot": "dialog-title",
1162
- className: F("astw:text-lg astw:leading-none astw:font-semibold", e),
1302
+ className: R("astw:text-lg astw:leading-none astw:font-semibold", e),
1163
1303
  ...t
1164
1304
  });
1165
1305
  }
1166
- $t.displayName = "Dialog.Title";
1167
- function en({ className: e, ...t }) {
1168
- return /* @__PURE__ */ M(P.Description, {
1306
+ cn.displayName = "Dialog.Title";
1307
+ function ln({ className: e, ...t }) {
1308
+ return /* @__PURE__ */ F(L.Description, {
1169
1309
  "data-slot": "dialog-description",
1170
- className: F("astw:text-muted-foreground astw:text-sm", e),
1310
+ className: R("astw:text-muted-foreground astw:text-sm", e),
1171
1311
  ...t
1172
1312
  });
1173
1313
  }
1174
- en.displayName = "Dialog.Description";
1175
- var X = {
1176
- Root: Gt,
1177
- Close: Jt,
1178
- Content: Xt,
1179
- Description: en,
1180
- Footer: Qt,
1181
- Header: Zt,
1182
- Title: $t,
1183
- Trigger: Kt
1184
- }, tn = [
1314
+ ln.displayName = "Dialog.Description";
1315
+ var Z = {
1316
+ Root: $t,
1317
+ Close: nn,
1318
+ Content: an,
1319
+ Description: ln,
1320
+ Footer: sn,
1321
+ Header: on,
1322
+ Title: cn,
1323
+ Trigger: en
1324
+ }, un = [
1185
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:shadow-xs astw:outline-none astw:md:text-sm",
1186
1326
  "astw:dark:bg-input/30 astw:transition-[color,box-shadow]",
1187
1327
  "astw:selection:bg-primary astw:selection:text-primary-foreground",
1188
1328
  "astw:placeholder:text-muted-foreground",
1189
1329
  "astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
1190
1330
  "astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50"
1191
- ], nn = [...tn, "astw:h-9 astw:py-1"], rn = [...tn, "astw:min-h-16 astw:py-2 astw:resize-y"];
1331
+ ], dn = [...un, "astw:h-9 astw:py-1"], fn = [...un, "astw:min-h-16 astw:py-2 astw:resize-y"];
1192
1332
  //#endregion
1193
1333
  //#region src/components/input/input.tsx
1194
- function an({ className: e, type: t, ...n }) {
1195
- return /* @__PURE__ */ M("input", {
1334
+ function pn({ className: e, type: t, ...n }) {
1335
+ return /* @__PURE__ */ F("input", {
1196
1336
  type: t,
1197
1337
  "data-slot": "input",
1198
- className: F(nn, "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),
1338
+ className: R(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),
1199
1339
  ...n
1200
1340
  });
1201
1341
  }
1202
1342
  //#endregion
1343
+ //#region src/components/spinner/spinner.tsx
1344
+ var mn = {
1345
+ xs: 12,
1346
+ sm: 14,
1347
+ default: 16,
1348
+ lg: 20
1349
+ };
1350
+ function hn({ className: e, size: t = "default", width: n, height: r, ...i }) {
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 = mn[t];
1352
+ return /* @__PURE__ */ F("svg", {
1353
+ "data-slot": "spinner",
1354
+ viewBox: "0 0 16 16",
1355
+ fill: "none",
1356
+ xmlns: "http://www.w3.org/2000/svg",
1357
+ ...i,
1358
+ width: n ?? s,
1359
+ height: r ?? s,
1360
+ className: R("astw:animate-spin astw:shrink-0", e),
1361
+ role: o ? void 0 : i.role ?? "status",
1362
+ "aria-hidden": o ? !0 : i["aria-hidden"],
1363
+ children: /* @__PURE__ */ F("circle", {
1364
+ cx: "8",
1365
+ cy: "8",
1366
+ r: "6",
1367
+ stroke: "currentColor",
1368
+ strokeWidth: "2",
1369
+ strokeLinecap: "round",
1370
+ strokeDasharray: "24 24",
1371
+ strokeDashoffset: "8"
1372
+ })
1373
+ });
1374
+ }
1375
+ //#endregion
1203
1376
  //#region src/components/command-palette/command-palette.tsx
1204
- 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";
1205
- function on(e) {
1377
+ var Q = "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", gn = (e) => e ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground";
1378
+ function _n(e) {
1206
1379
  let t = [], n = (e, r, i) => {
1207
1380
  e.forEach((e) => {
1208
1381
  let a = [...i, e.title];
@@ -1223,17 +1396,17 @@ function on(e) {
1223
1396
  }), n(e.items, e.icon, [e.title]);
1224
1397
  }), t;
1225
1398
  }
1226
- function sn(e, t) {
1399
+ function vn(e, t) {
1227
1400
  if (!t.trim()) return e;
1228
1401
  let n = t.toLowerCase();
1229
1402
  return e.filter((e) => e.label.toLowerCase().includes(n));
1230
1403
  }
1231
- var cn = 300, ln = {
1404
+ var yn = 300, bn = (e) => e === "/" || e.startsWith("/_"), xn = {
1232
1405
  mode: "browse",
1233
1406
  search: "",
1234
1407
  selectedIndex: 0
1235
- }, un = [];
1236
- function dn(e, t) {
1408
+ }, Sn = [];
1409
+ function Cn(e, t) {
1237
1410
  switch (t.type) {
1238
1411
  case "SET_SEARCH": return e.mode === "search" ? {
1239
1412
  ...e,
@@ -1271,7 +1444,7 @@ function dn(e, t) {
1271
1444
  results: [],
1272
1445
  isSearching: !1
1273
1446
  };
1274
- case "EXIT_SEARCH_MODE": return ln;
1447
+ case "EXIT_SEARCH_MODE": return xn;
1275
1448
  case "SEARCH_START": return e.mode === "search" ? {
1276
1449
  ...e,
1277
1450
  isSearching: !0,
@@ -1295,10 +1468,10 @@ function dn(e, t) {
1295
1468
  ...e,
1296
1469
  selectedIndex: Math.max(e.selectedIndex - 1, 0)
1297
1470
  };
1298
- case "RESET": return ln;
1471
+ case "RESET": return xn;
1299
1472
  }
1300
1473
  }
1301
- function fn(e, t) {
1474
+ function wn(e, t) {
1302
1475
  let n = e.indexOf(":");
1303
1476
  if (n < 1) return {
1304
1477
  activeSource: null,
@@ -1313,25 +1486,28 @@ function fn(e, t) {
1313
1486
  searchQuery: e
1314
1487
  };
1315
1488
  }
1316
- function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open: r, setOpen: i }) {
1317
- let a = f(), o = k(null), [s, c] = ie(dn, ln), l = k(null), u = s.mode === "search" ? s.query : s.search, d = s.selectedIndex, p = s.mode === "search" ? s.source : null, m = s.mode === "search" ? s.results : un, h = s.mode === "search" && s.isSearching, g = O(() => p ? [] : sn(t, u), [
1489
+ function Tn({ routes: e, contextualActions: t = [], searchSources: n = [], open: r, setOpen: i }) {
1490
+ let a = p(), o = M(null), [s, c] = te(Cn, xn), l = M(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 : Sn, h = s.mode === "search" && s.isSearching, g = j(() => f ? [] : vn(t, u), [
1318
1491
  t,
1319
1492
  u,
1320
- p
1321
- ]), _ = O(() => p ? [] : wt(e, u), [
1493
+ f
1494
+ ]), _ = j(() => f ? [] : ht(e, u).toSorted((e, t) => {
1495
+ let n = bn(e.path), r = bn(t.path);
1496
+ return Number(n) - Number(r) || e.path.localeCompare(t.path);
1497
+ }), [
1322
1498
  e,
1323
1499
  u,
1324
- p
1500
+ f
1325
1501
  ]);
1326
- D(() => {
1327
- if (!p) {
1502
+ A(() => {
1503
+ if (!f) {
1328
1504
  l.current?.abort(), l.current = null;
1329
1505
  return;
1330
1506
  }
1331
1507
  let e = setTimeout(() => {
1332
1508
  c({ type: "SEARCH_START" }), l.current?.abort();
1333
1509
  let e = new AbortController();
1334
- l.current = e, p.search(u, { signal: e.signal }).then((t) => {
1510
+ l.current = e, f.search(u, { signal: e.signal }).then((t) => {
1335
1511
  e.signal.aborted || c({
1336
1512
  type: "SEARCH_DONE",
1337
1513
  results: t
@@ -1339,16 +1515,16 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
1339
1515
  }).catch(() => {
1340
1516
  e.signal.aborted || c({ type: "SEARCH_FAIL" });
1341
1517
  });
1342
- }, cn);
1518
+ }, yn);
1343
1519
  return () => {
1344
1520
  clearTimeout(e), l.current?.abort(), l.current = null;
1345
1521
  };
1346
- }, [p, u]);
1347
- let v = O(() => {
1348
- if (p) return m.map((e) => ({
1522
+ }, [f, u]);
1523
+ let v = j(() => {
1524
+ if (f) return m.map((e) => ({
1349
1525
  type: "search-result",
1350
1526
  result: e,
1351
- source: p
1527
+ source: f
1352
1528
  }));
1353
1529
  let e = [];
1354
1530
  if (n.length > 0) {
@@ -1366,13 +1542,13 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
1366
1542
  route: e
1367
1543
  }))), e;
1368
1544
  }, [
1369
- p,
1545
+ f,
1370
1546
  m,
1371
1547
  u,
1372
1548
  n,
1373
1549
  g,
1374
1550
  _
1375
- ]), y = T((e) => {
1551
+ ]), y = O((e) => {
1376
1552
  if (s.mode === "search") {
1377
1553
  c({
1378
1554
  type: "SET_SEARCH",
@@ -1380,28 +1556,28 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
1380
1556
  });
1381
1557
  return;
1382
1558
  }
1383
- let t = fn(e, n);
1559
+ let t = wn(e, n);
1384
1560
  c({
1385
1561
  type: "SET_SEARCH",
1386
1562
  value: e,
1387
1563
  detectedSource: t.activeSource ?? void 0,
1388
1564
  detectedQuery: t.activeSource ? t.searchQuery : void 0
1389
1565
  });
1390
- }, [s.mode, n]), b = T((e) => {
1391
- let t = fn(e, n);
1566
+ }, [s.mode, n]), b = O((e) => {
1567
+ let t = wn(e, n);
1392
1568
  c({
1393
1569
  type: "INITIALIZE_SEARCH",
1394
1570
  value: e,
1395
1571
  detectedSource: t.activeSource ?? void 0,
1396
1572
  detectedQuery: t.activeSource ? t.searchQuery : void 0
1397
1573
  });
1398
- }, [n]), x = T((e) => {
1574
+ }, [n]), x = O((e) => {
1399
1575
  i(e), e || (c({ type: "RESET" }), l.current?.abort(), l.current = null);
1400
1576
  }, [i]);
1401
- D(() => {
1577
+ A(() => {
1402
1578
  o.current && o.current.querySelector(`[data-index="${d}"]`)?.scrollIntoView({ block: "nearest" });
1403
1579
  }, [d]);
1404
- let S = T((e) => {
1580
+ let S = O((e) => {
1405
1581
  if (e.type === "search-mode") {
1406
1582
  c({
1407
1583
  type: "ENTER_SEARCH_MODE",
@@ -1427,11 +1603,11 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
1427
1603
  filteredActions: g,
1428
1604
  filteredRoutes: _,
1429
1605
  searchResults: m,
1430
- activeSearchSource: p,
1606
+ activeSearchSource: f,
1431
1607
  isSearching: h,
1432
1608
  selectableItems: v,
1433
1609
  handleSelectItem: S,
1434
- handleKeyDown: T((e) => {
1610
+ handleKeyDown: O((e) => {
1435
1611
  if (!e.nativeEvent.isComposing) switch (e.key) {
1436
1612
  case "ArrowDown":
1437
1613
  e.preventDefault(), c({
@@ -1445,194 +1621,206 @@ function pn({ routes: e, contextualActions: t = [], searchSources: n = [], open:
1445
1621
  case "Enter":
1446
1622
  e.preventDefault(), v[d] && S(v[d]);
1447
1623
  break;
1448
- case "Backspace": p && u === "" && (e.preventDefault(), c({ type: "EXIT_SEARCH_MODE" }), l.current?.abort(), l.current = null);
1624
+ case "Backspace": f && u === "" && (e.preventDefault(), c({ type: "EXIT_SEARCH_MODE" }), l.current?.abort(), l.current = null);
1449
1625
  }
1450
1626
  }, [
1451
1627
  v,
1452
1628
  d,
1453
1629
  S,
1454
- p,
1630
+ f,
1455
1631
  u
1456
1632
  ]),
1457
1633
  listRef: o
1458
1634
  };
1459
1635
  }
1460
- function mn({ navItems: e, extraRoutes: t = [] }) {
1461
- let n = H(), r = Wt(), { searchSources: i, open: a, setOpen: o, openRequest: s, clearOpenRequest: c } = Ht(), { open: l, handleOpenChange: u, search: d, setSearch: f, initializeSearch: p, selectedIndex: m, filteredActions: h, filteredRoutes: g, searchResults: _, activeSearchSource: v, isSearching: y, selectableItems: b, handleSelectItem: x, handleKeyDown: te, listRef: ne } = pn({
1462
- routes: O(() => [...on(e), ...t], [t, e]),
1636
+ function En({ navItems: e, extraRoutes: t = [] }) {
1637
+ let n = U(), r = Qt(), { searchSources: i, open: a, setOpen: o, openRequest: s, clearOpenRequest: c, dynamicRoutes: l, isLoadingDynamicRoutes: u } = Xt(), { open: d, handleOpenChange: f, search: p, setSearch: m, initializeSearch: h, selectedIndex: g, filteredActions: _, filteredRoutes: v, searchResults: y, activeSearchSource: b, isSearching: x, selectableItems: S, handleSelectItem: w, handleKeyDown: T, listRef: E } = Tn({
1638
+ routes: j(() => [
1639
+ ..._n(e),
1640
+ ...t,
1641
+ ...l
1642
+ ], [
1643
+ l,
1644
+ t,
1645
+ e
1646
+ ]),
1463
1647
  contextualActions: r,
1464
1648
  searchSources: i,
1465
1649
  open: a,
1466
1650
  setOpen: o
1467
1651
  });
1468
- D(() => {
1469
- s && (p(s.search ?? ""), c());
1652
+ A(() => {
1653
+ s && (h(s.search ?? ""), c());
1470
1654
  }, [
1471
1655
  s,
1472
- p,
1656
+ h,
1473
1657
  c
1474
1658
  ]);
1475
- let C = v ? [] : b.filter((e) => e.type === "search-mode"), w = C.length, T = w, E = T + h.length;
1476
- return /* @__PURE__ */ M(X.Root, {
1477
- open: l,
1478
- onOpenChange: u,
1479
- children: /* @__PURE__ */ N(X.Content, {
1480
- className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:overflow-hidden astw:top-[30%] astw:translate-y-[-30%]",
1481
- onKeyDown: te,
1659
+ let D = b ? [] : S.filter((e) => e.type === "search-mode"), O = D.length, k = O, ee = k + _.length;
1660
+ return /* @__PURE__ */ F(Z.Root, {
1661
+ open: d,
1662
+ onOpenChange: f,
1663
+ children: /* @__PURE__ */ I(Z.Content, {
1664
+ 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: T,
1482
1666
  "aria-describedby": void 0,
1483
1667
  children: [
1484
- /* @__PURE__ */ M(X.Title, {
1668
+ /* @__PURE__ */ F(Z.Title, {
1485
1669
  className: "astw:sr-only",
1486
1670
  children: n("commandPaletteSearch")
1487
1671
  }),
1488
- /* @__PURE__ */ N("div", {
1672
+ /* @__PURE__ */ I("div", {
1489
1673
  className: "astw:flex astw:items-center astw:border-b astw:border-border astw:px-3 astw:py-1",
1490
1674
  children: [
1491
- /* @__PURE__ */ M(ee, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
1492
- v && /* @__PURE__ */ M("span", {
1675
+ /* @__PURE__ */ F(C, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
1676
+ b && /* @__PURE__ */ F("span", {
1493
1677
  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",
1494
- children: v.prefix
1678
+ children: b.prefix
1495
1679
  }),
1496
- /* @__PURE__ */ M(an, {
1497
- value: d,
1498
- onChange: (e) => f(e.target.value),
1680
+ /* @__PURE__ */ F(pn, {
1681
+ value: p,
1682
+ onChange: (e) => m(e.target.value),
1499
1683
  placeholder: n("commandPaletteSearch"),
1500
1684
  className: "astw:flex astw:h-10 astw:w-full astw:rounded-md astw:bg-transparent astw:py-3 astw:text-sm astw:outline-none astw:border-0 astw:shadow-none astw:focus-visible:ring-0 astw:placeholder:text-muted-foreground astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
1501
1685
  autoFocus: !0
1502
1686
  })
1503
1687
  ]
1504
1688
  }),
1505
- /* @__PURE__ */ N("div", {
1506
- ref: ne,
1689
+ /* @__PURE__ */ I("div", {
1690
+ ref: E,
1507
1691
  className: "astw:max-h-[50vh] astw:overflow-y-auto astw:overflow-x-hidden",
1508
- children: [b.length === 0 && !y ? /* @__PURE__ */ M("div", {
1692
+ children: [S.length === 0 && !x && !u ? /* @__PURE__ */ F("div", {
1509
1693
  className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground",
1510
1694
  children: n("commandPaletteNoResults")
1511
- }) : /* @__PURE__ */ N("div", {
1695
+ }) : /* @__PURE__ */ I("div", {
1512
1696
  className: "astw:p-1",
1513
1697
  children: [
1514
- w > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
1698
+ u && /* @__PURE__ */ I("output", {
1699
+ 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__ */ F(hn, { "aria-label": n("commandPaletteLoadingRoutes") }), n("commandPaletteLoadingRoutes")]
1701
+ }),
1702
+ O > 0 && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1515
1703
  className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
1516
1704
  children: n("commandPaletteSearchModes")
1517
- }), C.map((e, t) => {
1705
+ }), D.map((e, t) => {
1518
1706
  let n = e.type === "search-mode" ? e.source : null;
1519
- return n ? /* @__PURE__ */ N("button", {
1707
+ return n ? /* @__PURE__ */ I("button", {
1520
1708
  "data-index": t,
1521
- onClick: () => x({
1709
+ onClick: () => w({
1522
1710
  type: "search-mode",
1523
1711
  source: n
1524
1712
  }),
1525
- className: F(Z, "astw:items-center astw:gap-2", Q(t === m)),
1713
+ className: R(Q, "astw:items-center astw:gap-2", gn(t === g)),
1526
1714
  children: [
1527
- n.icon && /* @__PURE__ */ M("span", {
1715
+ n.icon && /* @__PURE__ */ F("span", {
1528
1716
  className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
1529
1717
  children: n.icon
1530
1718
  }),
1531
- /* @__PURE__ */ N("span", {
1719
+ /* @__PURE__ */ I("span", {
1532
1720
  className: "astw:font-mono astw:text-xs astw:text-muted-foreground astw:shrink-0",
1533
1721
  children: [n.prefix, ":"]
1534
1722
  }),
1535
- /* @__PURE__ */ M("span", {
1723
+ /* @__PURE__ */ F("span", {
1536
1724
  className: "astw:truncate",
1537
1725
  children: n.title
1538
1726
  })
1539
1727
  ]
1540
1728
  }, `search-mode-${n.prefix}`) : null;
1541
1729
  })] }),
1542
- h.length > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
1730
+ _.length > 0 && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1543
1731
  className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
1544
1732
  children: n("commandPaletteActions")
1545
- }), h.map((e, t) => {
1546
- let n = T + t;
1547
- return /* @__PURE__ */ N("button", {
1733
+ }), _.map((e, t) => {
1734
+ let n = k + t;
1735
+ return /* @__PURE__ */ I("button", {
1548
1736
  "data-index": n,
1549
- onClick: () => x({
1737
+ onClick: () => w({
1550
1738
  type: "action",
1551
1739
  action: e
1552
1740
  }),
1553
- className: F(Z, "astw:items-center astw:gap-2", Q(n === m)),
1741
+ className: R(Q, "astw:items-center astw:gap-2", gn(n === g)),
1554
1742
  children: [
1555
- e.icon && /* @__PURE__ */ M("span", {
1743
+ e.icon && /* @__PURE__ */ F("span", {
1556
1744
  className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
1557
1745
  children: e.icon
1558
1746
  }),
1559
- /* @__PURE__ */ M("span", {
1747
+ /* @__PURE__ */ F("span", {
1560
1748
  className: "astw:truncate",
1561
1749
  children: e.label
1562
1750
  }),
1563
- e.group && /* @__PURE__ */ M("span", {
1751
+ e.group && /* @__PURE__ */ F("span", {
1564
1752
  className: "astw:ml-auto astw:text-xs astw:text-muted-foreground astw:shrink-0",
1565
1753
  children: e.group
1566
1754
  })
1567
1755
  ]
1568
1756
  }, `action-${e.key}`);
1569
1757
  })] }),
1570
- g.length > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
1758
+ v.length > 0 && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1571
1759
  className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
1572
1760
  children: n("commandPalettePages")
1573
- }), g.map((e, t) => {
1574
- let n = E + t;
1575
- return /* @__PURE__ */ N("button", {
1761
+ }), v.map((e, t) => {
1762
+ let n = ee + t, r = e.displayPath ?? e.path;
1763
+ return /* @__PURE__ */ I("button", {
1576
1764
  "data-index": n,
1577
- onClick: () => x({
1765
+ onClick: () => w({
1578
1766
  type: "route",
1579
1767
  route: e
1580
1768
  }),
1581
- className: F(Z, "astw:flex-col astw:items-start", Q(n === m)),
1582
- children: [/* @__PURE__ */ M("span", {
1769
+ className: R(Q, "astw:flex-col astw:items-start", gn(n === g)),
1770
+ children: [/* @__PURE__ */ F("span", {
1583
1771
  className: "astw:truncate astw:w-full astw:text-left",
1584
1772
  children: e.breadcrumb.join(" > ")
1585
- }), /* @__PURE__ */ M("span", {
1773
+ }), /* @__PURE__ */ F("span", {
1586
1774
  className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
1587
- children: e.path.startsWith("/") ? e.path : `/${e.path}`
1775
+ children: r.startsWith("/") ? r : `/${r}`
1588
1776
  })]
1589
1777
  }, e.path);
1590
1778
  })] }),
1591
- v && _.length > 0 && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
1779
+ b && y.length > 0 && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1592
1780
  className: "astw:px-2 astw:py-1.5 astw:text-xs astw:font-medium astw:text-muted-foreground",
1593
- children: v.title
1594
- }), _.map((e, t) => /* @__PURE__ */ N("button", {
1781
+ children: b.title
1782
+ }), y.map((e, t) => /* @__PURE__ */ I("button", {
1595
1783
  "data-index": t,
1596
- onClick: () => x({
1784
+ onClick: () => w({
1597
1785
  type: "search-result",
1598
1786
  result: e,
1599
- source: v
1787
+ source: b
1600
1788
  }),
1601
- className: F(Z, "astw:flex-col astw:items-start", Q(t === m)),
1602
- children: [/* @__PURE__ */ N("span", {
1789
+ className: R(Q, "astw:flex-col astw:items-start", gn(t === g)),
1790
+ children: [/* @__PURE__ */ I("span", {
1603
1791
  className: "astw:flex astw:items-center astw:gap-2 astw:w-full",
1604
- children: [(e.icon || v.icon) && /* @__PURE__ */ M("span", {
1792
+ children: [(e.icon || b.icon) && /* @__PURE__ */ F("span", {
1605
1793
  className: "astw:flex astw:size-4 astw:items-center astw:justify-center astw:shrink-0",
1606
- children: e.icon ?? v.icon
1607
- }), /* @__PURE__ */ M("span", {
1794
+ children: e.icon ?? b.icon
1795
+ }), /* @__PURE__ */ F("span", {
1608
1796
  className: "astw:truncate",
1609
1797
  children: e.label
1610
1798
  })]
1611
- }), e.description && /* @__PURE__ */ M("span", {
1799
+ }), e.description && /* @__PURE__ */ F("span", {
1612
1800
  className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left",
1613
1801
  children: e.description
1614
1802
  })]
1615
1803
  }, `search-result-${e.key}`))] })
1616
1804
  ]
1617
- }), y && /* @__PURE__ */ N("div", {
1805
+ }), x && /* @__PURE__ */ I("div", {
1618
1806
  className: "astw:flex astw:items-center astw:justify-center astw:gap-2 astw:py-4 astw:text-sm astw:text-muted-foreground",
1619
- children: [/* @__PURE__ */ M(S, { className: "astw:h-4 astw:w-4 astw:animate-spin" }), n("commandPaletteSearching")]
1807
+ children: [/* @__PURE__ */ F(hn, {}), n("commandPaletteSearching")]
1620
1808
  })]
1621
1809
  })
1622
1810
  ]
1623
1811
  })
1624
1812
  });
1625
1813
  }
1626
- function hn() {
1814
+ function Dn() {
1627
1815
  return null;
1628
1816
  }
1629
- function gn() {
1630
- let e = ht(), n = qe();
1631
- return /* @__PURE__ */ M(C, {
1817
+ function On() {
1818
+ let e = xt(), n = Je();
1819
+ return /* @__PURE__ */ F(E, {
1632
1820
  fallback: null,
1633
- children: /* @__PURE__ */ M(t, {
1821
+ children: /* @__PURE__ */ F(t, {
1634
1822
  resolve: e,
1635
- children: (e) => /* @__PURE__ */ M(mn, {
1823
+ children: (e) => /* @__PURE__ */ F(En, {
1636
1824
  navItems: e ?? [],
1637
1825
  extraRoutes: [n]
1638
1826
  })
@@ -1641,13 +1829,13 @@ function gn() {
1641
1829
  }
1642
1830
  //#endregion
1643
1831
  //#region src/hooks/use-is-client.ts
1644
- var _n = () => () => {}, vn = () => !0, yn = () => !1;
1645
- function bn() {
1646
- return ae(_n, vn, yn);
1832
+ var kn = () => () => {}, An = () => !0, jn = () => !1;
1833
+ function Mn() {
1834
+ return ne(kn, An, jn);
1647
1835
  }
1648
1836
  //#endregion
1649
1837
  //#region src/fs-routes/converter.tsx
1650
- function xn(e) {
1838
+ function Nn(e) {
1651
1839
  let t = {
1652
1840
  path: "",
1653
1841
  fullPath: "",
@@ -1655,7 +1843,7 @@ function xn(e) {
1655
1843
  children: /* @__PURE__ */ new Map()
1656
1844
  };
1657
1845
  for (let n of e) {
1658
- let e = de(n.path), r = t, i = "";
1846
+ let e = ce(n.path), r = t, i = "";
1659
1847
  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, {
1660
1848
  path: t.converted,
1661
1849
  fullPath: i,
@@ -1666,12 +1854,12 @@ function xn(e) {
1666
1854
  }
1667
1855
  return t;
1668
1856
  }
1669
- function Sn(e, t) {
1670
- return e?.appShellPageProps?.meta?.title ?? q(t);
1857
+ function Pn(e, t) {
1858
+ return e?.appShellPageProps?.meta?.title ?? Oe(t);
1671
1859
  }
1672
- function Cn(e) {
1673
- let t = e.component, n = Sn(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 = [];
1674
- for (let t of e.children.values()) o.push(Cn(t));
1860
+ function Fn(e) {
1861
+ let t = e.component, n = Pn(t, e.path), r = t?.appShellPageProps?.meta?.icon, i = t?.appShellPageProps?.meta?.breadcrumbTitle, a = e.guards && e.guards.length > 0 ? q(e.guards) : void 0, o = [];
1862
+ for (let t of e.children.values()) o.push(Fn(t));
1675
1863
  return {
1676
1864
  _type: "resource",
1677
1865
  type: "component",
@@ -1681,16 +1869,16 @@ function Cn(e) {
1681
1869
  icon: r,
1682
1870
  ...i === void 0 ? {} : { breadcrumbTitle: i }
1683
1871
  },
1684
- component: t ? () => /* @__PURE__ */ M(t, {}) : void 0,
1872
+ component: t ? () => /* @__PURE__ */ F(t, {}) : void 0,
1685
1873
  subResources: o.length > 0 ? o : void 0,
1686
- errorBoundary: /* @__PURE__ */ M(U, {}),
1874
+ errorBoundary: /* @__PURE__ */ F(W, {}),
1687
1875
  guards: e.guards,
1688
1876
  loader: a
1689
1877
  };
1690
1878
  }
1691
- function wn(e) {
1692
- let t = e.component, n = Sn(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 = [];
1693
- for (let t of e.children.values()) o.push(Cn(t));
1879
+ function In(e) {
1880
+ let t = e.component, n = Pn(t, e.path), r = t?.appShellPageProps?.meta?.icon, i = t?.appShellPageProps?.meta?.breadcrumbTitle, a = e.guards && e.guards.length > 0 ? q(e.guards) : void 0, o = [];
1881
+ for (let t of e.children.values()) o.push(Fn(t));
1694
1882
  return {
1695
1883
  _type: "module",
1696
1884
  type: "component",
@@ -1701,41 +1889,41 @@ function wn(e) {
1701
1889
  ...i === void 0 ? {} : { breadcrumbTitle: i },
1702
1890
  menuItemClickable: t !== void 0
1703
1891
  },
1704
- component: t ? () => /* @__PURE__ */ M(t, {}) : void 0,
1892
+ component: t ? () => /* @__PURE__ */ F(t, {}) : void 0,
1705
1893
  resources: o,
1706
- errorBoundary: /* @__PURE__ */ M(U, {}),
1894
+ errorBoundary: /* @__PURE__ */ F(W, {}),
1707
1895
  guards: e.guards,
1708
1896
  loader: a
1709
1897
  };
1710
1898
  }
1711
- function Tn(e) {
1899
+ function Ln(e) {
1712
1900
  if (e.length === 0) return [];
1713
- let t = xn(e), n = [];
1901
+ let t = Nn(e), n = [];
1714
1902
  if (t.component) {
1715
- let e = wn({
1903
+ let e = In({
1716
1904
  ...t,
1717
1905
  path: "",
1718
1906
  children: /* @__PURE__ */ new Map()
1719
1907
  });
1720
1908
  n.push(e);
1721
1909
  }
1722
- for (let e of t.children.values()) n.push(wn(e));
1910
+ for (let e of t.children.values()) n.push(In(e));
1723
1911
  return n;
1724
1912
  }
1725
1913
  //#endregion
1726
1914
  //#region src/components/appshell/appshell.tsx
1727
1915
  var $ = (e) => {
1728
- let t = bn();
1729
- Te(e.contextData ?? {});
1916
+ let t = Mn();
1917
+ we(e.contextData ?? {});
1730
1918
  let { modules: n, rootComponent: r, rootGuards: i } = e, a = e.memory ? {
1731
1919
  memory: !0,
1732
1920
  initialEntries: e.initialEntries
1733
- } : { memory: !1 }, o = O(() => 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 ? [Ae({
1921
+ } : { memory: !1 }, o = j(() => 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 ? [Ae({
1734
1922
  path: "",
1735
1923
  ...r ? {
1736
1924
  meta: {
1737
- title: V.t("home"),
1738
- icon: /* @__PURE__ */ M(x, {})
1925
+ title: Se.t("home"),
1926
+ icon: /* @__PURE__ */ F(S, {})
1739
1927
  },
1740
1928
  component: () => r()
1741
1929
  } : { meta: {} },
@@ -1745,7 +1933,7 @@ var $ = (e) => {
1745
1933
  n,
1746
1934
  r,
1747
1935
  i
1748
- ]), s = O(() => o ? _e({
1936
+ ]), s = j(() => o ? me({
1749
1937
  modules: o,
1750
1938
  settingsResources: e.settingsResources,
1751
1939
  basePath: e.basePath,
@@ -1759,7 +1947,7 @@ var $ = (e) => {
1759
1947
  e.errorBoundary,
1760
1948
  e.locale,
1761
1949
  e.timeZone
1762
- ]), c = O(() => s ? {
1950
+ ]), c = j(() => s ? {
1763
1951
  title: e.title,
1764
1952
  icon: e.icon,
1765
1953
  favicon: e.favicon,
@@ -1771,34 +1959,34 @@ var $ = (e) => {
1771
1959
  e.favicon,
1772
1960
  e.appInfo,
1773
1961
  s
1774
- ]), l = O(() => ({ contextData: e.contextData ?? {} }), [e.contextData]);
1962
+ ]), l = j(() => ({ contextData: e.contextData ?? {} }), [e.contextData]);
1775
1963
  if (!o || !c) {
1776
1964
  let e = "[AppShell] No routes configured. Either use the appShellRoutes() vite-plugin for automatic page configuration, or pass the 'modules' prop for manual configuration.";
1777
- return console.error(e), /* @__PURE__ */ M("div", {
1965
+ return console.error(e), /* @__PURE__ */ F("div", {
1778
1966
  className: "astw:flex astw:min-h-screen astw:items-center astw:justify-center astw:bg-background astw:p-4",
1779
- children: /* @__PURE__ */ N("div", {
1967
+ children: /* @__PURE__ */ I("div", {
1780
1968
  className: "astw:max-w-md astw:rounded-lg astw:border astw:border-destructive/50 astw:bg-destructive/10 astw:p-6 astw:text-center",
1781
- children: [/* @__PURE__ */ M("h1", {
1969
+ children: [/* @__PURE__ */ F("h1", {
1782
1970
  className: "astw:mb-2 astw:text-lg astw:font-semibold astw:text-destructive",
1783
1971
  children: "Configuration Error"
1784
- }), /* @__PURE__ */ M("p", {
1972
+ }), /* @__PURE__ */ F("p", {
1785
1973
  className: "astw:text-sm astw:text-muted-foreground",
1786
1974
  children: e
1787
1975
  })]
1788
1976
  })
1789
1977
  });
1790
1978
  }
1791
- return t ? /* @__PURE__ */ M(R.Provider, {
1979
+ return t ? /* @__PURE__ */ F(V.Provider, {
1792
1980
  value: c,
1793
- children: /* @__PURE__ */ M(z.Provider, {
1981
+ children: /* @__PURE__ */ F(he.Provider, {
1794
1982
  value: l,
1795
- children: /* @__PURE__ */ M(Le, { children: /* @__PURE__ */ M(zt, {
1796
- searchSources: e.searchSources,
1797
- children: /* @__PURE__ */ M(nt, {
1798
- defaultColorTheme: e.defaultColorTheme,
1799
- children: /* @__PURE__ */ N(Lt, {
1800
- ...a,
1801
- children: [e.children, /* @__PURE__ */ M(gn, {})]
1983
+ children: /* @__PURE__ */ F(Re, { children: /* @__PURE__ */ F(rt, {
1984
+ defaultColorTheme: e.defaultColorTheme,
1985
+ children: /* @__PURE__ */ F(Gt, {
1986
+ ...a,
1987
+ children: /* @__PURE__ */ I(qt, {
1988
+ searchSources: e.searchSources,
1989
+ children: [e.children, /* @__PURE__ */ F(On, {})]
1802
1990
  })
1803
1991
  })
1804
1992
  }) })
@@ -1806,18 +1994,18 @@ var $ = (e) => {
1806
1994
  }) : null;
1807
1995
  };
1808
1996
  $.WithPages = (e) => {
1809
- let t = Tn(e);
1810
- return (e) => /* @__PURE__ */ M($, {
1997
+ let t = Ln(e);
1998
+ return (e) => /* @__PURE__ */ F($, {
1811
1999
  ...e,
1812
2000
  modules: t,
1813
2001
  memory: !1
1814
2002
  });
1815
2003
  };
1816
- var En = (e) => /* @__PURE__ */ M($, {
2004
+ var Rn = (e) => /* @__PURE__ */ F($, {
1817
2005
  ...e,
1818
2006
  memory: !1
1819
2007
  });
1820
- En.WithPages = $.WithPages;
1821
- var Dn = En;
2008
+ Rn.WithPages = $.WithPages;
2009
+ var zn = Rn;
1822
2010
  //#endregion
1823
- export { L as A, H as C, ve as D, B as E, fe as M, F as N, be as O, Oe as S, ye as T, J as _, nn as a, De as b, Ht as c, kt as d, ht as f, Be as g, rt as h, an as i, I as j, xe as k, Ut as l, Xe as m, $ as n, rn as o, ot as p, hn as r, X as s, Dn as t, Vt as u, Ae as v, Ce as w, Ee as x, je as y };
2011
+ export { ge as A, Ee as C, xe as D, U as E, le as F, R as I, ye as M, B as N, _e as O, z as P, je as S, De as T, Ze as _, pn as a, Ie as b, Z as c, Yt as d, Lt as f, st as g, J as h, hn as i, ve as j, H as k, Xt as l, xt as m, $ as n, dn as o, It as p, Dn as r, fn as s, zn as t, Zt as u, it as v, Te as w, Ae as x, Ve as y };