@opencxh/ui-kit 3.137.11 → 3.137.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { clsx as ct } from "clsx";
2
- import ce, { useState as O, useLayoutEffect as it, useRef as ne, useEffect as G, forwardRef as be, useMemo as pe, useCallback as xe, createContext as Ke, useId as dt, useContext as ut, Component as mt } from "react";
2
+ import ce, { useState as O, useLayoutEffect as it, useRef as ne, useEffect as G, forwardRef as be, useMemo as pe, useCallback as xe, createContext as Ge, useId as dt, useContext as ut, Component as mt } from "react";
3
3
  import { jsxs as i, jsx as e, Fragment as ke } from "react/jsx-runtime";
4
4
  import * as ft from "lucide-react";
5
- import { VideoOff as ht, User as xt, MicOff as bt, Mic as gt, X as we, ChevronDown as Te, ExternalLink as pt, Calendar as vt, ChevronLeft as Ce, ChevronRight as $e, ChevronDownIcon as yt, Loader2 as Nt, Search as _e, Check as Oe, ChevronUp as wt, Ellipsis as kt, FileText as Le, HardDrive as Fe, ArrowLeft as Ct, FolderPlus as St, Upload as Et, Folder as Be, Trash2 as zt, Plus as Mt, Sparkles as Tt, ImageOff as $t, Pencil as _t, ArrowUpRight as Dt } from "lucide-react";
5
+ import { VideoOff as ht, User as xt, MicOff as bt, Mic as gt, X as we, ChevronDown as Te, ExternalLink as pt, Calendar as vt, ChevronLeft as Ce, ChevronRight as $e, ChevronDownIcon as yt, Loader2 as Nt, Search as _e, Check as Fe, ChevronUp as wt, Ellipsis as kt, FileText as Le, HardDrive as Be, ArrowLeft as Ct, FolderPlus as St, Upload as Et, Folder as Re, Trash2 as zt, Plus as Mt, Sparkles as Tt, ImageOff as $t, Pencil as _t, ArrowUpRight as Dt } from "lucide-react";
6
6
  import At from "dompurify";
7
7
  import Lt from "react-markdown";
8
8
  import It from "remark-gfm";
9
9
  function c(...t) {
10
10
  return ct(t);
11
11
  }
12
- function Dn(t) {
12
+ function Ln(t) {
13
13
  return (r, n) => t[r]?.[n] || "";
14
14
  }
15
- function An(t) {
15
+ function In(t) {
16
16
  return (r) => t[r] || "";
17
17
  }
18
18
  function De(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
@@ -22,8 +22,8 @@ function De(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start
22
22
  const f = () => {
23
23
  const d = r.current;
24
24
  if (!d) return;
25
- const v = d.getBoundingClientRect(), h = window.innerHeight - v.bottom, m = v.top, b = a.startsWith("top"), p = b ? m < 200 && h > m : h < 200 && m > h, w = b !== p, g = { position: "fixed" };
26
- w ? (g.bottom = window.innerHeight - v.top + n, g.maxHeight = Math.max(120, m - n * 2)) : (g.top = v.bottom + n, g.maxHeight = Math.max(120, h - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - v.right : g.left = v.left, s && (g.width = v.width), o(g);
25
+ const p = d.getBoundingClientRect(), h = window.innerHeight - p.bottom, u = p.top, b = a.startsWith("top"), v = b ? u < 200 && h > u : h < 200 && u > h, N = b !== v, g = { position: "fixed" };
26
+ N ? (g.bottom = window.innerHeight - p.top + n, g.maxHeight = Math.max(120, u - n * 2)) : (g.top = p.bottom + n, g.maxHeight = Math.max(120, h - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - p.right : g.left = p.left, s && (g.width = p.width), o(g);
27
27
  };
28
28
  return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
29
29
  window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
@@ -37,7 +37,7 @@ function jt(t) {
37
37
  r ^= t.charCodeAt(n), r = Math.imul(r, 16777619);
38
38
  return r >>> 0;
39
39
  }
40
- function Ge(t) {
40
+ function Je(t) {
41
41
  const r = (t ?? "").trim().toLowerCase();
42
42
  return r ? jt(r) % Pt + 1 : 1;
43
43
  }
@@ -54,19 +54,19 @@ const Ot = {
54
54
  4: "bg-cat-4",
55
55
  5: "bg-cat-5"
56
56
  };
57
- function Je(t) {
58
- return Ot[Ge(t)];
57
+ function Ye(t) {
58
+ return Ot[Je(t)];
59
59
  }
60
- function Ln(t) {
61
- return Ft[Ge(t)];
60
+ function Pn(t) {
61
+ return Ft[Je(t)];
62
62
  }
63
- const Re = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
64
- function In(t) {
63
+ const He = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
64
+ function jn(t) {
65
65
  let r = 0;
66
66
  for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
67
- return Re[r % Re.length];
67
+ return He[r % He.length];
68
68
  }
69
- function Pn({ tiles: t, pinned: r, className: n }) {
69
+ function On({ tiles: t, pinned: r, className: n }) {
70
70
  if (r)
71
71
  return /* @__PURE__ */ i("div", { className: c("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
72
72
  /* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
@@ -75,7 +75,7 @@ function Pn({ tiles: t, pinned: r, className: n }) {
75
75
  const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
76
76
  return /* @__PURE__ */ e("div", { className: c("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
77
77
  }
78
- function jn({
78
+ function Fn({
79
79
  name: t,
80
80
  avatarUrl: r,
81
81
  muted: n,
@@ -104,7 +104,7 @@ function jn({
104
104
  }
105
105
  );
106
106
  }
107
- function On({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
107
+ function Bn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
108
108
  const a = ne(null);
109
109
  return G(() => {
110
110
  if (!r || !a.current) return;
@@ -164,11 +164,11 @@ const Bt = {
164
164
  iconOnly: o = !1,
165
165
  shape: f = "default",
166
166
  className: d,
167
- children: v,
167
+ children: p,
168
168
  disabled: h,
169
- ...m
169
+ ...u
170
170
  }, b) => {
171
- const p = h || s;
171
+ const v = h || s;
172
172
  return /* @__PURE__ */ i(
173
173
  "button",
174
174
  {
@@ -190,9 +190,9 @@ const Bt = {
190
190
  s && "cursor-wait",
191
191
  d
192
192
  ),
193
- disabled: p,
193
+ disabled: v,
194
194
  "aria-busy": s || void 0,
195
- ...m,
195
+ ...u,
196
196
  children: [
197
197
  s && /* @__PURE__ */ e(
198
198
  "span",
@@ -202,16 +202,16 @@ const Bt = {
202
202
  }
203
203
  ),
204
204
  !s && a && /* @__PURE__ */ e("span", { className: "flex items-center justify-center shrink-0", children: a }),
205
- !o && v,
205
+ !o && p,
206
206
  !s && l && /* @__PURE__ */ e("span", { className: "flex items-center justify-center shrink-0", children: l }),
207
- o && !s && !a && !l && v
207
+ o && !s && !a && !l && p
208
208
  ]
209
209
  }
210
210
  );
211
211
  }
212
212
  );
213
213
  le.displayName = "Button";
214
- const Fn = ({
214
+ const Rn = ({
215
215
  children: t,
216
216
  size: r = "md",
217
217
  orientation: n = "horizontal",
@@ -242,7 +242,7 @@ const Fn = ({
242
242
  );
243
243
  return /* @__PURE__ */ e("div", { className: l, role: "group", children: t });
244
244
  };
245
- function Bn(t) {
245
+ function Hn(t) {
246
246
  if (!t) return;
247
247
  const r = t.split(/[-_ ]/).filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), n = ft[r];
248
248
  return typeof n == "function" || typeof n == "object" && n !== null ? n : void 0;
@@ -267,7 +267,7 @@ const Vt = {
267
267
  "aria-label": o,
268
268
  ...f
269
269
  }) => {
270
- const d = typeof r == "number" ? r : qt(r), v = c(
270
+ const d = typeof r == "number" ? r : qt(r), p = c(
271
271
  "inline-block shrink-0",
272
272
  Vt[n],
273
273
  s && [
@@ -278,14 +278,14 @@ const Vt = {
278
278
  ), h = {
279
279
  size: d,
280
280
  strokeWidth: 2,
281
- className: v,
281
+ className: p,
282
282
  onClick: s ? a : void 0,
283
283
  "aria-label": o,
284
284
  "aria-hidden": o ? void 0 : !0,
285
285
  role: s ? "button" : void 0,
286
286
  tabIndex: s ? 0 : void 0,
287
- onKeyDown: s ? (m) => {
288
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), a?.());
287
+ onKeyDown: s ? (u) => {
288
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), a?.());
289
289
  } : void 0,
290
290
  ...f
291
291
  };
@@ -300,7 +300,7 @@ function qt(t) {
300
300
  xl: 24
301
301
  }[t];
302
302
  }
303
- const Ye = ({
303
+ const Xe = ({
304
304
  trigger: t,
305
305
  children: r,
306
306
  placement: n = "bottom-start",
@@ -310,28 +310,28 @@ const Ye = ({
310
310
  disabled: o = !1,
311
311
  triggerLabel: f
312
312
  }) => {
313
- const [d, v] = O(!1), h = ne(null), m = ne(null), b = De(d, m, { placement: n });
313
+ const [d, p] = O(!1), h = ne(null), u = ne(null), b = De(d, u, { placement: n });
314
314
  G(() => {
315
315
  if (!d) return;
316
316
  const g = (T) => {
317
- h.current && !h.current.contains(T.target) && v(!1);
317
+ h.current && !h.current.contains(T.target) && p(!1);
318
318
  }, x = (T) => {
319
- T.key === "Escape" && v(!1);
319
+ T.key === "Escape" && p(!1);
320
320
  };
321
321
  return document.addEventListener("mousedown", g), document.addEventListener("keydown", x), () => {
322
322
  document.removeEventListener("mousedown", g), document.removeEventListener("keydown", x);
323
323
  };
324
324
  }, [d]);
325
- const p = (g) => {
326
- g.stopPropagation(), !o && v((x) => !x);
327
- }, w = () => v(!1);
325
+ const v = (g) => {
326
+ g.stopPropagation(), !o && p((x) => !x);
327
+ }, N = () => p(!1);
328
328
  return /* @__PURE__ */ i("div", { ref: h, className: c("relative inline-flex", a), children: [
329
329
  /* @__PURE__ */ e(
330
330
  "button",
331
331
  {
332
- ref: m,
332
+ ref: u,
333
333
  type: "button",
334
- onClick: p,
334
+ onClick: v,
335
335
  disabled: o,
336
336
  "aria-label": f,
337
337
  "aria-expanded": d,
@@ -353,7 +353,7 @@ const Ye = ({
353
353
  s
354
354
  ),
355
355
  style: b,
356
- children: typeof r == "function" ? r(w) : r
356
+ children: typeof r == "function" ? r(N) : r
357
357
  }
358
358
  )
359
359
  ] });
@@ -389,29 +389,29 @@ function Gt({
389
389
  caret: o = !1,
390
390
  menu: f,
391
391
  menuClassName: d,
392
- onClear: v,
392
+ onClear: p,
393
393
  clearLabel: h = "Filter wissen",
394
- onClick: m,
394
+ onClick: u,
395
395
  title: b,
396
- className: p
396
+ className: v
397
397
  }) {
398
- const w = l && !!v, g = s === "pill" ? "rounded-full" : "rounded-md", x = Wt({ active: l, tone: n, shape: s, size: a, className: p }), T = /* @__PURE__ */ i(ke, { children: [
398
+ const N = l && !!p, g = s === "pill" ? "rounded-full" : "rounded-md", x = Wt({ active: l, tone: n, shape: s, size: a, className: v }), T = /* @__PURE__ */ i(ke, { children: [
399
399
  r,
400
400
  t,
401
401
  o && /* @__PURE__ */ e(Z, { icon: Te, size: "xs" })
402
- ] }), C = Kt({ shape: s, withClear: w }), q = w && /* @__PURE__ */ e(
402
+ ] }), C = Kt({ shape: s, withClear: N }), q = N && /* @__PURE__ */ e(
403
403
  "button",
404
404
  {
405
405
  type: "button",
406
406
  "aria-label": h,
407
- onClick: v,
407
+ onClick: p,
408
408
  className: c("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", g),
409
409
  children: /* @__PURE__ */ e(Z, { icon: we, size: "xs" })
410
410
  }
411
411
  );
412
412
  return f ? /* @__PURE__ */ i("span", { className: x, title: b, children: [
413
413
  /* @__PURE__ */ e(
414
- Ye,
414
+ Xe,
415
415
  {
416
416
  trigger: T,
417
417
  rootClassName: "h-full",
@@ -421,10 +421,10 @@ function Gt({
421
421
  }
422
422
  ),
423
423
  q
424
- ] }) : w ? /* @__PURE__ */ i("span", { className: x, title: b, children: [
425
- /* @__PURE__ */ e("button", { type: "button", onClick: m, className: C, children: T }),
424
+ ] }) : N ? /* @__PURE__ */ i("span", { className: x, title: b, children: [
425
+ /* @__PURE__ */ e("button", { type: "button", onClick: u, className: C, children: T }),
426
426
  q
427
- ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: m, className: c(x, C), children: T });
427
+ ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: u, className: c(x, C), children: T });
428
428
  }
429
429
  const Jt = {
430
430
  xs: "text-xs",
@@ -450,7 +450,7 @@ const Jt = {
450
450
  warning: "bg-warning-soft",
451
451
  error: "bg-danger-soft",
452
452
  info: "bg-info-soft"
453
- }, Rn = ({
453
+ }, Vn = ({
454
454
  variant: t = "default",
455
455
  size: r = "md",
456
456
  color: n = "primary",
@@ -460,10 +460,10 @@ const Jt = {
460
460
  children: o,
461
461
  href: f,
462
462
  target: d,
463
- rel: v,
463
+ rel: p,
464
464
  ...h
465
465
  }) => {
466
- const m = a || f && (f.startsWith("http") || f.startsWith("mailto:")), b = c(
466
+ const u = a || f && (f.startsWith("http") || f.startsWith("mailto:")), b = c(
467
467
  "inline-flex items-center gap-1 underline-offset-2",
468
468
  "transition-colors duration-fast ease-out",
469
469
  "focus-visible:outline-none focus-visible:focus-ring",
@@ -477,16 +477,16 @@ const Jt = {
477
477
  ],
478
478
  s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
479
479
  l
480
- ), p = {
480
+ ), v = {
481
481
  ...h,
482
482
  href: s ? void 0 : f,
483
- target: m ? "_blank" : d,
484
- rel: m ? "noopener noreferrer" : v,
483
+ target: u ? "_blank" : d,
484
+ rel: u ? "noopener noreferrer" : p,
485
485
  "aria-disabled": s || void 0
486
486
  };
487
- return /* @__PURE__ */ i("a", { className: b, ...p, children: [
487
+ return /* @__PURE__ */ i("a", { className: b, ...v, children: [
488
488
  o,
489
- m && /* @__PURE__ */ e(pt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
489
+ u && /* @__PURE__ */ e(pt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
490
490
  ] });
491
491
  }, Zt = {
492
492
  sm: "h-control-sm px-3 text-sm",
@@ -514,12 +514,12 @@ function Qt({
514
514
  o
515
515
  ),
516
516
  children: t.map((d) => {
517
- const v = d.value === r;
517
+ const p = d.value === r;
518
518
  return /* @__PURE__ */ e(
519
519
  "button",
520
520
  {
521
521
  role: "tab",
522
- "aria-selected": v,
522
+ "aria-selected": p,
523
523
  type: "button",
524
524
  onClick: () => n(d.value),
525
525
  className: c(
@@ -528,7 +528,7 @@ function Qt({
528
528
  "focus-visible:outline-none focus-visible:focus-ring",
529
529
  l && "min-w-0 flex-1",
530
530
  Zt[s],
531
- v ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
531
+ p ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
532
532
  ),
533
533
  children: d.label
534
534
  },
@@ -546,7 +546,7 @@ const er = {
546
546
  sm: "h-control-sm w-7",
547
547
  md: "h-control-md w-8"
548
548
  };
549
- function Xe({
549
+ function Ze({
550
550
  label: t,
551
551
  onClick: r,
552
552
  variant: n = "primary",
@@ -556,9 +556,9 @@ function Xe({
556
556
  disabled: o = !1,
557
557
  loading: f = !1,
558
558
  menuPlacement: d = "bottom-end",
559
- menuLabel: v = "More options"
559
+ menuLabel: p = "More options"
560
560
  }) {
561
- const h = o || f, m = l.length > 0;
561
+ const h = o || f, u = l.length > 0;
562
562
  return (
563
563
  // De scheiding tussen beide helften is een kier in de vulling, niet een
564
564
  // lijn: bij een ink-gevulde knop leest 2px als een spleet. 1px is genoeg
@@ -574,16 +574,16 @@ function Xe({
574
574
  disabled: o,
575
575
  loading: f,
576
576
  leftIcon: a,
577
- className: c(m && "rounded-r-none"),
577
+ className: c(u && "rounded-r-none"),
578
578
  children: t
579
579
  }
580
580
  ),
581
- m && /* @__PURE__ */ e(
582
- Ye,
581
+ u && /* @__PURE__ */ e(
582
+ Xe,
583
583
  {
584
584
  placement: d,
585
585
  disabled: h,
586
- triggerLabel: v,
586
+ triggerLabel: p,
587
587
  className: "min-w-menu py-1",
588
588
  trigger: /* @__PURE__ */ e(
589
589
  "span",
@@ -599,25 +599,25 @@ function Xe({
599
599
  children: /* @__PURE__ */ e(Te, { className: "size-icon-md" })
600
600
  }
601
601
  ),
602
- children: (b) => /* @__PURE__ */ e(ke, { children: l.map((p) => /* @__PURE__ */ i(
602
+ children: (b) => /* @__PURE__ */ e(ke, { children: l.map((v) => /* @__PURE__ */ i(
603
603
  "button",
604
604
  {
605
605
  type: "button",
606
606
  onClick: () => {
607
- p.onClick(), b();
607
+ v.onClick(), b();
608
608
  },
609
609
  className: c(
610
610
  "flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",
611
611
  "transition-colors duration-fast ease-out",
612
612
  "focus-visible:outline-none focus-visible:focus-ring",
613
- p.variant === "destructive" ? "text-danger-fg hover:bg-danger-soft" : "text-text hover:bg-surface-hover"
613
+ v.variant === "destructive" ? "text-danger-fg hover:bg-danger-soft" : "text-text hover:bg-surface-hover"
614
614
  ),
615
615
  children: [
616
- p.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: p.icon }),
617
- p.label
616
+ v.icon && /* @__PURE__ */ e("span", { className: "shrink-0", children: v.icon }),
617
+ v.label
618
618
  ]
619
619
  },
620
- p.id
620
+ v.id
621
621
  )) })
622
622
  }
623
623
  )
@@ -650,16 +650,16 @@ const rr = {
650
650
  labelClassName: o,
651
651
  className: f,
652
652
  id: d,
653
- ...v
653
+ ...p
654
654
  }, h) => {
655
- const m = ce.useId(), b = d || `checkbox-${m}`, p = !!n, w = ce.useRef(null), g = ce.useCallback(
655
+ const u = ce.useId(), b = d || `checkbox-${u}`, v = !!n, N = ce.useRef(null), g = ce.useCallback(
656
656
  (x) => {
657
- w.current = x, typeof h == "function" ? h(x) : h && typeof h == "object" && (h.current = x);
657
+ N.current = x, typeof h == "function" ? h(x) : h && typeof h == "object" && (h.current = x);
658
658
  },
659
659
  [h]
660
660
  );
661
661
  return ce.useEffect(() => {
662
- w.current && (w.current.indeterminate = a);
662
+ N.current && (N.current.indeterminate = a);
663
663
  }, [a]), /* @__PURE__ */ i("div", { className: c("flex flex-col", l), children: [
664
664
  /* @__PURE__ */ i("div", { className: c("flex items-center gap-3", nr[s]), children: [
665
665
  /* @__PURE__ */ e(
@@ -668,7 +668,7 @@ const rr = {
668
668
  ref: g,
669
669
  id: b,
670
670
  type: "checkbox",
671
- "aria-invalid": p || void 0,
671
+ "aria-invalid": v || void 0,
672
672
  className: c(
673
673
  // radius-xs (5px): its own step on the scale. At 16px the 9px
674
674
  // button radius reads as a circle and the 7px chip radius still
@@ -679,10 +679,10 @@ const rr = {
679
679
  "focus-visible:outline-none focus-visible:focus-ring",
680
680
  "disabled:cursor-not-allowed disabled:bg-surface-hover",
681
681
  rr[s],
682
- p ? "border-danger-border" : "border-border-strong",
682
+ v ? "border-danger-border" : "border-border-strong",
683
683
  f
684
684
  ),
685
- ...v
685
+ ...p
686
686
  }
687
687
  ),
688
688
  t && /* @__PURE__ */ i("div", { className: "flex-1", children: [
@@ -692,7 +692,7 @@ const rr = {
692
692
  htmlFor: b,
693
693
  className: c(
694
694
  "cursor-pointer",
695
- p ? "text-danger-fg" : "text-text",
695
+ v ? "text-danger-fg" : "text-text",
696
696
  sr[s],
697
697
  o
698
698
  ),
@@ -717,49 +717,49 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
717
717
  className: o,
718
718
  minDate: f,
719
719
  maxDate: d,
720
- format: v = "MM/dd/yyyy",
720
+ format: p = "MM/dd/yyyy",
721
721
  withTime: h = !1
722
- }, m) => {
723
- const [b, p] = O(!1), [w, g] = O(() => t || /* @__PURE__ */ new Date()), x = ne(null), T = ne(null), C = De(b, T);
722
+ }, u) => {
723
+ const [b, v] = O(!1), [N, g] = O(() => t || /* @__PURE__ */ new Date()), x = ne(null), T = ne(null), C = De(b, T);
724
724
  G(() => {
725
- const u = (E) => {
726
- x.current && !x.current.contains(E.target) && p(!1);
725
+ const m = (E) => {
726
+ x.current && !x.current.contains(E.target) && v(!1);
727
727
  };
728
- return b && document.addEventListener("mousedown", u), () => {
729
- document.removeEventListener("mousedown", u);
728
+ return b && document.addEventListener("mousedown", m), () => {
729
+ document.removeEventListener("mousedown", m);
730
730
  };
731
731
  }, [b]);
732
- const q = (u) => {
733
- if (!u) return "";
734
- const E = u.getDate().toString().padStart(2, "0"), y = (u.getMonth() + 1).toString().padStart(2, "0"), A = u.getFullYear(), N = v === "dd/MM/yyyy" ? `${E}/${y}/${A}` : v === "yyyy-MM-dd" ? `${A}-${y}-${E}` : `${y}/${E}/${A}`;
735
- return h ? `${N} ${D(u)}` : N;
736
- }, D = (u) => `${u.getHours().toString().padStart(2, "0")}:${u.getMinutes().toString().padStart(2, "0")}`, J = (u) => {
737
- const [E, y] = u.split(":").map(Number);
732
+ const q = (m) => {
733
+ if (!m) return "";
734
+ const E = m.getDate().toString().padStart(2, "0"), y = (m.getMonth() + 1).toString().padStart(2, "0"), A = m.getFullYear(), w = p === "dd/MM/yyyy" ? `${E}/${y}/${A}` : p === "yyyy-MM-dd" ? `${A}-${y}-${E}` : `${y}/${E}/${A}`;
735
+ return h ? `${w} ${D(m)}` : w;
736
+ }, D = (m) => `${m.getHours().toString().padStart(2, "0")}:${m.getMinutes().toString().padStart(2, "0")}`, J = (m) => {
737
+ const [E, y] = m.split(":").map(Number);
738
738
  if (Number.isNaN(E) || Number.isNaN(y)) return;
739
739
  const A = t ? new Date(t) : /* @__PURE__ */ new Date();
740
740
  A.setHours(E, y, 0, 0), r?.(A);
741
741
  }, V = () => {
742
- const u = w.getFullYear(), E = w.getMonth(), y = new Date(u, E, 1), A = new Date(y);
742
+ const m = N.getFullYear(), E = N.getMonth(), y = new Date(m, E, 1), A = new Date(y);
743
743
  A.setDate(A.getDate() - y.getDay());
744
- const N = [], W = new Date(A);
744
+ const w = [], W = new Date(A);
745
745
  for (let se = 0; se < 42; se++)
746
- N.push(new Date(W)), W.setDate(W.getDate() + 1);
747
- return N;
748
- }, I = (u) => {
749
- if (u.getMonth() === w.getMonth() && !(f && u < f) && !(d && u > d)) {
746
+ w.push(new Date(W)), W.setDate(W.getDate() + 1);
747
+ return w;
748
+ }, I = (m) => {
749
+ if (m.getMonth() === N.getMonth() && !(f && m < f) && !(d && m > d)) {
750
750
  if (h) {
751
- const y = new Date(u);
751
+ const y = new Date(m);
752
752
  y.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(y);
753
753
  return;
754
754
  }
755
- r?.(u), p(!1);
755
+ r?.(m), v(!1);
756
756
  }
757
757
  }, H = () => {
758
- g(new Date(w.getFullYear(), w.getMonth() - 1, 1));
758
+ g(new Date(N.getFullYear(), N.getMonth() - 1, 1));
759
759
  }, te = () => {
760
- g(new Date(w.getFullYear(), w.getMonth() + 1, 1));
760
+ g(new Date(N.getFullYear(), N.getMonth() + 1, 1));
761
761
  }, Y = () => {
762
- r?.(null), p(!1);
762
+ r?.(null), v(!1);
763
763
  }, K = c(
764
764
  "w-full border border-border-strong rounded-tile transition-colors duration-fast",
765
765
  "bg-surface text-text",
@@ -792,14 +792,14 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
792
792
  /* @__PURE__ */ e(
793
793
  "input",
794
794
  {
795
- ref: m,
795
+ ref: u,
796
796
  type: "text",
797
797
  value: q(t ?? null),
798
798
  placeholder: n,
799
799
  disabled: s,
800
800
  required: a,
801
801
  readOnly: !0,
802
- onClick: () => !s && p(!b),
802
+ onClick: () => !s && v(!b),
803
803
  className: c(K, "pr-10 cursor-pointer")
804
804
  }
805
805
  ),
@@ -807,7 +807,7 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
807
807
  "button",
808
808
  {
809
809
  type: "button",
810
- onClick: () => !s && p(!b),
810
+ onClick: () => !s && v(!b),
811
811
  disabled: s,
812
812
  className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
813
813
  children: /* @__PURE__ */ e(ar, {})
@@ -825,9 +825,9 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
825
825
  }
826
826
  ),
827
827
  /* @__PURE__ */ i("h3", { className: "text-sm font-medium text-text", children: [
828
- k[w.getMonth()],
828
+ k[N.getMonth()],
829
829
  " ",
830
- w.getFullYear()
830
+ N.getFullYear()
831
831
  ] }),
832
832
  /* @__PURE__ */ e(
833
833
  "button",
@@ -838,24 +838,24 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
838
838
  }
839
839
  )
840
840
  ] }),
841
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((u) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: u }, u)) }),
842
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ie.map((u, E) => {
843
- const y = u.getMonth() === w.getMonth(), A = t && u.toDateString() === t.toDateString(), N = u.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), W = !y || f && u < f || d && u > d;
841
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((m) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: m }, m)) }),
842
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ie.map((m, E) => {
843
+ const y = m.getMonth() === N.getMonth(), A = t && m.toDateString() === t.toDateString(), w = m.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), W = !y || f && m < f || d && m > d;
844
844
  return /* @__PURE__ */ e(
845
845
  "button",
846
846
  {
847
- onClick: () => !W && I(u),
847
+ onClick: () => !W && I(m),
848
848
  disabled: W,
849
849
  className: c(
850
850
  "w-8 h-8 text-sm rounded transition-colors duration-fast",
851
851
  {
852
852
  "text-text hover:bg-surface-hover": y && !A && !W,
853
853
  "bg-accent text-accent-fg": A,
854
- "bg-surface-hover text-text": N && !A,
854
+ "bg-surface-hover text-text": w && !A,
855
855
  "text-text-muted cursor-not-allowed": W
856
856
  }
857
857
  ),
858
- children: u.getDate()
858
+ children: m.getDate()
859
859
  },
860
860
  E
861
861
  );
@@ -868,7 +868,7 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
868
868
  id: "datepicker-time",
869
869
  type: "time",
870
870
  value: t ? D(t) : "",
871
- onChange: (u) => J(u.target.value),
871
+ onChange: (m) => J(m.target.value),
872
872
  className: "h-control-sm rounded-md border border-border bg-surface-input px-2 text-sm text-text focus-visible:outline-none focus-visible:focus-ring"
873
873
  }
874
874
  )
@@ -885,7 +885,7 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
885
885
  /* @__PURE__ */ e(
886
886
  "button",
887
887
  {
888
- onClick: () => p(!1),
888
+ onClick: () => v(!1),
889
889
  className: "text-sm text-info-fg hover:underline",
890
890
  children: "Close"
891
891
  }
@@ -909,18 +909,18 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
909
909
  options: o,
910
910
  placeholder: f,
911
911
  containerClassName: d,
912
- labelClassName: v,
912
+ labelClassName: p,
913
913
  className: h,
914
- id: m,
914
+ id: u,
915
915
  searchable: b,
916
- multiple: p,
917
- value: w,
916
+ multiple: v,
917
+ value: N,
918
918
  onChange: g,
919
919
  allowCreate: x,
920
920
  onCreateOption: T,
921
921
  ...C
922
922
  }, q) => {
923
- const D = m || `select-${Math.random().toString(36).substr(2, 9)}`, J = !!n, [V, I] = ce.useState(!1), [H, te] = ce.useState(""), Y = ce.useRef(null), K = ce.useRef(null), ie = De(V, K, { matchWidth: !0 }), [k, u] = ce.useState(o);
923
+ const D = u || `select-${Math.random().toString(36).substr(2, 9)}`, J = !!n, [V, I] = ce.useState(!1), [H, te] = ce.useState(""), Y = ce.useRef(null), K = ce.useRef(null), ie = De(V, K, { matchWidth: !0 }), [k, m] = ce.useState(o);
924
924
  ce.useImperativeHandle(q, () => Y.current), ce.useEffect(() => {
925
925
  const $ = (_) => {
926
926
  Y.current && !Y.current.contains(_.target) && I(!1);
@@ -943,21 +943,21 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
943
943
  [E]
944
944
  );
945
945
  ce.useEffect(() => {
946
- u(($) => {
946
+ m(($) => {
947
947
  const _ = [...o];
948
948
  return $.forEach((z) => {
949
949
  !E(_, z.value) && !E(_, z.label) && _.push(z);
950
- }), y(_, w);
950
+ }), y(_, N);
951
951
  });
952
- }, [o, w, y, E]);
952
+ }, [o, N, y, E]);
953
953
  const A = ($) => {
954
- if (p) {
955
- const _ = Array.isArray(w) ? w : [], z = _.includes($) ? _.filter((F) => F !== $) : [..._, $];
954
+ if (v) {
955
+ const _ = Array.isArray(N) ? N : [], z = _.includes($) ? _.filter((F) => F !== $) : [..._, $];
956
956
  g?.(z);
957
957
  } else
958
958
  g?.($), I(!1), te("");
959
- }, N = p ? null : k.find(($) => $.value === w), W = p ? k.filter(
960
- ($) => Array.isArray(w) && w.includes($.value)
959
+ }, w = v ? null : k.find(($) => $.value === N), W = v ? k.filter(
960
+ ($) => Array.isArray(N) && N.includes($.value)
961
961
  ) : [], se = b && H ? k.filter(
962
962
  ($) => $.label.toLowerCase().includes(H.toLowerCase())
963
963
  ) : k, ee = !!x && !!b && !!H.trim() && !E(k, H), X = ($) => {
@@ -968,11 +968,11 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
968
968
  label: _
969
969
  };
970
970
  if (E(k, z.value) || E(k, z.label)) {
971
- A(z.value), te(""), p || I(!1);
971
+ A(z.value), te(""), v || I(!1);
972
972
  return;
973
973
  }
974
- u((F) => [...F, z]), A(z.value), te(""), p || I(!1);
975
- }, P = () => p ? W.length > 0 ? W.map(($) => $.label).join(", ") : f || "Select options" : N?.label || f || "Select an option";
974
+ m((F) => [...F, z]), A(z.value), te(""), v || I(!1);
975
+ }, P = () => v ? W.length > 0 ? W.map(($) => $.label).join(", ") : f || "Select options" : w?.label || f || "Select an option";
976
976
  return /* @__PURE__ */ i(
977
977
  "div",
978
978
  {
@@ -992,7 +992,7 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
992
992
  className: c(
993
993
  "block text-xs font-semibold uppercase tracking-label mb-1.5",
994
994
  J ? "text-danger-fg" : "text-text-muted",
995
- v
995
+ p
996
996
  ),
997
997
  children: t
998
998
  }
@@ -1063,7 +1063,7 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
1063
1063
  }
1064
1064
  ),
1065
1065
  /* @__PURE__ */ i("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
1066
- f && !p && /* @__PURE__ */ e(
1066
+ f && !v && /* @__PURE__ */ e(
1067
1067
  "li",
1068
1068
  {
1069
1069
  className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
@@ -1074,7 +1074,7 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
1074
1074
  }
1075
1075
  ),
1076
1076
  se.map(($) => {
1077
- const _ = p ? Array.isArray(w) && w.includes($.value) : w === $.value;
1077
+ const _ = v ? Array.isArray(N) && N.includes($.value) : N === $.value;
1078
1078
  return /* @__PURE__ */ e(
1079
1079
  "li",
1080
1080
  {
@@ -1086,7 +1086,7 @@ const ar = () => /* @__PURE__ */ e(Z, { icon: vt, size: "md", color: "current" }
1086
1086
  _ && "bg-accent-soft text-accent font-semibold"
1087
1087
  ),
1088
1088
  children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
1089
- p && /* @__PURE__ */ e(
1089
+ v && /* @__PURE__ */ e(
1090
1090
  "input",
1091
1091
  {
1092
1092
  type: "checkbox",
@@ -1125,7 +1125,7 @@ const ir = {
1125
1125
  md: "h-control-md px-3 text-base",
1126
1126
  lg: "h-control-lg px-3 text-base",
1127
1127
  full: "h-control-md px-3 text-base"
1128
- }, Ze = "mb-1.5 block text-sm font-medium", Qe = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", et = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ne = be(
1128
+ }, Qe = "mb-1.5 block text-sm font-medium", et = "block w-full rounded-tile border bg-surface-input text-text transition-colors duration-fast ease-out placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled", tt = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ne = be(
1129
1129
  ({
1130
1130
  label: t,
1131
1131
  helperText: r,
@@ -1136,21 +1136,21 @@ const ir = {
1136
1136
  endIcon: o,
1137
1137
  loading: f = !1,
1138
1138
  containerClassName: d,
1139
- labelClassName: v,
1139
+ labelClassName: p,
1140
1140
  className: h,
1141
- id: m,
1141
+ id: u,
1142
1142
  ...b
1143
- }, p) => {
1144
- const w = ce.useId(), g = m || `textfield-${w}`, x = !!n, T = n || r ? `${g}-description` : void 0;
1143
+ }, v) => {
1144
+ const N = ce.useId(), g = u || `textfield-${N}`, x = !!n, T = n || r ? `${g}-description` : void 0;
1145
1145
  return /* @__PURE__ */ i("div", { className: c("flex flex-col", a && "w-full", d), children: [
1146
1146
  t && /* @__PURE__ */ e(
1147
1147
  "label",
1148
1148
  {
1149
1149
  htmlFor: g,
1150
1150
  className: c(
1151
- Ze,
1151
+ Qe,
1152
1152
  x ? "text-danger-fg" : "text-text-muted",
1153
- v
1153
+ p
1154
1154
  ),
1155
1155
  children: t
1156
1156
  }
@@ -1160,16 +1160,16 @@ const ir = {
1160
1160
  /* @__PURE__ */ e(
1161
1161
  "input",
1162
1162
  {
1163
- ref: p,
1163
+ ref: v,
1164
1164
  id: g,
1165
1165
  "aria-invalid": x || void 0,
1166
1166
  "aria-describedby": T,
1167
1167
  className: c(
1168
- Qe,
1168
+ et,
1169
1169
  ir[s],
1170
1170
  l && "pl-9",
1171
1171
  (o || f) && "pr-9",
1172
- et(x),
1172
+ tt(x),
1173
1173
  h
1174
1174
  ),
1175
1175
  ...b
@@ -1205,14 +1205,14 @@ function dr({
1205
1205
  templatePlaceholder: o,
1206
1206
  showTemplate: f = !0
1207
1207
  }) {
1208
- const [d, v] = O([]);
1208
+ const [d, p] = O([]);
1209
1209
  G(() => {
1210
- let m = !0;
1210
+ let u = !0;
1211
1211
  return Promise.resolve(n?.()).then((b) => {
1212
- m && b && v(b.data ?? []);
1212
+ u && b && p(b.data ?? []);
1213
1213
  }).catch(() => {
1214
1214
  }), () => {
1215
- m = !1;
1215
+ u = !1;
1216
1216
  };
1217
1217
  }, []);
1218
1218
  const h = t ?? {};
@@ -1223,9 +1223,9 @@ function dr({
1223
1223
  size: a,
1224
1224
  fullWidth: !0,
1225
1225
  value: h.folderId ?? "",
1226
- options: d.map((m) => ({ value: m.id, label: m.name })),
1226
+ options: d.map((u) => ({ value: u.id, label: u.name })),
1227
1227
  placeholder: l ?? "Select a folder",
1228
- onChange: (m) => r?.({ ...h, folderId: m })
1228
+ onChange: (u) => r?.({ ...h, folderId: u })
1229
1229
  }
1230
1230
  ),
1231
1231
  f && /* @__PURE__ */ e(
@@ -1235,7 +1235,7 @@ function dr({
1235
1235
  disabled: s ?? !1,
1236
1236
  value: h.pathTemplate ?? "",
1237
1237
  placeholder: o ?? "Sub-path e.g. {yyyy}/{mm}/{dd} (optional)",
1238
- onChange: (m) => r?.({ ...h, pathTemplate: m.target.value })
1238
+ onChange: (u) => r?.({ ...h, pathTemplate: u.target.value })
1239
1239
  }
1240
1240
  )
1241
1241
  ] });
@@ -1261,28 +1261,28 @@ const ve = (...t) => t.filter(Boolean).join(" "), ur = (t) => /* @__PURE__ */ e(
1261
1261
  loading: o = !1,
1262
1262
  containerClassName: f,
1263
1263
  labelClassName: d,
1264
- className: v,
1264
+ className: p,
1265
1265
  id: h,
1266
- options: m,
1266
+ options: u,
1267
1267
  onRemoteSearch: b,
1268
- onSelect: p,
1269
- debounceTime: w = 500,
1268
+ onSelect: v,
1269
+ debounceTime: N = 500,
1270
1270
  showAllOnOpen: g = !1,
1271
1271
  value: x,
1272
1272
  onChange: T,
1273
1273
  ...C
1274
1274
  }, q) => {
1275
- const D = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, J = !!n, V = ne(null), I = ne(null), [H, te] = O(x || ""), [Y, K] = O(!1), [ie, k] = O(!1), [u, E] = O(!1);
1275
+ const D = h || `searchfield-${Math.random().toString(36).substr(2, 9)}`, J = !!n, V = ne(null), I = ne(null), [H, te] = O(x || ""), [Y, K] = O(!1), [ie, k] = O(!1), [m, E] = O(!1);
1276
1276
  G(() => {
1277
1277
  x !== void 0 && te(x);
1278
1278
  }, [x]);
1279
1279
  const y = pe(() => {
1280
- if (g && !u || !H) return m;
1280
+ if (g && !m || !H) return u;
1281
1281
  const P = String(H).toLowerCase();
1282
- return m.filter(
1282
+ return u.filter(
1283
1283
  ($) => String($.label).toLowerCase().includes(P)
1284
1284
  );
1285
- }, [H, m, g, u]);
1285
+ }, [H, u, g, m]);
1286
1286
  G(() => {
1287
1287
  if (!b || !H) {
1288
1288
  k(!1);
@@ -1297,11 +1297,11 @@ const ve = (...t) => t.filter(Boolean).join(" "), ur = (t) => /* @__PURE__ */ e(
1297
1297
  } finally {
1298
1298
  k(!1);
1299
1299
  }
1300
- }, w);
1300
+ }, N);
1301
1301
  return () => {
1302
1302
  clearTimeout(P), k(!1);
1303
1303
  };
1304
- }, [H, w, b]), G(() => {
1304
+ }, [H, N, b]), G(() => {
1305
1305
  const P = ($) => {
1306
1306
  V.current && !V.current.contains($.target) && K(!1);
1307
1307
  };
@@ -1310,10 +1310,10 @@ const ve = (...t) => t.filter(Boolean).join(" "), ur = (t) => /* @__PURE__ */ e(
1310
1310
  const A = (P) => {
1311
1311
  const $ = P.target.value;
1312
1312
  te($), K(!0), E(!0), T && T(P);
1313
- }, N = (P) => {
1314
- te(P.label), K(!1), E(!1), p && p(P.value);
1313
+ }, w = (P) => {
1314
+ te(P.label), K(!1), E(!1), v && v(P.value);
1315
1315
  }, W = () => {
1316
- (m.length > 0 || b) && (K(!0), E(!1));
1316
+ (u.length > 0 || b) && (K(!0), E(!1));
1317
1317
  }, se = o || ie, ee = Y && (y.length > 0 || se), X = pe(() => q || I, [q]);
1318
1318
  return /* @__PURE__ */ i(
1319
1319
  "div",
@@ -1361,7 +1361,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), ur = (t) => /* @__PURE__ */ e(
1361
1361
  // Altijd padding rechts voor de dropdown/loading icon
1362
1362
  // State styles
1363
1363
  J ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
1364
- v || ""
1364
+ p || ""
1365
1365
  ),
1366
1366
  ...C
1367
1367
  }
@@ -1401,7 +1401,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), ur = (t) => /* @__PURE__ */ e(
1401
1401
  "li",
1402
1402
  {
1403
1403
  className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
1404
- onClick: () => N(P),
1404
+ onClick: () => w(P),
1405
1405
  role: "option",
1406
1406
  "aria-selected": H === P.label,
1407
1407
  children: P.label
@@ -1430,7 +1430,7 @@ const ve = (...t) => t.filter(Boolean).join(" "), ur = (t) => /* @__PURE__ */ e(
1430
1430
  }
1431
1431
  );
1432
1432
  hr.displayName = "SearchableTextField";
1433
- const tt = be(
1433
+ const rt = be(
1434
1434
  ({
1435
1435
  value: t,
1436
1436
  onValueChange: r,
@@ -1441,7 +1441,7 @@ const tt = be(
1441
1441
  className: o,
1442
1442
  disabled: f,
1443
1443
  ...d
1444
- }, v) => /* @__PURE__ */ i(
1444
+ }, p) => /* @__PURE__ */ i(
1445
1445
  "div",
1446
1446
  {
1447
1447
  className: c(
@@ -1459,7 +1459,7 @@ const tt = be(
1459
1459
  /* @__PURE__ */ e(
1460
1460
  "input",
1461
1461
  {
1462
- ref: v,
1462
+ ref: p,
1463
1463
  type: "search",
1464
1464
  value: t,
1465
1465
  disabled: f,
@@ -1494,7 +1494,7 @@ const tt = be(
1494
1494
  }
1495
1495
  )
1496
1496
  );
1497
- tt.displayName = "SearchField";
1497
+ rt.displayName = "SearchField";
1498
1498
  const xr = be(
1499
1499
  ({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
1500
1500
  const f = /* @__PURE__ */ e(
@@ -1560,62 +1560,62 @@ const br = ({
1560
1560
  showCheck: f = !0,
1561
1561
  header: d
1562
1562
  }) => {
1563
- const [v, h] = O(!1), [m, b] = O(null), [p, w] = O({ top: 0, left: 0 }), g = ne(null), x = ne(null), T = ne(null), C = ne(null), q = De(v, x, { placement: a }), D = ne(null), J = () => Array.from(
1563
+ const [p, h] = O(!1), [u, b] = O(null), [v, N] = O({ top: 0, left: 0 }), g = ne(null), x = ne(null), T = ne(null), C = ne(null), q = De(p, x, { placement: a }), D = ne(null), J = () => Array.from(
1564
1564
  C.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
1565
1565
  );
1566
1566
  G(() => {
1567
- v && J()[0]?.focus();
1568
- }, [v]);
1569
- const V = (u) => {
1570
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(u.key)) return;
1567
+ p && J()[0]?.focus();
1568
+ }, [p]);
1569
+ const V = (m) => {
1570
+ if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(m.key)) return;
1571
1571
  const y = J();
1572
1572
  if (y.length === 0) return;
1573
- u.preventDefault();
1574
- const A = y.indexOf(document.activeElement), N = u.key === "Home" ? 0 : u.key === "End" ? y.length - 1 : u.key === "ArrowDown" ? (A + 1) % y.length : (A - 1 + y.length) % y.length;
1575
- y[N]?.focus();
1573
+ m.preventDefault();
1574
+ const A = y.indexOf(document.activeElement), w = m.key === "Home" ? 0 : m.key === "End" ? y.length - 1 : m.key === "ArrowDown" ? (A + 1) % y.length : (A - 1 + y.length) % y.length;
1575
+ y[w]?.focus();
1576
1576
  };
1577
1577
  G(() => {
1578
- const u = (E) => {
1578
+ const m = (E) => {
1579
1579
  g.current && (!g.current.contains(E.target) || T.current && !T.current.contains(E.target)) && (h(!1), b(null), D.current && (clearTimeout(D.current), D.current = null));
1580
1580
  };
1581
- return v && document.addEventListener("mousedown", u), () => {
1582
- document.removeEventListener("mousedown", u);
1581
+ return p && document.addEventListener("mousedown", m), () => {
1582
+ document.removeEventListener("mousedown", m);
1583
1583
  };
1584
- }, [v]), G(() => {
1585
- const u = (E) => {
1584
+ }, [p]), G(() => {
1585
+ const m = (E) => {
1586
1586
  E.key === "Escape" && (h(!1), b(null), x.current?.focus(), D.current && (clearTimeout(D.current), D.current = null));
1587
1587
  };
1588
- return v && document.addEventListener("keydown", u), () => {
1589
- document.removeEventListener("keydown", u);
1588
+ return p && document.addEventListener("keydown", m), () => {
1589
+ document.removeEventListener("keydown", m);
1590
1590
  };
1591
- }, [v]), G(() => {
1592
- if (m && g.current) {
1593
- const u = g.current.querySelector(
1594
- `[data-option-value="${m}"]`
1591
+ }, [p]), G(() => {
1592
+ if (u && g.current) {
1593
+ const m = g.current.querySelector(
1594
+ `[data-option-value="${u}"]`
1595
1595
  );
1596
- if (u) {
1597
- const E = u.getBoundingClientRect();
1598
- w({
1596
+ if (m) {
1597
+ const E = m.getBoundingClientRect();
1598
+ N({
1599
1599
  top: E.top,
1600
1600
  left: E.right + 8
1601
1601
  });
1602
1602
  }
1603
1603
  }
1604
- }, [m]), G(() => () => {
1604
+ }, [u]), G(() => () => {
1605
1605
  D.current && clearTimeout(D.current);
1606
1606
  }, []);
1607
- const I = (u) => {
1608
- u.stopPropagation(), !l && (h(!v), b(null), D.current && (clearTimeout(D.current), D.current = null));
1609
- }, H = (u, E, y) => {
1610
- u.stopPropagation(), !E.disabled && !E.divider && (!E.children || E.children.length === 0) && (s?.(E.value, y), h(!1), b(null));
1611
- }, te = (u) => {
1612
- D.current && (clearTimeout(D.current), D.current = null), u.children && u.children.length > 0 ? b(u.value) : b(null);
1613
- }, Y = (u) => {
1614
- u.children && u.children.length > 0 ? D.current = setTimeout(() => {
1607
+ const I = (m) => {
1608
+ m.stopPropagation(), !l && (h(!p), b(null), D.current && (clearTimeout(D.current), D.current = null));
1609
+ }, H = (m, E, y) => {
1610
+ m.stopPropagation(), !E.disabled && !E.divider && (!E.children || E.children.length === 0) && (s?.(E.value, y), h(!1), b(null));
1611
+ }, te = (m) => {
1612
+ D.current && (clearTimeout(D.current), D.current = null), m.children && m.children.length > 0 ? b(m.value) : b(null);
1613
+ }, Y = (m) => {
1614
+ m.children && m.children.length > 0 ? D.current = setTimeout(() => {
1615
1615
  b(null);
1616
1616
  }, 150) : b(null);
1617
- }, K = (u, E, y) => {
1618
- u.stopPropagation(), !E.disabled && !E.divider && (s?.(E.value, y), h(!1), b(null));
1617
+ }, K = (m, E, y) => {
1618
+ m.stopPropagation(), !E.disabled && !E.divider && (s?.(E.value, y), h(!1), b(null));
1619
1619
  }, ie = c(
1620
1620
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
1621
1621
  "max-h-60 overflow-auto"
@@ -1639,17 +1639,17 @@ const br = ({
1639
1639
  onClick: I,
1640
1640
  disabled: l,
1641
1641
  "aria-haspopup": "menu",
1642
- "aria-expanded": v,
1642
+ "aria-expanded": p,
1643
1643
  className: c("inline-flex items-center justify-center", {
1644
1644
  "opacity-50 cursor-not-allowed": l
1645
1645
  }),
1646
1646
  children: t
1647
1647
  }
1648
1648
  ),
1649
- v && /* @__PURE__ */ e("div", { ref: C, className: ie, style: q, onKeyDown: V, children: /* @__PURE__ */ i("div", { className: "p-2", role: "menu", children: [
1649
+ p && /* @__PURE__ */ e("div", { ref: C, className: ie, style: q, onKeyDown: V, children: /* @__PURE__ */ i("div", { className: "p-2", role: "menu", children: [
1650
1650
  d && (typeof d == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: d }) : d),
1651
- r.map((u, E) => {
1652
- if (u.divider)
1651
+ r.map((m, E) => {
1652
+ if (m.divider)
1653
1653
  return /* @__PURE__ */ e(
1654
1654
  "div",
1655
1655
  {
@@ -1657,35 +1657,35 @@ const br = ({
1657
1657
  },
1658
1658
  `divider-${E}`
1659
1659
  );
1660
- const y = u.children && u.children.length > 0, A = m === u.value;
1660
+ const y = m.children && m.children.length > 0, A = u === m.value;
1661
1661
  return /* @__PURE__ */ i("div", { className: "relative group", children: [
1662
1662
  /* @__PURE__ */ i(
1663
1663
  "button",
1664
1664
  {
1665
- "data-option-value": u.value,
1665
+ "data-option-value": m.value,
1666
1666
  role: "menuitem",
1667
1667
  "aria-haspopup": y ? "menu" : void 0,
1668
- onClick: (N) => H(N, u),
1669
- onMouseEnter: () => te(u),
1670
- onMouseLeave: () => Y(u),
1671
- disabled: u.disabled,
1668
+ onClick: (w) => H(w, m),
1669
+ onMouseEnter: () => te(m),
1670
+ onMouseLeave: () => Y(m),
1671
+ disabled: m.disabled,
1672
1672
  className: c(
1673
1673
  "flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover focus-visible:outline-none focus-visible:focus-ring",
1674
1674
  {
1675
- "opacity-50 cursor-not-allowed": u.disabled,
1675
+ "opacity-50 cursor-not-allowed": m.disabled,
1676
1676
  "bg-surface-hover": A && y
1677
1677
  }
1678
1678
  ),
1679
1679
  children: [
1680
1680
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
1681
- u.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: u.icon }),
1681
+ m.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: m.icon }),
1682
1682
  /* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
1683
- /* @__PURE__ */ e("span", { className: "font-base truncate", children: u.label }),
1684
- u.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: u.description })
1683
+ /* @__PURE__ */ e("span", { className: "font-base truncate", children: m.label }),
1684
+ m.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: m.description })
1685
1685
  ] })
1686
1686
  ] }),
1687
1687
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1688
- f && n === u.value && /* @__PURE__ */ e(Oe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1688
+ f && n === m.value && /* @__PURE__ */ e(Fe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1689
1689
  y && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
1690
1690
  ] })
1691
1691
  ]
@@ -1697,19 +1697,19 @@ const br = ({
1697
1697
  ref: T,
1698
1698
  className: k,
1699
1699
  style: {
1700
- top: `${p.top}px`,
1701
- left: `${p.left}px`
1700
+ top: `${v.top}px`,
1701
+ left: `${v.left}px`
1702
1702
  },
1703
1703
  onMouseEnter: () => {
1704
- D.current && (clearTimeout(D.current), D.current = null), b(u.value);
1704
+ D.current && (clearTimeout(D.current), D.current = null), b(m.value);
1705
1705
  },
1706
1706
  onMouseLeave: () => {
1707
1707
  D.current = setTimeout(() => {
1708
1708
  b(null);
1709
1709
  }, 150);
1710
1710
  },
1711
- children: /* @__PURE__ */ e("div", { className: "p-2", children: u.children.map((N, W) => {
1712
- if (N.divider)
1711
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: m.children.map((w, W) => {
1712
+ if (w.divider)
1713
1713
  return /* @__PURE__ */ e(
1714
1714
  "div",
1715
1715
  {
@@ -1717,50 +1717,50 @@ const br = ({
1717
1717
  },
1718
1718
  `divider-${W}`
1719
1719
  );
1720
- const se = typeof n == "object" && n[u.value] && n[u.value].includes(
1721
- N.value
1722
- ) || n === N.value;
1720
+ const se = typeof n == "object" && n[m.value] && n[m.value].includes(
1721
+ w.value
1722
+ ) || n === w.value;
1723
1723
  return /* @__PURE__ */ i(
1724
1724
  "button",
1725
1725
  {
1726
1726
  onClick: (ee) => K(
1727
1727
  ee,
1728
- N,
1729
- u.value
1728
+ w,
1729
+ m.value
1730
1730
  ),
1731
- disabled: N.disabled,
1731
+ disabled: w.disabled,
1732
1732
  className: c(
1733
1733
  "flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover",
1734
1734
  {
1735
- "opacity-50 cursor-not-allowed": N.disabled
1735
+ "opacity-50 cursor-not-allowed": w.disabled
1736
1736
  }
1737
1737
  ),
1738
1738
  children: [
1739
1739
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
1740
- N.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: N.icon }),
1740
+ w.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: w.icon }),
1741
1741
  /* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
1742
- /* @__PURE__ */ e("span", { className: "font-base truncate", children: N.label }),
1743
- N.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: N.description })
1742
+ /* @__PURE__ */ e("span", { className: "font-base truncate", children: w.label }),
1743
+ w.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: w.description })
1744
1744
  ] })
1745
1745
  ] }),
1746
- f && se && /* @__PURE__ */ e(Oe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1746
+ f && se && /* @__PURE__ */ e(Fe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1747
1747
  ]
1748
1748
  },
1749
- N.value
1749
+ w.value
1750
1750
  );
1751
1751
  }) })
1752
1752
  }
1753
1753
  )
1754
- ] }, u.value);
1754
+ ] }, m.value);
1755
1755
  }),
1756
1756
  (() => {
1757
- const u = r.reduce((E, y) => {
1757
+ const m = r.reduce((E, y) => {
1758
1758
  if (y.divider) return E;
1759
- const A = y.children ? y.children.filter((N) => !N.divider).length : 0;
1759
+ const A = y.children ? y.children.filter((w) => !w.divider).length : 0;
1760
1760
  return E + 1 + A;
1761
1761
  }, 0);
1762
- return u > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ i("div", { className: "text-xs text-text-muted px-3 py-1", children: [
1763
- u,
1762
+ return m > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ i("div", { className: "text-xs text-text-muted px-3 py-1", children: [
1763
+ m,
1764
1764
  " options available"
1765
1765
  ] }) });
1766
1766
  })()
@@ -1774,7 +1774,7 @@ const br = ({
1774
1774
  className: n
1775
1775
  }) => t.length === 0 ? null : /* @__PURE__ */ e("div", { className: c("flex flex-wrap items-center gap-2", n), children: t.map(
1776
1776
  (s) => s.render ? /* @__PURE__ */ e(ce.Fragment, { children: s.render() }, s.id) : s.splitOptions && s.splitOptions.length > 0 ? /* @__PURE__ */ e(
1777
- Xe,
1777
+ Ze,
1778
1778
  {
1779
1779
  label: s.label,
1780
1780
  onClick: s.onClick,
@@ -1802,7 +1802,7 @@ const br = ({
1802
1802
  sm: "p-2",
1803
1803
  md: "px-5 py-4",
1804
1804
  lg: "p-6"
1805
- }, Hn = ({
1805
+ }, qn = ({
1806
1806
  actions: t = [],
1807
1807
  onBack: r,
1808
1808
  backLabel: n = "Back",
@@ -1822,7 +1822,7 @@ const br = ({
1822
1822
  ),
1823
1823
  l && /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
1824
1824
  /* @__PURE__ */ e(Me, { actions: t, className: c(!l && "ml-auto") })
1825
- ] }), Vn = (t) => (r) => t(r instanceof Date ? r : null), qn = (t) => (r) => t(typeof r == "string" ? r : ""), pr = {
1825
+ ] }), Un = (t) => (r) => t(r instanceof Date ? r : null), Wn = (t) => (r) => t(typeof r == "string" ? r : ""), pr = {
1826
1826
  none: "px-0",
1827
1827
  sm: "px-2",
1828
1828
  md: "px-3.5",
@@ -1831,7 +1831,7 @@ const br = ({
1831
1831
  sm: "h-row-lg",
1832
1832
  md: "h-row-xl",
1833
1833
  lg: "h-14"
1834
- }, yr = 8, He = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
1834
+ }, yr = 8, Ve = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
1835
1835
  function Nr(t, r) {
1836
1836
  if (r <= 7) return Array.from({ length: r }, (l, o) => o);
1837
1837
  const s = [.../* @__PURE__ */ new Set([0, r - 1, t - 1, t, t + 1])].filter((l) => l >= 0 && l < r).sort((l, o) => l - o), a = [];
@@ -1891,7 +1891,7 @@ const wr = (t) => {
1891
1891
  )) })
1892
1892
  }
1893
1893
  );
1894
- }, Ve = ({
1894
+ }, qe = ({
1895
1895
  data: t,
1896
1896
  columns: r,
1897
1897
  loading: n = !1,
@@ -1901,12 +1901,12 @@ const wr = (t) => {
1901
1901
  onSearchChange: o,
1902
1902
  filters: f = [],
1903
1903
  toolbarActions: d = [],
1904
- paginated: v = !1,
1904
+ paginated: p = !1,
1905
1905
  defaultPageSize: h = 10,
1906
- actions: m = [],
1906
+ actions: u = [],
1907
1907
  onRowClick: b,
1908
- selectable: p = !1,
1909
- selectedRows: w = [],
1908
+ selectable: v = !1,
1909
+ selectedRows: N = [],
1910
1910
  onSelectionChange: g,
1911
1911
  getRowKey: x = (te, Y) => Y,
1912
1912
  emptyContent: T,
@@ -1918,13 +1918,13 @@ const wr = (t) => {
1918
1918
  rowClassName: I,
1919
1919
  headerBackground: H = !0
1920
1920
  }) => {
1921
- const [te, Y] = O(""), K = l !== void 0, ie = K ? l : te, k = o ?? Y, [u, E] = O({
1921
+ const [te, Y] = O(""), K = l !== void 0, ie = K ? l : te, k = o ?? Y, [m, E] = O({
1922
1922
  column: null,
1923
1923
  direction: null
1924
1924
  }), [y, A] = O({
1925
1925
  page: 0,
1926
1926
  pageSize: h
1927
- }), N = ne(null), W = pe(() => {
1927
+ }), w = ne(null), W = pe(() => {
1928
1928
  let S = t;
1929
1929
  if (s && !K && ie.trim()) {
1930
1930
  const U = r.filter(
@@ -1944,18 +1944,18 @@ const wr = (t) => {
1944
1944
  }));
1945
1945
  }), S;
1946
1946
  }, [t, ie, K, r, s, f]), se = pe(() => {
1947
- if (!u.column || !u.direction) return W;
1948
- const S = r.find((U) => U.id === u.column);
1947
+ if (!m.column || !m.direction) return W;
1948
+ const S = r.find((U) => U.id === m.column);
1949
1949
  return S ? [...W].sort((U, re) => {
1950
1950
  const oe = typeof S.accessor == "function" ? S.accessor(U) : U[S.accessor], R = typeof S.accessor == "function" ? S.accessor(re) : re[S.accessor];
1951
1951
  let ue = 0;
1952
- return oe < R ? ue = -1 : oe > R && (ue = 1), u.direction === "desc" ? -ue : ue;
1952
+ return oe < R ? ue = -1 : oe > R && (ue = 1), m.direction === "desc" ? -ue : ue;
1953
1953
  }) : W;
1954
- }, [W, u, r]), ee = pe(() => {
1955
- if (!v) return se;
1954
+ }, [W, m, r]), ee = pe(() => {
1955
+ if (!p) return se;
1956
1956
  const S = y.page * y.pageSize, U = S + y.pageSize;
1957
1957
  return se.slice(S, U);
1958
- }, [se, y, v]), X = xe(
1958
+ }, [se, y, p]), X = xe(
1959
1959
  (S) => {
1960
1960
  r.find((re) => re.id === S)?.sortable && E((re) => re.column !== S ? { column: S, direction: "asc" } : re.direction === "asc" ? { column: S, direction: "desc" } : { column: null, direction: null });
1961
1961
  },
@@ -1966,11 +1966,11 @@ const wr = (t) => {
1966
1966
  (S, U) => {
1967
1967
  if (!g) return;
1968
1968
  const re = x(S, 0);
1969
- g(U ? [...w, S] : w.filter(
1970
- (oe, R) => x(w[R], R) !== re
1969
+ g(U ? [...N, S] : N.filter(
1970
+ (oe, R) => x(N[R], R) !== re
1971
1971
  ));
1972
1972
  },
1973
- [w, g, x]
1973
+ [N, g, x]
1974
1974
  ), _ = xe(
1975
1975
  (S) => {
1976
1976
  g && g(S ? [...ee] : []);
@@ -1979,24 +1979,24 @@ const wr = (t) => {
1979
1979
  );
1980
1980
  G(() => {
1981
1981
  A((S) => ({ ...S, page: 0 }));
1982
- }, [ie, u]), G(() => {
1982
+ }, [ie, m]), G(() => {
1983
1983
  A((S) => ({ ...S, page: 0 }));
1984
1984
  }, [f.map((S) => S.value).join(",")]);
1985
1985
  const z = se.length, F = Math.ceil(z / y.pageSize), j = y.page * y.pageSize + 1, B = Math.min(j + y.pageSize - 1, z), M = ee.length > 0 && ee.every((S) => {
1986
1986
  const U = x(S, 0);
1987
- return w.some(
1987
+ return N.some(
1988
1988
  (re, oe) => x(re, oe) === U
1989
1989
  );
1990
1990
  }), L = ee.some((S) => {
1991
1991
  const U = x(S, 0);
1992
- return w.some(
1992
+ return N.some(
1993
1993
  (re, oe) => x(re, oe) === U
1994
1994
  );
1995
- }), Q = pr[J], ae = H ? "bg-surface-sunk" : "bg-surface", de = c("text-text", Q), ge = s || f.length > 0 || d.length > 0, he = v && z > 0, Ae = he || C !== void 0;
1995
+ }), Q = pr[J], ae = H ? "bg-surface-sunk" : "bg-surface", de = c("text-text", Q), ge = s || f.length > 0 || d.length > 0, he = p && z > 0, Ae = he || C !== void 0;
1996
1996
  return /* @__PURE__ */ i("div", { className: c("flex min-w-0 flex-col", V), children: [
1997
1997
  ge && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
1998
1998
  s && /* @__PURE__ */ e(
1999
- tt,
1999
+ rt,
2000
2000
  {
2001
2001
  value: ie,
2002
2002
  onValueChange: k,
@@ -2007,9 +2007,9 @@ const wr = (t) => {
2007
2007
  f.map((S) => /* @__PURE__ */ e(wr, { ...S }, S.id)),
2008
2008
  d.length > 0 && /* @__PURE__ */ e(Me, { actions: d, className: "ml-auto" })
2009
2009
  ] }),
2010
- /* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ i("table", { ref: N, className: "min-w-full border-collapse text-base text-text", children: [
2010
+ /* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ i("table", { ref: w, className: "min-w-full border-collapse text-base text-text", children: [
2011
2011
  /* @__PURE__ */ e("thead", { className: c(ae, "h-control-lg"), children: /* @__PURE__ */ i("tr", { children: [
2012
- p && /* @__PURE__ */ e("th", { className: c(de, "w-10"), children: /* @__PURE__ */ e(
2012
+ v && /* @__PURE__ */ e("th", { className: c(de, "w-10"), children: /* @__PURE__ */ e(
2013
2013
  ye,
2014
2014
  {
2015
2015
  size: "sm",
@@ -2042,11 +2042,11 @@ const wr = (t) => {
2042
2042
  S.sortable && /* @__PURE__ */ e(
2043
2043
  Z,
2044
2044
  {
2045
- icon: u.column === S.id && u.direction === "desc" ? Te : wt,
2045
+ icon: m.column === S.id && m.direction === "desc" ? Te : wt,
2046
2046
  size: "xs",
2047
2047
  className: c(
2048
2048
  "transition-opacity duration-fast ease-out",
2049
- u.column === S.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2049
+ m.column === S.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2050
2050
  )
2051
2051
  }
2052
2052
  )
@@ -2054,22 +2054,22 @@ const wr = (t) => {
2054
2054
  },
2055
2055
  S.id
2056
2056
  )),
2057
- m.length > 0 && /* @__PURE__ */ e("th", { className: c(de, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2057
+ u.length > 0 && /* @__PURE__ */ e("th", { className: c(de, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2058
2058
  ] }) }),
2059
2059
  /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: yr }).map((S, U) => /* @__PURE__ */ i("tr", { className: "animate-pulse border-t border-border-subtle", "aria-hidden": !0, children: [
2060
- p && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
2060
+ v && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
2061
2061
  r.map((re, oe) => /* @__PURE__ */ e("td", { className: c(de, "h-row-lg"), style: { width: re.width }, children: /* @__PURE__ */ e(
2062
2062
  "span",
2063
2063
  {
2064
2064
  className: "block h-3 rounded-xs bg-surface-hover",
2065
- style: { width: He[(U + oe) % He.length] }
2065
+ style: { width: Ve[(U + oe) % Ve.length] }
2066
2066
  }
2067
2067
  ) }, re.id)),
2068
- m.length > 0 && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg") })
2068
+ u.length > 0 && /* @__PURE__ */ e("td", { className: c(de, "h-row-lg") })
2069
2069
  ] }, `skeleton-${U}`)) : ee.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
2070
2070
  "td",
2071
2071
  {
2072
- colSpan: r.length + (p ? 1 : 0) + (m.length > 0 ? 1 : 0),
2072
+ colSpan: r.length + (v ? 1 : 0) + (u.length > 0 ? 1 : 0),
2073
2073
  className: c(
2074
2074
  de,
2075
2075
  "border-t border-border-subtle py-10 text-center text-text-muted"
@@ -2077,7 +2077,7 @@ const wr = (t) => {
2077
2077
  children: T || "No data available"
2078
2078
  }
2079
2079
  ) }) : ee.map((S, U) => {
2080
- const re = x(S, U), oe = w.some(
2080
+ const re = x(S, U), oe = N.some(
2081
2081
  (R, ue) => x(R, ue) === re
2082
2082
  );
2083
2083
  return /* @__PURE__ */ i(
@@ -2097,7 +2097,7 @@ const wr = (t) => {
2097
2097
  R.stopPropagation(), b?.(S, U);
2098
2098
  },
2099
2099
  children: [
2100
- p && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
2100
+ v && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
2101
2101
  ye,
2102
2102
  {
2103
2103
  size: "sm",
@@ -2126,19 +2126,19 @@ const wr = (t) => {
2126
2126
  R.id
2127
2127
  );
2128
2128
  }),
2129
- m.length > 0 && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
2129
+ u.length > 0 && /* @__PURE__ */ e("td", { className: de, children: /* @__PURE__ */ e(
2130
2130
  br,
2131
2131
  {
2132
2132
  className: "rounded-md",
2133
2133
  trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(Z, { icon: kt, size: "md", color: "current" }) }),
2134
- options: m.map((R) => ({
2134
+ options: u.map((R) => ({
2135
2135
  value: R.id,
2136
2136
  label: R.label,
2137
2137
  icon: R.icon,
2138
2138
  disabled: R.disabled?.(S)
2139
2139
  })),
2140
2140
  onSelect: (R) => {
2141
- const ue = m.find(
2141
+ const ue = u.find(
2142
2142
  (ot) => ot.id === R
2143
2143
  );
2144
2144
  ue && ue.onClick(S, U);
@@ -2200,7 +2200,7 @@ const wr = (t) => {
2200
2200
  ] })
2201
2201
  ] })
2202
2202
  ] });
2203
- }, kr = Ke(null), Un = ({
2203
+ }, kr = Ge(null), Kn = ({
2204
2204
  items: t,
2205
2205
  activeTab: r,
2206
2206
  onTabChange: n,
@@ -2243,12 +2243,12 @@ const wr = (t) => {
2243
2243
  }) => {
2244
2244
  const [f, d] = O(
2245
2245
  r || n || t[0]?.id || ""
2246
- ), v = n || f, h = (g) => {
2246
+ ), p = n || f, h = (g) => {
2247
2247
  s ? s(g) : d(g);
2248
- }, m = {
2249
- activeTab: v,
2248
+ }, u = {
2249
+ activeTab: p,
2250
2250
  setActiveTab: h
2251
- }, b = t.find((g) => g.id === v), p = c(
2251
+ }, b = t.find((g) => g.id === p), v = c(
2252
2252
  "flex",
2253
2253
  {
2254
2254
  "border-b border-border px-2": a === "default" || a === "underline",
@@ -2257,7 +2257,7 @@ const wr = (t) => {
2257
2257
  "space-x-8": a === "default" || a === "underline"
2258
2258
  },
2259
2259
  o
2260
- ), w = (g, x) => {
2260
+ ), N = (g, x) => {
2261
2261
  const T = "transition-colors duration-fast font-medium", C = {
2262
2262
  "text-xs px-2 py-1": l === "sm",
2263
2263
  "text-sm px-3 py-2": l === "md",
@@ -2282,17 +2282,17 @@ const wr = (t) => {
2282
2282
  } : {};
2283
2283
  return c(T, C, q, D, J, V);
2284
2284
  };
2285
- return /* @__PURE__ */ e(kr.Provider, { value: m, children: /* @__PURE__ */ i("div", { children: [
2286
- /* @__PURE__ */ e("div", { className: p, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
2285
+ return /* @__PURE__ */ e(kr.Provider, { value: u, children: /* @__PURE__ */ i("div", { children: [
2286
+ /* @__PURE__ */ e("div", { className: v, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
2287
2287
  "button",
2288
2288
  {
2289
2289
  type: "button",
2290
2290
  role: "tab",
2291
- "aria-selected": v === g.id,
2291
+ "aria-selected": p === g.id,
2292
2292
  "aria-controls": `tabpanel-${g.id}`,
2293
2293
  disabled: g.disabled,
2294
2294
  onClick: () => !g.disabled && h(g.id),
2295
- className: w(g, v === g.id),
2295
+ className: N(g, p === g.id),
2296
2296
  children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
2297
2297
  g.label,
2298
2298
  g.badge && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-surface-hover text-text-muted", children: g.badge })
@@ -2304,8 +2304,8 @@ const wr = (t) => {
2304
2304
  "div",
2305
2305
  {
2306
2306
  role: "tabpanel",
2307
- id: `tabpanel-${v}`,
2308
- "aria-labelledby": `tab-${v}`,
2307
+ id: `tabpanel-${p}`,
2308
+ "aria-labelledby": `tab-${p}`,
2309
2309
  className: "mt-4",
2310
2310
  children: b.content
2311
2311
  }
@@ -2318,7 +2318,7 @@ const wr = (t) => {
2318
2318
  xl: "max-w-4xl",
2319
2319
  full: "max-w-full mx-4"
2320
2320
  };
2321
- function rt({
2321
+ function nt({
2322
2322
  open: t,
2323
2323
  onClose: r,
2324
2324
  title: n,
@@ -2328,21 +2328,21 @@ function rt({
2328
2328
  className: o,
2329
2329
  backdropClassName: f,
2330
2330
  children: d,
2331
- footer: v,
2331
+ footer: p,
2332
2332
  showCloseButton: h = !0
2333
2333
  }) {
2334
- const m = ne(null), b = ne(null);
2334
+ const u = ne(null), b = ne(null);
2335
2335
  G(() => {
2336
2336
  if (!t || !l) return;
2337
- const w = (g) => {
2337
+ const N = (g) => {
2338
2338
  g.key === "Escape" && r();
2339
2339
  };
2340
- return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
2341
- }, [t, l, r]), G(() => (t ? (b.current = document.activeElement, m.current && m.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
2340
+ return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
2341
+ }, [t, l, r]), G(() => (t ? (b.current = document.activeElement, u.current && u.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
2342
2342
  document.body.style.overflow = "";
2343
2343
  }), [t]);
2344
- const p = (w) => {
2345
- a && w.target === w.currentTarget && r();
2344
+ const v = (N) => {
2345
+ a && N.target === N.currentTarget && r();
2346
2346
  };
2347
2347
  return t ? /* @__PURE__ */ e(
2348
2348
  "div",
@@ -2353,11 +2353,11 @@ function rt({
2353
2353
  // 'animate-fade-in',
2354
2354
  f
2355
2355
  ),
2356
- onClick: p,
2356
+ onClick: v,
2357
2357
  children: /* @__PURE__ */ i(
2358
2358
  "div",
2359
2359
  {
2360
- ref: m,
2360
+ ref: u,
2361
2361
  className: c(
2362
2362
  "relative w-full bg-surface rounded-lg shadow-modal",
2363
2363
  // 'animate-scale-in',
@@ -2390,7 +2390,7 @@ function rt({
2390
2390
  )
2391
2391
  ] }),
2392
2392
  /* @__PURE__ */ e("div", { className: "p-6", children: d }),
2393
- v && /* @__PURE__ */ e("div", { className: "px-6 py-4", children: v })
2393
+ p && /* @__PURE__ */ e("div", { className: "px-6 py-4", children: p })
2394
2394
  ]
2395
2395
  }
2396
2396
  )
@@ -2439,19 +2439,19 @@ const Er = {
2439
2439
  italic: o = !1,
2440
2440
  underline: f = !1,
2441
2441
  lineHeight: d = "normal",
2442
- as: v,
2442
+ as: p,
2443
2443
  className: h,
2444
- children: m,
2444
+ children: u,
2445
2445
  ...b
2446
2446
  }) => {
2447
- const p = v || _r(t), w = t === "caption", g = t === "label", x = t === "code", T = c(
2447
+ const v = p || _r(t), N = t === "caption", g = t === "label", x = t === "code", T = c(
2448
2448
  "font-sans",
2449
2449
  // Variant — caption and label pin their own size/weight
2450
- w && "text-xs text-text-subtle",
2450
+ N && "text-xs text-text-subtle",
2451
2451
  g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
2452
2452
  x && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
2453
2453
  // Size — only where the variant does not pin it
2454
- !w && !g && !x && Er[r],
2454
+ !N && !g && !x && Er[r],
2455
2455
  // Weight — label owns its weight
2456
2456
  !g && zr[n],
2457
2457
  Mr[s],
@@ -2463,7 +2463,7 @@ const Er = {
2463
2463
  l && "truncate",
2464
2464
  h
2465
2465
  );
2466
- return /* @__PURE__ */ e(p, { className: T, ...b, children: m });
2466
+ return /* @__PURE__ */ e(v, { className: T, ...b, children: u });
2467
2467
  };
2468
2468
  function _r(t) {
2469
2469
  return {
@@ -2483,17 +2483,17 @@ const Dr = ({
2483
2483
  accept: o,
2484
2484
  onListFiles: f,
2485
2485
  onListMounts: d,
2486
- onUploadFile: v,
2486
+ onUploadFile: p,
2487
2487
  onDownloadFile: h,
2488
- onRegisterFile: m
2488
+ onRegisterFile: u
2489
2489
  }) => {
2490
- const [b, p] = O(!1), [w, g] = O([]), [x, T] = O(null), [C, q] = O("/"), [D, J] = O([]), [V, I] = O(!1), [H, te] = O(""), [Y, K] = O(
2490
+ const [b, v] = O(!1), [N, g] = O([]), [x, T] = O(null), [C, q] = O("/"), [D, J] = O([]), [V, I] = O(!1), [H, te] = O(""), [Y, K] = O(
2491
2491
  typeof t == "object" ? t : null
2492
- ), [ie, k] = O(!1), [u, E] = O(""), y = ne(null);
2492
+ ), [ie, k] = O(!1), [m, E] = O(""), y = ne(null);
2493
2493
  G(() => {
2494
2494
  b && A();
2495
2495
  }, [b]), G(() => {
2496
- b && x && N();
2496
+ b && x && w();
2497
2497
  }, [b, x, C, H]);
2498
2498
  const A = async () => {
2499
2499
  I(!0);
@@ -2505,7 +2505,7 @@ const Dr = ({
2505
2505
  } finally {
2506
2506
  I(!1);
2507
2507
  }
2508
- }, N = async () => {
2508
+ }, w = async () => {
2509
2509
  if (x) {
2510
2510
  I(!0);
2511
2511
  try {
@@ -2533,7 +2533,7 @@ const Dr = ({
2533
2533
  providerKey: L.name,
2534
2534
  ownerId: "me"
2535
2535
  };
2536
- K(de), r(de, ae), p(!1);
2536
+ K(de), r(de, ae), v(!1);
2537
2537
  } catch (Q) {
2538
2538
  console.error("Local file selection failed", Q);
2539
2539
  } finally {
@@ -2545,7 +2545,7 @@ const Dr = ({
2545
2545
  if (!(!L || !x)) {
2546
2546
  I(!0);
2547
2547
  try {
2548
- const Q = await L.arrayBuffer(), ae = await v?.({
2548
+ const Q = await L.arrayBuffer(), ae = await p?.({
2549
2549
  file: new Uint8Array(Q),
2550
2550
  filename: L.name,
2551
2551
  mimeType: L.type || "application/octet-stream",
@@ -2554,7 +2554,7 @@ const Dr = ({
2554
2554
  });
2555
2555
  if (ae?.data) {
2556
2556
  const de = ae.data;
2557
- K(de), r(de, new Uint8Array(Q)), p(!1);
2557
+ K(de), r(de, new Uint8Array(Q)), v(!1);
2558
2558
  }
2559
2559
  } catch (Q) {
2560
2560
  console.error("Upload failed", Q);
@@ -2563,12 +2563,12 @@ const Dr = ({
2563
2563
  }
2564
2564
  }
2565
2565
  }, ee = async () => {
2566
- if (!(!u || !x)) {
2566
+ if (!(!m || !x)) {
2567
2567
  I(!0);
2568
2568
  try {
2569
- const M = `${C}${u}/`;
2570
- m && (await m({
2571
- name: u,
2569
+ const M = `${C}${m}/`;
2570
+ u && (await u({
2571
+ name: m,
2572
2572
  type: "folder",
2573
2573
  path: C,
2574
2574
  mimeType: "application/x-directory",
@@ -2576,7 +2576,7 @@ const Dr = ({
2576
2576
  mountId: x.id,
2577
2577
  providerKey: M,
2578
2578
  ownerId: "me"
2579
- }), await N()), k(!1), E("");
2579
+ }), await w()), k(!1), E("");
2580
2580
  } catch (M) {
2581
2581
  console.error("Failed to create folder", M);
2582
2582
  } finally {
@@ -2587,7 +2587,7 @@ const Dr = ({
2587
2587
  I(!0);
2588
2588
  try {
2589
2589
  const L = await h?.(M.id);
2590
- K(M), r(M, L), p(!1);
2590
+ K(M), r(M, L), v(!1);
2591
2591
  } catch (L) {
2592
2592
  console.error("Failed to download file", L);
2593
2593
  } finally {
@@ -2634,7 +2634,7 @@ const Dr = ({
2634
2634
  /* @__PURE__ */ e(
2635
2635
  Z,
2636
2636
  {
2637
- icon: L.type === "folder" ? Be : Le,
2637
+ icon: L.type === "folder" ? Re : Le,
2638
2638
  size: "sm",
2639
2639
  color: L.type === "folder" ? "warning" : "secondary"
2640
2640
  }
@@ -2675,7 +2675,7 @@ const Dr = ({
2675
2675
  header: "Mount Name",
2676
2676
  accessor: "name",
2677
2677
  cell: (M) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 font-medium", children: [
2678
- /* @__PURE__ */ e(Z, { icon: Fe, size: "sm", color: "primary" }),
2678
+ /* @__PURE__ */ e(Z, { icon: Be, size: "sm", color: "primary" }),
2679
2679
  /* @__PURE__ */ e("span", { children: M })
2680
2680
  ] })
2681
2681
  },
@@ -2692,7 +2692,7 @@ const Dr = ({
2692
2692
  /* @__PURE__ */ i(
2693
2693
  "div",
2694
2694
  {
2695
- onClick: () => !l && p(!0),
2695
+ onClick: () => !l && v(!0),
2696
2696
  className: c(
2697
2697
  "flex items-center gap-3 px-3 py-2 border rounded-lg cursor-pointer transition-colors",
2698
2698
  "hover:border-border-strong bg-surface",
@@ -2700,7 +2700,7 @@ const Dr = ({
2700
2700
  l && "opacity-50 cursor-not-allowed bg-surface-sunk"
2701
2701
  ),
2702
2702
  children: [
2703
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: Y ? Le : Fe, color: Y ? "primary" : "secondary" }) }),
2703
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Z, { icon: Y ? Le : Be, color: Y ? "primary" : "secondary" }) }),
2704
2704
  /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: Y ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: Y.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
2705
2705
  Y && !l && /* @__PURE__ */ e(
2706
2706
  "button",
@@ -2715,11 +2715,11 @@ const Dr = ({
2715
2715
  ),
2716
2716
  a && /* @__PURE__ */ e(fe, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
2717
2717
  /* @__PURE__ */ e(
2718
- rt,
2718
+ nt,
2719
2719
  {
2720
2720
  open: b,
2721
2721
  onClose: () => {
2722
- p(!1), T(null), q("/"), k(!1);
2722
+ v(!1), T(null), q("/"), k(!1);
2723
2723
  },
2724
2724
  title: x ? `Explorer: ${x.name}` : "Select Storage Mount",
2725
2725
  size: "lg",
@@ -2788,12 +2788,12 @@ const Dr = ({
2788
2788
  ] })
2789
2789
  ] }),
2790
2790
  ie && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
2791
- /* @__PURE__ */ e(Z, { icon: Be, size: "sm", color: "warning" }),
2791
+ /* @__PURE__ */ e(Z, { icon: Re, size: "sm", color: "warning" }),
2792
2792
  /* @__PURE__ */ e(
2793
2793
  Ne,
2794
2794
  {
2795
2795
  placeholder: "Folder name",
2796
- value: u,
2796
+ value: m,
2797
2797
  onChange: (M) => E(M.target.value),
2798
2798
  autoFocus: !0
2799
2799
  }
@@ -2802,7 +2802,7 @@ const Dr = ({
2802
2802
  /* @__PURE__ */ e(le, { variant: "ghost", onClick: () => k(!1), children: "Cancel" })
2803
2803
  ] }),
2804
2804
  /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2805
- Ve,
2805
+ qe,
2806
2806
  {
2807
2807
  data: F,
2808
2808
  columns: j,
@@ -2812,9 +2812,9 @@ const Dr = ({
2812
2812
  }
2813
2813
  ) })
2814
2814
  ] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
2815
- Ve,
2815
+ qe,
2816
2816
  {
2817
- data: w,
2817
+ data: N,
2818
2818
  columns: B,
2819
2819
  loading: V,
2820
2820
  emptyContent: "No storage mounts configured",
@@ -2870,18 +2870,18 @@ const Dr = ({
2870
2870
  containerClassName: o,
2871
2871
  labelClassName: f,
2872
2872
  className: d,
2873
- id: v,
2873
+ id: p,
2874
2874
  rows: h = 4,
2875
- ...m
2875
+ ...u
2876
2876
  }, b) => {
2877
- const p = ce.useId(), w = v || `textarea-${p}`, g = !!n, x = n || r ? `${w}-description` : void 0;
2877
+ const v = ce.useId(), N = p || `textarea-${v}`, g = !!n, x = n || r ? `${N}-description` : void 0;
2878
2878
  return /* @__PURE__ */ i("div", { className: c("flex flex-col", a && "w-full", o), children: [
2879
2879
  t && /* @__PURE__ */ e(
2880
2880
  "label",
2881
2881
  {
2882
- htmlFor: w,
2882
+ htmlFor: N,
2883
2883
  className: c(
2884
- Ze,
2884
+ Qe,
2885
2885
  g ? "text-danger-fg" : "text-text-muted",
2886
2886
  f
2887
2887
  ),
@@ -2893,18 +2893,18 @@ const Dr = ({
2893
2893
  "textarea",
2894
2894
  {
2895
2895
  ref: b,
2896
- id: w,
2896
+ id: N,
2897
2897
  rows: h,
2898
2898
  "aria-invalid": g || void 0,
2899
2899
  "aria-describedby": x,
2900
2900
  className: c(
2901
- Qe,
2901
+ et,
2902
2902
  "resize-y leading-relaxed",
2903
2903
  Ar[s],
2904
- et(g),
2904
+ tt(g),
2905
2905
  d
2906
2906
  ),
2907
- ...m
2907
+ ...u
2908
2908
  }
2909
2909
  ),
2910
2910
  l && /* @__PURE__ */ e(
@@ -2961,7 +2961,7 @@ const Lr = /* @__PURE__ */ new Set([
2961
2961
  "new-password",
2962
2962
  "one-time-code"
2963
2963
  ]);
2964
- function qe(t) {
2964
+ function Ue(t) {
2965
2965
  return t && Lr.has(t) ? { autoComplete: t } : {
2966
2966
  autoComplete: "off",
2967
2967
  // 1Password
@@ -2974,7 +2974,7 @@ function qe(t) {
2974
2974
  "data-form-type": "other"
2975
2975
  };
2976
2976
  }
2977
- function Ue(t, r) {
2977
+ function We(t, r) {
2978
2978
  return r.split(".").reduce(
2979
2979
  (n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
2980
2980
  t
@@ -3013,7 +3013,7 @@ function jr({
3013
3013
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: s })
3014
3014
  ] });
3015
3015
  }
3016
- const Wn = ({
3016
+ const Gn = ({
3017
3017
  groups: t,
3018
3018
  data: r,
3019
3019
  onSubmit: n,
@@ -3023,12 +3023,12 @@ const Wn = ({
3023
3023
  validate: o,
3024
3024
  submitButton: f = { label: "Submit", variant: "primary" },
3025
3025
  cancelButton: d = { label: "Cancel", variant: "outline" },
3026
- showButtons: v = !0,
3026
+ showButtons: p = !0,
3027
3027
  layout: h = "vertical",
3028
- size: m = "md",
3028
+ size: u = "md",
3029
3029
  loading: b = !1,
3030
- className: p,
3031
- ref: w,
3030
+ className: v,
3031
+ ref: N,
3032
3032
  sdk: g
3033
3033
  }) => {
3034
3034
  const [x, T] = O(r || {}), [C, q] = O({}), [D, J] = O({});
@@ -3036,49 +3036,49 @@ const Wn = ({
3036
3036
  r && T({ ...r });
3037
3037
  }, [r]);
3038
3038
  const V = xe(
3039
- (k, u, E) => {
3039
+ (k, m, E) => {
3040
3040
  const y = t.flatMap((A) => A.items).find((A) => A.name === k);
3041
3041
  if (!y) return null;
3042
- if (y.required && (u == null || u === ""))
3042
+ if (y.required && (m == null || m === ""))
3043
3043
  return `${y.label} is required`;
3044
3044
  if (y.type === "array") {
3045
- if (y.required && (!u || u.length === 0))
3045
+ if (y.required && (!m || m.length === 0))
3046
3046
  return `${y.label} cannot be empty.`;
3047
- if (u && !Array.isArray(u))
3047
+ if (m && !Array.isArray(m))
3048
3048
  return `${y.label} must be an array.`;
3049
- if (Array.isArray(u) && y.arrayFields) {
3049
+ if (Array.isArray(m) && y.arrayFields) {
3050
3050
  const A = [];
3051
- let N = !1;
3052
- if (u.forEach((W, se) => {
3051
+ let w = !1;
3052
+ if (m.forEach((W, se) => {
3053
3053
  const ee = {};
3054
3054
  for (const X of y.arrayFields) {
3055
3055
  const P = W?.[X.name];
3056
3056
  if (X.required && (P == null || P === ""))
3057
- ee[X.name] = `${X.label} is required`, N = !0;
3057
+ ee[X.name] = `${X.label} is required`, w = !0;
3058
3058
  else if (X.validator) {
3059
3059
  const $ = X.validator(P, W);
3060
- $ && (ee[X.name] = $, N = !0);
3060
+ $ && (ee[X.name] = $, w = !0);
3061
3061
  }
3062
3062
  }
3063
3063
  A[se] = ee;
3064
- }), N)
3064
+ }), w)
3065
3065
  return JSON.stringify(A);
3066
3066
  }
3067
3067
  }
3068
- return y.validator ? y.validator(u, E) : null;
3068
+ return y.validator ? y.validator(m, E) : null;
3069
3069
  },
3070
3070
  [t]
3071
3071
  ), I = xe(
3072
- (k, u) => {
3072
+ (k, m) => {
3073
3073
  let E = Ir(
3074
3074
  x,
3075
3075
  k,
3076
- u
3076
+ m
3077
3077
  );
3078
- t.flatMap((N) => N.items).find((N) => N.name === k)?.removeIfEmpty && (u == null || u === "") && (E = Pr(E, k)), T(E), J((N) => ({ ...N, [k]: !0 }));
3079
- const A = V(k, u, E);
3080
- q((N) => ({
3081
- ...N,
3078
+ t.flatMap((w) => w.items).find((w) => w.name === k)?.removeIfEmpty && (m == null || m === "") && (E = Pr(E, k)), T(E), J((w) => ({ ...w, [k]: !0 }));
3079
+ const A = V(k, m, E);
3080
+ q((w) => ({
3081
+ ...w,
3082
3082
  [k]: A || ""
3083
3083
  })), a?.(E, k);
3084
3084
  },
@@ -3086,22 +3086,22 @@ const Wn = ({
3086
3086
  ), H = xe(
3087
3087
  async (k) => {
3088
3088
  if (k.preventDefault(), b) return;
3089
- const u = {}, E = t.flatMap((A) => A.items);
3089
+ const m = {}, E = t.flatMap((A) => A.items);
3090
3090
  for (const A of E) {
3091
3091
  if (A.hidden || A.conditional && !A.conditional(x))
3092
3092
  continue;
3093
- const N = V(
3093
+ const w = V(
3094
3094
  A.name,
3095
- Ue(x, A.name),
3095
+ We(x, A.name),
3096
3096
  x
3097
3097
  );
3098
- N && (u[A.name] = N);
3098
+ w && (m[A.name] = w);
3099
3099
  }
3100
3100
  if (o) {
3101
3101
  const A = o(x);
3102
- A && Object.assign(u, A);
3102
+ A && Object.assign(m, A);
3103
3103
  }
3104
- if (q(u), Object.keys(u).some((A) => u[A]))
3104
+ if (q(m), Object.keys(m).some((A) => m[A]))
3105
3105
  return;
3106
3106
  const y = l ? l(x) : x;
3107
3107
  await n?.(x, y);
@@ -3109,8 +3109,8 @@ const Wn = ({
3109
3109
  [x, t, V, o, l, n, b]
3110
3110
  ), te = xe(
3111
3111
  (k) => {
3112
- const u = Ue(x, k.name), E = D[k.name] ? C[k.name] : void 0, y = k.disabled || b, A = {
3113
- value: u || "",
3112
+ const m = We(x, k.name), E = D[k.name] ? C[k.name] : void 0, y = k.disabled || b, A = {
3113
+ value: m || "",
3114
3114
  disabled: y,
3115
3115
  required: k.required,
3116
3116
  placeholder: k.placeholder,
@@ -3127,11 +3127,11 @@ const Wn = ({
3127
3127
  Ne,
3128
3128
  {
3129
3129
  ...A,
3130
- onChange: (N) => I(k.name, N.target.value),
3130
+ onChange: (w) => I(k.name, w.target.value),
3131
3131
  type: k.textType || k.type,
3132
- ...qe(k.autocomplete),
3132
+ ...Ue(k.autocomplete),
3133
3133
  error: E,
3134
- size: m
3134
+ size: u
3135
3135
  }
3136
3136
  );
3137
3137
  case "textarea":
@@ -3139,10 +3139,10 @@ const Wn = ({
3139
3139
  je,
3140
3140
  {
3141
3141
  ...A,
3142
- onChange: (N) => I(k.name, N.target.value),
3142
+ onChange: (w) => I(k.name, w.target.value),
3143
3143
  rows: k.rows ?? 4,
3144
3144
  error: E,
3145
- size: m
3145
+ size: u
3146
3146
  }
3147
3147
  );
3148
3148
  case "select":
@@ -3150,16 +3150,16 @@ const Wn = ({
3150
3150
  ze,
3151
3151
  {
3152
3152
  ...A,
3153
- onChange: (N) => I(k.name, N),
3154
- options: (k.options || []).map((N) => ({
3155
- ...N,
3156
- value: String(N.value)
3153
+ onChange: (w) => I(k.name, w),
3154
+ options: (k.options || []).map((w) => ({
3155
+ ...w,
3156
+ value: String(w.value)
3157
3157
  })),
3158
3158
  searchable: k.searchable,
3159
3159
  multiple: k.multiple,
3160
3160
  allowCreate: k.allowCreate,
3161
3161
  error: E,
3162
- size: m
3162
+ size: u
3163
3163
  }
3164
3164
  );
3165
3165
  // A short, fixed set of mutually exclusive values — priority, a scope,
@@ -3170,13 +3170,13 @@ const Wn = ({
3170
3170
  Qt,
3171
3171
  {
3172
3172
  "aria-label": k.label,
3173
- value: u == null ? "" : String(u),
3174
- onChange: (N) => I(k.name, N),
3175
- options: (k.options || []).map((N) => ({
3176
- value: String(N.value),
3177
- label: N.label
3173
+ value: m == null ? "" : String(m),
3174
+ onChange: (w) => I(k.name, w),
3175
+ options: (k.options || []).map((w) => ({
3176
+ value: String(w.value),
3177
+ label: w.label
3178
3178
  })),
3179
- size: m === "sm" ? "sm" : "md",
3179
+ size: u === "sm" ? "sm" : "md",
3180
3180
  className: k.disabled ? "pointer-events-none opacity-50" : void 0
3181
3181
  }
3182
3182
  );
@@ -3186,13 +3186,13 @@ const Wn = ({
3186
3186
  {
3187
3187
  ...A,
3188
3188
  label: k.label,
3189
- checked: !!u,
3190
- onChange: (N) => I(k.name, N.target.checked),
3191
- size: m
3189
+ checked: !!m,
3190
+ onChange: (w) => I(k.name, w.target.checked),
3191
+ size: u
3192
3192
  }
3193
3193
  );
3194
3194
  case "radio":
3195
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: k.options?.map((N) => /* @__PURE__ */ i(
3195
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: k.options?.map((w) => /* @__PURE__ */ i(
3196
3196
  "label",
3197
3197
  {
3198
3198
  className: "flex cursor-pointer items-center gap-3 text-base text-text",
@@ -3202,26 +3202,26 @@ const Wn = ({
3202
3202
  {
3203
3203
  type: "radio",
3204
3204
  name: k.name,
3205
- value: N.value,
3206
- checked: u === N.value,
3207
- onChange: () => I(k.name, N.value),
3208
- disabled: y || N.disabled,
3205
+ value: w.value,
3206
+ checked: m === w.value,
3207
+ onChange: () => I(k.name, w.value),
3208
+ disabled: y || w.disabled,
3209
3209
  className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
3210
3210
  }
3211
3211
  ),
3212
- N.label
3212
+ w.label
3213
3213
  ]
3214
3214
  },
3215
- N.value
3215
+ w.value
3216
3216
  )) });
3217
3217
  case "date":
3218
3218
  return /* @__PURE__ */ e(
3219
3219
  Pe,
3220
3220
  {
3221
3221
  ...A,
3222
- value: u ? new Date(u) : null,
3223
- onChange: (N) => I(k.name, N),
3224
- size: m
3222
+ value: m ? new Date(m) : null,
3223
+ onChange: (w) => I(k.name, w),
3224
+ size: u
3225
3225
  }
3226
3226
  );
3227
3227
  case "file":
@@ -3229,31 +3229,31 @@ const Wn = ({
3229
3229
  Dr,
3230
3230
  {
3231
3231
  ...A,
3232
- value: u,
3233
- onChange: (N) => I(k.name, N),
3232
+ value: m,
3233
+ onChange: (w) => I(k.name, w),
3234
3234
  error: E,
3235
- onListFiles: (N) => g?.http.invoke({
3235
+ onListFiles: (w) => g?.http.invoke({
3236
3236
  method: "POST",
3237
3237
  action: "storage.file.list",
3238
- body: N
3238
+ body: w
3239
3239
  }),
3240
3240
  onListMounts: () => g?.http.invoke({
3241
3241
  method: "GET",
3242
3242
  action: "storage.mount"
3243
3243
  }),
3244
- onUploadFile: (N) => g?.http.invoke({
3244
+ onUploadFile: (w) => g?.http.invoke({
3245
3245
  method: "POST",
3246
3246
  action: "storage.file.upload",
3247
- body: N
3247
+ body: w
3248
3248
  }),
3249
- onDownloadFile: (N) => g?.http.invoke({
3249
+ onDownloadFile: (w) => g?.http.invoke({
3250
3250
  method: "GET",
3251
- action: `storage.file.${N}.download`
3251
+ action: `storage.file.${w}.download`
3252
3252
  }),
3253
- onRegisterFile: (N) => g?.http.invoke({
3253
+ onRegisterFile: (w) => g?.http.invoke({
3254
3254
  method: "POST",
3255
3255
  action: "storage.file.folder",
3256
- body: N
3256
+ body: w
3257
3257
  })
3258
3258
  }
3259
3259
  );
@@ -3261,26 +3261,26 @@ const Wn = ({
3261
3261
  return /* @__PURE__ */ e(
3262
3262
  dr,
3263
3263
  {
3264
- value: u || {},
3265
- onChange: (N) => I(k.name, N),
3264
+ value: m || {},
3265
+ onChange: (w) => I(k.name, w),
3266
3266
  onListFolders: () => g?.http.invoke({
3267
3267
  method: "GET",
3268
3268
  action: "storage.mount"
3269
3269
  }),
3270
3270
  disabled: y,
3271
- size: m,
3271
+ size: u,
3272
3272
  placeholder: k.placeholder
3273
3273
  }
3274
3274
  );
3275
3275
  case "custom":
3276
3276
  return k.customComponent?.({
3277
- value: u,
3278
- onChange: (N) => I(k.name, N),
3277
+ value: m,
3278
+ onChange: (w) => I(k.name, w),
3279
3279
  error: E,
3280
3280
  disabled: y
3281
3281
  });
3282
3282
  case "array": {
3283
- const N = u || [];
3283
+ const w = m || [];
3284
3284
  let W = [];
3285
3285
  if (typeof E == "string" && E.startsWith("["))
3286
3286
  try {
@@ -3288,21 +3288,21 @@ const Wn = ({
3288
3288
  } catch {
3289
3289
  }
3290
3290
  const se = () => {
3291
- I(k.name, [...N, {}]);
3291
+ I(k.name, [...w, {}]);
3292
3292
  }, ee = (P) => {
3293
3293
  I(
3294
3294
  k.name,
3295
- N.filter(($, _) => _ !== P)
3295
+ w.filter(($, _) => _ !== P)
3296
3296
  );
3297
3297
  }, X = (P, $, _) => {
3298
- const z = [...N];
3298
+ const z = [...w];
3299
3299
  z[P] = {
3300
3300
  ...z[P],
3301
3301
  [$]: _
3302
3302
  }, I(k.name, z);
3303
3303
  };
3304
3304
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
3305
- N.map((P, $) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
3305
+ w.map((P, $) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
3306
3306
  /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: k.arrayFields?.map((_) => {
3307
3307
  const z = W?.[$]?.[_.name];
3308
3308
  return /* @__PURE__ */ i(
@@ -3339,9 +3339,9 @@ const Wn = ({
3339
3339
  j.target.value
3340
3340
  ),
3341
3341
  type: _.textType || _.type,
3342
- ...qe(_.autocomplete),
3342
+ ...Ue(_.autocomplete),
3343
3343
  error: z,
3344
- size: m
3344
+ size: u
3345
3345
  }
3346
3346
  );
3347
3347
  case "textarea":
@@ -3356,7 +3356,7 @@ const Wn = ({
3356
3356
  ),
3357
3357
  rows: _.rows ?? 4,
3358
3358
  error: z,
3359
- size: m
3359
+ size: u
3360
3360
  }
3361
3361
  );
3362
3362
  case "select":
@@ -3379,7 +3379,7 @@ const Wn = ({
3379
3379
  multiple: _.multiple,
3380
3380
  allowCreate: _.allowCreate,
3381
3381
  error: z,
3382
- size: m
3382
+ size: u
3383
3383
  }
3384
3384
  );
3385
3385
  case "checkbox":
@@ -3393,7 +3393,7 @@ const Wn = ({
3393
3393
  _.name,
3394
3394
  j.target.checked
3395
3395
  ),
3396
- size: m
3396
+ size: u
3397
3397
  }
3398
3398
  );
3399
3399
  case "radio":
@@ -3435,7 +3435,7 @@ const Wn = ({
3435
3435
  _.name,
3436
3436
  B
3437
3437
  ),
3438
- size: m
3438
+ size: u
3439
3439
  }
3440
3440
  );
3441
3441
  }
@@ -3500,13 +3500,13 @@ const Wn = ({
3500
3500
  return null;
3501
3501
  }
3502
3502
  },
3503
- [x, D, C, b, m, I]
3503
+ [x, D, C, b, u, I]
3504
3504
  ), Y = xe(
3505
3505
  (k) => {
3506
3506
  if (k.conditional && !k.conditional(x))
3507
3507
  return null;
3508
- const u = k.items.filter((y) => !(y.hidden || y.conditional && !y.conditional(x)));
3509
- if (u.length === 0) return null;
3508
+ const m = k.items.filter((y) => !(y.hidden || y.conditional && !y.conditional(x)));
3509
+ if (m.length === 0) return null;
3510
3510
  const E = c(
3511
3511
  k.layout === "flex" ? "flex flex-wrap gap-3.5" : "grid gap-3.5",
3512
3512
  k.layout !== "flex" && {
@@ -3527,7 +3527,7 @@ const Wn = ({
3527
3527
  title: k.title,
3528
3528
  description: k.description,
3529
3529
  className: "not-last:border-b not-last:border-border-subtle",
3530
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: E, children: u.map((y) => {
3530
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: E, children: m.map((y) => {
3531
3531
  const A = D[y.name] ? C[y.name] : void 0;
3532
3532
  return /* @__PURE__ */ i(
3533
3533
  "div",
@@ -3560,17 +3560,17 @@ const Wn = ({
3560
3560
  [x, D, C, te]
3561
3561
  ), K = c(
3562
3562
  {
3563
- "max-w-settings": m === "sm",
3564
- "max-w-form": m === "md",
3565
- "max-w-6xl": m === "lg",
3566
- "max-w-full": m === "full"
3563
+ "max-w-settings": u === "sm",
3564
+ "max-w-form": u === "md",
3565
+ "max-w-6xl": u === "lg",
3566
+ "max-w-full": u === "full"
3567
3567
  },
3568
- p
3569
- ), ie = m === "full" ? "md" : m;
3570
- return /* @__PURE__ */ i("form", { ref: w, onSubmit: H, className: K, children: [
3571
- !v && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
3568
+ v
3569
+ ), ie = u === "full" ? "md" : u;
3570
+ return /* @__PURE__ */ i("form", { ref: N, onSubmit: H, className: K, children: [
3571
+ !p && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
3572
3572
  /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(Y) }),
3573
- v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ i(ke, { children: [
3573
+ p && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ i(ke, { children: [
3574
3574
  /* @__PURE__ */ e("div", { className: "ml-auto" }),
3575
3575
  s && /* @__PURE__ */ e(
3576
3576
  le,
@@ -3599,7 +3599,7 @@ const Wn = ({
3599
3599
  ] }) })
3600
3600
  ] });
3601
3601
  };
3602
- function Kn({
3602
+ function Jn({
3603
3603
  open: t,
3604
3604
  title: r,
3605
3605
  description: n,
@@ -3611,7 +3611,7 @@ function Kn({
3611
3611
  onCancel: d
3612
3612
  }) {
3613
3613
  return /* @__PURE__ */ e(
3614
- rt,
3614
+ nt,
3615
3615
  {
3616
3616
  open: t,
3617
3617
  onClose: d,
@@ -3779,7 +3779,7 @@ const Vr = {
3779
3779
  menu: 4,
3780
3780
  cards: 2
3781
3781
  };
3782
- function nt({
3782
+ function Oe({
3783
3783
  variant: t = "page",
3784
3784
  shape: r,
3785
3785
  rows: n,
@@ -3790,14 +3790,14 @@ function nt({
3790
3790
  tableColumns: f,
3791
3791
  tableRows: d
3792
3792
  }) {
3793
- const v = r ?? (o ? "table" : "text"), h = n ?? d ?? Vr[v], m = s ?? f ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: c("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(Hr, { shape: v, rows: h, columns: m }) });
3793
+ const p = r ?? (o ? "table" : "text"), h = n ?? d ?? Vr[p], u = s ?? f ?? (p === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: c("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(Hr, { shape: p, rows: h, columns: u }) });
3794
3794
  return t === "inline" ? b : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: b });
3795
3795
  }
3796
3796
  const qr = {
3797
3797
  neutral: "bg-surface-hover text-text-muted",
3798
3798
  success: "bg-success-soft text-success-fg"
3799
3799
  };
3800
- function Gn({
3800
+ function Yn({
3801
3801
  icon: t,
3802
3802
  tone: r = "neutral",
3803
3803
  title: n,
@@ -3825,7 +3825,7 @@ function Gn({
3825
3825
  }
3826
3826
  );
3827
3827
  }
3828
- function Jn({ children: t, className: r, ...n }) {
3828
+ function Xn({ children: t, className: r, ...n }) {
3829
3829
  return /* @__PURE__ */ e(
3830
3830
  "kbd",
3831
3831
  {
@@ -3845,7 +3845,7 @@ const Ur = {
3845
3845
  accent: "bg-accent",
3846
3846
  success: "bg-success"
3847
3847
  };
3848
- function Yn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
3848
+ function Zn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
3849
3849
  const l = Math.max(0, Math.min(100, t));
3850
3850
  return /* @__PURE__ */ e(
3851
3851
  "div",
@@ -3884,7 +3884,7 @@ const Kr = {
3884
3884
  lg: "text-base",
3885
3885
  xl: "text-lg"
3886
3886
  };
3887
- function Xn({
3887
+ function Qn({
3888
3888
  size: t = "md",
3889
3889
  variant: r = "primary",
3890
3890
  label: n = "Loading...",
@@ -3966,7 +3966,7 @@ const Yr = {
3966
3966
  "cat-4": "bg-cat-4",
3967
3967
  "cat-5": "bg-cat-5"
3968
3968
  };
3969
- function Zn({
3969
+ function es({
3970
3970
  tone: t = "neutral",
3971
3971
  shape: r = "round",
3972
3972
  pulse: n = !1,
@@ -3989,7 +3989,7 @@ function Zn({
3989
3989
  }
3990
3990
  );
3991
3991
  }
3992
- function Qn({
3992
+ function ts({
3993
3993
  steps: t,
3994
3994
  current: r,
3995
3995
  variant: n = "numbered",
@@ -4025,7 +4025,7 @@ function Qn({
4025
4025
  d < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
4026
4026
  ] }, f)) });
4027
4027
  }
4028
- function es({ title: t, icon: r = /* @__PURE__ */ e(Tt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
4028
+ function rs({ title: t, icon: r = /* @__PURE__ */ e(Tt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
4029
4029
  return /* @__PURE__ */ i(
4030
4030
  "div",
4031
4031
  {
@@ -4070,7 +4070,7 @@ const en = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4070
4070
  "inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none",
4071
4071
  // `identity` is seeded on the name, so the same person keeps their colour
4072
4072
  // wherever they appear; the fixed tones stay as they were.
4073
- n === "identity" ? Je(t) : Xr[n],
4073
+ n === "identity" ? Ye(t) : Xr[n],
4074
4074
  Zr[s],
4075
4075
  a
4076
4076
  );
@@ -4084,7 +4084,7 @@ const en = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4084
4084
  onError: () => f(!0)
4085
4085
  }
4086
4086
  ) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: Qr(t) });
4087
- }, We = "ring-surface", tn = "ring-surface-accent", ts = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
4087
+ }, Ke = "ring-surface", tn = "ring-surface-accent", ns = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
4088
4088
  if (t.length === 0) return null;
4089
4089
  const a = t.slice(0, r), l = t.length - a.length;
4090
4090
  return /* @__PURE__ */ i("span", { className: c("inline-flex items-center", s), children: [
@@ -4097,7 +4097,7 @@ const en = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4097
4097
  title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
4098
4098
  className: c(
4099
4099
  f > 0 && "-ml-2",
4100
- o.owner ? tn : We,
4100
+ o.owner ? tn : Ke,
4101
4101
  o.seen === !1 && "opacity-40"
4102
4102
  )
4103
4103
  },
@@ -4111,7 +4111,7 @@ const en = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4111
4111
  // in the row rather than a gap at the end of it.
4112
4112
  "inline-flex items-center justify-center rounded-full shrink-0 -ml-2 font-semibold bg-avatar text-avatar-fg",
4113
4113
  n === "xs" ? "w-5 h-5 text-xs" : n === "md" ? "w-7 h-7 text-xs" : n === "lg" ? "w-9 h-9 text-xs" : "w-6 h-6 text-xs",
4114
- We
4114
+ Ke
4115
4115
  ),
4116
4116
  children: [
4117
4117
  "+",
@@ -4131,7 +4131,7 @@ const en = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a
4131
4131
  md: "size-avatar-sm rounded-md text-xs",
4132
4132
  lg: "size-avatar-lg rounded-md text-base"
4133
4133
  };
4134
- function rs({ channel: t, children: r, size: n = "md", className: s, title: a }) {
4134
+ function ss({ channel: t, children: r, size: n = "md", className: s, title: a }) {
4135
4135
  const l = t in Ee ? Ee[t] : void 0;
4136
4136
  return /* @__PURE__ */ e(
4137
4137
  "span",
@@ -4143,14 +4143,14 @@ function rs({ channel: t, children: r, size: n = "md", className: s, title: a })
4143
4143
  // An undeclared channel used to collapse onto the neutral "note" tone,
4144
4144
  // which is also what a real internal note looks like. Deriving from the
4145
4145
  // key keeps it distinguishable and keeps `note` meaning `note`.
4146
- l ? c(l.fg, l.bg) : t ? Je(t) : c(Ee.note.fg, Ee.note.bg),
4146
+ l ? c(l.fg, l.bg) : t ? Ye(t) : c(Ee.note.fg, Ee.note.bg),
4147
4147
  s
4148
4148
  ),
4149
4149
  children: r
4150
4150
  }
4151
4151
  );
4152
4152
  }
4153
- const ns = ({
4153
+ const as = ({
4154
4154
  src: t,
4155
4155
  alt: r,
4156
4156
  size: n = "md",
@@ -4160,14 +4160,14 @@ const ns = ({
4160
4160
  showError: o = !0,
4161
4161
  fallback: f,
4162
4162
  loadingContent: d,
4163
- errorContent: v,
4163
+ errorContent: p,
4164
4164
  className: h,
4165
- onLoad: m,
4165
+ onLoad: u,
4166
4166
  onError: b,
4167
- ...p
4167
+ ...v
4168
4168
  }) => {
4169
- const [w, g] = O(!0), [x, T] = O(!1), [C, q] = O(t), D = (K) => {
4170
- g(!1), T(!1), m?.(K);
4169
+ const [N, g] = O(!0), [x, T] = O(!1), [C, q] = O(t), D = (K) => {
4170
+ g(!1), T(!1), u?.(K);
4171
4171
  }, J = (K) => {
4172
4172
  if (g(!1), T(!0), f && C !== f) {
4173
4173
  q(f), T(!1), g(!0);
@@ -4205,8 +4205,8 @@ const ns = ({
4205
4205
  ), I = c(
4206
4206
  "w-full h-full object-cover transition-opacity duration-fast",
4207
4207
  {
4208
- "opacity-0": w || x,
4209
- "opacity-100": !w && !x
4208
+ "opacity-0": N || x,
4209
+ "opacity-100": !N && !x
4210
4210
  }
4211
4211
  ), H = c(
4212
4212
  "absolute inset-0 flex items-center justify-center",
@@ -4219,7 +4219,7 @@ const ns = ({
4219
4219
  /* @__PURE__ */ e(
4220
4220
  "img",
4221
4221
  {
4222
- ...p,
4222
+ ...v,
4223
4223
  src: C,
4224
4224
  alt: r,
4225
4225
  className: I,
@@ -4227,11 +4227,11 @@ const ns = ({
4227
4227
  onError: J
4228
4228
  }
4229
4229
  ),
4230
- w && l && /* @__PURE__ */ e("div", { className: H, children: d || te }),
4231
- x && o && /* @__PURE__ */ e("div", { className: H, children: v || Y })
4230
+ N && l && /* @__PURE__ */ e("div", { className: H, children: d || te }),
4231
+ x && o && /* @__PURE__ */ e("div", { className: H, children: p || Y })
4232
4232
  ] });
4233
4233
  };
4234
- function ss({
4234
+ function ls({
4235
4235
  icon: t,
4236
4236
  onClick: r,
4237
4237
  children: n
@@ -4254,7 +4254,7 @@ function ss({
4254
4254
  }
4255
4255
  );
4256
4256
  }
4257
- function as({
4257
+ function os({
4258
4258
  items: t,
4259
4259
  getRowKey: r,
4260
4260
  variant: n = "divided",
@@ -4264,12 +4264,12 @@ function as({
4264
4264
  onSelect: o,
4265
4265
  onActiveIndexChange: f,
4266
4266
  isActive: d,
4267
- unread: v,
4267
+ unread: p,
4268
4268
  dimmed: h,
4269
- groupBy: m,
4269
+ groupBy: u,
4270
4270
  groups: b,
4271
- renderGroupHeader: p,
4272
- stickyGroupHeaders: w = !1,
4271
+ renderGroupHeader: v,
4272
+ stickyGroupHeaders: N = !1,
4273
4273
  collapsibleGroups: g = !1,
4274
4274
  hideGroupCount: x = !1,
4275
4275
  selectable: T = !1,
@@ -4285,7 +4285,7 @@ function as({
4285
4285
  className: K,
4286
4286
  "aria-label": ie
4287
4287
  }) {
4288
- const [k, u] = ce.useState(
4288
+ const [k, m] = ce.useState(
4289
4289
  () => Object.fromEntries(
4290
4290
  (b ?? []).filter((z) => z.defaultCollapsed).map((z) => [z.id, !0])
4291
4291
  )
@@ -4298,7 +4298,7 @@ function as({
4298
4298
  z.preventDefault();
4299
4299
  const B = j.indexOf(document.activeElement), M = z.key === "Home" ? 0 : z.key === "End" ? j.length - 1 : z.key === "ArrowDown" ? (B + 1) % j.length : (B - 1 + j.length) % j.length;
4300
4300
  j[M]?.focus();
4301
- }, A = (z, F) => r ? r(z, F) : F, N = (z) => C.includes(z), W = (z, F) => {
4301
+ }, A = (z, F) => r ? r(z, F) : F, w = (z) => C.includes(z), W = (z, F) => {
4302
4302
  q && q(
4303
4303
  F ? [...C, z] : C.filter((j) => j !== z)
4304
4304
  );
@@ -4334,7 +4334,7 @@ function as({
4334
4334
  if (t.length === 0 && H)
4335
4335
  return /* @__PURE__ */ e("div", { className: ee, children: H });
4336
4336
  const X = t.length > 0 && C.length === t.length, P = C.length > 0 && !X, $ = (z, F, j) => {
4337
- const B = d?.(z, F) ?? !1, M = v?.(z, F) ?? !1, L = h?.(z, F) ?? !1, Q = T && N(z);
4337
+ const B = d?.(z, F) ?? !1, M = p?.(z, F) ?? !1, L = h?.(z, F) ?? !1, Q = T && w(z);
4338
4338
  return /* @__PURE__ */ i(
4339
4339
  "li",
4340
4340
  {
@@ -4368,7 +4368,7 @@ function as({
4368
4368
  T && /* @__PURE__ */ e("span", { onClick: (ae) => ae.stopPropagation(), children: /* @__PURE__ */ e(
4369
4369
  ye,
4370
4370
  {
4371
- checked: N(z),
4371
+ checked: w(z),
4372
4372
  onChange: (ae) => W(z, ae.target.checked),
4373
4373
  "aria-label": "Rij selecteren"
4374
4374
  }
@@ -4388,11 +4388,11 @@ function as({
4388
4388
  A(z, F)
4389
4389
  );
4390
4390
  }, _ = (() => {
4391
- if (!m)
4391
+ if (!u)
4392
4392
  return t.map((B, M) => $(B, M, M === 0));
4393
4393
  const z = /* @__PURE__ */ new Map();
4394
4394
  t.forEach((B, M) => {
4395
- const L = m(B, M);
4395
+ const L = u(B, M);
4396
4396
  z.has(L) || z.set(L, []), z.get(L).push({ item: B, index: M });
4397
4397
  });
4398
4398
  const F = b ?? [];
@@ -4403,7 +4403,7 @@ function as({
4403
4403
  const L = z.get(B.id) ?? [], Q = g && k[B.id], ae = B.title ?? B.id, de = B.count ?? L.length, ge = /* @__PURE__ */ e(
4404
4404
  "li",
4405
4405
  {
4406
- onClick: g ? () => u((he) => ({ ...he, [B.id]: !he[B.id] })) : void 0,
4406
+ onClick: g ? () => m((he) => ({ ...he, [B.id]: !he[B.id] })) : void 0,
4407
4407
  className: c(
4408
4408
  // A caption over its rows, not a band across the table: same
4409
4409
  // surface as the rows, no rules, and the count as a quiet pill.
@@ -4411,12 +4411,12 @@ function as({
4411
4411
  "flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
4412
4412
  M > 0 ? "pt-5" : "pt-3",
4413
4413
  B.tone === "danger" ? "text-danger-fg" : B.tone === "muted" ? "text-text-subtle" : "text-text",
4414
- w && "sticky z-10",
4414
+ N && "sticky z-10",
4415
4415
  g && "cursor-pointer select-none"
4416
4416
  ),
4417
4417
  "aria-expanded": g ? !Q : void 0,
4418
- style: w ? { top: V ? 28 : 0 } : void 0,
4419
- children: p ? p(B, L.map((he) => he.item)) : /* @__PURE__ */ i(ke, { children: [
4418
+ style: N ? { top: V ? 28 : 0 } : void 0,
4419
+ children: v ? v(B, L.map((he) => he.item)) : /* @__PURE__ */ i(ke, { children: [
4420
4420
  g && /* @__PURE__ */ e(
4421
4421
  $e,
4422
4422
  {
@@ -4497,7 +4497,7 @@ function as({
4497
4497
  ] }) })
4498
4498
  ] });
4499
4499
  }
4500
- function ls({
4500
+ function cs({
4501
4501
  side: t,
4502
4502
  continued: r = !1,
4503
4503
  tone: n = "default",
@@ -4539,13 +4539,13 @@ const nn = {
4539
4539
  urgent: "text-danger-fg",
4540
4540
  success: "text-success-fg"
4541
4541
  };
4542
- function os({ value: t, label: r, tone: n = "default", className: s, ...a }) {
4542
+ function is({ value: t, label: r, tone: n = "default", className: s, ...a }) {
4543
4543
  return /* @__PURE__ */ i("div", { className: c("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
4544
4544
  /* @__PURE__ */ e("div", { className: c("text-2xl font-semibold", nn[n]), children: t }),
4545
4545
  /* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
4546
4546
  ] });
4547
4547
  }
4548
- const cs = ({
4548
+ const sn = ({
4549
4549
  surface: t = !1,
4550
4550
  title: r,
4551
4551
  subtitle: n,
@@ -4555,22 +4555,22 @@ const cs = ({
4555
4555
  className: o,
4556
4556
  backLabel: f = "Back",
4557
4557
  backClassName: d,
4558
- onBack: v,
4558
+ onBack: p,
4559
4559
  editable: h = !1,
4560
- onTitleChange: m
4560
+ onTitleChange: u
4561
4561
  }) => {
4562
- const [b, p] = O(!1), [w, g] = O(r), x = ne(null);
4562
+ const [b, v] = O(!1), [N, g] = O(r), x = ne(null);
4563
4563
  G(() => {
4564
4564
  g(r);
4565
4565
  }, [r]), G(() => {
4566
4566
  b && x.current && (x.current.focus(), x.current.select());
4567
4567
  }, [b]);
4568
4568
  const T = () => {
4569
- h && p(!0);
4569
+ h && v(!0);
4570
4570
  }, C = () => {
4571
- p(!1), w.trim() !== "" && w !== r && m ? m(w.trim()) : g(r);
4571
+ v(!1), N.trim() !== "" && N !== r && u ? u(N.trim()) : g(r);
4572
4572
  }, q = (D) => {
4573
- D.key === "Enter" ? x.current?.blur() : D.key === "Escape" && (g(r), p(!1));
4573
+ D.key === "Enter" ? x.current?.blur() : D.key === "Escape" && (g(r), v(!1));
4574
4574
  };
4575
4575
  return /* @__PURE__ */ i(
4576
4576
  "div",
@@ -4587,16 +4587,16 @@ const cs = ({
4587
4587
  children: [
4588
4588
  /* @__PURE__ */ i("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
4589
4589
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-4 text-text", children: [
4590
- v && // Ghost: a framed box around a back chevron makes the way out of a
4590
+ p && // Ghost: a framed box around a back chevron makes the way out of a
4591
4591
  // page look like the page's primary control.
4592
- /* @__PURE__ */ e(le, { variant: "ghost", onClick: v, leftIcon: /* @__PURE__ */ e(Z, { icon: Ce, size: "md" }), iconOnly: !0 }),
4592
+ /* @__PURE__ */ e(le, { variant: "ghost", onClick: p, leftIcon: /* @__PURE__ */ e(Z, { icon: Ce, size: "md" }), iconOnly: !0 }),
4593
4593
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
4594
4594
  b ? /* @__PURE__ */ e(
4595
4595
  "input",
4596
4596
  {
4597
4597
  ref: x,
4598
4598
  type: "text",
4599
- value: w,
4599
+ value: N,
4600
4600
  onChange: (D) => g(D.target.value),
4601
4601
  onBlur: C,
4602
4602
  onKeyDown: q,
@@ -4643,7 +4643,7 @@ const cs = ({
4643
4643
  ] }) }),
4644
4644
  a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
4645
4645
  (D) => D.render ? /* @__PURE__ */ e(ce.Fragment, { children: D.render() }, D.id) : D.splitOptions && D.splitOptions.length > 0 ? /* @__PURE__ */ e(
4646
- Xe,
4646
+ Ze,
4647
4647
  {
4648
4648
  label: D.label,
4649
4649
  onClick: D.onClick,
@@ -4672,7 +4672,68 @@ const cs = ({
4672
4672
  ]
4673
4673
  }
4674
4674
  );
4675
- }, sn = /<[a-z][\s\S]*>/i, an = [
4675
+ }, an = {
4676
+ none: "",
4677
+ sm: "px-3 pb-3 pt-1",
4678
+ md: "px-5 pb-5 pt-1.5"
4679
+ }, ds = ({
4680
+ title: t,
4681
+ subtitle: r,
4682
+ meta: n,
4683
+ actions: s,
4684
+ onBack: a,
4685
+ surface: l,
4686
+ headerContent: o,
4687
+ loading: f = !1,
4688
+ loadingShape: d = "table",
4689
+ empty: p,
4690
+ padding: h = "md",
4691
+ scroll: u = !0,
4692
+ className: b,
4693
+ contentClassName: v,
4694
+ children: N
4695
+ }) => {
4696
+ const g = f ? /* @__PURE__ */ e(Oe, { variant: "inline", shape: d }) : p ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-12", children: p }) : N;
4697
+ return /* @__PURE__ */ i(
4698
+ "div",
4699
+ {
4700
+ className: c(
4701
+ // `h-full` resolves against the shell's content card, which is the
4702
+ // element that scrolls today. Taking the scroll over here is what pins
4703
+ // the header; without `min-h-0` the body would grow past the card
4704
+ // instead of scrolling inside it.
4705
+ u ? "flex h-full min-h-0 flex-col" : "flex flex-col",
4706
+ b
4707
+ ),
4708
+ children: [
4709
+ /* @__PURE__ */ e(
4710
+ sn,
4711
+ {
4712
+ surface: l ?? u,
4713
+ title: t,
4714
+ subtitle: r,
4715
+ meta: n,
4716
+ actions: s,
4717
+ onBack: a,
4718
+ className: u ? "shrink-0" : void 0,
4719
+ children: o
4720
+ }
4721
+ ),
4722
+ /* @__PURE__ */ e(
4723
+ "div",
4724
+ {
4725
+ className: c(
4726
+ u && "min-h-0 flex-1 overflow-y-auto",
4727
+ an[h],
4728
+ v
4729
+ ),
4730
+ children: g
4731
+ }
4732
+ )
4733
+ ]
4734
+ }
4735
+ );
4736
+ }, ln = /<[a-z][\s\S]*>/i, on = [
4676
4737
  "[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
4677
4738
  "[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
4678
4739
  "[&_strong]:font-semibold [&_em]:italic",
@@ -4687,7 +4748,7 @@ const cs = ({
4687
4748
  "[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
4688
4749
  "[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
4689
4750
  "[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
4690
- ].join(" "), ln = {
4751
+ ].join(" "), cn = {
4691
4752
  p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
4692
4753
  a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
4693
4754
  strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
@@ -4710,22 +4771,22 @@ const cs = ({
4710
4771
  th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
4711
4772
  td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
4712
4773
  };
4713
- function is({ text: t, className: r, as: n }) {
4774
+ function us({ text: t, className: r, as: n }) {
4714
4775
  const s = t ?? "";
4715
- return (n ? n === "html" : sn.test(s)) ? /* @__PURE__ */ e(
4776
+ return (n ? n === "html" : ln.test(s)) ? /* @__PURE__ */ e(
4716
4777
  "div",
4717
4778
  {
4718
- className: c("break-words", an, r),
4779
+ className: c("break-words", on, r),
4719
4780
  dangerouslySetInnerHTML: { __html: At.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
4720
4781
  }
4721
- ) : /* @__PURE__ */ e("div", { className: c("break-words", r), children: /* @__PURE__ */ e(Lt, { remarkPlugins: [It], components: ln, children: s }) });
4782
+ ) : /* @__PURE__ */ e("div", { className: c("break-words", r), children: /* @__PURE__ */ e(Lt, { remarkPlugins: [It], components: cn, children: s }) });
4722
4783
  }
4723
- const ds = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
4784
+ const ms = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ i("div", { className: c("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
4724
4785
  /* @__PURE__ */ e("span", { className: "shrink-0 text-2xs font-semibold uppercase tracking-label text-text-subtle", children: t }),
4725
4786
  r && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-right text-xs tabular-nums text-text-subtle", children: r }),
4726
4787
  n && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0", children: n })
4727
4788
  ] });
4728
- function us({ label: t, trailing: r, align: n = "center", className: s }) {
4789
+ function fs({ label: t, trailing: r, align: n = "center", className: s }) {
4729
4790
  const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
4730
4791
  return !t && !r ? /* @__PURE__ */ e("div", { className: c("flex items-center py-2", s), children: a }) : /* @__PURE__ */ i("div", { className: c("flex items-center gap-3 py-2", s), children: [
4731
4792
  n === "center" && a,
@@ -4734,11 +4795,11 @@ function us({ label: t, trailing: r, align: n = "center", className: s }) {
4734
4795
  r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
4735
4796
  ] });
4736
4797
  }
4737
- const st = Ke(null), ms = st.Provider;
4738
- function on() {
4798
+ const st = Ge(null), hs = st.Provider;
4799
+ function dn() {
4739
4800
  return ut(st);
4740
4801
  }
4741
- function fs() {
4802
+ function xs() {
4742
4803
  const [t, r] = O(null), n = pe(
4743
4804
  () => ({
4744
4805
  setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
@@ -4747,13 +4808,13 @@ function fs() {
4747
4808
  );
4748
4809
  return { trail: t?.entry ?? null, api: n };
4749
4810
  }
4750
- const cn = {
4811
+ const un = {
4751
4812
  none: "",
4752
4813
  sm: "px-3 py-3",
4753
4814
  // Matches the frame header's own horizontal padding, so content lines up
4754
4815
  // with the title above it.
4755
4816
  md: "px-5 py-4"
4756
- }, hs = ({
4817
+ }, bs = ({
4757
4818
  children: t,
4758
4819
  actions: r = [],
4759
4820
  secondaryActions: n = [],
@@ -4763,19 +4824,19 @@ const cn = {
4763
4824
  loading: o = !1,
4764
4825
  loadingShape: f = "form",
4765
4826
  padding: d = "md",
4766
- className: v,
4827
+ className: p,
4767
4828
  contentClassName: h
4768
4829
  }) => {
4769
- const m = on(), b = dt(), p = ne(s);
4770
- p.current = s;
4771
- const w = !!s;
4830
+ const u = dn(), b = dt(), v = ne(s);
4831
+ v.current = s;
4832
+ const N = !!s;
4772
4833
  G(() => {
4773
- if (m && !(!w && !l))
4774
- return m.setTrail(b, {
4834
+ if (u && !(!N && !l))
4835
+ return u.setTrail(b, {
4775
4836
  title: l,
4776
- onBack: w ? () => p.current?.() : void 0
4777
- }), () => m.setTrail(b, null);
4778
- }, [m, b, l, w]);
4837
+ onBack: N ? () => v.current?.() : void 0
4838
+ }), () => u.setTrail(b, null);
4839
+ }, [u, b, l, N]);
4779
4840
  const g = r.length > 0 || n.length > 0;
4780
4841
  return (
4781
4842
  /**
@@ -4784,13 +4845,13 @@ const cn = {
4784
4845
  * panel that has not been migrated yet. This way a short page still drops
4785
4846
  * its footer to the bottom, and a long one keeps it pinned while scrolling.
4786
4847
  */
4787
- /* @__PURE__ */ i("div", { className: c("flex min-h-full flex-col", v), children: [
4788
- !m && (w || l) && /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
4789
- w && /* @__PURE__ */ e(
4848
+ /* @__PURE__ */ i("div", { className: c("flex min-h-full flex-col", p), children: [
4849
+ !u && (N || l) && /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
4850
+ N && /* @__PURE__ */ e(
4790
4851
  le,
4791
4852
  {
4792
4853
  variant: "ghost",
4793
- onClick: () => p.current?.(),
4854
+ onClick: () => v.current?.(),
4794
4855
  "aria-label": a,
4795
4856
  leftIcon: /* @__PURE__ */ e(Z, { icon: Ce, size: "sm" }),
4796
4857
  iconOnly: !0
@@ -4798,7 +4859,7 @@ const cn = {
4798
4859
  ),
4799
4860
  l && /* @__PURE__ */ e("h2", { className: "min-w-0 truncate text-md font-semibold tracking-title text-text", children: l })
4800
4861
  ] }),
4801
- /* @__PURE__ */ e("div", { className: c("flex-1", cn[d], h), children: o ? /* @__PURE__ */ e(nt, { variant: "inline", shape: f }) : t }),
4862
+ /* @__PURE__ */ e("div", { className: c("flex-1", un[d], h), children: o ? /* @__PURE__ */ e(Oe, { variant: "inline", shape: f }) : t }),
4802
4863
  g && /* @__PURE__ */ i("div", { className: "sticky bottom-0 z-10 flex shrink-0 items-center gap-2 border-t border-border bg-surface px-5 py-3", children: [
4803
4864
  n.length > 0 && /* @__PURE__ */ e(Me, { actions: n, defaultVariant: "ghost" }),
4804
4865
  r.length > 0 && /* @__PURE__ */ e(Me, { actions: r, className: "ml-auto" })
@@ -4806,7 +4867,7 @@ const cn = {
4806
4867
  ] })
4807
4868
  );
4808
4869
  };
4809
- function xs({
4870
+ function gs({
4810
4871
  label: t,
4811
4872
  description: r,
4812
4873
  control: n,
@@ -4833,7 +4894,7 @@ function xs({
4833
4894
  }
4834
4895
  );
4835
4896
  }
4836
- function bs({
4897
+ function ps({
4837
4898
  icon: t,
4838
4899
  title: r,
4839
4900
  description: n,
@@ -4853,7 +4914,7 @@ function bs({
4853
4914
  /* @__PURE__ */ e("div", { className: c("flex flex-col", t && "pl-6"), children: a })
4854
4915
  ] });
4855
4916
  }
4856
- function gs({ label: t, dotColor: r, onClick: n, className: s }) {
4917
+ function vs({ label: t, dotColor: r, onClick: n, className: s }) {
4857
4918
  return /* @__PURE__ */ i(
4858
4919
  "button",
4859
4920
  {
@@ -4871,22 +4932,22 @@ function gs({ label: t, dotColor: r, onClick: n, className: s }) {
4871
4932
  }
4872
4933
  );
4873
4934
  }
4874
- function dn(t) {
4875
- const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: f, sortable: d, align: v } = t;
4935
+ function mn(t) {
4936
+ const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: f, sortable: d, align: p } = t;
4876
4937
  return {
4877
4938
  id: r,
4878
4939
  header: n,
4879
4940
  accessor: (h) => a(s(h), h),
4880
- cell: (h, m) => {
4881
- const b = s(m);
4882
- return o && !o(b, m) ? null : /* @__PURE__ */ e(Rr, { variant: l ? l(b, m) : "default", size: "sm", children: a(b, m) });
4941
+ cell: (h, u) => {
4942
+ const b = s(u);
4943
+ return o && !o(b, u) ? null : /* @__PURE__ */ e(Rr, { variant: l ? l(b, u) : "default", size: "sm", children: a(b, u) });
4883
4944
  },
4884
4945
  width: f,
4885
4946
  sortable: d,
4886
- align: v
4947
+ align: p
4887
4948
  };
4888
4949
  }
4889
- function ps(t) {
4950
+ function ys(t) {
4890
4951
  const {
4891
4952
  id: r,
4892
4953
  header: n,
@@ -4896,19 +4957,19 @@ function ps(t) {
4896
4957
  onTone: o = "success",
4897
4958
  offTone: f = "secondary",
4898
4959
  width: d,
4899
- sortable: v
4960
+ sortable: p
4900
4961
  } = t;
4901
- return dn({
4962
+ return mn({
4902
4963
  id: r,
4903
4964
  header: n,
4904
4965
  accessor: (h) => !!s(h),
4905
4966
  label: (h) => h ? a : l,
4906
4967
  tone: (h) => h ? o : f,
4907
4968
  width: d,
4908
- sortable: v
4969
+ sortable: p
4909
4970
  });
4910
4971
  }
4911
- function vs(t) {
4972
+ function Ns(t) {
4912
4973
  const {
4913
4974
  id: r,
4914
4975
  header: n,
@@ -4918,27 +4979,27 @@ function vs(t) {
4918
4979
  separator: o = ", ",
4919
4980
  width: f,
4920
4981
  searchable: d,
4921
- sortable: v
4982
+ sortable: p
4922
4983
  } = t;
4923
4984
  return {
4924
4985
  id: r,
4925
4986
  header: n,
4926
4987
  accessor: (h) => {
4927
- const m = s(h), p = (m == null ? [] : Array.isArray(m) ? m : [m]).filter(Boolean).map((w) => a(w) ?? w);
4928
- return p.length ? p.join(o) : l;
4988
+ const u = s(h), v = (u == null ? [] : Array.isArray(u) ? u : [u]).filter(Boolean).map((N) => a(N) ?? N);
4989
+ return v.length ? v.join(o) : l;
4929
4990
  },
4930
4991
  width: f,
4931
4992
  searchable: d,
4932
- sortable: v
4993
+ sortable: p
4933
4994
  };
4934
4995
  }
4935
- function un(t, r) {
4996
+ function fn(t, r) {
4936
4997
  return r.split(".").reduce(
4937
4998
  (n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
4938
4999
  t
4939
5000
  );
4940
5001
  }
4941
- const ys = ({
5002
+ const ws = ({
4942
5003
  groups: t,
4943
5004
  data: r,
4944
5005
  size: n = "md",
@@ -4955,16 +5016,16 @@ const ys = ({
4955
5016
  } catch {
4956
5017
  return String(h);
4957
5018
  }
4958
- }, l = (h) => h ? "Ja" : "Nee", o = (h, m) => {
4959
- if (!m) return String(h || "-");
4960
- const b = m.find((p) => p.value === h);
5019
+ }, l = (h) => h ? "Ja" : "Nee", o = (h, u) => {
5020
+ if (!u) return String(h || "-");
5021
+ const b = u.find((v) => v.value === h);
4961
5022
  return b ? b.label : String(h || "-");
4962
5023
  }, f = xe(
4963
5024
  (h) => {
4964
- const m = un(r, h.name);
5025
+ const u = fn(r, h.name);
4965
5026
  if (h.type === "array") {
4966
- const p = m;
4967
- return !p || p.length === 0 ? /* @__PURE__ */ e(
5027
+ const v = u;
5028
+ return !v || v.length === 0 ? /* @__PURE__ */ e(
4968
5029
  fe,
4969
5030
  {
4970
5031
  variant: "body",
@@ -4972,7 +5033,7 @@ const ys = ({
4972
5033
  className: "text-text-muted",
4973
5034
  children: "Geen items"
4974
5035
  }
4975
- ) : /* @__PURE__ */ e("div", { className: "space-y-3", children: p.map((w, g) => /* @__PURE__ */ i(
5036
+ ) : /* @__PURE__ */ e("div", { className: "space-y-3", children: v.map((N, g) => /* @__PURE__ */ i(
4976
5037
  "div",
4977
5038
  {
4978
5039
  className: "p-4 border border-border rounded-xl space-y-3",
@@ -4992,7 +5053,7 @@ const ys = ({
4992
5053
  }
4993
5054
  ) }),
4994
5055
  /* @__PURE__ */ e("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: h.arrayFields?.map((x) => {
4995
- const T = w?.[x.name];
5056
+ const T = N?.[x.name];
4996
5057
  let C = "-";
4997
5058
  switch (x.type) {
4998
5059
  case "text":
@@ -5024,7 +5085,7 @@ const ys = ({
5024
5085
  default:
5025
5086
  C = String(T || "-");
5026
5087
  }
5027
- return x.format && (C = x.format(T, w)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
5088
+ return x.format && (C = x.format(T, N)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
5028
5089
  /* @__PURE__ */ e(
5029
5090
  fe,
5030
5091
  {
@@ -5051,16 +5112,16 @@ const ys = ({
5051
5112
  )) });
5052
5113
  }
5053
5114
  if (h.type === "custom" && h.customComponent)
5054
- return h.customComponent({ value: m });
5115
+ return h.customComponent({ value: u });
5055
5116
  if (h.format) {
5056
- const p = h.format(m, r);
5117
+ const v = h.format(u, r);
5057
5118
  return /* @__PURE__ */ e(
5058
5119
  fe,
5059
5120
  {
5060
5121
  variant: "body",
5061
5122
  size: "sm",
5062
5123
  className: "text-text",
5063
- children: p
5124
+ children: v
5064
5125
  }
5065
5126
  );
5066
5127
  }
@@ -5072,23 +5133,23 @@ const ys = ({
5072
5133
  case "number":
5073
5134
  case "tel":
5074
5135
  case "url":
5075
- b = m ? String(m) : "-";
5136
+ b = u ? String(u) : "-";
5076
5137
  break;
5077
5138
  case "textarea":
5078
- b = m ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(m || "-") }) : "-";
5139
+ b = u ? /* @__PURE__ */ e("div", { className: "whitespace-pre-wrap", children: String(u || "-") }) : "-";
5079
5140
  break;
5080
5141
  case "select":
5081
5142
  case "radio":
5082
- b = o(m, h.options);
5143
+ b = o(u, h.options);
5083
5144
  break;
5084
5145
  case "checkbox":
5085
- b = l(m);
5146
+ b = l(u);
5086
5147
  break;
5087
5148
  case "date":
5088
- b = a(m);
5149
+ b = a(u);
5089
5150
  break;
5090
5151
  default:
5091
- b = m ? String(m) : "-";
5152
+ b = u ? String(u) : "-";
5092
5153
  }
5093
5154
  return /* @__PURE__ */ e(
5094
5155
  fe,
@@ -5105,8 +5166,8 @@ const ys = ({
5105
5166
  (h) => {
5106
5167
  if (h.conditional && !h.conditional(r))
5107
5168
  return null;
5108
- const m = h.items.filter((p) => !(p.hidden || p.conditional && !p.conditional(r)));
5109
- if (m.length === 0) return null;
5169
+ const u = h.items.filter((v) => !(v.hidden || v.conditional && !v.conditional(r)));
5170
+ if (u.length === 0) return null;
5110
5171
  const b = c(
5111
5172
  "space-y-4",
5112
5173
  {
@@ -5147,28 +5208,28 @@ const ys = ({
5147
5208
  }
5148
5209
  )
5149
5210
  ] }),
5150
- /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: m.map((p) => /* @__PURE__ */ i(
5211
+ /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: u.map((v) => /* @__PURE__ */ i(
5151
5212
  "div",
5152
5213
  {
5153
5214
  className: "space-y-1",
5154
5215
  style: {
5155
- width: typeof p.width == "string" ? p.width : void 0,
5156
- gridColumn: typeof p.width == "number" ? `span ${p.width} / span ${p.width}` : void 0
5216
+ width: typeof v.width == "string" ? v.width : void 0,
5217
+ gridColumn: typeof v.width == "number" ? `span ${v.width} / span ${v.width}` : void 0
5157
5218
  },
5158
5219
  children: [
5159
- p.type !== "custom" && /* @__PURE__ */ e(
5220
+ v.type !== "custom" && /* @__PURE__ */ e(
5160
5221
  fe,
5161
5222
  {
5162
5223
  variant: "label",
5163
5224
  size: "sm",
5164
5225
  className: "font-medium text-text-muted",
5165
- children: p.label
5226
+ children: v.label
5166
5227
  }
5167
5228
  ),
5168
- f(p)
5229
+ f(v)
5169
5230
  ]
5170
5231
  },
5171
- p.name
5232
+ v.name
5172
5233
  )) }) })
5173
5234
  ]
5174
5235
  },
@@ -5176,7 +5237,7 @@ const ys = ({
5176
5237
  );
5177
5238
  },
5178
5239
  [r, f]
5179
- ), v = c(
5240
+ ), p = c(
5180
5241
  "space-y-6",
5181
5242
  {
5182
5243
  "max-w-md": n === "sm",
@@ -5186,8 +5247,8 @@ const ys = ({
5186
5247
  },
5187
5248
  s
5188
5249
  );
5189
- return /* @__PURE__ */ e("div", { className: v, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(d) }) });
5190
- }, mn = () => /* @__PURE__ */ e(nt, { variant: "inline", shape: "menu" }), at = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
5250
+ return /* @__PURE__ */ e("div", { className: p, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(d) }) });
5251
+ }, hn = () => /* @__PURE__ */ e(Oe, { variant: "inline", shape: "menu" }), at = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
5191
5252
  const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
5192
5253
  if (a)
5193
5254
  return /* @__PURE__ */ i("li", { children: [
@@ -5203,7 +5264,7 @@ const ys = ({
5203
5264
  ]
5204
5265
  }
5205
5266
  ),
5206
- /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((d, v) => /* @__PURE__ */ e(
5267
+ /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((d, p) => /* @__PURE__ */ e(
5207
5268
  at,
5208
5269
  {
5209
5270
  item: d,
@@ -5211,7 +5272,7 @@ const ys = ({
5211
5272
  onClick: n,
5212
5273
  depth: s + 1
5213
5274
  },
5214
- v
5275
+ p
5215
5276
  )) })
5216
5277
  ] });
5217
5278
  const o = t.action, f = o?.visibility !== "always";
@@ -5279,7 +5340,7 @@ const ys = ({
5279
5340
  ]
5280
5341
  }
5281
5342
  ) });
5282
- }, Ns = ({
5343
+ }, ks = ({
5283
5344
  items: t,
5284
5345
  isSelectedHandler: r,
5285
5346
  onClick: n,
@@ -5287,7 +5348,7 @@ const ys = ({
5287
5348
  loading: a = !1
5288
5349
  }) => a ? /* @__PURE__ */ i("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5289
5350
  s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5290
- /* @__PURE__ */ e(mn, {})
5351
+ /* @__PURE__ */ e(hn, {})
5291
5352
  ] }) : /* @__PURE__ */ i("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5292
5353
  s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5293
5354
  /* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
@@ -5301,7 +5362,7 @@ const ys = ({
5301
5362
  o
5302
5363
  )
5303
5364
  ) })
5304
- ] }), fn = {
5365
+ ] }), xn = {
5305
5366
  xs: "text-xs",
5306
5367
  sm: "text-sm",
5307
5368
  md: "text-base",
@@ -5310,13 +5371,13 @@ const ys = ({
5310
5371
  "2xl": "text-2xl",
5311
5372
  "3xl": "text-3xl",
5312
5373
  "4xl": "text-3xl"
5313
- }, hn = {
5374
+ }, bn = {
5314
5375
  light: "font-normal",
5315
5376
  normal: "font-normal",
5316
5377
  medium: "font-medium",
5317
5378
  semibold: "font-semibold",
5318
5379
  bold: "font-bold"
5319
- }, xn = {
5380
+ }, gn = {
5320
5381
  primary: "text-text",
5321
5382
  secondary: "text-text-muted",
5322
5383
  accent: "text-accent",
@@ -5326,11 +5387,11 @@ const ys = ({
5326
5387
  info: "text-info-fg",
5327
5388
  neutral: "text-text",
5328
5389
  current: "text-current"
5329
- }, bn = {
5390
+ }, pn = {
5330
5391
  left: "text-left",
5331
5392
  center: "text-center",
5332
5393
  right: "text-right"
5333
- }, ws = ({
5394
+ }, Cs = ({
5334
5395
  level: t = 1,
5335
5396
  size: r,
5336
5397
  weight: n = "semibold",
@@ -5341,18 +5402,18 @@ const ys = ({
5341
5402
  children: f,
5342
5403
  ...d
5343
5404
  }) => {
5344
- const v = `h${t}`, h = c(
5405
+ const p = `h${t}`, h = c(
5345
5406
  "font-sans text-pretty",
5346
- fn[r || gn(t)],
5347
- hn[n],
5348
- xn[s],
5349
- bn[a],
5407
+ xn[r || vn(t)],
5408
+ bn[n],
5409
+ gn[s],
5410
+ pn[a],
5350
5411
  l && "truncate",
5351
5412
  o
5352
5413
  );
5353
- return /* @__PURE__ */ e(v, { className: h, ...d, children: f });
5414
+ return /* @__PURE__ */ e(p, { className: h, ...d, children: f });
5354
5415
  };
5355
- function gn(t) {
5416
+ function vn(t) {
5356
5417
  return {
5357
5418
  1: "2xl",
5358
5419
  2: "xl",
@@ -5362,7 +5423,7 @@ function gn(t) {
5362
5423
  6: "md"
5363
5424
  }[t] || "md";
5364
5425
  }
5365
- const ks = ({
5426
+ const Ss = ({
5366
5427
  commands: t,
5367
5428
  isOpen: r,
5368
5429
  onClose: n,
@@ -5370,27 +5431,27 @@ const ks = ({
5370
5431
  initialCommandPath: a,
5371
5432
  initialActiveIndex: l
5372
5433
  }) => {
5373
- const [o, f] = O(""), [d, v] = O(a || []), [h, m] = O(l || 0), b = ne(null), p = ne(null), g = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5434
+ const [o, f] = O(""), [d, p] = O(a || []), [h, u] = O(l || 0), b = ne(null), v = ne(null), g = (d.length ? t.find((x) => x.id === d[0])?.subCommands || [] : t).filter(
5374
5435
  (x) => x.label.toLowerCase().includes(o.toLowerCase())
5375
5436
  );
5376
5437
  return G(() => {
5377
- r || (f(""), v(a || []), m(l || 0));
5438
+ r || (f(""), p(a || []), u(l || 0));
5378
5439
  }, [r]), G(() => {
5379
5440
  const x = (T) => {
5380
5441
  if (r) {
5381
5442
  if (T.key === "Escape")
5382
5443
  n();
5383
5444
  else if (T.key === "ArrowUp")
5384
- m(
5445
+ u(
5385
5446
  (C) => C > 0 ? C - 1 : g.length - 1
5386
5447
  );
5387
5448
  else if (T.key === "ArrowDown")
5388
- m(
5449
+ u(
5389
5450
  (C) => C < g.length - 1 ? C + 1 : 0
5390
5451
  );
5391
5452
  else if (T.key === "Enter") {
5392
5453
  const C = g[h];
5393
- C && (C.subCommands ? (v([...d, C.id]), m(0)) : C.action && (C.action(), n()));
5454
+ C && (C.subCommands ? (p([...d, C.id]), u(0)) : C.action && (C.action(), n()));
5394
5455
  }
5395
5456
  }
5396
5457
  };
@@ -5402,7 +5463,7 @@ const ks = ({
5402
5463
  return r && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
5403
5464
  }, [r, n]), G(() => {
5404
5465
  if (!r) return;
5405
- p.current?.querySelector(`[data-index="${h}"]`)?.scrollIntoView({ block: "nearest" });
5466
+ v.current?.querySelector(`[data-index="${h}"]`)?.scrollIntoView({ block: "nearest" });
5406
5467
  }, [h, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ i(
5407
5468
  "div",
5408
5469
  {
@@ -5426,7 +5487,7 @@ const ks = ({
5426
5487
  /* @__PURE__ */ i(
5427
5488
  "div",
5428
5489
  {
5429
- ref: p,
5490
+ ref: v,
5430
5491
  className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
5431
5492
  children: [
5432
5493
  g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
@@ -5436,9 +5497,9 @@ const ks = ({
5436
5497
  "data-index": T,
5437
5498
  className: `flex items-center p-2 cursor-pointer rounded-md ${T === h ? "bg-accent-soft text-accent" : "text-text"}`,
5438
5499
  onClick: () => {
5439
- x.subCommands ? (v([...d, x.id]), m(0)) : x.action && (x.action(), n());
5500
+ x.subCommands ? (p([...d, x.id]), u(0)) : x.action && (x.action(), n());
5440
5501
  },
5441
- onMouseEnter: () => m(T),
5502
+ onMouseEnter: () => u(T),
5442
5503
  children: [
5443
5504
  x.icon && /* @__PURE__ */ e("span", { className: "mr-3", children: x.icon }),
5444
5505
  /* @__PURE__ */ e("span", { className: "flex-grow", children: x.label }),
@@ -5467,7 +5528,7 @@ const ks = ({
5467
5528
  ]
5468
5529
  }
5469
5530
  ) }) : null;
5470
- }, pn = {
5531
+ }, yn = {
5471
5532
  none: "p-0",
5472
5533
  xs: "p-1",
5473
5534
  sm: "p-2",
@@ -5475,7 +5536,7 @@ const ks = ({
5475
5536
  lg: "p-6",
5476
5537
  xl: "p-8",
5477
5538
  "2xl": "p-12"
5478
- }, vn = {
5539
+ }, Nn = {
5479
5540
  none: "m-0",
5480
5541
  xs: "m-1",
5481
5542
  sm: "m-2",
@@ -5483,7 +5544,7 @@ const ks = ({
5483
5544
  lg: "m-6",
5484
5545
  xl: "m-8",
5485
5546
  "2xl": "m-12"
5486
- }, yn = {
5547
+ }, wn = {
5487
5548
  none: "",
5488
5549
  primary: "bg-accent text-accent-fg",
5489
5550
  secondary: "bg-surface-hover",
@@ -5499,26 +5560,26 @@ const ks = ({
5499
5560
  backdrop: "bg-page",
5500
5561
  editor: "bg-surface",
5501
5562
  input: "bg-surface-input"
5502
- }, Nn = {
5563
+ }, kn = {
5503
5564
  none: "rounded-none",
5504
5565
  sm: "rounded-sm",
5505
5566
  md: "rounded-md",
5506
5567
  lg: "rounded-lg",
5507
5568
  xl: "rounded-xl",
5508
5569
  full: "rounded-full"
5509
- }, wn = {
5570
+ }, Cn = {
5510
5571
  none: "shadow-none",
5511
5572
  sm: "shadow-none",
5512
5573
  md: "shadow-overlay",
5513
5574
  lg: "shadow-overlay",
5514
5575
  xl: "shadow-modal",
5515
5576
  "2xl": "shadow-modal"
5516
- }, kn = {
5577
+ }, Sn = {
5517
5578
  none: "border-0",
5518
5579
  sm: "border",
5519
5580
  md: "border-2",
5520
5581
  lg: "border-4"
5521
- }, Cn = {
5582
+ }, En = {
5522
5583
  primary: "border-accent-border",
5523
5584
  secondary: "border-border",
5524
5585
  accent: "border-accent-border",
@@ -5539,28 +5600,28 @@ const ks = ({
5539
5600
  borderColor: o,
5540
5601
  className: f,
5541
5602
  children: d,
5542
- ...v
5603
+ ...p
5543
5604
  }, h) => /* @__PURE__ */ e(
5544
5605
  "div",
5545
5606
  {
5546
5607
  ref: h,
5547
5608
  className: c(
5548
- t && pn[t],
5549
- r && vn[r],
5550
- n && yn[n],
5551
- s && Nn[s],
5552
- a && wn[a],
5553
- l && kn[l],
5554
- o && Cn[o],
5609
+ t && yn[t],
5610
+ r && Nn[r],
5611
+ n && wn[n],
5612
+ s && kn[s],
5613
+ a && Cn[a],
5614
+ l && Sn[l],
5615
+ o && En[o],
5555
5616
  f
5556
5617
  ),
5557
- ...v,
5618
+ ...p,
5558
5619
  children: d
5559
5620
  }
5560
5621
  )
5561
5622
  );
5562
5623
  lt.displayName = "Box";
5563
- const Cs = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5624
+ const Es = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5564
5625
  lt,
5565
5626
  {
5566
5627
  background: "module",
@@ -5575,7 +5636,7 @@ const Cs = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5575
5636
  ]
5576
5637
  }
5577
5638
  );
5578
- function Ss({
5639
+ function zs({
5579
5640
  identifier: t,
5580
5641
  resourceLoader: r,
5581
5642
  framework: n = "react",
@@ -5584,22 +5645,22 @@ function Ss({
5584
5645
  componentProps: l,
5585
5646
  className: o
5586
5647
  }) {
5587
- const f = ne(null), [d, v] = O(!0), [h, m] = O(!1), [b, p] = O(null), w = ne(null);
5648
+ const f = ne(null), [d, p] = O(!0), [h, u] = O(!1), [b, v] = O(null), N = ne(null);
5588
5649
  ne(null);
5589
5650
  const g = ne(r);
5590
5651
  return g.current = r, G(() => {
5591
5652
  let x = !0;
5592
5653
  return (async () => {
5593
- v(!0), m(!1), p(null);
5654
+ p(!0), u(!1), v(null);
5594
5655
  try {
5595
5656
  const C = await g.current();
5596
5657
  if (!x) return;
5597
5658
  const q = C.component || C.default || C;
5598
- p(n === "react" ? () => q : () => C);
5659
+ v(n === "react" ? () => q : () => C);
5599
5660
  } catch (C) {
5600
- console.error(`[FederatedResource] Load failed: ${t}`, C), x && m(!0);
5661
+ console.error(`[FederatedResource] Load failed: ${t}`, C), x && u(!0);
5601
5662
  } finally {
5602
- x && v(!1);
5663
+ x && p(!1);
5603
5664
  }
5604
5665
  })(), () => {
5605
5666
  x = !1;
@@ -5610,7 +5671,7 @@ function Ss({
5610
5671
  if (x) {
5611
5672
  if (n === "svelte") {
5612
5673
  const T = b.default || b, C = new T({ target: x, props: l || {} });
5613
- return w.current = C, () => C.$destroy();
5674
+ return N.current = C, () => C.$destroy();
5614
5675
  }
5615
5676
  if (b.mount) {
5616
5677
  const T = b.mount({ container: x, props: l || {} });
@@ -5620,14 +5681,14 @@ function Ss({
5620
5681
  }
5621
5682
  }
5622
5683
  }, [b, n, d]), G(() => {
5623
- n === "svelte" && w.current && w.current.$set?.(l);
5684
+ n === "svelte" && N.current && N.current.$set?.(l);
5624
5685
  }, [l, n]), /* @__PURE__ */ i("div", { ref: f, className: o, style: { display: "contents" }, children: [
5625
5686
  d && s,
5626
5687
  !d && h && a,
5627
5688
  n === "react" && !h && b && /* @__PURE__ */ e(b, { ...l })
5628
5689
  ] });
5629
5690
  }
5630
- class Es extends mt {
5691
+ class Ms extends mt {
5631
5692
  constructor() {
5632
5693
  super(...arguments), this.state = {
5633
5694
  hasError: !1,
@@ -5656,89 +5717,90 @@ class Es extends mt {
5656
5717
  }
5657
5718
  }
5658
5719
  export {
5659
- es as AssistantCard,
5720
+ rs as AssistantCard,
5660
5721
  en as Avatar,
5661
- ts as AvatarStack,
5722
+ ns as AvatarStack,
5662
5723
  Rr as Badge,
5663
5724
  lt as Box,
5664
5725
  le as Button,
5665
- Fn as ButtonGroup,
5666
- Cs as Card,
5667
- rs as ChannelBadge,
5726
+ Rn as ButtonGroup,
5727
+ Es as Card,
5728
+ ss as ChannelBadge,
5668
5729
  ye as Checkbox,
5669
- ks as CommandPalette,
5670
- Kn as ConfirmDialog,
5671
- nt as ContentLoading,
5730
+ Ss as CommandPalette,
5731
+ Jn as ConfirmDialog,
5732
+ Oe as ContentLoading,
5672
5733
  Pe as DatePicker,
5673
5734
  br as Dropdown,
5674
- Gn as EmptyState,
5675
- Es as ErrorBoundary,
5676
- Ss as FederatedResource,
5735
+ Yn as EmptyState,
5736
+ Ms as ErrorBoundary,
5737
+ zs as FederatedResource,
5677
5738
  Gt as FilterChip,
5678
5739
  dr as FolderSelect,
5679
- Wn as Form,
5740
+ Gn as Form,
5680
5741
  jr as FormSection,
5681
- ws as Heading,
5742
+ Cs as Heading,
5682
5743
  Pt as IDENTITY_TONE_COUNT,
5683
5744
  Z as Icon,
5684
- ns as Image,
5685
- Jn as Kbd,
5686
- os as KpiCard,
5687
- Rn as Link,
5688
- as as List,
5689
- ss as ListBulkAction,
5690
- Pn as MeetingGrid,
5691
- ls as MessageBubble,
5692
- rt as Modal,
5693
- cs as PageHeader,
5694
- Hn as PageToolbar,
5745
+ as as Image,
5746
+ Xn as Kbd,
5747
+ is as KpiCard,
5748
+ Vn as Link,
5749
+ os as List,
5750
+ ls as ListBulkAction,
5751
+ On as MeetingGrid,
5752
+ cs as MessageBubble,
5753
+ nt as Modal,
5754
+ ds as Page,
5755
+ sn as PageHeader,
5756
+ qn as PageToolbar,
5695
5757
  Me as PageToolbarActions,
5696
- jn as ParticipantTile,
5697
- Ye as Popover,
5698
- Yn as ProgressBar,
5699
- is as RichText,
5700
- tt as SearchField,
5758
+ Fn as ParticipantTile,
5759
+ Xe as Popover,
5760
+ Zn as ProgressBar,
5761
+ us as RichText,
5762
+ rt as SearchField,
5701
5763
  hr as SearchableTextField,
5702
- ds as SectionCaption,
5703
- us as SectionDivider,
5764
+ ms as SectionCaption,
5765
+ fs as SectionDivider,
5704
5766
  Qt as SegmentedToggle,
5705
5767
  ze as Select,
5706
- ms as SettingsFrameProvider,
5707
- hs as SettingsPage,
5708
- xs as SettingsRow,
5709
- bs as SettingsSection,
5710
- Ns as SidebarMenu,
5711
- gs as SourceChip,
5712
- Xn as Spinner,
5713
- Xe as SplitButton,
5714
- Zn as StatusDot,
5715
- Qn as StepIndicator,
5768
+ hs as SettingsFrameProvider,
5769
+ bs as SettingsPage,
5770
+ gs as SettingsRow,
5771
+ ps as SettingsSection,
5772
+ ks as SidebarMenu,
5773
+ vs as SourceChip,
5774
+ Qn as Spinner,
5775
+ Ze as SplitButton,
5776
+ es as StatusDot,
5777
+ ts as StepIndicator,
5716
5778
  Dr as StorageInput,
5717
5779
  xr as Switch,
5718
- Un as TabBar,
5719
- Ve as Table,
5780
+ Kn as TabBar,
5781
+ qe as Table,
5720
5782
  Cr as Tabs,
5721
5783
  fe as Text,
5722
5784
  je as TextArea,
5723
5785
  Ne as TextField,
5724
- On as VideoSurface,
5725
- ys as View,
5726
- qe as autofillProps,
5727
- dn as badgeColumn,
5728
- ps as booleanBadgeColumn,
5729
- In as catTone,
5786
+ Bn as VideoSurface,
5787
+ ws as View,
5788
+ Ue as autofillProps,
5789
+ mn as badgeColumn,
5790
+ ys as booleanBadgeColumn,
5791
+ jn as catTone,
5730
5792
  c as cn,
5731
- An as createSizes,
5732
- Dn as createVariants,
5733
- Vn as dateFilterHandler,
5734
- Ln as identityDotClass,
5735
- Je as identityPlateClass,
5736
- Ge as identityTone,
5737
- vs as labelsColumn,
5738
- Bn as resolveLucideIcon,
5739
- qn as selectFilterHandler,
5793
+ In as createSizes,
5794
+ Ln as createVariants,
5795
+ Un as dateFilterHandler,
5796
+ Pn as identityDotClass,
5797
+ Ye as identityPlateClass,
5798
+ Je as identityTone,
5799
+ Ns as labelsColumn,
5800
+ Hn as resolveLucideIcon,
5801
+ Wn as selectFilterHandler,
5740
5802
  De as useAnchoredPosition,
5741
- on as useSettingsFrame,
5742
- fs as useSettingsFrameHost
5803
+ dn as useSettingsFrame,
5804
+ xs as useSettingsFrameHost
5743
5805
  };
5744
5806
  //# sourceMappingURL=index.js.map