@opencxh/ui-kit 3.137.4 → 3.137.6

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,35 +1,35 @@
1
1
  import { clsx as et } from "clsx";
2
- import { jsxs as i, jsx as e, Fragment as ve } from "react/jsx-runtime";
3
- import { VideoOff as tt, User as rt, MicOff as nt, Mic as st, X as we, ChevronDown as Se, ExternalLink as at, Calendar as lt, ChevronLeft as Ee, ChevronRight as ze, ChevronDownIcon as ot, Loader2 as ct, Search as Me, Check as Ie, ChevronUp as it, Ellipsis as dt, FileText as Te, HardDrive as Pe, ArrowLeft as ut, FolderPlus as mt, Upload as ft, Folder as je, Trash2 as ht, Plus as xt, Sparkles as bt, ImageOff as pt, Pencil as gt, ArrowUpRight as vt } from "lucide-react";
4
- import oe, { useRef as se, useEffect as X, forwardRef as xe, useState as O, useLayoutEffect as yt, useMemo as ge, useCallback as he, createContext as Nt, Component as wt } from "react";
2
+ import { jsxs as c, jsx as e, Fragment as ve } from "react/jsx-runtime";
3
+ import { VideoOff as tt, User as rt, MicOff as nt, Mic as st, X as we, ChevronDown as Se, ExternalLink as at, Calendar as lt, ChevronLeft as Ee, ChevronRight as ze, ChevronDownIcon as ot, Loader2 as ct, Search as Me, Check as Pe, ChevronUp as it, Ellipsis as dt, FileText as Te, HardDrive as Ie, ArrowLeft as ut, FolderPlus as mt, Upload as ft, Folder as je, Trash2 as ht, Plus as xt, Sparkles as bt, ImageOff as gt, Pencil as pt, ArrowUpRight as vt } from "lucide-react";
4
+ import oe, { useRef as se, useEffect as X, forwardRef as xe, useState as O, useLayoutEffect as yt, useMemo as pe, useCallback as he, createContext as Nt, Component as wt } from "react";
5
5
  import kt from "dompurify";
6
6
  import Ct from "react-markdown";
7
7
  import St from "remark-gfm";
8
8
  function d(...t) {
9
9
  return et(t);
10
10
  }
11
- function cn(t) {
11
+ function un(t) {
12
12
  return (r, n) => t[r]?.[n] || "";
13
13
  }
14
- function dn(t) {
14
+ function mn(t) {
15
15
  return (r) => t[r] || "";
16
16
  }
17
17
  const Oe = ["cat-1", "cat-2", "cat-3", "cat-4", "cat-5"];
18
- function un(t) {
18
+ function fn(t) {
19
19
  let r = 0;
20
20
  for (let n = 0; n < t.length; n++) r = r * 31 + t.charCodeAt(n) >>> 0;
21
21
  return Oe[r % Oe.length];
22
22
  }
23
- function mn({ tiles: t, pinned: r, className: n }) {
23
+ function hn({ tiles: t, pinned: r, className: n }) {
24
24
  if (r)
25
- return /* @__PURE__ */ i("div", { className: d("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
25
+ return /* @__PURE__ */ c("div", { className: d("flex flex-col md:flex-row gap-2 h-full min-h-0", n), children: [
26
26
  /* @__PURE__ */ e("div", { className: "flex-1 min-h-0", children: r }),
27
27
  t.length > 0 && /* @__PURE__ */ e("div", { className: "flex md:flex-col gap-2 md:w-48 overflow-auto", children: t.map((a, l) => /* @__PURE__ */ e("div", { className: "min-w-40 md:min-w-0", children: a }, l)) })
28
28
  ] });
29
29
  const s = t.length <= 1 ? "grid-cols-1" : t.length <= 4 ? "grid-cols-2" : t.length <= 9 ? "grid-cols-3" : "grid-cols-4";
30
30
  return /* @__PURE__ */ e("div", { className: d("grid gap-2 h-full", s, n), children: t.map((a, l) => /* @__PURE__ */ e("div", { children: a }, l)) });
31
31
  }
32
- function fn({
32
+ function xn({
33
33
  name: t,
34
34
  avatarUrl: r,
35
35
  muted: n,
@@ -37,20 +37,20 @@ function fn({
37
37
  hasVideo: a,
38
38
  videoSlot: l,
39
39
  className: o,
40
- fill: u
40
+ fill: m
41
41
  }) {
42
- return /* @__PURE__ */ i(
42
+ return /* @__PURE__ */ c(
43
43
  "div",
44
44
  {
45
45
  className: d(
46
46
  "relative rounded-lg overflow-hidden bg-video-surface flex items-center justify-center",
47
- u ? "h-full w-full" : "aspect-video",
47
+ m ? "h-full w-full" : "aspect-video",
48
48
  s && "ring-2 ring-speaking",
49
49
  o
50
50
  ),
51
51
  children: [
52
52
  a && l ? /* @__PURE__ */ e("div", { className: "absolute inset-0", children: l }) : /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 text-gray-300", children: r ? /* @__PURE__ */ e("img", { src: r, alt: t, className: "w-16 h-16 rounded-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-video-surface-strong flex items-center justify-center", children: a ? /* @__PURE__ */ e(tt, { className: "w-8 h-8" }) : /* @__PURE__ */ e(rt, { className: "w-8 h-8" }) }) }),
53
- /* @__PURE__ */ i("div", { className: "absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-1 rounded bg-video-overlay text-white text-xs", children: [
53
+ /* @__PURE__ */ c("div", { className: "absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-1 rounded bg-video-overlay text-white text-xs", children: [
54
54
  n ? /* @__PURE__ */ e(nt, { className: "w-3 h-3" }) : /* @__PURE__ */ e(st, { className: "w-3 h-3" }),
55
55
  /* @__PURE__ */ e("span", { className: "truncate max-w-35", children: t })
56
56
  ] })
@@ -58,7 +58,7 @@ function fn({
58
58
  }
59
59
  );
60
60
  }
61
- function hn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
61
+ function bn({ attach: t, active: r = !0, mirrored: n = !1, className: s }) {
62
62
  const a = se(null);
63
63
  return X(() => {
64
64
  if (!r || !a.current) return;
@@ -116,14 +116,14 @@ const Et = {
116
116
  leftIcon: a,
117
117
  rightIcon: l,
118
118
  iconOnly: o = !1,
119
- shape: u = "default",
120
- className: m,
119
+ shape: m = "default",
120
+ className: u,
121
121
  children: y,
122
122
  disabled: x,
123
123
  ...h
124
124
  }, b) => {
125
125
  const v = x || s;
126
- return /* @__PURE__ */ i(
126
+ return /* @__PURE__ */ c(
127
127
  "button",
128
128
  {
129
129
  ref: b,
@@ -133,7 +133,7 @@ const Et = {
133
133
  // the same weight as an emphasised nav item, and 600 at 12–13px
134
134
  // reads as a heavier control than the surrounding chrome.
135
135
  "inline-flex shrink-0 items-center justify-center gap-2 cursor-pointer font-medium",
136
- u === "circle" ? "rounded-full" : "rounded-md",
136
+ m === "circle" ? "rounded-full" : "rounded-md",
137
137
  "transition-colors duration-fast ease-out",
138
138
  "focus-visible:outline-none focus-visible:focus-ring",
139
139
  "disabled:cursor-not-allowed disabled:border-border-subtle",
@@ -142,7 +142,7 @@ const Et = {
142
142
  o ? Mt[r] : zt[r],
143
143
  (n || r === "full") && "w-full",
144
144
  s && "cursor-wait",
145
- m
145
+ u
146
146
  ),
147
147
  disabled: v,
148
148
  "aria-busy": s || void 0,
@@ -165,7 +165,7 @@ const Et = {
165
165
  }
166
166
  );
167
167
  ae.displayName = "Button";
168
- const xn = ({
168
+ const gn = ({
169
169
  children: t,
170
170
  size: r = "md",
171
171
  orientation: n = "horizontal",
@@ -213,9 +213,9 @@ const xn = ({
213
213
  onClick: a,
214
214
  className: l,
215
215
  "aria-label": o,
216
- ...u
216
+ ...m
217
217
  }) => {
218
- const m = typeof r == "number" ? r : Dt(r), y = d(
218
+ const u = typeof r == "number" ? r : Dt(r), y = d(
219
219
  "inline-block shrink-0",
220
220
  $t[n],
221
221
  s && [
@@ -224,7 +224,7 @@ const xn = ({
224
224
  ],
225
225
  l
226
226
  ), x = {
227
- size: m,
227
+ size: u,
228
228
  strokeWidth: 2,
229
229
  className: y,
230
230
  onClick: s ? a : void 0,
@@ -235,7 +235,7 @@ const xn = ({
235
235
  onKeyDown: s ? (h) => {
236
236
  (h.key === "Enter" || h.key === " ") && (h.preventDefault(), a?.());
237
237
  } : void 0,
238
- ...u
238
+ ...m
239
239
  };
240
240
  return /* @__PURE__ */ e(t, { ...x });
241
241
  };
@@ -252,14 +252,14 @@ function $e(t, r, { gap: n = 6, matchWidth: s = !1, placement: a = "bottom-start
252
252
  const [l, o] = O({});
253
253
  return yt(() => {
254
254
  if (!t) return;
255
- const u = () => {
256
- const m = r.current;
257
- if (!m) return;
258
- const y = m.getBoundingClientRect(), x = window.innerHeight - y.bottom, h = y.top, b = a.startsWith("top"), v = b ? h < 200 && x > h : x < 200 && h > x, k = b !== v, p = { position: "fixed" };
259
- k ? (p.bottom = window.innerHeight - y.top + n, p.maxHeight = Math.max(120, h - n * 2)) : (p.top = y.bottom + n, p.maxHeight = Math.max(120, x - n * 2)), a.endsWith("end") ? p.right = window.innerWidth - y.right : p.left = y.left, s && (p.width = y.width), o(p);
255
+ const m = () => {
256
+ const u = r.current;
257
+ if (!u) return;
258
+ const y = u.getBoundingClientRect(), x = window.innerHeight - y.bottom, h = y.top, b = a.startsWith("top"), v = b ? h < 200 && x > h : x < 200 && h > x, k = b !== v, g = { position: "fixed" };
259
+ k ? (g.bottom = window.innerHeight - y.top + n, g.maxHeight = Math.max(120, h - n * 2)) : (g.top = y.bottom + n, g.maxHeight = Math.max(120, x - n * 2)), a.endsWith("end") ? g.right = window.innerWidth - y.right : g.left = y.left, s && (g.width = y.width), o(g);
260
260
  };
261
- return u(), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
262
- window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
261
+ return m(), window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
262
+ window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
263
263
  };
264
264
  }, [t, r, n, s, a]), l;
265
265
  }
@@ -271,24 +271,24 @@ const Ve = ({
271
271
  rootClassName: a,
272
272
  triggerClassName: l,
273
273
  disabled: o = !1,
274
- triggerLabel: u
274
+ triggerLabel: m
275
275
  }) => {
276
- const [m, y] = O(!1), x = se(null), h = se(null), b = $e(m, h, { placement: n });
276
+ const [u, y] = O(!1), x = se(null), h = se(null), b = $e(u, h, { placement: n });
277
277
  X(() => {
278
- if (!m) return;
279
- const p = ($) => {
278
+ if (!u) return;
279
+ const g = ($) => {
280
280
  x.current && !x.current.contains($.target) && y(!1);
281
281
  }, f = ($) => {
282
282
  $.key === "Escape" && y(!1);
283
283
  };
284
- return document.addEventListener("mousedown", p), document.addEventListener("keydown", f), () => {
285
- document.removeEventListener("mousedown", p), document.removeEventListener("keydown", f);
284
+ return document.addEventListener("mousedown", g), document.addEventListener("keydown", f), () => {
285
+ document.removeEventListener("mousedown", g), document.removeEventListener("keydown", f);
286
286
  };
287
- }, [m]);
288
- const v = (p) => {
289
- p.stopPropagation(), !o && y((f) => !f);
287
+ }, [u]);
288
+ const v = (g) => {
289
+ g.stopPropagation(), !o && y((f) => !f);
290
290
  }, k = () => y(!1);
291
- return /* @__PURE__ */ i("div", { ref: x, className: d("relative inline-flex", a), children: [
291
+ return /* @__PURE__ */ c("div", { ref: x, className: d("relative inline-flex", a), children: [
292
292
  /* @__PURE__ */ e(
293
293
  "button",
294
294
  {
@@ -296,8 +296,8 @@ const Ve = ({
296
296
  type: "button",
297
297
  onClick: v,
298
298
  disabled: o,
299
- "aria-label": u,
300
- "aria-expanded": m,
299
+ "aria-label": m,
300
+ "aria-expanded": u,
301
301
  className: d(
302
302
  "inline-flex items-center",
303
303
  o && "cursor-not-allowed opacity-50",
@@ -306,7 +306,7 @@ const Ve = ({
306
306
  children: t
307
307
  }
308
308
  ),
309
- m && /* @__PURE__ */ e(
309
+ u && /* @__PURE__ */ e(
310
310
  "div",
311
311
  {
312
312
  className: d(
@@ -350,15 +350,15 @@ function Lt({
350
350
  size: a = "md",
351
351
  active: l = !1,
352
352
  caret: o = !1,
353
- menu: u,
354
- menuClassName: m,
353
+ menu: m,
354
+ menuClassName: u,
355
355
  onClear: y,
356
356
  clearLabel: x = "Filter wissen",
357
357
  onClick: h,
358
358
  title: b,
359
359
  className: v
360
360
  }) {
361
- const k = l && !!y, p = s === "pill" ? "rounded-full" : "rounded-md", f = _t({ active: l, tone: n, shape: s, size: a, className: v }), $ = /* @__PURE__ */ i(ve, { children: [
361
+ const k = l && !!y, g = s === "pill" ? "rounded-full" : "rounded-md", f = _t({ active: l, tone: n, shape: s, size: a, className: v }), $ = /* @__PURE__ */ c(ve, { children: [
362
362
  r,
363
363
  t,
364
364
  o && /* @__PURE__ */ e(Q, { icon: Se, size: "xs" })
@@ -368,34 +368,34 @@ function Lt({
368
368
  type: "button",
369
369
  "aria-label": x,
370
370
  onClick: y,
371
- className: d("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", p),
371
+ className: d("inline-flex h-full items-center pr-3 focus-visible:outline-none focus-visible:focus-ring", g),
372
372
  children: /* @__PURE__ */ e(Q, { icon: we, size: "xs" })
373
373
  }
374
374
  );
375
- return u ? /* @__PURE__ */ i("span", { className: f, title: b, children: [
375
+ return m ? /* @__PURE__ */ c("span", { className: f, title: b, children: [
376
376
  /* @__PURE__ */ e(
377
377
  Ve,
378
378
  {
379
379
  trigger: $,
380
380
  rootClassName: "h-full",
381
381
  triggerClassName: d(C, "h-full"),
382
- className: d("min-w-menu p-1.5", m),
383
- children: u
382
+ className: d("min-w-menu p-1.5", u),
383
+ children: m
384
384
  }
385
385
  ),
386
386
  q
387
- ] }) : k ? /* @__PURE__ */ i("span", { className: f, title: b, children: [
387
+ ] }) : k ? /* @__PURE__ */ c("span", { className: f, title: b, children: [
388
388
  /* @__PURE__ */ e("button", { type: "button", onClick: h, className: C, children: $ }),
389
389
  q
390
390
  ] }) : /* @__PURE__ */ e("button", { type: "button", title: b, onClick: h, className: d(f, C), children: $ });
391
391
  }
392
- const It = {
392
+ const Pt = {
393
393
  xs: "text-xs",
394
394
  sm: "text-sm",
395
395
  md: "text-base",
396
396
  lg: "text-md",
397
397
  xl: "text-lg"
398
- }, Pt = {
398
+ }, It = {
399
399
  primary: "text-text hover:text-info-fg hover:underline",
400
400
  info: "text-info-fg hover:underline",
401
401
  secondary: "text-text-muted hover:text-text",
@@ -413,7 +413,7 @@ const It = {
413
413
  warning: "bg-warning-soft",
414
414
  error: "bg-danger-soft",
415
415
  info: "bg-info-soft"
416
- }, bn = ({
416
+ }, pn = ({
417
417
  variant: t = "default",
418
418
  size: r = "md",
419
419
  color: n = "primary",
@@ -421,17 +421,17 @@ const It = {
421
421
  external: a = !1,
422
422
  className: l,
423
423
  children: o,
424
- href: u,
425
- target: m,
424
+ href: m,
425
+ target: u,
426
426
  rel: y,
427
427
  ...x
428
428
  }) => {
429
- const h = a || u && (u.startsWith("http") || u.startsWith("mailto:")), b = d(
429
+ const h = a || m && (m.startsWith("http") || m.startsWith("mailto:")), b = d(
430
430
  "inline-flex items-center gap-1 underline-offset-2",
431
431
  "transition-colors duration-fast ease-out",
432
432
  "focus-visible:outline-none focus-visible:focus-ring",
433
- It[r],
434
- !s && Pt[n],
433
+ Pt[r],
434
+ !s && It[n],
435
435
  t === "subtle" && "no-underline opacity-70 hover:opacity-100",
436
436
  t === "underline" && "underline decoration-1 hover:decoration-2",
437
437
  t === "button" && [
@@ -442,12 +442,12 @@ const It = {
442
442
  l
443
443
  ), v = {
444
444
  ...x,
445
- href: s ? void 0 : u,
446
- target: h ? "_blank" : m,
445
+ href: s ? void 0 : m,
446
+ target: h ? "_blank" : u,
447
447
  rel: h ? "noopener noreferrer" : y,
448
448
  "aria-disabled": s || void 0
449
449
  };
450
- return /* @__PURE__ */ i("a", { className: b, ...v, children: [
450
+ return /* @__PURE__ */ c("a", { className: b, ...v, children: [
451
451
  o,
452
452
  h && /* @__PURE__ */ e(at, { className: "size-icon-sm shrink-0", "aria-hidden": !0 })
453
453
  ] });
@@ -463,28 +463,28 @@ function Ft({
463
463
  tone: a = "sunk",
464
464
  fullWidth: l = !1,
465
465
  className: o,
466
- "aria-label": u
466
+ "aria-label": m
467
467
  }) {
468
468
  return /* @__PURE__ */ e(
469
469
  "div",
470
470
  {
471
471
  role: "tablist",
472
- "aria-label": u,
472
+ "aria-label": m,
473
473
  className: d(
474
474
  "gap-0.5 rounded-md p-0.5",
475
475
  a === "track" ? "bg-surface-track" : "bg-surface-sunk",
476
476
  l ? "flex w-full" : "inline-flex",
477
477
  o
478
478
  ),
479
- children: t.map((m) => {
480
- const y = m.value === r;
479
+ children: t.map((u) => {
480
+ const y = u.value === r;
481
481
  return /* @__PURE__ */ e(
482
482
  "button",
483
483
  {
484
484
  role: "tab",
485
485
  "aria-selected": y,
486
486
  type: "button",
487
- onClick: () => n(m.value),
487
+ onClick: () => n(u.value),
488
488
  className: d(
489
489
  "inline-flex cursor-pointer items-center justify-center gap-1.5 rounded-sm",
490
490
  "transition-colors duration-fast ease-out",
@@ -493,9 +493,9 @@ function Ft({
493
493
  Ot[s],
494
494
  y ? "bg-surface text-text font-medium shadow-sm" : "text-text-muted hover:text-text"
495
495
  ),
496
- children: m.label
496
+ children: u.label
497
497
  },
498
- m.value
498
+ u.value
499
499
  );
500
500
  })
501
501
  }
@@ -517,12 +517,12 @@ function qe({
517
517
  icon: a,
518
518
  options: l,
519
519
  disabled: o = !1,
520
- loading: u = !1,
521
- menuPlacement: m = "bottom-end",
520
+ loading: m = !1,
521
+ menuPlacement: u = "bottom-end",
522
522
  menuLabel: y = "More options"
523
523
  }) {
524
- const x = o || u, h = l.length > 0;
525
- return /* @__PURE__ */ i("div", { className: d("inline-flex items-center", n === "primary" && "gap-0.5"), children: [
524
+ const x = o || m, h = l.length > 0;
525
+ return /* @__PURE__ */ c("div", { className: d("inline-flex items-center", n === "primary" && "gap-0.5"), children: [
526
526
  /* @__PURE__ */ e(
527
527
  ae,
528
528
  {
@@ -530,7 +530,7 @@ function qe({
530
530
  size: s,
531
531
  onClick: r,
532
532
  disabled: o,
533
- loading: u,
533
+ loading: m,
534
534
  leftIcon: a,
535
535
  className: d(h && "rounded-r-none"),
536
536
  children: t
@@ -539,7 +539,7 @@ function qe({
539
539
  h && /* @__PURE__ */ e(
540
540
  Ve,
541
541
  {
542
- placement: m,
542
+ placement: u,
543
543
  disabled: x,
544
544
  triggerLabel: y,
545
545
  className: "min-w-menu py-1",
@@ -557,7 +557,7 @@ function qe({
557
557
  children: /* @__PURE__ */ e(Se, { className: "size-icon-md" })
558
558
  }
559
559
  ),
560
- children: (b) => /* @__PURE__ */ e(ve, { children: l.map((v) => /* @__PURE__ */ i(
560
+ children: (b) => /* @__PURE__ */ e(ve, { children: l.map((v) => /* @__PURE__ */ c(
561
561
  "button",
562
562
  {
563
563
  type: "button",
@@ -605,11 +605,11 @@ const Ht = {
605
605
  indeterminate: a = !1,
606
606
  containerClassName: l,
607
607
  labelClassName: o,
608
- className: u,
609
- id: m,
608
+ className: m,
609
+ id: u,
610
610
  ...y
611
611
  }, x) => {
612
- const h = oe.useId(), b = m || `checkbox-${h}`, v = !!n, k = oe.useRef(null), p = oe.useCallback(
612
+ const h = oe.useId(), b = u || `checkbox-${h}`, v = !!n, k = oe.useRef(null), g = oe.useCallback(
613
613
  (f) => {
614
614
  k.current = f, typeof x == "function" ? x(f) : x && typeof x == "object" && (x.current = f);
615
615
  },
@@ -617,12 +617,12 @@ const Ht = {
617
617
  );
618
618
  return oe.useEffect(() => {
619
619
  k.current && (k.current.indeterminate = a);
620
- }, [a]), /* @__PURE__ */ i("div", { className: d("flex flex-col", l), children: [
621
- /* @__PURE__ */ i("div", { className: d("flex items-center gap-3", Vt[s]), children: [
620
+ }, [a]), /* @__PURE__ */ c("div", { className: d("flex flex-col", l), children: [
621
+ /* @__PURE__ */ c("div", { className: d("flex items-center gap-3", Vt[s]), children: [
622
622
  /* @__PURE__ */ e(
623
623
  "input",
624
624
  {
625
- ref: p,
625
+ ref: g,
626
626
  id: b,
627
627
  type: "checkbox",
628
628
  "aria-invalid": v || void 0,
@@ -637,12 +637,12 @@ const Ht = {
637
637
  "disabled:cursor-not-allowed disabled:bg-surface-hover",
638
638
  Ht[s],
639
639
  v ? "border-danger-border" : "border-border-strong",
640
- u
640
+ m
641
641
  ),
642
642
  ...y
643
643
  }
644
644
  ),
645
- t && /* @__PURE__ */ i("div", { className: "flex-1", children: [
645
+ t && /* @__PURE__ */ c("div", { className: "flex-1", children: [
646
646
  /* @__PURE__ */ e(
647
647
  "label",
648
648
  {
@@ -672,49 +672,49 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
672
672
  required: a = !1,
673
673
  size: l = "md",
674
674
  className: o,
675
- minDate: u,
676
- maxDate: m,
675
+ minDate: m,
676
+ maxDate: u,
677
677
  format: y = "MM/dd/yyyy",
678
678
  withTime: x = !1
679
679
  }, h) => {
680
- const [b, v] = O(!1), [k, p] = O(() => t || /* @__PURE__ */ new Date()), f = se(null), $ = se(null), C = $e(b, $);
680
+ const [b, v] = O(!1), [k, g] = O(() => t || /* @__PURE__ */ new Date()), f = se(null), $ = se(null), C = $e(b, $);
681
681
  X(() => {
682
- const c = (S) => {
682
+ const i = (S) => {
683
683
  f.current && !f.current.contains(S.target) && v(!1);
684
684
  };
685
- return b && document.addEventListener("mousedown", c), () => {
686
- document.removeEventListener("mousedown", c);
685
+ return b && document.addEventListener("mousedown", i), () => {
686
+ document.removeEventListener("mousedown", i);
687
687
  };
688
688
  }, [b]);
689
- const q = (c) => {
690
- if (!c) return "";
691
- const S = c.getDate().toString().padStart(2, "0"), g = (c.getMonth() + 1).toString().padStart(2, "0"), _ = c.getFullYear(), N = y === "dd/MM/yyyy" ? `${S}/${g}/${_}` : y === "yyyy-MM-dd" ? `${_}-${g}-${S}` : `${g}/${S}/${_}`;
692
- return x ? `${N} ${T(c)}` : N;
693
- }, T = (c) => `${c.getHours().toString().padStart(2, "0")}:${c.getMinutes().toString().padStart(2, "0")}`, G = (c) => {
694
- const [S, g] = c.split(":").map(Number);
695
- if (Number.isNaN(S) || Number.isNaN(g)) return;
689
+ const q = (i) => {
690
+ if (!i) return "";
691
+ const S = i.getDate().toString().padStart(2, "0"), p = (i.getMonth() + 1).toString().padStart(2, "0"), _ = i.getFullYear(), N = y === "dd/MM/yyyy" ? `${S}/${p}/${_}` : y === "yyyy-MM-dd" ? `${_}-${p}-${S}` : `${p}/${S}/${_}`;
692
+ return x ? `${N} ${T(i)}` : N;
693
+ }, T = (i) => `${i.getHours().toString().padStart(2, "0")}:${i.getMinutes().toString().padStart(2, "0")}`, G = (i) => {
694
+ const [S, p] = i.split(":").map(Number);
695
+ if (Number.isNaN(S) || Number.isNaN(p)) return;
696
696
  const _ = t ? new Date(t) : /* @__PURE__ */ new Date();
697
- _.setHours(S, g, 0, 0), r?.(_);
697
+ _.setHours(S, p, 0, 0), r?.(_);
698
698
  }, V = () => {
699
- const c = k.getFullYear(), S = k.getMonth(), g = new Date(c, S, 1), _ = new Date(g);
700
- _.setDate(_.getDate() - g.getDay());
699
+ const i = k.getFullYear(), S = k.getMonth(), p = new Date(i, S, 1), _ = new Date(p);
700
+ _.setDate(_.getDate() - p.getDay());
701
701
  const N = [], U = new Date(_);
702
702
  for (let re = 0; re < 42; re++)
703
703
  N.push(new Date(U)), U.setDate(U.getDate() + 1);
704
704
  return N;
705
- }, I = (c) => {
706
- if (c.getMonth() === k.getMonth() && !(u && c < u) && !(m && c > m)) {
705
+ }, P = (i) => {
706
+ if (i.getMonth() === k.getMonth() && !(m && i < m) && !(u && i > u)) {
707
707
  if (x) {
708
- const g = new Date(c);
709
- g.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(g);
708
+ const p = new Date(i);
709
+ p.setHours(t?.getHours() ?? 0, t?.getMinutes() ?? 0, 0, 0), r?.(p);
710
710
  return;
711
711
  }
712
- r?.(c), v(!1);
712
+ r?.(i), v(!1);
713
713
  }
714
714
  }, H = () => {
715
- p(new Date(k.getFullYear(), k.getMonth() - 1, 1));
715
+ g(new Date(k.getFullYear(), k.getMonth() - 1, 1));
716
716
  }, te = () => {
717
- p(new Date(k.getFullYear(), k.getMonth() + 1, 1));
717
+ g(new Date(k.getFullYear(), k.getMonth() + 1, 1));
718
718
  }, J = () => {
719
719
  r?.(null), v(!1);
720
720
  }, K = d(
@@ -744,8 +744,8 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
744
744
  "November",
745
745
  "December"
746
746
  ];
747
- return /* @__PURE__ */ i("div", { ref: f, className: "relative", children: [
748
- /* @__PURE__ */ i("div", { ref: $, className: "relative", children: [
747
+ return /* @__PURE__ */ c("div", { ref: f, className: "relative", children: [
748
+ /* @__PURE__ */ c("div", { ref: $, className: "relative", children: [
749
749
  /* @__PURE__ */ e(
750
750
  "input",
751
751
  {
@@ -771,8 +771,8 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
771
771
  }
772
772
  )
773
773
  ] }),
774
- b && /* @__PURE__ */ i("div", { style: C, className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
775
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
774
+ b && /* @__PURE__ */ c("div", { style: C, className: "fixed z-overlay overflow-auto rounded-lg border border-border bg-surface p-4 shadow-overlay min-w-panel", children: [
775
+ /* @__PURE__ */ c("div", { className: "flex items-center justify-between mb-4", children: [
776
776
  /* @__PURE__ */ e(
777
777
  "button",
778
778
  {
@@ -781,7 +781,7 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
781
781
  children: /* @__PURE__ */ e(Wt, {})
782
782
  }
783
783
  ),
784
- /* @__PURE__ */ i("h3", { className: "text-sm font-medium text-text", children: [
784
+ /* @__PURE__ */ c("h3", { className: "text-sm font-medium text-text", children: [
785
785
  w[k.getMonth()],
786
786
  " ",
787
787
  k.getFullYear()
@@ -795,29 +795,29 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
795
795
  }
796
796
  )
797
797
  ] }),
798
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((c) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: c }, c)) }),
799
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ce.map((c, S) => {
800
- const g = c.getMonth() === k.getMonth(), _ = t && c.toDateString() === t.toDateString(), N = c.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), U = !g || u && c < u || m && c > m;
798
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((i) => /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted text-center py-1", children: i }, i)) }),
799
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-1", children: ce.map((i, S) => {
800
+ const p = i.getMonth() === k.getMonth(), _ = t && i.toDateString() === t.toDateString(), N = i.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), U = !p || m && i < m || u && i > u;
801
801
  return /* @__PURE__ */ e(
802
802
  "button",
803
803
  {
804
- onClick: () => !U && I(c),
804
+ onClick: () => !U && P(i),
805
805
  disabled: U,
806
806
  className: d(
807
807
  "w-8 h-8 text-sm rounded transition-colors duration-fast",
808
808
  {
809
- "text-text hover:bg-surface-hover": g && !_ && !U,
809
+ "text-text hover:bg-surface-hover": p && !_ && !U,
810
810
  "bg-accent text-accent-fg": _,
811
811
  "bg-surface-hover text-text": N && !_,
812
812
  "text-text-muted cursor-not-allowed": U
813
813
  }
814
814
  ),
815
- children: c.getDate()
815
+ children: i.getDate()
816
816
  },
817
817
  S
818
818
  );
819
819
  }) }),
820
- x && /* @__PURE__ */ i("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
820
+ x && /* @__PURE__ */ c("div", { className: "mt-3 flex items-center gap-2 border-t border-border pt-3", children: [
821
821
  /* @__PURE__ */ e("label", { htmlFor: "datepicker-time", className: "text-sm text-text-muted", children: "Tijd" }),
822
822
  /* @__PURE__ */ e(
823
823
  "input",
@@ -825,12 +825,12 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
825
825
  id: "datepicker-time",
826
826
  type: "time",
827
827
  value: t ? T(t) : "",
828
- onChange: (c) => G(c.target.value),
828
+ onChange: (i) => G(i.target.value),
829
829
  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"
830
830
  }
831
831
  )
832
832
  ] }),
833
- /* @__PURE__ */ i("div", { className: "flex justify-between items-center mt-4 pt-3 border-t border-border", children: [
833
+ /* @__PURE__ */ c("div", { className: "flex justify-between items-center mt-4 pt-3 border-t border-border", children: [
834
834
  /* @__PURE__ */ e(
835
835
  "button",
836
836
  {
@@ -864,23 +864,23 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
864
864
  fullWidth: a = !1,
865
865
  disabled: l = !1,
866
866
  options: o,
867
- placeholder: u,
868
- containerClassName: m,
867
+ placeholder: m,
868
+ containerClassName: u,
869
869
  labelClassName: y,
870
870
  className: x,
871
871
  id: h,
872
872
  searchable: b,
873
873
  multiple: v,
874
874
  value: k,
875
- onChange: p,
875
+ onChange: g,
876
876
  allowCreate: f,
877
877
  onCreateOption: $,
878
878
  ...C
879
879
  }, q) => {
880
- const T = h || `select-${Math.random().toString(36).substr(2, 9)}`, G = !!n, [V, I] = oe.useState(!1), [H, te] = oe.useState(""), J = oe.useRef(null), K = oe.useRef(null), ce = $e(V, K, { matchWidth: !0 }), [w, c] = oe.useState(o);
880
+ const T = h || `select-${Math.random().toString(36).substr(2, 9)}`, G = !!n, [V, P] = oe.useState(!1), [H, te] = oe.useState(""), J = oe.useRef(null), K = oe.useRef(null), ce = $e(V, K, { matchWidth: !0 }), [w, i] = oe.useState(o);
881
881
  oe.useImperativeHandle(q, () => J.current), oe.useEffect(() => {
882
882
  const D = (A) => {
883
- J.current && !J.current.contains(A.target) && I(!1);
883
+ J.current && !J.current.contains(A.target) && P(!1);
884
884
  };
885
885
  return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
886
886
  }, []);
@@ -889,7 +889,7 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
889
889
  (z) => ke(z.value) === ke(A) || ke(z.label) === ke(A)
890
890
  ),
891
891
  []
892
- ), g = oe.useCallback(
892
+ ), p = oe.useCallback(
893
893
  (D, A) => {
894
894
  const z = [...D], F = (j) => {
895
895
  const B = (j ?? "").trim();
@@ -900,19 +900,19 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
900
900
  [S]
901
901
  );
902
902
  oe.useEffect(() => {
903
- c((D) => {
903
+ i((D) => {
904
904
  const A = [...o];
905
905
  return D.forEach((z) => {
906
906
  !S(A, z.value) && !S(A, z.label) && A.push(z);
907
- }), g(A, k);
907
+ }), p(A, k);
908
908
  });
909
- }, [o, k, g, S]);
909
+ }, [o, k, p, S]);
910
910
  const _ = (D) => {
911
911
  if (v) {
912
912
  const A = Array.isArray(k) ? k : [], z = A.includes(D) ? A.filter((F) => F !== D) : [...A, D];
913
- p?.(z);
913
+ g?.(z);
914
914
  } else
915
- p?.(D), I(!1), te("");
915
+ g?.(D), P(!1), te("");
916
916
  }, N = v ? null : w.find((D) => D.value === k), U = v ? w.filter(
917
917
  (D) => Array.isArray(k) && k.includes(D.value)
918
918
  ) : [], re = b && H ? w.filter(
@@ -925,19 +925,19 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
925
925
  label: A
926
926
  };
927
927
  if (S(w, z.value) || S(w, z.label)) {
928
- _(z.value), te(""), v || I(!1);
928
+ _(z.value), te(""), v || P(!1);
929
929
  return;
930
930
  }
931
- c((F) => [...F, z]), _(z.value), te(""), v || I(!1);
932
- }, P = () => v ? U.length > 0 ? U.map((D) => D.label).join(", ") : u || "Select options" : N?.label || u || "Select an option";
933
- return /* @__PURE__ */ i(
931
+ i((F) => [...F, z]), _(z.value), te(""), v || P(!1);
932
+ }, I = () => v ? U.length > 0 ? U.map((D) => D.label).join(", ") : m || "Select options" : N?.label || m || "Select an option";
933
+ return /* @__PURE__ */ c(
934
934
  "div",
935
935
  {
936
936
  ref: J,
937
937
  className: d(
938
938
  "relative flex flex-col",
939
939
  a && "w-full",
940
- m
940
+ u
941
941
  ),
942
942
  ...C,
943
943
  children: [
@@ -945,7 +945,7 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
945
945
  "label",
946
946
  {
947
947
  htmlFor: T,
948
- onClick: () => I(!V),
948
+ onClick: () => P(!V),
949
949
  className: d(
950
950
  "block text-xs font-semibold uppercase tracking-label mb-1.5",
951
951
  G ? "text-danger-fg" : "text-text-muted",
@@ -954,15 +954,15 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
954
954
  children: t
955
955
  }
956
956
  ),
957
- /* @__PURE__ */ i("div", { className: "relative", children: [
958
- /* @__PURE__ */ i(
957
+ /* @__PURE__ */ c("div", { className: "relative", children: [
958
+ /* @__PURE__ */ c(
959
959
  "button",
960
960
  {
961
961
  ref: K,
962
962
  type: "button",
963
963
  id: T,
964
964
  disabled: l,
965
- onClick: () => I(!V),
965
+ onClick: () => P(!V),
966
966
  className: d(
967
967
  "flex w-full items-center justify-between gap-2 rounded-tile border transition-colors duration-fast text-left",
968
968
  "focus-visible:outline-none focus-visible:focus-ring",
@@ -973,7 +973,7 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
973
973
  x
974
974
  ),
975
975
  children: [
976
- /* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: P() }),
976
+ /* @__PURE__ */ e("span", { className: "truncate flex-1 min-w-0", children: I() }),
977
977
  /* @__PURE__ */ e(
978
978
  ot,
979
979
  {
@@ -987,7 +987,7 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
987
987
  ]
988
988
  }
989
989
  ),
990
- V && /* @__PURE__ */ i("div", { style: ce, className: "fixed z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
990
+ V && /* @__PURE__ */ c("div", { style: ce, className: "fixed z-overlay flex flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-overlay", children: [
991
991
  b && /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e(
992
992
  "input",
993
993
  {
@@ -1004,7 +1004,7 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
1004
1004
  )
1005
1005
  }
1006
1006
  ) }),
1007
- ee && /* @__PURE__ */ i(
1007
+ ee && /* @__PURE__ */ c(
1008
1008
  "div",
1009
1009
  {
1010
1010
  className: d(
@@ -1019,15 +1019,15 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
1019
1019
  ]
1020
1020
  }
1021
1021
  ),
1022
- /* @__PURE__ */ i("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
1023
- u && !v && /* @__PURE__ */ e(
1022
+ /* @__PURE__ */ c("ul", { className: "min-h-0 flex-1 overflow-auto py-1", children: [
1023
+ m && !v && /* @__PURE__ */ e(
1024
1024
  "li",
1025
1025
  {
1026
1026
  className: "cursor-pointer px-3 py-1.5 text-sm text-text-muted hover:bg-surface-hover",
1027
1027
  onClick: () => {
1028
- p?.(""), I(!1);
1028
+ g?.(""), P(!1);
1029
1029
  },
1030
- children: u
1030
+ children: m
1031
1031
  }
1032
1032
  ),
1033
1033
  re.map((D) => {
@@ -1042,7 +1042,7 @@ const Ut = () => /* @__PURE__ */ e(Q, { icon: lt, size: "md", color: "current" }
1042
1042
  D.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface-hover",
1043
1043
  A && "bg-accent-soft text-accent font-semibold"
1044
1044
  ),
1045
- children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
1045
+ children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
1046
1046
  v && /* @__PURE__ */ e(
1047
1047
  "input",
1048
1048
  {
@@ -1091,19 +1091,19 @@ const Jt = {
1091
1091
  fullWidth: a = !1,
1092
1092
  startIcon: l,
1093
1093
  endIcon: o,
1094
- loading: u = !1,
1095
- containerClassName: m,
1094
+ loading: m = !1,
1095
+ containerClassName: u,
1096
1096
  labelClassName: y,
1097
1097
  className: x,
1098
1098
  id: h,
1099
1099
  ...b
1100
1100
  }, v) => {
1101
- const k = oe.useId(), p = h || `textfield-${k}`, f = !!n, $ = n || r ? `${p}-description` : void 0;
1102
- return /* @__PURE__ */ i("div", { className: d("flex flex-col", a && "w-full", m), children: [
1101
+ const k = oe.useId(), g = h || `textfield-${k}`, f = !!n, $ = n || r ? `${g}-description` : void 0;
1102
+ return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", u), children: [
1103
1103
  t && /* @__PURE__ */ e(
1104
1104
  "label",
1105
1105
  {
1106
- htmlFor: p,
1106
+ htmlFor: g,
1107
1107
  className: d(
1108
1108
  Ue,
1109
1109
  f ? "text-danger-fg" : "text-text-muted",
@@ -1112,27 +1112,27 @@ const Jt = {
1112
1112
  children: t
1113
1113
  }
1114
1114
  ),
1115
- /* @__PURE__ */ i("div", { className: "relative", children: [
1115
+ /* @__PURE__ */ c("div", { className: "relative", children: [
1116
1116
  l && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-muted", children: l }),
1117
1117
  /* @__PURE__ */ e(
1118
1118
  "input",
1119
1119
  {
1120
1120
  ref: v,
1121
- id: p,
1121
+ id: g,
1122
1122
  "aria-invalid": f || void 0,
1123
1123
  "aria-describedby": $,
1124
1124
  className: d(
1125
1125
  We,
1126
1126
  Jt[s],
1127
1127
  l && "pl-9",
1128
- (o || u) && "pr-9",
1128
+ (o || m) && "pr-9",
1129
1129
  Ke(f),
1130
1130
  x
1131
1131
  ),
1132
1132
  ...b
1133
1133
  }
1134
1134
  ),
1135
- (o || u) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: u ? /* @__PURE__ */ e(
1135
+ (o || m) && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted", children: m ? /* @__PURE__ */ e(
1136
1136
  "span",
1137
1137
  {
1138
1138
  "aria-hidden": !0,
@@ -1160,9 +1160,9 @@ function Yt({
1160
1160
  size: a = "md",
1161
1161
  placeholder: l,
1162
1162
  templatePlaceholder: o,
1163
- showTemplate: u = !0
1163
+ showTemplate: m = !0
1164
1164
  }) {
1165
- const [m, y] = O([]);
1165
+ const [u, y] = O([]);
1166
1166
  X(() => {
1167
1167
  let h = !0;
1168
1168
  return Promise.resolve(n?.()).then((b) => {
@@ -1173,19 +1173,19 @@ function Yt({
1173
1173
  };
1174
1174
  }, []);
1175
1175
  const x = t ?? {};
1176
- return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
1176
+ return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
1177
1177
  /* @__PURE__ */ e(
1178
1178
  Ce,
1179
1179
  {
1180
1180
  size: a,
1181
1181
  fullWidth: !0,
1182
1182
  value: x.folderId ?? "",
1183
- options: m.map((h) => ({ value: h.id, label: h.name })),
1183
+ options: u.map((h) => ({ value: h.id, label: h.name })),
1184
1184
  placeholder: l ?? "Select a folder",
1185
1185
  onChange: (h) => r?.({ ...x, folderId: h })
1186
1186
  }
1187
1187
  ),
1188
- u && /* @__PURE__ */ e(
1188
+ m && /* @__PURE__ */ e(
1189
1189
  Ne,
1190
1190
  {
1191
1191
  size: a,
@@ -1197,7 +1197,7 @@ function Yt({
1197
1197
  )
1198
1198
  ] });
1199
1199
  }
1200
- const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(Me, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Zt = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Qt = {
1200
+ const ge = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(Me, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Zt = (t) => /* @__PURE__ */ e(Se, { ...t, strokeWidth: 1.5, "aria-hidden": !0 }), Qt = {
1201
1201
  sm: "h-control-sm px-3 text-sm",
1202
1202
  md: "h-control-md px-3 text-base",
1203
1203
  lg: "h-control-lg px-3 text-base",
@@ -1216,36 +1216,36 @@ const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(
1216
1216
  fullWidth: a = !1,
1217
1217
  startIcon: l = /* @__PURE__ */ e(Xt, {}),
1218
1218
  loading: o = !1,
1219
- containerClassName: u,
1220
- labelClassName: m,
1219
+ containerClassName: m,
1220
+ labelClassName: u,
1221
1221
  className: y,
1222
1222
  id: x,
1223
1223
  options: h,
1224
1224
  onRemoteSearch: b,
1225
1225
  onSelect: v,
1226
1226
  debounceTime: k = 500,
1227
- showAllOnOpen: p = !1,
1227
+ showAllOnOpen: g = !1,
1228
1228
  value: f,
1229
1229
  onChange: $,
1230
1230
  ...C
1231
1231
  }, q) => {
1232
- const T = x || `searchfield-${Math.random().toString(36).substr(2, 9)}`, G = !!n, V = se(null), I = se(null), [H, te] = O(f || ""), [J, K] = O(!1), [ce, w] = O(!1), [c, S] = O(!1);
1232
+ const T = x || `searchfield-${Math.random().toString(36).substr(2, 9)}`, G = !!n, V = se(null), P = se(null), [H, te] = O(f || ""), [J, K] = O(!1), [ce, w] = O(!1), [i, S] = O(!1);
1233
1233
  X(() => {
1234
1234
  f !== void 0 && te(f);
1235
1235
  }, [f]);
1236
- const g = ge(() => {
1237
- if (p && !c || !H) return h;
1238
- const P = String(H).toLowerCase();
1236
+ const p = pe(() => {
1237
+ if (g && !i || !H) return h;
1238
+ const I = String(H).toLowerCase();
1239
1239
  return h.filter(
1240
- (D) => String(D.label).toLowerCase().includes(P)
1240
+ (D) => String(D.label).toLowerCase().includes(I)
1241
1241
  );
1242
- }, [H, h, p, c]);
1242
+ }, [H, h, g, i]);
1243
1243
  X(() => {
1244
1244
  if (!b || !H) {
1245
1245
  w(!1);
1246
1246
  return;
1247
1247
  }
1248
- const P = setTimeout(async () => {
1248
+ const I = setTimeout(async () => {
1249
1249
  w(!0);
1250
1250
  try {
1251
1251
  await b(String(H));
@@ -1256,29 +1256,29 @@ const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(
1256
1256
  }
1257
1257
  }, k);
1258
1258
  return () => {
1259
- clearTimeout(P), w(!1);
1259
+ clearTimeout(I), w(!1);
1260
1260
  };
1261
1261
  }, [H, k, b]), X(() => {
1262
- const P = (D) => {
1262
+ const I = (D) => {
1263
1263
  V.current && !V.current.contains(D.target) && K(!1);
1264
1264
  };
1265
- return document.addEventListener("mousedown", P), () => document.removeEventListener("mousedown", P);
1265
+ return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
1266
1266
  }, []);
1267
- const _ = (P) => {
1268
- const D = P.target.value;
1269
- te(D), K(!0), S(!0), $ && $(P);
1270
- }, N = (P) => {
1271
- te(P.label), K(!1), S(!1), v && v(P.value);
1267
+ const _ = (I) => {
1268
+ const D = I.target.value;
1269
+ te(D), K(!0), S(!0), $ && $(I);
1270
+ }, N = (I) => {
1271
+ te(I.label), K(!1), S(!1), v && v(I.value);
1272
1272
  }, U = () => {
1273
1273
  (h.length > 0 || b) && (K(!0), S(!1));
1274
- }, re = o || ce, ee = J && (g.length > 0 || re), Y = ge(() => q || I, [q]);
1275
- return /* @__PURE__ */ i(
1274
+ }, re = o || ce, ee = J && (p.length > 0 || re), Y = pe(() => q || P, [q]);
1275
+ return /* @__PURE__ */ c(
1276
1276
  "div",
1277
1277
  {
1278
- className: pe(
1278
+ className: ge(
1279
1279
  "flex flex-col",
1280
1280
  a ? "w-full" : "",
1281
- u || "",
1281
+ m || "",
1282
1282
  "relative"
1283
1283
  ),
1284
1284
  ref: V,
@@ -1287,16 +1287,16 @@ const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(
1287
1287
  "label",
1288
1288
  {
1289
1289
  htmlFor: T,
1290
- className: pe(
1290
+ className: ge(
1291
1291
  "block text-sm font-medium mb-1",
1292
1292
  G ? "text-danger-fg" : "text-text",
1293
- m || ""
1293
+ u || ""
1294
1294
  ),
1295
1295
  children: t
1296
1296
  }
1297
1297
  ),
1298
- /* @__PURE__ */ i("div", { className: "relative", children: [
1299
- l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: pe("text-text-muted", _e[s]), children: l }) }),
1298
+ /* @__PURE__ */ c("div", { className: "relative", children: [
1299
+ l && /* @__PURE__ */ e("div", { className: "absolute left-0 pl-3 flex items-center pointer-events-none h-full", children: /* @__PURE__ */ e("span", { className: ge("text-text-muted", _e[s]), children: l }) }),
1300
1300
  /* @__PURE__ */ e(
1301
1301
  "input",
1302
1302
  {
@@ -1305,7 +1305,7 @@ const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(
1305
1305
  value: H,
1306
1306
  onChange: _,
1307
1307
  onFocus: U,
1308
- className: pe(
1308
+ className: ge(
1309
1309
  // Base styles
1310
1310
  "block w-full rounded-tile border bg-surface-input transition-colors duration-fast ease-out",
1311
1311
  "placeholder:text-text-subtle focus-visible:outline-none focus-visible:focus-ring",
@@ -1328,7 +1328,7 @@ const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(
1328
1328
  /* @__PURE__ */ e(
1329
1329
  ct,
1330
1330
  {
1331
- className: pe("animate-spin text-info-fg", _e[s]),
1331
+ className: ge("animate-spin text-info-fg", _e[s]),
1332
1332
  "aria-hidden": !0
1333
1333
  }
1334
1334
  )
@@ -1337,13 +1337,13 @@ const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(
1337
1337
  /* @__PURE__ */ e(
1338
1338
  Zt,
1339
1339
  {
1340
- className: pe(
1340
+ className: ge(
1341
1341
  "text-text-muted cursor-pointer transition-transform",
1342
1342
  _e[s],
1343
1343
  J ? "rotate-180" : "rotate-0"
1344
1344
  ),
1345
1345
  onClick: () => {
1346
- K((P) => (P || S(!1), !P));
1346
+ K((I) => (I || S(!1), !I));
1347
1347
  }
1348
1348
  }
1349
1349
  )
@@ -1354,30 +1354,30 @@ const pe = (...t) => t.filter(Boolean).join(" "), Xt = (t) => /* @__PURE__ */ e(
1354
1354
  {
1355
1355
  className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
1356
1356
  role: "listbox",
1357
- children: g.length > 0 ? g.map((P) => /* @__PURE__ */ e(
1357
+ children: p.length > 0 ? p.map((I) => /* @__PURE__ */ e(
1358
1358
  "li",
1359
1359
  {
1360
1360
  className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
1361
- onClick: () => N(P),
1361
+ onClick: () => N(I),
1362
1362
  role: "option",
1363
- "aria-selected": H === P.label,
1364
- children: P.label
1363
+ "aria-selected": H === I.label,
1364
+ children: I.label
1365
1365
  },
1366
- P.value
1366
+ I.value
1367
1367
  )) : /* @__PURE__ */ e("li", { className: "px-4 py-2 text-text-muted", children: re || o ? "Zoeken op afstand..." : "Geen resultaten gevonden." })
1368
1368
  }
1369
1369
  ),
1370
1370
  (n || r) && /* @__PURE__ */ e(
1371
1371
  "p",
1372
1372
  {
1373
- className: pe(
1373
+ className: ge(
1374
1374
  "mt-1 text-xs",
1375
1375
  G ? "text-danger-fg" : "text-text-muted"
1376
1376
  ),
1377
1377
  children: n || r
1378
1378
  }
1379
1379
  ),
1380
- b && /* @__PURE__ */ i("p", { className: "mt-2 text-xs text-success-fg", children: [
1380
+ b && /* @__PURE__ */ c("p", { className: "mt-2 text-xs text-success-fg", children: [
1381
1381
  "Huidige zoekterm (niet-gedebounced): ",
1382
1382
  String(H)
1383
1383
  ] })
@@ -1396,9 +1396,9 @@ const Ge = xe(
1396
1396
  clearLabel: a = "Clear search",
1397
1397
  containerClassName: l,
1398
1398
  className: o,
1399
- disabled: u,
1400
- ...m
1401
- }, y) => /* @__PURE__ */ i(
1399
+ disabled: m,
1400
+ ...u
1401
+ }, y) => /* @__PURE__ */ c(
1402
1402
  "div",
1403
1403
  {
1404
1404
  className: d(
@@ -1408,7 +1408,7 @@ const Ge = xe(
1408
1408
  "flex items-center gap-2 rounded-md bg-surface-sunk px-2.5 text-text-muted",
1409
1409
  "transition-colors duration-fast ease-out",
1410
1410
  s === "sm" ? "h-control-sm" : "h-control-md",
1411
- u && "opacity-60",
1411
+ m && "opacity-60",
1412
1412
  l
1413
1413
  ),
1414
1414
  children: [
@@ -1419,7 +1419,7 @@ const Ge = xe(
1419
1419
  ref: y,
1420
1420
  type: "search",
1421
1421
  value: t,
1422
- disabled: u,
1422
+ disabled: m,
1423
1423
  onChange: (x) => r(x.target.value),
1424
1424
  className: d(
1425
1425
  // The forms base layer hands every input a white fill, a 1px border
@@ -1434,7 +1434,7 @@ const Ge = xe(
1434
1434
  "[&::-webkit-search-cancel-button]:appearance-none",
1435
1435
  o
1436
1436
  ),
1437
- ...m
1437
+ ...u
1438
1438
  }
1439
1439
  ),
1440
1440
  t ? /* @__PURE__ */ e(
@@ -1454,7 +1454,7 @@ const Ge = xe(
1454
1454
  Ge.displayName = "SearchField";
1455
1455
  const tr = xe(
1456
1456
  ({ checked: t, onChange: r, label: n, disabled: s = !1, className: a, ...l }, o) => {
1457
- const u = /* @__PURE__ */ e(
1457
+ const m = /* @__PURE__ */ e(
1458
1458
  "span",
1459
1459
  {
1460
1460
  "aria-hidden": !0,
@@ -1476,7 +1476,7 @@ const tr = xe(
1476
1476
  )
1477
1477
  }
1478
1478
  );
1479
- return /* @__PURE__ */ i(
1479
+ return /* @__PURE__ */ c(
1480
1480
  "label",
1481
1481
  {
1482
1482
  className: d(
@@ -1493,12 +1493,12 @@ const tr = xe(
1493
1493
  role: "switch",
1494
1494
  checked: t,
1495
1495
  disabled: s,
1496
- onChange: (m) => r(m.target.checked),
1496
+ onChange: (u) => r(u.target.checked),
1497
1497
  className: "peer sr-only",
1498
1498
  ...l
1499
1499
  }
1500
1500
  ),
1501
- /* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children: u }),
1501
+ /* @__PURE__ */ e("span", { className: "inline-flex rounded-full peer-focus-visible:focus-ring", children: m }),
1502
1502
  n && /* @__PURE__ */ e("span", { className: "text-sm text-text", children: n })
1503
1503
  ]
1504
1504
  }
@@ -1514,43 +1514,43 @@ function rr({
1514
1514
  tableRows: a = 8
1515
1515
  }) {
1516
1516
  const l = ({ children: o }) => t === "inline" ? /* @__PURE__ */ e(ve, { children: o }) : /* @__PURE__ */ e("main", { className: "flex-1 bg-surface p-6", children: o });
1517
- return r ? /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { className: "w-full max-w-6xl mx-auto animate-pulse", children: r }) }) : /* @__PURE__ */ e(l, { children: /* @__PURE__ */ i("div", { className: "w-full mx-auto space-y-6 animate-pulse", children: [
1518
- !n && /* @__PURE__ */ i(ve, { children: [
1517
+ return r ? /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { className: "w-full max-w-6xl mx-auto animate-pulse", children: r }) }) : /* @__PURE__ */ e(l, { children: /* @__PURE__ */ c("div", { className: "w-full mx-auto space-y-6 animate-pulse", children: [
1518
+ !n && /* @__PURE__ */ c(ve, { children: [
1519
1519
  /* @__PURE__ */ e("div", { className: "h-6 w-1/4 rounded-sm bg-surface-hover" }),
1520
- /* @__PURE__ */ i("div", { className: "space-y-2", children: [
1520
+ /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1521
1521
  /* @__PURE__ */ e("div", { className: "h-4 w-3/4 rounded-sm bg-surface-hover" }),
1522
1522
  /* @__PURE__ */ e("div", { className: "h-4 w-1/2 rounded-sm bg-surface-hover" })
1523
1523
  ] })
1524
1524
  ] }),
1525
- n && /* @__PURE__ */ i("div", { className: "rounded-lg overflow-hidden", children: [
1525
+ n && /* @__PURE__ */ c("div", { className: "rounded-lg overflow-hidden", children: [
1526
1526
  /* @__PURE__ */ e(
1527
1527
  "div",
1528
1528
  {
1529
1529
  className: "grid gap-2 bg-surface-hover p-3",
1530
1530
  style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
1531
- children: Array.from({ length: s }).map((o, u) => /* @__PURE__ */ e(
1531
+ children: Array.from({ length: s }).map((o, m) => /* @__PURE__ */ e(
1532
1532
  "div",
1533
1533
  {
1534
1534
  className: "h-4 w-2/3 rounded-sm bg-border-strong"
1535
1535
  },
1536
- `header-${u}`
1536
+ `header-${m}`
1537
1537
  ))
1538
1538
  }
1539
1539
  ),
1540
- Array.from({ length: a }).map((o, u) => /* @__PURE__ */ e(
1540
+ Array.from({ length: a }).map((o, m) => /* @__PURE__ */ e(
1541
1541
  "div",
1542
1542
  {
1543
1543
  className: "grid gap-2 border-t border-border-subtle p-3",
1544
1544
  style: { gridTemplateColumns: `repeat(${s}, minmax(0, 1fr))` },
1545
- children: Array.from({ length: s }).map((m, y) => /* @__PURE__ */ e(
1545
+ children: Array.from({ length: s }).map((u, y) => /* @__PURE__ */ e(
1546
1546
  "div",
1547
1547
  {
1548
1548
  className: "h-4 w-full rounded-sm bg-surface-hover"
1549
1549
  },
1550
- `cell-${u}-${y}`
1550
+ `cell-${m}-${y}`
1551
1551
  ))
1552
1552
  },
1553
- `row-${u}`
1553
+ `row-${m}`
1554
1554
  ))
1555
1555
  ] })
1556
1556
  ] }) });
@@ -1563,44 +1563,44 @@ const nr = ({
1563
1563
  placement: a = "bottom-start",
1564
1564
  disabled: l = !1,
1565
1565
  className: o,
1566
- showCheck: u = !0,
1567
- header: m
1566
+ showCheck: m = !0,
1567
+ header: u
1568
1568
  }) => {
1569
- const [y, x] = O(!1), [h, b] = O(null), [v, k] = O({ top: 0, left: 0 }), p = se(null), f = se(null), $ = se(null), C = se(null), q = $e(y, f, { placement: a }), T = se(null), G = () => Array.from(
1569
+ const [y, x] = O(!1), [h, b] = O(null), [v, k] = O({ top: 0, left: 0 }), g = se(null), f = se(null), $ = se(null), C = se(null), q = $e(y, f, { placement: a }), T = se(null), G = () => Array.from(
1570
1570
  C.current?.querySelectorAll("button[data-option-value]:not(:disabled)") ?? []
1571
1571
  );
1572
1572
  X(() => {
1573
1573
  y && G()[0]?.focus();
1574
1574
  }, [y]);
1575
- const V = (c) => {
1576
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(c.key)) return;
1577
- const g = G();
1578
- if (g.length === 0) return;
1579
- c.preventDefault();
1580
- const _ = g.indexOf(document.activeElement), N = c.key === "Home" ? 0 : c.key === "End" ? g.length - 1 : c.key === "ArrowDown" ? (_ + 1) % g.length : (_ - 1 + g.length) % g.length;
1581
- g[N]?.focus();
1575
+ const V = (i) => {
1576
+ if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(i.key)) return;
1577
+ const p = G();
1578
+ if (p.length === 0) return;
1579
+ i.preventDefault();
1580
+ const _ = p.indexOf(document.activeElement), N = i.key === "Home" ? 0 : i.key === "End" ? p.length - 1 : i.key === "ArrowDown" ? (_ + 1) % p.length : (_ - 1 + p.length) % p.length;
1581
+ p[N]?.focus();
1582
1582
  };
1583
1583
  X(() => {
1584
- const c = (S) => {
1585
- p.current && (!p.current.contains(S.target) || $.current && !$.current.contains(S.target)) && (x(!1), b(null), T.current && (clearTimeout(T.current), T.current = null));
1584
+ const i = (S) => {
1585
+ g.current && (!g.current.contains(S.target) || $.current && !$.current.contains(S.target)) && (x(!1), b(null), T.current && (clearTimeout(T.current), T.current = null));
1586
1586
  };
1587
- return y && document.addEventListener("mousedown", c), () => {
1588
- document.removeEventListener("mousedown", c);
1587
+ return y && document.addEventListener("mousedown", i), () => {
1588
+ document.removeEventListener("mousedown", i);
1589
1589
  };
1590
1590
  }, [y]), X(() => {
1591
- const c = (S) => {
1591
+ const i = (S) => {
1592
1592
  S.key === "Escape" && (x(!1), b(null), f.current?.focus(), T.current && (clearTimeout(T.current), T.current = null));
1593
1593
  };
1594
- return y && document.addEventListener("keydown", c), () => {
1595
- document.removeEventListener("keydown", c);
1594
+ return y && document.addEventListener("keydown", i), () => {
1595
+ document.removeEventListener("keydown", i);
1596
1596
  };
1597
1597
  }, [y]), X(() => {
1598
- if (h && p.current) {
1599
- const c = p.current.querySelector(
1598
+ if (h && g.current) {
1599
+ const i = g.current.querySelector(
1600
1600
  `[data-option-value="${h}"]`
1601
1601
  );
1602
- if (c) {
1603
- const S = c.getBoundingClientRect();
1602
+ if (i) {
1603
+ const S = i.getBoundingClientRect();
1604
1604
  k({
1605
1605
  top: S.top,
1606
1606
  left: S.right + 8
@@ -1610,18 +1610,18 @@ const nr = ({
1610
1610
  }, [h]), X(() => () => {
1611
1611
  T.current && clearTimeout(T.current);
1612
1612
  }, []);
1613
- const I = (c) => {
1614
- c.stopPropagation(), !l && (x(!y), b(null), T.current && (clearTimeout(T.current), T.current = null));
1615
- }, H = (c, S, g) => {
1616
- c.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, g), x(!1), b(null));
1617
- }, te = (c) => {
1618
- T.current && (clearTimeout(T.current), T.current = null), c.children && c.children.length > 0 ? b(c.value) : b(null);
1619
- }, J = (c) => {
1620
- c.children && c.children.length > 0 ? T.current = setTimeout(() => {
1613
+ const P = (i) => {
1614
+ i.stopPropagation(), !l && (x(!y), b(null), T.current && (clearTimeout(T.current), T.current = null));
1615
+ }, H = (i, S, p) => {
1616
+ i.stopPropagation(), !S.disabled && !S.divider && (!S.children || S.children.length === 0) && (s?.(S.value, p), x(!1), b(null));
1617
+ }, te = (i) => {
1618
+ T.current && (clearTimeout(T.current), T.current = null), i.children && i.children.length > 0 ? b(i.value) : b(null);
1619
+ }, J = (i) => {
1620
+ i.children && i.children.length > 0 ? T.current = setTimeout(() => {
1621
1621
  b(null);
1622
1622
  }, 150) : b(null);
1623
- }, K = (c, S, g) => {
1624
- c.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, g), x(!1), b(null));
1623
+ }, K = (i, S, p) => {
1624
+ i.stopPropagation(), !S.disabled && !S.divider && (s?.(S.value, p), x(!1), b(null));
1625
1625
  }, ce = d(
1626
1626
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
1627
1627
  "max-h-60 overflow-auto"
@@ -1629,10 +1629,10 @@ const nr = ({
1629
1629
  "fixed z-overlay min-w-menu bg-surface rounded-lg shadow-overlay border border-border",
1630
1630
  "max-h-60 overflow-auto"
1631
1631
  );
1632
- return /* @__PURE__ */ i(
1632
+ return /* @__PURE__ */ c(
1633
1633
  "div",
1634
1634
  {
1635
- ref: p,
1635
+ ref: g,
1636
1636
  className: d(
1637
1637
  "relative flex flex-row items-center justify-center rounded-lg hover:bg-surface-hover",
1638
1638
  o
@@ -1642,7 +1642,7 @@ const nr = ({
1642
1642
  "button",
1643
1643
  {
1644
1644
  ref: f,
1645
- onClick: I,
1645
+ onClick: P,
1646
1646
  disabled: l,
1647
1647
  "aria-haspopup": "menu",
1648
1648
  "aria-expanded": y,
@@ -1652,10 +1652,10 @@ const nr = ({
1652
1652
  children: t
1653
1653
  }
1654
1654
  ),
1655
- y && /* @__PURE__ */ e("div", { ref: C, className: ce, style: q, onKeyDown: V, children: /* @__PURE__ */ i("div", { className: "p-2", role: "menu", children: [
1656
- m && (typeof m == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: m }) : m),
1657
- r.map((c, S) => {
1658
- if (c.divider)
1655
+ y && /* @__PURE__ */ e("div", { ref: C, className: ce, style: q, onKeyDown: V, children: /* @__PURE__ */ c("div", { className: "p-2", role: "menu", children: [
1656
+ u && (typeof u == "string" ? /* @__PURE__ */ e("div", { className: "text-xs font-medium text-text-muted uppercase tracking-label px-3 py-2", children: u }) : u),
1657
+ r.map((i, S) => {
1658
+ if (i.divider)
1659
1659
  return /* @__PURE__ */ e(
1660
1660
  "div",
1661
1661
  {
@@ -1663,41 +1663,41 @@ const nr = ({
1663
1663
  },
1664
1664
  `divider-${S}`
1665
1665
  );
1666
- const g = c.children && c.children.length > 0, _ = h === c.value;
1667
- return /* @__PURE__ */ i("div", { className: "relative group", children: [
1668
- /* @__PURE__ */ i(
1666
+ const p = i.children && i.children.length > 0, _ = h === i.value;
1667
+ return /* @__PURE__ */ c("div", { className: "relative group", children: [
1668
+ /* @__PURE__ */ c(
1669
1669
  "button",
1670
1670
  {
1671
- "data-option-value": c.value,
1671
+ "data-option-value": i.value,
1672
1672
  role: "menuitem",
1673
- "aria-haspopup": g ? "menu" : void 0,
1674
- onClick: (N) => H(N, c),
1675
- onMouseEnter: () => te(c),
1676
- onMouseLeave: () => J(c),
1677
- disabled: c.disabled,
1673
+ "aria-haspopup": p ? "menu" : void 0,
1674
+ onClick: (N) => H(N, i),
1675
+ onMouseEnter: () => te(i),
1676
+ onMouseLeave: () => J(i),
1677
+ disabled: i.disabled,
1678
1678
  className: d(
1679
1679
  "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",
1680
1680
  {
1681
- "opacity-50 cursor-not-allowed": c.disabled,
1682
- "bg-surface-hover": _ && g
1681
+ "opacity-50 cursor-not-allowed": i.disabled,
1682
+ "bg-surface-hover": _ && p
1683
1683
  }
1684
1684
  ),
1685
1685
  children: [
1686
- /* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
1687
- c.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: c.icon }),
1688
- /* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
1689
- /* @__PURE__ */ e("span", { className: "font-base truncate", children: c.label }),
1690
- c.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: c.description })
1686
+ /* @__PURE__ */ c("div", { className: "flex items-center space-x-2 min-w-0", children: [
1687
+ i.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: i.icon }),
1688
+ /* @__PURE__ */ c("div", { className: "flex flex-col items-start min-w-0", children: [
1689
+ /* @__PURE__ */ e("span", { className: "font-base truncate", children: i.label }),
1690
+ i.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: i.description })
1691
1691
  ] })
1692
1692
  ] }),
1693
- /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
1694
- u && n === c.value && /* @__PURE__ */ e(Ie, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1695
- g && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
1693
+ /* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
1694
+ m && n === i.value && /* @__PURE__ */ e(Pe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 }),
1695
+ p && /* @__PURE__ */ e("span", { className: "text-text-muted text-xs", children: "▶" })
1696
1696
  ] })
1697
1697
  ]
1698
1698
  }
1699
1699
  ),
1700
- g && _ && /* @__PURE__ */ e(
1700
+ p && _ && /* @__PURE__ */ e(
1701
1701
  "div",
1702
1702
  {
1703
1703
  ref: $,
@@ -1707,14 +1707,14 @@ const nr = ({
1707
1707
  left: `${v.left}px`
1708
1708
  },
1709
1709
  onMouseEnter: () => {
1710
- T.current && (clearTimeout(T.current), T.current = null), b(c.value);
1710
+ T.current && (clearTimeout(T.current), T.current = null), b(i.value);
1711
1711
  },
1712
1712
  onMouseLeave: () => {
1713
1713
  T.current = setTimeout(() => {
1714
1714
  b(null);
1715
1715
  }, 150);
1716
1716
  },
1717
- children: /* @__PURE__ */ e("div", { className: "p-2", children: c.children.map((N, U) => {
1717
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: i.children.map((N, U) => {
1718
1718
  if (N.divider)
1719
1719
  return /* @__PURE__ */ e(
1720
1720
  "div",
@@ -1723,16 +1723,16 @@ const nr = ({
1723
1723
  },
1724
1724
  `divider-${U}`
1725
1725
  );
1726
- const re = typeof n == "object" && n[c.value] && n[c.value].includes(
1726
+ const re = typeof n == "object" && n[i.value] && n[i.value].includes(
1727
1727
  N.value
1728
1728
  ) || n === N.value;
1729
- return /* @__PURE__ */ i(
1729
+ return /* @__PURE__ */ c(
1730
1730
  "button",
1731
1731
  {
1732
1732
  onClick: (ee) => K(
1733
1733
  ee,
1734
1734
  N,
1735
- c.value
1735
+ i.value
1736
1736
  ),
1737
1737
  disabled: N.disabled,
1738
1738
  className: d(
@@ -1742,14 +1742,14 @@ const nr = ({
1742
1742
  }
1743
1743
  ),
1744
1744
  children: [
1745
- /* @__PURE__ */ i("div", { className: "flex items-center space-x-2 min-w-0", children: [
1745
+ /* @__PURE__ */ c("div", { className: "flex items-center space-x-2 min-w-0", children: [
1746
1746
  N.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: N.icon }),
1747
- /* @__PURE__ */ i("div", { className: "flex flex-col items-start min-w-0", children: [
1747
+ /* @__PURE__ */ c("div", { className: "flex flex-col items-start min-w-0", children: [
1748
1748
  /* @__PURE__ */ e("span", { className: "font-base truncate", children: N.label }),
1749
1749
  N.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: N.description })
1750
1750
  ] })
1751
1751
  ] }),
1752
- u && re && /* @__PURE__ */ e(Ie, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1752
+ m && re && /* @__PURE__ */ e(Pe, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
1753
1753
  ]
1754
1754
  },
1755
1755
  N.value
@@ -1757,16 +1757,16 @@ const nr = ({
1757
1757
  }) })
1758
1758
  }
1759
1759
  )
1760
- ] }, c.value);
1760
+ ] }, i.value);
1761
1761
  }),
1762
1762
  (() => {
1763
- const c = r.reduce((S, g) => {
1764
- if (g.divider) return S;
1765
- const _ = g.children ? g.children.filter((N) => !N.divider).length : 0;
1763
+ const i = r.reduce((S, p) => {
1764
+ if (p.divider) return S;
1765
+ const _ = p.children ? p.children.filter((N) => !N.divider).length : 0;
1766
1766
  return S + 1 + _;
1767
1767
  }, 0);
1768
- return c > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ i("div", { className: "text-xs text-text-muted px-3 py-1", children: [
1769
- c,
1768
+ return i > 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: [
1769
+ i,
1770
1770
  " options available"
1771
1771
  ] }) });
1772
1772
  })()
@@ -1808,14 +1808,14 @@ const nr = ({
1808
1808
  sm: "p-2",
1809
1809
  md: "px-5 py-4",
1810
1810
  lg: "p-6"
1811
- }, pn = ({
1811
+ }, vn = ({
1812
1812
  actions: t = [],
1813
1813
  onBack: r,
1814
1814
  backLabel: n = "Back",
1815
1815
  className: s,
1816
1816
  padding: a = "md",
1817
1817
  children: l
1818
- }) => /* @__PURE__ */ i("div", { className: d("flex items-center gap-2", sr[a], s), children: [
1818
+ }) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2", sr[a], s), children: [
1819
1819
  r && /* @__PURE__ */ e(
1820
1820
  ae,
1821
1821
  {
@@ -1828,7 +1828,7 @@ const nr = ({
1828
1828
  ),
1829
1829
  l && /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
1830
1830
  /* @__PURE__ */ e(Je, { actions: t, className: d(!l && "ml-auto") })
1831
- ] }), gn = (t) => (r) => t(r instanceof Date ? r : null), vn = (t) => (r) => t(typeof r == "string" ? r : ""), ar = {
1831
+ ] }), yn = (t) => (r) => t(r instanceof Date ? r : null), Nn = (t) => (r) => t(typeof r == "string" ? r : ""), ar = {
1832
1832
  none: "px-0",
1833
1833
  sm: "px-2",
1834
1834
  md: "px-3.5",
@@ -1853,17 +1853,17 @@ const cr = (t) => {
1853
1853
  Ae,
1854
1854
  {
1855
1855
  value: t.value,
1856
- onChange: (u) => t.onChange(u),
1856
+ onChange: (m) => t.onChange(m),
1857
1857
  placeholder: t.placeholder || t.label,
1858
- className: d("min-w-40", o && "border-info text-info-fg")
1858
+ className: d("min-w-40", o && "bg-info-soft text-info-fg")
1859
1859
  }
1860
1860
  );
1861
1861
  }
1862
- const n = (o) => t.options?.find((u) => u.value === o)?.label ?? String(o), s = (o) => Array.isArray(t.value) ? t.value.includes(o) : t.value === o, a = (o) => {
1862
+ const n = (o) => t.options?.find((m) => m.value === o)?.label ?? String(o), s = (o) => Array.isArray(t.value) ? t.value.includes(o) : t.value === o, a = (o) => {
1863
1863
  if (!t.multiSelect) return t.onChange(o);
1864
- const u = Array.isArray(t.value) ? t.value : [];
1864
+ const m = Array.isArray(t.value) ? t.value : [];
1865
1865
  t.onChange(
1866
- u.includes(o) ? u.filter((m) => m !== o) : [...u, o]
1866
+ m.includes(o) ? m.filter((u) => u !== o) : [...m, o]
1867
1867
  );
1868
1868
  }, l = r.length > 0;
1869
1869
  return /* @__PURE__ */ e(
@@ -1876,24 +1876,24 @@ const cr = (t) => {
1876
1876
  label: l ? `${t.label}: ${r.map(n).join(", ")}` : t.label,
1877
1877
  title: t.label,
1878
1878
  onClear: () => t.onChange(t.multiSelect ? [] : "all"),
1879
- menu: (o) => /* @__PURE__ */ e("div", { role: "listbox", className: "flex flex-col", children: t.options?.map((u) => /* @__PURE__ */ e(
1879
+ menu: (o) => /* @__PURE__ */ e("div", { role: "listbox", className: "flex flex-col", children: t.options?.map((m) => /* @__PURE__ */ e(
1880
1880
  "button",
1881
1881
  {
1882
1882
  type: "button",
1883
1883
  role: "option",
1884
- "aria-selected": s(u.value),
1884
+ "aria-selected": s(m.value),
1885
1885
  onClick: () => {
1886
- a(u.value), t.multiSelect || o();
1886
+ a(m.value), t.multiSelect || o();
1887
1887
  },
1888
1888
  className: d(
1889
1889
  "flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm",
1890
1890
  "transition-colors duration-fast ease-out hover:bg-surface-hover",
1891
1891
  "focus-visible:outline-none focus-visible:focus-ring",
1892
- s(u.value) ? "font-medium text-text" : "text-text-muted"
1892
+ s(m.value) ? "font-medium text-text" : "text-text-muted"
1893
1893
  ),
1894
- children: u.label
1894
+ children: m.label
1895
1895
  },
1896
- u.value
1896
+ m.value
1897
1897
  )) })
1898
1898
  }
1899
1899
  );
@@ -1905,15 +1905,15 @@ const cr = (t) => {
1905
1905
  searchPlaceholder: a = "Search...",
1906
1906
  searchValue: l,
1907
1907
  onSearchChange: o,
1908
- filters: u = [],
1909
- toolbarActions: m = [],
1908
+ filters: m = [],
1909
+ toolbarActions: u = [],
1910
1910
  paginated: y = !1,
1911
1911
  defaultPageSize: x = 10,
1912
1912
  actions: h = [],
1913
1913
  onRowClick: b,
1914
1914
  selectable: v = !1,
1915
1915
  selectedRows: k = [],
1916
- onSelectionChange: p,
1916
+ onSelectionChange: g,
1917
1917
  getRowKey: f = (te, J) => J,
1918
1918
  emptyContent: $,
1919
1919
  footerSummary: C,
@@ -1921,16 +1921,16 @@ const cr = (t) => {
1921
1921
  hoverable: T = !0,
1922
1922
  padding: G = "md",
1923
1923
  className: V,
1924
- rowClassName: I,
1924
+ rowClassName: P,
1925
1925
  headerBackground: H = !0
1926
1926
  }) => {
1927
- const [te, J] = O(""), K = l !== void 0, ce = K ? l : te, w = o ?? J, [c, S] = O({
1927
+ const [te, J] = O(""), K = l !== void 0, ce = K ? l : te, w = o ?? J, [i, S] = O({
1928
1928
  column: null,
1929
1929
  direction: null
1930
- }), [g, _] = O({
1930
+ }), [p, _] = O({
1931
1931
  page: 0,
1932
1932
  pageSize: x
1933
- }), N = se(null), U = ge(() => {
1933
+ }), N = se(null), U = pe(() => {
1934
1934
  let E = t;
1935
1935
  if (s && !K && ce.trim()) {
1936
1936
  const W = r.filter(
@@ -1941,7 +1941,7 @@ const cr = (t) => {
1941
1941
  return String(ue || "").toLowerCase().includes(le);
1942
1942
  }));
1943
1943
  }
1944
- return u.forEach((W) => {
1944
+ return m.forEach((W) => {
1945
1945
  W.value && W.value !== "all" && (E = E.filter((le) => {
1946
1946
  const ie = r.find((ue) => ue.id === W.id);
1947
1947
  if (!ie) return !0;
@@ -1949,46 +1949,46 @@ const cr = (t) => {
1949
1949
  return String(R || "") === W.value;
1950
1950
  }));
1951
1951
  }), E;
1952
- }, [t, ce, K, r, s, u]), re = ge(() => {
1953
- if (!c.column || !c.direction) return U;
1954
- const E = r.find((W) => W.id === c.column);
1952
+ }, [t, ce, K, r, s, m]), re = pe(() => {
1953
+ if (!i.column || !i.direction) return U;
1954
+ const E = r.find((W) => W.id === i.column);
1955
1955
  return E ? [...U].sort((W, le) => {
1956
1956
  const ie = typeof E.accessor == "function" ? E.accessor(W) : W[E.accessor], R = typeof E.accessor == "function" ? E.accessor(le) : le[E.accessor];
1957
1957
  let ue = 0;
1958
- return ie < R ? ue = -1 : ie > R && (ue = 1), c.direction === "desc" ? -ue : ue;
1958
+ return ie < R ? ue = -1 : ie > R && (ue = 1), i.direction === "desc" ? -ue : ue;
1959
1959
  }) : U;
1960
- }, [U, c, r]), ee = ge(() => {
1960
+ }, [U, i, r]), ee = pe(() => {
1961
1961
  if (!y) return re;
1962
- const E = g.page * g.pageSize, W = E + g.pageSize;
1962
+ const E = p.page * p.pageSize, W = E + p.pageSize;
1963
1963
  return re.slice(E, W);
1964
- }, [re, g, y]), Y = he(
1964
+ }, [re, p, y]), Y = he(
1965
1965
  (E) => {
1966
1966
  r.find((le) => le.id === E)?.sortable && S((le) => le.column !== E ? { column: E, direction: "asc" } : le.direction === "asc" ? { column: E, direction: "desc" } : { column: null, direction: null });
1967
1967
  },
1968
1968
  [r]
1969
- ), P = he((E) => {
1969
+ ), I = he((E) => {
1970
1970
  _((W) => ({ ...W, page: E }));
1971
1971
  }, []), D = he(
1972
1972
  (E, W) => {
1973
- if (!p) return;
1973
+ if (!g) return;
1974
1974
  const le = f(E, 0);
1975
- p(W ? [...k, E] : k.filter(
1975
+ g(W ? [...k, E] : k.filter(
1976
1976
  (ie, R) => f(k[R], R) !== le
1977
1977
  ));
1978
1978
  },
1979
- [k, p, f]
1979
+ [k, g, f]
1980
1980
  ), A = he(
1981
1981
  (E) => {
1982
- p && p(E ? [...ee] : []);
1982
+ g && g(E ? [...ee] : []);
1983
1983
  },
1984
- [ee, p]
1984
+ [ee, g]
1985
1985
  );
1986
1986
  X(() => {
1987
1987
  _((E) => ({ ...E, page: 0 }));
1988
- }, [ce, c]), X(() => {
1988
+ }, [ce, i]), X(() => {
1989
1989
  _((E) => ({ ...E, page: 0 }));
1990
- }, [u.map((E) => E.value).join(",")]);
1991
- const z = re.length, F = Math.ceil(z / g.pageSize), j = g.page * g.pageSize + 1, B = Math.min(j + g.pageSize - 1, z), M = ee.length > 0 && ee.every((E) => {
1990
+ }, [m.map((E) => E.value).join(",")]);
1991
+ const z = re.length, F = Math.ceil(z / p.pageSize), j = p.page * p.pageSize + 1, B = Math.min(j + p.pageSize - 1, z), M = ee.length > 0 && ee.every((E) => {
1992
1992
  const W = f(E, 0);
1993
1993
  return k.some(
1994
1994
  (le, ie) => f(le, ie) === W
@@ -1998,9 +1998,9 @@ const cr = (t) => {
1998
1998
  return k.some(
1999
1999
  (le, ie) => f(le, ie) === W
2000
2000
  );
2001
- }), Z = ar[G], ne = H ? "bg-surface-sunk" : "bg-surface", de = d("text-text", Z), be = s || u.length > 0 || m.length > 0, fe = y && z > 0, De = fe || C !== void 0;
2002
- return /* @__PURE__ */ i("div", { className: d("flex min-w-0 flex-col", V), children: [
2003
- be && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2001
+ }), Z = ar[G], ne = H ? "bg-surface-sunk" : "bg-surface", de = d("text-text", Z), be = s || m.length > 0 || u.length > 0, fe = y && z > 0, De = fe || C !== void 0;
2002
+ return /* @__PURE__ */ c("div", { className: d("flex min-w-0 flex-col", V), children: [
2003
+ be && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2 pb-3", children: [
2004
2004
  s && /* @__PURE__ */ e(
2005
2005
  Ge,
2006
2006
  {
@@ -2010,10 +2010,10 @@ const cr = (t) => {
2010
2010
  containerClassName: "w-full sm:w-66"
2011
2011
  }
2012
2012
  ),
2013
- u.map((E) => /* @__PURE__ */ e(cr, { ...E }, E.id)),
2014
- m.length > 0 && /* @__PURE__ */ e(Je, { actions: m, className: "ml-auto" })
2013
+ m.map((E) => /* @__PURE__ */ e(cr, { ...E }, E.id)),
2014
+ u.length > 0 && /* @__PURE__ */ e(Je, { actions: u, className: "ml-auto" })
2015
2015
  ] }),
2016
- /* @__PURE__ */ i("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: [
2016
+ /* @__PURE__ */ c("div", { className: "relative w-full overflow-x-auto rounded-lg ring-1 ring-border", children: [
2017
2017
  n && /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
2018
2018
  rr,
2019
2019
  {
@@ -2022,8 +2022,8 @@ const cr = (t) => {
2022
2022
  tableColumns: r.length
2023
2023
  }
2024
2024
  ) }),
2025
- /* @__PURE__ */ i("table", { ref: N, className: "min-w-full border-collapse text-base text-text", children: [
2026
- /* @__PURE__ */ e("thead", { className: d(ne, "h-control-lg"), children: /* @__PURE__ */ i("tr", { children: [
2025
+ /* @__PURE__ */ c("table", { ref: N, className: "min-w-full border-collapse text-base text-text", children: [
2026
+ /* @__PURE__ */ e("thead", { className: d(ne, "h-control-lg"), children: /* @__PURE__ */ c("tr", { children: [
2027
2027
  v && /* @__PURE__ */ e("th", { className: d(de, "w-10"), children: /* @__PURE__ */ e(
2028
2028
  ye,
2029
2029
  {
@@ -2052,16 +2052,16 @@ const cr = (t) => {
2052
2052
  ),
2053
2053
  style: { width: E.width },
2054
2054
  onClick: () => E.sortable && Y(E.id),
2055
- children: /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
2055
+ children: /* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
2056
2056
  E.headerCell ? E.headerCell() : E.header,
2057
2057
  E.sortable && /* @__PURE__ */ e(
2058
2058
  Q,
2059
2059
  {
2060
- icon: c.column === E.id && c.direction === "desc" ? Se : it,
2060
+ icon: i.column === E.id && i.direction === "desc" ? Se : it,
2061
2061
  size: "xs",
2062
2062
  className: d(
2063
2063
  "transition-opacity duration-fast ease-out",
2064
- c.column === E.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2064
+ i.column === E.id ? "text-text opacity-100" : "text-text-subtle opacity-0 group-hover:opacity-100"
2065
2065
  )
2066
2066
  }
2067
2067
  )
@@ -2085,7 +2085,7 @@ const cr = (t) => {
2085
2085
  const le = f(E, W), ie = k.some(
2086
2086
  (R, ue) => f(R, ue) === le
2087
2087
  );
2088
- return /* @__PURE__ */ i(
2088
+ return /* @__PURE__ */ c(
2089
2089
  "tr",
2090
2090
  {
2091
2091
  className: d(
@@ -2096,7 +2096,7 @@ const cr = (t) => {
2096
2096
  T && "transition-colors duration-fast ease-out hover:bg-surface-hover",
2097
2097
  b && "cursor-pointer",
2098
2098
  ie && "bg-accent-soft",
2099
- I?.(E, W)
2099
+ P?.(E, W)
2100
2100
  ),
2101
2101
  onClick: (R) => {
2102
2102
  R.stopPropagation(), b?.(E, W);
@@ -2158,9 +2158,9 @@ const cr = (t) => {
2158
2158
  }) })
2159
2159
  ] })
2160
2160
  ] }),
2161
- De && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2161
+ De && /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 px-1 pt-3 text-xs text-text-muted", children: [
2162
2162
  /* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: C ?? `Showing ${j}–${B} of ${z}` }),
2163
- fe && /* @__PURE__ */ i("div", { className: "flex items-center gap-0.5", children: [
2163
+ fe && /* @__PURE__ */ c("div", { className: "flex items-center gap-0.5", children: [
2164
2164
  /* @__PURE__ */ e(
2165
2165
  ae,
2166
2166
  {
@@ -2168,23 +2168,23 @@ const cr = (t) => {
2168
2168
  variant: "ghost",
2169
2169
  iconOnly: !0,
2170
2170
  "aria-label": "Previous page",
2171
- onClick: () => P(g.page - 1),
2172
- disabled: g.page === 0,
2171
+ onClick: () => I(p.page - 1),
2172
+ disabled: p.page === 0,
2173
2173
  children: /* @__PURE__ */ e(Q, { icon: Ee, size: "md", color: "current" })
2174
2174
  }
2175
2175
  ),
2176
- or(g.page, F).map(
2176
+ or(p.page, F).map(
2177
2177
  (E, W) => E === "gap" ? /* @__PURE__ */ e("span", { className: "px-1 text-text-subtle", children: "…" }, `gap-${W}`) : /* @__PURE__ */ e(
2178
2178
  "button",
2179
2179
  {
2180
2180
  type: "button",
2181
- "aria-current": E === g.page ? "page" : void 0,
2182
- onClick: () => P(E),
2181
+ "aria-current": E === p.page ? "page" : void 0,
2182
+ onClick: () => I(E),
2183
2183
  className: d(
2184
2184
  "h-control-xs min-w-6 cursor-pointer rounded-sm px-1.5 tabular-nums",
2185
2185
  "transition-colors duration-fast ease-out",
2186
2186
  "focus-visible:outline-none focus-visible:focus-ring",
2187
- E === g.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2187
+ E === p.page ? "bg-surface-sunk font-semibold text-text" : "text-text-muted hover:bg-surface-hover hover:text-text"
2188
2188
  ),
2189
2189
  children: E + 1
2190
2190
  },
@@ -2198,45 +2198,45 @@ const cr = (t) => {
2198
2198
  variant: "ghost",
2199
2199
  iconOnly: !0,
2200
2200
  "aria-label": "Next page",
2201
- onClick: () => P(g.page + 1),
2202
- disabled: g.page >= F - 1,
2201
+ onClick: () => I(p.page + 1),
2202
+ disabled: p.page >= F - 1,
2203
2203
  children: /* @__PURE__ */ e(Q, { icon: ze, size: "md", color: "current" })
2204
2204
  }
2205
2205
  )
2206
2206
  ] })
2207
2207
  ] })
2208
2208
  ] });
2209
- }, ir = Nt(null), yn = ({
2209
+ }, ir = Nt(null), wn = ({
2210
2210
  items: t,
2211
2211
  activeTab: r,
2212
2212
  onTabChange: n,
2213
2213
  className: s
2214
2214
  }) => {
2215
- const [a, l] = O(t[0]?.id || ""), o = r || a, u = (m) => {
2216
- n ? n(m) : l(m);
2215
+ const [a, l] = O(t[0]?.id || ""), o = r || a, m = (u) => {
2216
+ n ? n(u) : l(u);
2217
2217
  };
2218
- return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((m) => /* @__PURE__ */ e(
2218
+ return /* @__PURE__ */ e("div", { className: d("border-b border-border", s), children: /* @__PURE__ */ e("nav", { className: "-mb-px flex space-x-8", children: t.map((u) => /* @__PURE__ */ e(
2219
2219
  "button",
2220
2220
  {
2221
- onClick: () => !m.disabled && u(m.id),
2222
- disabled: m.disabled,
2221
+ onClick: () => !u.disabled && m(u.id),
2222
+ disabled: u.disabled,
2223
2223
  className: d(
2224
2224
  "border-b-2 py-2 px-1 text-sm font-medium transition-colors duration-fast",
2225
2225
  {
2226
- "border-accent-border text-text": o === m.id,
2227
- "border-transparent text-text-muted hover:text-text": o !== m.id && !m.disabled,
2228
- "border-transparent text-disabled cursor-not-allowed": m.disabled
2226
+ "border-accent-border text-text": o === u.id,
2227
+ "border-transparent text-text-muted hover:text-text": o !== u.id && !u.disabled,
2228
+ "border-transparent text-disabled cursor-not-allowed": u.disabled
2229
2229
  }
2230
2230
  ),
2231
- children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
2232
- m.label,
2233
- m.badge && /* @__PURE__ */ e("span", { className: d(
2231
+ children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
2232
+ u.label,
2233
+ u.badge && /* @__PURE__ */ e("span", { className: d(
2234
2234
  "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",
2235
- o === m.id ? "bg-accent-soft text-accent" : "bg-surface-hover text-text-muted"
2236
- ), children: m.badge })
2235
+ o === u.id ? "bg-accent-soft text-accent" : "bg-surface-hover text-text-muted"
2236
+ ), children: u.badge })
2237
2237
  ] })
2238
2238
  },
2239
- m.id
2239
+ u.id
2240
2240
  )) }) });
2241
2241
  }, dr = ({
2242
2242
  items: t,
@@ -2247,14 +2247,14 @@ const cr = (t) => {
2247
2247
  size: l = "md",
2248
2248
  className: o
2249
2249
  }) => {
2250
- const [u, m] = O(
2250
+ const [m, u] = O(
2251
2251
  r || n || t[0]?.id || ""
2252
- ), y = n || u, x = (p) => {
2253
- s ? s(p) : m(p);
2252
+ ), y = n || m, x = (g) => {
2253
+ s ? s(g) : u(g);
2254
2254
  }, h = {
2255
2255
  activeTab: y,
2256
2256
  setActiveTab: x
2257
- }, b = t.find((p) => p.id === y), v = d(
2257
+ }, b = t.find((g) => g.id === y), v = d(
2258
2258
  "flex",
2259
2259
  {
2260
2260
  "border-b border-border px-2": a === "default" || a === "underline",
@@ -2263,7 +2263,7 @@ const cr = (t) => {
2263
2263
  "space-x-8": a === "default" || a === "underline"
2264
2264
  },
2265
2265
  o
2266
- ), k = (p, f) => {
2266
+ ), k = (g, f) => {
2267
2267
  const $ = "transition-colors duration-fast font-medium", C = {
2268
2268
  "text-xs px-2 py-1": l === "sm",
2269
2269
  "text-sm px-3 py-2": l === "md",
@@ -2276,35 +2276,35 @@ const cr = (t) => {
2276
2276
  // Underline variant
2277
2277
  "border-b-2 pb-2": a === "underline"
2278
2278
  }, T = {
2279
- "opacity-50 cursor-not-allowed": p.disabled,
2280
- "cursor-pointer": !p.disabled
2279
+ "opacity-50 cursor-not-allowed": g.disabled,
2280
+ "cursor-pointer": !g.disabled
2281
2281
  }, G = f ? {
2282
2282
  "border-accent-border text-text": a === "default" || a === "underline",
2283
2283
  "bg-surface text-text shadow-none": a === "pills"
2284
- } : {}, V = !f && !p.disabled ? {
2284
+ } : {}, V = !f && !g.disabled ? {
2285
2285
  "border-transparent text-text-muted hover:text-text": a === "default",
2286
2286
  "text-text-muted hover:text-text": a === "pills",
2287
2287
  "border-transparent text-text-muted hover:text-text hover:border-border": a === "underline"
2288
2288
  } : {};
2289
2289
  return d($, C, q, T, G, V);
2290
2290
  };
2291
- return /* @__PURE__ */ e(ir.Provider, { value: h, children: /* @__PURE__ */ i("div", { children: [
2292
- /* @__PURE__ */ e("div", { className: v, role: "tablist", children: t.map((p) => /* @__PURE__ */ e(
2291
+ return /* @__PURE__ */ e(ir.Provider, { value: h, children: /* @__PURE__ */ c("div", { children: [
2292
+ /* @__PURE__ */ e("div", { className: v, role: "tablist", children: t.map((g) => /* @__PURE__ */ e(
2293
2293
  "button",
2294
2294
  {
2295
2295
  type: "button",
2296
2296
  role: "tab",
2297
- "aria-selected": y === p.id,
2298
- "aria-controls": `tabpanel-${p.id}`,
2299
- disabled: p.disabled,
2300
- onClick: () => !p.disabled && x(p.id),
2301
- className: k(p, y === p.id),
2302
- children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
2303
- p.label,
2304
- p.badge && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-surface-hover text-text-muted", children: p.badge })
2297
+ "aria-selected": y === g.id,
2298
+ "aria-controls": `tabpanel-${g.id}`,
2299
+ disabled: g.disabled,
2300
+ onClick: () => !g.disabled && x(g.id),
2301
+ className: k(g, y === g.id),
2302
+ children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
2303
+ g.label,
2304
+ g.badge && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-surface-hover text-text-muted", children: g.badge })
2305
2305
  ] })
2306
2306
  },
2307
- p.id
2307
+ g.id
2308
2308
  )) }),
2309
2309
  b?.content && /* @__PURE__ */ e(
2310
2310
  "div",
@@ -2332,16 +2332,16 @@ function Ye({
2332
2332
  closeOnBackdropClick: a = !0,
2333
2333
  closeOnEscape: l = !0,
2334
2334
  className: o,
2335
- backdropClassName: u,
2336
- children: m,
2335
+ backdropClassName: m,
2336
+ children: u,
2337
2337
  footer: y,
2338
2338
  showCloseButton: x = !0
2339
2339
  }) {
2340
2340
  const h = se(null), b = se(null);
2341
2341
  X(() => {
2342
2342
  if (!t || !l) return;
2343
- const k = (p) => {
2344
- p.key === "Escape" && r();
2343
+ const k = (g) => {
2344
+ g.key === "Escape" && r();
2345
2345
  };
2346
2346
  return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
2347
2347
  }, [t, l, r]), X(() => (t ? (b.current = document.activeElement, h.current && h.current.focus(), document.body.style.overflow = "hidden") : (b.current && b.current.focus(), document.body.style.overflow = ""), () => {
@@ -2357,10 +2357,10 @@ function Ye({
2357
2357
  "fixed inset-0 z-modal flex items-center justify-center p-4",
2358
2358
  "bg-scrim",
2359
2359
  // 'animate-fade-in',
2360
- u
2360
+ m
2361
2361
  ),
2362
2362
  onClick: v,
2363
- children: /* @__PURE__ */ i(
2363
+ children: /* @__PURE__ */ c(
2364
2364
  "div",
2365
2365
  {
2366
2366
  ref: h,
@@ -2376,7 +2376,7 @@ function Ye({
2376
2376
  "aria-labelledby": n ? "modal-title" : void 0,
2377
2377
  tabIndex: -1,
2378
2378
  children: [
2379
- (n || x) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-6 pb-0", children: [
2379
+ (n || x) && /* @__PURE__ */ c("div", { className: "flex items-center justify-between p-6 pb-0", children: [
2380
2380
  n && /* @__PURE__ */ e(
2381
2381
  "span",
2382
2382
  {
@@ -2395,7 +2395,7 @@ function Ye({
2395
2395
  }
2396
2396
  )
2397
2397
  ] }),
2398
- /* @__PURE__ */ e("div", { className: "p-6", children: m }),
2398
+ /* @__PURE__ */ e("div", { className: "p-6", children: u }),
2399
2399
  y && /* @__PURE__ */ e("div", { className: "px-6 py-4", children: y })
2400
2400
  ]
2401
2401
  }
@@ -2443,35 +2443,35 @@ const mr = {
2443
2443
  align: a = "left",
2444
2444
  truncate: l = !1,
2445
2445
  italic: o = !1,
2446
- underline: u = !1,
2447
- lineHeight: m = "normal",
2446
+ underline: m = !1,
2447
+ lineHeight: u = "normal",
2448
2448
  as: y,
2449
2449
  className: x,
2450
2450
  children: h,
2451
2451
  ...b
2452
2452
  }) => {
2453
- const v = y || pr(t), k = t === "caption", p = t === "label", f = t === "code", $ = d(
2453
+ const v = y || gr(t), k = t === "caption", g = t === "label", f = t === "code", $ = d(
2454
2454
  "font-sans",
2455
2455
  // Variant — caption and label pin their own size/weight
2456
2456
  k && "text-xs text-text-subtle",
2457
- p && "text-xs font-semibold uppercase tracking-label text-text-subtle",
2457
+ g && "text-xs font-semibold uppercase tracking-label text-text-subtle",
2458
2458
  f && "font-mono text-sm rounded-sm bg-surface-hover px-1 py-0.5",
2459
2459
  // Size — only where the variant does not pin it
2460
- !k && !p && !f && mr[r],
2460
+ !k && !g && !f && mr[r],
2461
2461
  // Weight — label owns its weight
2462
- !p && fr[n],
2462
+ !g && fr[n],
2463
2463
  hr[s],
2464
2464
  xr[a],
2465
2465
  // Line height only overrides the body variant
2466
- t === "body" && br[m],
2466
+ t === "body" && br[u],
2467
2467
  o && "italic",
2468
- u && "underline",
2468
+ m && "underline",
2469
2469
  l && "truncate",
2470
2470
  x
2471
2471
  );
2472
2472
  return /* @__PURE__ */ e(v, { className: $, ...b, children: h });
2473
2473
  };
2474
- function pr(t) {
2474
+ function gr(t) {
2475
2475
  return {
2476
2476
  body: "p",
2477
2477
  caption: "span",
@@ -2479,7 +2479,7 @@ function pr(t) {
2479
2479
  code: "code"
2480
2480
  }[t] || "p";
2481
2481
  }
2482
- const gr = ({
2482
+ const pr = ({
2483
2483
  value: t,
2484
2484
  onChange: r,
2485
2485
  label: n,
@@ -2487,46 +2487,46 @@ const gr = ({
2487
2487
  error: a,
2488
2488
  disabled: l,
2489
2489
  accept: o,
2490
- onListFiles: u,
2491
- onListMounts: m,
2490
+ onListFiles: m,
2491
+ onListMounts: u,
2492
2492
  onUploadFile: y,
2493
2493
  onDownloadFile: x,
2494
2494
  onRegisterFile: h
2495
2495
  }) => {
2496
- const [b, v] = O(!1), [k, p] = O([]), [f, $] = O(null), [C, q] = O("/"), [T, G] = O([]), [V, I] = O(!1), [H, te] = O(""), [J, K] = O(
2496
+ const [b, v] = O(!1), [k, g] = O([]), [f, $] = O(null), [C, q] = O("/"), [T, G] = O([]), [V, P] = O(!1), [H, te] = O(""), [J, K] = O(
2497
2497
  typeof t == "object" ? t : null
2498
- ), [ce, w] = O(!1), [c, S] = O(""), g = se(null);
2498
+ ), [ce, w] = O(!1), [i, S] = O(""), p = se(null);
2499
2499
  X(() => {
2500
2500
  b && _();
2501
2501
  }, [b]), X(() => {
2502
2502
  b && f && N();
2503
2503
  }, [b, f, C, H]);
2504
2504
  const _ = async () => {
2505
- I(!0);
2505
+ P(!0);
2506
2506
  try {
2507
- const M = await m?.();
2508
- M?.data && p(M.data);
2507
+ const M = await u?.();
2508
+ M?.data && g(M.data);
2509
2509
  } catch (M) {
2510
2510
  console.error("Failed to load mounts", M);
2511
2511
  } finally {
2512
- I(!1);
2512
+ P(!1);
2513
2513
  }
2514
2514
  }, N = async () => {
2515
2515
  if (f) {
2516
- I(!0);
2516
+ P(!0);
2517
2517
  try {
2518
- const M = await u?.({ mountId: f.id, name: H, path: C });
2518
+ const M = await m?.({ mountId: f.id, name: H, path: C });
2519
2519
  M?.data && G(M.data);
2520
2520
  } catch (M) {
2521
2521
  console.error("Failed to load files", M);
2522
2522
  } finally {
2523
- I(!1);
2523
+ P(!1);
2524
2524
  }
2525
2525
  }
2526
2526
  }, U = async (M) => {
2527
2527
  const L = M.target.files?.[0];
2528
2528
  if (L) {
2529
- I(!0);
2529
+ P(!0);
2530
2530
  try {
2531
2531
  const Z = await L.arrayBuffer(), ne = new Uint8Array(Z), de = {
2532
2532
  id: `local-${Date.now()}`,
@@ -2543,13 +2543,13 @@ const gr = ({
2543
2543
  } catch (Z) {
2544
2544
  console.error("Local file selection failed", Z);
2545
2545
  } finally {
2546
- I(!1);
2546
+ P(!1);
2547
2547
  }
2548
2548
  }
2549
2549
  }, re = async (M) => {
2550
2550
  const L = M.target.files?.[0];
2551
2551
  if (!(!L || !f)) {
2552
- I(!0);
2552
+ P(!0);
2553
2553
  try {
2554
2554
  const Z = await L.arrayBuffer(), ne = await y?.({
2555
2555
  file: new Uint8Array(Z),
@@ -2565,16 +2565,16 @@ const gr = ({
2565
2565
  } catch (Z) {
2566
2566
  console.error("Upload failed", Z);
2567
2567
  } finally {
2568
- I(!1);
2568
+ P(!1);
2569
2569
  }
2570
2570
  }
2571
2571
  }, ee = async () => {
2572
- if (!(!c || !f)) {
2573
- I(!0);
2572
+ if (!(!i || !f)) {
2573
+ P(!0);
2574
2574
  try {
2575
- const M = `${C}${c}/`;
2575
+ const M = `${C}${i}/`;
2576
2576
  h && (await h({
2577
- name: c,
2577
+ name: i,
2578
2578
  type: "folder",
2579
2579
  path: C,
2580
2580
  mimeType: "application/x-directory",
@@ -2586,22 +2586,22 @@ const gr = ({
2586
2586
  } catch (M) {
2587
2587
  console.error("Failed to create folder", M);
2588
2588
  } finally {
2589
- I(!1);
2589
+ P(!1);
2590
2590
  }
2591
2591
  }
2592
2592
  }, Y = async (M) => {
2593
- I(!0);
2593
+ P(!0);
2594
2594
  try {
2595
2595
  const L = await x?.(M.id);
2596
2596
  K(M), r(M, L), v(!1);
2597
2597
  } catch (L) {
2598
2598
  console.error("Failed to download file", L);
2599
2599
  } finally {
2600
- I(!1);
2600
+ P(!1);
2601
2601
  }
2602
- }, P = (M) => {
2602
+ }, I = (M) => {
2603
2603
  M.stopPropagation(), K(null), r(null);
2604
- }, D = ge(() => {
2604
+ }, D = pe(() => {
2605
2605
  const M = /* @__PURE__ */ new Set(), L = [];
2606
2606
  return T.forEach((Z) => {
2607
2607
  if (Z.type === "folder") {
@@ -2619,7 +2619,7 @@ const gr = ({
2619
2619
  }, z = () => {
2620
2620
  const M = C.split("/").filter((L) => L !== "");
2621
2621
  M.pop(), M.length === 0 ? q("/") : q(`${M.join("/")}/`);
2622
- }, F = ge(() => {
2622
+ }, F = pe(() => {
2623
2623
  const M = D.folders.map((L) => ({
2624
2624
  id: `folder-${L}`,
2625
2625
  name: L,
@@ -2636,7 +2636,7 @@ const gr = ({
2636
2636
  id: "name",
2637
2637
  header: "Name",
2638
2638
  accessor: "name",
2639
- cell: (M, L) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
2639
+ cell: (M, L) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
2640
2640
  /* @__PURE__ */ e(
2641
2641
  Q,
2642
2642
  {
@@ -2680,8 +2680,8 @@ const gr = ({
2680
2680
  id: "name",
2681
2681
  header: "Mount Name",
2682
2682
  accessor: "name",
2683
- cell: (M) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 font-medium", children: [
2684
- /* @__PURE__ */ e(Q, { icon: Pe, size: "sm", color: "primary" }),
2683
+ cell: (M) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2 font-medium", children: [
2684
+ /* @__PURE__ */ e(Q, { icon: Ie, size: "sm", color: "primary" }),
2685
2685
  /* @__PURE__ */ e("span", { children: M })
2686
2686
  ] })
2687
2687
  },
@@ -2693,9 +2693,9 @@ const gr = ({
2693
2693
  cell: (M, L) => /* @__PURE__ */ e(ae, { variant: "outline", onClick: () => $(L), children: "Open" })
2694
2694
  }
2695
2695
  ];
2696
- return /* @__PURE__ */ i("div", { className: "space-y-1", children: [
2696
+ return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
2697
2697
  n && /* @__PURE__ */ e(me, { variant: "label", size: "sm", weight: "medium", children: n }),
2698
- /* @__PURE__ */ i(
2698
+ /* @__PURE__ */ c(
2699
2699
  "div",
2700
2700
  {
2701
2701
  onClick: () => !l && v(!0),
@@ -2706,12 +2706,12 @@ const gr = ({
2706
2706
  l && "opacity-50 cursor-not-allowed bg-surface-sunk"
2707
2707
  ),
2708
2708
  children: [
2709
- /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Q, { icon: J ? Te : Pe, color: J ? "primary" : "secondary" }) }),
2709
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: /* @__PURE__ */ e(Q, { icon: J ? Te : Ie, color: J ? "primary" : "secondary" }) }),
2710
2710
  /* @__PURE__ */ e("div", { className: "flex-grow truncate", children: J ? /* @__PURE__ */ e("span", { className: "text-sm text-text font-medium", children: J.name }) : /* @__PURE__ */ e("span", { className: "text-sm text-text-muted", children: s }) }),
2711
2711
  J && !l && /* @__PURE__ */ e(
2712
2712
  "button",
2713
2713
  {
2714
- onClick: P,
2714
+ onClick: I,
2715
2715
  className: "p-1 hover:bg-surface-hover rounded",
2716
2716
  children: /* @__PURE__ */ e(Q, { icon: we, size: "xs" })
2717
2717
  }
@@ -2737,8 +2737,8 @@ const gr = ({
2737
2737
  {
2738
2738
  id: "remote",
2739
2739
  label: "Platform Storage",
2740
- content: /* @__PURE__ */ e("div", { className: "space-y-4", children: f ? /* @__PURE__ */ i(ve, { children: [
2741
- /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
2740
+ content: /* @__PURE__ */ e("div", { className: "space-y-4", children: f ? /* @__PURE__ */ c(ve, { children: [
2741
+ /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-2", children: [
2742
2742
  /* @__PURE__ */ e(
2743
2743
  ae,
2744
2744
  {
@@ -2761,7 +2761,7 @@ const gr = ({
2761
2761
  fullWidth: !0
2762
2762
  }
2763
2763
  ) }),
2764
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
2764
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: [
2765
2765
  /* @__PURE__ */ e(
2766
2766
  ae,
2767
2767
  {
@@ -2775,7 +2775,7 @@ const gr = ({
2775
2775
  ae,
2776
2776
  {
2777
2777
  variant: "primary",
2778
- onClick: () => g.current?.click(),
2778
+ onClick: () => p.current?.click(),
2779
2779
  leftIcon: /* @__PURE__ */ e(Q, { icon: ft, size: "xs" }),
2780
2780
  loading: V,
2781
2781
  children: "Upload"
@@ -2786,20 +2786,20 @@ const gr = ({
2786
2786
  {
2787
2787
  type: "file",
2788
2788
  className: "hidden",
2789
- ref: g,
2789
+ ref: p,
2790
2790
  onChange: re,
2791
2791
  accept: o
2792
2792
  }
2793
2793
  )
2794
2794
  ] })
2795
2795
  ] }),
2796
- ce && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
2796
+ ce && /* @__PURE__ */ c("div", { className: "flex items-center gap-2 p-3 bg-surface-sunk rounded-lg border border-border", children: [
2797
2797
  /* @__PURE__ */ e(Q, { icon: je, size: "sm", color: "warning" }),
2798
2798
  /* @__PURE__ */ e(
2799
2799
  Ne,
2800
2800
  {
2801
2801
  placeholder: "Folder name",
2802
- value: c,
2802
+ value: i,
2803
2803
  onChange: (M) => S(M.target.value),
2804
2804
  autoFocus: !0
2805
2805
  }
@@ -2831,15 +2831,15 @@ const gr = ({
2831
2831
  {
2832
2832
  id: "local",
2833
2833
  label: "Local File",
2834
- content: /* @__PURE__ */ e("div", { className: "space-y-6", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center py-12 border-2 border-dashed border-border rounded-xl bg-surface-sunk/50", children: [
2834
+ 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: [
2835
2835
  /* @__PURE__ */ e("div", { className: "p-4 bg-accent-soft rounded-full mb-4", children: /* @__PURE__ */ e(Q, { icon: Te, size: "xl", color: "primary" }) }),
2836
2836
  /* @__PURE__ */ e(me, { variant: "label", size: "lg", weight: "semibold", children: "Select a file from your computer" }),
2837
- /* @__PURE__ */ i(me, { variant: "body", size: "sm", className: "text-text-muted mt-1 mb-6 text-center max-w-xs", children: [
2837
+ /* @__PURE__ */ c(me, { variant: "body", size: "sm", className: "text-text-muted mt-1 mb-6 text-center max-w-xs", children: [
2838
2838
  "This file will be used directly in the form and will ",
2839
2839
  /* @__PURE__ */ e("strong", { children: "not" }),
2840
2840
  " be uploaded to platform storage."
2841
2841
  ] }),
2842
- /* @__PURE__ */ i("label", { className: "cursor-pointer", children: [
2842
+ /* @__PURE__ */ c("label", { className: "cursor-pointer", children: [
2843
2843
  /* @__PURE__ */ e(ae, { variant: "primary", size: "lg", loading: V, className: "pointer-events-none", children: "Browse Local File" }),
2844
2844
  /* @__PURE__ */ e(
2845
2845
  "input",
@@ -2874,41 +2874,41 @@ const gr = ({
2874
2874
  fullWidth: a = !1,
2875
2875
  loading: l = !1,
2876
2876
  containerClassName: o,
2877
- labelClassName: u,
2878
- className: m,
2877
+ labelClassName: m,
2878
+ className: u,
2879
2879
  id: y,
2880
2880
  rows: x = 4,
2881
2881
  ...h
2882
2882
  }, b) => {
2883
- const v = oe.useId(), k = y || `textarea-${v}`, p = !!n, f = n || r ? `${k}-description` : void 0;
2884
- return /* @__PURE__ */ i("div", { className: d("flex flex-col", a && "w-full", o), children: [
2883
+ const v = oe.useId(), k = y || `textarea-${v}`, g = !!n, f = n || r ? `${k}-description` : void 0;
2884
+ return /* @__PURE__ */ c("div", { className: d("flex flex-col", a && "w-full", o), children: [
2885
2885
  t && /* @__PURE__ */ e(
2886
2886
  "label",
2887
2887
  {
2888
2888
  htmlFor: k,
2889
2889
  className: d(
2890
2890
  Ue,
2891
- p ? "text-danger-fg" : "text-text-muted",
2892
- u
2891
+ g ? "text-danger-fg" : "text-text-muted",
2892
+ m
2893
2893
  ),
2894
2894
  children: t
2895
2895
  }
2896
2896
  ),
2897
- /* @__PURE__ */ i("div", { className: "relative", children: [
2897
+ /* @__PURE__ */ c("div", { className: "relative", children: [
2898
2898
  /* @__PURE__ */ e(
2899
2899
  "textarea",
2900
2900
  {
2901
2901
  ref: b,
2902
2902
  id: k,
2903
2903
  rows: x,
2904
- "aria-invalid": p || void 0,
2904
+ "aria-invalid": g || void 0,
2905
2905
  "aria-describedby": f,
2906
2906
  className: d(
2907
2907
  We,
2908
2908
  "resize-y leading-relaxed",
2909
2909
  vr[s],
2910
- Ke(p),
2911
- m
2910
+ Ke(g),
2911
+ u
2912
2912
  ),
2913
2913
  ...h
2914
2914
  }
@@ -2925,7 +2925,7 @@ const gr = ({
2925
2925
  "p",
2926
2926
  {
2927
2927
  id: f,
2928
- className: d("mt-1 text-xs", p ? "text-danger-fg" : "text-text-subtle"),
2928
+ className: d("mt-1 text-xs", g ? "text-danger-fg" : "text-text-subtle"),
2929
2929
  children: n || r
2930
2930
  }
2931
2931
  )
@@ -2943,8 +2943,8 @@ function yr(t, r, n) {
2943
2943
  const s = r.split("."), a = Array.isArray(t) ? [...t] : { ...t };
2944
2944
  let l = a;
2945
2945
  for (let o = 0; o < s.length - 1; o++) {
2946
- const u = s[o], m = l[u];
2947
- l[u] = m && typeof m == "object" ? Array.isArray(m) ? [...m] : { ...m } : {}, l = l[u];
2946
+ const m = s[o], u = l[m];
2947
+ l[m] = u && typeof u == "object" ? Array.isArray(u) ? [...u] : { ...u } : {}, l = l[m];
2948
2948
  }
2949
2949
  return l[s[s.length - 1]] = n, a;
2950
2950
  }
@@ -2964,15 +2964,15 @@ function wr({
2964
2964
  className: n,
2965
2965
  children: s
2966
2966
  }) {
2967
- return /* @__PURE__ */ i("div", { className: d("flex flex-col gap-4 py-6 sm:flex-row sm:gap-8", n), children: [
2968
- /* @__PURE__ */ i("div", { className: "w-full shrink-0 sm:w-form-label", children: [
2967
+ return /* @__PURE__ */ c("div", { className: d("flex flex-col gap-4 py-6 sm:flex-row sm:gap-8", n), children: [
2968
+ /* @__PURE__ */ c("div", { className: "w-full shrink-0 sm:w-form-label", children: [
2969
2969
  t && /* @__PURE__ */ e("span", { className: "text-base font-semibold text-text", children: t }),
2970
2970
  r && /* @__PURE__ */ e("p", { className: "mt-1 text-sm leading-relaxed text-pretty text-text-subtle", children: r })
2971
2971
  ] }),
2972
2972
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: s })
2973
2973
  ] });
2974
2974
  }
2975
- const Nn = ({
2975
+ const kn = ({
2976
2976
  groups: t,
2977
2977
  data: r,
2978
2978
  onSubmit: n,
@@ -2980,42 +2980,42 @@ const Nn = ({
2980
2980
  onChange: a,
2981
2981
  transform: l,
2982
2982
  validate: o,
2983
- submitButton: u = { label: "Submit", variant: "primary" },
2984
- cancelButton: m = { label: "Cancel", variant: "outline" },
2983
+ submitButton: m = { label: "Submit", variant: "primary" },
2984
+ cancelButton: u = { label: "Cancel", variant: "outline" },
2985
2985
  showButtons: y = !0,
2986
2986
  layout: x = "vertical",
2987
2987
  size: h = "md",
2988
2988
  loading: b = !1,
2989
2989
  className: v,
2990
2990
  ref: k,
2991
- sdk: p
2991
+ sdk: g
2992
2992
  }) => {
2993
2993
  const [f, $] = O(r || {}), [C, q] = O({}), [T, G] = O({});
2994
2994
  X(() => {
2995
2995
  r && $({ ...r });
2996
2996
  }, [r]);
2997
2997
  const V = he(
2998
- (w, c, S) => {
2999
- const g = t.flatMap((_) => _.items).find((_) => _.name === w);
3000
- if (!g) return null;
3001
- if (g.required && (c == null || c === ""))
3002
- return `${g.label} is required`;
3003
- if (g.type === "array") {
3004
- if (g.required && (!c || c.length === 0))
3005
- return `${g.label} cannot be empty.`;
3006
- if (c && !Array.isArray(c))
3007
- return `${g.label} must be an array.`;
3008
- if (Array.isArray(c) && g.arrayFields) {
2998
+ (w, i, S) => {
2999
+ const p = t.flatMap((_) => _.items).find((_) => _.name === w);
3000
+ if (!p) return null;
3001
+ if (p.required && (i == null || i === ""))
3002
+ return `${p.label} is required`;
3003
+ if (p.type === "array") {
3004
+ if (p.required && (!i || i.length === 0))
3005
+ return `${p.label} cannot be empty.`;
3006
+ if (i && !Array.isArray(i))
3007
+ return `${p.label} must be an array.`;
3008
+ if (Array.isArray(i) && p.arrayFields) {
3009
3009
  const _ = [];
3010
3010
  let N = !1;
3011
- if (c.forEach((U, re) => {
3011
+ if (i.forEach((U, re) => {
3012
3012
  const ee = {};
3013
- for (const Y of g.arrayFields) {
3014
- const P = U?.[Y.name];
3015
- if (Y.required && (P == null || P === ""))
3013
+ for (const Y of p.arrayFields) {
3014
+ const I = U?.[Y.name];
3015
+ if (Y.required && (I == null || I === ""))
3016
3016
  ee[Y.name] = `${Y.label} is required`, N = !0;
3017
3017
  else if (Y.validator) {
3018
- const D = Y.validator(P, U);
3018
+ const D = Y.validator(I, U);
3019
3019
  D && (ee[Y.name] = D, N = !0);
3020
3020
  }
3021
3021
  }
@@ -3024,18 +3024,18 @@ const Nn = ({
3024
3024
  return JSON.stringify(_);
3025
3025
  }
3026
3026
  }
3027
- return g.validator ? g.validator(c, S) : null;
3027
+ return p.validator ? p.validator(i, S) : null;
3028
3028
  },
3029
3029
  [t]
3030
- ), I = he(
3031
- (w, c) => {
3030
+ ), P = he(
3031
+ (w, i) => {
3032
3032
  let S = yr(
3033
3033
  f,
3034
3034
  w,
3035
- c
3035
+ i
3036
3036
  );
3037
- t.flatMap((N) => N.items).find((N) => N.name === w)?.removeIfEmpty && (c == null || c === "") && (S = Nr(S, w)), $(S), G((N) => ({ ...N, [w]: !0 }));
3038
- const _ = V(w, c, S);
3037
+ t.flatMap((N) => N.items).find((N) => N.name === w)?.removeIfEmpty && (i == null || i === "") && (S = Nr(S, w)), $(S), G((N) => ({ ...N, [w]: !0 }));
3038
+ const _ = V(w, i, S);
3039
3039
  q((N) => ({
3040
3040
  ...N,
3041
3041
  [w]: _ || ""
@@ -3045,7 +3045,7 @@ const Nn = ({
3045
3045
  ), H = he(
3046
3046
  async (w) => {
3047
3047
  if (w.preventDefault(), b) return;
3048
- const c = {}, S = t.flatMap((_) => _.items);
3048
+ const i = {}, S = t.flatMap((_) => _.items);
3049
3049
  for (const _ of S) {
3050
3050
  if (_.hidden || _.conditional && !_.conditional(f))
3051
3051
  continue;
@@ -3054,23 +3054,23 @@ const Nn = ({
3054
3054
  Be(f, _.name),
3055
3055
  f
3056
3056
  );
3057
- N && (c[_.name] = N);
3057
+ N && (i[_.name] = N);
3058
3058
  }
3059
3059
  if (o) {
3060
3060
  const _ = o(f);
3061
- _ && Object.assign(c, _);
3061
+ _ && Object.assign(i, _);
3062
3062
  }
3063
- if (q(c), Object.keys(c).some((_) => c[_]))
3063
+ if (q(i), Object.keys(i).some((_) => i[_]))
3064
3064
  return;
3065
- const g = l ? l(f) : f;
3066
- await n?.(f, g);
3065
+ const p = l ? l(f) : f;
3066
+ await n?.(f, p);
3067
3067
  },
3068
3068
  [f, t, V, o, l, n, b]
3069
3069
  ), te = he(
3070
3070
  (w) => {
3071
- const c = Be(f, w.name), S = T[w.name] ? C[w.name] : void 0, g = w.disabled || b, _ = {
3072
- value: c || "",
3073
- disabled: g,
3071
+ const i = Be(f, w.name), S = T[w.name] ? C[w.name] : void 0, p = w.disabled || b, _ = {
3072
+ value: i || "",
3073
+ disabled: p,
3074
3074
  required: w.required,
3075
3075
  placeholder: w.placeholder,
3076
3076
  ...w.fieldProps
@@ -3086,7 +3086,7 @@ const Nn = ({
3086
3086
  Ne,
3087
3087
  {
3088
3088
  ..._,
3089
- onChange: (N) => I(w.name, N.target.value),
3089
+ onChange: (N) => P(w.name, N.target.value),
3090
3090
  type: w.textType || w.type,
3091
3091
  autoComplete: w.autocomplete,
3092
3092
  error: S,
@@ -3098,7 +3098,7 @@ const Nn = ({
3098
3098
  Le,
3099
3099
  {
3100
3100
  ..._,
3101
- onChange: (N) => I(w.name, N.target.value),
3101
+ onChange: (N) => P(w.name, N.target.value),
3102
3102
  rows: 4,
3103
3103
  error: S,
3104
3104
  size: h
@@ -3109,7 +3109,7 @@ const Nn = ({
3109
3109
  Ce,
3110
3110
  {
3111
3111
  ..._,
3112
- onChange: (N) => I(w.name, N),
3112
+ onChange: (N) => P(w.name, N),
3113
3113
  options: (w.options || []).map((N) => ({
3114
3114
  ...N,
3115
3115
  value: String(N.value)
@@ -3129,8 +3129,8 @@ const Nn = ({
3129
3129
  Ft,
3130
3130
  {
3131
3131
  "aria-label": w.label,
3132
- value: c == null ? "" : String(c),
3133
- onChange: (N) => I(w.name, N),
3132
+ value: i == null ? "" : String(i),
3133
+ onChange: (N) => P(w.name, N),
3134
3134
  options: (w.options || []).map((N) => ({
3135
3135
  value: String(N.value),
3136
3136
  label: N.label
@@ -3145,13 +3145,13 @@ const Nn = ({
3145
3145
  {
3146
3146
  ..._,
3147
3147
  label: w.label,
3148
- checked: !!c,
3149
- onChange: (N) => I(w.name, N.target.checked),
3148
+ checked: !!i,
3149
+ onChange: (N) => P(w.name, N.target.checked),
3150
3150
  size: h
3151
3151
  }
3152
3152
  );
3153
3153
  case "radio":
3154
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: w.options?.map((N) => /* @__PURE__ */ i(
3154
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: w.options?.map((N) => /* @__PURE__ */ c(
3155
3155
  "label",
3156
3156
  {
3157
3157
  className: "flex cursor-pointer items-center gap-3 text-base text-text",
@@ -3162,9 +3162,9 @@ const Nn = ({
3162
3162
  type: "radio",
3163
3163
  name: w.name,
3164
3164
  value: N.value,
3165
- checked: c === N.value,
3166
- onChange: () => I(w.name, N.value),
3167
- disabled: g || N.disabled,
3165
+ checked: i === N.value,
3166
+ onChange: () => P(w.name, N.value),
3167
+ disabled: p || N.disabled,
3168
3168
  className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
3169
3169
  }
3170
3170
  ),
@@ -3178,38 +3178,38 @@ const Nn = ({
3178
3178
  Ae,
3179
3179
  {
3180
3180
  ..._,
3181
- value: c ? new Date(c) : null,
3182
- onChange: (N) => I(w.name, N),
3181
+ value: i ? new Date(i) : null,
3182
+ onChange: (N) => P(w.name, N),
3183
3183
  size: h
3184
3184
  }
3185
3185
  );
3186
3186
  case "file":
3187
3187
  return /* @__PURE__ */ e(
3188
- gr,
3188
+ pr,
3189
3189
  {
3190
3190
  ..._,
3191
- value: c,
3192
- onChange: (N) => I(w.name, N),
3191
+ value: i,
3192
+ onChange: (N) => P(w.name, N),
3193
3193
  error: S,
3194
- onListFiles: (N) => p?.http.invoke({
3194
+ onListFiles: (N) => g?.http.invoke({
3195
3195
  method: "POST",
3196
3196
  action: "storage.file.list",
3197
3197
  body: N
3198
3198
  }),
3199
- onListMounts: () => p?.http.invoke({
3199
+ onListMounts: () => g?.http.invoke({
3200
3200
  method: "GET",
3201
3201
  action: "storage.mount"
3202
3202
  }),
3203
- onUploadFile: (N) => p?.http.invoke({
3203
+ onUploadFile: (N) => g?.http.invoke({
3204
3204
  method: "POST",
3205
3205
  action: "storage.file.upload",
3206
3206
  body: N
3207
3207
  }),
3208
- onDownloadFile: (N) => p?.http.invoke({
3208
+ onDownloadFile: (N) => g?.http.invoke({
3209
3209
  method: "GET",
3210
3210
  action: `storage.file.${N}.download`
3211
3211
  }),
3212
- onRegisterFile: (N) => p?.http.invoke({
3212
+ onRegisterFile: (N) => g?.http.invoke({
3213
3213
  method: "POST",
3214
3214
  action: "storage.file.folder",
3215
3215
  body: N
@@ -3220,26 +3220,26 @@ const Nn = ({
3220
3220
  return /* @__PURE__ */ e(
3221
3221
  Yt,
3222
3222
  {
3223
- value: c || {},
3224
- onChange: (N) => I(w.name, N),
3225
- onListFolders: () => p?.http.invoke({
3223
+ value: i || {},
3224
+ onChange: (N) => P(w.name, N),
3225
+ onListFolders: () => g?.http.invoke({
3226
3226
  method: "GET",
3227
3227
  action: "storage.mount"
3228
3228
  }),
3229
- disabled: g,
3229
+ disabled: p,
3230
3230
  size: h,
3231
3231
  placeholder: w.placeholder
3232
3232
  }
3233
3233
  );
3234
3234
  case "custom":
3235
3235
  return w.customComponent?.({
3236
- value: c,
3237
- onChange: (N) => I(w.name, N),
3236
+ value: i,
3237
+ onChange: (N) => P(w.name, N),
3238
3238
  error: S,
3239
- disabled: g
3239
+ disabled: p
3240
3240
  });
3241
3241
  case "array": {
3242
- const N = c || [];
3242
+ const N = i || [];
3243
3243
  let U = [];
3244
3244
  if (typeof S == "string" && S.startsWith("["))
3245
3245
  try {
@@ -3247,36 +3247,36 @@ const Nn = ({
3247
3247
  } catch {
3248
3248
  }
3249
3249
  const re = () => {
3250
- I(w.name, [...N, {}]);
3251
- }, ee = (P) => {
3252
- I(
3250
+ P(w.name, [...N, {}]);
3251
+ }, ee = (I) => {
3252
+ P(
3253
3253
  w.name,
3254
- N.filter((D, A) => A !== P)
3254
+ N.filter((D, A) => A !== I)
3255
3255
  );
3256
- }, Y = (P, D, A) => {
3256
+ }, Y = (I, D, A) => {
3257
3257
  const z = [...N];
3258
- z[P] = {
3259
- ...z[P],
3258
+ z[I] = {
3259
+ ...z[I],
3260
3260
  [D]: A
3261
- }, I(w.name, z);
3261
+ }, P(w.name, z);
3262
3262
  };
3263
- return /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
3264
- N.map((P, D) => /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
3263
+ return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
3264
+ N.map((I, D) => /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
3265
3265
  /* @__PURE__ */ e("div", { className: "grid flex-1 gap-2 sm:grid-cols-2", children: w.arrayFields?.map((A) => {
3266
3266
  const z = U?.[D]?.[A.name];
3267
- return /* @__PURE__ */ i(
3267
+ return /* @__PURE__ */ c(
3268
3268
  "div",
3269
3269
  {
3270
3270
  className: "flex flex-col gap-1",
3271
3271
  children: [
3272
- D === 0 && /* @__PURE__ */ i("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3272
+ D === 0 && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
3273
3273
  A.label,
3274
3274
  A.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3275
3275
  ] }),
3276
3276
  (() => {
3277
3277
  const F = {
3278
- value: P?.[A.name] || "",
3279
- disabled: g,
3278
+ value: I?.[A.name] || "",
3279
+ disabled: p,
3280
3280
  required: A.required,
3281
3281
  placeholder: A.placeholder,
3282
3282
  ...A.fieldProps
@@ -3346,7 +3346,7 @@ const Nn = ({
3346
3346
  ye,
3347
3347
  {
3348
3348
  ...F,
3349
- checked: !!P?.[A.name],
3349
+ checked: !!I?.[A.name],
3350
3350
  onChange: (j) => Y(
3351
3351
  D,
3352
3352
  A.name,
@@ -3356,7 +3356,7 @@ const Nn = ({
3356
3356
  }
3357
3357
  );
3358
3358
  case "radio":
3359
- return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: A.options?.map((j) => /* @__PURE__ */ i(
3359
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: A.options?.map((j) => /* @__PURE__ */ c(
3360
3360
  "label",
3361
3361
  {
3362
3362
  className: "flex cursor-pointer items-center gap-2 text-base text-text",
@@ -3367,13 +3367,13 @@ const Nn = ({
3367
3367
  type: "radio",
3368
3368
  name: `${w.name}.${D}.${A.name}`,
3369
3369
  value: j.value,
3370
- checked: P?.[A.name] === j.value,
3370
+ checked: I?.[A.name] === j.value,
3371
3371
  onChange: () => Y(
3372
3372
  D,
3373
3373
  A.name,
3374
3374
  j.value
3375
3375
  ),
3376
- disabled: g || j.disabled,
3376
+ disabled: p || j.disabled,
3377
3377
  className: "size-checkbox shrink-0 rounded-xs border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
3378
3378
  }
3379
3379
  ),
@@ -3383,7 +3383,7 @@ const Nn = ({
3383
3383
  j.value
3384
3384
  )) });
3385
3385
  case "date": {
3386
- const j = P?.[A.name];
3386
+ const j = I?.[A.name];
3387
3387
  return /* @__PURE__ */ e(
3388
3388
  Ae,
3389
3389
  {
@@ -3400,18 +3400,18 @@ const Nn = ({
3400
3400
  }
3401
3401
  case "custom":
3402
3402
  return A.customComponent?.({
3403
- value: P?.[A.name],
3403
+ value: I?.[A.name],
3404
3404
  onChange: (j) => Y(
3405
3405
  D,
3406
3406
  A.name,
3407
3407
  j
3408
3408
  ),
3409
3409
  error: z,
3410
- disabled: g
3410
+ disabled: p
3411
3411
  });
3412
3412
  // Add other field types here as needed
3413
3413
  default:
3414
- return /* @__PURE__ */ i("p", { children: [
3414
+ return /* @__PURE__ */ c("p", { children: [
3415
3415
  "Unsupported field type in array:",
3416
3416
  " ",
3417
3417
  A.type
@@ -3433,20 +3433,20 @@ const Nn = ({
3433
3433
  size: "md",
3434
3434
  "aria-label": `${w.label} verwijderen`,
3435
3435
  onClick: () => ee(D),
3436
- disabled: g,
3436
+ disabled: p,
3437
3437
  className: d("shrink-0", D === 0 && "mt-5"),
3438
3438
  children: /* @__PURE__ */ e(ht, { className: "size-icon-md" })
3439
3439
  }
3440
3440
  )
3441
3441
  ] }, D)),
3442
- /* @__PURE__ */ i(
3442
+ /* @__PURE__ */ c(
3443
3443
  ae,
3444
3444
  {
3445
3445
  type: "button",
3446
3446
  variant: "secondary",
3447
3447
  leftIcon: /* @__PURE__ */ e(xt, { className: "size-icon-sm" }),
3448
3448
  onClick: re,
3449
- disabled: g,
3449
+ disabled: p,
3450
3450
  children: [
3451
3451
  w.label,
3452
3452
  " toevoegen"
@@ -3459,13 +3459,13 @@ const Nn = ({
3459
3459
  return null;
3460
3460
  }
3461
3461
  },
3462
- [f, T, C, b, h, I]
3462
+ [f, T, C, b, h, P]
3463
3463
  ), J = he(
3464
3464
  (w) => {
3465
3465
  if (w.conditional && !w.conditional(f))
3466
3466
  return null;
3467
- const c = w.items.filter((g) => !(g.hidden || g.conditional && !g.conditional(f)));
3468
- if (c.length === 0) return null;
3467
+ const i = w.items.filter((p) => !(p.hidden || p.conditional && !p.conditional(f)));
3468
+ if (i.length === 0) return null;
3469
3469
  const S = d(
3470
3470
  w.layout === "flex" ? "flex flex-wrap gap-3.5" : "grid gap-3.5",
3471
3471
  w.layout !== "flex" && {
@@ -3486,29 +3486,29 @@ const Nn = ({
3486
3486
  title: w.title,
3487
3487
  description: w.description,
3488
3488
  className: "not-last:border-b not-last:border-border-subtle",
3489
- children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: S, children: c.map((g) => {
3490
- const _ = T[g.name] ? C[g.name] : void 0;
3491
- return /* @__PURE__ */ i(
3489
+ children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: S, children: i.map((p) => {
3490
+ const _ = T[p.name] ? C[p.name] : void 0;
3491
+ return /* @__PURE__ */ c(
3492
3492
  "div",
3493
3493
  {
3494
3494
  className: d(
3495
3495
  "flex min-w-0 flex-col gap-1.5",
3496
- g.type === "checkbox" && "justify-center"
3496
+ p.type === "checkbox" && "justify-center"
3497
3497
  ),
3498
3498
  style: {
3499
- width: typeof g.width == "string" ? g.width : void 0,
3500
- gridColumn: typeof g.width == "number" ? `span ${g.width} / span ${g.width}` : void 0
3499
+ width: typeof p.width == "string" ? p.width : void 0,
3500
+ gridColumn: typeof p.width == "number" ? `span ${p.width} / span ${p.width}` : void 0
3501
3501
  },
3502
3502
  children: [
3503
- g.type !== "custom" && g.type !== "checkbox" && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-text-muted", children: [
3504
- g.label,
3505
- g.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3503
+ p.type !== "custom" && p.type !== "checkbox" && /* @__PURE__ */ c("label", { className: "block text-sm font-medium text-text-muted", children: [
3504
+ p.label,
3505
+ p.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
3506
3506
  ] }),
3507
- te(g),
3508
- g.help && !_ && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: g.help })
3507
+ te(p),
3508
+ p.help && !_ && /* @__PURE__ */ e("p", { className: "text-xs leading-4 text-text-subtle", children: p.help })
3509
3509
  ]
3510
3510
  },
3511
- g.name
3511
+ p.name
3512
3512
  );
3513
3513
  }) }) })
3514
3514
  },
@@ -3526,39 +3526,39 @@ const Nn = ({
3526
3526
  },
3527
3527
  v
3528
3528
  ), ce = h === "full" ? "md" : h;
3529
- return /* @__PURE__ */ i("form", { ref: k, onSubmit: H, className: K, children: [
3529
+ return /* @__PURE__ */ c("form", { ref: k, onSubmit: H, className: K, children: [
3530
3530
  !y && /* @__PURE__ */ e("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": !0 }),
3531
3531
  /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map(J) }),
3532
- y && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ i(ve, { children: [
3532
+ y && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 border-t border-border-subtle py-4", children: /* @__PURE__ */ c(ve, { children: [
3533
3533
  /* @__PURE__ */ e("div", { className: "ml-auto" }),
3534
3534
  s && /* @__PURE__ */ e(
3535
3535
  ae,
3536
3536
  {
3537
3537
  type: "button",
3538
- variant: m.variant ?? "ghost",
3539
- size: m.size || ce,
3540
- disabled: m.disabled || b,
3538
+ variant: u.variant ?? "ghost",
3539
+ size: u.size || ce,
3540
+ disabled: u.disabled || b,
3541
3541
  onClick: s,
3542
- className: m.className,
3543
- children: m.label
3542
+ className: u.className,
3543
+ children: u.label
3544
3544
  }
3545
3545
  ),
3546
3546
  /* @__PURE__ */ e(
3547
3547
  ae,
3548
3548
  {
3549
3549
  type: "submit",
3550
- variant: u.variant,
3551
- size: u.size || ce,
3552
- disabled: u.disabled || b,
3550
+ variant: m.variant,
3551
+ size: m.size || ce,
3552
+ disabled: m.disabled || b,
3553
3553
  loading: b,
3554
- className: u.className,
3555
- children: u.label
3554
+ className: m.className,
3555
+ children: m.label
3556
3556
  }
3557
3557
  )
3558
3558
  ] }) })
3559
3559
  ] });
3560
3560
  };
3561
- function wn({
3561
+ function Cn({
3562
3562
  open: t,
3563
3563
  title: r,
3564
3564
  description: n,
@@ -3566,23 +3566,23 @@ function wn({
3566
3566
  cancelLabel: a = "Annuleren",
3567
3567
  tone: l = "default",
3568
3568
  loading: o = !1,
3569
- onConfirm: u,
3570
- onCancel: m
3569
+ onConfirm: m,
3570
+ onCancel: u
3571
3571
  }) {
3572
3572
  return /* @__PURE__ */ e(
3573
3573
  Ye,
3574
3574
  {
3575
3575
  open: t,
3576
- onClose: m,
3576
+ onClose: u,
3577
3577
  title: r,
3578
3578
  size: "sm",
3579
- footer: /* @__PURE__ */ i("div", { className: "flex w-full items-center justify-end gap-2", children: [
3580
- /* @__PURE__ */ e(ae, { variant: "ghost", onClick: m, disabled: o, children: a }),
3579
+ footer: /* @__PURE__ */ c("div", { className: "flex w-full items-center justify-end gap-2", children: [
3580
+ /* @__PURE__ */ e(ae, { variant: "ghost", onClick: u, disabled: o, children: a }),
3581
3581
  /* @__PURE__ */ e(
3582
3582
  ae,
3583
3583
  {
3584
3584
  variant: l === "danger" ? "destructive" : "primary",
3585
- onClick: u,
3585
+ onClick: m,
3586
3586
  loading: o,
3587
3587
  children: s
3588
3588
  }
@@ -3616,7 +3616,7 @@ const kr = {
3616
3616
  info: "bg-info",
3617
3617
  note: "bg-note"
3618
3618
  };
3619
- function kn({
3619
+ function Sn({
3620
3620
  variant: t = "default",
3621
3621
  size: r = "md",
3622
3622
  dot: n = !1,
@@ -3624,10 +3624,10 @@ function kn({
3624
3624
  dismissible: a = !1,
3625
3625
  onDismiss: l,
3626
3626
  className: o,
3627
- children: u,
3628
- ...m
3627
+ children: m,
3628
+ ...u
3629
3629
  }) {
3630
- return /* @__PURE__ */ i(
3630
+ return /* @__PURE__ */ c(
3631
3631
  "span",
3632
3632
  {
3633
3633
  className: d(
@@ -3639,7 +3639,7 @@ function kn({
3639
3639
  Cr[r],
3640
3640
  o
3641
3641
  ),
3642
- ...m,
3642
+ ...u,
3643
3643
  children: [
3644
3644
  n && /* @__PURE__ */ e(
3645
3645
  "span",
@@ -3650,8 +3650,8 @@ function kn({
3650
3650
  )
3651
3651
  }
3652
3652
  ),
3653
- s && /* @__PURE__ */ e("span", { className: d("flex-shrink-0", u && "mr-1"), children: s }),
3654
- u,
3653
+ s && /* @__PURE__ */ e("span", { className: d("flex-shrink-0", m && "mr-1"), children: s }),
3654
+ m,
3655
3655
  a && l && /* @__PURE__ */ e(
3656
3656
  "button",
3657
3657
  {
@@ -3669,7 +3669,7 @@ const Er = {
3669
3669
  neutral: "bg-surface-hover text-text-muted",
3670
3670
  success: "bg-success-soft text-success-fg"
3671
3671
  };
3672
- function Cn({
3672
+ function En({
3673
3673
  icon: t,
3674
3674
  tone: r = "neutral",
3675
3675
  title: n,
@@ -3677,9 +3677,9 @@ function Cn({
3677
3677
  actions: a,
3678
3678
  card: l = !1,
3679
3679
  className: o,
3680
- ...u
3680
+ ...m
3681
3681
  }) {
3682
- return /* @__PURE__ */ i(
3682
+ return /* @__PURE__ */ c(
3683
3683
  "div",
3684
3684
  {
3685
3685
  className: d(
@@ -3687,7 +3687,7 @@ function Cn({
3687
3687
  l && "rounded-lg border border-border bg-surface px-11 py-9 shadow-overlay",
3688
3688
  o
3689
3689
  ),
3690
- ...u,
3690
+ ...m,
3691
3691
  children: [
3692
3692
  t != null && /* @__PURE__ */ e("span", { className: d("flex size-disc items-center justify-center rounded-full text-2xl", Er[r]), children: t }),
3693
3693
  /* @__PURE__ */ e("div", { className: "text-lg font-semibold text-text", children: n }),
@@ -3697,7 +3697,7 @@ function Cn({
3697
3697
  }
3698
3698
  );
3699
3699
  }
3700
- function Sn({ children: t, className: r, ...n }) {
3700
+ function zn({ children: t, className: r, ...n }) {
3701
3701
  return /* @__PURE__ */ e(
3702
3702
  "kbd",
3703
3703
  {
@@ -3717,7 +3717,7 @@ const zr = {
3717
3717
  accent: "bg-accent",
3718
3718
  success: "bg-success"
3719
3719
  };
3720
- function En({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
3720
+ function Mn({ value: t, variant: r = "accent", size: n = "md", className: s, ...a }) {
3721
3721
  const l = Math.max(0, Math.min(100, t));
3722
3722
  return /* @__PURE__ */ e(
3723
3723
  "div",
@@ -3756,7 +3756,7 @@ const $r = {
3756
3756
  lg: "text-base",
3757
3757
  xl: "text-lg"
3758
3758
  };
3759
- function zn({
3759
+ function $n({
3760
3760
  size: t = "md",
3761
3761
  variant: r = "primary",
3762
3762
  label: n = "Loading...",
@@ -3764,7 +3764,7 @@ function zn({
3764
3764
  className: a,
3765
3765
  ...l
3766
3766
  }) {
3767
- return /* @__PURE__ */ i(
3767
+ return /* @__PURE__ */ c(
3768
3768
  "div",
3769
3769
  {
3770
3770
  className: d(
@@ -3774,7 +3774,7 @@ function zn({
3774
3774
  ),
3775
3775
  ...l,
3776
3776
  children: [
3777
- /* @__PURE__ */ i(
3777
+ /* @__PURE__ */ c(
3778
3778
  "svg",
3779
3779
  {
3780
3780
  className: d(
@@ -3838,7 +3838,7 @@ const _r = {
3838
3838
  "cat-4": "bg-cat-4",
3839
3839
  "cat-5": "bg-cat-5"
3840
3840
  };
3841
- function Mn({
3841
+ function Dn({
3842
3842
  tone: t = "neutral",
3843
3843
  shape: r = "round",
3844
3844
  pulse: n = !1,
@@ -3861,7 +3861,7 @@ function Mn({
3861
3861
  }
3862
3862
  );
3863
3863
  }
3864
- function $n({
3864
+ function Tn({
3865
3865
  steps: t,
3866
3866
  current: r,
3867
3867
  variant: n = "numbered",
@@ -3869,36 +3869,36 @@ function $n({
3869
3869
  className: a
3870
3870
  }) {
3871
3871
  const l = t.indexOf(r), o = { role: s ? "group" : void 0, "aria-label": s, "aria-hidden": s ? void 0 : !0 };
3872
- return n === "dots" ? /* @__PURE__ */ e("div", { ...o, className: d("flex items-center gap-1.5", a), children: t.map((u, m) => /* @__PURE__ */ e(
3872
+ return n === "dots" ? /* @__PURE__ */ e("div", { ...o, className: d("flex items-center gap-1.5", a), children: t.map((m, u) => /* @__PURE__ */ e(
3873
3873
  "span",
3874
3874
  {
3875
3875
  className: d(
3876
3876
  "h-step-bar rounded-full transition-all duration-fast ease-out",
3877
- m === l ? "w-5 bg-accent" : "w-3.5",
3878
- m < l && "bg-border-strong",
3879
- m > l && "bg-border"
3877
+ u === l ? "w-5 bg-accent" : "w-3.5",
3878
+ u < l && "bg-border-strong",
3879
+ u > l && "bg-border"
3880
3880
  )
3881
3881
  },
3882
- u
3883
- )) }) : /* @__PURE__ */ e("div", { ...o, className: d("flex items-center gap-2", a), children: t.map((u, m) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
3882
+ m
3883
+ )) }) : /* @__PURE__ */ e("div", { ...o, className: d("flex items-center gap-2", a), children: t.map((m, u) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
3884
3884
  /* @__PURE__ */ e(
3885
3885
  "span",
3886
3886
  {
3887
- "aria-current": m === l ? "step" : void 0,
3887
+ "aria-current": u === l ? "step" : void 0,
3888
3888
  className: d(
3889
3889
  "flex size-tile-sm items-center justify-center rounded-full text-xs font-medium",
3890
- m === l && "bg-accent text-accent-fg",
3891
- m < l && "bg-accent-soft text-accent",
3892
- m > l && "bg-surface-hover text-text-muted"
3890
+ u === l && "bg-accent text-accent-fg",
3891
+ u < l && "bg-accent-soft text-accent",
3892
+ u > l && "bg-surface-hover text-text-muted"
3893
3893
  ),
3894
- children: m + 1
3894
+ children: u + 1
3895
3895
  }
3896
3896
  ),
3897
- m < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
3898
- ] }, u)) });
3897
+ u < t.length - 1 && /* @__PURE__ */ e("span", { className: "h-px w-8 bg-border-strong" })
3898
+ ] }, m)) });
3899
3899
  }
3900
- function Dn({ title: t, icon: r = /* @__PURE__ */ e(bt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
3901
- return /* @__PURE__ */ i(
3900
+ function _n({ title: t, icon: r = /* @__PURE__ */ e(bt, { className: "size-icon-md", "aria-hidden": !0 }), action: n, children: s, className: a, ...l }) {
3901
+ return /* @__PURE__ */ c(
3902
3902
  "div",
3903
3903
  {
3904
3904
  className: d(
@@ -3908,7 +3908,7 @@ function Dn({ title: t, icon: r = /* @__PURE__ */ e(bt, { className: "size-icon-
3908
3908
  ),
3909
3909
  ...l,
3910
3910
  children: [
3911
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2 text-assistant", children: [
3911
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-assistant", children: [
3912
3912
  /* @__PURE__ */ e("span", { "aria-hidden": !0, children: r }),
3913
3913
  /* @__PURE__ */ e("span", { className: "text-sm font-semibold", children: t }),
3914
3914
  n && /* @__PURE__ */ e("span", { className: "ml-auto", children: n })
@@ -3919,41 +3919,46 @@ function Dn({ title: t, icon: r = /* @__PURE__ */ e(bt, { className: "size-icon-
3919
3919
  );
3920
3920
  }
3921
3921
  const Ar = {
3922
+ default: "bg-avatar text-avatar-fg",
3923
+ in: "bg-avatar-in text-avatar-in-fg",
3924
+ out: "bg-accent text-accent-fg",
3925
+ note: "bg-avatar-note text-avatar-note-fg"
3926
+ }, Lr = {
3922
3927
  xs: "w-5 h-5 text-xs",
3923
3928
  sm: "w-6 h-6 text-xs",
3924
3929
  md: "w-7 h-7 text-base",
3925
3930
  lg: "w-9 h-9 text-sm"
3926
3931
  };
3927
- function Lr(t) {
3932
+ function Pr(t) {
3928
3933
  if (!t) return "?";
3929
3934
  const r = t.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean);
3930
3935
  return r.length >= 2 ? (r[0][0] + r[1][0]).toUpperCase() : r.length === 1 ? r[0].slice(0, 2).toUpperCase() : "?";
3931
3936
  }
3932
- const Ir = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
3933
- const [l, o] = oe.useState(!1), u = d(
3934
- // `avatar`, not `surface-hover`: at 0.972 the plate was within a few percent
3935
- // of every surface it sits on, so the monogram floated instead of sitting in
3936
- // a disc. It needs its own token because it is a fill that must stay a step
3937
- // away from its background in *both* themes.
3938
- "inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none bg-avatar text-avatar-fg",
3937
+ const Ir = ({ name: t, src: r, tone: n = "default", size: s = "sm", className: a, title: l }) => {
3938
+ const [o, m] = oe.useState(!1), u = d(
3939
+ // Its own token and not `surface-hover`: at 0.972 the plate was within a few
3940
+ // percent of every surface it sits on, so the monogram floated instead of
3941
+ // sitting in a disc.
3942
+ "inline-flex items-center justify-center rounded-full overflow-hidden shrink-0 font-semibold select-none",
3939
3943
  Ar[n],
3940
- s
3944
+ Lr[s],
3945
+ a
3941
3946
  );
3942
- return r && !l ? /* @__PURE__ */ e(
3947
+ return r && !o ? /* @__PURE__ */ e(
3943
3948
  "img",
3944
3949
  {
3945
3950
  src: r,
3946
3951
  alt: t ?? "",
3947
- title: a ?? t,
3952
+ title: l ?? t,
3948
3953
  className: d(u, "object-cover"),
3949
- onError: () => o(!0)
3954
+ onError: () => m(!0)
3950
3955
  }
3951
- ) : /* @__PURE__ */ e("span", { className: u, title: a ?? t, "aria-label": t, children: Lr(t) });
3952
- }, Re = "ring-surface", Pr = "ring-surface-accent", Tn = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
3956
+ ) : /* @__PURE__ */ e("span", { className: u, title: l ?? t, "aria-label": t, children: Pr(t) });
3957
+ }, Re = "ring-surface", jr = "ring-surface-accent", An = ({ people: t, max: r = 4, size: n = "sm", className: s }) => {
3953
3958
  if (t.length === 0) return null;
3954
3959
  const a = t.slice(0, r), l = t.length - a.length;
3955
- return /* @__PURE__ */ i("span", { className: d("inline-flex items-center", s), children: [
3956
- a.map((o, u) => /* @__PURE__ */ e(
3960
+ return /* @__PURE__ */ c("span", { className: d("inline-flex items-center", s), children: [
3961
+ a.map((o, m) => /* @__PURE__ */ e(
3957
3962
  Ir,
3958
3963
  {
3959
3964
  name: o.name,
@@ -3961,14 +3966,14 @@ const Ir = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
3961
3966
  size: n,
3962
3967
  title: o.name ? o.seen === !1 ? `${o.name} — nog niet gelezen` : o.name : void 0,
3963
3968
  className: d(
3964
- u > 0 && "-ml-2",
3965
- o.owner ? Pr : Re,
3969
+ m > 0 && "-ml-2",
3970
+ o.owner ? jr : Re,
3966
3971
  o.seen === !1 && "opacity-40"
3967
3972
  )
3968
3973
  },
3969
- o.id ?? `${o.name}-${u}`
3974
+ o.id ?? `${o.name}-${m}`
3970
3975
  )),
3971
- l > 0 && /* @__PURE__ */ i(
3976
+ l > 0 && /* @__PURE__ */ c(
3972
3977
  "span",
3973
3978
  {
3974
3979
  className: d(
@@ -3991,12 +3996,12 @@ const Ir = ({ name: t, src: r, size: n = "sm", className: s, title: a }) => {
3991
3996
  chat: { fg: "text-channel-chat-fg", bg: "bg-channel-chat-soft" },
3992
3997
  tel: { fg: "text-channel-phone-fg", bg: "bg-channel-phone-soft" },
3993
3998
  note: { fg: "text-channel-note-fg", bg: "bg-channel-note-soft" }
3994
- }, jr = {
3999
+ }, Or = {
3995
4000
  sm: "size-avatar-xs rounded-sm text-xs",
3996
4001
  md: "size-avatar-sm rounded-md text-xs",
3997
4002
  lg: "size-avatar-lg rounded-md text-base"
3998
4003
  };
3999
- function _n({ channel: t, children: r, size: n = "md", className: s, title: a }) {
4004
+ function Ln({ channel: t, children: r, size: n = "md", className: s, title: a }) {
4000
4005
  const l = He[t in He ? t : "note"];
4001
4006
  return /* @__PURE__ */ e(
4002
4007
  "span",
@@ -4004,7 +4009,7 @@ function _n({ channel: t, children: r, size: n = "md", className: s, title: a })
4004
4009
  title: a,
4005
4010
  className: d(
4006
4011
  "inline-flex shrink-0 items-center justify-center font-bold",
4007
- jr[n],
4012
+ Or[n],
4008
4013
  l.fg,
4009
4014
  l.bg,
4010
4015
  s
@@ -4013,7 +4018,7 @@ function _n({ channel: t, children: r, size: n = "md", className: s, title: a })
4013
4018
  }
4014
4019
  );
4015
4020
  }
4016
- const An = ({
4021
+ const Pn = ({
4017
4022
  src: t,
4018
4023
  alt: r,
4019
4024
  size: n = "md",
@@ -4021,19 +4026,19 @@ const An = ({
4021
4026
  radius: a = "md",
4022
4027
  showLoading: l = !0,
4023
4028
  showError: o = !0,
4024
- fallback: u,
4025
- loadingContent: m,
4029
+ fallback: m,
4030
+ loadingContent: u,
4026
4031
  errorContent: y,
4027
4032
  className: x,
4028
4033
  onLoad: h,
4029
4034
  onError: b,
4030
4035
  ...v
4031
4036
  }) => {
4032
- const [k, p] = O(!0), [f, $] = O(!1), [C, q] = O(t), T = (K) => {
4033
- p(!1), $(!1), h?.(K);
4037
+ const [k, g] = O(!0), [f, $] = O(!1), [C, q] = O(t), T = (K) => {
4038
+ g(!1), $(!1), h?.(K);
4034
4039
  }, G = (K) => {
4035
- if (p(!1), $(!0), u && C !== u) {
4036
- q(u), $(!1), p(!0);
4040
+ if (g(!1), $(!0), m && C !== m) {
4041
+ q(m), $(!1), g(!0);
4037
4042
  return;
4038
4043
  }
4039
4044
  b?.(K);
@@ -4065,7 +4070,7 @@ const An = ({
4065
4070
  "rounded-full": a === "full"
4066
4071
  },
4067
4072
  x
4068
- ), I = d(
4073
+ ), P = d(
4069
4074
  "w-full h-full object-cover transition-opacity duration-fast",
4070
4075
  {
4071
4076
  "opacity-0": k || f,
@@ -4074,32 +4079,32 @@ const An = ({
4074
4079
  ), H = d(
4075
4080
  "absolute inset-0 flex items-center justify-center",
4076
4081
  "text-text-muted"
4077
- ), te = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), J = /* @__PURE__ */ i("div", { className: "text-center", children: [
4078
- /* @__PURE__ */ e(Q, { icon: pt, size: "lg", className: "mx-auto mb-1" }),
4082
+ ), te = /* @__PURE__ */ e("div", { className: "animate-pulse", children: /* @__PURE__ */ e("div", { className: "w-6 h-6 bg-surface-hover rounded" }) }), J = /* @__PURE__ */ c("div", { className: "text-center", children: [
4083
+ /* @__PURE__ */ e(Q, { icon: gt, size: "lg", className: "mx-auto mb-1" }),
4079
4084
  /* @__PURE__ */ e("span", { className: "text-xs", children: "Failed to load" })
4080
4085
  ] });
4081
- return /* @__PURE__ */ i("div", { className: V, children: [
4086
+ return /* @__PURE__ */ c("div", { className: V, children: [
4082
4087
  /* @__PURE__ */ e(
4083
4088
  "img",
4084
4089
  {
4085
4090
  ...v,
4086
4091
  src: C,
4087
4092
  alt: r,
4088
- className: I,
4093
+ className: P,
4089
4094
  onLoad: T,
4090
4095
  onError: G
4091
4096
  }
4092
4097
  ),
4093
- k && l && /* @__PURE__ */ e("div", { className: H, children: m || te }),
4098
+ k && l && /* @__PURE__ */ e("div", { className: H, children: u || te }),
4094
4099
  f && o && /* @__PURE__ */ e("div", { className: H, children: y || J })
4095
4100
  ] });
4096
4101
  };
4097
- function Ln({
4102
+ function In({
4098
4103
  icon: t,
4099
4104
  onClick: r,
4100
4105
  children: n
4101
4106
  }) {
4102
- return /* @__PURE__ */ i(
4107
+ return /* @__PURE__ */ c(
4103
4108
  "button",
4104
4109
  {
4105
4110
  type: "button",
@@ -4117,7 +4122,7 @@ function Ln({
4117
4122
  }
4118
4123
  );
4119
4124
  }
4120
- function In({
4125
+ function jn({
4121
4126
  items: t,
4122
4127
  getRowKey: r,
4123
4128
  variant: n = "divided",
@@ -4125,15 +4130,15 @@ function In({
4125
4130
  renderItem: a,
4126
4131
  trailing: l,
4127
4132
  onSelect: o,
4128
- onActiveIndexChange: u,
4129
- isActive: m,
4133
+ onActiveIndexChange: m,
4134
+ isActive: u,
4130
4135
  unread: y,
4131
4136
  dimmed: x,
4132
4137
  groupBy: h,
4133
4138
  groups: b,
4134
4139
  renderGroupHeader: v,
4135
4140
  stickyGroupHeaders: k = !1,
4136
- collapsibleGroups: p = !1,
4141
+ collapsibleGroups: g = !1,
4137
4142
  hideGroupCount: f = !1,
4138
4143
  selectable: $ = !1,
4139
4144
  selectedItems: C = [],
@@ -4141,18 +4146,18 @@ function In({
4141
4146
  bulkActions: T,
4142
4147
  header: G,
4143
4148
  stickyHeader: V = !1,
4144
- bordered: I = !1,
4149
+ bordered: P = !1,
4145
4150
  emptyContent: H,
4146
4151
  loading: te = !1,
4147
4152
  loadingRows: J = 4,
4148
4153
  className: K,
4149
4154
  "aria-label": ce
4150
4155
  }) {
4151
- const [w, c] = oe.useState(
4156
+ const [w, i] = oe.useState(
4152
4157
  () => Object.fromEntries(
4153
4158
  (b ?? []).filter((z) => z.defaultCollapsed).map((z) => [z.id, !0])
4154
4159
  )
4155
- ), S = oe.useRef(null), g = (z) => {
4160
+ ), S = oe.useRef(null), p = (z) => {
4156
4161
  if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(z.key)) return;
4157
4162
  const j = Array.from(
4158
4163
  S.current?.querySelectorAll("li[data-list-row]") ?? []
@@ -4167,11 +4172,18 @@ function In({
4167
4172
  );
4168
4173
  }, re = (z) => q?.(z ? [...t] : []), ee = d(
4169
4174
  "flex flex-col",
4170
- I && "overflow-hidden rounded-lg border border-border-subtle",
4175
+ // With a selection open the list has a dock at its foot. Sticky can only
4176
+ // park at the bottom of its own box, so on a list shorter than the window
4177
+ // the dock hung right under the last row instead of at the bottom of the
4178
+ // screen. Growing the box to the height of its parent puts it where it
4179
+ // belongs — and only while a selection exists, so an ordinary short list
4180
+ // keeps its natural height.
4181
+ $ && C.length > 0 && "min-h-full",
4182
+ P && "overflow-hidden rounded-lg border border-border-subtle",
4171
4183
  K
4172
4184
  );
4173
4185
  if (te)
4174
- return /* @__PURE__ */ e("div", { className: ee, children: Array.from({ length: J }).map((z, F) => /* @__PURE__ */ i(
4186
+ return /* @__PURE__ */ e("div", { className: ee, children: Array.from({ length: J }).map((z, F) => /* @__PURE__ */ c(
4175
4187
  "div",
4176
4188
  {
4177
4189
  className: d(
@@ -4189,9 +4201,9 @@ function In({
4189
4201
  )) });
4190
4202
  if (t.length === 0 && H)
4191
4203
  return /* @__PURE__ */ e("div", { className: ee, children: H });
4192
- const Y = t.length > 0 && C.length === t.length, P = C.length > 0 && !Y, D = (z, F, j) => {
4193
- const B = m?.(z, F) ?? !1, M = y?.(z, F) ?? !1, L = x?.(z, F) ?? !1, Z = $ && N(z);
4194
- return /* @__PURE__ */ i(
4204
+ const Y = t.length > 0 && C.length === t.length, I = C.length > 0 && !Y, D = (z, F, j) => {
4205
+ const B = u?.(z, F) ?? !1, M = y?.(z, F) ?? !1, L = x?.(z, F) ?? !1, Z = $ && N(z);
4206
+ return /* @__PURE__ */ c(
4195
4207
  "li",
4196
4208
  {
4197
4209
  ...o ? {
@@ -4200,7 +4212,7 @@ function In({
4200
4212
  "data-list-row": "",
4201
4213
  "aria-current": B || void 0,
4202
4214
  onClick: () => o(z, F),
4203
- onFocus: () => u?.(F),
4215
+ onFocus: () => m?.(F),
4204
4216
  onKeyDown: (ne) => {
4205
4217
  ne.key !== "Enter" && ne.key !== " " || (ne.preventDefault(), o(z, F));
4206
4218
  }
@@ -4256,10 +4268,10 @@ function In({
4256
4268
  ...F.filter((B) => z.has(B.id)),
4257
4269
  ...[...z.keys()].filter((B) => !F.some((M) => M.id === B)).map((B) => ({ id: B }))
4258
4270
  ].flatMap((B, M) => {
4259
- const L = z.get(B.id) ?? [], Z = p && w[B.id], ne = B.title ?? B.id, de = B.count ?? L.length, be = /* @__PURE__ */ e(
4271
+ const L = z.get(B.id) ?? [], Z = g && w[B.id], ne = B.title ?? B.id, de = B.count ?? L.length, be = /* @__PURE__ */ e(
4260
4272
  "li",
4261
4273
  {
4262
- onClick: p ? () => c((fe) => ({ ...fe, [B.id]: !fe[B.id] })) : void 0,
4274
+ onClick: g ? () => i((fe) => ({ ...fe, [B.id]: !fe[B.id] })) : void 0,
4263
4275
  className: d(
4264
4276
  // A caption over its rows, not a band across the table: same
4265
4277
  // surface as the rows, no rules, and the count as a quiet pill.
@@ -4268,12 +4280,12 @@ function In({
4268
4280
  M > 0 ? "pt-5" : "pt-3",
4269
4281
  B.tone === "danger" ? "text-danger-fg" : B.tone === "muted" ? "text-text-subtle" : "text-text",
4270
4282
  k && "sticky z-10",
4271
- p && "cursor-pointer select-none"
4283
+ g && "cursor-pointer select-none"
4272
4284
  ),
4273
- "aria-expanded": p ? !Z : void 0,
4285
+ "aria-expanded": g ? !Z : void 0,
4274
4286
  style: k ? { top: V ? 28 : 0 } : void 0,
4275
- children: v ? v(B, L.map((fe) => fe.item)) : /* @__PURE__ */ i(ve, { children: [
4276
- p && /* @__PURE__ */ e(
4287
+ children: v ? v(B, L.map((fe) => fe.item)) : /* @__PURE__ */ c(ve, { children: [
4288
+ g && /* @__PURE__ */ e(
4277
4289
  ze,
4278
4290
  {
4279
4291
  "aria-hidden": !0,
@@ -4306,8 +4318,8 @@ function In({
4306
4318
  ];
4307
4319
  });
4308
4320
  })();
4309
- return /* @__PURE__ */ i("div", { ref: S, className: ee, onKeyDown: o ? g : void 0, children: [
4310
- G && /* @__PURE__ */ i(
4321
+ return /* @__PURE__ */ c("div", { ref: S, className: ee, onKeyDown: o ? p : void 0, children: [
4322
+ G && /* @__PURE__ */ c(
4311
4323
  "div",
4312
4324
  {
4313
4325
  className: d(
@@ -4322,7 +4334,7 @@ function In({
4322
4334
  ye,
4323
4335
  {
4324
4336
  checked: Y,
4325
- indeterminate: P,
4337
+ indeterminate: I,
4326
4338
  onChange: (z) => re(z.target.checked),
4327
4339
  "aria-label": "Alles selecteren"
4328
4340
  }
@@ -4332,8 +4344,8 @@ function In({
4332
4344
  }
4333
4345
  ),
4334
4346
  /* @__PURE__ */ e("ul", { "aria-label": ce, className: "flex flex-col", children: A }),
4335
- $ && C.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ i("div", { className: "pointer-events-auto flex items-center gap-1.5 rounded-lg bg-accent py-1.5 pl-3.5 pr-1.5 text-accent-fg shadow-overlay", children: [
4336
- /* @__PURE__ */ i("span", { className: "text-sm font-medium", children: [
4347
+ $ && C.length > 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none sticky bottom-0 z-10 flex justify-center px-5 pb-4", children: /* @__PURE__ */ c("div", { className: "pointer-events-auto flex items-center gap-1.5 rounded-lg bg-accent py-1.5 pl-3.5 pr-1.5 text-accent-fg shadow-overlay", children: [
4348
+ /* @__PURE__ */ c("span", { className: "text-sm font-medium", children: [
4337
4349
  C.length,
4338
4350
  " geselecteerd"
4339
4351
  ] }),
@@ -4353,7 +4365,7 @@ function In({
4353
4365
  ] }) })
4354
4366
  ] });
4355
4367
  }
4356
- function Pn({
4368
+ function On({
4357
4369
  side: t,
4358
4370
  continued: r = !1,
4359
4371
  tone: n = "default",
@@ -4366,7 +4378,10 @@ function Pn({
4366
4378
  className: d(
4367
4379
  // A bubble never spans the whole column; it narrows further from md,
4368
4380
  // where the thread itself is wide enough for the difference to matter.
4369
- "min-w-0 max-w-bubble md:max-w-bubble-md shadow-sm",
4381
+ // No shadow: a bubble is an inner card, and inner cards separate
4382
+ // themselves with a fill. The shadow was doing the separating while both
4383
+ // sides were white.
4384
+ "min-w-0 max-w-bubble md:max-w-bubble-md",
4370
4385
  // No outline on an ordinary message: its fill already separates it from
4371
4386
  // the thread, and a border on every bubble turns a conversation into a
4372
4387
  // stack of boxes. The flagged tones keep theirs — there the outline is
@@ -4375,7 +4390,11 @@ function Pn({
4375
4390
  // tone === "note" && "border border-note-border",
4376
4391
  // The tight corner points back at the sender.
4377
4392
  t === "out" ? "rounded-lg rounded-tr-sm" : "rounded-lg rounded-tl-sm",
4378
- n === "note" ? "bg-note-soft" : "bg-surface",
4393
+ // Sent is a pale blue, received the neutral sunk grey — the same pair the
4394
+ // full-width feed cards use, so a chat thread and a mail thread say
4395
+ // "ours" and "theirs" the same way. Both used to be white on white,
4396
+ // which left the corner radius as the only cue.
4397
+ n === "note" ? "bg-note-soft" : t === "out" ? "bg-bubble-out-soft" : "bg-surface-sunk",
4379
4398
  r && "mt-1",
4380
4399
  s
4381
4400
  ),
@@ -4383,18 +4402,18 @@ function Pn({
4383
4402
  }
4384
4403
  );
4385
4404
  }
4386
- const Or = {
4405
+ const Fr = {
4387
4406
  default: "text-text",
4388
4407
  urgent: "text-danger-fg",
4389
4408
  success: "text-success-fg"
4390
4409
  };
4391
- function jn({ value: t, label: r, tone: n = "default", className: s, ...a }) {
4392
- return /* @__PURE__ */ i("div", { className: d("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
4393
- /* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Or[n]), children: t }),
4410
+ function Fn({ value: t, label: r, tone: n = "default", className: s, ...a }) {
4411
+ return /* @__PURE__ */ c("div", { className: d("rounded-xl bg-editor px-4 py-3.5", s), ...a, children: [
4412
+ /* @__PURE__ */ e("div", { className: d("text-2xl font-semibold", Fr[n]), children: t }),
4394
4413
  /* @__PURE__ */ e("div", { className: "pt-0.5 text-xs text-text-muted", children: r })
4395
4414
  ] });
4396
4415
  }
4397
- const On = ({
4416
+ const Bn = ({
4398
4417
  surface: t = !1,
4399
4418
  title: r,
4400
4419
  subtitle: n,
@@ -4402,26 +4421,26 @@ const On = ({
4402
4421
  actions: a = [],
4403
4422
  children: l,
4404
4423
  className: o,
4405
- backLabel: u = "Back",
4406
- backClassName: m,
4424
+ backLabel: m = "Back",
4425
+ backClassName: u,
4407
4426
  onBack: y,
4408
4427
  editable: x = !1,
4409
4428
  onTitleChange: h
4410
4429
  }) => {
4411
- const [b, v] = O(!1), [k, p] = O(r), f = se(null);
4430
+ const [b, v] = O(!1), [k, g] = O(r), f = se(null);
4412
4431
  X(() => {
4413
- p(r);
4432
+ g(r);
4414
4433
  }, [r]), X(() => {
4415
4434
  b && f.current && (f.current.focus(), f.current.select());
4416
4435
  }, [b]);
4417
4436
  const $ = () => {
4418
4437
  x && v(!0);
4419
4438
  }, C = () => {
4420
- v(!1), k.trim() !== "" && k !== r && h ? h(k.trim()) : p(r);
4439
+ v(!1), k.trim() !== "" && k !== r && h ? h(k.trim()) : g(r);
4421
4440
  }, q = (T) => {
4422
- T.key === "Enter" ? f.current?.blur() : T.key === "Escape" && (p(r), v(!1));
4441
+ T.key === "Enter" ? f.current?.blur() : T.key === "Escape" && (g(r), v(!1));
4423
4442
  };
4424
- return /* @__PURE__ */ i(
4443
+ return /* @__PURE__ */ c(
4425
4444
  "div",
4426
4445
  {
4427
4446
  className: d(
@@ -4434,22 +4453,24 @@ const On = ({
4434
4453
  o
4435
4454
  ),
4436
4455
  children: [
4437
- /* @__PURE__ */ i("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
4438
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-4 text-text", children: [
4439
- y && /* @__PURE__ */ e(ae, { variant: "outline", onClick: y, leftIcon: /* @__PURE__ */ e(Q, { icon: Ee, size: "sm" }), iconOnly: !0 }),
4440
- /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
4456
+ /* @__PURE__ */ c("div", { className: "flex flex-row sm:items-start sm:justify-between items-center gap-4", children: [
4457
+ /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-4 text-text", children: [
4458
+ y && // Ghost: a framed box around a back chevron makes the way out of a
4459
+ // page look like the page's primary control.
4460
+ /* @__PURE__ */ e(ae, { variant: "ghost", onClick: y, leftIcon: /* @__PURE__ */ e(Q, { icon: Ee, size: "md" }), iconOnly: !0 }),
4461
+ /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
4441
4462
  b ? /* @__PURE__ */ e(
4442
4463
  "input",
4443
4464
  {
4444
4465
  ref: f,
4445
4466
  type: "text",
4446
4467
  value: k,
4447
- onChange: (T) => p(T.target.value),
4468
+ onChange: (T) => g(T.target.value),
4448
4469
  onBlur: C,
4449
4470
  onKeyDown: q,
4450
4471
  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"
4451
4472
  }
4452
- ) : /* @__PURE__ */ i("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
4473
+ ) : /* @__PURE__ */ c("div", { className: "group flex items-baseline gap-2.5 min-w-0", children: [
4453
4474
  /* @__PURE__ */ e(
4454
4475
  "h2",
4455
4476
  {
@@ -4464,7 +4485,7 @@ const On = ({
4464
4485
  ),
4465
4486
  n && /* @__PURE__ */ e("span", { className: "shrink-0 text-base text-text-muted truncate", children: n }),
4466
4487
  x && /* @__PURE__ */ e(
4467
- gt,
4488
+ pt,
4468
4489
  {
4469
4490
  size: 15,
4470
4491
  onClick: $,
@@ -4519,7 +4540,7 @@ const On = ({
4519
4540
  ]
4520
4541
  }
4521
4542
  );
4522
- }, Fr = /<[a-z][\s\S]*>/i, Br = [
4543
+ }, Br = /<[a-z][\s\S]*>/i, Rr = [
4523
4544
  "[&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_p]:leading-relaxed",
4524
4545
  "[&_a]:text-accent [&_a]:underline [&_a]:underline-offset-2",
4525
4546
  "[&_strong]:font-semibold [&_em]:italic",
@@ -4534,7 +4555,7 @@ const On = ({
4534
4555
  "[&_table]:my-1.5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs",
4535
4556
  "[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold",
4536
4557
  "[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1"
4537
- ].join(" "), Rr = {
4558
+ ].join(" "), Hr = {
4538
4559
  p: (t) => /* @__PURE__ */ e("p", { className: "my-1.5 leading-relaxed first:mt-0 last:mb-0", ...t }),
4539
4560
  a: (t) => /* @__PURE__ */ e("a", { className: "text-accent underline underline-offset-2 hover:opacity-80", target: "_blank", rel: "noopener noreferrer", ...t }),
4540
4561
  strong: (t) => /* @__PURE__ */ e("strong", { className: "font-semibold", ...t }),
@@ -4557,31 +4578,31 @@ const On = ({
4557
4578
  th: (t) => /* @__PURE__ */ e("th", { className: "border border-border px-2 py-1 text-left font-semibold", ...t }),
4558
4579
  td: (t) => /* @__PURE__ */ e("td", { className: "border border-border px-2 py-1", ...t })
4559
4580
  };
4560
- function Fn({ text: t, className: r, as: n }) {
4581
+ function Rn({ text: t, className: r, as: n }) {
4561
4582
  const s = t ?? "";
4562
- return (n ? n === "html" : Fr.test(s)) ? /* @__PURE__ */ e(
4583
+ return (n ? n === "html" : Br.test(s)) ? /* @__PURE__ */ e(
4563
4584
  "div",
4564
4585
  {
4565
- className: d("break-words", Br, r),
4586
+ className: d("break-words", Rr, r),
4566
4587
  dangerouslySetInnerHTML: { __html: kt.sanitize(s, { ADD_ATTR: ["target", "rel"] }) }
4567
4588
  }
4568
- ) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(Ct, { remarkPlugins: [St], components: Rr, children: s }) });
4589
+ ) : /* @__PURE__ */ e("div", { className: d("break-words", r), children: /* @__PURE__ */ e(Ct, { remarkPlugins: [St], components: Hr, children: s }) });
4569
4590
  }
4570
- const Bn = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ i("div", { className: d("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
4591
+ const Hn = ({ label: t, meta: r, action: n, className: s }) => /* @__PURE__ */ c("div", { className: d("flex items-center gap-2 px-1 pb-2 pt-7 first:pt-0", s), children: [
4571
4592
  /* @__PURE__ */ e("span", { className: "shrink-0 text-2xs font-semibold uppercase tracking-label text-text-subtle", children: t }),
4572
4593
  r && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-right text-xs tabular-nums text-text-subtle", children: r }),
4573
4594
  n && /* @__PURE__ */ e("span", { className: "ml-auto shrink-0", children: n })
4574
4595
  ] });
4575
- function Rn({ label: t, trailing: r, align: n = "center", className: s }) {
4596
+ function Vn({ label: t, trailing: r, align: n = "center", className: s }) {
4576
4597
  const a = /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-border-subtle", "aria-hidden": !0 });
4577
- return !t && !r ? /* @__PURE__ */ e("div", { className: d("flex items-center py-2", s), children: a }) : /* @__PURE__ */ i("div", { className: d("flex items-center gap-3 py-2", s), children: [
4598
+ return !t && !r ? /* @__PURE__ */ e("div", { className: d("flex items-center py-2", s), children: a }) : /* @__PURE__ */ c("div", { className: d("flex items-center gap-3 py-2", s), children: [
4578
4599
  n === "center" && a,
4579
4600
  /* @__PURE__ */ e("span", { className: "shrink-0 text-xs font-medium text-text-muted", children: t }),
4580
4601
  a,
4581
4602
  r && /* @__PURE__ */ e("span", { className: "shrink-0", children: r })
4582
4603
  ] });
4583
4604
  }
4584
- function Hn({
4605
+ function qn({
4585
4606
  label: t,
4586
4607
  description: r,
4587
4608
  control: n,
@@ -4589,7 +4610,7 @@ function Hn({
4589
4610
  disabled: a = !1,
4590
4611
  className: l
4591
4612
  }) {
4592
- return /* @__PURE__ */ i(
4613
+ return /* @__PURE__ */ c(
4593
4614
  "div",
4594
4615
  {
4595
4616
  className: d(
@@ -4599,7 +4620,7 @@ function Hn({
4599
4620
  l
4600
4621
  ),
4601
4622
  children: [
4602
- /* @__PURE__ */ i("div", { className: "min-w-0", children: [
4623
+ /* @__PURE__ */ c("div", { className: "min-w-0", children: [
4603
4624
  /* @__PURE__ */ e("div", { className: "text-sm text-text", children: t }),
4604
4625
  r && /* @__PURE__ */ e("div", { className: "text-xs text-text-muted", children: r })
4605
4626
  ] }),
@@ -4608,7 +4629,7 @@ function Hn({
4608
4629
  }
4609
4630
  );
4610
4631
  }
4611
- function Vn({
4632
+ function Un({
4612
4633
  icon: t,
4613
4634
  title: r,
4614
4635
  description: n,
@@ -4616,10 +4637,10 @@ function Vn({
4616
4637
  children: a,
4617
4638
  className: l
4618
4639
  }) {
4619
- return /* @__PURE__ */ i("section", { className: d("flex flex-col gap-2", l), children: [
4620
- /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
4640
+ return /* @__PURE__ */ c("section", { className: d("flex flex-col gap-2", l), children: [
4641
+ /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
4621
4642
  t && /* @__PURE__ */ e(Q, { icon: t, size: "md", color: "secondary", className: "mt-0.5" }),
4622
- /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
4643
+ /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: [
4623
4644
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-text", children: r }),
4624
4645
  n && /* @__PURE__ */ e("p", { className: "text-xs text-text-muted", children: n })
4625
4646
  ] }),
@@ -4628,8 +4649,8 @@ function Vn({
4628
4649
  /* @__PURE__ */ e("div", { className: d("flex flex-col", t && "pl-6"), children: a })
4629
4650
  ] });
4630
4651
  }
4631
- function qn({ label: t, dotColor: r, onClick: n, className: s }) {
4632
- return /* @__PURE__ */ i(
4652
+ function Wn({ label: t, dotColor: r, onClick: n, className: s }) {
4653
+ return /* @__PURE__ */ c(
4633
4654
  "button",
4634
4655
  {
4635
4656
  type: "button",
@@ -4646,13 +4667,13 @@ function qn({ label: t, dotColor: r, onClick: n, className: s }) {
4646
4667
  }
4647
4668
  );
4648
4669
  }
4649
- function Hr(t, r) {
4670
+ function Vr(t, r) {
4650
4671
  return r.split(".").reduce(
4651
4672
  (n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
4652
4673
  t
4653
4674
  );
4654
4675
  }
4655
- const Un = ({
4676
+ const Kn = ({
4656
4677
  groups: t,
4657
4678
  data: r,
4658
4679
  size: n = "md",
@@ -4673,9 +4694,9 @@ const Un = ({
4673
4694
  if (!h) return String(x || "-");
4674
4695
  const b = h.find((v) => v.value === x);
4675
4696
  return b ? b.label : String(x || "-");
4676
- }, u = he(
4697
+ }, m = he(
4677
4698
  (x) => {
4678
- const h = Hr(r, x.name);
4699
+ const h = Vr(r, x.name);
4679
4700
  if (x.type === "array") {
4680
4701
  const v = h;
4681
4702
  return !v || v.length === 0 ? /* @__PURE__ */ e(
@@ -4686,12 +4707,12 @@ const Un = ({
4686
4707
  className: "text-text-muted",
4687
4708
  children: "Geen items"
4688
4709
  }
4689
- ) : /* @__PURE__ */ e("div", { className: "space-y-3", children: v.map((k, p) => /* @__PURE__ */ i(
4710
+ ) : /* @__PURE__ */ e("div", { className: "space-y-3", children: v.map((k, g) => /* @__PURE__ */ c(
4690
4711
  "div",
4691
4712
  {
4692
4713
  className: "p-4 border border-border rounded-xl space-y-3",
4693
4714
  children: [
4694
- /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ i(
4715
+ /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ c(
4695
4716
  me,
4696
4717
  {
4697
4718
  variant: "label",
@@ -4701,7 +4722,7 @@ const Un = ({
4701
4722
  children: [
4702
4723
  x.label,
4703
4724
  " ",
4704
- p + 1
4725
+ g + 1
4705
4726
  ]
4706
4727
  }
4707
4728
  ) }),
@@ -4738,7 +4759,7 @@ const Un = ({
4738
4759
  default:
4739
4760
  C = String($ || "-");
4740
4761
  }
4741
- return f.format && (C = f.format($, k)), /* @__PURE__ */ i("div", { className: "space-y-1", children: [
4762
+ return f.format && (C = f.format($, k)), /* @__PURE__ */ c("div", { className: "space-y-1", children: [
4742
4763
  /* @__PURE__ */ e(
4743
4764
  me,
4744
4765
  {
@@ -4761,7 +4782,7 @@ const Un = ({
4761
4782
  }) })
4762
4783
  ]
4763
4784
  },
4764
- p
4785
+ g
4765
4786
  )) });
4766
4787
  }
4767
4788
  if (x.type === "custom" && x.customComponent)
@@ -4815,7 +4836,7 @@ const Un = ({
4815
4836
  );
4816
4837
  },
4817
4838
  [r]
4818
- ), m = he(
4839
+ ), u = he(
4819
4840
  (x) => {
4820
4841
  if (x.conditional && !x.conditional(r))
4821
4842
  return null;
@@ -4835,12 +4856,12 @@ const Un = ({
4835
4856
  },
4836
4857
  x.className
4837
4858
  );
4838
- return /* @__PURE__ */ i(
4859
+ return /* @__PURE__ */ c(
4839
4860
  "div",
4840
4861
  {
4841
4862
  className: "grid grid-cols-1 md:grid-cols-3 gap-8 p-6 border border-border rounded-xl",
4842
4863
  children: [
4843
- /* @__PURE__ */ i("div", { className: "md:col-span-1", children: [
4864
+ /* @__PURE__ */ c("div", { className: "md:col-span-1", children: [
4844
4865
  /* @__PURE__ */ e(
4845
4866
  me,
4846
4867
  {
@@ -4861,7 +4882,7 @@ const Un = ({
4861
4882
  }
4862
4883
  )
4863
4884
  ] }),
4864
- /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: h.map((v) => /* @__PURE__ */ i(
4885
+ /* @__PURE__ */ e("div", { className: "md:col-span-2", children: /* @__PURE__ */ e("div", { className: b, children: h.map((v) => /* @__PURE__ */ c(
4865
4886
  "div",
4866
4887
  {
4867
4888
  className: "space-y-1",
@@ -4879,7 +4900,7 @@ const Un = ({
4879
4900
  children: v.label
4880
4901
  }
4881
4902
  ),
4882
- u(v)
4903
+ m(v)
4883
4904
  ]
4884
4905
  },
4885
4906
  v.name
@@ -4889,7 +4910,7 @@ const Un = ({
4889
4910
  x.id
4890
4911
  );
4891
4912
  },
4892
- [r, u]
4913
+ [r, m]
4893
4914
  ), y = d(
4894
4915
  "space-y-6",
4895
4916
  {
@@ -4900,12 +4921,24 @@ const Un = ({
4900
4921
  },
4901
4922
  s
4902
4923
  );
4903
- return /* @__PURE__ */ e("div", { className: y, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(m) }) });
4904
- }, Xe = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
4924
+ return /* @__PURE__ */ e("div", { className: y, children: /* @__PURE__ */ e("div", { className: "space-y-8", children: t.map(u) }) });
4925
+ }, qr = () => /* @__PURE__ */ c("div", { className: "flex flex-col gap-px", "aria-hidden": !0, children: [
4926
+ /* @__PURE__ */ e("div", { className: "px-2.5 pb-2 pt-5", children: /* @__PURE__ */ e("span", { className: "block h-2 w-16 rounded-xs bg-page-hover" }) }),
4927
+ [0, 1, 2, 3].map((t) => /* @__PURE__ */ c("div", { className: "flex h-row-md items-center gap-2.5 px-2.5", children: [
4928
+ /* @__PURE__ */ e("span", { className: "size-4 shrink-0 rounded-xs bg-page-hover" }),
4929
+ /* @__PURE__ */ e(
4930
+ "span",
4931
+ {
4932
+ className: "h-2 rounded-xs bg-page-hover",
4933
+ style: { width: `${[62, 44, 74, 52][t]}%` }
4934
+ }
4935
+ )
4936
+ ] }, t))
4937
+ ] }), Xe = ({ item: t, isSelectedHandler: r, onClick: n, depth: s = 0 }) => {
4905
4938
  const a = !!(t.children && t.children.length > 0), l = r ? r(t.path) : !1;
4906
4939
  if (a)
4907
- return /* @__PURE__ */ i("li", { children: [
4908
- /* @__PURE__ */ i(
4940
+ return /* @__PURE__ */ c("li", { children: [
4941
+ /* @__PURE__ */ c(
4909
4942
  "div",
4910
4943
  {
4911
4944
  className: d(
@@ -4917,10 +4950,10 @@ const Un = ({
4917
4950
  ]
4918
4951
  }
4919
4952
  ),
4920
- /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((m, y) => /* @__PURE__ */ e(
4953
+ /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.children?.map((u, y) => /* @__PURE__ */ e(
4921
4954
  Xe,
4922
4955
  {
4923
- item: m,
4956
+ item: u,
4924
4957
  isSelectedHandler: r,
4925
4958
  onClick: n,
4926
4959
  depth: s + 1
@@ -4928,15 +4961,15 @@ const Un = ({
4928
4961
  y
4929
4962
  )) })
4930
4963
  ] });
4931
- const o = t.action, u = o?.visibility !== "always";
4932
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
4964
+ const o = t.action, m = o?.visibility !== "always";
4965
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
4933
4966
  "div",
4934
4967
  {
4935
4968
  role: "button",
4936
4969
  tabIndex: 0,
4937
4970
  onClick: () => t.path && n?.(t.path),
4938
- onKeyDown: (m) => {
4939
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), t.path && n?.(t.path));
4971
+ onKeyDown: (u) => {
4972
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t.path && n?.(t.path));
4940
4973
  },
4941
4974
  className: d(
4942
4975
  // De kolom ligt op de backdrop, niet op een paneel: het actieve item
@@ -4945,7 +4978,7 @@ const Un = ({
4945
4978
  "group/item flex h-row-md cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-base no-underline",
4946
4979
  "transition-colors duration-fast ease-out",
4947
4980
  "focus-visible:outline-none focus-visible:focus-ring",
4948
- l ? "bg-surface font-medium text-text shadow-sm" : "text-text-muted hover:bg-page-hover hover:text-text"
4981
+ l ? "bg-surface-hover font-medium text-text shadow-sm" : "text-text-muted hover:bg-page-hover hover:text-text"
4949
4982
  ),
4950
4983
  children: [
4951
4984
  t.icon && /* @__PURE__ */ e(
@@ -4965,7 +4998,7 @@ const Un = ({
4965
4998
  className: d(
4966
4999
  "shrink-0 text-xs tabular-nums",
4967
5000
  l ? "rounded-full bg-accent px-1.5 font-semibold text-accent-fg" : "text-text-subtle",
4968
- o && u && "group-hover/item:hidden group-focus-within/item:hidden"
5001
+ o && m && "group-hover/item:hidden group-focus-within/item:hidden"
4969
5002
  ),
4970
5003
  children: t.count
4971
5004
  }
@@ -4976,16 +5009,16 @@ const Un = ({
4976
5009
  type: "button",
4977
5010
  "aria-label": o.label,
4978
5011
  title: o.label,
4979
- onClick: (m) => {
4980
- m.stopPropagation(), o.onClick();
5012
+ onClick: (u) => {
5013
+ u.stopPropagation(), o.onClick();
4981
5014
  },
4982
- onKeyDown: (m) => m.stopPropagation(),
5015
+ onKeyDown: (u) => u.stopPropagation(),
4983
5016
  className: d(
4984
5017
  "flex size-5 shrink-0 items-center justify-center rounded-sm",
4985
5018
  "text-text-subtle transition-colors duration-fast ease-out",
4986
5019
  "hover:bg-page-hover hover:text-text",
4987
5020
  "focus-visible:outline-none focus-visible:focus-ring",
4988
- u && "opacity-0 group-hover/item:opacity-100 focus-visible:opacity-100"
5021
+ m && "opacity-0 group-hover/item:opacity-100 focus-visible:opacity-100"
4989
5022
  ),
4990
5023
  children: o.icon
4991
5024
  }
@@ -4993,25 +5026,29 @@ const Un = ({
4993
5026
  ]
4994
5027
  }
4995
5028
  ) });
4996
- }, Wn = ({
5029
+ }, Gn = ({
4997
5030
  items: t,
4998
5031
  isSelectedHandler: r,
4999
5032
  onClick: n,
5000
- preMenuItemsComponent: s
5001
- }) => /* @__PURE__ */ i("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5033
+ preMenuItemsComponent: s,
5034
+ loading: a = !1
5035
+ }) => a ? /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5036
+ s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5037
+ /* @__PURE__ */ e(qr, {})
5038
+ ] }) : /* @__PURE__ */ c("nav", { className: "flex h-full min-h-0 shrink-0 flex-col", children: [
5002
5039
  s && /* @__PURE__ */ e("div", { className: "pb-4", children: s }),
5003
5040
  /* @__PURE__ */ e("ul", { className: "flex min-h-0 flex-1 flex-col gap-px overflow-y-auto", children: t.map(
5004
- (a, l) => !a.path && !a.label && !a.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, l) : /* @__PURE__ */ e(
5041
+ (l, o) => !l.path && !l.label && !l.children ? /* @__PURE__ */ e("li", { "aria-hidden": !0, className: "h-4" }, o) : /* @__PURE__ */ e(
5005
5042
  Xe,
5006
5043
  {
5007
- item: a,
5044
+ item: l,
5008
5045
  isSelectedHandler: r,
5009
5046
  onClick: n
5010
5047
  },
5011
- l
5048
+ o
5012
5049
  )
5013
5050
  ) })
5014
- ] }), Vr = {
5051
+ ] }), Ur = {
5015
5052
  xs: "text-xs",
5016
5053
  sm: "text-sm",
5017
5054
  md: "text-base",
@@ -5020,13 +5057,13 @@ const Un = ({
5020
5057
  "2xl": "text-2xl",
5021
5058
  "3xl": "text-3xl",
5022
5059
  "4xl": "text-3xl"
5023
- }, qr = {
5060
+ }, Wr = {
5024
5061
  light: "font-normal",
5025
5062
  normal: "font-normal",
5026
5063
  medium: "font-medium",
5027
5064
  semibold: "font-semibold",
5028
5065
  bold: "font-bold"
5029
- }, Ur = {
5066
+ }, Kr = {
5030
5067
  primary: "text-text",
5031
5068
  secondary: "text-text-muted",
5032
5069
  accent: "text-accent",
@@ -5036,11 +5073,11 @@ const Un = ({
5036
5073
  info: "text-info-fg",
5037
5074
  neutral: "text-text",
5038
5075
  current: "text-current"
5039
- }, Wr = {
5076
+ }, Gr = {
5040
5077
  left: "text-left",
5041
5078
  center: "text-center",
5042
5079
  right: "text-right"
5043
- }, Kn = ({
5080
+ }, Jn = ({
5044
5081
  level: t = 1,
5045
5082
  size: r,
5046
5083
  weight: n = "semibold",
@@ -5048,21 +5085,21 @@ const Un = ({
5048
5085
  align: a = "left",
5049
5086
  truncate: l = !1,
5050
5087
  className: o,
5051
- children: u,
5052
- ...m
5088
+ children: m,
5089
+ ...u
5053
5090
  }) => {
5054
5091
  const y = `h${t}`, x = d(
5055
5092
  "font-sans text-pretty",
5056
- Vr[r || Kr(t)],
5057
- qr[n],
5058
- Ur[s],
5059
- Wr[a],
5093
+ Ur[r || Jr(t)],
5094
+ Wr[n],
5095
+ Kr[s],
5096
+ Gr[a],
5060
5097
  l && "truncate",
5061
5098
  o
5062
5099
  );
5063
- return /* @__PURE__ */ e(y, { className: x, ...m, children: u });
5100
+ return /* @__PURE__ */ e(y, { className: x, ...u, children: m });
5064
5101
  };
5065
- function Kr(t) {
5102
+ function Jr(t) {
5066
5103
  return {
5067
5104
  1: "2xl",
5068
5105
  2: "xl",
@@ -5072,7 +5109,7 @@ function Kr(t) {
5072
5109
  6: "md"
5073
5110
  }[t] || "md";
5074
5111
  }
5075
- const Gn = ({
5112
+ const Yn = ({
5076
5113
  commands: t,
5077
5114
  isOpen: r,
5078
5115
  onClose: n,
@@ -5080,11 +5117,11 @@ const Gn = ({
5080
5117
  initialCommandPath: a,
5081
5118
  initialActiveIndex: l
5082
5119
  }) => {
5083
- const [o, u] = O(""), [m, y] = O(a || []), [x, h] = O(l || 0), b = se(null), v = se(null), p = (m.length ? t.find((f) => f.id === m[0])?.subCommands || [] : t).filter(
5120
+ const [o, m] = O(""), [u, y] = O(a || []), [x, h] = O(l || 0), b = se(null), v = se(null), g = (u.length ? t.find((f) => f.id === u[0])?.subCommands || [] : t).filter(
5084
5121
  (f) => f.label.toLowerCase().includes(o.toLowerCase())
5085
5122
  );
5086
5123
  return X(() => {
5087
- r || (u(""), y(a || []), h(l || 0));
5124
+ r || (m(""), y(a || []), h(l || 0));
5088
5125
  }, [r]), X(() => {
5089
5126
  const f = ($) => {
5090
5127
  if (r) {
@@ -5092,20 +5129,20 @@ const Gn = ({
5092
5129
  n();
5093
5130
  else if ($.key === "ArrowUp")
5094
5131
  h(
5095
- (C) => C > 0 ? C - 1 : p.length - 1
5132
+ (C) => C > 0 ? C - 1 : g.length - 1
5096
5133
  );
5097
5134
  else if ($.key === "ArrowDown")
5098
5135
  h(
5099
- (C) => C < p.length - 1 ? C + 1 : 0
5136
+ (C) => C < g.length - 1 ? C + 1 : 0
5100
5137
  );
5101
5138
  else if ($.key === "Enter") {
5102
- const C = p[x];
5103
- C && (C.subCommands ? (y([...m, C.id]), h(0)) : C.action && (C.action(), n()));
5139
+ const C = g[x];
5140
+ C && (C.subCommands ? (y([...u, C.id]), h(0)) : C.action && (C.action(), n()));
5104
5141
  }
5105
5142
  }
5106
5143
  };
5107
5144
  return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
5108
- }, [r, n, p, x, m]), X(() => {
5145
+ }, [r, n, g, x, u]), X(() => {
5109
5146
  const f = ($) => {
5110
5147
  b.current && !b.current.contains($.target) && n();
5111
5148
  };
@@ -5113,13 +5150,13 @@ const Gn = ({
5113
5150
  }, [r, n]), X(() => {
5114
5151
  if (!r) return;
5115
5152
  v.current?.querySelector(`[data-index="${x}"]`)?.scrollIntoView({ block: "nearest" });
5116
- }, [x, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ i(
5153
+ }, [x, r]), r ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim", children: /* @__PURE__ */ c(
5117
5154
  "div",
5118
5155
  {
5119
5156
  className: "flex flex-col w-full max-w-lg max-h-dialog p-2 mx-auto rounded-lg border border-border shadow-modal bg-surface",
5120
5157
  ref: b,
5121
5158
  children: [
5122
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 flex-shrink-0", children: [
5159
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-2 px-3 flex-shrink-0", children: [
5123
5160
  /* @__PURE__ */ e(Me, { className: "w-4 h-4 text-text-muted shrink-0" }),
5124
5161
  /* @__PURE__ */ e(
5125
5162
  "input",
@@ -5128,25 +5165,25 @@ const Gn = ({
5128
5165
  autoFocus: !0,
5129
5166
  placeholder: s?.searchPlaceholder || "Search commands...",
5130
5167
  value: o,
5131
- onChange: (f) => u(f.target.value),
5168
+ onChange: (f) => m(f.target.value),
5132
5169
  className: "w-full border-0 bg-transparent py-2 text-text focus:outline-none"
5133
5170
  }
5134
5171
  )
5135
5172
  ] }),
5136
- /* @__PURE__ */ i(
5173
+ /* @__PURE__ */ c(
5137
5174
  "div",
5138
5175
  {
5139
5176
  ref: v,
5140
5177
  className: "mt-2 pt-2 text-sm border-t border-border max-h-dialog-list overflow-y-auto",
5141
5178
  children: [
5142
- p.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
5143
- p.map((f, $) => /* @__PURE__ */ i(
5179
+ g.length === 0 && /* @__PURE__ */ e("div", { className: "text-text-muted text-center text-sm", children: s?.noCommandsFound || "No commands found" }),
5180
+ g.map((f, $) => /* @__PURE__ */ c(
5144
5181
  "div",
5145
5182
  {
5146
5183
  "data-index": $,
5147
5184
  className: `flex items-center p-2 cursor-pointer rounded-md ${$ === x ? "bg-accent-soft text-accent" : "text-text"}`,
5148
5185
  onClick: () => {
5149
- f.subCommands ? (y([...m, f.id]), h(0)) : f.action && (f.action(), n());
5186
+ f.subCommands ? (y([...u, f.id]), h(0)) : f.action && (f.action(), n());
5150
5187
  },
5151
5188
  onMouseEnter: () => h($),
5152
5189
  children: [
@@ -5160,16 +5197,16 @@ const Gn = ({
5160
5197
  ]
5161
5198
  }
5162
5199
  ),
5163
- /* @__PURE__ */ i("div", { className: "flex items-center gap-4 px-3 pt-2 mt-2 text-xs text-text-muted border-t border-border", children: [
5164
- /* @__PURE__ */ i("span", { className: "flex items-center gap-1.5", children: [
5200
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-4 px-3 pt-2 mt-2 text-xs text-text-muted border-t border-border", children: [
5201
+ /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
5165
5202
  /* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-5 px-1 py-0.5 rounded border border-border bg-surface-sunk text-xs font-medium not-italic", children: "↑↓" }),
5166
5203
  s?.navigate || "to navigate"
5167
5204
  ] }),
5168
- /* @__PURE__ */ i("span", { className: "flex items-center gap-1.5", children: [
5205
+ /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
5169
5206
  /* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-5 px-1 py-0.5 rounded border border-border bg-surface-sunk text-xs font-medium not-italic", children: "↵" }),
5170
5207
  s?.select || "to select"
5171
5208
  ] }),
5172
- /* @__PURE__ */ i("span", { className: "flex items-center gap-1.5", children: [
5209
+ /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
5173
5210
  /* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-5 px-1 py-0.5 rounded border border-border bg-surface-sunk text-xs font-medium not-italic", children: "Esc" }),
5174
5211
  s?.close || "to close"
5175
5212
  ] })
@@ -5177,7 +5214,7 @@ const Gn = ({
5177
5214
  ]
5178
5215
  }
5179
5216
  ) }) : null;
5180
- }, Gr = {
5217
+ }, Yr = {
5181
5218
  none: "p-0",
5182
5219
  xs: "p-1",
5183
5220
  sm: "p-2",
@@ -5185,7 +5222,7 @@ const Gn = ({
5185
5222
  lg: "p-6",
5186
5223
  xl: "p-8",
5187
5224
  "2xl": "p-12"
5188
- }, Jr = {
5225
+ }, Xr = {
5189
5226
  none: "m-0",
5190
5227
  xs: "m-1",
5191
5228
  sm: "m-2",
@@ -5193,7 +5230,7 @@ const Gn = ({
5193
5230
  lg: "m-6",
5194
5231
  xl: "m-8",
5195
5232
  "2xl": "m-12"
5196
- }, Yr = {
5233
+ }, Zr = {
5197
5234
  none: "",
5198
5235
  primary: "bg-accent text-accent-fg",
5199
5236
  secondary: "bg-surface-hover",
@@ -5209,26 +5246,26 @@ const Gn = ({
5209
5246
  backdrop: "bg-page",
5210
5247
  editor: "bg-surface",
5211
5248
  input: "bg-surface-input"
5212
- }, Xr = {
5249
+ }, Qr = {
5213
5250
  none: "rounded-none",
5214
5251
  sm: "rounded-sm",
5215
5252
  md: "rounded-md",
5216
5253
  lg: "rounded-lg",
5217
5254
  xl: "rounded-xl",
5218
5255
  full: "rounded-full"
5219
- }, Zr = {
5256
+ }, en = {
5220
5257
  none: "shadow-none",
5221
5258
  sm: "shadow-none",
5222
5259
  md: "shadow-overlay",
5223
5260
  lg: "shadow-overlay",
5224
5261
  xl: "shadow-modal",
5225
5262
  "2xl": "shadow-modal"
5226
- }, Qr = {
5263
+ }, tn = {
5227
5264
  none: "border-0",
5228
5265
  sm: "border",
5229
5266
  md: "border-2",
5230
5267
  lg: "border-4"
5231
- }, en = {
5268
+ }, rn = {
5232
5269
  primary: "border-accent-border",
5233
5270
  secondary: "border-border",
5234
5271
  accent: "border-accent-border",
@@ -5247,30 +5284,30 @@ const Gn = ({
5247
5284
  shadow: a,
5248
5285
  border: l,
5249
5286
  borderColor: o,
5250
- className: u,
5251
- children: m,
5287
+ className: m,
5288
+ children: u,
5252
5289
  ...y
5253
5290
  }, x) => /* @__PURE__ */ e(
5254
5291
  "div",
5255
5292
  {
5256
5293
  ref: x,
5257
5294
  className: d(
5258
- t && Gr[t],
5259
- r && Jr[r],
5260
- n && Yr[n],
5261
- s && Xr[s],
5262
- a && Zr[a],
5263
- l && Qr[l],
5264
- o && en[o],
5265
- u
5295
+ t && Yr[t],
5296
+ r && Xr[r],
5297
+ n && Zr[n],
5298
+ s && Qr[s],
5299
+ a && en[a],
5300
+ l && tn[l],
5301
+ o && rn[o],
5302
+ m
5266
5303
  ),
5267
5304
  ...y,
5268
- children: m
5305
+ children: u
5269
5306
  }
5270
5307
  )
5271
5308
  );
5272
5309
  Ze.displayName = "Box";
5273
- const Jn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5310
+ const Xn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ c(
5274
5311
  Ze,
5275
5312
  {
5276
5313
  background: "module",
@@ -5285,7 +5322,7 @@ const Jn = ({ children: t, title: r, ...n }) => /* @__PURE__ */ i(
5285
5322
  ]
5286
5323
  }
5287
5324
  );
5288
- function Yn({
5325
+ function Zn({
5289
5326
  identifier: t,
5290
5327
  resourceLoader: r,
5291
5328
  framework: n = "react",
@@ -5294,15 +5331,15 @@ function Yn({
5294
5331
  componentProps: l,
5295
5332
  className: o
5296
5333
  }) {
5297
- const u = se(null), [m, y] = O(!0), [x, h] = O(!1), [b, v] = O(null), k = se(null);
5334
+ const m = se(null), [u, y] = O(!0), [x, h] = O(!1), [b, v] = O(null), k = se(null);
5298
5335
  se(null);
5299
- const p = se(r);
5300
- return p.current = r, X(() => {
5336
+ const g = se(r);
5337
+ return g.current = r, X(() => {
5301
5338
  let f = !0;
5302
5339
  return (async () => {
5303
5340
  y(!0), h(!1), v(null);
5304
5341
  try {
5305
- const C = await p.current();
5342
+ const C = await g.current();
5306
5343
  if (!f) return;
5307
5344
  const q = C.component || C.default || C;
5308
5345
  v(n === "react" ? () => q : () => C);
@@ -5315,8 +5352,8 @@ function Yn({
5315
5352
  f = !1;
5316
5353
  };
5317
5354
  }, [t, n]), X(() => {
5318
- if (m || !b || n === "react") return;
5319
- const f = u.current;
5355
+ if (u || !b || n === "react") return;
5356
+ const f = m.current;
5320
5357
  if (f) {
5321
5358
  if (n === "svelte") {
5322
5359
  const $ = b.default || b, C = new $({ target: f, props: l || {} });
@@ -5329,15 +5366,15 @@ function Yn({
5329
5366
  };
5330
5367
  }
5331
5368
  }
5332
- }, [b, n, m]), X(() => {
5369
+ }, [b, n, u]), X(() => {
5333
5370
  n === "svelte" && k.current && k.current.$set?.(l);
5334
- }, [l, n]), /* @__PURE__ */ i("div", { ref: u, className: o, style: { display: "contents" }, children: [
5335
- m && s,
5336
- !m && x && a,
5371
+ }, [l, n]), /* @__PURE__ */ c("div", { ref: m, className: o, style: { display: "contents" }, children: [
5372
+ u && s,
5373
+ !u && x && a,
5337
5374
  n === "react" && !x && b && /* @__PURE__ */ e(b, { ...l })
5338
5375
  ] });
5339
5376
  }
5340
- class Xn extends wt {
5377
+ class Qn extends wt {
5341
5378
  constructor() {
5342
5379
  super(...arguments), this.state = {
5343
5380
  hasError: !1,
@@ -5351,7 +5388,7 @@ class Xn extends wt {
5351
5388
  console.error(`[ErrorBoundary] Error in ${this.props.name || "Component"}:`, r, n);
5352
5389
  }
5353
5390
  render() {
5354
- return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ i("div", { className: "p-4 m-4 border border-danger-border bg-danger-soft rounded-lg", children: [
5391
+ return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ c("div", { className: "p-4 m-4 border border-danger-border bg-danger-soft rounded-lg", children: [
5355
5392
  /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-danger-fg", children: "Something went wrong" }),
5356
5393
  /* @__PURE__ */ e("p", { className: "text-sm text-danger-fg mt-1", children: this.props.name ? `Error in ${this.props.name}` : "The component failed to render." }),
5357
5394
  /* @__PURE__ */ e(
@@ -5366,75 +5403,75 @@ class Xn extends wt {
5366
5403
  }
5367
5404
  }
5368
5405
  export {
5369
- Dn as AssistantCard,
5406
+ _n as AssistantCard,
5370
5407
  Ir as Avatar,
5371
- Tn as AvatarStack,
5372
- kn as Badge,
5408
+ An as AvatarStack,
5409
+ Sn as Badge,
5373
5410
  Ze as Box,
5374
5411
  ae as Button,
5375
- xn as ButtonGroup,
5376
- Jn as Card,
5377
- _n as ChannelBadge,
5412
+ gn as ButtonGroup,
5413
+ Xn as Card,
5414
+ Ln as ChannelBadge,
5378
5415
  ye as Checkbox,
5379
- Gn as CommandPalette,
5380
- wn as ConfirmDialog,
5416
+ Yn as CommandPalette,
5417
+ Cn as ConfirmDialog,
5381
5418
  rr as ContentLoading,
5382
5419
  Ae as DatePicker,
5383
5420
  nr as Dropdown,
5384
- Cn as EmptyState,
5385
- Xn as ErrorBoundary,
5386
- Yn as FederatedResource,
5421
+ En as EmptyState,
5422
+ Qn as ErrorBoundary,
5423
+ Zn as FederatedResource,
5387
5424
  Lt as FilterChip,
5388
5425
  Yt as FolderSelect,
5389
- Nn as Form,
5426
+ kn as Form,
5390
5427
  wr as FormSection,
5391
- Kn as Heading,
5428
+ Jn as Heading,
5392
5429
  Q as Icon,
5393
- An as Image,
5394
- Sn as Kbd,
5395
- jn as KpiCard,
5396
- bn as Link,
5397
- In as List,
5398
- Ln as ListBulkAction,
5399
- mn as MeetingGrid,
5400
- Pn as MessageBubble,
5430
+ Pn as Image,
5431
+ zn as Kbd,
5432
+ Fn as KpiCard,
5433
+ pn as Link,
5434
+ jn as List,
5435
+ In as ListBulkAction,
5436
+ hn as MeetingGrid,
5437
+ On as MessageBubble,
5401
5438
  Ye as Modal,
5402
- On as PageHeader,
5403
- pn as PageToolbar,
5439
+ Bn as PageHeader,
5440
+ vn as PageToolbar,
5404
5441
  Je as PageToolbarActions,
5405
- fn as ParticipantTile,
5442
+ xn as ParticipantTile,
5406
5443
  Ve as Popover,
5407
- En as ProgressBar,
5408
- Fn as RichText,
5444
+ Mn as ProgressBar,
5445
+ Rn as RichText,
5409
5446
  Ge as SearchField,
5410
5447
  er as SearchableTextField,
5411
- Bn as SectionCaption,
5412
- Rn as SectionDivider,
5448
+ Hn as SectionCaption,
5449
+ Vn as SectionDivider,
5413
5450
  Ft as SegmentedToggle,
5414
5451
  Ce as Select,
5415
- Hn as SettingsRow,
5416
- Vn as SettingsSection,
5417
- Wn as SidebarMenu,
5418
- qn as SourceChip,
5419
- zn as Spinner,
5452
+ qn as SettingsRow,
5453
+ Un as SettingsSection,
5454
+ Gn as SidebarMenu,
5455
+ Wn as SourceChip,
5456
+ $n as Spinner,
5420
5457
  qe as SplitButton,
5421
- Mn as StatusDot,
5422
- $n as StepIndicator,
5423
- gr as StorageInput,
5458
+ Dn as StatusDot,
5459
+ Tn as StepIndicator,
5460
+ pr as StorageInput,
5424
5461
  tr as Switch,
5425
- yn as TabBar,
5462
+ wn as TabBar,
5426
5463
  Fe as Table,
5427
5464
  dr as Tabs,
5428
5465
  me as Text,
5429
5466
  Le as TextArea,
5430
5467
  Ne as TextField,
5431
- hn as VideoSurface,
5432
- Un as View,
5433
- un as catTone,
5468
+ bn as VideoSurface,
5469
+ Kn as View,
5470
+ fn as catTone,
5434
5471
  d as cn,
5435
- dn as createSizes,
5436
- cn as createVariants,
5437
- gn as dateFilterHandler,
5438
- vn as selectFilterHandler
5472
+ mn as createSizes,
5473
+ un as createVariants,
5474
+ yn as dateFilterHandler,
5475
+ Nn as selectFilterHandler
5439
5476
  };
5440
5477
  //# sourceMappingURL=index.js.map