@opencxh/ui-kit 3.175.2 → 3.176.1

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,21 +1,21 @@
1
- import { jsxs as c, jsx as e, Fragment as Ee } from "react/jsx-runtime";
2
- import ae, { forwardRef as ve, useState as R, useLayoutEffect as gt, useRef as ne, useEffect as X, createContext as et, useId as pt, useMemo as pe, useContext as vt, useCallback as xe, Component as yt } from "react";
3
- import { clsx as Nt } from "clsx";
4
- import * as wt from "lucide-react";
5
- import { X as Se, ChevronDown as Ae, ExternalLink as kt, Search as Le, ChevronRight as Ie, Sparkles as Ct, ImageOff as St, ChevronLeft as ze, Pencil as Et, ArrowUpRight as zt, Calendar as Mt, Check as Ue, ChevronUp as Tt, Ellipsis as $t, ChevronDownIcon as _t, FileText as je, HardDrive as We, ArrowLeft as Dt, FolderPlus as At, Upload as Lt, Folder as Ke, Trash2 as It, Plus as Pt, Loader2 as Ot, VideoOff as jt, User as Ft, MicOff as Rt, Mic as Bt } from "lucide-react";
6
- import Ht from "dompurify";
7
- import qt from "react-markdown";
8
- import Vt from "remark-gfm";
1
+ import { jsxs as c, jsx as e, Fragment as Ae } from "react/jsx-runtime";
2
+ import ae, { forwardRef as ve, useState as R, useLayoutEffect as vt, useRef as ne, useEffect as X, createContext as et, useId as yt, useMemo as pe, useContext as Nt, useCallback as fe, Component as wt } from "react";
3
+ import { clsx as kt } from "clsx";
4
+ import * as Ct from "lucide-react";
5
+ import { X as Se, ChevronDown as De, ExternalLink as St, Search as Le, ChevronRight as Ie, Sparkles as Et, ArrowUpRight as tt, ImageOff as zt, ChevronLeft as Ee, Pencil as Mt, Calendar as Tt, Check as Ue, ChevronUp as _t, Ellipsis as $t, ChevronDownIcon as At, FileText as je, HardDrive as We, ArrowLeft as Dt, FolderPlus as Lt, Upload as It, Folder as Ke, Trash2 as Ot, Plus as Pt, Loader2 as jt, VideoOff as Ft, User as Rt, MicOff as Bt, Mic as Ht } from "lucide-react";
6
+ import qt from "dompurify";
7
+ import Vt from "react-markdown";
8
+ import Ut from "remark-gfm";
9
9
  function i(...t) {
10
- return Nt(t);
10
+ return kt(t);
11
11
  }
12
- function es(t) {
12
+ function ns(t) {
13
13
  return (r, n) => t[r]?.[n] || "";
14
14
  }
15
- function ts(t) {
15
+ function ss(t) {
16
16
  return (r) => t[r] || "";
17
17
  }
18
- const Ut = {
18
+ const Wt = {
19
19
  primary: "bg-accent text-accent-fg hover:bg-accent-hover disabled:bg-surface-hover",
20
20
  secondary: "bg-surface-sunk text-text-strong hover:bg-surface-hover disabled:bg-surface-hover",
21
21
  // No resting fill, so no disabled fill either — a greyed-out plate where
@@ -28,7 +28,7 @@ const Ut = {
28
28
  success: "bg-success text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
29
29
  warning: "bg-warning text-text-inverse hover:opacity-90 disabled:bg-surface-hover",
30
30
  "danger-solid": "bg-danger text-text-inverse hover:opacity-90 disabled:bg-surface-hover"
31
- }, Wt = {
31
+ }, Kt = {
32
32
  xs: "h-control-xs px-2 text-xs",
33
33
  sm: "h-control-sm px-3 text-sm",
34
34
  md: "h-control-md px-4 text-sm",
@@ -36,7 +36,7 @@ const Ut = {
36
36
  xl: "h-control-xl px-6 text-base",
37
37
  "2xl": "h-control-2xl px-6 text-base",
38
38
  full: "h-control-md px-4 text-sm"
39
- }, Kt = {
39
+ }, Gt = {
40
40
  xs: "h-control-xs w-6",
41
41
  sm: "h-control-sm w-7",
42
42
  md: "h-control-md w-8",
@@ -75,8 +75,8 @@ const Ut = {
75
75
  "focus-visible:outline-none focus-visible:focus-ring",
76
76
  "disabled:cursor-not-allowed disabled:border-border-subtle",
77
77
  "disabled:text-text-disabled",
78
- Ut[t],
79
- o ? Kt[r] : Wt[r],
78
+ Wt[t],
79
+ o ? Gt[r] : Kt[r],
80
80
  (n || r === "full") && "w-full",
81
81
  s && "cursor-wait",
82
82
  d
@@ -102,7 +102,7 @@ const Ut = {
102
102
  }
103
103
  );
104
104
  se.displayName = "Button";
105
- const rs = ({
105
+ const as = ({
106
106
  children: t,
107
107
  size: r = "md",
108
108
  orientation: n = "horizontal",
@@ -133,12 +133,12 @@ const rs = ({
133
133
  );
134
134
  return /* @__PURE__ */ e("div", { className: l, role: "group", children: t });
135
135
  };
136
- function ns(t) {
136
+ function Jt(t) {
137
137
  if (!t) return;
138
- const r = t.split(/[-_ ]/).filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), n = wt[r];
138
+ const r = t.split(/[-_ ]/).filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), n = Ct[r];
139
139
  return typeof n == "function" || typeof n == "object" && n !== null ? n : void 0;
140
140
  }
141
- const Gt = {
141
+ const Yt = {
142
142
  primary: "text-text",
143
143
  secondary: "text-text-muted",
144
144
  accent: "text-accent",
@@ -148,7 +148,7 @@ const Gt = {
148
148
  info: "text-info-fg",
149
149
  neutral: "text-text-subtle",
150
150
  current: "text-current"
151
- }, ee = ({
151
+ }, J = ({
152
152
  icon: t,
153
153
  size: r = "md",
154
154
  color: n = "current",
@@ -158,9 +158,9 @@ const Gt = {
158
158
  "aria-label": o,
159
159
  ...u
160
160
  }) => {
161
- const d = typeof r == "number" ? r : Jt(r), v = i(
161
+ const d = typeof r == "number" ? r : Xt(r), v = i(
162
162
  "inline-block shrink-0",
163
- Gt[n],
163
+ Yt[n],
164
164
  s && [
165
165
  "cursor-pointer rounded-sm transition-opacity duration-fast ease-out hover:opacity-80",
166
166
  "focus-visible:outline-none focus-visible:focus-ring"
@@ -182,7 +182,7 @@ const Gt = {
182
182
  };
183
183
  return /* @__PURE__ */ e(t, { ...m });
184
184
  };
185
- function Jt(t) {
185
+ function Xt(t) {
186
186
  return {
187
187
  xs: 12,
188
188
  sm: 14,
@@ -191,9 +191,9 @@ function Jt(t) {
191
191
  xl: 24
192
192
  }[t];
193
193
  }
194
- function Pe(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
194
+ function Oe(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start" } = {}) {
195
195
  const [l, o] = R({});
196
- return gt(() => {
196
+ return vt(() => {
197
197
  if (!t) return;
198
198
  const u = () => {
199
199
  const d = r.current;
@@ -206,7 +206,7 @@ function Pe(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start
206
206
  };
207
207
  }, [t, r, n, s, a]), l;
208
208
  }
209
- const tt = ({
209
+ const rt = ({
210
210
  trigger: t,
211
211
  children: r,
212
212
  placement: n = "bottom-start",
@@ -216,7 +216,7 @@ const tt = ({
216
216
  disabled: o = !1,
217
217
  triggerLabel: u
218
218
  }) => {
219
- const [d, v] = R(!1), m = ne(null), f = ne(null), b = Pe(d, f, { placement: n });
219
+ const [d, v] = R(!1), m = ne(null), f = ne(null), b = Oe(d, f, { placement: n });
220
220
  X(() => {
221
221
  if (!d) return;
222
222
  const p = (C) => {
@@ -263,29 +263,29 @@ const tt = ({
263
263
  }
264
264
  )
265
265
  ] });
266
- }, Yt = {
266
+ }, Zt = {
267
267
  none: "hover:bg-surface-sunk hover:text-text",
268
268
  default: "bg-surface-sunk text-text-muted hover:text-text",
269
269
  muted: "bg-surface-sunk text-text-subtle hover:text-text",
270
270
  outline: "text-text-muted ring-1 ring-inset ring-border-strong hover:bg-surface-hover hover:text-text",
271
271
  warning: "bg-warning-soft text-warning-fg",
272
272
  danger: "bg-danger-soft text-danger-fg"
273
- }, Xt = (t) => i(
273
+ }, Qt = (t) => i(
274
274
  // A button's default cursor is an arrow, so it has to be asked for.
275
275
  "inline-flex cursor-pointer select-none items-center text-sm font-medium",
276
276
  t.size === "sm" ? "h-control-sm" : "h-control-md",
277
277
  "transition-colors duration-fast ease-out",
278
278
  t.shape === "pill" ? "rounded-full" : "rounded-md",
279
279
  // Picking a value outranks whatever the value happens to mean.
280
- t.active ? "bg-info-soft text-info-fg" : Yt[t.tone ?? "default"],
280
+ t.active ? "bg-info-soft text-info-fg" : Zt[t.tone ?? "default"],
281
281
  t.className
282
- ), Zt = (t) => i(
282
+ ), er = (t) => i(
283
283
  "inline-flex items-center gap-1.5 pl-3",
284
284
  t.shape === "pill" ? "rounded-full" : "rounded-md",
285
285
  t.withClear ? "pr-1.5" : "pr-3",
286
286
  "focus-visible:outline-none focus-visible:focus-ring"
287
287
  );
288
- function Qt({
288
+ function tr({
289
289
  label: t,
290
290
  icon: r,
291
291
  tone: n = "default",
@@ -301,11 +301,11 @@ function Qt({
301
301
  title: b,
302
302
  className: g
303
303
  }) {
304
- const w = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", h = Xt({ active: l, tone: n, shape: s, size: a, className: g }), C = /* @__PURE__ */ c(Ee, { children: [
304
+ const w = l && !!v, p = s === "pill" ? "rounded-full" : "rounded-md", h = Qt({ active: l, tone: n, shape: s, size: a, className: g }), C = /* @__PURE__ */ c(Ae, { children: [
305
305
  r,
306
306
  t,
307
- o && /* @__PURE__ */ e(ee, { icon: Ae, size: "xs" })
308
- ] }), z = Zt({ shape: s, withClear: w }), P = w && /* @__PURE__ */ e(
307
+ o && /* @__PURE__ */ e(J, { icon: De, size: "xs" })
308
+ ] }), z = er({ shape: s, withClear: w }), O = w && /* @__PURE__ */ e(
309
309
  "button",
310
310
  {
311
311
  type: "button",
@@ -315,12 +315,12 @@ function Qt({
315
315
  "inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring",
316
316
  p
317
317
  ),
318
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "xs" })
318
+ children: /* @__PURE__ */ e(J, { icon: Se, size: "xs" })
319
319
  }
320
320
  );
321
321
  return u ? /* @__PURE__ */ c("span", { className: h, title: b, children: [
322
322
  /* @__PURE__ */ e(
323
- tt,
323
+ rt,
324
324
  {
325
325
  trigger: C,
326
326
  rootClassName: "h-full",
@@ -329,19 +329,19 @@ function Qt({
329
329
  children: u
330
330
  }
331
331
  ),
332
- P
332
+ O
333
333
  ] }) : w ? /* @__PURE__ */ c("span", { className: h, title: b, children: [
334
334
  /* @__PURE__ */ e("button", { type: "button", onClick: f, className: z, children: C }),
335
- P
335
+ O
336
336
  ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: f, className: i(h, z), children: C });
337
337
  }
338
- const er = {
338
+ const rr = {
339
339
  xs: "text-xs",
340
340
  sm: "text-sm",
341
341
  md: "text-base",
342
342
  lg: "text-md",
343
343
  xl: "text-lg"
344
- }, tr = {
344
+ }, nr = {
345
345
  primary: "text-text hover:text-info-fg hover:underline",
346
346
  info: "text-info-fg hover:underline",
347
347
  secondary: "text-text-muted hover:text-text",
@@ -350,7 +350,7 @@ const er = {
350
350
  success: "text-success-fg hover:underline",
351
351
  warning: "text-warning-fg hover:underline",
352
352
  error: "text-danger-fg hover:underline"
353
- }, rr = {
353
+ }, sr = {
354
354
  primary: "bg-accent-soft",
355
355
  accent: "bg-accent-soft",
356
356
  secondary: "bg-surface-hover",
@@ -359,7 +359,7 @@ const er = {
359
359
  warning: "bg-warning-soft",
360
360
  error: "bg-danger-soft",
361
361
  info: "bg-info-soft"
362
- }, ss = ({
362
+ }, ls = ({
363
363
  variant: t = "default",
364
364
  size: r = "md",
365
365
  color: n = "primary",
@@ -376,13 +376,13 @@ const er = {
376
376
  "inline-flex items-center gap-1 underline-offset-2",
377
377
  "transition-colors duration-fast ease-out",
378
378
  "focus-visible:outline-none focus-visible:focus-ring",
379
- er[r],
380
- !s && tr[n],
379
+ rr[r],
380
+ !s && nr[n],
381
381
  t === "subtle" && "no-underline opacity-70 hover:opacity-100",
382
382
  t === "underline" && "underline decoration-1 hover:decoration-2",
383
383
  t === "button" && [
384
384
  "h-control-md rounded-md px-3 font-semibold no-underline hover:no-underline",
385
- rr[n]
385
+ sr[n]
386
386
  ],
387
387
  s && "pointer-events-none cursor-not-allowed text-text-disabled opacity-50",
388
388
  l
@@ -395,13 +395,13 @@ const er = {
395
395
  };
396
396
  return /* @__PURE__ */ c("a", { className: b, ...g, children: [
397
397
  o,
398
- f && /* @__PURE__ */ e(kt, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
398
+ f && /* @__PURE__ */ e(St, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
399
399
  ] });
400
- }, nr = {
400
+ }, ar = {
401
401
  sm: "h-control-sm px-3 text-sm",
402
402
  md: "h-control-md px-3 text-sm"
403
403
  };
404
- function sr({
404
+ function lr({
405
405
  options: t,
406
406
  value: r,
407
407
  onChange: n,
@@ -438,7 +438,7 @@ function sr({
438
438
  "transition-colors duration-fast ease-out",
439
439
  "focus-visible:outline-none focus-visible:focus-ring",
440
440
  l && "min-w-0 flex-1",
441
- nr[s],
441
+ ar[s],
442
442
  v ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
443
443
  ),
444
444
  children: d.label
@@ -449,15 +449,15 @@ function sr({
449
449
  }
450
450
  );
451
451
  }
452
- const ar = {
452
+ const or = {
453
453
  primary: "bg-accent text-accent-fg hover:bg-accent-hover",
454
454
  secondary: "border border-border bg-surface text-text hover:bg-surface-hover",
455
455
  outline: "border border-accent-border text-accent hover:bg-accent-soft"
456
- }, lr = {
456
+ }, cr = {
457
457
  sm: "h-control-sm w-7",
458
458
  md: "h-control-md w-8"
459
459
  };
460
- function rt({
460
+ function nt({
461
461
  label: t,
462
462
  onClick: r,
463
463
  variant: n = "primary",
@@ -489,7 +489,7 @@ function rt({
489
489
  }
490
490
  ),
491
491
  f && /* @__PURE__ */ e(
492
- tt,
492
+ rt,
493
493
  {
494
494
  placement: d,
495
495
  disabled: m,
@@ -502,14 +502,14 @@ function rt({
502
502
  className: i(
503
503
  "inline-flex items-center justify-center rounded-md rounded-l-none",
504
504
  "transition-colors duration-fast ease-out",
505
- ar[n],
506
- lr[s],
505
+ or[n],
506
+ cr[s],
507
507
  m && "cursor-not-allowed opacity-50"
508
508
  ),
509
- children: /* @__PURE__ */ e(Ae, { className: "size-icon-md" })
509
+ children: /* @__PURE__ */ e(De, { className: "size-icon-md" })
510
510
  }
511
511
  ),
512
- children: (b) => /* @__PURE__ */ e(Ee, { children: l.map((g) => /* @__PURE__ */ c(
512
+ children: (b) => /* @__PURE__ */ e(Ae, { children: l.map((g) => /* @__PURE__ */ c(
513
513
  "button",
514
514
  {
515
515
  type: "button",
@@ -534,7 +534,7 @@ function rt({
534
534
  ] })
535
535
  );
536
536
  }
537
- const as = ({
537
+ const os = ({
538
538
  commands: t,
539
539
  isOpen: r,
540
540
  onClose: n,
@@ -547,7 +547,7 @@ const as = ({
547
547
  );
548
548
  return X(() => {
549
549
  r || (u(""), v(a || []), f(l || 0));
550
- }, [r]), X(() => {
550
+ }, [r, a, l]), X(() => {
551
551
  const h = (C) => {
552
552
  if (r) {
553
553
  if (C.key === "Escape")
@@ -587,7 +587,6 @@ const as = ({
587
587
  "input",
588
588
  {
589
589
  type: "text",
590
- autoFocus: !0,
591
590
  placeholder: s?.searchPlaceholder || "Search commands...",
592
591
  value: o,
593
592
  onChange: (h) => u(h.target.value),
@@ -639,7 +638,7 @@ const as = ({
639
638
  ]
640
639
  }
641
640
  ) }) : null;
642
- }, or = /<[a-z][\s\S]*>/i, cr = [
641
+ }, ir = /<[a-z][\s\S]*>/i, dr = [
643
642
  "[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
644
643
  "[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
645
644
  "[&_strong]:font-semibold [&_em]:italic",
@@ -654,7 +653,7 @@ const as = ({
654
653
  "[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
655
654
  "[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
656
655
  "[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
657
- ].join(" "), ir = {
656
+ ].join(" "), ur = {
658
657
  p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
659
658
  a: (t) => /* @__PURE__ */ e(
660
659
  "a",
@@ -685,42 +684,42 @@ const as = ({
685
684
  th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
686
685
  td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
687
686
  };
688
- function Me({ text: t, className: r, as: n }) {
687
+ function ze({ text: t, className: r, as: n }) {
689
688
  const s = t ?? "";
690
- return (n ? n === "html" : or.test(s)) ? /* @__PURE__ */ e(
689
+ return (n ? n === "html" : ir.test(s)) ? /* @__PURE__ */ e(
691
690
  "div",
692
691
  {
693
- className: i("break-words", cr, r),
692
+ className: i("break-words", dr, r),
694
693
  dangerouslySetInnerHTML: {
695
- __html: Ht.sanitize(s, { ADD_ATTR: ["target", "rel"] })
694
+ __html: qt.sanitize(s, { ADD_ATTR: ["target", "rel"] })
696
695
  }
697
696
  }
698
- ) : /* @__PURE__ */ e("div", { className: i("break-words", r), children: /* @__PURE__ */ e(qt, { remarkPlugins: [Vt], components: ir, children: s }) });
697
+ ) : /* @__PURE__ */ e("div", { className: i("break-words", r), children: /* @__PURE__ */ e(Vt, { remarkPlugins: [Ut], components: ur, children: s }) });
699
698
  }
700
- const dr = {
699
+ const mr = {
701
700
  info: "text-info-fg",
702
701
  success: "text-success-fg",
703
702
  warning: "text-warning-fg",
704
703
  destructive: "text-danger-fg"
705
- }, ur = {
704
+ }, fr = {
706
705
  info: "bg-info-soft border-info-border",
707
706
  success: "bg-success-soft border-success-border",
708
707
  warning: "bg-warning-soft border-warning-border",
709
708
  destructive: "bg-danger-soft border-danger-border"
710
- }, mr = {
709
+ }, hr = {
711
710
  1: "grid-cols-1",
712
711
  2: "grid-cols-2",
713
712
  3: "grid-cols-3",
714
713
  4: "grid-cols-4"
715
714
  };
716
- function fr({ block: t }) {
715
+ function xr({ block: t }) {
717
716
  switch (t.type) {
718
717
  case "heading":
719
718
  return t.level === 1 ? /* @__PURE__ */ e("h1", { className: "text-2xl font-semibold tracking-tight text-text", children: t.text }) : t.level === 2 ? /* @__PURE__ */ e("h2", { className: "pt-2 text-base font-semibold tracking-tight text-text", children: t.text }) : /* @__PURE__ */ e("h3", { className: "pt-1 text-sm font-semibold text-text", children: t.text });
720
719
  case "paragraph":
721
- return /* @__PURE__ */ e(Me, { as: "markdown", text: t.text, className: "text-sm text-text" });
720
+ return /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text" });
722
721
  case "quote":
723
- return /* @__PURE__ */ e("blockquote", { className: "border-l-2 border-border pl-3.5", children: /* @__PURE__ */ e(Me, { as: "markdown", text: t.text, className: "text-sm text-text-muted" }) });
722
+ return /* @__PURE__ */ e("blockquote", { className: "border-l-2 border-border pl-3.5", children: /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text-muted" }) });
724
723
  case "code":
725
724
  return /* @__PURE__ */ e("pre", { className: "overflow-x-auto rounded-lg bg-surface-sunk p-3 text-xs", children: /* @__PURE__ */ e("code", { className: "font-mono", children: t.text }) });
726
725
  case "divider":
@@ -739,7 +738,7 @@ function fr({ block: t }) {
739
738
  n.lead,
740
739
  " "
741
740
  ] }),
742
- /* @__PURE__ */ e(Me, { as: "markdown", text: n.text, className: "inline" })
741
+ /* @__PURE__ */ e(ze, { as: "markdown", text: n.text, className: "inline" })
743
742
  ] }, s))
744
743
  }
745
744
  );
@@ -773,13 +772,13 @@ function fr({ block: t }) {
773
772
  t.caption && /* @__PURE__ */ e("figcaption", { className: "pt-2 text-xs italic text-text-subtle", children: t.caption })
774
773
  ] });
775
774
  case "kpi":
776
- return /* @__PURE__ */ e("div", { className: i("grid gap-3", mr[t.items.length] ?? "grid-cols-4"), children: t.items.map((r, n) => /* @__PURE__ */ c("div", { className: "rounded-lg bg-surface-sunk px-4 py-3.5", children: [
775
+ return /* @__PURE__ */ e("div", { className: i("grid gap-3", hr[t.items.length] ?? "grid-cols-4"), children: t.items.map((r, n) => /* @__PURE__ */ c("div", { className: "rounded-lg bg-surface-sunk px-4 py-3.5", children: [
777
776
  /* @__PURE__ */ e(
778
777
  "div",
779
778
  {
780
779
  className: i(
781
780
  "text-2xl font-semibold tracking-tight",
782
- r.tone ? dr[r.tone] : "text-text"
781
+ r.tone ? mr[r.tone] : "text-text"
783
782
  ),
784
783
  children: r.value
785
784
  }
@@ -787,15 +786,15 @@ function fr({ block: t }) {
787
786
  /* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r.label })
788
787
  ] }, n)) });
789
788
  case "callout":
790
- return /* @__PURE__ */ c("div", { className: i("rounded-lg border px-4 py-3", ur[t.tone]), children: [
789
+ return /* @__PURE__ */ c("div", { className: i("rounded-lg border px-4 py-3", fr[t.tone]), children: [
791
790
  t.title && /* @__PURE__ */ e("div", { className: "pb-0.5 text-sm font-semibold text-text", children: t.title }),
792
- /* @__PURE__ */ e(Me, { as: "markdown", text: t.text, className: "text-sm text-text" })
791
+ /* @__PURE__ */ e(ze, { as: "markdown", text: t.text, className: "text-sm text-text" })
793
792
  ] });
794
793
  default:
795
794
  return null;
796
795
  }
797
796
  }
798
- function ls({ blocks: t, runtime: r = "inert", className: n }) {
797
+ function cs({ blocks: t, runtime: r = "inert", className: n }) {
799
798
  return r !== "inert" ? /* @__PURE__ */ c(
800
799
  "div",
801
800
  {
@@ -812,11 +811,11 @@ function ls({ blocks: t, runtime: r = "inert", className: n }) {
812
811
  ] })
813
812
  ]
814
813
  }
815
- ) : /* @__PURE__ */ e("article", { className: i("flex flex-col gap-4", n), children: t.map((s, a) => /* @__PURE__ */ e(fr, { block: s }, s.block_id ?? a)) });
814
+ ) : /* @__PURE__ */ e("article", { className: i("flex flex-col gap-4", n), children: t.map((s, a) => /* @__PURE__ */ e(xr, { block: s }, s.block_id ?? a)) });
816
815
  }
817
- function os({
816
+ function is({
818
817
  title: t,
819
- icon: r = /* @__PURE__ */ e(Ct, { className: "size-icon-md", "aria-hidden": !0 }),
818
+ icon: r = /* @__PURE__ */ e(Et, { className: "size-icon-md", "aria-hidden": !0 }),
820
819
  action: n,
821
820
  children: s,
822
821
  className: a,
@@ -842,53 +841,53 @@ function os({
842
841
  }
843
842
  );
844
843
  }
845
- const hr = 5;
846
- function xr(t) {
844
+ const br = 5;
845
+ function gr(t) {
847
846
  let r = 2166136261;
848
847
  for (let n = 0; n < t.length; n++)
849
848
  r ^= t.charCodeAt(n), r = Math.imul(r, 16777619);
850
849
  return r >>> 0;
851
850
  }
852
- function nt(t) {
851
+ function st(t) {
853
852
  const r = (t ?? "").trim().toLowerCase();
854
- return r ? xr(r) % hr + 1 : 1;
853
+ return r ? gr(r) % br + 1 : 1;
855
854
  }
856
- const br = {
855
+ const pr = {
857
856
  1: "bg-cat-1-soft text-cat-1-fg",
858
857
  2: "bg-cat-2-soft text-cat-2-fg",
859
858
  3: "bg-cat-3-soft text-cat-3-fg",
860
859
  4: "bg-cat-4-soft text-cat-4-fg",
861
860
  5: "bg-cat-5-soft text-cat-5-fg"
862
- }, gr = {
861
+ }, vr = {
863
862
  1: "bg-cat-1",
864
863
  2: "bg-cat-2",
865
864
  3: "bg-cat-3",
866
865
  4: "bg-cat-4",
867
866
  5: "bg-cat-5"
868
867
  };
869
- function st(t) {
870
- return br[nt(t)];
868
+ function at(t) {
869
+ return pr[st(t)];
871
870
  }
872
- function cs(t) {
873
- return gr[nt(t)];
871
+ function ds(t) {
872
+ return vr[st(t)];
874
873
  }
875
- const pr = {
874
+ const yr = {
876
875
  default: "bg-avatar text-avatar-fg",
877
876
  in: "bg-avatar-in text-avatar-in-fg",
878
877
  out: "bg-accent text-accent-fg",
879
878
  note: "bg-avatar-note text-avatar-note-fg"
880
- }, vr = {
879
+ }, Nr = {
881
880
  xs: "w-5 h-5 text-xs",
882
881
  sm: "w-6 h-6 text-xs",
883
882
  md: "w-7 h-7 text-base",
884
883
  lg: "w-9 h-9 text-sm"
885
884
  };
886
- function yr(t) {
885
+ function wr(t) {
887
886
  if (!t) return "?";
888
887
  const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
889
888
  return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
890
889
  }
891
- const Nr = ({
890
+ const lt = ({
892
891
  name: t,
893
892
  src: r,
894
893
  tone: n = "default",
@@ -903,8 +902,8 @@ const Nr = ({
903
902
  "inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none",
904
903
  // `identity` is seeded on the name, so the same person keeps their colour
905
904
  // wherever they appear; the fixed tones stay as they were.
906
- n === "identity" ? st(t) : pr[n],
907
- vr[s],
905
+ n === "identity" ? at(t) : yr[n],
906
+ Nr[s],
908
907
  a
909
908
  );
910
909
  return r && !o ? /* @__PURE__ */ e(
@@ -916,8 +915,8 @@ const Nr = ({
916
915
  className: i(d, "object-cover"),
917
916
  onError: () => u(!0)
918
917
  }
919
- ) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: yr(t) });
920
- }, Ge = "ring-surface", wr = "ring-surface-accent", is = ({
918
+ ) : /* @__PURE__ */ e("span", { className: d, title: l ?? t, "aria-label": t, children: wr(t) });
919
+ }, Ge = "ring-surface", kr = "ring-surface-accent", us = ({
921
920
  people: t,
922
921
  max: r = 4,
923
922
  size: n = "sm",
@@ -927,7 +926,7 @@ const Nr = ({
927
926
  const a = t.slice(0, r), l = t.length - a.length;
928
927
  return /* @__PURE__ */ c("span", { className: i("inline-flex items-center", s), children: [
929
928
  a.map((o, u) => /* @__PURE__ */ e(
930
- Nr,
929
+ lt,
931
930
  {
932
931
  name: o.name,
933
932
  src: o.src,
@@ -935,7 +934,7 @@ const Nr = ({
935
934
  title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
936
935
  className: i(
937
936
  u > 0 && "-ml-2",
938
- o.owner ? wr : Ge,
937
+ o.owner ? kr : Ge,
939
938
  o.seen === !1 && "opacity-40"
940
939
  )
941
940
  },
@@ -958,43 +957,151 @@ const Nr = ({
958
957
  }
959
958
  )
960
959
  ] });
961
- }, Te = {
960
+ }, Cr = {
961
+ neutral: "bg-surface-sunk",
962
+ out: "bg-bubble-out-soft",
963
+ note: "bg-note-soft",
964
+ assistant: "bg-assistant-soft"
965
+ }, Sr = {
966
+ neutral: "text-text",
967
+ out: "text-text",
968
+ note: "text-note",
969
+ assistant: "text-text"
970
+ };
971
+ function ms({
972
+ avatar: t,
973
+ title: r,
974
+ context: n,
975
+ meta: s,
976
+ time: a,
977
+ tone: l = "neutral",
978
+ actions: o,
979
+ below: u,
980
+ children: d
981
+ }) {
982
+ return /* @__PURE__ */ c("div", { className: "flex min-w-0 flex-col gap-2", children: [
983
+ /* @__PURE__ */ c("div", { className: "flex min-w-0 items-start gap-3.5", children: [
984
+ /* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: t }),
985
+ /* @__PURE__ */ c(
986
+ "div",
987
+ {
988
+ className: i("min-w-0 flex-1 overflow-hidden rounded-lg px-4 py-3.5", Cr[l]),
989
+ children: [
990
+ /* @__PURE__ */ c("div", { className: "flex items-baseline gap-2", children: [
991
+ /* @__PURE__ */ e(
992
+ "span",
993
+ {
994
+ className: i(
995
+ "min-w-0 truncate text-md font-semibold",
996
+ !n && "flex-1",
997
+ Sr[l]
998
+ ),
999
+ children: r
1000
+ }
1001
+ ),
1002
+ n && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-xs text-text-muted", children: n }),
1003
+ (s || a) && /* @__PURE__ */ c("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
1004
+ s,
1005
+ a && /* @__PURE__ */ e("span", { className: "text-xs tabular-nums text-text-subtle", children: a })
1006
+ ] })
1007
+ ] }),
1008
+ d && /* @__PURE__ */ e("div", { className: "pt-2", children: d }),
1009
+ o && /* @__PURE__ */ e("div", { className: "-ml-2.5 flex flex-wrap items-center gap-0.5 pt-2.5", children: o })
1010
+ ]
1011
+ }
1012
+ )
1013
+ ] }),
1014
+ u
1015
+ ] });
1016
+ }
1017
+ const fs = "hover:bg-surface-track";
1018
+ function hs({
1019
+ name: t,
1020
+ src: r,
1021
+ tone: n = "in"
1022
+ }) {
1023
+ return /* @__PURE__ */ e(lt, { name: t, src: r, tone: n, size: "sm" });
1024
+ }
1025
+ function xs({
1026
+ icon: t,
1027
+ tone: r = "neutral",
1028
+ title: n
1029
+ }) {
1030
+ return /* @__PURE__ */ e(
1031
+ "span",
1032
+ {
1033
+ title: n,
1034
+ className: i(
1035
+ "grid size-avatar-md shrink-0 place-items-center rounded-full",
1036
+ r === "assistant" ? "bg-assistant-soft text-assistant" : "bg-surface-track text-text-muted"
1037
+ ),
1038
+ children: /* @__PURE__ */ e(J, { icon: t, size: "sm", color: "current" })
1039
+ }
1040
+ );
1041
+ }
1042
+ function bs({ children: t, className: r }) {
1043
+ return /* @__PURE__ */ e("div", { className: i("flex items-center gap-2.5 rounded-md bg-surface px-3 py-2.5", r), children: t });
1044
+ }
1045
+ function gs({ icon: t, text: r, time: n, joinUrl: s, joinLabel: a }) {
1046
+ const l = Jt(t);
1047
+ return /* @__PURE__ */ c("div", { className: "flex items-center gap-2 py-1.5 pl-10.5 text-xs text-text-subtle", children: [
1048
+ l && /* @__PURE__ */ e(J, { icon: l, size: "sm", color: "current" }),
1049
+ /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: r }),
1050
+ /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "shrink-0 text-text-disabled", children: "·" }),
1051
+ /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums", children: n }),
1052
+ s && /* @__PURE__ */ c(
1053
+ "a",
1054
+ {
1055
+ href: s,
1056
+ target: "_blank",
1057
+ rel: "noopener noreferrer",
1058
+ className: "shrink-0 text-xs font-medium text-info-fg hover:underline",
1059
+ children: [
1060
+ a ?? "Join",
1061
+ " ",
1062
+ /* @__PURE__ */ e(J, { icon: tt, size: "xs" })
1063
+ ]
1064
+ }
1065
+ )
1066
+ ] });
1067
+ }
1068
+ const Me = {
962
1069
  mail: { fg: "text-channel-mail-fg", bg: "bg-channel-mail-soft" },
963
1070
  wa: { fg: "text-channel-whatsapp-fg", bg: "bg-channel-whatsapp-soft" },
964
1071
  chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
965
1072
  tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
966
1073
  note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
967
- }, kr = {
1074
+ }, Er = {
968
1075
  sm: "size-avatar-xs rounded-sm text-xs",
969
1076
  md: "size-avatar-sm rounded-md text-xs",
970
1077
  lg: "size-avatar-lg rounded-md text-base"
971
1078
  };
972
- function ds({
1079
+ function ps({
973
1080
  channel: t,
974
1081
  children: r,
975
1082
  size: n = "md",
976
1083
  className: s,
977
1084
  title: a
978
1085
  }) {
979
- const l = t in Te ? Te[t] : void 0;
1086
+ const l = t in Me ? Me[t] : void 0;
980
1087
  return /* @__PURE__ */ e(
981
1088
  "span",
982
1089
  {
983
1090
  title: a,
984
1091
  className: i(
985
1092
  "inline-flex shrink-0 items-center justify-center font-bold",
986
- kr[n],
1093
+ Er[n],
987
1094
  // An undeclared channel used to collapse onto the neutral "note" tone,
988
1095
  // which is also what a real internal note looks like. Deriving from the
989
1096
  // key keeps it distinguishable and keeps `note` meaning `note`.
990
- l ? i(l.fg, l.bg) : t ? st(t) : i(Te.note.fg, Te.note.bg),
1097
+ l ? i(l.fg, l.bg) : t ? at(t) : i(Me.note.fg, Me.note.bg),
991
1098
  s
992
1099
  ),
993
1100
  children: r
994
1101
  }
995
1102
  );
996
1103
  }
997
- const us = ({
1104
+ const vs = ({
998
1105
  src: t,
999
1106
  alt: r,
1000
1107
  size: n = "md",
@@ -1010,15 +1117,15 @@ const us = ({
1010
1117
  onError: b,
1011
1118
  ...g
1012
1119
  }) => {
1013
- const [w, p] = R(!0), [h, C] = R(!1), [z, P] = R(t), _ = (J) => {
1014
- p(!1), C(!1), f?.(J);
1015
- }, K = (J) => {
1120
+ const [w, p] = R(!0), [h, C] = R(!1), [z, O] = R(t), $ = (Z) => {
1121
+ p(!1), C(!1), f?.(Z);
1122
+ }, G = (Z) => {
1016
1123
  if (p(!1), C(!0), u && z !== u) {
1017
- P(u), C(!1), p(!0);
1124
+ O(u), C(!1), p(!0);
1018
1125
  return;
1019
1126
  }
1020
- b?.(J);
1021
- }, U = i(
1127
+ b?.(Z);
1128
+ }, j = i(
1022
1129
  "relative overflow-hidden bg-surface-hover",
1023
1130
  // Size variants
1024
1131
  {
@@ -1046,53 +1153,53 @@ const us = ({
1046
1153
  "rounded-full": a === "full"
1047
1154
  },
1048
1155
  m
1049
- ), j = i("w-full h-full object-cover transition-opacity duration-fast", {
1156
+ ), W = i("w-full h-full object-cover transition-opacity duration-fast", {
1050
1157
  "opacity-0": w || h,
1051
1158
  "opacity-100": !w && !h
1052
1159
  }), B = i(
1053
1160
  "absolute inset-0 flex items-center justify-center",
1054
1161
  "text-text-muted"
1055
- ), W = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), Z = /* @__PURE__ */ c("div", { className: "text-center", children: [
1056
- /* @__PURE__ */ e(ee, { icon: St, size: "lg", className: "mx-auto mb-1" }),
1162
+ ), U = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), ee = /* @__PURE__ */ c("div", { className: "text-center", children: [
1163
+ /* @__PURE__ */ e(J, { icon: zt, size: "lg", className: "mx-auto mb-1" }),
1057
1164
  /* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
1058
1165
  ] });
1059
- return /* @__PURE__ */ c("div", { className: U, children: [
1166
+ return /* @__PURE__ */ c("div", { className: j, children: [
1060
1167
  /* @__PURE__ */ e(
1061
1168
  "img",
1062
1169
  {
1063
1170
  ...g,
1064
1171
  src: z,
1065
1172
  alt: r,
1066
- className: j,
1067
- onLoad: _,
1068
- onError: K
1173
+ className: W,
1174
+ onLoad: $,
1175
+ onError: G
1069
1176
  }
1070
1177
  ),
1071
- w && l && /* @__PURE__ */ e("div", { className: B, children: d || W }),
1072
- h && o && /* @__PURE__ */ e("div", { className: B, children: v || Z })
1178
+ w && l && /* @__PURE__ */ e("div", { className: B, children: d || U }),
1179
+ h && o && /* @__PURE__ */ e("div", { className: B, children: v || ee })
1073
1180
  ] });
1074
- }, Cr = {
1181
+ }, zr = {
1075
1182
  default: "text-text",
1076
1183
  urgent: "text-danger-fg",
1077
1184
  success: "text-success-fg"
1078
1185
  };
1079
- function ms({ value: t, label: r, tone: n = "default", className: s, ...a }) {
1186
+ function ys({ value: t, label: r, tone: n = "default", className: s, ...a }) {
1080
1187
  return /* @__PURE__ */ c("div", { className: i("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
1081
- /* @__PURE__ */ e("div", { className: i("text-2xl font-semibold", Cr[n]), children: t }),
1188
+ /* @__PURE__ */ e("div", { className: i("text-2xl font-semibold", zr[n]), children: t }),
1082
1189
  /* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
1083
1190
  ] });
1084
1191
  }
1085
- const Sr = {
1192
+ const Mr = {
1086
1193
  sm: "size-checkbox-sm",
1087
1194
  md: "size-checkbox",
1088
1195
  lg: "size-checkbox-lg",
1089
1196
  full: "size-checkbox"
1090
- }, Er = {
1197
+ }, Tr = {
1091
1198
  sm: "min-h-control-sm",
1092
1199
  md: "min-h-control-md",
1093
1200
  lg: "min-h-control-lg",
1094
1201
  full: "min-h-control-md"
1095
- }, zr = {
1202
+ }, _r = {
1096
1203
  sm: "text-sm",
1097
1204
  md: "text-base",
1098
1205
  lg: "text-md",
@@ -1119,7 +1226,7 @@ const Sr = {
1119
1226
  return ae.useEffect(() => {
1120
1227
  w.current && (w.current.indeterminate = a);
1121
1228
  }, [a]), /* @__PURE__ */ c("div", { className: i("flex flex-col", l), children: [
1122
- /* @__PURE__ */ c("div", { className: i("flex items-center gap-3", Er[s]), children: [
1229
+ /* @__PURE__ */ c("div", { className: i("flex items-center gap-3", Tr[s]), children: [
1123
1230
  /* @__PURE__ */ e(
1124
1231
  "input",
1125
1232
  {
@@ -1136,7 +1243,7 @@ const Sr = {
1136
1243
  "transition-colors duration-fast ease-out",
1137
1244
  "focus-visible:outline-none focus-visible:focus-ring",
1138
1245
  "disabled:cursor-not-allowed disabled:bg-surface-hover",
1139
- Sr[s],
1246
+ Mr[s],
1140
1247
  g ? "border-danger-border" : "border-border-strong",
1141
1248
  u
1142
1249
  ),
@@ -1151,7 +1258,7 @@ const Sr = {
1151
1258
  className: i(
1152
1259
  "cursor-pointer",
1153
1260
  g ? "text-danger-fg" : "text-text",
1154
- zr[s],
1261
+ _r[s],
1155
1262
  o
1156
1263
  ),
1157
1264
  children: t
@@ -1165,7 +1272,7 @@ const Sr = {
1165
1272
  }
1166
1273
  );
1167
1274
  we.displayName = "Checkbox";
1168
- function fs({
1275
+ function Ns({
1169
1276
  icon: t,
1170
1277
  onClick: r,
1171
1278
  children: n
@@ -1188,7 +1295,7 @@ function fs({
1188
1295
  }
1189
1296
  );
1190
1297
  }
1191
- function hs({
1298
+ function ws({
1192
1299
  items: t,
1193
1300
  getRowKey: r,
1194
1301
  variant: n = "divided",
@@ -1208,31 +1315,31 @@ function hs({
1208
1315
  hideGroupCount: h = !1,
1209
1316
  selectable: C = !1,
1210
1317
  selectedItems: z = [],
1211
- onSelectionChange: P,
1212
- bulkActions: _,
1213
- header: K,
1214
- stickyHeader: U = !1,
1215
- bordered: j = !1,
1318
+ onSelectionChange: O,
1319
+ bulkActions: $,
1320
+ header: G,
1321
+ stickyHeader: j = !1,
1322
+ bordered: W = !1,
1216
1323
  emptyContent: B,
1217
- loading: W = !1,
1218
- loadingRows: Z = 4,
1219
- className: J,
1324
+ loading: U = !1,
1325
+ loadingRows: ee = 4,
1326
+ className: Z,
1220
1327
  "aria-label": de
1221
1328
  }) {
1222
1329
  const [Y, y] = ae.useState(
1223
1330
  () => Object.fromEntries((b ?? []).filter((k) => k.defaultCollapsed).map((k) => [k.id, !0]))
1224
1331
  ), x = ae.useRef(null), S = (k) => {
1225
1332
  if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(k.key)) return;
1226
- const G = Array.from(
1333
+ const K = Array.from(
1227
1334
  x.current?.querySelectorAll("li[data-list-row]") ?? []
1228
1335
  );
1229
- if (G.length === 0) return;
1336
+ if (K.length === 0) return;
1230
1337
  k.preventDefault();
1231
- const O = G.indexOf(document.activeElement), N = k.key === "Home" ? 0 : k.key === "End" ? G.length - 1 : k.key === "ArrowDown" ? (O + 1) % G.length : (O - 1 + G.length) % G.length;
1232
- G[N]?.focus();
1233
- }, D = (k, M) => r ? r(k, M) : M, E = (k) => z.includes(k), A = (k, M) => {
1234
- P && P(M ? [...z, k] : z.filter((G) => G !== k));
1235
- }, $ = (k) => P?.(k ? [...t] : []), oe = i(
1338
+ const P = K.indexOf(document.activeElement), N = k.key === "Home" ? 0 : k.key === "End" ? K.length - 1 : k.key === "ArrowDown" ? (P + 1) % K.length : (P - 1 + K.length) % K.length;
1339
+ K[N]?.focus();
1340
+ }, A = (k, M) => r ? r(k, M) : M, E = (k) => z.includes(k), D = (k, M) => {
1341
+ O && O(M ? [...z, k] : z.filter((K) => K !== k));
1342
+ }, T = (k) => O?.(k ? [...t] : []), oe = i(
1236
1343
  "flex flex-col",
1237
1344
  // With a selection open the list has a dock at its foot. Sticky can only
1238
1345
  // park at the bottom of its own box, so on a list shorter than the window
@@ -1241,11 +1348,11 @@ function hs({
1241
1348
  // belongs — and only while a selection exists, so an ordinary short list
1242
1349
  // keeps its natural height.
1243
1350
  C && z.length > 0 && "min-h-full",
1244
- j && "overflow-hidden rounded-lg border border-border-subtle",
1245
- J
1351
+ W && "overflow-hidden rounded-lg border border-border-subtle",
1352
+ Z
1246
1353
  );
1247
- if (W)
1248
- return /* @__PURE__ */ e("div", { className: oe, children: Array.from({ length: Z }).map((k, M) => /* @__PURE__ */ c(
1354
+ if (U)
1355
+ return /* @__PURE__ */ e("div", { className: oe, children: Array.from({ length: ee }).map((k, M) => /* @__PURE__ */ c(
1249
1356
  "div",
1250
1357
  {
1251
1358
  className: i(
@@ -1263,8 +1370,8 @@ function hs({
1263
1370
  )) });
1264
1371
  if (t.length === 0 && B)
1265
1372
  return /* @__PURE__ */ e("div", { className: oe, children: B });
1266
- const ce = t.length > 0 && z.length === t.length, q = z.length > 0 && !ce, H = (k, M, G) => {
1267
- const O = d?.(k, M) ?? !1, N = v?.(k, M) ?? !1, I = m?.(k, M) ?? !1, te = C && E(k);
1373
+ const ce = t.length > 0 && z.length === t.length, q = z.length > 0 && !ce, H = (k, M, K) => {
1374
+ const P = d?.(k, M) ?? !1, N = v?.(k, M) ?? !1, I = m?.(k, M) ?? !1, te = C && E(k);
1268
1375
  return /* @__PURE__ */ c(
1269
1376
  "li",
1270
1377
  {
@@ -1272,7 +1379,7 @@ function hs({
1272
1379
  role: "button",
1273
1380
  tabIndex: 0,
1274
1381
  "data-list-row": "",
1275
- "aria-current": O || void 0,
1382
+ "aria-current": P || void 0,
1276
1383
  onClick: () => o(k, M),
1277
1384
  onFocus: () => u?.(M),
1278
1385
  onKeyDown: (le) => {
@@ -1283,12 +1390,12 @@ function hs({
1283
1390
  "flex items-center gap-3 text-base",
1284
1391
  "transition-colors duration-fast ease-out",
1285
1392
  n === "inset" ? "mx-2 rounded-lg px-3 py-2.5" : "px-5 py-2.5",
1286
- n === "divided" && !G && "border-t border-border-subtle",
1393
+ n === "divided" && !K && "border-t border-border-subtle",
1287
1394
  o && "cursor-pointer focus-visible:outline-none focus-visible:focus-ring",
1288
1395
  // An unread row is tinted, not bolded: at five columns a bold row
1289
1396
  // shouts across all of them, while the tint marks the row and leaves
1290
1397
  // the consumer free to weight only the sender and the subject.
1291
- O || te ? "bg-accent-soft text-text" : N ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
1398
+ P || te ? "bg-accent-soft text-text" : N ? i("bg-surface-unread", o && "hover:bg-surface-unread-hover") : o && "hover:bg-surface-hover",
1292
1399
  // Read rows stay at full opacity — fading them also fades the avatars
1293
1400
  // and team dots, which is exactly the identity you scan by. They read
1294
1401
  // as secondary through weight and text colour instead.
@@ -1299,7 +1406,7 @@ function hs({
1299
1406
  we,
1300
1407
  {
1301
1408
  checked: E(k),
1302
- onChange: (le) => A(k, le.target.checked),
1409
+ onChange: (le) => D(k, le.target.checked),
1303
1410
  "aria-label": "Rij selecteren"
1304
1411
  }
1305
1412
  ) }),
@@ -1315,41 +1422,41 @@ function hs({
1315
1422
  l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(k, M) })
1316
1423
  ]
1317
1424
  },
1318
- D(k, M)
1425
+ A(k, M)
1319
1426
  );
1320
1427
  }, L = (() => {
1321
1428
  if (!f)
1322
- return t.map((O, N) => H(O, N, N === 0));
1429
+ return t.map((P, N) => H(P, N, N === 0));
1323
1430
  const k = /* @__PURE__ */ new Map();
1324
- t.forEach((O, N) => {
1325
- const I = f(O, N);
1326
- k.has(I) || k.set(I, []), k.get(I).push({ item: O, index: N });
1431
+ t.forEach((P, N) => {
1432
+ const I = f(P, N);
1433
+ k.has(I) || k.set(I, []), k.get(I)?.push({ item: P, index: N });
1327
1434
  });
1328
1435
  const M = b ?? [];
1329
1436
  return [
1330
- ...M.filter((O) => k.has(O.id)),
1331
- ...[...k.keys()].filter((O) => !M.some((N) => N.id === O)).map((O) => ({ id: O }))
1332
- ].flatMap((O, N) => {
1333
- const I = k.get(O.id) ?? [], te = p && Y[O.id], le = O.title ?? O.id, be = O.count ?? I.length, ye = /* @__PURE__ */ e(
1437
+ ...M.filter((P) => k.has(P.id)),
1438
+ ...[...k.keys()].filter((P) => !M.some((N) => N.id === P)).map((P) => ({ id: P }))
1439
+ ].flatMap((P, N) => {
1440
+ const I = k.get(P.id) ?? [], te = p && Y[P.id], le = P.title ?? P.id, be = P.count ?? I.length, ye = /* @__PURE__ */ e(
1334
1441
  "li",
1335
1442
  {
1336
- onClick: p ? () => y((fe) => ({ ...fe, [O.id]: !fe[O.id] })) : void 0,
1443
+ onClick: p ? () => y((he) => ({ ...he, [P.id]: !he[P.id] })) : void 0,
1337
1444
  className: i(
1338
1445
  // A caption over its rows, not a band across the table: same
1339
1446
  // surface as the rows, no rules, and the count as a quiet pill.
1340
1447
  // The old grey uppercase strip read as a second column header.
1341
1448
  "flex items-center gap-2.5 bg-surface px-5 pb-1.5 text-base font-semibold",
1342
1449
  N > 0 ? "pt-5" : "pt-3",
1343
- O.tone === "danger" ? "text-danger-fg" : O.tone === "muted" ? "text-text-subtle" : "text-text",
1450
+ P.tone === "danger" ? "text-danger-fg" : P.tone === "muted" ? "text-text-subtle" : "text-text",
1344
1451
  w && "sticky z-10",
1345
1452
  p && "cursor-pointer select-none"
1346
1453
  ),
1347
1454
  "aria-expanded": p ? !te : void 0,
1348
- style: w ? { top: U ? 28 : 0 } : void 0,
1455
+ style: w ? { top: j ? 28 : 0 } : void 0,
1349
1456
  children: g ? g(
1350
- O,
1351
- I.map((fe) => fe.item)
1352
- ) : /* @__PURE__ */ c(Ee, { children: [
1457
+ P,
1458
+ I.map((he) => he.item)
1459
+ ) : /* @__PURE__ */ c(Ae, { children: [
1353
1460
  p && /* @__PURE__ */ e(
1354
1461
  Ie,
1355
1462
  {
@@ -1366,23 +1473,23 @@ function hs({
1366
1473
  {
1367
1474
  className: i(
1368
1475
  "rounded-full px-2 text-xs font-normal tabular-nums",
1369
- O.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
1476
+ P.tone === "danger" ? "bg-danger-soft text-danger-fg" : "bg-surface-sunk text-text-subtle"
1370
1477
  ),
1371
1478
  children: be
1372
1479
  }
1373
1480
  )
1374
1481
  ] })
1375
1482
  },
1376
- `group-${O.id}`
1483
+ `group-${P.id}`
1377
1484
  );
1378
1485
  return te ? [ye] : [
1379
1486
  ye,
1380
- ...I.map(({ item: fe, index: he }, Oe) => H(fe, he, Oe === 0))
1487
+ ...I.map(({ item: he, index: xe }, Pe) => H(he, xe, Pe === 0))
1381
1488
  ];
1382
1489
  });
1383
1490
  })();
1384
1491
  return /* @__PURE__ */ c("div", { ref: x, className: oe, onKeyDown: o ? S : void 0, children: [
1385
- K && /* @__PURE__ */ c(
1492
+ G && /* @__PURE__ */ c(
1386
1493
  "div",
1387
1494
  {
1388
1495
  className: i(
@@ -1390,7 +1497,7 @@ function hs({
1390
1497
  // sticky group headers park against.
1391
1498
  "flex h-row-sm items-end gap-3 border-b border-border bg-surface px-5 pb-2",
1392
1499
  "text-xs font-semibold uppercase tracking-wider text-text-disabled",
1393
- U && "sticky top-0 z-20"
1500
+ j && "sticky top-0 z-20"
1394
1501
  ),
1395
1502
  children: [
1396
1503
  C && /* @__PURE__ */ e("span", { className: "flex items-center", children: /* @__PURE__ */ e(
@@ -1398,11 +1505,11 @@ function hs({
1398
1505
  {
1399
1506
  checked: ce,
1400
1507
  indeterminate: q,
1401
- onChange: (k) => $(k.target.checked),
1508
+ onChange: (k) => T(k.target.checked),
1402
1509
  "aria-label": "Alles selecteren"
1403
1510
  }
1404
1511
  ) }),
1405
- K
1512
+ G
1406
1513
  ]
1407
1514
  }
1408
1515
  ),
@@ -1413,13 +1520,13 @@ function hs({
1413
1520
  " geselecteerd"
1414
1521
  ] }),
1415
1522
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
1416
- _,
1523
+ $,
1417
1524
  /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "mx-1.5 h-4 w-px bg-current opacity-25" }),
1418
1525
  /* @__PURE__ */ e(
1419
1526
  "button",
1420
1527
  {
1421
1528
  type: "button",
1422
- onClick: () => P?.([]),
1529
+ onClick: () => O?.([]),
1423
1530
  "aria-label": "Selectie wissen",
1424
1531
  className: "grid size-tile-md shrink-0 cursor-pointer place-items-center rounded-md transition-colors duration-fast ease-out hover:bg-white/15 focus-visible:outline-none focus-visible:focus-ring",
1425
1532
  children: /* @__PURE__ */ e(Se, { className: "size-icon-lg" })
@@ -1428,7 +1535,7 @@ function hs({
1428
1535
  ] }) })
1429
1536
  ] });
1430
1537
  }
1431
- function xs({
1538
+ function ks({
1432
1539
  side: t,
1433
1540
  continued: r = !1,
1434
1541
  tone: n = "default",
@@ -1461,7 +1568,7 @@ function xs({
1461
1568
  }
1462
1569
  );
1463
1570
  }
1464
- function bs({ icon: t, label: r, unset: n, className: s }) {
1571
+ function Cs({ icon: t, label: r, unset: n, className: s }) {
1465
1572
  return /* @__PURE__ */ c(
1466
1573
  "span",
1467
1574
  {
@@ -1477,11 +1584,11 @@ function bs({ icon: t, label: r, unset: n, className: s }) {
1477
1584
  }
1478
1585
  );
1479
1586
  }
1480
- function gs() {
1587
+ function Ss() {
1481
1588
  return /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "shrink-0 text-text-disabled", children: "·" });
1482
1589
  }
1483
1590
  const me = ({ className: t }) => /* @__PURE__ */ e("span", { className: i("block rounded-xs bg-surface-hover", t) });
1484
- function Mr({
1591
+ function $r({
1485
1592
  shape: t,
1486
1593
  rows: r,
1487
1594
  columns: n
@@ -1541,7 +1648,6 @@ function Mr({
1541
1648
  ] }, a))
1542
1649
  }
1543
1650
  );
1544
- case "text":
1545
1651
  default:
1546
1652
  return /* @__PURE__ */ c("div", { className: "flex flex-col gap-6", children: [
1547
1653
  /* @__PURE__ */ e(me, { className: "h-6 w-1/4" }),
@@ -1549,7 +1655,7 @@ function Mr({
1549
1655
  ] });
1550
1656
  }
1551
1657
  }
1552
- const Tr = {
1658
+ const Ar = {
1553
1659
  text: 2,
1554
1660
  table: 8,
1555
1661
  list: 6,
@@ -1568,10 +1674,10 @@ function qe({
1568
1674
  tableColumns: u,
1569
1675
  tableRows: d
1570
1676
  }) {
1571
- const v = r ?? (o ? "table" : "text"), m = n ?? d ?? Tr[v], f = s ?? u ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: i("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e(Mr, { shape: v, rows: m, columns: f }) });
1677
+ const v = r ?? (o ? "table" : "text"), m = n ?? d ?? Ar[v], f = s ?? u ?? (v === "cards" ? 3 : 6), b = /* @__PURE__ */ e("div", { className: i("w-full animate-pulse", l), "aria-hidden": !0, children: a ?? /* @__PURE__ */ e($r, { shape: v, rows: m, columns: f }) });
1572
1678
  return t === "inline" ? b : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: b });
1573
1679
  }
1574
- const $r = ({
1680
+ const Dr = ({
1575
1681
  surface: t = !1,
1576
1682
  title: r,
1577
1683
  subtitle: n,
@@ -1595,8 +1701,8 @@ const $r = ({
1595
1701
  m && g(!0);
1596
1702
  }, z = () => {
1597
1703
  g(!1), w.trim() !== "" && w !== r && f ? f(w.trim()) : p(r);
1598
- }, P = (_) => {
1599
- _.key === "Enter" ? h.current?.blur() : _.key === "Escape" && (p(r), g(!1));
1704
+ }, O = ($) => {
1705
+ $.key === "Enter" ? h.current?.blur() : $.key === "Escape" && (p(r), g(!1));
1600
1706
  };
1601
1707
  return /* @__PURE__ */ c(
1602
1708
  "div",
@@ -1620,7 +1726,7 @@ const $r = ({
1620
1726
  {
1621
1727
  variant: "ghost",
1622
1728
  onClick: v,
1623
- leftIcon: /* @__PURE__ */ e(ee, { icon: ze, size: "md" }),
1729
+ leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "md" }),
1624
1730
  iconOnly: !0
1625
1731
  }
1626
1732
  ),
@@ -1631,9 +1737,9 @@ const $r = ({
1631
1737
  ref: h,
1632
1738
  type: "text",
1633
1739
  value: w,
1634
- onChange: (_) => p(_.target.value),
1740
+ onChange: ($) => p($.target.value),
1635
1741
  onBlur: z,
1636
- onKeyDown: P,
1742
+ onKeyDown: O,
1637
1743
  className: "text-1xl font-semibold bg-transparent border-b-1 border-border rounded-lg outline-none focus:border-none px-1 -mx-1 min-w-0 w-full"
1638
1744
  }
1639
1745
  ) : /* @__PURE__ */ c("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
@@ -1651,7 +1757,7 @@ const $r = ({
1651
1757
  ),
1652
1758
  n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
1653
1759
  m && /* @__PURE__ */ e(
1654
- Et,
1760
+ Mt,
1655
1761
  {
1656
1762
  size: 15,
1657
1763
  onClick: C,
@@ -1676,29 +1782,29 @@ const $r = ({
1676
1782
  ] })
1677
1783
  ] }) }),
1678
1784
  a.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap sm:flex-nowrap gap-2 sm:gap-3", children: a.map(
1679
- (_) => _.render ? /* @__PURE__ */ e(ae.Fragment, { children: _.render() }, _.id) : _.splitOptions && _.splitOptions.length > 0 ? /* @__PURE__ */ e(
1680
- rt,
1785
+ ($) => $.render ? /* @__PURE__ */ e(ae.Fragment, { children: $.render() }, $.id) : $.splitOptions && $.splitOptions.length > 0 ? /* @__PURE__ */ e(
1786
+ nt,
1681
1787
  {
1682
- label: _.label,
1683
- onClick: _.onClick,
1684
- icon: _.icon,
1685
- variant: _.variant === "primary" ? "primary" : "outline",
1686
- options: _.splitOptions,
1687
- disabled: _.disabled
1788
+ label: $.label,
1789
+ onClick: $.onClick,
1790
+ icon: $.icon,
1791
+ variant: $.variant === "primary" ? "primary" : "outline",
1792
+ options: $.splitOptions,
1793
+ disabled: $.disabled
1688
1794
  },
1689
- _.id
1795
+ $.id
1690
1796
  ) : /* @__PURE__ */ e(
1691
1797
  se,
1692
1798
  {
1693
- variant: _.variant ?? "secondary",
1694
- onClick: (K) => {
1695
- K.stopPropagation(), K.target.blur(), _.onClick();
1799
+ variant: $.variant ?? "secondary",
1800
+ onClick: (G) => {
1801
+ G.stopPropagation(), G.target.blur(), $.onClick();
1696
1802
  },
1697
- disabled: _.disabled,
1698
- leftIcon: _.icon,
1699
- children: _.label
1803
+ disabled: $.disabled,
1804
+ leftIcon: $.icon,
1805
+ children: $.label
1700
1806
  },
1701
- _.id
1807
+ $.id
1702
1808
  )
1703
1809
  ) })
1704
1810
  ] }),
@@ -1706,11 +1812,11 @@ const $r = ({
1706
1812
  ]
1707
1813
  }
1708
1814
  );
1709
- }, _r = {
1815
+ }, Lr = {
1710
1816
  none: "",
1711
1817
  sm: "px-3 pb-3 pt-1",
1712
1818
  md: "px-5 pb-5 pt-1.5"
1713
- }, ps = ({
1819
+ }, Es = ({
1714
1820
  title: t,
1715
1821
  subtitle: r,
1716
1822
  meta: n,
@@ -1743,7 +1849,7 @@ const $r = ({
1743
1849
  ),
1744
1850
  children: [
1745
1851
  /* @__PURE__ */ e(
1746
- $r,
1852
+ Dr,
1747
1853
  {
1748
1854
  surface: u,
1749
1855
  title: t,
@@ -1762,7 +1868,7 @@ const $r = ({
1762
1868
  {
1763
1869
  className: i(
1764
1870
  g && "min-h-0 flex-1 overflow-y-auto",
1765
- _r[b],
1871
+ Lr[b],
1766
1872
  p
1767
1873
  ),
1768
1874
  children: C
@@ -1777,7 +1883,7 @@ const $r = ({
1777
1883
  className: n
1778
1884
  }) => t.length === 0 ? null : /* @__PURE__ */ e("div", { className: i("flex flex-wrap items-center gap-2", n), children: t.map(
1779
1885
  (s) => s.render ? /* @__PURE__ */ e(ae.Fragment, { children: s.render() }, s.id) : s.splitOptions && s.splitOptions.length > 0 ? /* @__PURE__ */ e(
1780
- rt,
1886
+ nt,
1781
1887
  {
1782
1888
  label: s.label,
1783
1889
  onClick: s.onClick,
@@ -1800,32 +1906,32 @@ const $r = ({
1800
1906
  },
1801
1907
  s.id
1802
1908
  )
1803
- ) }), Dr = {
1909
+ ) }), Ir = {
1804
1910
  none: "p-0",
1805
1911
  sm: "p-2",
1806
1912
  md: "px-5 py-4",
1807
1913
  lg: "p-6"
1808
- }, vs = ({
1914
+ }, zs = ({
1809
1915
  actions: t = [],
1810
1916
  onBack: r,
1811
1917
  backLabel: n = "Back",
1812
1918
  className: s,
1813
1919
  padding: a = "md",
1814
1920
  children: l
1815
- }) => /* @__PURE__ */ c("div", { className: i("flex items-center gap-2", Dr[a], s), children: [
1921
+ }) => /* @__PURE__ */ c("div", { className: i("flex items-center gap-2", Ir[a], s), children: [
1816
1922
  r && /* @__PURE__ */ e(
1817
1923
  se,
1818
1924
  {
1819
1925
  variant: "secondary",
1820
1926
  onClick: r,
1821
1927
  "aria-label": n,
1822
- leftIcon: /* @__PURE__ */ e(ee, { icon: ze, size: "sm" }),
1928
+ leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "sm" }),
1823
1929
  iconOnly: !0
1824
1930
  }
1825
1931
  ),
1826
1932
  l && /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
1827
1933
  /* @__PURE__ */ e(ke, { actions: t, className: i(!l && "ml-auto") })
1828
- ] }), ys = ({
1934
+ ] }), Ms = ({
1829
1935
  label: t,
1830
1936
  meta: r,
1831
1937
  action: n,
@@ -1835,7 +1941,7 @@ const $r = ({
1835
1941
  r && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-right text-xs tabular-nums text-text-subtle", children: r }),
1836
1942
  n && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0", children: n })
1837
1943
  ] });
1838
- function Ns({
1944
+ function Ts({
1839
1945
  label: t,
1840
1946
  trailing: r,
1841
1947
  align: n = "center",
@@ -1849,11 +1955,11 @@ function Ns({
1849
1955
  r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
1850
1956
  ] });
1851
1957
  }
1852
- const at = et(null), ws = at.Provider;
1853
- function Ar() {
1854
- return vt(at);
1958
+ const ot = et(null), _s = ot.Provider;
1959
+ function Or() {
1960
+ return Nt(ot);
1855
1961
  }
1856
- function ks() {
1962
+ function $s() {
1857
1963
  const [t, r] = R(null), n = pe(
1858
1964
  () => ({
1859
1965
  setTrail: (s, a) => r((l) => a ? { ownerId: s, entry: a } : l && l.ownerId !== s ? l : null)
@@ -1862,13 +1968,13 @@ function ks() {
1862
1968
  );
1863
1969
  return { trail: t?.entry ?? null, api: n };
1864
1970
  }
1865
- const Lr = {
1971
+ const Pr = {
1866
1972
  none: "",
1867
1973
  sm: "px-3 py-3",
1868
1974
  // Matches the frame header's own horizontal padding, so content lines up
1869
1975
  // with the title above it.
1870
1976
  md: "px-5 py-4"
1871
- }, Cs = ({
1977
+ }, As = ({
1872
1978
  children: t,
1873
1979
  actions: r = [],
1874
1980
  secondaryActions: n = [],
@@ -1882,37 +1988,39 @@ const Lr = {
1882
1988
  className: m,
1883
1989
  contentClassName: f
1884
1990
  }) => {
1885
- const b = Ar(), g = pt(), w = ne(a);
1991
+ const b = Or(), g = yt(), w = ne(a);
1886
1992
  w.current = a;
1887
1993
  const p = !!a, h = ne(r);
1888
1994
  h.current = r;
1889
1995
  const C = ne(n);
1890
1996
  C.current = n;
1891
- const z = s === "header", P = z && (r.length > 0 || n.length > 0), _ = P ? JSON.stringify(
1997
+ const z = s === "header", O = z && (r.length > 0 || n.length > 0);
1998
+ O && JSON.stringify(
1892
1999
  [...n, ...r].map((j) => [j.id, j.label, j.variant, j.disabled])
1893
- ) : "", K = pe(() => {
1894
- if (!P) return;
1895
- const j = (B) => (W, Z) => ({
1896
- ...W,
2000
+ );
2001
+ const $ = pe(() => {
2002
+ if (!O) return;
2003
+ const j = (W) => (B, U) => ({
2004
+ ...B,
1897
2005
  onClick: () => {
1898
- (B === "primary" ? h.current : C.current)[Z]?.onClick();
2006
+ (W === "primary" ? h.current : C.current)[U]?.onClick();
1899
2007
  }
1900
2008
  });
1901
2009
  return {
1902
2010
  actions: h.current.map(j("primary")),
1903
2011
  secondaryActions: C.current.map(j("secondary"))
1904
2012
  };
1905
- }, [P, _]);
2013
+ }, [O]);
1906
2014
  X(() => {
1907
- if (b && !(!p && !o && !K))
2015
+ if (b && !(!p && !o && !$))
1908
2016
  return b.setTrail(g, {
1909
2017
  title: o,
1910
2018
  onBack: p ? () => w.current?.() : void 0,
1911
- actions: K?.actions,
1912
- secondaryActions: K?.secondaryActions
2019
+ actions: $?.actions,
2020
+ secondaryActions: $?.secondaryActions
1913
2021
  }), () => b.setTrail(g, null);
1914
- }, [b, g, o, p, K]);
1915
- const U = !z && (r.length > 0 || n.length > 0);
2022
+ }, [b, g, o, p, $]);
2023
+ const G = !z && (r.length > 0 || n.length > 0);
1916
2024
  return (
1917
2025
  /**
1918
2026
  * `min-h-full` + a sticky footer, rather than a nested scroll container.
@@ -1921,14 +2029,14 @@ const Lr = {
1921
2029
  * its footer to the bottom, and a long one keeps it pinned while scrolling.
1922
2030
  */
1923
2031
  /* @__PURE__ */ c("div", { className: i("flex min-h-full flex-col", m), children: [
1924
- !b && (p || o || P) && /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
2032
+ !b && (p || o || O) && /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center gap-2 px-5 pt-4", children: [
1925
2033
  p && /* @__PURE__ */ e(
1926
2034
  se,
1927
2035
  {
1928
2036
  variant: "ghost",
1929
2037
  onClick: () => w.current?.(),
1930
2038
  "aria-label": l,
1931
- leftIcon: /* @__PURE__ */ e(ee, { icon: ze, size: "sm" }),
2039
+ leftIcon: /* @__PURE__ */ e(J, { icon: Ee, size: "sm" }),
1932
2040
  iconOnly: !0
1933
2041
  }
1934
2042
  ),
@@ -1938,15 +2046,15 @@ const Lr = {
1938
2046
  r.length > 0 && /* @__PURE__ */ e(ke, { actions: r })
1939
2047
  ] })
1940
2048
  ] }),
1941
- /* @__PURE__ */ e("div", { className: i("flex-1", Lr[v], f), children: u ? /* @__PURE__ */ e(qe, { variant: "inline", shape: d }) : t }),
1942
- U && /* @__PURE__ */ c("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: [
2049
+ /* @__PURE__ */ e("div", { className: i("flex-1", Pr[v], f), children: u ? /* @__PURE__ */ e(qe, { variant: "inline", shape: d }) : t }),
2050
+ G && /* @__PURE__ */ c("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: [
1943
2051
  n.length > 0 && /* @__PURE__ */ e(ke, { actions: n, defaultVariant: "ghost" }),
1944
2052
  r.length > 0 && /* @__PURE__ */ e(ke, { actions: r, className: "ml-auto" })
1945
2053
  ] })
1946
2054
  ] })
1947
2055
  );
1948
2056
  };
1949
- function Ss({
2057
+ function Ds({
1950
2058
  label: t,
1951
2059
  description: r,
1952
2060
  control: n,
@@ -1973,7 +2081,7 @@ function Ss({
1973
2081
  }
1974
2082
  );
1975
2083
  }
1976
- function Es({
2084
+ function Ls({
1977
2085
  icon: t,
1978
2086
  title: r,
1979
2087
  description: n,
@@ -1983,7 +2091,7 @@ function Es({
1983
2091
  }) {
1984
2092
  return /* @__PURE__ */ c("section", { className: i("flex flex-col gap-2", l), children: [
1985
2093
  /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
1986
- t && /* @__PURE__ */ e(ee, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
2094
+ t && /* @__PURE__ */ e(J, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
1987
2095
  /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
1988
2096
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-text", children: r }),
1989
2097
  n && /* @__PURE__ */ e("p", { className: "text-xs text-text-muted", children: n })
@@ -1993,7 +2101,7 @@ function Es({
1993
2101
  /* @__PURE__ */ e("div", { className: i("flex flex-col", t && "pl-6"), children: a })
1994
2102
  ] });
1995
2103
  }
1996
- function zs({ label: t, dotColor: r, onClick: n, className: s }) {
2104
+ function Is({ label: t, dotColor: r, onClick: n, className: s }) {
1997
2105
  return /* @__PURE__ */ c(
1998
2106
  "button",
1999
2107
  {
@@ -2013,12 +2121,12 @@ function zs({ label: t, dotColor: r, onClick: n, className: s }) {
2013
2121
  }
2014
2122
  ),
2015
2123
  /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t }),
2016
- /* @__PURE__ */ e(ee, { icon: zt, size: "xs", className: "opacity-70" })
2124
+ /* @__PURE__ */ e(J, { icon: tt, size: "xs", className: "opacity-70" })
2017
2125
  ]
2018
2126
  }
2019
2127
  );
2020
2128
  }
2021
- const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current" }), Pr = () => /* @__PURE__ */ e(ee, { icon: ze, size: "md", color: "current" }), Or = () => /* @__PURE__ */ e(ee, { icon: Ie, size: "md", color: "current" }), Be = ve(
2129
+ const jr = () => /* @__PURE__ */ e(J, { icon: Tt, size: "md", color: "current" }), Fr = () => /* @__PURE__ */ e(J, { icon: Ee, size: "md", color: "current" }), Rr = () => /* @__PURE__ */ e(J, { icon: Ie, size: "md", color: "current" }), Be = ve(
2022
2130
  ({
2023
2131
  value: t,
2024
2132
  onChange: r,
@@ -2032,7 +2140,7 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2032
2140
  format: v = "MM/dd/yyyy",
2033
2141
  withTime: m = !1
2034
2142
  }, f) => {
2035
- const [b, g] = R(!1), [w, p] = R(() => t || /* @__PURE__ */ new Date()), h = ne(null), C = ne(null), z = Pe(b, C);
2143
+ const [b, g] = R(!1), [w, p] = R(() => t || /* @__PURE__ */ new Date()), h = ne(null), C = ne(null), z = Oe(b, C);
2036
2144
  X(() => {
2037
2145
  const y = (x) => {
2038
2146
  h.current && !h.current.contains(x.target) && g(!1);
@@ -2041,23 +2149,23 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2041
2149
  document.removeEventListener("mousedown", y);
2042
2150
  };
2043
2151
  }, [b]);
2044
- const P = (y) => {
2152
+ const O = (y) => {
2045
2153
  if (!y) return "";
2046
- const x = y.getDate().toString().padStart(2, "0"), S = (y.getMonth() + 1).toString().padStart(2, "0"), D = y.getFullYear(), E = v === "dd/MM/yyyy" ? `${x}/${S}/${D}` : v === "yyyy-MM-dd" ? `${D}-${S}-${x}` : `${S}/${x}/${D}`;
2047
- return m ? `${E} ${_(y)}` : E;
2048
- }, _ = (y) => `${y.getHours().toString().padStart(2, "0")}:${y.getMinutes().toString().padStart(2, "0")}`, K = (y) => {
2154
+ const x = y.getDate().toString().padStart(2, "0"), S = (y.getMonth() + 1).toString().padStart(2, "0"), A = y.getFullYear(), E = v === "dd/MM/yyyy" ? `${x}/${S}/${A}` : v === "yyyy-MM-dd" ? `${A}-${S}-${x}` : `${S}/${x}/${A}`;
2155
+ return m ? `${E} ${$(y)}` : E;
2156
+ }, $ = (y) => `${y.getHours().toString().padStart(2, "0")}:${y.getMinutes().toString().padStart(2, "0")}`, G = (y) => {
2049
2157
  const [x, S] = y.split(":").map(Number);
2050
2158
  if (Number.isNaN(x) || Number.isNaN(S)) return;
2051
- const D = t ? new Date(t) : /* @__PURE__ */ new Date();
2052
- D.setHours(x, S, 0, 0), r?.(D);
2053
- }, U = () => {
2054
- const y = w.getFullYear(), x = w.getMonth(), S = new Date(y, x, 1), D = new Date(S);
2055
- D.setDate(D.getDate() - S.getDay());
2056
- const E = [], A = new Date(D);
2057
- for (let $ = 0; $ < 42; $++)
2058
- E.push(new Date(A)), A.setDate(A.getDate() + 1);
2159
+ const A = t ? new Date(t) : /* @__PURE__ */ new Date();
2160
+ A.setHours(x, S, 0, 0), r?.(A);
2161
+ }, j = () => {
2162
+ const y = w.getFullYear(), x = w.getMonth(), S = new Date(y, x, 1), A = new Date(S);
2163
+ A.setDate(A.getDate() - S.getDay());
2164
+ const E = [], D = new Date(A);
2165
+ for (let T = 0; T < 42; T++)
2166
+ E.push(new Date(D)), D.setDate(D.getDate() + 1);
2059
2167
  return E;
2060
- }, j = (y) => {
2168
+ }, W = (y) => {
2061
2169
  if (y.getMonth() === w.getMonth() && !(u && y < u) && !(d && y > d)) {
2062
2170
  if (m) {
2063
2171
  const S = new Date(y);
@@ -2068,11 +2176,11 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2068
2176
  }
2069
2177
  }, B = () => {
2070
2178
  p(new Date(w.getFullYear(), w.getMonth() - 1, 1));
2071
- }, W = () => {
2179
+ }, U = () => {
2072
2180
  p(new Date(w.getFullYear(), w.getMonth() + 1, 1));
2073
- }, Z = () => {
2181
+ }, ee = () => {
2074
2182
  r?.(null), g(!1);
2075
- }, J = i(
2183
+ }, Z = i(
2076
2184
  "w-full border border-border-strong rounded-tile transition-colors duration-fast",
2077
2185
  "bg-surface text-text",
2078
2186
  "placeholder:text-text-muted",
@@ -2085,7 +2193,7 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2085
2193
  "h-control-md w-full px-3 text-base": l === "full"
2086
2194
  },
2087
2195
  o
2088
- ), de = U(), Y = [
2196
+ ), de = j(), Y = [
2089
2197
  "January",
2090
2198
  "February",
2091
2199
  "March",
@@ -2106,13 +2214,13 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2106
2214
  {
2107
2215
  ref: f,
2108
2216
  type: "text",
2109
- value: P(t ?? null),
2217
+ value: O(t ?? null),
2110
2218
  placeholder: n,
2111
2219
  disabled: s,
2112
2220
  required: a,
2113
2221
  readOnly: !0,
2114
2222
  onClick: () => !s && g(!b),
2115
- className: i(J, "pr-10 cursor-pointer")
2223
+ className: i(Z, "pr-10 cursor-pointer")
2116
2224
  }
2117
2225
  ),
2118
2226
  /* @__PURE__ */ e(
@@ -2122,7 +2230,7 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2122
2230
  onClick: () => !s && g(!b),
2123
2231
  disabled: s,
2124
2232
  className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted hover:text-text-muted",
2125
- children: /* @__PURE__ */ e(Ir, {})
2233
+ children: /* @__PURE__ */ e(jr, {})
2126
2234
  }
2127
2235
  )
2128
2236
  ] }),
@@ -2133,27 +2241,27 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2133
2241
  className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel",
2134
2242
  children: [
2135
2243
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between mb-4", children: [
2136
- /* @__PURE__ */ e("button", { onClick: B, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(Pr, {}) }),
2244
+ /* @__PURE__ */ e("button", { onClick: B, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(Fr, {}) }),
2137
2245
  /* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
2138
2246
  Y[w.getMonth()],
2139
2247
  " ",
2140
2248
  w.getFullYear()
2141
2249
  ] }),
2142
- /* @__PURE__ */ e("button", { onClick: W, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(Or, {}) })
2250
+ /* @__PURE__ */ e("button", { onClick: U, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(Rr, {}) })
2143
2251
  ] }),
2144
2252
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((y) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: y }, y)) }),
2145
2253
  /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: de.map((y, x) => {
2146
- const S = y.getMonth() === w.getMonth(), D = t && y.toDateString() === t.toDateString(), E = y.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), A = !S || u && y < u || d && y > d;
2254
+ const S = y.getMonth() === w.getMonth(), A = t && y.toDateString() === t.toDateString(), E = y.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), D = !S || u && y < u || d && y > d;
2147
2255
  return /* @__PURE__ */ e(
2148
2256
  "button",
2149
2257
  {
2150
- onClick: () => !A && j(y),
2151
- disabled: A,
2258
+ onClick: () => !D && W(y),
2259
+ disabled: D,
2152
2260
  className: i("w-8 h-8 text-sm rounded transition-colors duration-fast", {
2153
- "text-text hover:bg-surface-hover": S && !D && !A,
2154
- "bg-accent text-accent-fg": D,
2155
- "bg-surface-hover text-text": E && !D,
2156
- "text-text-muted cursor-not-allowed": A
2261
+ "text-text hover:bg-surface-hover": S && !A && !D,
2262
+ "bg-accent text-accent-fg": A,
2263
+ "bg-surface-hover text-text": E && !A,
2264
+ "text-text-muted cursor-not-allowed": D
2157
2265
  }),
2158
2266
  children: y.getDate()
2159
2267
  },
@@ -2167,14 +2275,14 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2167
2275
  {
2168
2276
  id: "datepicker-time",
2169
2277
  type: "time",
2170
- value: t ? _(t) : "",
2171
- onChange: (y) => K(y.target.value),
2278
+ value: t ? $(t) : "",
2279
+ onChange: (y) => G(y.target.value),
2172
2280
  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"
2173
2281
  }
2174
2282
  )
2175
2283
  ] }),
2176
2284
  /* @__PURE__ */ c("div", { className: "flex justify-between items-center mt-4 pt-3 border-t border-border", children: [
2177
- /* @__PURE__ */ e("button", { onClick: Z, className: "text-sm text-text-muted hover:text-text", children: "Clear" }),
2285
+ /* @__PURE__ */ e("button", { onClick: ee, className: "text-sm text-text-muted hover:text-text", children: "Clear" }),
2178
2286
  /* @__PURE__ */ e(
2179
2287
  "button",
2180
2288
  {
@@ -2189,7 +2297,7 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2189
2297
  )
2190
2298
  ] });
2191
2299
  }
2192
- ), lt = ve(
2300
+ ), ct = ve(
2193
2301
  ({
2194
2302
  value: t,
2195
2303
  onValueChange: r,
@@ -2214,7 +2322,7 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2214
2322
  l
2215
2323
  ),
2216
2324
  children: [
2217
- /* @__PURE__ */ e(ee, { icon: Le, size: "md", color: "current", className: "shrink-0" }),
2325
+ /* @__PURE__ */ e(J, { icon: Le, size: "md", color: "current", className: "shrink-0" }),
2218
2326
  /* @__PURE__ */ e(
2219
2327
  "input",
2220
2328
  {
@@ -2246,15 +2354,15 @@ const Ir = () => /* @__PURE__ */ e(ee, { icon: Mt, size: "md", color: "current"
2246
2354
  "aria-label": a,
2247
2355
  onClick: () => r(""),
2248
2356
  className: "grid size-4 shrink-0 cursor-pointer place-items-center rounded-xs text-text-subtle transition-colors duration-fast ease-out hover:text-text focus-visible:outline-none focus-visible:focus-ring",
2249
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "sm", color: "current" })
2357
+ children: /* @__PURE__ */ e(J, { icon: Se, size: "sm", color: "current" })
2250
2358
  }
2251
2359
  ) : n && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: n })
2252
2360
  ]
2253
2361
  }
2254
2362
  )
2255
2363
  );
2256
- lt.displayName = "SearchField";
2257
- const jr = ({
2364
+ ct.displayName = "SearchField";
2365
+ const Br = ({
2258
2366
  trigger: t,
2259
2367
  options: r,
2260
2368
  value: n,
@@ -2265,32 +2373,32 @@ const jr = ({
2265
2373
  showCheck: u = !0,
2266
2374
  header: d
2267
2375
  }) => {
2268
- const [v, m] = R(!1), [f, b] = R(null), [g, w] = R({ top: 0, left: 0 }), p = ne(null), h = ne(null), C = ne(null), z = ne(null), P = Pe(v, h, { placement: a }), _ = ne(null), K = () => Array.from(
2376
+ const [v, m] = R(!1), [f, b] = R(null), [g, w] = R({ top: 0, left: 0 }), p = ne(null), h = ne(null), C = ne(null), z = ne(null), O = Oe(v, h, { placement: a }), $ = ne(null), G = () => Array.from(
2269
2377
  z.current?.querySelectorAll(
2270
2378
  "button[data-option-value]:not(:disabled)"
2271
2379
  ) ?? []
2272
2380
  );
2273
2381
  X(() => {
2274
- v && K()[0]?.focus();
2275
- }, [v]);
2276
- const U = (y) => {
2382
+ v && G()[0]?.focus();
2383
+ }, [v, G]);
2384
+ const j = (y) => {
2277
2385
  if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(y.key)) return;
2278
- const S = K();
2386
+ const S = G();
2279
2387
  if (S.length === 0) return;
2280
2388
  y.preventDefault();
2281
- const D = S.indexOf(document.activeElement), E = y.key === "Home" ? 0 : y.key === "End" ? S.length - 1 : y.key === "ArrowDown" ? (D + 1) % S.length : (D - 1 + S.length) % S.length;
2389
+ const A = S.indexOf(document.activeElement), E = y.key === "Home" ? 0 : y.key === "End" ? S.length - 1 : y.key === "ArrowDown" ? (A + 1) % S.length : (A - 1 + S.length) % S.length;
2282
2390
  S[E]?.focus();
2283
2391
  };
2284
2392
  X(() => {
2285
2393
  const y = (x) => {
2286
- p.current && (!p.current.contains(x.target) || C.current && !C.current.contains(x.target)) && (m(!1), b(null), _.current && (clearTimeout(_.current), _.current = null));
2394
+ p.current && (!p.current.contains(x.target) || C.current && !C.current.contains(x.target)) && (m(!1), b(null), $.current && (clearTimeout($.current), $.current = null));
2287
2395
  };
2288
2396
  return v && document.addEventListener("mousedown", y), () => {
2289
2397
  document.removeEventListener("mousedown", y);
2290
2398
  };
2291
2399
  }, [v]), X(() => {
2292
2400
  const y = (x) => {
2293
- x.key === "Escape" && (m(!1), b(null), h.current?.focus(), _.current && (clearTimeout(_.current), _.current = null));
2401
+ x.key === "Escape" && (m(!1), b(null), h.current?.focus(), $.current && (clearTimeout($.current), $.current = null));
2294
2402
  };
2295
2403
  return v && document.addEventListener("keydown", y), () => {
2296
2404
  document.removeEventListener("keydown", y);
@@ -2309,19 +2417,19 @@ const jr = ({
2309
2417
  }
2310
2418
  }
2311
2419
  }, [f]), X(() => () => {
2312
- _.current && clearTimeout(_.current);
2420
+ $.current && clearTimeout($.current);
2313
2421
  }, []);
2314
- const j = (y) => {
2315
- y.stopPropagation(), !l && (m(!v), b(null), _.current && (clearTimeout(_.current), _.current = null));
2422
+ const W = (y) => {
2423
+ y.stopPropagation(), !l && (m(!v), b(null), $.current && (clearTimeout($.current), $.current = null));
2316
2424
  }, B = (y, x, S) => {
2317
2425
  y.stopPropagation(), !x.disabled && !x.divider && (!x.children || x.children.length === 0) && (s?.(x.value, S), m(!1), b(null));
2318
- }, W = (y) => {
2319
- _.current && (clearTimeout(_.current), _.current = null), y.children && y.children.length > 0 ? b(y.value) : b(null);
2320
- }, Z = (y) => {
2321
- y.children && y.children.length > 0 ? _.current = setTimeout(() => {
2426
+ }, U = (y) => {
2427
+ $.current && (clearTimeout($.current), $.current = null), y.children && y.children.length > 0 ? b(y.value) : b(null);
2428
+ }, ee = (y) => {
2429
+ y.children && y.children.length > 0 ? $.current = setTimeout(() => {
2322
2430
  b(null);
2323
2431
  }, 150) : b(null);
2324
- }, J = (y, x, S) => {
2432
+ }, Z = (y, x, S) => {
2325
2433
  y.stopPropagation(), !x.disabled && !x.divider && (s?.(x.value, S), m(!1), b(null));
2326
2434
  }, de = i(
2327
2435
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
@@ -2343,7 +2451,7 @@ const jr = ({
2343
2451
  "button",
2344
2452
  {
2345
2453
  ref: h,
2346
- onClick: j,
2454
+ onClick: W,
2347
2455
  disabled: l,
2348
2456
  "aria-haspopup": "menu",
2349
2457
  "aria-expanded": v,
@@ -2358,14 +2466,14 @@ const jr = ({
2358
2466
  {
2359
2467
  ref: z,
2360
2468
  className: de,
2361
- style: P,
2362
- onKeyDown: U,
2469
+ style: O,
2470
+ onKeyDown: j,
2363
2471
  children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
2364
2472
  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),
2365
2473
  r.map((y, x) => {
2366
2474
  if (y.divider)
2367
2475
  return /* @__PURE__ */ e("div", { className: "border-t border-border my-2" }, `divider-${x}`);
2368
- const S = y.children && y.children.length > 0, D = f === y.value;
2476
+ const S = y.children && y.children.length > 0, A = f === y.value;
2369
2477
  return /* @__PURE__ */ c("div", { className: "relative group", children: [
2370
2478
  /* @__PURE__ */ c(
2371
2479
  "button",
@@ -2374,14 +2482,14 @@ const jr = ({
2374
2482
  role: "menuitem",
2375
2483
  "aria-haspopup": S ? "menu" : void 0,
2376
2484
  onClick: (E) => B(E, y),
2377
- onMouseEnter: () => W(y),
2378
- onMouseLeave: () => Z(y),
2485
+ onMouseEnter: () => U(y),
2486
+ onMouseLeave: () => ee(y),
2379
2487
  disabled: y.disabled,
2380
2488
  className: i(
2381
2489
  "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",
2382
2490
  {
2383
2491
  "opacity-50 cursor-not-allowed": y.disabled,
2384
- "bg-surface-hover": D && S
2492
+ "bg-surface-hover": A && S
2385
2493
  }
2386
2494
  ),
2387
2495
  children: [
@@ -2399,7 +2507,7 @@ const jr = ({
2399
2507
  ]
2400
2508
  }
2401
2509
  ),
2402
- S && D && /* @__PURE__ */ e(
2510
+ S && A && /* @__PURE__ */ e(
2403
2511
  "div",
2404
2512
  {
2405
2513
  ref: C,
@@ -2409,27 +2517,27 @@ const jr = ({
2409
2517
  left: `${g.left}px`
2410
2518
  },
2411
2519
  onMouseEnter: () => {
2412
- _.current && (clearTimeout(_.current), _.current = null), b(y.value);
2520
+ $.current && (clearTimeout($.current), $.current = null), b(y.value);
2413
2521
  },
2414
2522
  onMouseLeave: () => {
2415
- _.current = setTimeout(() => {
2523
+ $.current = setTimeout(() => {
2416
2524
  b(null);
2417
2525
  }, 150);
2418
2526
  },
2419
- children: /* @__PURE__ */ e("div", { className: "p-2", children: y.children.map((E, A) => {
2527
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: y.children?.map((E, D) => {
2420
2528
  if (E.divider)
2421
2529
  return /* @__PURE__ */ e(
2422
2530
  "div",
2423
2531
  {
2424
2532
  className: "border-t border-border my-2"
2425
2533
  },
2426
- `divider-${A}`
2534
+ `divider-${D}`
2427
2535
  );
2428
- const $ = typeof n == "object" && n[y.value] && n[y.value].includes(E.value) || n === E.value;
2536
+ const T = typeof n == "object" && n[y.value] && n[y.value].includes(E.value) || n === E.value;
2429
2537
  return /* @__PURE__ */ c(
2430
2538
  "button",
2431
2539
  {
2432
- onClick: (oe) => J(oe, E, y.value),
2540
+ onClick: (oe) => Z(oe, E, y.value),
2433
2541
  disabled: E.disabled,
2434
2542
  className: i(
2435
2543
  "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",
@@ -2445,7 +2553,7 @@ const jr = ({
2445
2553
  E.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: E.description })
2446
2554
  ] })
2447
2555
  ] }),
2448
- u && $ && /* @__PURE__ */ e(
2556
+ u && T && /* @__PURE__ */ e(
2449
2557
  Ue,
2450
2558
  {
2451
2559
  className: "size-icon-md shrink-0 text-success-fg",
@@ -2464,8 +2572,8 @@ const jr = ({
2464
2572
  (() => {
2465
2573
  const y = r.reduce((x, S) => {
2466
2574
  if (S.divider) return x;
2467
- const D = S.children ? S.children.filter((E) => !E.divider).length : 0;
2468
- return x + 1 + D;
2575
+ const A = S.children ? S.children.filter((E) => !E.divider).length : 0;
2576
+ return x + 1 + A;
2469
2577
  }, 0);
2470
2578
  return y > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ c("div", { className: "text-xs text-text-muted px-3 py-1", children: [
2471
2579
  y,
@@ -2478,24 +2586,24 @@ const jr = ({
2478
2586
  ]
2479
2587
  }
2480
2588
  );
2481
- }, Ms = (t) => (r) => t(r instanceof Date ? r : null), Ts = (t) => (r) => t(typeof r == "string" ? r : ""), $s = (t) => (r) => t(Array.isArray(r) ? r : typeof r == "string" && r ? [r] : []), Fr = {
2589
+ }, Os = (t) => (r) => t(r instanceof Date ? r : null), Ps = (t) => (r) => t(typeof r == "string" ? r : ""), js = (t) => (r) => t(Array.isArray(r) ? r : typeof r == "string" && r ? [r] : []), Hr = {
2482
2590
  none: "px-0",
2483
2591
  sm: "px-2",
2484
2592
  md: "px-3.5",
2485
2593
  lg: "px-5"
2486
- }, Rr = {
2594
+ }, qr = {
2487
2595
  sm: "h-row-lg",
2488
2596
  md: "h-row-xl",
2489
2597
  lg: "h-14"
2490
- }, Br = 8, Je = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
2491
- function Hr(t, r) {
2598
+ }, Vr = 8, Je = ["62%", "44%", "74%", "52%", "68%", "48%", "80%", "56%"];
2599
+ function Ur(t, r) {
2492
2600
  if (r <= 7) return Array.from({ length: r }, (l, o) => o);
2493
2601
  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 = [];
2494
2602
  return s.forEach((l, o) => {
2495
2603
  o > 0 && l - s[o - 1] > 1 && a.push("gap"), a.push(l);
2496
2604
  }), a;
2497
2605
  }
2498
- const qr = (t) => {
2606
+ const Wr = (t) => {
2499
2607
  const r = Array.isArray(t.value) ? t.value : t.value != null && t.value !== "" && t.value !== "all" ? [t.value] : [];
2500
2608
  if (t.type === "date") {
2501
2609
  const o = t.value instanceof Date;
@@ -2517,7 +2625,7 @@ const qr = (t) => {
2517
2625
  );
2518
2626
  }, l = r.length > 0;
2519
2627
  return /* @__PURE__ */ e(
2520
- Qt,
2628
+ tr,
2521
2629
  {
2522
2630
  tone: "outline",
2523
2631
  caret: !0,
@@ -2567,80 +2675,80 @@ const qr = (t) => {
2567
2675
  selectable: h = !1,
2568
2676
  selectedRows: C = [],
2569
2677
  onSelectionChange: z,
2570
- getRowKey: P = (de, Y) => Y,
2571
- emptyContent: _,
2572
- footerSummary: K,
2573
- size: U = "md",
2574
- hoverable: j = !0,
2678
+ getRowKey: O = (de, Y) => Y,
2679
+ emptyContent: $,
2680
+ footerSummary: G,
2681
+ size: j = "md",
2682
+ hoverable: W = !0,
2575
2683
  padding: B = "md",
2576
- className: W,
2577
- rowClassName: Z,
2578
- headerBackground: J = !0
2684
+ className: U,
2685
+ rowClassName: ee,
2686
+ headerBackground: Z = !0
2579
2687
  }) => {
2580
- const [de, Y] = R(""), y = l !== void 0, x = y ? l : de, S = o ?? Y, [D, E] = R({
2688
+ const [de, Y] = R(""), y = l !== void 0, x = y ? l : de, S = o ?? Y, [A, E] = R({
2581
2689
  column: null,
2582
2690
  direction: null
2583
- }), [A, $] = R({
2691
+ }), [D, T] = R({
2584
2692
  page: 0,
2585
2693
  pageSize: g
2586
2694
  }), oe = ne(null), ce = pe(() => {
2587
- let T = t;
2695
+ let _ = t;
2588
2696
  if (s && !y && x.trim()) {
2589
2697
  const V = r.filter((ie) => ie.searchable !== !1), re = x.toLowerCase();
2590
- T = T.filter((ie) => V.some((Q) => {
2698
+ _ = _.filter((ie) => V.some((Q) => {
2591
2699
  const F = typeof Q.accessor == "function" ? Q.accessor(ie) : ie[Q.accessor];
2592
2700
  return String(F || "").toLowerCase().includes(re);
2593
2701
  }));
2594
2702
  }
2595
- return T;
2703
+ return _;
2596
2704
  }, [t, x, y, r, s]), q = pe(() => {
2597
- if (!D.column || !D.direction) return ce;
2598
- const T = r.find((V) => V.id === D.column);
2599
- return T ? [...ce].sort((V, re) => {
2600
- const ie = typeof T.accessor == "function" ? T.accessor(V) : V[T.accessor], Q = typeof T.accessor == "function" ? T.accessor(re) : re[T.accessor];
2705
+ if (!A.column || !A.direction) return ce;
2706
+ const _ = r.find((V) => V.id === A.column);
2707
+ return _ ? [...ce].sort((V, re) => {
2708
+ const ie = typeof _.accessor == "function" ? _.accessor(V) : V[_.accessor], Q = typeof _.accessor == "function" ? _.accessor(re) : re[_.accessor];
2601
2709
  let F = 0;
2602
- return ie < Q ? F = -1 : ie > Q && (F = 1), D.direction === "desc" ? -F : F;
2710
+ return ie < Q ? F = -1 : ie > Q && (F = 1), A.direction === "desc" ? -F : F;
2603
2711
  }) : ce;
2604
- }, [ce, D, r]), H = pe(() => {
2712
+ }, [ce, A, r]), H = pe(() => {
2605
2713
  if (!b || m) return q;
2606
- const T = A.page * A.pageSize, V = T + A.pageSize;
2607
- return q.slice(T, V);
2608
- }, [q, A, b, m]), L = xe(
2609
- (T) => {
2610
- r.find((re) => re.id === T)?.sortable && E((re) => re.column !== T ? { column: T, direction: "asc" } : re.direction === "asc" ? { column: T, direction: "desc" } : { column: null, direction: null });
2714
+ const _ = D.page * D.pageSize, V = _ + D.pageSize;
2715
+ return q.slice(_, V);
2716
+ }, [q, D, b, m]), L = fe(
2717
+ (_) => {
2718
+ r.find((re) => re.id === _)?.sortable && E((re) => re.column !== _ ? { column: _, direction: "asc" } : re.direction === "asc" ? { column: _, direction: "desc" } : { column: null, direction: null });
2611
2719
  },
2612
2720
  [r]
2613
- ), k = xe((T) => {
2614
- $((V) => ({ ...V, page: T }));
2615
- }, []), M = xe(
2616
- (T, V) => {
2721
+ ), k = fe((_) => {
2722
+ T((V) => ({ ...V, page: _ }));
2723
+ }, []), M = fe(
2724
+ (_, V) => {
2617
2725
  if (!z) return;
2618
- const re = P(T, 0);
2619
- z(V ? [...C, T] : C.filter((ie, Q) => P(C[Q], Q) !== re));
2726
+ const re = O(_, 0);
2727
+ z(V ? [...C, _] : C.filter((ie, Q) => O(C[Q], Q) !== re));
2620
2728
  },
2621
- [C, z, P]
2622
- ), G = xe(
2623
- (T) => {
2624
- z && z(T ? [...H] : []);
2729
+ [C, z, O]
2730
+ ), K = fe(
2731
+ (_) => {
2732
+ z && z(_ ? [...H] : []);
2625
2733
  },
2626
2734
  [H, z]
2627
2735
  );
2628
2736
  X(() => {
2629
- $((T) => ({ ...T, page: 0 }));
2630
- }, [x, D]), X(() => {
2631
- $((T) => ({ ...T, page: 0 }));
2632
- }, [u.map((T) => T.value).join(",")]);
2633
- const O = q.length, N = Math.ceil(O / A.pageSize), I = A.page * A.pageSize + 1, te = Math.min(I + A.pageSize - 1, O), le = H.length > 0 && H.every((T) => {
2634
- const V = P(T, 0);
2635
- return C.some((re, ie) => P(re, ie) === V);
2636
- }), be = H.some((T) => {
2637
- const V = P(T, 0);
2638
- return C.some((re, ie) => P(re, ie) === V);
2639
- }), ye = Fr[B], fe = J ? "bg-surface-sunk" : "bg-surface", he = i("text-text", ye), Oe = s || u.length > 0 || d.length > 0 || !!v, ft = pe(() => {
2640
- const T = H.map((Q, F) => ({ row: Q, index: F }));
2641
- if (!m) return [{ group: null, rows: T }];
2737
+ T((_) => ({ ..._, page: 0 }));
2738
+ }, []), X(() => {
2739
+ T((_) => ({ ..._, page: 0 }));
2740
+ }, []);
2741
+ const P = q.length, N = Math.ceil(P / D.pageSize), I = D.page * D.pageSize + 1, te = Math.min(I + D.pageSize - 1, P), le = H.length > 0 && H.every((_) => {
2742
+ const V = O(_, 0);
2743
+ return C.some((re, ie) => O(re, ie) === V);
2744
+ }), be = H.some((_) => {
2745
+ const V = O(_, 0);
2746
+ return C.some((re, ie) => O(re, ie) === V);
2747
+ }), ye = Hr[B], he = Z ? "bg-surface-sunk" : "bg-surface", xe = i("text-text", ye), Pe = s || u.length > 0 || d.length > 0 || !!v, xt = pe(() => {
2748
+ const _ = H.map((Q, F) => ({ row: Q, index: F }));
2749
+ if (!m) return [{ group: null, rows: _ }];
2642
2750
  const V = /* @__PURE__ */ new Map();
2643
- for (const Q of T) {
2751
+ for (const Q of _) {
2644
2752
  const F = m(Q.row, Q.index), ge = V.get(F);
2645
2753
  ge ? ge.push(Q) : V.set(F, [Q]);
2646
2754
  }
@@ -2649,11 +2757,11 @@ const qr = (t) => {
2649
2757
  ...re.filter((Q) => V.has(Q.id)),
2650
2758
  ...[...V.keys()].filter((Q) => !re.some((F) => F.id === Q)).map((Q) => ({ id: Q }))
2651
2759
  ].map((Q) => ({ group: Q, rows: V.get(Q.id) ?? [] }));
2652
- }, [H, m, f]), ht = r.length + (h ? 1 : 0) + (w.length > 0 ? 1 : 0), Ve = b && O > 0, xt = Ve || K !== void 0;
2653
- return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col", W), children: [
2654
- Oe && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2760
+ }, [H, m, f]), bt = r.length + (h ? 1 : 0) + (w.length > 0 ? 1 : 0), Ve = b && P > 0, gt = Ve || G !== void 0;
2761
+ return /* @__PURE__ */ c("div", { className: i("flex min-w-0 flex-col", U), children: [
2762
+ Pe && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2655
2763
  s && /* @__PURE__ */ e(
2656
- lt,
2764
+ ct,
2657
2765
  {
2658
2766
  value: x,
2659
2767
  onValueChange: S,
@@ -2661,70 +2769,70 @@ const qr = (t) => {
2661
2769
  containerClassName: "w-full sm:w-66"
2662
2770
  }
2663
2771
  ),
2664
- u.map((T) => /* @__PURE__ */ e(qr, { ...T }, T.id)),
2772
+ u.map((_) => /* @__PURE__ */ e(Wr, { ..._ }, _.id)),
2665
2773
  v,
2666
2774
  d.length > 0 && /* @__PURE__ */ e(ke, { actions: d, className: "ml-auto" })
2667
2775
  ] }),
2668
2776
  /* @__PURE__ */ e("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: /* @__PURE__ */ c("table", { ref: oe, className: "min-w-full border-collapse text-base text-text", children: [
2669
- /* @__PURE__ */ e("thead", { className: i(fe, "h-control-lg"), children: /* @__PURE__ */ c("tr", { children: [
2670
- h && /* @__PURE__ */ e("th", { className: i(he, "w-10"), children: /* @__PURE__ */ e(
2777
+ /* @__PURE__ */ e("thead", { className: i(he, "h-control-lg"), children: /* @__PURE__ */ c("tr", { children: [
2778
+ h && /* @__PURE__ */ e("th", { className: i(xe, "w-10"), children: /* @__PURE__ */ e(
2671
2779
  we,
2672
2780
  {
2673
2781
  size: "sm",
2674
2782
  checked: le,
2675
2783
  indeterminate: be && !le,
2676
- onChange: (T) => G(T.target.checked),
2784
+ onChange: (_) => K(_.target.checked),
2677
2785
  "aria-label": "Select all rows"
2678
2786
  }
2679
2787
  ) }),
2680
- r.map((T) => /* @__PURE__ */ e(
2788
+ r.map((_) => /* @__PURE__ */ e(
2681
2789
  "th",
2682
2790
  {
2683
2791
  className: i(
2684
- he,
2792
+ xe,
2685
2793
  "text-xs font-semibold uppercase tracking-label text-text-muted",
2686
2794
  "group",
2687
2795
  {
2688
- "text-left": T.align === "left" || !T.align,
2689
- "text-center": T.align === "center",
2690
- "text-right": T.align === "right",
2691
- "cursor-pointer select-none": T.sortable,
2692
- [`sticky left-0 ${fe}`]: T.sticky === "left",
2693
- [`sticky right-0 ${fe}`]: T.sticky === "right"
2796
+ "text-left": _.align === "left" || !_.align,
2797
+ "text-center": _.align === "center",
2798
+ "text-right": _.align === "right",
2799
+ "cursor-pointer select-none": _.sortable,
2800
+ [`sticky left-0 ${he}`]: _.sticky === "left",
2801
+ [`sticky right-0 ${he}`]: _.sticky === "right"
2694
2802
  }
2695
2803
  ),
2696
- style: { width: T.width },
2697
- onClick: () => T.sortable && L(T.id),
2804
+ style: { width: _.width },
2805
+ onClick: () => _.sortable && L(_.id),
2698
2806
  children: /* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
2699
- T.headerCell ? T.headerCell() : T.header,
2700
- T.sortable && /* @__PURE__ */ e(
2701
- ee,
2807
+ _.headerCell ? _.headerCell() : _.header,
2808
+ _.sortable && /* @__PURE__ */ e(
2809
+ J,
2702
2810
  {
2703
- icon: D.column === T.id && D.direction === "desc" ? Ae : Tt,
2811
+ icon: A.column === _.id && A.direction === "desc" ? De : _t,
2704
2812
  size: "xs",
2705
2813
  className: i(
2706
2814
  "transition-opacity duration-fast ease-out",
2707
- D.column === T.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2815
+ A.column === _.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2708
2816
  )
2709
2817
  }
2710
2818
  )
2711
2819
  ] })
2712
2820
  },
2713
- T.id
2821
+ _.id
2714
2822
  )),
2715
- w.length > 0 && /* @__PURE__ */ e("th", { className: i(he, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2823
+ w.length > 0 && /* @__PURE__ */ e("th", { className: i(xe, "w-10"), children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
2716
2824
  ] }) }),
2717
- /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: Br }).map((T, V) => /* @__PURE__ */ c(
2825
+ /* @__PURE__ */ e("tbody", { children: n ? Array.from({ length: Vr }).map((_, V) => /* @__PURE__ */ c(
2718
2826
  "tr",
2719
2827
  {
2720
2828
  className: "animate-pulse border-t border-border-subtle",
2721
2829
  "aria-hidden": !0,
2722
2830
  children: [
2723
- h && /* @__PURE__ */ e("td", { className: i(he, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
2831
+ h && /* @__PURE__ */ e("td", { className: i(xe, "h-row-lg"), children: /* @__PURE__ */ e("span", { className: "block size-4 rounded-xs bg-surface-hover" }) }),
2724
2832
  r.map((re, ie) => /* @__PURE__ */ e(
2725
2833
  "td",
2726
2834
  {
2727
- className: i(he, "h-row-lg"),
2835
+ className: i(xe, "h-row-lg"),
2728
2836
  style: { width: re.width },
2729
2837
  children: /* @__PURE__ */ e(
2730
2838
  "span",
@@ -2738,7 +2846,7 @@ const qr = (t) => {
2738
2846
  },
2739
2847
  re.id
2740
2848
  )),
2741
- w.length > 0 && /* @__PURE__ */ e("td", { className: i(he, "h-row-lg") })
2849
+ w.length > 0 && /* @__PURE__ */ e("td", { className: i(xe, "h-row-lg") })
2742
2850
  ]
2743
2851
  },
2744
2852
  `skeleton-${V}`
@@ -2747,52 +2855,52 @@ const qr = (t) => {
2747
2855
  {
2748
2856
  colSpan: r.length + (h ? 1 : 0) + (w.length > 0 ? 1 : 0),
2749
2857
  className: i(
2750
- he,
2858
+ xe,
2751
2859
  "border-t border-border-subtle py-10 text-center text-text-muted"
2752
2860
  ),
2753
- children: _ || "No data available"
2861
+ children: $ || "No data available"
2754
2862
  }
2755
- ) }) : ft.flatMap((T) => [
2756
- ...T.group ? [
2863
+ ) }) : xt.flatMap((_) => [
2864
+ ..._.group ? [
2757
2865
  /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
2758
2866
  "td",
2759
2867
  {
2760
- colSpan: ht,
2868
+ colSpan: bt,
2761
2869
  className: i(
2762
2870
  // A caption over its rows, not a second column strip:
2763
2871
  // same surface as the rows, no rules, count on the right.
2764
2872
  "border-t border-border-subtle bg-surface px-4 pb-1.5 pt-4 text-sm font-semibold",
2765
- T.group.tone === "danger" ? "text-danger-fg" : T.group.tone === "muted" ? "text-text-subtle" : "text-text"
2873
+ _.group.tone === "danger" ? "text-danger-fg" : _.group.tone === "muted" ? "text-text-subtle" : "text-text"
2766
2874
  ),
2767
2875
  children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2.5", children: [
2768
- T.group.title ?? T.group.id,
2769
- /* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children: T.group.count ?? T.rows.length })
2876
+ _.group.title ?? _.group.id,
2877
+ /* @__PURE__ */ e("span", { className: "rounded-full bg-surface-sunk px-1.5 py-0.5 text-xs font-medium text-text-muted tabular-nums", children: _.group.count ?? _.rows.length })
2770
2878
  ] })
2771
2879
  }
2772
- ) }, `group-${T.group.id}`)
2880
+ ) }, `group-${_.group.id}`)
2773
2881
  ] : [],
2774
- ...T.rows.map(({ row: V, index: re }) => {
2775
- const ie = P(V, re), Q = C.some(
2776
- (F, ge) => P(F, ge) === ie
2882
+ ..._.rows.map(({ row: V, index: re }) => {
2883
+ const ie = O(V, re), Q = C.some(
2884
+ (F, ge) => O(F, ge) === ie
2777
2885
  );
2778
2886
  return /* @__PURE__ */ c(
2779
2887
  "tr",
2780
2888
  {
2781
2889
  className: i(
2782
- Rr[U],
2890
+ qr[j],
2783
2891
  // Hairline above every row, including the first: it is
2784
2892
  // what separates the body from the column strip.
2785
2893
  "border-t border-border-subtle",
2786
- j && "transition-colors duration-fast ease-out hover:bg-surface-hover",
2894
+ W && "transition-colors duration-fast ease-out hover:bg-surface-hover",
2787
2895
  p && "cursor-pointer",
2788
2896
  Q && "bg-accent-soft",
2789
- Z?.(V, re)
2897
+ ee?.(V, re)
2790
2898
  ),
2791
2899
  onClick: (F) => {
2792
2900
  F.stopPropagation(), p?.(V, re);
2793
2901
  },
2794
2902
  children: [
2795
- h && /* @__PURE__ */ e("td", { className: he, children: /* @__PURE__ */ e(
2903
+ h && /* @__PURE__ */ e("td", { className: xe, children: /* @__PURE__ */ e(
2796
2904
  we,
2797
2905
  {
2798
2906
  size: "sm",
@@ -2809,7 +2917,7 @@ const qr = (t) => {
2809
2917
  return /* @__PURE__ */ e(
2810
2918
  "td",
2811
2919
  {
2812
- className: i(he, {
2920
+ className: i(xe, {
2813
2921
  "text-left": F.align === "left" || !F.align,
2814
2922
  "text-center": F.align === "center",
2815
2923
  "text-right": F.align === "right",
@@ -2821,11 +2929,11 @@ const qr = (t) => {
2821
2929
  F.id
2822
2930
  );
2823
2931
  }),
2824
- w.length > 0 && /* @__PURE__ */ e("td", { className: he, children: /* @__PURE__ */ e(
2825
- jr,
2932
+ w.length > 0 && /* @__PURE__ */ e("td", { className: xe, children: /* @__PURE__ */ e(
2933
+ Br,
2826
2934
  {
2827
2935
  className: "rounded-md",
2828
- trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(ee, { icon: $t, size: "md", color: "current" }) }),
2936
+ trigger: /* @__PURE__ */ e("span", { className: "grid size-7 place-items-center text-text-subtle", children: /* @__PURE__ */ e(J, { icon: $t, size: "md", color: "current" }) }),
2829
2937
  options: w.map((F) => ({
2830
2938
  value: F.id,
2831
2939
  label: F.label,
@@ -2833,7 +2941,7 @@ const qr = (t) => {
2833
2941
  disabled: F.disabled?.(V)
2834
2942
  })),
2835
2943
  onSelect: (F) => {
2836
- const ge = w.find((bt) => bt.id === F);
2944
+ const ge = w.find((pt) => pt.id === F);
2837
2945
  ge && ge.onClick(V, re);
2838
2946
  },
2839
2947
  placement: "bottom-end"
@@ -2846,8 +2954,8 @@ const qr = (t) => {
2846
2954
  })
2847
2955
  ]) })
2848
2956
  ] }) }),
2849
- xt && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2850
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: K ?? `Showing ${I}–${te} of ${O}` }),
2957
+ gt && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2958
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: G ?? `Showing ${I}–${te} of ${P}` }),
2851
2959
  Ve && /* @__PURE__ */ c("div", { className: "flex items-center gap-0.5", children: [
2852
2960
  /* @__PURE__ */ e(
2853
2961
  se,
@@ -2856,27 +2964,27 @@ const qr = (t) => {
2856
2964
  variant: "ghost",
2857
2965
  iconOnly: !0,
2858
2966
  "aria-label": "Previous page",
2859
- onClick: () => k(A.page - 1),
2860
- disabled: A.page === 0,
2861
- children: /* @__PURE__ */ e(ee, { icon: ze, size: "md", color: "current" })
2967
+ onClick: () => k(D.page - 1),
2968
+ disabled: D.page === 0,
2969
+ children: /* @__PURE__ */ e(J, { icon: Ee, size: "md", color: "current" })
2862
2970
  }
2863
2971
  ),
2864
- Hr(A.page, N).map(
2865
- (T, V) => T === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${V}`) : /* @__PURE__ */ e(
2972
+ Ur(D.page, N).map(
2973
+ (_, V) => _ === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${V}`) : /* @__PURE__ */ e(
2866
2974
  "button",
2867
2975
  {
2868
2976
  type: "button",
2869
- "aria-current": T === A.page ? "page" : void 0,
2870
- onClick: () => k(T),
2977
+ "aria-current": _ === D.page ? "page" : void 0,
2978
+ onClick: () => k(_),
2871
2979
  className: i(
2872
2980
  "h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
2873
2981
  "transition-colors duration-fast ease-out",
2874
2982
  "focus-visible:outline-none focus-visible:focus-ring",
2875
- T === A.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2983
+ _ === D.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2876
2984
  ),
2877
- children: T + 1
2985
+ children: _ + 1
2878
2986
  },
2879
- T
2987
+ _
2880
2988
  )
2881
2989
  ),
2882
2990
  /* @__PURE__ */ e(
@@ -2886,15 +2994,15 @@ const qr = (t) => {
2886
2994
  variant: "ghost",
2887
2995
  iconOnly: !0,
2888
2996
  "aria-label": "Next page",
2889
- onClick: () => k(A.page + 1),
2890
- disabled: A.page >= N - 1,
2891
- children: /* @__PURE__ */ e(ee, { icon: Ie, size: "md", color: "current" })
2997
+ onClick: () => k(D.page + 1),
2998
+ disabled: D.page >= N - 1,
2999
+ children: /* @__PURE__ */ e(J, { icon: Ie, size: "md", color: "current" })
2892
3000
  }
2893
3001
  )
2894
3002
  ] })
2895
3003
  ] })
2896
3004
  ] });
2897
- }, Vr = {
3005
+ }, Kr = {
2898
3006
  default: "bg-surface-hover text-text",
2899
3007
  primary: "bg-accent-soft text-accent",
2900
3008
  secondary: "bg-surface-hover text-text-muted",
@@ -2904,11 +3012,11 @@ const qr = (t) => {
2904
3012
  info: "bg-info-soft text-info-fg",
2905
3013
  // Internal-note amber. Never for customer-visible content.
2906
3014
  note: "bg-note-soft text-note"
2907
- }, Ur = {
3015
+ }, Gr = {
2908
3016
  sm: "px-2 py-0.5 text-xs",
2909
3017
  md: "px-2.5 py-1 text-sm",
2910
3018
  lg: "px-3 py-1.5 text-base"
2911
- }, Wr = {
3019
+ }, Jr = {
2912
3020
  default: "bg-surface-hover",
2913
3021
  primary: "bg-accent",
2914
3022
  secondary: "bg-surface-hover",
@@ -2918,7 +3026,7 @@ const qr = (t) => {
2918
3026
  info: "bg-info",
2919
3027
  note: "bg-note"
2920
3028
  };
2921
- function Kr({
3029
+ function Yr({
2922
3030
  variant: t = "default",
2923
3031
  size: r = "md",
2924
3032
  dot: n = !1,
@@ -2934,13 +3042,13 @@ function Kr({
2934
3042
  {
2935
3043
  className: i(
2936
3044
  "inline-flex items-center font-medium rounded-full",
2937
- Vr[t],
2938
- Ur[r],
3045
+ Kr[t],
3046
+ Gr[r],
2939
3047
  o
2940
3048
  ),
2941
3049
  ...d,
2942
3050
  children: [
2943
- n && /* @__PURE__ */ e("span", { className: i("w-2 h-2 rounded-full mr-1.5", Wr[t]) }),
3051
+ n && /* @__PURE__ */ e("span", { className: i("w-2 h-2 rounded-full mr-1.5", Jr[t]) }),
2944
3052
  s && /* @__PURE__ */ e("span", { className: i("flex-shrink-0", u && "mr-1"), children: s }),
2945
3053
  u,
2946
3054
  a && l && /* @__PURE__ */ e(
@@ -2949,14 +3057,14 @@ function Kr({
2949
3057
  onClick: l,
2950
3058
  className: "ml-1.5 flex-shrink-0 hover:opacity-70 transition-opacity",
2951
3059
  "aria-label": "Remove badge",
2952
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "xs", color: "current" })
3060
+ children: /* @__PURE__ */ e(J, { icon: Se, size: "xs", color: "current" })
2953
3061
  }
2954
3062
  )
2955
3063
  ]
2956
3064
  }
2957
3065
  );
2958
3066
  }
2959
- function Gr(t) {
3067
+ function Xr(t) {
2960
3068
  const { id: r, header: n, accessor: s, label: a, tone: l, visible: o, width: u, sortable: d, align: v } = t;
2961
3069
  return {
2962
3070
  id: r,
@@ -2964,14 +3072,14 @@ function Gr(t) {
2964
3072
  accessor: (m) => a(s(m), m),
2965
3073
  cell: (m, f) => {
2966
3074
  const b = s(f);
2967
- return o && !o(b, f) ? null : /* @__PURE__ */ e(Kr, { variant: l ? l(b, f) : "default", size: "sm", children: a(b, f) });
3075
+ return o && !o(b, f) ? null : /* @__PURE__ */ e(Yr, { variant: l ? l(b, f) : "default", size: "sm", children: a(b, f) });
2968
3076
  },
2969
3077
  width: u,
2970
3078
  sortable: d,
2971
3079
  align: v
2972
3080
  };
2973
3081
  }
2974
- function _s(t) {
3082
+ function Fs(t) {
2975
3083
  const {
2976
3084
  id: r,
2977
3085
  header: n,
@@ -2983,7 +3091,7 @@ function _s(t) {
2983
3091
  width: d,
2984
3092
  sortable: v
2985
3093
  } = t;
2986
- return Gr({
3094
+ return Xr({
2987
3095
  id: r,
2988
3096
  header: n,
2989
3097
  accessor: (m) => !!s(m),
@@ -2993,7 +3101,7 @@ function _s(t) {
2993
3101
  sortable: v
2994
3102
  });
2995
3103
  }
2996
- function Ds(t) {
3104
+ function Rs(t) {
2997
3105
  const {
2998
3106
  id: r,
2999
3107
  header: n,
@@ -3017,19 +3125,19 @@ function Ds(t) {
3017
3125
  sortable: v
3018
3126
  };
3019
3127
  }
3020
- const Jr = {
3128
+ const Zr = {
3021
3129
  xs: "text-xs",
3022
3130
  sm: "text-sm",
3023
3131
  md: "text-base",
3024
3132
  lg: "text-md",
3025
3133
  xl: "text-lg"
3026
- }, Yr = {
3134
+ }, Qr = {
3027
3135
  light: "font-normal",
3028
3136
  normal: "font-normal",
3029
3137
  medium: "font-medium",
3030
3138
  semibold: "font-semibold",
3031
3139
  bold: "font-bold"
3032
- }, Xr = {
3140
+ }, en = {
3033
3141
  primary: "text-text",
3034
3142
  secondary: "text-text-muted",
3035
3143
  accent: "text-accent",
@@ -3040,12 +3148,12 @@ const Jr = {
3040
3148
  neutral: "text-text",
3041
3149
  current: "text-current",
3042
3150
  muted: "text-text-subtle"
3043
- }, Zr = {
3151
+ }, tn = {
3044
3152
  left: "text-left",
3045
3153
  center: "text-center",
3046
3154
  right: "text-right",
3047
3155
  justify: "text-justify"
3048
- }, Qr = {
3156
+ }, rn = {
3049
3157
  tight: "leading-tight",
3050
3158
  normal: "leading-normal",
3051
3159
  relaxed: "leading-relaxed"
@@ -3064,20 +3172,20 @@ const Jr = {
3064
3172
  children: f,
3065
3173
  ...b
3066
3174
  }) => {
3067
- const g = v || en(t), w = t === "caption", p = t === "label", h = t === "code", C = i(
3175
+ const g = v || nn(t), w = t === "caption", p = t === "label", h = t === "code", C = i(
3068
3176
  "font-sans",
3069
3177
  // Variant — caption and label pin their own size/weight
3070
3178
  w && "text-xs text-text-subtle",
3071
3179
  p && "text-xs font-semibold uppercase tracking-label text-text-subtle",
3072
3180
  h && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
3073
3181
  // Size — only where the variant does not pin it
3074
- !w && !p && !h && Jr[r],
3182
+ !w && !p && !h && Zr[r],
3075
3183
  // Weight — label owns its weight
3076
- !p && Yr[n],
3077
- Xr[s],
3078
- Zr[a],
3184
+ !p && Qr[n],
3185
+ en[s],
3186
+ tn[a],
3079
3187
  // Line height only overrides the body variant
3080
- t === "body" && Qr[d],
3188
+ t === "body" && rn[d],
3081
3189
  o && "italic",
3082
3190
  u && "underline",
3083
3191
  l && "truncate",
@@ -3085,7 +3193,7 @@ const Jr = {
3085
3193
  );
3086
3194
  return /* @__PURE__ */ e(g, { className: C, ...b, children: f });
3087
3195
  };
3088
- function en(t) {
3196
+ function nn(t) {
3089
3197
  return {
3090
3198
  body: "p",
3091
3199
  caption: "span",
@@ -3093,13 +3201,13 @@ function en(t) {
3093
3201
  code: "code"
3094
3202
  }[t] || "p";
3095
3203
  }
3096
- function tn(t, r) {
3204
+ function sn(t, r) {
3097
3205
  return r.split(".").reduce(
3098
3206
  (n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
3099
3207
  t
3100
3208
  );
3101
3209
  }
3102
- const As = ({
3210
+ const Bs = ({
3103
3211
  groups: t,
3104
3212
  data: r,
3105
3213
  size: n = "md",
@@ -3120,9 +3228,9 @@ const As = ({
3120
3228
  if (!f) return String(m || "-");
3121
3229
  const b = f.find((g) => g.value === m);
3122
3230
  return b ? b.label : String(m || "-");
3123
- }, u = xe(
3231
+ }, u = fe(
3124
3232
  (m) => {
3125
- const f = tn(r, m.name);
3233
+ const f = sn(r, m.name);
3126
3234
  if (m.type === "array") {
3127
3235
  const g = f;
3128
3236
  return !g || g.length === 0 ? /* @__PURE__ */ e(ue, { variant: "body", size: "sm", className: "text-text-muted", children: "Geen items" }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: g.map((w, p) => /* @__PURE__ */ c("div", { className: "p-4 border border-border rounded-xl space-y-3", children: [
@@ -3202,8 +3310,8 @@ const As = ({
3202
3310
  }
3203
3311
  return /* @__PURE__ */ e(ue, { variant: "body", size: "sm", className: "text-text", children: b });
3204
3312
  },
3205
- [r]
3206
- ), d = xe(
3313
+ [r, o, a, l]
3314
+ ), d = fe(
3207
3315
  (m) => {
3208
3316
  if (m.conditional && !m.conditional(r))
3209
3317
  return null;
@@ -3265,7 +3373,7 @@ const As = ({
3265
3373
  );
3266
3374
  return /* @__PURE__ */ e("div", { className: v, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(d) }) });
3267
3375
  };
3268
- class Ls extends yt {
3376
+ class Hs extends wt {
3269
3377
  constructor() {
3270
3378
  super(...arguments), this.state = {
3271
3379
  hasError: !1,
@@ -3294,7 +3402,7 @@ class Ls extends yt {
3294
3402
  }
3295
3403
  }
3296
3404
  const Fe = /* @__PURE__ */ new Map();
3297
- function Is({
3405
+ function qs({
3298
3406
  identifier: t,
3299
3407
  resourceLoader: r,
3300
3408
  framework: n = "react",
@@ -3309,11 +3417,11 @@ function Is({
3309
3417
  let C = !0;
3310
3418
  return (async () => {
3311
3419
  try {
3312
- const P = await b.current();
3420
+ const O = await b.current();
3313
3421
  if (!C) return;
3314
- Fe.set(t, P), m((_) => _ + 1);
3315
- } catch (P) {
3316
- console.error(`[FederatedResource] Load failed: ${t}`, P), C && v(t);
3422
+ Fe.set(t, O), m(($) => $ + 1);
3423
+ } catch (O) {
3424
+ console.error(`[FederatedResource] Load failed: ${t}`, O), C && v(t);
3317
3425
  }
3318
3426
  })(), () => {
3319
3427
  C = !1;
@@ -3325,8 +3433,8 @@ function Is({
3325
3433
  const C = u.current;
3326
3434
  if (C) {
3327
3435
  if (n === "svelte") {
3328
- const z = h.default || h, P = new z({ target: C, props: l || {} });
3329
- return f.current = P, () => P.$destroy();
3436
+ const z = h.default || h, O = new z({ target: C, props: l || {} });
3437
+ return f.current = O, () => O.$destroy();
3330
3438
  }
3331
3439
  if (h.mount) {
3332
3440
  const z = h.mount({ container: C, props: l || {} });
@@ -3335,7 +3443,7 @@ function Is({
3335
3443
  };
3336
3444
  }
3337
3445
  }
3338
- }, [h, n]), X(() => {
3446
+ }, [h, n, l]), X(() => {
3339
3447
  n === "svelte" && f.current && f.current.$set?.(l);
3340
3448
  }, [l, n]), /* @__PURE__ */ c("div", { ref: u, className: o, style: { display: "contents" }, children: [
3341
3449
  p && s,
@@ -3343,11 +3451,11 @@ function Is({
3343
3451
  n === "react" && h && /* @__PURE__ */ e(h, { ...l })
3344
3452
  ] });
3345
3453
  }
3346
- const rn = {
3454
+ const an = {
3347
3455
  neutral: "bg-surface-hover text-text-muted",
3348
3456
  success: "bg-success-soft text-success-fg"
3349
3457
  };
3350
- function Ps({
3458
+ function Vs({
3351
3459
  icon: t,
3352
3460
  tone: r = "neutral",
3353
3461
  title: n,
@@ -3372,7 +3480,7 @@ function Ps({
3372
3480
  {
3373
3481
  className: i(
3374
3482
  "flex size-disc items-center justify-center rounded-full text-2xl",
3375
- rn[r]
3483
+ an[r]
3376
3484
  ),
3377
3485
  children: t
3378
3486
  }
@@ -3384,7 +3492,7 @@ function Ps({
3384
3492
  }
3385
3493
  );
3386
3494
  }
3387
- function Os({ children: t, className: r, ...n }) {
3495
+ function Us({ children: t, className: r, ...n }) {
3388
3496
  return /* @__PURE__ */ e(
3389
3497
  "kbd",
3390
3498
  {
@@ -3397,14 +3505,14 @@ function Os({ children: t, className: r, ...n }) {
3397
3505
  }
3398
3506
  );
3399
3507
  }
3400
- const nn = {
3508
+ const ln = {
3401
3509
  sm: "h-1",
3402
3510
  md: "h-1.5"
3403
- }, sn = {
3511
+ }, on = {
3404
3512
  accent: "bg-accent",
3405
3513
  success: "bg-success"
3406
3514
  };
3407
- function js({
3515
+ function Ws({
3408
3516
  value: t,
3409
3517
  variant: r = "accent",
3410
3518
  size: n = "md",
@@ -3421,7 +3529,7 @@ function js({
3421
3529
  "aria-valuemax": 100,
3422
3530
  className: i(
3423
3531
  "w-full overflow-hidden rounded-full bg-surface-hover",
3424
- nn[n],
3532
+ ln[n],
3425
3533
  s
3426
3534
  ),
3427
3535
  ...a,
@@ -3430,7 +3538,7 @@ function js({
3430
3538
  {
3431
3539
  className: i(
3432
3540
  "h-full rounded-full transition-[width] duration-300 ease-out",
3433
- sn[r]
3541
+ on[r]
3434
3542
  ),
3435
3543
  style: { width: `${l}%` }
3436
3544
  }
@@ -3438,25 +3546,25 @@ function js({
3438
3546
  }
3439
3547
  );
3440
3548
  }
3441
- const an = {
3549
+ const cn = {
3442
3550
  xs: "h-3 w-3",
3443
3551
  sm: "h-4 w-4",
3444
3552
  md: "h-6 w-6",
3445
3553
  lg: "h-8 w-8",
3446
3554
  xl: "h-12 w-12"
3447
- }, ln = {
3555
+ }, dn = {
3448
3556
  primary: "text-accent",
3449
3557
  secondary: "text-text-muted",
3450
3558
  white: "text-white",
3451
3559
  current: "text-current"
3452
- }, on = {
3560
+ }, un = {
3453
3561
  xs: "text-xs",
3454
3562
  sm: "text-sm",
3455
3563
  md: "text-sm",
3456
3564
  lg: "text-base",
3457
3565
  xl: "text-lg"
3458
3566
  };
3459
- function Fs({
3567
+ function Ks({
3460
3568
  size: t = "md",
3461
3569
  variant: r = "primary",
3462
3570
  label: n = "Loading...",
@@ -3473,7 +3581,7 @@ function Fs({
3473
3581
  /* @__PURE__ */ c(
3474
3582
  "svg",
3475
3583
  {
3476
- className: i("animate-spin", an[t], ln[r]),
3584
+ className: i("animate-spin", cn[t], dn[r]),
3477
3585
  fill: "none",
3478
3586
  viewBox: "0 0 24 24",
3479
3587
  "aria-hidden": !s,
@@ -3501,13 +3609,13 @@ function Fs({
3501
3609
  ]
3502
3610
  }
3503
3611
  ),
3504
- s && /* @__PURE__ */ e("span", { className: i("text-text-muted", on[t]), children: n }),
3612
+ s && /* @__PURE__ */ e("span", { className: i("text-text-muted", un[t]), children: n }),
3505
3613
  !s && /* @__PURE__ */ e("span", { className: "sr-only", children: n })
3506
3614
  ]
3507
3615
  }
3508
3616
  );
3509
3617
  }
3510
- const cn = {
3618
+ const mn = {
3511
3619
  neutral: "bg-text-disabled",
3512
3620
  accent: "bg-accent",
3513
3621
  success: "bg-success",
@@ -3521,7 +3629,7 @@ const cn = {
3521
3629
  "cat-4": "bg-cat-4",
3522
3630
  "cat-5": "bg-cat-5"
3523
3631
  };
3524
- function Rs({
3632
+ function Gs({
3525
3633
  tone: t = "neutral",
3526
3634
  shape: r = "round",
3527
3635
  pulse: n = !1,
@@ -3537,14 +3645,14 @@ function Rs({
3537
3645
  className: i(
3538
3646
  "inline-block size-dot shrink-0",
3539
3647
  r === "round" ? "rounded-full" : "rounded-sm",
3540
- cn[t],
3648
+ mn[t],
3541
3649
  n && "animate-pulse",
3542
3650
  a
3543
3651
  )
3544
3652
  }
3545
3653
  );
3546
3654
  }
3547
- function Bs({
3655
+ function Js({
3548
3656
  steps: t,
3549
3657
  current: r,
3550
3658
  variant: n = "numbered",
@@ -3584,7 +3692,7 @@ function Bs({
3584
3692
  d < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
3585
3693
  ] }, u)) });
3586
3694
  }
3587
- const dn = /* @__PURE__ */ new Set([
3695
+ const fn = /* @__PURE__ */ new Set([
3588
3696
  "name",
3589
3697
  "given-name",
3590
3698
  "family-name",
@@ -3619,7 +3727,7 @@ const dn = /* @__PURE__ */ new Set([
3619
3727
  "one-time-code"
3620
3728
  ]);
3621
3729
  function Xe(t) {
3622
- return t && dn.has(t) ? { autoComplete: t } : {
3730
+ return t && fn.has(t) ? { autoComplete: t } : {
3623
3731
  autoComplete: "off",
3624
3732
  // 1Password
3625
3733
  "data-1p-ignore": "true",
@@ -3631,12 +3739,12 @@ function Xe(t) {
3631
3739
  "data-form-type": "other"
3632
3740
  };
3633
3741
  }
3634
- const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCase(), mn = {
3742
+ const _e = (t) => t == null ? "" : String(t), hn = (t) => _e(t).trim().toLowerCase(), xn = {
3635
3743
  sm: "h-control-sm px-3 text-sm",
3636
3744
  md: "h-control-md px-3 text-sm",
3637
3745
  lg: "h-control-lg px-3 text-base",
3638
3746
  full: "h-control-md w-full px-3 text-sm"
3639
- }, $e = un, De = ve(
3747
+ }, Te = hn, $e = ve(
3640
3748
  ({
3641
3749
  label: t,
3642
3750
  helperText: r,
@@ -3657,24 +3765,24 @@ const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCa
3657
3765
  allowCreate: h,
3658
3766
  onCreateOption: C,
3659
3767
  ...z
3660
- }, P) => {
3661
- const _ = f || `select-${Math.random().toString(36).substr(2, 9)}`, K = !!n, [U, j] = ae.useState(!1), [B, W] = ae.useState(""), Z = ae.useRef(null), J = ae.useRef(null), de = Pe(U, J, { matchWidth: !0 }), [Y, y] = ae.useState(o);
3662
- ae.useImperativeHandle(P, () => Z.current), ae.useEffect(() => {
3768
+ }, O) => {
3769
+ const $ = f || `select-${Math.random().toString(36).substr(2, 9)}`, G = !!n, [j, W] = ae.useState(!1), [B, U] = ae.useState(""), ee = ae.useRef(null), Z = ae.useRef(null), de = Oe(j, Z, { matchWidth: !0 }), [Y, y] = ae.useState(o);
3770
+ ae.useImperativeHandle(O, () => ee.current), ae.useEffect(() => {
3663
3771
  const L = (k) => {
3664
- Z.current && !Z.current.contains(k.target) && j(!1);
3772
+ ee.current && !ee.current.contains(k.target) && W(!1);
3665
3773
  };
3666
3774
  return document.addEventListener("mousedown", L), () => document.removeEventListener("mousedown", L);
3667
3775
  }, []);
3668
3776
  const x = ae.useCallback(
3669
- (L, k) => L.some((M) => $e(M.value) === $e(k) || $e(M.label) === $e(k)),
3777
+ (L, k) => L.some((M) => Te(M.value) === Te(k) || Te(M.label) === Te(k)),
3670
3778
  []
3671
3779
  ), S = ae.useCallback(
3672
3780
  (L, k) => {
3673
- const M = [...L], G = (O) => {
3674
- const N = _e(O).trim();
3781
+ const M = [...L], K = (P) => {
3782
+ const N = _e(P).trim();
3675
3783
  N && (x(M, N) || M.push({ value: N, label: N }));
3676
3784
  };
3677
- return Array.isArray(k) ? k.forEach(G) : G(k), M;
3785
+ return Array.isArray(k) ? k.forEach(K) : K(k), M;
3678
3786
  },
3679
3787
  [x]
3680
3788
  );
@@ -3686,16 +3794,16 @@ const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCa
3686
3794
  }), S(k, w);
3687
3795
  });
3688
3796
  }, [o, w, S, x]);
3689
- const D = ae.useMemo(
3797
+ const A = ae.useMemo(
3690
3798
  () => Array.isArray(w) ? w.map(_e) : w == null ? void 0 : _e(w),
3691
3799
  [w]
3692
3800
  ), E = (L) => {
3693
3801
  if (g) {
3694
- const k = Array.isArray(D) ? D : [], M = k.includes(L) ? k.filter((G) => G !== L) : [...k, L];
3802
+ const k = Array.isArray(A) ? A : [], M = k.includes(L) ? k.filter((K) => K !== L) : [...k, L];
3695
3803
  p?.(M);
3696
3804
  } else
3697
- p?.(L), j(!1), W("");
3698
- }, A = g ? null : Y.find((L) => L.value === D), $ = g ? Y.filter((L) => Array.isArray(D) && D.includes(L.value)) : [], oe = b && B ? Y.filter(
3805
+ p?.(L), W(!1), U("");
3806
+ }, D = g ? null : Y.find((L) => L.value === A), T = g ? Y.filter((L) => Array.isArray(A) && A.includes(L.value)) : [], oe = b && B ? Y.filter(
3699
3807
  (L) => L.label.toLowerCase().includes(B.toLowerCase())
3700
3808
  ) : Y, ce = !!h && !!b && !!B.trim() && !x(Y, B), q = (L) => {
3701
3809
  const k = L.trim();
@@ -3705,26 +3813,26 @@ const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCa
3705
3813
  label: k
3706
3814
  };
3707
3815
  if (x(Y, M.value) || x(Y, M.label)) {
3708
- E(M.value), W(""), g || j(!1);
3816
+ E(M.value), U(""), g || W(!1);
3709
3817
  return;
3710
3818
  }
3711
- y((G) => [...G, M]), E(M.value), W(""), g || j(!1);
3712
- }, H = () => g ? $.length > 0 ? $.map((L) => L.label).join(", ") : u || "Select options" : A?.label || u || "Select an option";
3819
+ y((K) => [...K, M]), E(M.value), U(""), g || W(!1);
3820
+ }, H = () => g ? T.length > 0 ? T.map((L) => L.label).join(", ") : u || "Select options" : D?.label || u || "Select an option";
3713
3821
  return /* @__PURE__ */ c(
3714
3822
  "div",
3715
3823
  {
3716
- ref: Z,
3824
+ ref: ee,
3717
3825
  className: i("relative flex flex-col", a && "w-full", d),
3718
3826
  ...z,
3719
3827
  children: [
3720
3828
  t && /* @__PURE__ */ e(
3721
3829
  "label",
3722
3830
  {
3723
- htmlFor: _,
3724
- onClick: () => j(!U),
3831
+ htmlFor: $,
3832
+ onClick: () => W(!j),
3725
3833
  className: i(
3726
3834
  "block text-xs font-semibold uppercase tracking-label mb-1.5",
3727
- K ? "text-danger-fg" : "text-text-muted",
3835
+ G ? "text-danger-fg" : "text-text-muted",
3728
3836
  v
3729
3837
  ),
3730
3838
  children: t
@@ -3734,36 +3842,36 @@ const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCa
3734
3842
  /* @__PURE__ */ c(
3735
3843
  "button",
3736
3844
  {
3737
- ref: J,
3845
+ ref: Z,
3738
3846
  type: "button",
3739
- id: _,
3847
+ id: $,
3740
3848
  disabled: l,
3741
- onClick: () => j(!U),
3849
+ onClick: () => W(!j),
3742
3850
  className: i(
3743
3851
  "flex w-full items-center justify-between gap-2 rounded-tile border transition-colors duration-fast text-left",
3744
3852
  "focus-visible:outline-none focus-visible:focus-ring",
3745
3853
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
3746
3854
  "bg-surface",
3747
- mn[s],
3748
- K ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
3855
+ xn[s],
3856
+ G ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
3749
3857
  m
3750
3858
  ),
3751
3859
  children: [
3752
3860
  /* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: H() }),
3753
3861
  /* @__PURE__ */ e(
3754
- _t,
3862
+ At,
3755
3863
  {
3756
3864
  size: 16,
3757
3865
  className: i(
3758
3866
  "shrink-0 opacity-60 transition-transform duration-fast",
3759
- U && "rotate-180"
3867
+ j && "rotate-180"
3760
3868
  )
3761
3869
  }
3762
3870
  )
3763
3871
  ]
3764
3872
  }
3765
3873
  ),
3766
- U && /* @__PURE__ */ c(
3874
+ j && /* @__PURE__ */ c(
3767
3875
  "div",
3768
3876
  {
3769
3877
  style: de,
@@ -3775,7 +3883,7 @@ const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCa
3775
3883
  type: "text",
3776
3884
  placeholder: "Search...",
3777
3885
  value: B,
3778
- onChange: (L) => W(L.target.value),
3886
+ onChange: (L) => U(L.target.value),
3779
3887
  onKeyDown: (L) => {
3780
3888
  L.key === "Enter" && ce && (L.preventDefault(), q(B));
3781
3889
  },
@@ -3806,13 +3914,13 @@ const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCa
3806
3914
  {
3807
3915
  className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
3808
3916
  onClick: () => {
3809
- p?.(""), j(!1);
3917
+ p?.(""), W(!1);
3810
3918
  },
3811
3919
  children: u
3812
3920
  }
3813
3921
  ),
3814
3922
  oe.map((L) => {
3815
- const k = g ? Array.isArray(D) && D.includes(L.value) : D === L.value;
3923
+ const k = g ? Array.isArray(A) && A.includes(L.value) : A === L.value;
3816
3924
  return /* @__PURE__ */ e(
3817
3925
  "li",
3818
3926
  {
@@ -3844,19 +3952,19 @@ const _e = (t) => t == null ? "" : String(t), un = (t) => _e(t).trim().toLowerCa
3844
3952
  }
3845
3953
  )
3846
3954
  ] }),
3847
- (n || r) && /* @__PURE__ */ e("p", { className: i("mt-1 text-xs", K ? "text-danger-fg" : "text-text-muted"), children: n || r })
3955
+ (n || r) && /* @__PURE__ */ e("p", { className: i("mt-1 text-xs", G ? "text-danger-fg" : "text-text-muted"), children: n || r })
3848
3956
  ]
3849
3957
  }
3850
3958
  );
3851
3959
  }
3852
3960
  );
3853
- De.displayName = "Select";
3854
- const fn = {
3961
+ $e.displayName = "Select";
3962
+ const bn = {
3855
3963
  sm: "h-control-sm px-3 text-sm",
3856
3964
  md: "h-control-md px-3 text-base",
3857
3965
  lg: "h-control-lg px-3 text-base",
3858
3966
  full: "h-control-md px-3 text-base"
3859
- }, ot = "mb-1.5 block text-sm font-medium", ct = "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", it = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ce = ve(
3967
+ }, it = "mb-1.5 block text-sm font-medium", dt = "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", ut = (t) => t ? "border-danger-border bg-danger-soft" : "border-border-strong", Ce = ve(
3860
3968
  ({
3861
3969
  label: t,
3862
3970
  helperText: r,
@@ -3879,7 +3987,7 @@ const fn = {
3879
3987
  {
3880
3988
  htmlFor: p,
3881
3989
  className: i(
3882
- ot,
3990
+ it,
3883
3991
  h ? "text-danger-fg" : "text-text-muted",
3884
3992
  v
3885
3993
  ),
@@ -3896,11 +4004,11 @@ const fn = {
3896
4004
  "aria-invalid": h || void 0,
3897
4005
  "aria-describedby": C,
3898
4006
  className: i(
3899
- ct,
3900
- fn[s],
4007
+ dt,
4008
+ bn[s],
3901
4009
  l && "pl-9",
3902
4010
  (o || u) && "pr-9",
3903
- it(h),
4011
+ ut(h),
3904
4012
  m
3905
4013
  ),
3906
4014
  ...b
@@ -3926,7 +4034,7 @@ const fn = {
3926
4034
  }
3927
4035
  );
3928
4036
  Ce.displayName = "TextField";
3929
- function hn({
4037
+ function gn({
3930
4038
  value: t,
3931
4039
  onChange: r,
3932
4040
  onListFolders: n,
@@ -3945,11 +4053,11 @@ function hn({
3945
4053
  }), () => {
3946
4054
  f = !1;
3947
4055
  };
3948
- }, []);
4056
+ }, [n]);
3949
4057
  const m = t ?? {};
3950
4058
  return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
3951
4059
  /* @__PURE__ */ e(
3952
- De,
4060
+ $e,
3953
4061
  {
3954
4062
  size: a,
3955
4063
  fullWidth: !0,
@@ -3971,7 +4079,7 @@ function hn({
3971
4079
  )
3972
4080
  ] });
3973
4081
  }
3974
- const xn = et(null), Hs = ({ items: t, activeTab: r, onTabChange: n, className: s }) => {
4082
+ const pn = et(null), Ys = ({ items: t, activeTab: r, onTabChange: n, className: s }) => {
3975
4083
  const [a, l] = R(t[0]?.id || ""), o = r || a, u = (d) => {
3976
4084
  n ? n(d) : l(d);
3977
4085
  };
@@ -4004,7 +4112,7 @@ const xn = et(null), Hs = ({ items: t, activeTab: r, onTabChange: n, className:
4004
4112
  },
4005
4113
  d.id
4006
4114
  )) }) });
4007
- }, bn = ({
4115
+ }, vn = ({
4008
4116
  items: t,
4009
4117
  defaultTab: r,
4010
4118
  activeTab: n,
@@ -4034,20 +4142,20 @@ const xn = et(null), Hs = ({ items: t, activeTab: r, onTabChange: n, className:
4034
4142
  "text-xs px-2 py-1": l === "sm",
4035
4143
  "text-sm px-3 py-2": l === "md",
4036
4144
  "text-base px-4 py-3": l === "lg"
4037
- }, P = {
4145
+ }, O = {
4038
4146
  // Default variant
4039
4147
  "border-b-2 -mb-px": a === "default",
4040
4148
  // Pills variant
4041
4149
  "rounded-md": a === "pills",
4042
4150
  // Underline variant
4043
4151
  "border-b-2 pb-2": a === "underline"
4044
- }, _ = {
4152
+ }, $ = {
4045
4153
  "opacity-50 cursor-not-allowed": p.disabled,
4046
4154
  "cursor-pointer": !p.disabled
4047
- }, K = h ? {
4155
+ }, G = h ? {
4048
4156
  "border-accent-border text-text": a === "default" || a === "underline",
4049
4157
  "bg-surface text-text shadow-none": a === "pills"
4050
- } : {}, U = !h && !p.disabled ? {
4158
+ } : {}, j = !h && !p.disabled ? {
4051
4159
  "border-transparent text-text-muted hover:text-text": a === "default",
4052
4160
  "text-text-muted hover:text-text": a === "pills",
4053
4161
  "border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
@@ -4055,13 +4163,13 @@ const xn = et(null), Hs = ({ items: t, activeTab: r, onTabChange: n, className:
4055
4163
  return i(
4056
4164
  C,
4057
4165
  z,
4058
- P,
4059
- _,
4060
- K,
4061
- U
4166
+ O,
4167
+ $,
4168
+ G,
4169
+ j
4062
4170
  );
4063
4171
  };
4064
- return /* @__PURE__ */ e(xn.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
4172
+ return /* @__PURE__ */ e(pn.Provider, { value: f, children: /* @__PURE__ */ c("div", { children: [
4065
4173
  /* @__PURE__ */ e("div", { className: g, role: "tablist", children: t.map((p) => /* @__PURE__ */ e(
4066
4174
  "button",
4067
4175
  {
@@ -4090,14 +4198,14 @@ const xn = et(null), Hs = ({ items: t, activeTab: r, onTabChange: n, className:
4090
4198
  }
4091
4199
  )
4092
4200
  ] }) });
4093
- }, gn = {
4201
+ }, yn = {
4094
4202
  sm: "max-w-md",
4095
4203
  md: "max-w-lg",
4096
4204
  lg: "max-w-2xl",
4097
4205
  xl: "max-w-4xl",
4098
4206
  full: "max-w-full mx-4"
4099
4207
  };
4100
- function dt({
4208
+ function mt({
4101
4209
  open: t,
4102
4210
  onClose: r,
4103
4211
  title: n,
@@ -4139,7 +4247,7 @@ function dt({
4139
4247
  className: i(
4140
4248
  "relative w-full bg-surface rounded-lg shadow-modal",
4141
4249
  "focus:outline-none",
4142
- gn[s],
4250
+ yn[s],
4143
4251
  o
4144
4252
  ),
4145
4253
  role: "dialog",
@@ -4155,7 +4263,7 @@ function dt({
4155
4263
  onClick: r,
4156
4264
  className: "p-1 text-text-muted hover:text-text transition-colors",
4157
4265
  "aria-label": "Close modal",
4158
- children: /* @__PURE__ */ e(ee, { icon: Se, size: "lg", color: "current" })
4266
+ children: /* @__PURE__ */ e(J, { icon: Se, size: "lg", color: "current" })
4159
4267
  }
4160
4268
  )
4161
4269
  ] }),
@@ -4167,7 +4275,7 @@ function dt({
4167
4275
  }
4168
4276
  ) : null;
4169
4277
  }
4170
- const pn = ({
4278
+ const Nn = ({
4171
4279
  value: t,
4172
4280
  onChange: r,
4173
4281
  label: n,
@@ -4181,44 +4289,44 @@ const pn = ({
4181
4289
  onDownloadFile: m,
4182
4290
  onRegisterFile: f
4183
4291
  }) => {
4184
- const [b, g] = R(!1), [w, p] = R([]), [h, C] = R(null), [z, P] = R("/"), [_, K] = R([]), [U, j] = R(!1), [B, W] = R(""), [Z, J] = R(
4292
+ const [b, g] = R(!1), [w, p] = R([]), [h, C] = R(null), [z, O] = R("/"), [$, G] = R([]), [j, W] = R(!1), [B, U] = R(""), [ee, Z] = R(
4185
4293
  typeof t == "object" ? t : null
4186
- ), [de, Y] = R(!1), [y, x] = R(""), S = ne(null);
4187
- X(() => {
4188
- b && D();
4189
- }, [b]), X(() => {
4190
- b && h && E();
4191
- }, [b, h, z, B]);
4192
- const D = async () => {
4193
- j(!0);
4294
+ ), [de, Y] = R(!1), [y, x] = R(""), S = ne(null), A = fe(async () => {
4295
+ W(!0);
4194
4296
  try {
4195
4297
  const N = await d?.();
4196
4298
  N?.data && p(N.data);
4197
4299
  } catch (N) {
4198
4300
  console.error("Failed to load mounts", N);
4199
4301
  } finally {
4200
- j(!1);
4302
+ W(!1);
4201
4303
  }
4202
- }, E = async () => {
4304
+ }, [d]), E = fe(async () => {
4203
4305
  if (h) {
4204
- j(!0);
4306
+ W(!0);
4205
4307
  try {
4206
4308
  const N = await u?.({
4207
4309
  mountId: h.id,
4208
4310
  name: B,
4209
4311
  path: z
4210
4312
  });
4211
- N?.data && K(N.data);
4313
+ N?.data && G(N.data);
4212
4314
  } catch (N) {
4213
4315
  console.error("Failed to load files", N);
4214
4316
  } finally {
4215
- j(!1);
4317
+ W(!1);
4216
4318
  }
4217
4319
  }
4218
- }, A = async (N) => {
4320
+ }, [z, u, B, h]);
4321
+ X(() => {
4322
+ b && A();
4323
+ }, [b, A]), X(() => {
4324
+ b && h && E();
4325
+ }, [b, h, E]);
4326
+ const D = async (N) => {
4219
4327
  const I = N.target.files?.[0];
4220
4328
  if (I) {
4221
- j(!0);
4329
+ W(!0);
4222
4330
  try {
4223
4331
  const te = await I.arrayBuffer(), le = new Uint8Array(te), be = {
4224
4332
  id: `local-${Date.now()}`,
@@ -4231,17 +4339,17 @@ const pn = ({
4231
4339
  providerKey: I.name,
4232
4340
  ownerId: "me"
4233
4341
  };
4234
- J(be), r(be, le), g(!1);
4342
+ Z(be), r(be, le), g(!1);
4235
4343
  } catch (te) {
4236
4344
  console.error("Local file selection failed", te);
4237
4345
  } finally {
4238
- j(!1);
4346
+ W(!1);
4239
4347
  }
4240
4348
  }
4241
- }, $ = async (N) => {
4349
+ }, T = async (N) => {
4242
4350
  const I = N.target.files?.[0];
4243
4351
  if (!(!I || !h)) {
4244
- j(!0);
4352
+ W(!0);
4245
4353
  try {
4246
4354
  const te = await I.arrayBuffer(), le = await v?.({
4247
4355
  file: new Uint8Array(te),
@@ -4252,17 +4360,17 @@ const pn = ({
4252
4360
  });
4253
4361
  if (le?.data) {
4254
4362
  const be = le.data;
4255
- J(be), r(be, new Uint8Array(te)), g(!1);
4363
+ Z(be), r(be, new Uint8Array(te)), g(!1);
4256
4364
  }
4257
4365
  } catch (te) {
4258
4366
  console.error("Upload failed", te);
4259
4367
  } finally {
4260
- j(!1);
4368
+ W(!1);
4261
4369
  }
4262
4370
  }
4263
4371
  }, oe = async () => {
4264
4372
  if (!(!y || !h)) {
4265
- j(!0);
4373
+ W(!0);
4266
4374
  try {
4267
4375
  const N = `${z}${y}/`;
4268
4376
  f && (await f({
@@ -4278,39 +4386,39 @@ const pn = ({
4278
4386
  } catch (N) {
4279
4387
  console.error("Failed to create folder", N);
4280
4388
  } finally {
4281
- j(!1);
4389
+ W(!1);
4282
4390
  }
4283
4391
  }
4284
4392
  }, ce = async (N) => {
4285
- j(!0);
4393
+ W(!0);
4286
4394
  try {
4287
4395
  const I = await m?.(N.id);
4288
- J(N), r(N, I), g(!1);
4396
+ Z(N), r(N, I), g(!1);
4289
4397
  } catch (I) {
4290
4398
  console.error("Failed to download file", I);
4291
4399
  } finally {
4292
- j(!1);
4400
+ W(!1);
4293
4401
  }
4294
4402
  }, q = (N) => {
4295
- N.stopPropagation(), J(null), r(null);
4403
+ N.stopPropagation(), Z(null), r(null);
4296
4404
  }, H = pe(() => {
4297
4405
  const N = /* @__PURE__ */ new Set(), I = [];
4298
- return _.forEach((te) => {
4406
+ return $.forEach((te) => {
4299
4407
  if (te.type === "folder") {
4300
4408
  te.path === z && N.add(te.name);
4301
4409
  return;
4302
4410
  }
4303
- const le = te.providerKey || te.name, ye = (z ? le.substring(z.length) : le).split("/").filter((fe) => fe !== "");
4411
+ const le = te.providerKey || te.name, ye = (z ? le.substring(z.length) : le).split("/").filter((he) => he !== "");
4304
4412
  ye.length > 1 ? N.add(ye[0]) : ye.length === 1 && I.push(te);
4305
4413
  }), {
4306
4414
  folders: Array.from(N).sort(),
4307
4415
  files: I.sort((te, le) => te.name.localeCompare(le.name))
4308
4416
  };
4309
- }, [_, z]), L = (N) => {
4310
- P((I) => `${I}${N}/`);
4417
+ }, [$, z]), L = (N) => {
4418
+ O((I) => `${I}${N}/`);
4311
4419
  }, k = () => {
4312
4420
  const N = z.split("/").filter((I) => I !== "");
4313
- N.pop(), N.length === 0 ? P("/") : P(`${N.join("/")}/`);
4421
+ N.pop(), N.length === 0 ? O("/") : O(`${N.join("/")}/`);
4314
4422
  }, M = pe(() => {
4315
4423
  const N = H.folders.map((I) => ({
4316
4424
  id: `folder-${I}`,
@@ -4323,14 +4431,14 @@ const pn = ({
4323
4431
  type: "file"
4324
4432
  });
4325
4433
  }), N;
4326
- }, [H]), G = [
4434
+ }, [H]), K = [
4327
4435
  {
4328
4436
  id: "name",
4329
4437
  header: "Name",
4330
4438
  accessor: "name",
4331
4439
  cell: (N, I) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4332
4440
  /* @__PURE__ */ e(
4333
- ee,
4441
+ J,
4334
4442
  {
4335
4443
  icon: I.type === "folder" ? Ke : je,
4336
4444
  size: "sm",
@@ -4362,18 +4470,18 @@ const pn = ({
4362
4470
  onClick: (te) => {
4363
4471
  te.stopPropagation(), I.type === "folder" ? L(I.name) : ce(I);
4364
4472
  },
4365
- loading: U && I.type === "file" && Z?.id === I.id,
4473
+ loading: j && I.type === "file" && ee?.id === I.id,
4366
4474
  children: I.type === "folder" ? "Open" : "Select"
4367
4475
  }
4368
4476
  )
4369
4477
  }
4370
- ], O = [
4478
+ ], P = [
4371
4479
  {
4372
4480
  id: "name",
4373
4481
  header: "Mount Name",
4374
4482
  accessor: "name",
4375
4483
  cell: (N) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
4376
- /* @__PURE__ */ e(ee, { icon: We, size: "sm", color: "primary" }),
4484
+ /* @__PURE__ */ e(J, { icon: We, size: "sm", color: "primary" }),
4377
4485
  /* @__PURE__ */ e("span", { children: N })
4378
4486
  ] })
4379
4487
  },
@@ -4399,36 +4507,36 @@ const pn = ({
4399
4507
  ),
4400
4508
  children: [
4401
4509
  /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(
4402
- ee,
4510
+ J,
4403
4511
  {
4404
- icon: Z ? je : We,
4405
- color: Z ? "primary" : "secondary"
4512
+ icon: ee ? je : We,
4513
+ color: ee ? "primary" : "secondary"
4406
4514
  }
4407
4515
  ) }),
4408
- /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: Z ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: Z.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
4409
- Z && !l && /* @__PURE__ */ e("button", { onClick: q, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(ee, { icon: Se, size: "xs" }) })
4516
+ /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: ee ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: ee.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
4517
+ ee && !l && /* @__PURE__ */ e("button", { onClick: q, className: "p-1 hover:bg-surface-hover rounded", children: /* @__PURE__ */ e(J, { icon: Se, size: "xs" }) })
4410
4518
  ]
4411
4519
  }
4412
4520
  ),
4413
4521
  a && /* @__PURE__ */ e(ue, { variant: "body", size: "xs", className: "text-danger-fg", children: a }),
4414
4522
  /* @__PURE__ */ e(
4415
- dt,
4523
+ mt,
4416
4524
  {
4417
4525
  open: b,
4418
4526
  onClose: () => {
4419
- g(!1), C(null), P("/"), Y(!1);
4527
+ g(!1), C(null), O("/"), Y(!1);
4420
4528
  },
4421
4529
  title: h ? `Explorer: ${h.name}` : "Select Storage Mount",
4422
4530
  size: "lg",
4423
4531
  children: /* @__PURE__ */ e(
4424
- bn,
4532
+ vn,
4425
4533
  {
4426
4534
  variant: "pills",
4427
4535
  items: [
4428
4536
  {
4429
4537
  id: "remote",
4430
4538
  label: "Platform Storage",
4431
- content: /* @__PURE__ */ e("div", { className: "space-y-4", children: h ? /* @__PURE__ */ c(Ee, { children: [
4539
+ content: /* @__PURE__ */ e("div", { className: "space-y-4", children: h ? /* @__PURE__ */ c(Ae, { children: [
4432
4540
  /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2", children: [
4433
4541
  /* @__PURE__ */ e(
4434
4542
  se,
@@ -4437,7 +4545,7 @@ const pn = ({
4437
4545
  onClick: () => {
4438
4546
  z && z !== "/" ? k() : C(null);
4439
4547
  },
4440
- leftIcon: /* @__PURE__ */ e(ee, { icon: Dt, size: "xs" }),
4548
+ leftIcon: /* @__PURE__ */ e(J, { icon: Dt, size: "xs" }),
4441
4549
  children: z ? "Back" : "Back to Mounts"
4442
4550
  }
4443
4551
  ),
@@ -4447,7 +4555,7 @@ const pn = ({
4447
4555
  {
4448
4556
  placeholder: "Search...",
4449
4557
  value: B,
4450
- onChange: (N) => W(N.target.value),
4558
+ onChange: (N) => U(N.target.value),
4451
4559
  startIcon: /* @__PURE__ */ e(Le, { size: 14 }),
4452
4560
  fullWidth: !0
4453
4561
  }
@@ -4458,7 +4566,7 @@ const pn = ({
4458
4566
  {
4459
4567
  variant: "outline",
4460
4568
  onClick: () => Y(!0),
4461
- leftIcon: /* @__PURE__ */ e(ee, { icon: At, size: "xs" }),
4569
+ leftIcon: /* @__PURE__ */ e(J, { icon: Lt, size: "xs" }),
4462
4570
  children: "New Folder"
4463
4571
  }
4464
4572
  ),
@@ -4467,8 +4575,8 @@ const pn = ({
4467
4575
  {
4468
4576
  variant: "primary",
4469
4577
  onClick: () => S.current?.click(),
4470
- leftIcon: /* @__PURE__ */ e(ee, { icon: Lt, size: "xs" }),
4471
- loading: U,
4578
+ leftIcon: /* @__PURE__ */ e(J, { icon: It, size: "xs" }),
4579
+ loading: j,
4472
4580
  children: "Upload"
4473
4581
  }
4474
4582
  ),
@@ -4478,14 +4586,14 @@ const pn = ({
4478
4586
  type: "file",
4479
4587
  className: "hidden",
4480
4588
  ref: S,
4481
- onChange: $,
4589
+ onChange: T,
4482
4590
  accept: o
4483
4591
  }
4484
4592
  )
4485
4593
  ] })
4486
4594
  ] }),
4487
4595
  de && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
4488
- /* @__PURE__ */ e(ee, { icon: Ke, size: "sm", color: "warning" }),
4596
+ /* @__PURE__ */ e(J, { icon: Ke, size: "sm", color: "warning" }),
4489
4597
  /* @__PURE__ */ e(
4490
4598
  Ce,
4491
4599
  {
@@ -4495,15 +4603,15 @@ const pn = ({
4495
4603
  autoFocus: !0
4496
4604
  }
4497
4605
  ),
4498
- /* @__PURE__ */ e(se, { onClick: oe, loading: U, children: "Create" }),
4606
+ /* @__PURE__ */ e(se, { onClick: oe, loading: j, children: "Create" }),
4499
4607
  /* @__PURE__ */ e(se, { variant: "ghost", onClick: () => Y(!1), children: "Cancel" })
4500
4608
  ] }),
4501
4609
  /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
4502
4610
  Ye,
4503
4611
  {
4504
4612
  data: M,
4505
- columns: G,
4506
- loading: U,
4613
+ columns: K,
4614
+ loading: j,
4507
4615
  emptyContent: "This folder is empty",
4508
4616
  onRowClick: (N) => N.type === "folder" ? L(N.name) : ce(N)
4509
4617
  }
@@ -4512,8 +4620,8 @@ const pn = ({
4512
4620
  Ye,
4513
4621
  {
4514
4622
  data: w,
4515
- columns: O,
4516
- loading: U,
4623
+ columns: P,
4624
+ loading: j,
4517
4625
  emptyContent: "No storage mounts configured",
4518
4626
  onRowClick: (N) => C(N)
4519
4627
  }
@@ -4523,7 +4631,7 @@ const pn = ({
4523
4631
  id: "local",
4524
4632
  label: "Local File",
4525
4633
  content: /* @__PURE__ */ e("div", { className: "space-y-6", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 border-2 border-dashed border-border rounded-xl bg-surface-sunk/50", children: [
4526
- /* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(ee, { icon: je, size: "xl", color: "primary" }) }),
4634
+ /* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(J, { icon: je, size: "xl", color: "primary" }) }),
4527
4635
  /* @__PURE__ */ e(ue, { variant: "label", size: "lg", weight: "semibold", children: "Select a file from your computer" }),
4528
4636
  /* @__PURE__ */ c(
4529
4637
  ue,
@@ -4544,7 +4652,7 @@ const pn = ({
4544
4652
  {
4545
4653
  variant: "primary",
4546
4654
  size: "lg",
4547
- loading: U,
4655
+ loading: j,
4548
4656
  className: "pointer-events-none",
4549
4657
  children: "Browse Local File"
4550
4658
  }
@@ -4554,9 +4662,9 @@ const pn = ({
4554
4662
  {
4555
4663
  type: "file",
4556
4664
  className: "hidden",
4557
- onChange: A,
4665
+ onChange: D,
4558
4666
  accept: o,
4559
- disabled: U
4667
+ disabled: j
4560
4668
  }
4561
4669
  )
4562
4670
  ] })
@@ -4568,7 +4676,7 @@ const pn = ({
4568
4676
  }
4569
4677
  )
4570
4678
  ] });
4571
- }, vn = {
4679
+ }, wn = {
4572
4680
  sm: "px-3 py-1.5 text-sm",
4573
4681
  md: "px-3 py-2 text-base",
4574
4682
  lg: "px-3 py-2 text-md",
@@ -4595,7 +4703,7 @@ const pn = ({
4595
4703
  {
4596
4704
  htmlFor: w,
4597
4705
  className: i(
4598
- ot,
4706
+ it,
4599
4707
  p ? "text-danger-fg" : "text-text-muted",
4600
4708
  u
4601
4709
  ),
@@ -4612,10 +4720,10 @@ const pn = ({
4612
4720
  "aria-invalid": p || void 0,
4613
4721
  "aria-describedby": h,
4614
4722
  className: i(
4615
- ct,
4723
+ dt,
4616
4724
  "resize-y leading-relaxed",
4617
- vn[s],
4618
- it(p),
4725
+ wn[s],
4726
+ ut(p),
4619
4727
  d
4620
4728
  ),
4621
4729
  ...f
@@ -4647,7 +4755,7 @@ function Ze(t, r) {
4647
4755
  t
4648
4756
  );
4649
4757
  }
4650
- function yn(t, r, n) {
4758
+ function kn(t, r, n) {
4651
4759
  const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
4652
4760
  let l = a;
4653
4761
  for (let o = 0; o < s.length - 1; o++) {
@@ -4656,7 +4764,7 @@ function yn(t, r, n) {
4656
4764
  }
4657
4765
  return l[s[s.length - 1]] = n, a;
4658
4766
  }
4659
- function Nn(t, r) {
4767
+ function Cn(t, r) {
4660
4768
  const n = r.split("."), s = Array.isArray(t) ? [...t] : { ...t };
4661
4769
  let a = s;
4662
4770
  for (let l = 0; l < n.length - 1; l++) {
@@ -4666,7 +4774,7 @@ function Nn(t, r) {
4666
4774
  }
4667
4775
  return delete a[n[n.length - 1]], s;
4668
4776
  }
4669
- function wn({
4777
+ function Sn({
4670
4778
  title: t,
4671
4779
  description: r,
4672
4780
  className: n,
@@ -4680,7 +4788,7 @@ function wn({
4680
4788
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: s })
4681
4789
  ] });
4682
4790
  }
4683
- const qs = ({
4791
+ const Xs = ({
4684
4792
  groups: t,
4685
4793
  data: r,
4686
4794
  onSubmit: n,
@@ -4698,16 +4806,16 @@ const qs = ({
4698
4806
  ref: w,
4699
4807
  sdk: p
4700
4808
  }) => {
4701
- const [h, C] = R(r || {}), z = ae.useId(), P = xe(
4809
+ const [h, C] = R(r || {}), z = ae.useId(), O = fe(
4702
4810
  (x) => `${z}-${String(x).replace(/\./g, "-")}`,
4703
4811
  [z]
4704
- ), [_, K] = R({}), [U, j] = R({});
4812
+ ), [$, G] = R({}), [j, W] = R({});
4705
4813
  X(() => {
4706
4814
  r && C({ ...r });
4707
4815
  }, [r]);
4708
- const B = xe(
4709
- (x, S, D) => {
4710
- const E = t.flatMap((A) => A.items).find((A) => A.name === x);
4816
+ const B = fe(
4817
+ (x, S, A) => {
4818
+ const E = t.flatMap((D) => D.items).find((D) => D.name === x);
4711
4819
  if (!E) return null;
4712
4820
  if (E.required && (S == null || S === ""))
4713
4821
  return `${E.label} is required`;
@@ -4717,69 +4825,69 @@ const qs = ({
4717
4825
  if (S && !Array.isArray(S))
4718
4826
  return `${E.label} must be an array.`;
4719
4827
  if (Array.isArray(S) && E.arrayFields) {
4720
- const A = [];
4721
- let $ = !1;
4828
+ const D = [];
4829
+ let T = !1;
4722
4830
  if (S.forEach((oe, ce) => {
4723
4831
  const q = {};
4724
4832
  for (const H of E.arrayFields) {
4725
4833
  const L = oe?.[H.name];
4726
4834
  if (H.required && (L == null || L === ""))
4727
- q[H.name] = `${H.label} is required`, $ = !0;
4835
+ q[H.name] = `${H.label} is required`, T = !0;
4728
4836
  else if (H.validator) {
4729
4837
  const k = H.validator(L, oe);
4730
- k && (q[H.name] = k, $ = !0);
4838
+ k && (q[H.name] = k, T = !0);
4731
4839
  }
4732
4840
  }
4733
- A[ce] = q;
4734
- }), $)
4735
- return JSON.stringify(A);
4841
+ D[ce] = q;
4842
+ }), T)
4843
+ return JSON.stringify(D);
4736
4844
  }
4737
4845
  }
4738
- return E.validator ? E.validator(S, D) : null;
4846
+ return E.validator ? E.validator(S, A) : null;
4739
4847
  },
4740
4848
  [t]
4741
- ), W = xe(
4849
+ ), U = fe(
4742
4850
  (x, S) => {
4743
- let D = yn(h, x, S);
4744
- t.flatMap(($) => $.items).find(($) => $.name === x)?.removeIfEmpty && (S == null || S === "") && (D = Nn(D, x)), C(D), j(($) => ({ ...$, [x]: !0 }));
4745
- const A = B(x, S, D);
4746
- K(($) => ({
4747
- ...$,
4748
- [x]: A || ""
4749
- })), a?.(D, x);
4851
+ let A = kn(h, x, S);
4852
+ t.flatMap((T) => T.items).find((T) => T.name === x)?.removeIfEmpty && (S == null || S === "") && (A = Cn(A, x)), C(A), W((T) => ({ ...T, [x]: !0 }));
4853
+ const D = B(x, S, A);
4854
+ G((T) => ({
4855
+ ...T,
4856
+ [x]: D || ""
4857
+ })), a?.(A, x);
4750
4858
  },
4751
4859
  [h, t, B, a]
4752
- ), Z = xe(
4860
+ ), ee = fe(
4753
4861
  async (x) => {
4754
4862
  if (x.preventDefault(), b) return;
4755
- const S = {}, D = t.flatMap((A) => A.items);
4756
- for (const A of D) {
4757
- if (A.hidden || A.conditional && !A.conditional(h))
4863
+ const S = {}, A = t.flatMap((D) => D.items);
4864
+ for (const D of A) {
4865
+ if (D.hidden || D.conditional && !D.conditional(h))
4758
4866
  continue;
4759
- const $ = B(
4760
- A.name,
4761
- Ze(h, A.name),
4867
+ const T = B(
4868
+ D.name,
4869
+ Ze(h, D.name),
4762
4870
  h
4763
4871
  );
4764
- $ && (S[A.name] = $);
4872
+ T && (S[D.name] = T);
4765
4873
  }
4766
4874
  if (o) {
4767
- const A = o(h);
4768
- A && Object.assign(S, A);
4875
+ const D = o(h);
4876
+ D && Object.assign(S, D);
4769
4877
  }
4770
- if (K(S), Object.keys(S).some((A) => S[A]))
4878
+ if (G(S), Object.keys(S).some((D) => S[D]))
4771
4879
  return;
4772
4880
  const E = l ? l(h) : h;
4773
4881
  await n?.(h, E);
4774
4882
  },
4775
4883
  [h, t, B, o, l, n, b]
4776
- ), J = xe(
4884
+ ), Z = fe(
4777
4885
  (x) => {
4778
- const S = Ze(h, x.name), D = U[x.name] ? _[x.name] : void 0, E = x.disabled || b, A = {
4886
+ const S = Ze(h, x.name), A = j[x.name] ? $[x.name] : void 0, E = x.disabled || b, D = {
4779
4887
  // Ties the field to the `<label>` the group wrapper renders; without it
4780
4888
  // labels are unassociated — screen readers announce nothing, clicking a
4781
4889
  // label focuses nothing, and tests cannot find a field by its label.
4782
- id: P(x.name),
4890
+ id: O(x.name),
4783
4891
  value: S || "",
4784
4892
  disabled: E,
4785
4893
  required: x.required,
@@ -4797,11 +4905,11 @@ const qs = ({
4797
4905
  return /* @__PURE__ */ e(
4798
4906
  Ce,
4799
4907
  {
4800
- ...A,
4801
- onChange: ($) => W(x.name, $.target.value),
4908
+ ...D,
4909
+ onChange: (T) => U(x.name, T.target.value),
4802
4910
  type: x.textType || x.type,
4803
4911
  ...Xe(x.autocomplete),
4804
- error: D,
4912
+ error: A,
4805
4913
  size: f
4806
4914
  }
4807
4915
  );
@@ -4809,27 +4917,27 @@ const qs = ({
4809
4917
  return /* @__PURE__ */ e(
4810
4918
  He,
4811
4919
  {
4812
- ...A,
4813
- onChange: ($) => W(x.name, $.target.value),
4920
+ ...D,
4921
+ onChange: (T) => U(x.name, T.target.value),
4814
4922
  rows: x.rows ?? 4,
4815
- error: D,
4923
+ error: A,
4816
4924
  size: f
4817
4925
  }
4818
4926
  );
4819
4927
  case "select":
4820
4928
  return /* @__PURE__ */ e(
4821
- De,
4929
+ $e,
4822
4930
  {
4823
- ...A,
4824
- onChange: ($) => W(x.name, $),
4825
- options: (x.options || []).map(($) => ({
4826
- ...$,
4827
- value: String($.value)
4931
+ ...D,
4932
+ onChange: (T) => U(x.name, T),
4933
+ options: (x.options || []).map((T) => ({
4934
+ ...T,
4935
+ value: String(T.value)
4828
4936
  })),
4829
4937
  searchable: x.searchable,
4830
4938
  multiple: x.multiple,
4831
4939
  allowCreate: x.allowCreate,
4832
- error: D,
4940
+ error: A,
4833
4941
  size: f
4834
4942
  }
4835
4943
  );
@@ -4838,14 +4946,14 @@ const qs = ({
4838
4946
  // open to learn what the choices even are.
4839
4947
  case "segmented":
4840
4948
  return /* @__PURE__ */ e(
4841
- sr,
4949
+ lr,
4842
4950
  {
4843
4951
  "aria-label": x.label,
4844
4952
  value: S == null ? "" : String(S),
4845
- onChange: ($) => W(x.name, $),
4846
- options: (x.options || []).map(($) => ({
4847
- value: String($.value),
4848
- label: $.label
4953
+ onChange: (T) => U(x.name, T),
4954
+ options: (x.options || []).map((T) => ({
4955
+ value: String(T.value),
4956
+ label: T.label
4849
4957
  })),
4850
4958
  size: f === "sm" ? "sm" : "md",
4851
4959
  className: x.disabled ? "pointer-events-none opacity-50" : void 0
@@ -4855,15 +4963,15 @@ const qs = ({
4855
4963
  return /* @__PURE__ */ e(
4856
4964
  we,
4857
4965
  {
4858
- ...A,
4966
+ ...D,
4859
4967
  label: x.label,
4860
4968
  checked: !!S,
4861
- onChange: ($) => W(x.name, $.target.checked),
4969
+ onChange: (T) => U(x.name, T.target.checked),
4862
4970
  size: f
4863
4971
  }
4864
4972
  );
4865
4973
  case "radio":
4866
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: x.options?.map(($) => /* @__PURE__ */ c(
4974
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: x.options?.map((T) => /* @__PURE__ */ c(
4867
4975
  "label",
4868
4976
  {
4869
4977
  className: "flex cursor-pointer items-center gap-3 text-base text-text",
@@ -4873,67 +4981,67 @@ const qs = ({
4873
4981
  {
4874
4982
  type: "radio",
4875
4983
  name: x.name,
4876
- value: $.value,
4877
- checked: S === $.value,
4878
- onChange: () => W(x.name, $.value),
4879
- disabled: E || $.disabled,
4984
+ value: T.value,
4985
+ checked: S === T.value,
4986
+ onChange: () => U(x.name, T.value),
4987
+ disabled: E || T.disabled,
4880
4988
  className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
4881
4989
  }
4882
4990
  ),
4883
- $.label
4991
+ T.label
4884
4992
  ]
4885
4993
  },
4886
- $.value
4994
+ T.value
4887
4995
  )) });
4888
4996
  case "date":
4889
4997
  return /* @__PURE__ */ e(
4890
4998
  Be,
4891
4999
  {
4892
- ...A,
5000
+ ...D,
4893
5001
  value: S ? new Date(S) : null,
4894
- onChange: ($) => W(x.name, $),
5002
+ onChange: (T) => U(x.name, T),
4895
5003
  size: f
4896
5004
  }
4897
5005
  );
4898
5006
  case "file":
4899
5007
  return /* @__PURE__ */ e(
4900
- pn,
5008
+ Nn,
4901
5009
  {
4902
- ...A,
5010
+ ...D,
4903
5011
  value: S,
4904
- onChange: ($) => W(x.name, $),
4905
- error: D,
4906
- onListFiles: ($) => p?.http.invoke({
5012
+ onChange: (T) => U(x.name, T),
5013
+ error: A,
5014
+ onListFiles: (T) => p?.http.invoke({
4907
5015
  method: "POST",
4908
5016
  action: "storage.file.list",
4909
- body: $
5017
+ body: T
4910
5018
  }),
4911
5019
  onListMounts: () => p?.http.invoke({
4912
5020
  method: "GET",
4913
5021
  action: "storage.mount"
4914
5022
  }),
4915
- onUploadFile: ($) => p?.http.invoke({
5023
+ onUploadFile: (T) => p?.http.invoke({
4916
5024
  method: "POST",
4917
5025
  action: "storage.file.upload",
4918
- body: $
5026
+ body: T
4919
5027
  }),
4920
- onDownloadFile: ($) => p?.http.invoke({
5028
+ onDownloadFile: (T) => p?.http.invoke({
4921
5029
  method: "GET",
4922
- action: `storage.file.${$}.download`
5030
+ action: `storage.file.${T}.download`
4923
5031
  }),
4924
- onRegisterFile: ($) => p?.http.invoke({
5032
+ onRegisterFile: (T) => p?.http.invoke({
4925
5033
  method: "POST",
4926
5034
  action: "storage.file.folder",
4927
- body: $
5035
+ body: T
4928
5036
  })
4929
5037
  }
4930
5038
  );
4931
5039
  case "folder":
4932
5040
  return /* @__PURE__ */ e(
4933
- hn,
5041
+ gn,
4934
5042
  {
4935
5043
  value: S || {},
4936
- onChange: ($) => W(x.name, $),
5044
+ onChange: (T) => U(x.name, T),
4937
5045
  onListFolders: () => p?.http.invoke({
4938
5046
  method: "GET",
4939
5047
  action: "storage.mount"
@@ -4946,43 +5054,43 @@ const qs = ({
4946
5054
  case "custom":
4947
5055
  return x.customComponent?.({
4948
5056
  value: S,
4949
- onChange: ($) => W(x.name, $),
4950
- error: D,
5057
+ onChange: (T) => U(x.name, T),
5058
+ error: A,
4951
5059
  disabled: E
4952
5060
  });
4953
5061
  case "array": {
4954
- const $ = S || [];
5062
+ const T = S || [];
4955
5063
  let oe = [];
4956
- if (typeof D == "string" && D.startsWith("["))
5064
+ if (typeof A == "string" && A.startsWith("["))
4957
5065
  try {
4958
- oe = JSON.parse(D);
5066
+ oe = JSON.parse(A);
4959
5067
  } catch {
4960
5068
  }
4961
5069
  const ce = () => {
4962
- W(x.name, [...$, {}]);
5070
+ U(x.name, [...T, {}]);
4963
5071
  }, q = (L) => {
4964
- W(
5072
+ U(
4965
5073
  x.name,
4966
- $.filter((k, M) => M !== L)
5074
+ T.filter((k, M) => M !== L)
4967
5075
  );
4968
5076
  }, H = (L, k, M) => {
4969
- const G = [...$];
4970
- G[L] = {
4971
- ...G[L],
5077
+ const K = [...T];
5078
+ K[L] = {
5079
+ ...K[L],
4972
5080
  [k]: M
4973
- }, W(x.name, G);
5081
+ }, U(x.name, K);
4974
5082
  };
4975
5083
  return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
4976
- $.map((L, k) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
5084
+ T.map((L, k) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
4977
5085
  /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: x.arrayFields?.map((M) => {
4978
- const G = oe?.[k]?.[M.name];
5086
+ const K = oe?.[k]?.[M.name];
4979
5087
  return /* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
4980
5088
  k === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
4981
5089
  M.label,
4982
5090
  M.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
4983
5091
  ] }),
4984
5092
  (() => {
4985
- const O = {
5093
+ const P = {
4986
5094
  value: L?.[M.name] || "",
4987
5095
  disabled: E,
4988
5096
  required: M.required,
@@ -4999,7 +5107,7 @@ const qs = ({
4999
5107
  return /* @__PURE__ */ e(
5000
5108
  Ce,
5001
5109
  {
5002
- ...O,
5110
+ ...P,
5003
5111
  onChange: (N) => H(
5004
5112
  k,
5005
5113
  M.name,
@@ -5007,7 +5115,7 @@ const qs = ({
5007
5115
  ),
5008
5116
  type: M.textType || M.type,
5009
5117
  ...Xe(M.autocomplete),
5010
- error: G,
5118
+ error: K,
5011
5119
  size: f
5012
5120
  }
5013
5121
  );
@@ -5015,22 +5123,22 @@ const qs = ({
5015
5123
  return /* @__PURE__ */ e(
5016
5124
  He,
5017
5125
  {
5018
- ...O,
5126
+ ...P,
5019
5127
  onChange: (N) => H(
5020
5128
  k,
5021
5129
  M.name,
5022
5130
  N.target.value
5023
5131
  ),
5024
5132
  rows: M.rows ?? 4,
5025
- error: G,
5133
+ error: K,
5026
5134
  size: f
5027
5135
  }
5028
5136
  );
5029
5137
  case "select":
5030
5138
  return /* @__PURE__ */ e(
5031
- De,
5139
+ $e,
5032
5140
  {
5033
- ...O,
5141
+ ...P,
5034
5142
  onChange: (N) => H(k, M.name, N),
5035
5143
  options: (M.options || []).map((N) => ({
5036
5144
  ...N,
@@ -5039,7 +5147,7 @@ const qs = ({
5039
5147
  searchable: M.searchable,
5040
5148
  multiple: M.multiple,
5041
5149
  allowCreate: M.allowCreate,
5042
- error: G,
5150
+ error: K,
5043
5151
  size: f
5044
5152
  }
5045
5153
  );
@@ -5047,7 +5155,7 @@ const qs = ({
5047
5155
  return /* @__PURE__ */ e(
5048
5156
  we,
5049
5157
  {
5050
- ...O,
5158
+ ...P,
5051
5159
  checked: !!L?.[M.name],
5052
5160
  onChange: (N) => H(
5053
5161
  k,
@@ -5089,7 +5197,7 @@ const qs = ({
5089
5197
  return /* @__PURE__ */ e(
5090
5198
  Be,
5091
5199
  {
5092
- ...O,
5200
+ ...P,
5093
5201
  value: N ? new Date(N) : null,
5094
5202
  onChange: (I) => H(k, M.name, I),
5095
5203
  size: f
@@ -5100,7 +5208,7 @@ const qs = ({
5100
5208
  return M.customComponent?.({
5101
5209
  value: L?.[M.name],
5102
5210
  onChange: (N) => H(k, M.name, N),
5103
- error: G,
5211
+ error: K,
5104
5212
  disabled: E
5105
5213
  });
5106
5214
  default:
@@ -5110,7 +5218,7 @@ const qs = ({
5110
5218
  ] });
5111
5219
  }
5112
5220
  })(),
5113
- G && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: G })
5221
+ K && /* @__PURE__ */ e("p", { className: "text-xs text-danger-fg", children: K })
5114
5222
  ] }, M.name);
5115
5223
  }) }),
5116
5224
  /* @__PURE__ */ e(
@@ -5124,7 +5232,7 @@ const qs = ({
5124
5232
  onClick: () => q(k),
5125
5233
  disabled: E,
5126
5234
  className: i("shrink-0", k === 0 && "mt-5"),
5127
- children: /* @__PURE__ */ e(It, { className: "size-icon-md" })
5235
+ children: /* @__PURE__ */ e(Ot, { className: "size-icon-md" })
5128
5236
  }
5129
5237
  )
5130
5238
  ] }, k)),
@@ -5148,14 +5256,14 @@ const qs = ({
5148
5256
  return null;
5149
5257
  }
5150
5258
  },
5151
- [h, U, _, b, f, W]
5152
- ), de = xe(
5259
+ [h, j, $, b, f, U, O, p?.http.invoke]
5260
+ ), de = fe(
5153
5261
  (x) => {
5154
5262
  if (x.conditional && !x.conditional(h))
5155
5263
  return null;
5156
5264
  const S = x.items.filter((E) => !(E.hidden || E.conditional && !E.conditional(h)));
5157
5265
  if (S.length === 0) return null;
5158
- const D = i(
5266
+ const A = i(
5159
5267
  x.layout === "flex" ? "flex flex-wrap gap-3.5" : "grid gap-3.5",
5160
5268
  x.layout !== "flex" && {
5161
5269
  "grid-cols-1": !x.columns || x.columns === 1,
@@ -5170,13 +5278,13 @@ const qs = ({
5170
5278
  // form *is* the page now, so a panel around each section would be a
5171
5279
  // second surface on top of the one it already sits on.
5172
5280
  /* @__PURE__ */ e(
5173
- wn,
5281
+ Sn,
5174
5282
  {
5175
5283
  title: x.title,
5176
5284
  description: x.description,
5177
5285
  className: "not-last:border-b not-last:border-border-subtle",
5178
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: D, children: S.map((E) => {
5179
- const A = U[E.name] ? _[E.name] : void 0;
5286
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: A, children: S.map((E) => {
5287
+ const D = j[E.name] ? $[E.name] : void 0;
5180
5288
  return /* @__PURE__ */ c(
5181
5289
  "div",
5182
5290
  {
@@ -5192,7 +5300,7 @@ const qs = ({
5192
5300
  E.type !== "custom" && E.type !== "checkbox" && /* @__PURE__ */ c(
5193
5301
  "label",
5194
5302
  {
5195
- htmlFor: P(E.name),
5303
+ htmlFor: O(E.name),
5196
5304
  className: "block text-sm font-medium text-text-muted",
5197
5305
  children: [
5198
5306
  E.label,
@@ -5200,8 +5308,8 @@ const qs = ({
5200
5308
  ]
5201
5309
  }
5202
5310
  ),
5203
- J(E),
5204
- E.help && !A && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: E.help })
5311
+ Z(E),
5312
+ E.help && !D && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: E.help })
5205
5313
  ]
5206
5314
  },
5207
5315
  E.name
@@ -5212,7 +5320,7 @@ const qs = ({
5212
5320
  )
5213
5321
  );
5214
5322
  },
5215
- [h, U, _, J]
5323
+ [h, j, $, Z, O]
5216
5324
  ), Y = i(
5217
5325
  {
5218
5326
  "max-w-settings": f === "sm",
@@ -5222,10 +5330,10 @@ const qs = ({
5222
5330
  },
5223
5331
  g
5224
5332
  ), y = f === "full" ? "md" : f;
5225
- return /* @__PURE__ */ c("form", { ref: w, onSubmit: Z, className: Y, children: [
5333
+ return /* @__PURE__ */ c("form", { ref: w, onSubmit: ee, className: Y, children: [
5226
5334
  !v && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
5227
5335
  /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(de) }),
5228
- v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ c(Ee, { children: [
5336
+ v && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: [
5229
5337
  /* @__PURE__ */ e("div", { className: "ml-auto" }),
5230
5338
  s && /* @__PURE__ */ e(
5231
5339
  se,
@@ -5251,10 +5359,10 @@ const qs = ({
5251
5359
  children: u.label
5252
5360
  }
5253
5361
  )
5254
- ] }) })
5362
+ ] })
5255
5363
  ] });
5256
5364
  };
5257
- function Vs({
5365
+ function Zs({
5258
5366
  label: t,
5259
5367
  value: r,
5260
5368
  onChange: n,
@@ -5271,8 +5379,8 @@ function Vs({
5271
5379
  const b = ne(null), [g, w] = R(null), p = async (h) => {
5272
5380
  if (!h) return;
5273
5381
  w(null);
5274
- const C = await Cn(h, s);
5275
- if (a && kn(C) > a) {
5382
+ const C = await zn(h, s);
5383
+ if (a && En(C) > a) {
5276
5384
  w(f);
5277
5385
  return;
5278
5386
  }
@@ -5331,11 +5439,11 @@ function Vs({
5331
5439
  )
5332
5440
  ] });
5333
5441
  }
5334
- function kn(t) {
5442
+ function En(t) {
5335
5443
  const r = t.slice(t.indexOf(",") + 1), n = r.endsWith("==") ? 2 : r.endsWith("=") ? 1 : 0;
5336
5444
  return Math.floor(r.length * 3 / 4) - n;
5337
5445
  }
5338
- function Cn(t, r) {
5446
+ function zn(t, r) {
5339
5447
  return new Promise((n, s) => {
5340
5448
  const a = new FileReader();
5341
5449
  a.onload = () => {
@@ -5353,7 +5461,7 @@ function Cn(t, r) {
5353
5461
  }, a.onerror = s, a.readAsDataURL(t);
5354
5462
  });
5355
5463
  }
5356
- const Ne = (...t) => t.filter(Boolean).join(" "), Sn = (t) => /* @__PURE__ */ e(Le, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), En = (t) => /* @__PURE__ */ e(Ae, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), zn = {
5464
+ const Ne = (...t) => t.filter(Boolean).join(" "), Mn = (t) => /* @__PURE__ */ e(Le, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Tn = (t) => /* @__PURE__ */ e(De, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), _n = {
5357
5465
  sm: "h-control-sm px-3 text-sm",
5358
5466
  md: "h-control-md px-3 text-base",
5359
5467
  lg: "h-control-lg px-3 text-base",
@@ -5363,14 +5471,14 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Sn = (t) => /* @__PURE__ */ e(
5363
5471
  md: "h-5 w-5",
5364
5472
  lg: "h-6 w-6",
5365
5473
  full: "h-6 w-6"
5366
- }, Mn = ve(
5474
+ }, $n = ve(
5367
5475
  ({
5368
5476
  label: t,
5369
5477
  helperText: r,
5370
5478
  error: n,
5371
5479
  size: s = "md",
5372
5480
  fullWidth: a = !1,
5373
- startIcon: l = /* @__PURE__ */ e(Sn, {}),
5481
+ startIcon: l = /* @__PURE__ */ e(Mn, {}),
5374
5482
  loading: o = !1,
5375
5483
  containerClassName: u,
5376
5484
  labelClassName: d,
@@ -5384,10 +5492,10 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Sn = (t) => /* @__PURE__ */ e(
5384
5492
  value: h,
5385
5493
  onChange: C,
5386
5494
  ...z
5387
- }, P) => {
5388
- const _ = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, K = !!n, U = ne(null), j = ne(null), [B, W] = R(h || ""), [Z, J] = R(!1), [de, Y] = R(!1), [y, x] = R(!1);
5495
+ }, O) => {
5496
+ const $ = m || `searchfield-${Math.random().toString(36).substr(2, 9)}`, G = !!n, j = ne(null), W = ne(null), [B, U] = R(h || ""), [ee, Z] = R(!1), [de, Y] = R(!1), [y, x] = R(!1);
5389
5497
  X(() => {
5390
- h !== void 0 && W(h);
5498
+ h !== void 0 && U(h);
5391
5499
  }, [h]);
5392
5500
  const S = pe(() => {
5393
5501
  if (p && !y || !B) return f;
@@ -5416,18 +5524,18 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Sn = (t) => /* @__PURE__ */ e(
5416
5524
  };
5417
5525
  }, [B, w, b]), X(() => {
5418
5526
  const q = (H) => {
5419
- U.current && !U.current.contains(H.target) && J(!1);
5527
+ j.current && !j.current.contains(H.target) && Z(!1);
5420
5528
  };
5421
5529
  return document.addEventListener("mousedown", q), () => document.removeEventListener("mousedown", q);
5422
5530
  }, []);
5423
- const D = (q) => {
5531
+ const A = (q) => {
5424
5532
  const H = q.target.value;
5425
- W(H), J(!0), x(!0), C && C(q);
5533
+ U(H), Z(!0), x(!0), C && C(q);
5426
5534
  }, E = (q) => {
5427
- W(q.label), J(!1), x(!1), g && g(q.value);
5428
- }, A = () => {
5429
- (f.length > 0 || b) && (J(!0), x(!1));
5430
- }, $ = o || de, oe = Z && (S.length > 0 || $), ce = pe(() => P || j, [P]);
5535
+ U(q.label), Z(!1), x(!1), g && g(q.value);
5536
+ }, D = () => {
5537
+ (f.length > 0 || b) && (Z(!0), x(!1));
5538
+ }, T = o || de, oe = ee && (S.length > 0 || T), ce = pe(() => O || W, [O]);
5431
5539
  return /* @__PURE__ */ c(
5432
5540
  "div",
5433
5541
  {
@@ -5437,15 +5545,15 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Sn = (t) => /* @__PURE__ */ e(
5437
5545
  u || "",
5438
5546
  "relative"
5439
5547
  ),
5440
- ref: U,
5548
+ ref: j,
5441
5549
  children: [
5442
5550
  t && /* @__PURE__ */ e(
5443
5551
  "label",
5444
5552
  {
5445
- htmlFor: _,
5553
+ htmlFor: $,
5446
5554
  className: Ne(
5447
5555
  "block text-sm font-medium mb-1",
5448
- K ? "text-danger-fg" : "text-text",
5556
+ G ? "text-danger-fg" : "text-text",
5449
5557
  d || ""
5450
5558
  ),
5451
5559
  children: t
@@ -5457,67 +5565,59 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Sn = (t) => /* @__PURE__ */ e(
5457
5565
  "input",
5458
5566
  {
5459
5567
  ref: ce,
5460
- id: _,
5568
+ id: $,
5461
5569
  value: B,
5462
- onChange: D,
5463
- onFocus: A,
5570
+ onChange: A,
5571
+ onFocus: D,
5464
5572
  className: Ne(
5465
5573
  // Base styles
5466
5574
  "block w-full rounded-tile border bg-surface-input transition-colors duration-fast ease-out",
5467
5575
  "placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
5468
5576
  "disabled:cursor-not-allowed disabled:bg-surface-hover disabled:text-text-disabled",
5469
5577
  // Size styles
5470
- zn[s],
5578
+ _n[s],
5471
5579
  // Icon padding
5472
5580
  l ? "pl-10" : "",
5473
5581
  "pr-10",
5474
5582
  // room for the dropdown/loading icon
5475
5583
  // State styles
5476
- K ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
5584
+ G ? "border-danger-border text-danger-fg focus-visible:focus-ring" : "border-border-strong text-text",
5477
5585
  v || ""
5478
5586
  ),
5479
5587
  ...z
5480
5588
  }
5481
5589
  ),
5482
- /* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: $ || o ? (
5590
+ /* @__PURE__ */ e("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center", children: T || o ? (
5483
5591
  // Loading Spinner
5484
- /* @__PURE__ */ e(Ot, { className: Ne("animate-spin text-info-fg", Re[s]), "aria-hidden": !0 })
5592
+ /* @__PURE__ */ e(jt, { className: Ne("animate-spin text-info-fg", Re[s]), "aria-hidden": !0 })
5485
5593
  ) : (
5486
5594
  // Dropdown Chevron
5487
5595
  /* @__PURE__ */ e(
5488
- En,
5596
+ Tn,
5489
5597
  {
5490
5598
  className: Ne(
5491
5599
  "text-text-muted cursor-pointer transition-transform",
5492
5600
  Re[s],
5493
- Z ? "rotate-180" : "rotate-0"
5601
+ ee ? "rotate-180" : "rotate-0"
5494
5602
  ),
5495
5603
  onClick: () => {
5496
- J((q) => (q || x(!1), !q));
5604
+ Z((q) => (q || x(!1), !q));
5497
5605
  }
5498
5606
  }
5499
5607
  )
5500
5608
  ) })
5501
5609
  ] }),
5502
- oe && /* @__PURE__ */ e(
5503
- "ul",
5610
+ oe && /* @__PURE__ */ e("ul", { className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full", children: S.length > 0 ? S.map((q) => /* @__PURE__ */ e(
5611
+ "li",
5504
5612
  {
5505
- className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
5506
- role: "listbox",
5507
- children: S.length > 0 ? S.map((q) => /* @__PURE__ */ e(
5508
- "li",
5509
- {
5510
- className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
5511
- onClick: () => E(q),
5512
- role: "option",
5513
- "aria-selected": B === q.label,
5514
- children: q.label
5515
- },
5516
- q.value
5517
- )) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: $ || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
5518
- }
5519
- ),
5520
- (n || r) && /* @__PURE__ */ e("p", { className: Ne("mt-1 text-xs", K ? "text-danger-fg" : "text-text-muted"), children: n || r }),
5613
+ className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
5614
+ onClick: () => E(q),
5615
+ "aria-selected": B === q.label,
5616
+ children: q.label
5617
+ },
5618
+ q.value
5619
+ )) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: T || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." }) }),
5620
+ (n || r) && /* @__PURE__ */ e("p", { className: Ne("mt-1 text-xs", G ? "text-danger-fg" : "text-text-muted"), children: n || r }),
5521
5621
  b && /* @__PURE__ */ c("p", { className: "mt-2 text-xs text-success-fg", children: [
5522
5622
  "Huidige zoekterm (niet-gedebounced): ",
5523
5623
  String(B)
@@ -5527,8 +5627,8 @@ const Ne = (...t) => t.filter(Boolean).join(" "), Sn = (t) => /* @__PURE__ */ e(
5527
5627
  );
5528
5628
  }
5529
5629
  );
5530
- Mn.displayName = "SearchableTextField";
5531
- const Tn = ve(
5630
+ $n.displayName = "SearchableTextField";
5631
+ const An = ve(
5532
5632
  ({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
5533
5633
  const u = /* @__PURE__ */ e(
5534
5634
  "span",
@@ -5581,25 +5681,25 @@ const Tn = ve(
5581
5681
  );
5582
5682
  }
5583
5683
  );
5584
- Tn.displayName = "Switch";
5585
- const $n = [
5684
+ An.displayName = "Switch";
5685
+ const Dn = [
5586
5686
  { upTo: 1, cols: "grid-cols-1" },
5587
5687
  { upTo: 2, cols: "grid-cols-1 @[22rem]:grid-cols-2" },
5588
5688
  { upTo: 4, cols: "grid-cols-1 @[18rem]:grid-cols-2" },
5589
5689
  { upTo: 9, cols: "grid-cols-2 @[26rem]:grid-cols-3" }
5590
- ], _n = "grid-cols-2 @[26rem]:grid-cols-3 @[40rem]:grid-cols-4";
5591
- function Dn(t) {
5592
- return $n.find((r) => t <= r.upTo)?.cols ?? _n;
5690
+ ], Ln = "grid-cols-2 @[26rem]:grid-cols-3 @[40rem]:grid-cols-4";
5691
+ function In(t) {
5692
+ return Dn.find((r) => t <= r.upTo)?.cols ?? Ln;
5593
5693
  }
5594
- function An(t, r) {
5694
+ function On(t, r) {
5595
5695
  const n = r ?? t;
5596
5696
  if (t <= n) return { shown: t, hidden: 0 };
5597
5697
  const s = Math.max(0, n - 1);
5598
5698
  return { shown: s, hidden: t - s };
5599
5699
  }
5600
- function Us({ tiles: t, pinned: r, maxStrip: n, className: s }) {
5700
+ function Qs({ tiles: t, pinned: r, maxStrip: n, className: s }) {
5601
5701
  if (r) {
5602
- const { shown: a, hidden: l } = An(t.length, n), o = t.slice(0, a);
5702
+ const { shown: a, hidden: l } = On(t.length, n), o = t.slice(0, a);
5603
5703
  return /* @__PURE__ */ c("div", { className: i("@container flex h-full min-h-0 flex-col gap-2", s), children: [
5604
5704
  /* @__PURE__ */ e("div", { className: "min-h-0 flex-1", children: r }),
5605
5705
  t.length > 0 && // Fixed height as a share of the pane, with a floor so the strip
@@ -5618,14 +5718,14 @@ function Us({ tiles: t, pinned: r, maxStrip: n, className: s }) {
5618
5718
  {
5619
5719
  className: i(
5620
5720
  "@container grid h-full min-h-0 auto-rows-fr gap-2",
5621
- Dn(t.length),
5721
+ In(t.length),
5622
5722
  s
5623
5723
  ),
5624
5724
  children: t.map((a, l) => /* @__PURE__ */ e("div", { className: "min-h-0 min-w-0", children: a }, l))
5625
5725
  }
5626
5726
  );
5627
5727
  }
5628
- function Ws({
5728
+ function ea({
5629
5729
  name: t,
5630
5730
  avatarUrl: r,
5631
5731
  muted: n,
@@ -5652,16 +5752,16 @@ function Ws({
5652
5752
  alt: t,
5653
5753
  className: "aspect-square w-[38%] max-w-16 min-w-6 rounded-full object-cover"
5654
5754
  }
5655
- ) : /* @__PURE__ */ e("div", { className: "flex aspect-square w-[38%] max-w-16 min-w-6 items-center justify-center rounded-full bg-video-surface-strong", children: a ? /* @__PURE__ */ e(jt, { className: "w-1/2 h-1/2" }) : /* @__PURE__ */ e(Ft, { className: "w-1/2 h-1/2" }) }) }),
5755
+ ) : /* @__PURE__ */ e("div", { className: "flex aspect-square w-[38%] max-w-16 min-w-6 items-center justify-center rounded-full bg-video-surface-strong", children: a ? /* @__PURE__ */ e(Ft, { className: "w-1/2 h-1/2" }) : /* @__PURE__ */ e(Rt, { className: "w-1/2 h-1/2" }) }) }),
5656
5756
  /* @__PURE__ */ c("div", { className: "absolute inset-x-2 bottom-2 flex w-fit max-w-[calc(100%-1rem)] items-center gap-1.5 rounded bg-video-overlay px-1.5 py-1 text-xs text-white", children: [
5657
- n ? /* @__PURE__ */ e(Rt, { className: "size-3 shrink-0" }) : /* @__PURE__ */ e(Bt, { className: "size-3 shrink-0" }),
5757
+ n ? /* @__PURE__ */ e(Bt, { className: "size-3 shrink-0" }) : /* @__PURE__ */ e(Ht, { className: "size-3 shrink-0" }),
5658
5758
  /* @__PURE__ */ e("span", { className: "hidden truncate @[9rem]:inline", children: t })
5659
5759
  ] })
5660
5760
  ]
5661
5761
  }
5662
5762
  );
5663
5763
  }
5664
- function Ks({
5764
+ function ta({
5665
5765
  attach: t,
5666
5766
  active: r = !0,
5667
5767
  mirrored: n = !1,
@@ -5686,7 +5786,7 @@ function Ks({
5686
5786
  }
5687
5787
  );
5688
5788
  }
5689
- const Ln = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ut = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
5789
+ const Pn = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ft = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
5690
5790
  const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
5691
5791
  if (a)
5692
5792
  return /* @__PURE__ */ c("li", { children: [
@@ -5703,7 +5803,7 @@ const Ln = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ut
5703
5803
  }
5704
5804
  ),
5705
5805
  /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((d, v) => /* @__PURE__ */ e(
5706
- ut,
5806
+ ft,
5707
5807
  {
5708
5808
  item: d,
5709
5809
  isSelectedHandler: r,
@@ -5793,7 +5893,7 @@ const Ln = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ut
5793
5893
  ]
5794
5894
  }
5795
5895
  ) });
5796
- }, Gs = ({
5896
+ }, ra = ({
5797
5897
  items: t,
5798
5898
  isSelectedHandler: r,
5799
5899
  onClick: n,
@@ -5801,12 +5901,12 @@ const Ln = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ut
5801
5901
  loading: a = !1
5802
5902
  }) => a ? /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5803
5903
  s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5804
- /* @__PURE__ */ e(Ln, {})
5904
+ /* @__PURE__ */ e(Pn, {})
5805
5905
  ] }) : /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5806
5906
  s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5807
5907
  /* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
5808
5908
  (l, o) => !l.path && !l.label && !l.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, o) : /* @__PURE__ */ e(
5809
- ut,
5909
+ ft,
5810
5910
  {
5811
5911
  item: l,
5812
5912
  isSelectedHandler: r,
@@ -5816,7 +5916,7 @@ const Ln = () => /* @__PURE__ */ e(qe, { variant: "inline", shape: "menu" }), ut
5816
5916
  )
5817
5917
  ) })
5818
5918
  ] });
5819
- function Js({
5919
+ function na({
5820
5920
  open: t,
5821
5921
  title: r,
5822
5922
  description: n,
@@ -5828,7 +5928,7 @@ function Js({
5828
5928
  onCancel: d
5829
5929
  }) {
5830
5930
  return /* @__PURE__ */ e(
5831
- dt,
5931
+ mt,
5832
5932
  {
5833
5933
  open: t,
5834
5934
  onClose: d,
@@ -5850,7 +5950,7 @@ function Js({
5850
5950
  }
5851
5951
  );
5852
5952
  }
5853
- const In = {
5953
+ const jn = {
5854
5954
  none: "p-0",
5855
5955
  xs: "p-1",
5856
5956
  sm: "p-2",
@@ -5858,7 +5958,7 @@ const In = {
5858
5958
  lg: "p-6",
5859
5959
  xl: "p-8",
5860
5960
  "2xl": "p-12"
5861
- }, Pn = {
5961
+ }, Fn = {
5862
5962
  none: "m-0",
5863
5963
  xs: "m-1",
5864
5964
  sm: "m-2",
@@ -5866,7 +5966,7 @@ const In = {
5866
5966
  lg: "m-6",
5867
5967
  xl: "m-8",
5868
5968
  "2xl": "m-12"
5869
- }, On = {
5969
+ }, Rn = {
5870
5970
  none: "",
5871
5971
  primary: "bg-accent text-accent-fg",
5872
5972
  secondary: "bg-surface-hover",
@@ -5882,26 +5982,26 @@ const In = {
5882
5982
  backdrop: "bg-page",
5883
5983
  editor: "bg-surface",
5884
5984
  input: "bg-surface-input"
5885
- }, jn = {
5985
+ }, Bn = {
5886
5986
  none: "rounded-none",
5887
5987
  sm: "rounded-sm",
5888
5988
  md: "rounded-md",
5889
5989
  lg: "rounded-lg",
5890
5990
  xl: "rounded-xl",
5891
5991
  full: "rounded-full"
5892
- }, Fn = {
5992
+ }, Hn = {
5893
5993
  none: "shadow-none",
5894
5994
  sm: "shadow-none",
5895
5995
  md: "shadow-overlay",
5896
5996
  lg: "shadow-overlay",
5897
5997
  xl: "shadow-modal",
5898
5998
  "2xl": "shadow-modal"
5899
- }, Rn = {
5999
+ }, qn = {
5900
6000
  none: "border-0",
5901
6001
  sm: "border",
5902
6002
  md: "border-2",
5903
6003
  lg: "border-4"
5904
- }, Bn = {
6004
+ }, Vn = {
5905
6005
  primary: "border-accent-border",
5906
6006
  secondary: "border-border",
5907
6007
  accent: "border-accent-border",
@@ -5911,7 +6011,7 @@ const In = {
5911
6011
  info: "border-info-border",
5912
6012
  neutral: "border-border-subtle",
5913
6013
  white: "border-border-subtle"
5914
- }, mt = ve(
6014
+ }, ht = ve(
5915
6015
  ({
5916
6016
  padding: t,
5917
6017
  margin: r,
@@ -5928,13 +6028,13 @@ const In = {
5928
6028
  {
5929
6029
  ref: m,
5930
6030
  className: i(
5931
- t && In[t],
5932
- r && Pn[r],
5933
- n && On[n],
5934
- s && jn[s],
5935
- a && Fn[a],
5936
- l && Rn[l],
5937
- o && Bn[o],
6031
+ t && jn[t],
6032
+ r && Fn[r],
6033
+ n && Rn[n],
6034
+ s && Bn[s],
6035
+ a && Hn[a],
6036
+ l && qn[l],
6037
+ o && Vn[o],
5938
6038
  u
5939
6039
  ),
5940
6040
  ...v,
@@ -5942,11 +6042,11 @@ const In = {
5942
6042
  }
5943
6043
  )
5944
6044
  );
5945
- mt.displayName = "Box";
5946
- const Ys = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(mt, { background: "module", radius: "lg", shadow: "none", border: "sm", borderColor: "neutral", ...n, children: [
6045
+ ht.displayName = "Box";
6046
+ const sa = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(ht, { background: "module", radius: "lg", shadow: "none", border: "sm", borderColor: "neutral", ...n, children: [
5947
6047
  r && /* @__PURE__ */ e("span", { className: "mb-2 block text-sm font-semibold text-text", children: r }),
5948
6048
  t
5949
- ] }), Hn = {
6049
+ ] }), Un = {
5950
6050
  xs: "text-xs",
5951
6051
  sm: "text-sm",
5952
6052
  md: "text-base",
@@ -5955,13 +6055,13 @@ const Ys = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(mt, { backgrou
5955
6055
  "2xl": "text-2xl",
5956
6056
  "3xl": "text-3xl",
5957
6057
  "4xl": "text-3xl"
5958
- }, qn = {
6058
+ }, Wn = {
5959
6059
  light: "font-normal",
5960
6060
  normal: "font-normal",
5961
6061
  medium: "font-medium",
5962
6062
  semibold: "font-semibold",
5963
6063
  bold: "font-bold"
5964
- }, Vn = {
6064
+ }, Kn = {
5965
6065
  primary: "text-text",
5966
6066
  secondary: "text-text-muted",
5967
6067
  accent: "text-accent",
@@ -5971,11 +6071,11 @@ const Ys = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(mt, { backgrou
5971
6071
  info: "text-info-fg",
5972
6072
  neutral: "text-text",
5973
6073
  current: "text-current"
5974
- }, Un = {
6074
+ }, Gn = {
5975
6075
  left: "text-left",
5976
6076
  center: "text-center",
5977
6077
  right: "text-right"
5978
- }, Xs = ({
6078
+ }, aa = ({
5979
6079
  level: t = 1,
5980
6080
  size: r,
5981
6081
  weight: n = "semibold",
@@ -5988,16 +6088,16 @@ const Ys = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(mt, { backgrou
5988
6088
  }) => {
5989
6089
  const v = `h${t}`, m = i(
5990
6090
  "font-sans text-pretty",
5991
- Hn[r || Wn(t)],
5992
- qn[n],
5993
- Vn[s],
5994
- Un[a],
6091
+ Un[r || Jn(t)],
6092
+ Wn[n],
6093
+ Kn[s],
6094
+ Gn[a],
5995
6095
  l && "truncate",
5996
6096
  o
5997
6097
  );
5998
6098
  return /* @__PURE__ */ e(v, { className: m, ...d, children: u });
5999
6099
  };
6000
- function Wn(t) {
6100
+ function Jn(t) {
6001
6101
  return {
6002
6102
  1: "2xl",
6003
6103
  2: "xl",
@@ -6008,103 +6108,109 @@ function Wn(t) {
6008
6108
  }[t] || "md";
6009
6109
  }
6010
6110
  const Qe = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
6011
- function Zs(t) {
6111
+ function la(t) {
6012
6112
  let r = 0;
6013
6113
  for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
6014
6114
  return Qe[r % Qe.length];
6015
6115
  }
6016
6116
  export {
6017
- ls as ArtifactView,
6018
- os as AssistantCard,
6019
- Nr as Avatar,
6020
- is as AvatarStack,
6021
- Kr as Badge,
6022
- mt as Box,
6117
+ hs as ActivityAvatar,
6118
+ xs as ActivityGlyph,
6119
+ ms as ActivityRow,
6120
+ cs as ArtifactView,
6121
+ is as AssistantCard,
6122
+ lt as Avatar,
6123
+ us as AvatarStack,
6124
+ Yr as Badge,
6125
+ ht as Box,
6023
6126
  se as Button,
6024
- rs as ButtonGroup,
6025
- Ys as Card,
6026
- ds as ChannelBadge,
6127
+ as as ButtonGroup,
6128
+ sa as Card,
6129
+ ps as ChannelBadge,
6027
6130
  we as Checkbox,
6028
- as as CommandPalette,
6029
- Js as ConfirmDialog,
6131
+ os as CommandPalette,
6132
+ na as ConfirmDialog,
6030
6133
  qe as ContentLoading,
6031
6134
  Be as DatePicker,
6032
- jr as Dropdown,
6033
- Ps as EmptyState,
6034
- Ls as ErrorBoundary,
6035
- Is as FederatedResource,
6036
- Qt as FilterChip,
6037
- hn as FolderSelect,
6038
- qs as Form,
6039
- wn as FormSection,
6040
- Xs as Heading,
6041
- hr as IDENTITY_TONE_COUNT,
6042
- ee as Icon,
6043
- us as Image,
6044
- Vs as ImageField,
6045
- Os as Kbd,
6046
- ms as KpiCard,
6047
- ss as Link,
6048
- hs as List,
6049
- fs as ListBulkAction,
6050
- Us as MeetingGrid,
6051
- xs as MessageBubble,
6052
- gs as MetaSeparator,
6053
- bs as MetaValue,
6054
- dt as Modal,
6055
- ps as Page,
6056
- $r as PageHeader,
6057
- vs as PageToolbar,
6135
+ Br as Dropdown,
6136
+ Vs as EmptyState,
6137
+ Hs as ErrorBoundary,
6138
+ qs as FederatedResource,
6139
+ tr as FilterChip,
6140
+ gn as FolderSelect,
6141
+ Xs as Form,
6142
+ Sn as FormSection,
6143
+ aa as Heading,
6144
+ br as IDENTITY_TONE_COUNT,
6145
+ J as Icon,
6146
+ vs as Image,
6147
+ Zs as ImageField,
6148
+ Us as Kbd,
6149
+ ys as KpiCard,
6150
+ ls as Link,
6151
+ ws as List,
6152
+ Ns as ListBulkAction,
6153
+ Qs as MeetingGrid,
6154
+ ks as MessageBubble,
6155
+ Ss as MetaSeparator,
6156
+ Cs as MetaValue,
6157
+ mt as Modal,
6158
+ Es as Page,
6159
+ Dr as PageHeader,
6160
+ zs as PageToolbar,
6058
6161
  ke as PageToolbarActions,
6059
- Ws as ParticipantTile,
6060
- tt as Popover,
6061
- js as ProgressBar,
6062
- Me as RichText,
6063
- lt as SearchField,
6064
- Mn as SearchableTextField,
6065
- ys as SectionCaption,
6066
- Ns as SectionDivider,
6067
- sr as SegmentedToggle,
6068
- De as Select,
6069
- ws as SettingsFrameProvider,
6070
- Cs as SettingsPage,
6071
- Ss as SettingsRow,
6072
- Es as SettingsSection,
6073
- Gs as SidebarMenu,
6074
- zs as SourceChip,
6075
- Fs as Spinner,
6076
- rt as SplitButton,
6077
- Rs as StatusDot,
6078
- Bs as StepIndicator,
6079
- pn as StorageInput,
6080
- Tn as Switch,
6081
- Hs as TabBar,
6162
+ ea as ParticipantTile,
6163
+ rt as Popover,
6164
+ Ws as ProgressBar,
6165
+ ze as RichText,
6166
+ bs as RowCard,
6167
+ ct as SearchField,
6168
+ $n as SearchableTextField,
6169
+ Ms as SectionCaption,
6170
+ Ts as SectionDivider,
6171
+ lr as SegmentedToggle,
6172
+ $e as Select,
6173
+ _s as SettingsFrameProvider,
6174
+ As as SettingsPage,
6175
+ Ds as SettingsRow,
6176
+ Ls as SettingsSection,
6177
+ ra as SidebarMenu,
6178
+ Is as SourceChip,
6179
+ Ks as Spinner,
6180
+ nt as SplitButton,
6181
+ Gs as StatusDot,
6182
+ Js as StepIndicator,
6183
+ Nn as StorageInput,
6184
+ An as Switch,
6185
+ Ys as TabBar,
6082
6186
  Ye as Table,
6083
- bn as Tabs,
6187
+ vn as Tabs,
6084
6188
  ue as Text,
6085
6189
  He as TextArea,
6086
6190
  Ce as TextField,
6087
- Ks as VideoSurface,
6088
- As as View,
6191
+ gs as TimelineEvent,
6192
+ ta as VideoSurface,
6193
+ Bs as View,
6089
6194
  Xe as autofillProps,
6090
- Gr as badgeColumn,
6091
- _s as booleanBadgeColumn,
6092
- Zs as catTone,
6195
+ Xr as badgeColumn,
6196
+ Fs as booleanBadgeColumn,
6197
+ fs as cardActionClass,
6198
+ la as catTone,
6093
6199
  i as cn,
6094
- ts as createSizes,
6095
- es as createVariants,
6096
- Ms as dateFilterHandler,
6097
- cs as identityDotClass,
6098
- st as identityPlateClass,
6099
- nt as identityTone,
6100
- Ds as labelsColumn,
6101
- $s as multiSelectFilterHandler,
6102
- un as normalizeText,
6103
- ns as resolveLucideIcon,
6104
- Ts as selectFilterHandler,
6200
+ ss as createSizes,
6201
+ ns as createVariants,
6202
+ Os as dateFilterHandler,
6203
+ ds as identityDotClass,
6204
+ at as identityPlateClass,
6205
+ st as identityTone,
6206
+ Rs as labelsColumn,
6207
+ js as multiSelectFilterHandler,
6208
+ hn as normalizeText,
6209
+ Jt as resolveLucideIcon,
6210
+ Ps as selectFilterHandler,
6105
6211
  _e as text,
6106
- Pe as useAnchoredPosition,
6107
- Ar as useSettingsFrame,
6108
- ks as useSettingsFrameHost
6212
+ Oe as useAnchoredPosition,
6213
+ Or as useSettingsFrame,
6214
+ $s as useSettingsFrameHost
6109
6215
  };
6110
6216
  //# sourceMappingURL=index.js.map