@pstdio/ui 0.20.1 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/{MermaidComponent-BVMyKttu.js → MermaidComponent-D92GMhht.js} +3 -3
  2. package/dist/{MermaidComponent-BVMyKttu.js.map → MermaidComponent-D92GMhht.js.map} +1 -1
  3. package/dist/chat-ui.d.ts +2 -0
  4. package/dist/chat-ui.js +3 -7
  5. package/dist/chat-ui.js.map +1 -1
  6. package/dist/components/data-table/build-columns.d.ts +2 -0
  7. package/dist/components/data-table/data-table-column-menu.d.ts +2 -0
  8. package/dist/components/data-table/data-table-row-display.d.ts +11 -0
  9. package/dist/components/data-table/data-table-table-parts.d.ts +1 -0
  10. package/dist/components/data-table/edit-mode-data-table-body.d.ts +1 -0
  11. package/dist/components/data-table/edit-mode-data-table-cell.d.ts +1 -0
  12. package/dist/components/data-table/edit-mode-data-table-header.d.ts +1 -0
  13. package/dist/components/data-table/types.d.ts +1 -0
  14. package/dist/components/diff-viewer/code-editor.d.ts +8 -2
  15. package/dist/components/diff-viewer/index.d.ts +1 -0
  16. package/dist/components/kanban-renderer/collection-badge.d.ts +7 -0
  17. package/dist/components/kanban-renderer/index.d.ts +1 -1
  18. package/dist/components/kanban-renderer/kanban-renderer-helpers.d.ts +2 -1
  19. package/dist/components/kanban-renderer/types.d.ts +20 -1
  20. package/dist/components/list-row/list-row-content.d.ts +1 -0
  21. package/dist/components/param-editor/param-editor-presentation.d.ts +1 -1
  22. package/dist/components/param-editor/param-editor.types.d.ts +5 -193
  23. package/dist/components/rich-text/shared/markdown-ast.d.ts +1 -0
  24. package/dist/components/rich-text/shared/markdown-source-document.d.ts +7 -0
  25. package/dist/components/rich-text/shared/markdown-source-links.d.ts +11 -0
  26. package/dist/components/rich-text/shared/markdown-source-map.d.ts +10 -0
  27. package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
  28. package/dist/components/tag-editor/tag-editor-row.d.ts +2 -1
  29. package/dist/components/tag-editor/tag-editor.types.d.ts +13 -0
  30. package/dist/components/tag-editor/tag-settings-panel.d.ts +1 -1
  31. package/dist/components/tree-list/tree-list-drag-provider.d.ts +13 -0
  32. package/dist/components/tree-list/tree-list-order.store.d.ts +4 -1
  33. package/dist/components/tree-list/tree-list-reorder.d.ts +14 -3
  34. package/dist/components/tree-list/tree-list-sortable.d.ts +2 -0
  35. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +2 -2
  36. package/dist/components/tree-list/tree-list.d.ts +3 -0
  37. package/dist/components/tree-list/tree-list.types.d.ts +4 -0
  38. package/dist/data-table.d.ts +2 -0
  39. package/dist/data-table.js +740 -704
  40. package/dist/data-table.js.map +1 -1
  41. package/dist/diff.d.ts +2 -0
  42. package/dist/diff.js +532 -533
  43. package/dist/diff.js.map +1 -1
  44. package/dist/edit-mode-data-table-DGgRuSW3.js +846 -0
  45. package/dist/edit-mode-data-table-DGgRuSW3.js.map +1 -0
  46. package/dist/index.d.ts +2 -0
  47. package/dist/index.js +1603 -1492
  48. package/dist/index.js.map +1 -1
  49. package/dist/{kanban-renderer-toolbar-CpegGbwq.js → kanban-renderer-toolbar-Bl8xXdwU.js} +527 -469
  50. package/dist/kanban-renderer-toolbar-Bl8xXdwU.js.map +1 -0
  51. package/dist/kanban-renderer.d.ts +2 -0
  52. package/dist/kanban-renderer.js +21 -21
  53. package/dist/kanban-renderer.js.map +1 -1
  54. package/dist/lazy-markdown-editor-CCOchoJX.js +235 -0
  55. package/dist/lazy-markdown-editor-CCOchoJX.js.map +1 -0
  56. package/dist/list-row-DCgdza1i.js +812 -0
  57. package/dist/list-row-DCgdza1i.js.map +1 -0
  58. package/dist/markdown-CASvn1Z2.js +1643 -0
  59. package/dist/markdown-CASvn1Z2.js.map +1 -0
  60. package/dist/markdown-editor-C4GCyebp.js +1019 -0
  61. package/dist/markdown-editor-C4GCyebp.js.map +1 -0
  62. package/dist/{mermaid-renderer-H3IhLqnQ.js → mermaid-renderer-CVnuKs-A.js} +2 -2
  63. package/dist/{mermaid-renderer-H3IhLqnQ.js.map → mermaid-renderer-CVnuKs-A.js.map} +1 -1
  64. package/dist/mermaid.d.ts +2 -0
  65. package/dist/mermaid.js +1 -1
  66. package/dist/monaco-browser-CgvlArN7.js +21 -0
  67. package/dist/monaco-browser-CgvlArN7.js.map +1 -0
  68. package/dist/{param-editor-B8Ff9Nm8.js → param-editor-CkDq623X.js} +2 -2
  69. package/dist/{param-editor-B8Ff9Nm8.js.map → param-editor-CkDq623X.js.map} +1 -1
  70. package/dist/param-editor-field-DRgbnL7-.js +2809 -0
  71. package/dist/param-editor-field-DRgbnL7-.js.map +1 -0
  72. package/dist/rich-message-DARuDVOX.js +628 -0
  73. package/dist/{rich-message-DdFYRzTo.js.map → rich-message-DARuDVOX.js.map} +1 -1
  74. package/dist/rich-text.d.ts +2 -0
  75. package/dist/rich-text.js +48 -47
  76. package/dist/rich-text.js.map +1 -1
  77. package/dist/style.css +1 -1
  78. package/dist/terminal.d.ts +2 -0
  79. package/dist/terminal.js +1 -1
  80. package/dist/terminal.js.map +1 -1
  81. package/dist/theme/primitives/sizes.d.ts +9 -0
  82. package/dist/{theme-BH4fSst9.js → theme-B-l5_a6F.js} +69 -50
  83. package/dist/theme-B-l5_a6F.js.map +1 -0
  84. package/dist/theme-preference-Bpobguh4.js +114 -0
  85. package/dist/theme-preference-Bpobguh4.js.map +1 -0
  86. package/dist/theme.d.ts +2 -0
  87. package/dist/theme.js +1 -1
  88. package/dist/tree-list-AlO5ZmxQ.js +1262 -0
  89. package/dist/tree-list-AlO5ZmxQ.js.map +1 -0
  90. package/dist/utils/theme-preference.d.ts +4 -1
  91. package/dist/workspace-badge-BR_GgsAG.js +175 -0
  92. package/dist/workspace-badge-BR_GgsAG.js.map +1 -0
  93. package/package.json +5 -42
  94. package/dist/dialog-accept-shortcut-DAEBsoWW.js +0 -7
  95. package/dist/dialog-accept-shortcut-DAEBsoWW.js.map +0 -1
  96. package/dist/edit-mode-data-table-D6NeiDJx.js +0 -775
  97. package/dist/edit-mode-data-table-D6NeiDJx.js.map +0 -1
  98. package/dist/editor-config-D9OksZ93.js +0 -2416
  99. package/dist/editor-config-D9OksZ93.js.map +0 -1
  100. package/dist/kanban-renderer-toolbar-CpegGbwq.js.map +0 -1
  101. package/dist/lazy-markdown-editor-B7uP2ALS.js +0 -26
  102. package/dist/lazy-markdown-editor-B7uP2ALS.js.map +0 -1
  103. package/dist/list-row-9oxy-F0v.js +0 -796
  104. package/dist/list-row-9oxy-F0v.js.map +0 -1
  105. package/dist/monaco-browser-CO0NxK_Z.js +0 -19
  106. package/dist/monaco-browser-CO0NxK_Z.js.map +0 -1
  107. package/dist/number-input-WUfejtNx.js +0 -343
  108. package/dist/number-input-WUfejtNx.js.map +0 -1
  109. package/dist/param-editor-field-Cu4pto_a.js +0 -2845
  110. package/dist/param-editor-field-Cu4pto_a.js.map +0 -1
  111. package/dist/rich-message-DdFYRzTo.js +0 -658
  112. package/dist/theme-BH4fSst9.js.map +0 -1
  113. package/dist/theme-preference-DyymrYpR.js +0 -123
  114. package/dist/theme-preference-DyymrYpR.js.map +0 -1
  115. package/dist/tree-list-uV4UFj0x.js +0 -1116
  116. package/dist/tree-list-uV4UFj0x.js.map +0 -1
@@ -1,116 +1,115 @@
1
- import { jsx as s, jsxs as k, Fragment as it } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as _, Fragment as ct } from "react/jsx-runtime";
2
2
  import { c as z } from "react/compiler-runtime";
3
- import { Text as O, Popover as Q, HStack as Ne, Portal as de, Image as st, Button as at, chakra as se, Icon as Y, Menu as X, IconButton as Se, Stack as ke, Box as le, Table as L, Flex as ee, Skeleton as je } from "@chakra-ui/react";
4
- import { flexRender as ge, useReactTable as ct, getPaginationRowModel as dt, getCoreRowModel as ut, getSortedRowModel as mt } from "@tanstack/react-table";
5
- import { isValidElement as Ee, cloneElement as ft, useRef as Ae, useState as Z, useEffect as Be, Fragment as ht } from "react";
6
- import { S as xe, T as We } from "./browser-storage-DPtOQJx0.js";
7
- import { u as gt } from "./kanban-renderer-toolbar-CpegGbwq.js";
8
- import { Braces as bt, ChevronRight as pt, CircleHelp as St, Minus as xt, Check as we, ChevronDown as wt, Settings2 as yt, GripVertical as Ct, ArrowUpAZ as Fe, ArrowDownAZ as Ke, MoreVertical as vt } from "lucide-react";
9
- import { C as ye } from "./number-input-WUfejtNx.js";
10
- import { L as ae, S as Rt, R as It } from "./list-row-9oxy-F0v.js";
11
- import { c as re, g as $t, i as Je, f as kt, E as At, r as zt, a as ze, s as _t, b as Tt, d as Dt, e as Vt, h as Mt, j as Pt, k as Ht, l as Lt, m as Ot, D as Nt, n as jt, S as Et, P as Bt } from "./edit-mode-data-table-D6NeiDJx.js";
12
- import { P as Wt } from "./param-editor-B8Ff9Nm8.js";
13
- import { useSensors as Ft, useSensor as Kt, PointerSensor as Jt, DndContext as Xt, closestCenter as qt } from "@dnd-kit/core";
14
- import { SortableContext as Gt, verticalListSortingStrategy as Ut, useSortable as Yt } from "@dnd-kit/sortable";
15
- import { CSS as Zt } from "@dnd-kit/utilities";
16
- import { b as Qt } from "./param-editor-field-Cu4pto_a.js";
17
- import { useChart as eo, Chart as _e } from "@chakra-ui/charts";
18
- import { XAxis as to, YAxis as oo, Bar as lo, Tooltip as no, BarChart as ro, useActiveTooltipCoordinate as io, usePlotArea as so } from "recharts";
19
- const Xe = (o, e) => e.find((t) => Object.is(t.value, o))?.color ?? null, ao = (o) => {
3
+ import { Text as O, Popover as te, HStack as Ee, Portal as ue, Image as dt, Button as ut, chakra as ae, Icon as ee, Menu as G, IconButton as we, Stack as ze, Box as re, Table as L, Flex as oe, Skeleton as Be } from "@chakra-ui/react";
4
+ import { flexRender as be, useReactTable as mt, getPaginationRowModel as ft, getCoreRowModel as ht, getSortedRowModel as gt } from "@tanstack/react-table";
5
+ import { isValidElement as Fe, cloneElement as bt, useRef as Te, useState as Q, useEffect as Ke, Fragment as pt } from "react";
6
+ import { S as xe, T as Je } from "./browser-storage-DPtOQJx0.js";
7
+ import { u as St } from "./kanban-renderer-toolbar-Bl8xXdwU.js";
8
+ import { Braces as wt, ChevronRight as xt, CircleHelp as yt, Minus as Ct, Check as ye, ChevronDown as vt, Settings2 as Rt, GripVertical as It, ArrowUpAZ as Xe, ArrowDownAZ as qe, MoreVertical as At } from "lucide-react";
9
+ import { C as Ce, S as $t } from "./lazy-markdown-editor-CCOchoJX.js";
10
+ import { L as ce, S as _t, R as kt } from "./list-row-DCgdza1i.js";
11
+ import { c as ie, g as zt, i as Ge, f as Tt, D as Dt, E as Vt, r as Mt, a as De, s as Pt, b as Ht, d as Lt, e as Ot, h as Wt, j as Nt, k as jt, l as Et, m as Bt, n as Ft, o as Kt, S as Jt, P as Xt } from "./edit-mode-data-table-DGgRuSW3.js";
12
+ import { P as qt } from "./param-editor-CkDq623X.js";
13
+ import { useSensors as Gt, useSensor as Ut, PointerSensor as Yt, DndContext as Zt, closestCenter as Qt } from "@dnd-kit/core";
14
+ import { SortableContext as eo, verticalListSortingStrategy as to, useSortable as oo } from "@dnd-kit/sortable";
15
+ import { CSS as lo } from "@dnd-kit/utilities";
16
+ import { useChart as no, Chart as Ve } from "@chakra-ui/charts";
17
+ import { XAxis as ro, YAxis as io, Bar as so, Tooltip as ao, BarChart as co, useActiveTooltipCoordinate as uo, usePlotArea as mo } from "recharts";
18
+ const Ue = (o, e) => e.find((t) => Object.is(t.value, o))?.color ?? null, fo = (o) => {
20
19
  const {
21
20
  children: e
22
21
  } = o;
23
22
  return e;
24
- }, co = "#111827", uo = "#ffffff", mo = "#000000", fo = 4.5, ho = (o) => o.split("").map((e) => e + e).join(""), oe = (o) => {
25
- const e = o.trim(), t = e.startsWith("#") ? e.slice(1) : e, l = t.length === 3 ? ho(t) : t;
23
+ }, ho = "#111827", go = "#ffffff", bo = "#000000", po = 4.5, So = (o) => o.split("").map((e) => e + e).join(""), ne = (o) => {
24
+ const e = o.trim(), t = e.startsWith("#") ? e.slice(1) : e, l = t.length === 3 ? So(t) : t;
26
25
  return /^[\da-f]{6}$/i.test(l) ? {
27
26
  r: Number.parseInt(l.slice(0, 2), 16),
28
27
  g: Number.parseInt(l.slice(2, 4), 16),
29
28
  b: Number.parseInt(l.slice(4, 6), 16)
30
29
  } : null;
31
- }, fe = (o) => {
30
+ }, he = (o) => {
32
31
  const e = o / 255;
33
32
  return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
34
- }, Te = (o) => 0.2126 * fe(o.r) + 0.7152 * fe(o.g) + 0.0722 * fe(o.b), go = (o, e) => {
35
- const t = Te(o), l = Te(e), n = Math.max(t, l), r = Math.min(t, l);
36
- return (n + 0.05) / (r + 0.05);
37
- }, be = (o) => {
33
+ }, Me = (o) => 0.2126 * he(o.r) + 0.7152 * he(o.g) + 0.0722 * he(o.b), wo = (o, e) => {
34
+ const t = Me(o), l = Me(e), n = Math.max(t, l), i = Math.min(t, l);
35
+ return (n + 0.05) / (i + 0.05);
36
+ }, pe = (o) => {
38
37
  const e = (t) => Math.round(t).toString(16).padStart(2, "0");
39
38
  return `#${e(o.r)}${e(o.g)}${e(o.b)}`;
40
- }, qe = (o, e, t) => ({
39
+ }, Ye = (o, e, t) => ({
41
40
  r: o.r * (1 - t) + e.r * t,
42
41
  g: o.g * (1 - t) + e.g * t,
43
42
  b: o.b * (1 - t) + e.b * t
44
- }), De = (o, e) => {
43
+ }), Pe = (o, e) => {
45
44
  for (let t = 1; t <= 50; t += 1) {
46
- const l = qe(o, e, t / 50);
47
- if (go(l, o) >= fo)
45
+ const l = Ye(o, e, t / 50);
46
+ if (wo(l, o) >= po)
48
47
  return {
49
- color: be(l),
48
+ color: pe(l),
50
49
  step: t
51
50
  };
52
51
  }
53
52
  return {
54
- color: be(e),
53
+ color: pe(e),
55
54
  step: 50
56
55
  };
57
- }, Ve = (o) => {
58
- const e = oe(o);
59
- if (!e) return co;
60
- const t = oe(mo), l = oe(uo), n = De(e, t), r = De(e, l);
61
- return n.step <= r.step ? n.color : r.color;
62
- }, bo = (o, e, t) => {
63
- const l = oe(o), n = oe(e);
64
- return !l || !n ? null : be(qe(l, n, 1 - t));
65
- }, Me = (o) => {
66
- const e = o.foreground?.light ?? Ve(o.light), t = o.foreground?.dark ?? Ve(o.dark);
56
+ }, He = (o) => {
57
+ const e = ne(o);
58
+ if (!e) return ho;
59
+ const t = ne(bo), l = ne(go), n = Pe(e, t), i = Pe(e, l);
60
+ return n.step <= i.step ? n.color : i.color;
61
+ }, xo = (o, e, t) => {
62
+ const l = ne(o), n = ne(e);
63
+ return !l || !n ? null : pe(Ye(l, n, 1 - t));
64
+ }, Le = (o) => {
65
+ const e = o.foreground?.light ?? He(o.light), t = o.foreground?.dark ?? He(o.dark);
67
66
  return {
68
67
  backgroundColor: `light-dark(${o.light}, ${o.dark})`,
69
68
  color: `light-dark(${e}, ${t})`
70
69
  };
71
- }, po = (o) => Math.round(o * 100) / 100, ie = (o, e, t) => {
72
- const l = bo(o, e, t);
73
- return l || `color-mix(in srgb, ${o} ${po(t * 100)}%, ${e})`;
74
- }, So = (o, e, t) => {
70
+ }, yo = (o) => Math.round(o * 100) / 100, se = (o, e, t) => {
71
+ const l = xo(o, e, t);
72
+ return l || `color-mix(in srgb, ${o} ${yo(t * 100)}%, ${e})`;
73
+ }, Co = (o, e, t) => {
75
74
  const l = o.foreground && e.foreground ? {
76
- light: ie(o.foreground.light, e.foreground.light, t),
77
- dark: ie(o.foreground.dark, e.foreground.dark, t)
75
+ light: se(o.foreground.light, e.foreground.light, t),
76
+ dark: se(o.foreground.dark, e.foreground.dark, t)
78
77
  } : void 0;
79
78
  return {
80
- light: ie(o.light, e.light, t),
81
- dark: ie(o.dark, e.dark, t),
79
+ light: se(o.light, e.light, t),
80
+ dark: se(o.dark, e.dark, t),
82
81
  ...l ? {
83
82
  foreground: l
84
83
  } : {}
85
84
  };
86
- }, Ge = (o, e) => {
85
+ }, Ze = (o, e) => {
87
86
  if (typeof o != "number" || !Number.isFinite(o) || e.length < 2) return null;
88
87
  const t = e[0], l = e[e.length - 1];
89
88
  if (l.value - t.value <= 0) return null;
90
89
  if (o <= t.value) return t.color;
91
90
  if (o >= l.value) return l.color;
92
- const r = e.findIndex((m) => o <= m.value), c = e[r - 1], a = e[r], d = 1 - (o - c.value) / (a.value - c.value);
93
- return So(c.color, a.color, d);
94
- }, xo = (o) => {
91
+ const i = e.findIndex((u) => o <= u.value), c = e[i - 1], s = e[i], d = 1 - (o - c.value) / (s.value - c.value);
92
+ return Co(c.color, s.color, d);
93
+ }, vo = (o) => {
95
94
  const e = z(2), {
96
95
  value: t
97
96
  } = o;
98
97
  let l;
99
- return e[0] !== t ? (l = /* @__PURE__ */ s(O, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = l) : l = e[1], l;
100
- }, wo = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, yo = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Co = (o) => {
98
+ return e[0] !== t ? (l = /* @__PURE__ */ a(O, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = l) : l = e[1], l;
99
+ }, Ro = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Io = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Ao = (o) => {
101
100
  const e = o.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
102
101
  return e ? `${e[0]?.toUpperCase()}${e.slice(1)}` : "Details";
103
- }, he = (o) => o.map((e) => /^\d+$/.test(e) ? e : Co(e)).join(" / "), vo = (o) => o.every((e) => e === null || typeof e != "object"), pe = (o, e, t) => {
102
+ }, ge = (o) => o.map((e) => /^\d+$/.test(e) ? e : Ao(e)).join(" / "), $o = (o) => o.every((e) => e === null || typeof e != "object"), Se = (o, e, t) => {
104
103
  if (Array.isArray(o)) {
105
- if (o.length === 0 || vo(o)) {
104
+ if (o.length === 0 || $o(o)) {
106
105
  t.push({
107
- label: he(e),
106
+ label: ge(e),
108
107
  value: o
109
108
  });
110
109
  return;
111
110
  }
112
111
  o.forEach((l, n) => {
113
- pe(l, [...e, String(n + 1)], t);
112
+ Se(l, [...e, String(n + 1)], t);
114
113
  });
115
114
  return;
116
115
  }
@@ -118,1046 +117,1083 @@ const Xe = (o, e) => e.find((t) => Object.is(t.value, o))?.color ?? null, ao = (
118
117
  const l = Object.entries(o);
119
118
  if (l.length === 0) {
120
119
  t.push({
121
- label: he(e),
120
+ label: ge(e),
122
121
  value: null
123
122
  });
124
123
  return;
125
124
  }
126
- l.forEach(([n, r]) => {
127
- pe(r, [...e, n], t);
125
+ l.forEach(([n, i]) => {
126
+ Se(i, [...e, n], t);
128
127
  });
129
128
  return;
130
129
  }
131
130
  t.push({
132
- label: he(e),
131
+ label: ge(e),
133
132
  value: o
134
133
  });
135
- }, Ue = (o) => {
134
+ }, Qe = (o) => {
136
135
  if (typeof o != "string") return o;
137
136
  try {
138
137
  return JSON.parse(o);
139
138
  } catch {
140
139
  return o;
141
140
  }
142
- }, Ce = (o) => {
141
+ }, ve = (o) => {
143
142
  const e = [];
144
- return pe(Ue(o), [], e), e.map((t) => ({
143
+ return Se(Qe(o), [], e), e.map((t) => ({
145
144
  ...t,
146
145
  label: t.label || "Value"
147
146
  }));
148
- }, ue = (o, e) => {
147
+ }, me = (o, e) => {
149
148
  if (typeof o != "string") return !1;
150
149
  if (o.startsWith("data:image/")) return !0;
151
150
  try {
152
151
  const t = new URL(o);
153
- return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : wo.test(t.pathname) || yo.test(e);
152
+ return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : Ro.test(t.pathname) || Io.test(e);
154
153
  } catch {
155
154
  return !1;
156
155
  }
157
- }, ve = (o, e) => Array.isArray(o) && o.length > 0 && o.every((t) => ue(t, e)), Pe = (o) => o == null || o === "" ? "Not provided" : typeof o == "boolean" ? o ? "Yes" : "No" : String(o), Ro = (o) => Array.isArray(o) ? o.length === 0 ? "None" : o.map(Pe).join(", ") : Pe(o), Io = (o) => {
158
- const e = Ue(o);
156
+ }, Re = (o, e) => Array.isArray(o) && o.length > 0 && o.every((t) => me(t, e)), Oe = (o) => o == null || o === "" ? "Not provided" : typeof o == "boolean" ? o ? "Yes" : "No" : String(o), _o = (o) => Array.isArray(o) ? o.length === 0 ? "None" : o.map(Oe).join(", ") : Oe(o), ko = (o) => {
157
+ const e = Qe(o);
159
158
  if (Array.isArray(e) && e.length === 0 || e !== null && typeof e == "object" && Object.keys(e).length === 0)
160
159
  return "No details";
161
- const t = Ce(o).filter((r) => !ue(r.value, r.label) && !ve(r.value, r.label));
160
+ const t = ve(o).filter((i) => !me(i.value, i.label) && !Re(i.value, i.label));
162
161
  if (t.length === 0) return "No details";
163
- const l = t.slice(0, 2).map((r) => Ro(r.value)), n = t.length - l.length;
162
+ const l = t.slice(0, 2).map((i) => _o(i.value)), n = t.length - l.length;
164
163
  return [...l, n > 0 ? `${n} more` : null].filter(Boolean).join(" · ");
165
- }, $o = (o) => {
164
+ }, zo = (o) => {
166
165
  const {
167
166
  label: e,
168
167
  value: t
169
168
  } = o;
170
- return ue(t, e) ? {
169
+ return me(t, e) ? {
171
170
  type: "image",
172
171
  src: String(t),
173
172
  alt: `${e} preview`
174
- } : Array.isArray(t) && ve(t, e) ? {
173
+ } : Array.isArray(t) && Re(t, e) ? {
175
174
  type: "image-gallery",
176
175
  images: t.map((l, n) => ({
177
176
  src: String(l),
178
177
  alt: `${e} ${n + 1} preview`
179
178
  }))
180
179
  } : Array.isArray(t) ? t : t === void 0 ? null : t;
181
- }, ko = (o) => Ce(o).map((e, t) => ({
180
+ }, To = (o) => ve(o).map((e, t) => ({
182
181
  id: `friendly-json-${t}`,
183
182
  name: e.label,
184
183
  type: "readOnly",
185
- value: $o(e)
186
- })), Ao = (o) => {
184
+ value: zo(e)
185
+ })), Do = (o) => {
187
186
  const e = z(4), {
188
187
  value: t
189
188
  } = o;
190
189
  let l;
191
- e[0] !== t ? (l = ko(t), e[0] = t, e[1] = l) : l = e[1];
190
+ e[0] !== t ? (l = To(t), e[0] = t, e[1] = l) : l = e[1];
192
191
  let n;
193
- return e[2] !== l ? (n = /* @__PURE__ */ s(Wt, { params: l, readOnly: !0, fullWidth: !0 }), e[2] = l, e[3] = n) : n = e[3], n;
194
- }, zo = (o) => o.stopPropagation(), _o = (o) => {
192
+ return e[2] !== l ? (n = /* @__PURE__ */ a(qt, { params: l, readOnly: !0, fullWidth: !0 }), e[2] = l, e[3] = n) : n = e[3], n;
193
+ }, Vo = (o) => o.stopPropagation(), Mo = (o) => {
195
194
  const e = z(49), {
196
195
  columnLabel: t,
197
196
  value: l
198
197
  } = o;
199
- let n, r, c, a, i, d, m, u, f, g, b, h, v, x, p, y;
198
+ let n, i, c, s, r, d, u, m, f, h, S, b, x, g, v, w;
200
199
  if (e[0] !== t || e[1] !== l) {
201
- const M = Ce(l).flatMap(To).slice(0, 2);
202
- let P;
203
- e[18] !== l ? (P = Io(l), e[18] = l, e[19] = P) : P = e[19], a = P, c = Q.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
200
+ const M = ve(l).flatMap(Po).slice(0, 2);
201
+ let D;
202
+ e[18] !== l ? (D = ko(l), e[18] = l, e[19] = D) : D = e[19], s = D, c = te.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
204
203
  placement: "bottom-start",
205
204
  offset: {
206
205
  mainAxis: 6
207
206
  }
208
- }, e[20] = u) : u = e[20], r = Q.Trigger, m = !0, n = at, i = `View ${t} details`, d = "ghost", f = "xs", g = "full", b = "0", h = "28px", v = "2xs", x = "flex-start", p = zo, y = M.length > 0 ? /* @__PURE__ */ s(Ne, { gap: "-1", flexShrink: "0", children: M.map(Do) }) : /* @__PURE__ */ s(bt, { size: 14 }), e[0] = t, e[1] = l, e[2] = n, e[3] = r, e[4] = c, e[5] = a, e[6] = i, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g, e[12] = b, e[13] = h, e[14] = v, e[15] = x, e[16] = p, e[17] = y;
207
+ }, e[20] = m) : m = e[20], i = te.Trigger, u = !0, n = ut, r = `View ${t} details`, d = "ghost", f = "xs", h = "full", S = "0", b = "28px", x = "2xs", g = "flex-start", v = Vo, w = M.length > 0 ? /* @__PURE__ */ a(Ee, { gap: "-1", flexShrink: "0", children: M.map(Ho) }) : /* @__PURE__ */ a(wt, { size: 14 }), e[0] = t, e[1] = l, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v, e[17] = w;
209
208
  } else
210
- n = e[2], r = e[3], c = e[4], a = e[5], i = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11], b = e[12], h = e[13], v = e[14], x = e[15], p = e[16], y = e[17];
209
+ n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16], w = e[17];
210
+ let p;
211
+ e[21] !== s ? (p = /* @__PURE__ */ a(O, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: s }), e[21] = s, e[22] = p) : p = e[22];
212
+ let R;
213
+ e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ a(xt, { size: 12 }), e[23] = R) : R = e[23];
211
214
  let C;
212
- e[21] !== a ? (C = /* @__PURE__ */ s(O, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: a }), e[21] = a, e[22] = C) : C = e[22];
213
- let S;
214
- e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ s(pt, { size: 12 }), e[23] = S) : S = e[23];
215
- let w;
216
- e[24] !== n || e[25] !== i || e[26] !== d || e[27] !== C || e[28] !== f || e[29] !== g || e[30] !== b || e[31] !== h || e[32] !== v || e[33] !== x || e[34] !== p || e[35] !== y ? (w = /* @__PURE__ */ k(n, { "aria-label": i, variant: d, size: f, width: g, minWidth: b, height: h, paddingX: v, justifyContent: x, onClick: p, children: [
217
- y,
218
- C,
219
- S
220
- ] }), e[24] = n, e[25] = i, e[26] = d, e[27] = C, e[28] = f, e[29] = g, e[30] = b, e[31] = h, e[32] = v, e[33] = x, e[34] = p, e[35] = y, e[36] = w) : w = e[36];
221
- let I;
222
- e[37] !== r || e[38] !== m || e[39] !== w ? (I = /* @__PURE__ */ s(r, { asChild: m, children: w }), e[37] = r, e[38] = m, e[39] = w, e[40] = I) : I = e[40];
223
- let $;
224
- e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
225
- overscrollBehavior: "contain"
226
- }, e[41] = $) : $ = e[41];
215
+ e[24] !== n || e[25] !== r || e[26] !== d || e[27] !== p || e[28] !== f || e[29] !== h || e[30] !== S || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v || e[35] !== w ? (C = /* @__PURE__ */ _(n, { "aria-label": r, variant: d, size: f, width: h, minWidth: S, height: b, paddingX: x, justifyContent: g, onClick: v, children: [
216
+ w,
217
+ p,
218
+ R
219
+ ] }), e[24] = n, e[25] = r, e[26] = d, e[27] = p, e[28] = f, e[29] = h, e[30] = S, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = w, e[36] = C) : C = e[36];
220
+ let y;
221
+ e[37] !== i || e[38] !== u || e[39] !== C ? (y = /* @__PURE__ */ a(i, { asChild: u, children: C }), e[37] = i, e[38] = u, e[39] = C, e[40] = y) : y = e[40];
227
222
  let A;
228
- e[42] !== l ? (A = /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s(Q.Positioner, { children: /* @__PURE__ */ s(Q.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ s(xe, { maxH: "360px", viewportProps: $, children: /* @__PURE__ */ s(Ao, { value: l }) }) }) }) }), e[42] = l, e[43] = A) : A = e[43];
223
+ e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
224
+ overscrollBehavior: "contain"
225
+ }, e[41] = A) : A = e[41];
226
+ let $;
227
+ e[42] !== l ? ($ = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ a(xe, { maxH: "360px", viewportProps: A, children: /* @__PURE__ */ a(Do, { value: l }) }) }) }) }), e[42] = l, e[43] = $) : $ = e[43];
229
228
  let T;
230
- return e[44] !== c || e[45] !== u || e[46] !== I || e[47] !== A ? (T = /* @__PURE__ */ k(c, { positioning: u, children: [
231
- I,
232
- A
233
- ] }), e[44] = c, e[45] = u, e[46] = I, e[47] = A, e[48] = T) : T = e[48], T;
229
+ return e[44] !== c || e[45] !== m || e[46] !== y || e[47] !== $ ? (T = /* @__PURE__ */ _(c, { positioning: m, children: [
230
+ y,
231
+ $
232
+ ] }), e[44] = c, e[45] = m, e[46] = y, e[47] = $, e[48] = T) : T = e[48], T;
234
233
  };
235
- function To(o) {
236
- return ue(o.value, o.label) ? [o] : !Array.isArray(o.value) || !ve(o.value, o.label) ? [] : o.value.map((e, t) => ({
234
+ function Po(o) {
235
+ return me(o.value, o.label) ? [o] : !Array.isArray(o.value) || !Re(o.value, o.label) ? [] : o.value.map((e, t) => ({
237
236
  label: `${o.label} ${t + 1}`,
238
237
  value: e
239
238
  }));
240
239
  }
241
- function Do(o) {
242
- return /* @__PURE__ */ s(st, { src: String(o.value), alt: `${o.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, o.label);
240
+ function Ho(o) {
241
+ return /* @__PURE__ */ a(dt, { src: String(o.value), alt: `${o.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, o.label);
243
242
  }
244
- const He = (o) => Je(o) ? o.sortValue : o, Vo = (o, e) => o === e ? 0 : o == null ? 1 : e == null ? -1 : typeof o == "number" && typeof e == "number" ? o - e : String(o).localeCompare(String(e)), Mo = (o) => Ee(o) ? ft(o, {
243
+ const We = (o) => Ge(o) ? o.sortValue : o, Lo = (o, e) => o === e ? 0 : o == null ? 1 : e == null ? -1 : typeof o == "number" && typeof e == "number" ? o - e : String(o).localeCompare(String(e)), Oo = (o) => Fe(o) ? bt(o, {
245
244
  style: {
246
245
  ...o.props.style,
247
246
  flexWrap: "nowrap",
248
247
  minWidth: 0,
249
248
  whiteSpace: "nowrap"
250
249
  }
251
- }) : o, ce = (o) => {
250
+ }) : o, de = (o) => {
252
251
  o.stopPropagation();
253
- }, Po = (o) => {
252
+ }, Wo = (o) => {
254
253
  const e = z(8), {
255
254
  table: t
256
- } = o, l = t.getIsAllRowsSelected(), n = !l && t.getIsSomeRowsSelected(), r = l ? !0 : n ? "indeterminate" : !1, c = n ? xt : we;
257
- let a;
258
- e[0] !== c ? (a = /* @__PURE__ */ s(Y, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = a) : a = e[1];
259
- let i;
260
- e[2] !== t ? (i = (m) => t.toggleAllRowsSelected(m.checked === !0), e[2] = t, e[3] = i) : i = e[3];
255
+ } = o, l = t.getIsAllRowsSelected(), n = !l && t.getIsSomeRowsSelected(), i = l ? !0 : n ? "indeterminate" : !1, c = n ? Ct : ye;
256
+ let s;
257
+ e[0] !== c ? (s = /* @__PURE__ */ a(ee, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = s) : s = e[1];
258
+ let r;
259
+ e[2] !== t ? (r = (u) => t.toggleAllRowsSelected(u.checked === !0), e[2] = t, e[3] = r) : r = e[3];
261
260
  let d;
262
- return e[4] !== r || e[5] !== a || e[6] !== i ? (d = /* @__PURE__ */ s(ye, { checked: r, "aria-label": "Select all", icon: a, onClick: ce, onCheckedChange: i }), e[4] = r, e[5] = a, e[6] = i, e[7] = d) : d = e[7], d;
263
- }, Ho = (o) => {
261
+ return e[4] !== i || e[5] !== s || e[6] !== r ? (d = /* @__PURE__ */ a(Ce, { checked: i, "aria-label": "Select all", icon: s, onClick: de, onCheckedChange: r }), e[4] = i, e[5] = s, e[6] = r, e[7] = d) : d = e[7], d;
262
+ }, No = (o) => {
264
263
  const e = z(6), {
265
264
  row: t,
266
265
  selectedRowIds: l
267
266
  } = o, n = !!l?.[t.id];
268
- let r;
269
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ s(Y, { as: we, boxSize: "12px", strokeWidth: "3" }), e[0] = r) : r = e[0];
267
+ let i;
268
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[0] = i) : i = e[0];
270
269
  let c;
271
- e[1] !== t ? (c = (i) => t.toggleSelected(i.checked === !0), e[1] = t, e[2] = c) : c = e[2];
272
- let a;
273
- return e[3] !== n || e[4] !== c ? (a = /* @__PURE__ */ s(ye, { checked: n, "aria-label": "Select row", icon: r, onClick: ce, onCheckedChange: c }), e[3] = n, e[4] = c, e[5] = a) : a = e[5], a;
274
- }, Lo = (o) => {
275
- const e = z(8), {
270
+ e[1] !== t ? (c = (r) => t.toggleSelected(r.checked === !0), e[1] = t, e[2] = c) : c = e[2];
271
+ let s;
272
+ return e[3] !== n || e[4] !== c ? (s = /* @__PURE__ */ a(Ce, { checked: n, "aria-label": "Select row", icon: i, onClick: de, onCheckedChange: c }), e[3] = n, e[4] = c, e[5] = s) : s = e[5], s;
273
+ }, jo = (o, e) => {
274
+ const t = new Set(e.map((l) => l.label));
275
+ return [...e, ...o.filter((l) => !t.has(l.label))];
276
+ }, Eo = (o) => {
277
+ const e = z(30), {
276
278
  row: t,
277
- actions: l
279
+ actions: l,
280
+ getActions: n
278
281
  } = o;
279
- let n;
280
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ s(X.Trigger, { asChild: !0, children: /* @__PURE__ */ s(Se, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: ce, children: /* @__PURE__ */ s(Y, { as: wt, boxSize: "14px" }) }) }), e[0] = n) : n = e[0];
281
- let r;
282
- if (e[1] !== l || e[2] !== t) {
283
- let a;
284
- e[4] !== t ? (a = (i) => /* @__PURE__ */ s(X.Item, { value: i.label, asChild: !0, children: /* @__PURE__ */ s(ae, { asChild: !0, variant: "full-width", tone: i.destructive ? "danger" : "default", label: i.label, icon: i.icon, onClick: ce, onActivate: () => i.onSelect(t.original) }) }, i.label), e[4] = t, e[5] = a) : a = e[5], r = l.map(a), e[1] = l, e[2] = t, e[3] = r;
282
+ let i, c, s, r, d, u, m, f, h;
283
+ if (e[0] !== l || e[1] !== n || e[2] !== t) {
284
+ h = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
285
+ e: {
286
+ const v = jo(l, n?.(t.original) ?? []);
287
+ if (v.length === 0) {
288
+ h = null;
289
+ break e;
290
+ }
291
+ r = G.Root, e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: de, children: /* @__PURE__ */ a(ee, { as: vt, boxSize: "14px" }) }) }), e[12] = f) : f = e[12], s = ue, c = G.Positioner, i = G.Content, d = "popover", u = "bg";
292
+ let w;
293
+ e[13] !== t ? (w = (p) => /* @__PURE__ */ a(G.Item, { value: p.label, asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", tone: p.destructive ? "danger" : "default", label: p.label, icon: p.icon, onClick: de, onActivate: () => p.onSelect(t.original) }) }, p.label), e[13] = t, e[14] = w) : w = e[14], m = v.map(w);
294
+ }
295
+ e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h;
285
296
  } else
286
- r = e[3];
287
- let c;
288
- return e[6] !== r ? (c = /* @__PURE__ */ k(X.Root, { children: [
289
- n,
290
- /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s(X.Positioner, { children: /* @__PURE__ */ s(X.Content, { zIndex: "popover", bg: "bg", children: r }) }) })
291
- ] }), e[6] = r, e[7] = c) : c = e[7], c;
292
- }, Le = (o) => {
293
- const e = z(5), {
294
- value: t
297
+ i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11];
298
+ if (h !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
299
+ return h;
300
+ let S;
301
+ e[15] !== i || e[16] !== d || e[17] !== u || e[18] !== m ? (S = /* @__PURE__ */ a(i, { zIndex: d, bg: u, children: m }), e[15] = i, e[16] = d, e[17] = u, e[18] = m, e[19] = S) : S = e[19];
302
+ let b;
303
+ e[20] !== c || e[21] !== S ? (b = /* @__PURE__ */ a(c, { children: S }), e[20] = c, e[21] = S, e[22] = b) : b = e[22];
304
+ let x;
305
+ e[23] !== s || e[24] !== b ? (x = /* @__PURE__ */ a(s, { children: b }), e[23] = s, e[24] = b, e[25] = x) : x = e[25];
306
+ let g;
307
+ return e[26] !== r || e[27] !== f || e[28] !== x ? (g = /* @__PURE__ */ _(r, { children: [
308
+ f,
309
+ x
310
+ ] }), e[26] = r, e[27] = f, e[28] = x, e[29] = g) : g = e[29], g;
311
+ }, Ne = (o) => {
312
+ const e = z(15), {
313
+ value: t,
314
+ wrapRows: l
295
315
  } = o;
296
- let l, n;
297
- if (e[0] !== t) {
298
- n = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
316
+ let n, i;
317
+ if (e[0] !== t || e[1] !== l) {
318
+ i = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
299
319
  e:
300
- if (l = kt(t), Ee(l)) {
301
- n = /* @__PURE__ */ s(se.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: "hidden", whiteSpace: "nowrap", children: Mo(l) });
320
+ if (n = Tt(t), Fe(n)) {
321
+ const m = l ? "visible" : "hidden", f = l ? "anywhere" : void 0, h = l ? "normal" : "nowrap", S = l ? n : Oo(n);
322
+ let b;
323
+ e[4] !== m || e[5] !== f || e[6] !== h || e[7] !== S ? (b = /* @__PURE__ */ a(ae.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: m, overflowWrap: f, whiteSpace: h, children: S }), e[4] = m, e[5] = f, e[6] = h, e[7] = S, e[8] = b) : b = e[8], i = b;
302
324
  break e;
303
325
  }
304
- e[0] = t, e[1] = l, e[2] = n;
326
+ e[0] = t, e[1] = l, e[2] = n, e[3] = i;
305
327
  } else
306
- l = e[1], n = e[2];
307
- if (n !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
308
- return n;
309
- let r;
310
- return e[3] !== l ? (r = /* @__PURE__ */ s(O, { maxWidth: "full", overflow: "hidden", textOverflow: "ellipsis", textStyle: "paragraph/S/regular", whiteSpace: "nowrap", children: l }), e[3] = l, e[4] = r) : r = e[4], r;
311
- }, Oo = (o) => {
312
- const e = z(9), {
328
+ n = e[2], i = e[3];
329
+ if (i !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
330
+ return i;
331
+ const c = l ? "visible" : "hidden", s = l ? "anywhere" : void 0, r = l ? void 0 : "ellipsis", d = l ? "normal" : "nowrap";
332
+ let u;
333
+ return e[9] !== n || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (u = /* @__PURE__ */ a(O, { maxWidth: "full", overflow: c, overflowWrap: s, textOverflow: r, textStyle: "paragraph/S/regular", whiteSpace: d, children: n }), e[9] = n, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = u) : u = e[14], u;
334
+ }, Bo = (o) => {
335
+ const e = z(11), {
313
336
  columnLabel: t,
314
337
  renderer: l,
315
- value: n
338
+ value: n,
339
+ wrapRows: i
316
340
  } = o;
317
341
  if (l?.type === "json") {
318
- let c;
319
- return e[0] !== t || e[1] !== n ? (c = /* @__PURE__ */ s(_o, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = c) : c = e[2], c;
342
+ let s;
343
+ return e[0] !== t || e[1] !== n ? (s = /* @__PURE__ */ a(Mo, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = s) : s = e[2], s;
320
344
  }
321
- if (l?.type === "color-scale" && Ge(n, l.stops) && typeof n == "number") {
322
- let a;
323
- return e[3] !== n ? (a = /* @__PURE__ */ s(xo, { value: n }), e[3] = n, e[4] = a) : a = e[4], a;
345
+ if (l?.type === "color-scale" && Ze(n, l.stops) && typeof n == "number") {
346
+ let r;
347
+ return e[3] !== n ? (r = /* @__PURE__ */ a(vo, { value: n }), e[3] = n, e[4] = r) : r = e[4], r;
324
348
  }
325
- if (l?.type === "categorical-color" && Xe(n, l.categories)) {
326
- let a;
327
- return e[5] !== n ? (a = /* @__PURE__ */ s(ao, { children: /* @__PURE__ */ s(Le, { value: n }) }), e[5] = n, e[6] = a) : a = e[6], a;
349
+ if (l?.type === "categorical-color" && Ue(n, l.categories)) {
350
+ let r;
351
+ return e[5] !== n || e[6] !== i ? (r = /* @__PURE__ */ a(fo, { children: /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }) }), e[5] = n, e[6] = i, e[7] = r) : r = e[7], r;
328
352
  }
329
- let r;
330
- return e[7] !== n ? (r = /* @__PURE__ */ s(Le, { value: n }), e[7] = n, e[8] = r) : r = e[8], r;
331
- }, No = (o, e) => {
353
+ let c;
354
+ return e[8] !== n || e[9] !== i ? (c = /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }), e[8] = n, e[9] = i, e[10] = c) : c = e[10], c;
355
+ }, Fo = (o, e) => {
332
356
  if (e?.type === "color-scale") {
333
- const t = Ge(o, e.stops);
334
- if (t && typeof o == "number") return Me(t);
357
+ const t = Ze(o, e.stops);
358
+ if (t && typeof o == "number") return Le(t);
335
359
  }
336
360
  if (e?.type === "categorical-color") {
337
- const t = Xe(o, e.categories);
338
- if (t) return Me(t);
361
+ const t = Ue(o, e.categories);
362
+ if (t) return Le(t);
339
363
  }
340
364
  };
341
- function jo(o, e, t = {}) {
365
+ function Ko(o, e, t = {}) {
342
366
  const {
343
367
  columnIcons: l,
344
368
  columnDescriptions: n,
345
- compactHeaders: r,
369
+ compactHeaders: i,
346
370
  enableSelection: c = !1,
347
- rowActions: a = [],
348
- selectedRowIds: i,
349
- columnRenderers: d
350
- } = t, m = re.accessor((b, h) => h + 1, {
371
+ rowActions: s = [],
372
+ getRowActions: r,
373
+ selectedRowIds: d,
374
+ columnRenderers: u,
375
+ wrapRows: m = !1
376
+ } = t, f = ie.accessor((x, g) => g + 1, {
351
377
  header: "",
352
378
  id: "rowIndex",
353
379
  enableResizing: !1,
354
380
  size: 20,
355
- cell: (b) => /* @__PURE__ */ s(se.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: b.getValue() })
356
- }), u = re.display({
381
+ cell: (x) => /* @__PURE__ */ a(ae.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: x.getValue() })
382
+ }), h = ie.display({
357
383
  id: "rowSelection",
358
- header: Po,
359
- cell: (b) => /* @__PURE__ */ s(Ho, { ...b, selectedRowIds: i }),
384
+ header: Wo,
385
+ cell: (x) => /* @__PURE__ */ a(No, { ...x, selectedRowIds: d }),
360
386
  enableResizing: !1,
361
387
  enableSorting: !1,
362
388
  size: 36
363
- }), f = e.map((b) => {
364
- const h = b || "-", v = o.map((S) => S[h]), x = d?.[h], p = l?.[h], y = p === void 0 ? $t(v) : p, C = n?.[h];
365
- return re.accessor((S) => S[h], {
366
- id: h,
389
+ }), S = e.map((x) => {
390
+ const g = x || "-", v = o.map((y) => y[g]), w = u?.[g], p = l?.[g], R = p === void 0 ? zt(v) : p, C = n?.[g];
391
+ return ie.accessor((y) => y[g], {
392
+ id: g,
367
393
  header: () => {
368
- const S = r?.[h] ?? h;
369
- return /* @__PURE__ */ k(se.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
370
- y,
371
- /* @__PURE__ */ s(se.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: S }),
372
- C ? /* @__PURE__ */ s(We, { content: C, children: /* @__PURE__ */ s(Y, { as: St, "aria-label": `About ${S}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
394
+ const y = i?.[g] ?? g;
395
+ return /* @__PURE__ */ _(ae.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
396
+ R,
397
+ /* @__PURE__ */ a(ae.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: y }),
398
+ C ? /* @__PURE__ */ a(Je, { content: C, children: /* @__PURE__ */ a(ee, { as: yt, "aria-label": `About ${y}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
373
399
  ] });
374
400
  },
375
- cell: (S) => /* @__PURE__ */ s(Oo, { columnLabel: h, renderer: x, value: S.getValue() }),
401
+ cell: (y) => /* @__PURE__ */ a(Bo, { columnLabel: g, renderer: w, value: y.getValue(), wrapRows: m }),
376
402
  meta: {
377
- getCellStyle: (S) => No(S, x)
403
+ getCellStyle: (y) => Fo(y, w)
378
404
  },
379
- sortingFn: (S, w) => {
380
- const I = He(S.original[h]), $ = He(w.original[h]);
381
- return Vo(I, $);
405
+ sortingFn: (y, A) => {
406
+ const $ = We(y.original[g]), T = We(A.original[g]);
407
+ return Lo($, T);
382
408
  }
383
409
  });
384
- }), g = re.display({
410
+ }), b = ie.display({
385
411
  id: "rowActions",
386
412
  header: "",
387
- cell: (b) => /* @__PURE__ */ s(Lo, { ...b, actions: a }),
413
+ cell: (x) => /* @__PURE__ */ a(Eo, { ...x, actions: s, getActions: r }),
388
414
  enableResizing: !1,
389
415
  enableSorting: !1,
390
416
  size: 36
391
417
  });
392
- return [m, ...c ? [u] : [], ...f, ...a.length > 0 ? [g] : []];
418
+ return [f, ...c ? [h] : [], ...S, ...s.length > 0 || r ? [b] : []];
393
419
  }
394
- const Eo = (o) => {
420
+ const Jo = (o) => {
395
421
  const e = z(28), {
396
422
  column: t,
397
423
  checked: l,
398
424
  onColumnVisibilityChange: n
399
425
  } = o;
400
- let r;
401
- e[0] !== t.id ? (r = {
426
+ let i;
427
+ e[0] !== t.id ? (i = {
402
428
  id: t.id
403
- }, e[0] = t.id, e[1] = r) : r = e[1];
429
+ }, e[0] = t.id, e[1] = i) : i = e[1];
404
430
  const {
405
431
  attributes: c,
406
- listeners: a,
407
- setNodeRef: i,
432
+ listeners: s,
433
+ setNodeRef: r,
408
434
  transform: d,
409
- transition: m,
410
- isDragging: u
411
- } = Yt(r);
435
+ transition: u,
436
+ isDragging: m
437
+ } = oo(i);
412
438
  let f;
413
- e[2] !== d ? (f = Zt.Transform.toString(d), e[2] = d, e[3] = f) : f = e[3];
414
- const g = u ? 0.5 : 1;
415
- let b;
416
- e[4] !== f || e[5] !== g || e[6] !== m ? (b = {
439
+ e[2] !== d ? (f = lo.Transform.toString(d), e[2] = d, e[3] = f) : f = e[3];
440
+ const h = m ? 0.5 : 1;
441
+ let S;
442
+ e[4] !== f || e[5] !== h || e[6] !== u ? (S = {
417
443
  transform: f,
418
- transition: m,
419
- opacity: g
420
- }, e[4] = f, e[5] = g, e[6] = m, e[7] = b) : b = e[7];
421
- const h = b;
422
- let v;
423
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = {
424
- bg: "bg.hover"
425
- }, e[8] = v) : v = e[8];
444
+ transition: u,
445
+ opacity: h
446
+ }, e[4] = f, e[5] = h, e[6] = u, e[7] = S) : S = e[7];
447
+ const b = S;
426
448
  let x;
427
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ s(Ct, { size: 14 }), e[9] = x) : x = e[9];
449
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
450
+ bg: "bg.hover"
451
+ }, e[8] = x) : x = e[8];
452
+ let g;
453
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(It, { size: 14 }), e[9] = g) : g = e[9];
454
+ let v;
455
+ e[10] !== c || e[11] !== s ? (v = /* @__PURE__ */ a(re, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...c, ...s, children: g }), e[10] = c, e[11] = s, e[12] = v) : v = e[12];
456
+ let w;
457
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[13] = w) : w = e[13];
428
458
  let p;
429
- e[10] !== c || e[11] !== a ? (p = /* @__PURE__ */ s(le, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...c, ...a, children: x }), e[10] = c, e[11] = a, e[12] = p) : p = e[12];
430
- let y;
431
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ s(Y, { as: we, boxSize: "12px", strokeWidth: "3" }), e[13] = y) : y = e[13];
459
+ e[14] !== t.id || e[15] !== n ? (p = (A) => n(t.id, A.checked === !0), e[14] = t.id, e[15] = n, e[16] = p) : p = e[16];
460
+ let R;
461
+ e[17] !== t.label ? (R = /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = R) : R = e[18];
432
462
  let C;
433
- e[14] !== t.id || e[15] !== n ? (C = ($) => n(t.id, $.checked === !0), e[14] = t.id, e[15] = n, e[16] = C) : C = e[16];
434
- let S;
435
- e[17] !== t.label ? (S = /* @__PURE__ */ s(O, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = S) : S = e[18];
436
- let w;
437
- e[19] !== l || e[20] !== C || e[21] !== S ? (w = /* @__PURE__ */ s(ye, { checked: l, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: y, onCheckedChange: C, children: S }), e[19] = l, e[20] = C, e[21] = S, e[22] = w) : w = e[22];
438
- let I;
439
- return e[23] !== i || e[24] !== h || e[25] !== w || e[26] !== p ? (I = /* @__PURE__ */ k(Ne, { ref: i, style: h, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: v, children: [
440
- p,
441
- w
442
- ] }), e[23] = i, e[24] = h, e[25] = w, e[26] = p, e[27] = I) : I = e[27], I;
443
- }, Bo = (o) => {
444
- const e = z(43), {
463
+ e[19] !== l || e[20] !== p || e[21] !== R ? (C = /* @__PURE__ */ a(Ce, { checked: l, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: w, onCheckedChange: p, children: R }), e[19] = l, e[20] = p, e[21] = R, e[22] = C) : C = e[22];
464
+ let y;
465
+ return e[23] !== r || e[24] !== b || e[25] !== C || e[26] !== v ? (y = /* @__PURE__ */ _(Ee, { ref: r, style: b, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: x, children: [
466
+ v,
467
+ C
468
+ ] }), e[23] = r, e[24] = b, e[25] = C, e[26] = v, e[27] = y) : y = e[27], y;
469
+ }, Xo = (o) => {
470
+ const e = z(47), {
445
471
  columns: t,
446
472
  visibleColumnIds: l,
447
- showStats: n,
448
- statsAvailable: r,
449
- onColumnVisibilityChange: c,
450
- onColumnReorder: a,
451
- onStatsVisibilityChange: i
452
- } = o, d = Ae(null), m = Ae(null), [u, f] = Z(!1), [g, b] = Z("");
453
- let h;
454
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = {
473
+ wrapRows: n,
474
+ showStats: i,
475
+ statsAvailable: c,
476
+ onColumnVisibilityChange: s,
477
+ onColumnReorder: r,
478
+ onWrapRowsChange: d,
479
+ onStatsVisibilityChange: u
480
+ } = o, m = Te(null), f = Te(null), [h, S] = Q(!1), [b, x] = Q("");
481
+ let g;
482
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
455
483
  activationConstraint: {
456
484
  distance: 5
457
485
  }
458
- }, e[0] = h) : h = e[0];
459
- const v = Ft(Kt(Jt, h));
460
- let x;
461
- if (e[1] !== t || e[2] !== g) {
462
- const _ = g.trim().toLowerCase();
463
- x = _ ? t.filter((D) => D.label.toLowerCase().includes(_)) : t, e[1] = t, e[2] = g, e[3] = x;
486
+ }, e[0] = g) : g = e[0];
487
+ const v = Gt(Ut(Yt, g));
488
+ let w;
489
+ if (e[1] !== t || e[2] !== b) {
490
+ const k = b.trim().toLowerCase();
491
+ w = k ? t.filter((B) => B.label.toLowerCase().includes(k)) : t, e[1] = t, e[2] = b, e[3] = w;
464
492
  } else
465
- x = e[3];
466
- const p = x;
467
- let y;
468
- e[4] !== a ? (y = (_) => {
493
+ w = e[3];
494
+ const p = w;
495
+ let R;
496
+ e[4] !== r ? (R = (k) => {
469
497
  const {
470
- active: D,
471
- over: H
472
- } = _;
473
- !H || D.id === H.id || a(String(D.id), String(H.id));
474
- }, e[4] = a, e[5] = y) : y = e[5];
475
- const C = y;
476
- let S, w;
477
- e[6] !== u ? (S = () => {
478
- if (!u)
498
+ active: B,
499
+ over: F
500
+ } = k;
501
+ !F || B.id === F.id || r(String(B.id), String(F.id));
502
+ }, e[4] = r, e[5] = R) : R = e[5];
503
+ const C = R;
504
+ let y, A;
505
+ e[6] !== h ? (y = () => {
506
+ if (!h)
479
507
  return;
480
- const _ = (H) => {
481
- const K = H.target;
482
- K instanceof Node && (m.current?.contains(K) || d.current?.contains(K) || f(!1));
483
- }, D = (H) => {
484
- H.key === "Escape" && f(!1);
508
+ const k = (F) => {
509
+ const le = F.target;
510
+ le instanceof Node && (f.current?.contains(le) || m.current?.contains(le) || S(!1));
511
+ }, B = (F) => {
512
+ F.key === "Escape" && S(!1);
485
513
  };
486
- return document.addEventListener("pointerdown", _), document.addEventListener("keydown", D, !0), () => {
487
- document.removeEventListener("pointerdown", _), document.removeEventListener("keydown", D, !0);
514
+ return document.addEventListener("pointerdown", k), document.addEventListener("keydown", B, !0), () => {
515
+ document.removeEventListener("pointerdown", k), document.removeEventListener("keydown", B, !0);
488
516
  };
489
- }, w = [u], e[6] = u, e[7] = S, e[8] = w) : (S = e[7], w = e[8]), Be(S, w);
490
- let I;
491
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
517
+ }, A = [h], e[6] = h, e[7] = y, e[8] = A) : (y = e[7], A = e[8]), Ke(y, A);
518
+ let $;
519
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
492
520
  placement: "bottom-end",
493
521
  offset: {
494
522
  mainAxis: 8
495
523
  },
496
- getAnchorElement: () => d.current
497
- }, e[9] = I) : I = e[9];
498
- let $;
499
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ s(Q.Trigger, { asChild: !0, children: /* @__PURE__ */ s(Se, { ref: d, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => f(Wo), children: /* @__PURE__ */ s(Y, { as: yt, boxSize: "14px" }) }) }), e[10] = $) : $ = e[10];
500
- let A;
501
- e[11] !== i || e[12] !== n || e[13] !== r ? (A = r ? /* @__PURE__ */ s(le, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", children: /* @__PURE__ */ s(Qt, { checked: n, inputProps: {
502
- role: "switch"
503
- }, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (_) => i(_.checked === !0), children: /* @__PURE__ */ s(O, { as: "span", textStyle: "label/S/regular", children: "Statistics" }) }) }) : null, e[11] = i, e[12] = n, e[13] = r, e[14] = A) : A = e[14];
524
+ getAnchorElement: () => m.current
525
+ }, e[9] = $) : $ = e[9];
504
526
  let T;
505
- e[15] !== g ? (T = /* @__PURE__ */ s(Rt, { value: g, placeholder: "Search columns", onValueChange: b }), e[15] = g, e[16] = T) : T = e[16];
506
- let F;
507
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = {
508
- overscrollBehavior: "contain"
509
- }, e[17] = F) : F = e[17];
510
- let M;
511
- e[18] !== t ? (M = t.map(Fo), e[18] = t, e[19] = M) : M = e[19];
527
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ a(te.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ref: m, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => S(qo), children: /* @__PURE__ */ a(ee, { as: Rt, boxSize: "14px" }) }) }), e[10] = T) : T = e[10];
512
528
  let P;
513
- if (e[20] !== p || e[21] !== c || e[22] !== l) {
514
- let _;
515
- e[24] !== c || e[25] !== l ? (_ = (D) => /* @__PURE__ */ s(Eo, { column: D, checked: l.has(D.id), onColumnVisibilityChange: c }, D.id), e[24] = c, e[25] = l, e[26] = _) : _ = e[26], P = p.map(_), e[20] = p, e[21] = c, e[22] = l, e[23] = P;
516
- } else
517
- P = e[23];
529
+ e[11] !== d || e[12] !== n ? (P = /* @__PURE__ */ a(Dt, { showDivider: !0, wrapRows: n, onWrapRowsChange: d }), e[11] = d, e[12] = n, e[13] = P) : P = e[13];
530
+ let M;
531
+ e[14] !== u || e[15] !== i || e[16] !== c ? (M = c ? /* @__PURE__ */ a(re, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", children: /* @__PURE__ */ a($t, { checked: i, inputProps: {
532
+ role: "switch"
533
+ }, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (k) => u(k.checked === !0), children: /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", children: "Statistics" }) }) }) : null, e[14] = u, e[15] = i, e[16] = c, e[17] = M) : M = e[17];
534
+ let D;
535
+ e[18] !== b ? (D = /* @__PURE__ */ a(_t, { value: b, placeholder: "Search columns", onValueChange: x }), e[18] = b, e[19] = D) : D = e[19];
536
+ let K;
537
+ e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = {
538
+ overscrollBehavior: "contain"
539
+ }, e[20] = K) : K = e[20];
540
+ let W;
541
+ e[21] !== t ? (W = t.map(Go), e[21] = t, e[22] = W) : W = e[22];
518
542
  let N;
519
- e[27] !== P ? (N = /* @__PURE__ */ s(ke, { gap: "1px", children: P }), e[27] = P, e[28] = N) : N = e[28];
543
+ if (e[23] !== p || e[24] !== s || e[25] !== l) {
544
+ let k;
545
+ e[27] !== s || e[28] !== l ? (k = (B) => /* @__PURE__ */ a(Jo, { column: B, checked: l.has(B.id), onColumnVisibilityChange: s }, B.id), e[27] = s, e[28] = l, e[29] = k) : k = e[29], N = p.map(k), e[23] = p, e[24] = s, e[25] = l, e[26] = N;
546
+ } else
547
+ N = e[26];
548
+ let J;
549
+ e[30] !== N ? (J = /* @__PURE__ */ a(ze, { gap: "1px", children: N }), e[30] = N, e[31] = J) : J = e[31];
550
+ let X;
551
+ e[32] !== W || e[33] !== J ? (X = /* @__PURE__ */ a(eo, { items: W, strategy: to, children: J }), e[32] = W, e[33] = J, e[34] = X) : X = e[34];
520
552
  let j;
521
- e[29] !== M || e[30] !== N ? (j = /* @__PURE__ */ s(Gt, { items: M, strategy: Ut, children: N }), e[29] = M, e[30] = N, e[31] = j) : j = e[31];
553
+ e[35] !== C || e[36] !== v || e[37] !== X ? (j = /* @__PURE__ */ a(xe, { maxH: "280px", viewportProps: K, children: /* @__PURE__ */ a(re, { padding: "2xs", children: /* @__PURE__ */ a(Zt, { sensors: v, collisionDetection: Qt, onDragEnd: C, children: X }) }) }), e[35] = C, e[36] = v, e[37] = X, e[38] = j) : j = e[38];
554
+ let H;
555
+ e[39] !== j || e[40] !== P || e[41] !== M || e[42] !== D ? (H = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { ref: f, width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ _(ze, { gap: "0", children: [
556
+ P,
557
+ M,
558
+ D,
559
+ j
560
+ ] }) }) }) }), e[39] = j, e[40] = P, e[41] = M, e[42] = D, e[43] = H) : H = e[43];
522
561
  let E;
523
- e[32] !== C || e[33] !== v || e[34] !== j ? (E = /* @__PURE__ */ s(xe, { maxH: "280px", viewportProps: F, children: /* @__PURE__ */ s(le, { padding: "2xs", children: /* @__PURE__ */ s(Xt, { sensors: v, collisionDetection: qt, onDragEnd: C, children: j }) }) }), e[32] = C, e[33] = v, e[34] = j, e[35] = E) : E = e[35];
524
- let B;
525
- e[36] !== E || e[37] !== A || e[38] !== T ? (B = /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s(Q.Positioner, { children: /* @__PURE__ */ s(Q.Content, { ref: m, width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ k(ke, { gap: "0", children: [
526
- A,
562
+ return e[44] !== h || e[45] !== H ? (E = /* @__PURE__ */ _(te.Root, { open: h, closeOnInteractOutside: !1, positioning: $, children: [
527
563
  T,
528
- E
529
- ] }) }) }) }), e[36] = E, e[37] = A, e[38] = T, e[39] = B) : B = e[39];
530
- let W;
531
- return e[40] !== u || e[41] !== B ? (W = /* @__PURE__ */ k(Q.Root, { open: u, closeOnInteractOutside: !1, positioning: I, children: [
532
- $,
533
- B
534
- ] }), e[40] = u, e[41] = B, e[42] = W) : W = e[42], W;
564
+ H
565
+ ] }), e[44] = h, e[45] = H, e[46] = E) : E = e[46], E;
535
566
  };
536
- function Wo(o) {
567
+ function qo(o) {
537
568
  return !o;
538
569
  }
539
- function Fo(o) {
570
+ function Go(o) {
540
571
  return o.id;
541
572
  }
542
- const Ko = () => {
543
- const o = z(11), e = io(), t = so();
573
+ const Uo = () => {
574
+ const o = z(11), e = uo(), t = mo();
544
575
  if (!e || !t)
545
576
  return null;
546
577
  const l = t.y + t.height;
547
578
  let n;
548
- o[0] !== e.x || o[1] !== t.y || o[2] !== l ? (n = /* @__PURE__ */ s("line", { x1: e.x, x2: e.x, y1: t.y, y2: l }), o[0] = e.x, o[1] = t.y, o[2] = l, o[3] = n) : n = o[3];
549
- const r = t.x + t.width;
579
+ o[0] !== e.x || o[1] !== t.y || o[2] !== l ? (n = /* @__PURE__ */ a("line", { x1: e.x, x2: e.x, y1: t.y, y2: l }), o[0] = e.x, o[1] = t.y, o[2] = l, o[3] = n) : n = o[3];
580
+ const i = t.x + t.width;
550
581
  let c;
551
- o[4] !== e.y || o[5] !== t.x || o[6] !== r ? (c = /* @__PURE__ */ s("line", { x1: t.x, x2: r, y1: e.y, y2: e.y }), o[4] = e.y, o[5] = t.x, o[6] = r, o[7] = c) : c = o[7];
552
- let a;
553
- return o[8] !== n || o[9] !== c ? (a = /* @__PURE__ */ k("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
582
+ o[4] !== e.y || o[5] !== t.x || o[6] !== i ? (c = /* @__PURE__ */ a("line", { x1: t.x, x2: i, y1: e.y, y2: e.y }), o[4] = e.y, o[5] = t.x, o[6] = i, o[7] = c) : c = o[7];
583
+ let s;
584
+ return o[8] !== n || o[9] !== c ? (s = /* @__PURE__ */ _("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
554
585
  n,
555
586
  c
556
- ] }), o[8] = n, o[9] = c, o[10] = a) : a = o[10], a;
557
- }, Ye = (o) => {
587
+ ] }), o[8] = n, o[9] = c, o[10] = s) : s = o[10], s;
588
+ }, et = (o) => {
558
589
  const e = z(47), {
559
590
  data: t,
560
591
  dataKey: l,
561
592
  color: n,
562
- height: r,
593
+ height: i,
563
594
  ariaLabel: c,
564
- tooltipLabel: a,
565
- tooltipValue: i,
595
+ tooltipLabel: s,
596
+ tooltipValue: r,
566
597
  tooltipSeriesLabel: d,
567
- layout: m,
568
- categoryKey: u,
598
+ layout: u,
599
+ categoryKey: m,
569
600
  domain: f,
570
- barSize: g,
571
- barCategoryGap: b
572
- } = o, h = m === void 0 ? "horizontal" : m, v = b === void 0 ? 1 : b;
573
- let x;
574
- e[0] !== n || e[1] !== l ? (x = [{
601
+ barSize: h,
602
+ barCategoryGap: S
603
+ } = o, b = u === void 0 ? "horizontal" : u, x = S === void 0 ? 1 : S;
604
+ let g;
605
+ e[0] !== n || e[1] !== l ? (g = [{
575
606
  name: l,
576
607
  color: n
577
- }], e[0] = n, e[1] = l, e[2] = x) : x = e[2];
578
- let p;
579
- e[3] !== t || e[4] !== x ? (p = {
608
+ }], e[0] = n, e[1] = l, e[2] = g) : g = e[2];
609
+ let v;
610
+ e[3] !== t || e[4] !== g ? (v = {
580
611
  data: t,
581
- series: x
582
- }, e[3] = t, e[4] = x, e[5] = p) : p = e[5];
583
- const y = eo(p);
612
+ series: g
613
+ }, e[3] = t, e[4] = g, e[5] = v) : v = e[5];
614
+ const w = no(v);
615
+ let p;
616
+ e[6] !== l ? (p = (k) => k[l], e[6] = l, e[7] = p) : p = e[7];
617
+ const R = p;
584
618
  let C;
585
- e[6] !== l ? (C = (K) => K[l], e[6] = l, e[7] = C) : C = e[7];
586
- const S = C;
587
- let w;
588
- e[8] !== u ? (w = u ? (K) => K[u] : void 0, e[8] = u, e[9] = w) : w = e[9];
589
- const I = w, $ = y.data;
590
- let A;
591
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
619
+ e[8] !== m ? (C = m ? (k) => k[m] : void 0, e[8] = m, e[9] = C) : C = e[9];
620
+ const y = C, A = w.data;
621
+ let $;
622
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
592
623
  top: 2,
593
624
  right: 0,
594
625
  bottom: 0,
595
626
  left: 0
596
- }, e[10] = A) : A = e[10];
627
+ }, e[10] = $) : $ = e[10];
597
628
  let T;
598
- e[11] !== f || e[12] !== I || e[13] !== h ? (T = h === "vertical" ? /* @__PURE__ */ k(it, { children: [
599
- /* @__PURE__ */ s(to, { type: "number", domain: f, hide: !0 }),
600
- /* @__PURE__ */ s(oo, { type: "category", dataKey: I, hide: !0 })
601
- ] }) : null, e[11] = f, e[12] = I, e[13] = h, e[14] = T) : T = e[14];
602
- let F;
603
- e[15] !== y || e[16] !== n ? (F = y.color(n), e[15] = y, e[16] = n, e[17] = F) : F = e[17];
604
- let M;
605
- e[18] !== g || e[19] !== S || e[20] !== F ? (M = /* @__PURE__ */ s(lo, { dataKey: S, fill: F, barSize: g, isAnimationActive: !1 }), e[18] = g, e[19] = S, e[20] = F, e[21] = M) : M = e[21];
629
+ e[11] !== f || e[12] !== y || e[13] !== b ? (T = b === "vertical" ? /* @__PURE__ */ _(ct, { children: [
630
+ /* @__PURE__ */ a(ro, { type: "number", domain: f, hide: !0 }),
631
+ /* @__PURE__ */ a(io, { type: "category", dataKey: y, hide: !0 })
632
+ ] }) : null, e[11] = f, e[12] = y, e[13] = b, e[14] = T) : T = e[14];
606
633
  let P;
607
- e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
634
+ e[15] !== w || e[16] !== n ? (P = w.color(n), e[15] = w, e[16] = n, e[17] = P) : P = e[17];
635
+ let M;
636
+ e[18] !== h || e[19] !== R || e[20] !== P ? (M = /* @__PURE__ */ a(so, { dataKey: R, fill: P, barSize: h, isAnimationActive: !1 }), e[18] = h, e[19] = R, e[20] = P, e[21] = M) : M = e[21];
637
+ let D;
638
+ e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = {
608
639
  x: !0,
609
640
  y: !0
610
- }, e[22] = P) : P = e[22];
611
- let N;
612
- e[23] !== a ? (N = (K, ne) => {
613
- const te = ne[0]?.payload;
614
- return te ? a(te) : K;
615
- }, e[23] = a, e[24] = N) : N = e[24];
616
- let j;
617
- e[25] !== d || e[26] !== i ? (j = (K) => [i(K), d], e[25] = d, e[26] = i, e[27] = j) : j = e[27];
618
- let E;
619
- e[28] !== N || e[29] !== j ? (E = /* @__PURE__ */ s(_e.Tooltip, { labelFormatter: N, formatter: j }), e[28] = N, e[29] = j, e[30] = E) : E = e[30];
620
- let B;
621
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ s(Ko, {}), e[31] = B) : B = e[31];
641
+ }, e[22] = D) : D = e[22];
642
+ let K;
643
+ e[23] !== s ? (K = (k, B) => {
644
+ const F = B[0]?.payload;
645
+ return F ? s(F) : k;
646
+ }, e[23] = s, e[24] = K) : K = e[24];
622
647
  let W;
623
- e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = {
648
+ e[25] !== d || e[26] !== r ? (W = (k) => [r(k), d], e[25] = d, e[26] = r, e[27] = W) : W = e[27];
649
+ let N;
650
+ e[28] !== K || e[29] !== W ? (N = /* @__PURE__ */ a(Ve.Tooltip, { labelFormatter: K, formatter: W }), e[28] = K, e[29] = W, e[30] = N) : N = e[30];
651
+ let J;
652
+ e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ a(Uo, {}), e[31] = J) : J = e[31];
653
+ let X;
654
+ e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = {
624
655
  zIndex: 1800
625
- }, e[32] = W) : W = e[32];
626
- let _;
627
- e[33] !== E ? (_ = /* @__PURE__ */ s(no, { allowEscapeViewBox: P, content: E, cursor: B, isAnimationActive: !1, wrapperStyle: W }), e[33] = E, e[34] = _) : _ = e[34];
628
- let D;
629
- e[35] !== v || e[36] !== y.data || e[37] !== h || e[38] !== M || e[39] !== _ || e[40] !== T ? (D = /* @__PURE__ */ k(ro, { responsive: !0, data: $, layout: h, margin: A, barCategoryGap: v, children: [
656
+ }, e[32] = X) : X = e[32];
657
+ let j;
658
+ e[33] !== N ? (j = /* @__PURE__ */ a(ao, { allowEscapeViewBox: D, content: N, cursor: J, isAnimationActive: !1, wrapperStyle: X }), e[33] = N, e[34] = j) : j = e[34];
659
+ let H;
660
+ e[35] !== x || e[36] !== w.data || e[37] !== b || e[38] !== M || e[39] !== j || e[40] !== T ? (H = /* @__PURE__ */ _(co, { responsive: !0, data: A, layout: b, margin: $, barCategoryGap: x, children: [
630
661
  T,
631
662
  M,
632
- _
633
- ] }), e[35] = v, e[36] = y.data, e[37] = h, e[38] = M, e[39] = _, e[40] = T, e[41] = D) : D = e[41];
634
- let H;
635
- return e[42] !== c || e[43] !== y || e[44] !== r || e[45] !== D ? (H = /* @__PURE__ */ s(_e.Root, { chart: y, height: r, aspectRatio: "auto", cursor: "crosshair", "aria-label": c, children: D }), e[42] = c, e[43] = y, e[44] = r, e[45] = D, e[46] = H) : H = e[46], H;
636
- }, Jo = (o) => Je(o) ? o.sortValue : o, Re = (o, e) => o.map((t) => Jo(t[e])).filter((t) => t != null && t !== ""), Xo = (o, e) => new Set(Re(o, e)).size, qo = (o, e, t) => {
637
- const l = Re(o, e), n = /* @__PURE__ */ new Map();
638
- for (const i of l)
639
- n.set(i, (n.get(i) ?? 0) + 1);
640
- const r = [...n.entries()].map(([i, d]) => ({
641
- label: String(i),
663
+ j
664
+ ] }), e[35] = x, e[36] = w.data, e[37] = b, e[38] = M, e[39] = j, e[40] = T, e[41] = H) : H = e[41];
665
+ let E;
666
+ return e[42] !== c || e[43] !== w || e[44] !== i || e[45] !== H ? (E = /* @__PURE__ */ a(Ve.Root, { chart: w, height: i, aspectRatio: "auto", cursor: "crosshair", "aria-label": c, children: H }), e[42] = c, e[43] = w, e[44] = i, e[45] = H, e[46] = E) : E = e[46], E;
667
+ }, Yo = (o) => Ge(o) ? o.sortValue : o, Ie = (o, e) => o.map((t) => Yo(t[e])).filter((t) => t != null && t !== ""), Zo = (o, e) => new Set(Ie(o, e)).size, Qo = (o, e, t) => {
668
+ const l = Ie(o, e), n = /* @__PURE__ */ new Map();
669
+ for (const r of l)
670
+ n.set(r, (n.get(r) ?? 0) + 1);
671
+ const i = [...n.entries()].map(([r, d]) => ({
672
+ label: String(r),
642
673
  count: d,
643
674
  percentage: Math.round(d / l.length * 100)
644
- })).sort((i, d) => d.count - i.count || i.label.localeCompare(d.label)), c = r.slice(0, t), a = r.slice(t).reduce((i, d) => i + d.count, 0);
645
- return a === 0 ? c : [...c, {
675
+ })).sort((r, d) => d.count - r.count || r.label.localeCompare(d.label)), c = i.slice(0, t), s = i.slice(t).reduce((r, d) => r + d.count, 0);
676
+ return s === 0 ? c : [...c, {
646
677
  label: "Other",
647
- count: a,
648
- percentage: Math.round(a / l.length * 100)
678
+ count: s,
679
+ percentage: Math.round(s / l.length * 100)
649
680
  }];
650
- }, Go = (o, e, t) => {
651
- const l = Re(o, e).filter((i) => typeof i == "number");
681
+ }, el = (o, e, t) => {
682
+ const l = Ie(o, e).filter((r) => typeof r == "number");
652
683
  if (l.length === 0) return null;
653
- const n = Math.min(...l), r = Math.max(...l), c = (r - n) / t, a = Array.from({
684
+ const n = Math.min(...l), i = Math.max(...l), c = (i - n) / t, s = Array.from({
654
685
  length: t
655
- }, (i, d) => ({
686
+ }, (r, d) => ({
656
687
  start: n + c * d,
657
688
  end: n + c * (d + 1),
658
689
  count: 0
659
690
  }));
660
- for (const i of l) {
661
- const d = i === r || c === 0 ? t - 1 : Math.floor((i - n) / c);
662
- a[d].count += 1;
691
+ for (const r of l) {
692
+ const d = r === i || c === 0 ? t - 1 : Math.floor((r - n) / c);
693
+ s[d].count += 1;
663
694
  }
664
695
  return {
665
696
  min: n,
666
- max: r,
667
- bins: a
697
+ max: i,
698
+ bins: s
668
699
  };
669
- }, G = new Intl.NumberFormat(void 0, {
700
+ }, Y = new Intl.NumberFormat(void 0, {
670
701
  maximumFractionDigits: 2
671
- }).format, Ze = "vis.categorical.1", Qe = (o) => {
702
+ }).format, tt = "vis.categorical.1", ot = (o) => {
672
703
  const e = z(10), {
673
704
  value: t,
674
705
  count: l
675
706
  } = o;
676
707
  let n;
677
- e[0] !== t ? (n = /* @__PURE__ */ s(O, { textStyle: "label/L/medium", lineHeight: "1", maxWidth: "100%", truncate: !0, children: t }), e[0] = t, e[1] = n) : n = e[1];
678
- let r;
679
- e[2] !== l ? (r = G(l), e[2] = l, e[3] = r) : r = e[3];
708
+ e[0] !== t ? (n = /* @__PURE__ */ a(O, { textStyle: "label/L/medium", lineHeight: "1", maxWidth: "100%", truncate: !0, children: t }), e[0] = t, e[1] = n) : n = e[1];
709
+ let i;
710
+ e[2] !== l ? (i = Y(l), e[2] = l, e[3] = i) : i = e[3];
680
711
  const c = l === 1 ? "value" : "values";
681
- let a;
682
- e[4] !== r || e[5] !== c ? (a = /* @__PURE__ */ k(O, { textStyle: "label/XS", color: "fg.muted", children: [
683
- r,
712
+ let s;
713
+ e[4] !== i || e[5] !== c ? (s = /* @__PURE__ */ _(O, { textStyle: "label/XS", color: "fg.muted", children: [
714
+ i,
684
715
  " ",
685
716
  c
686
- ] }), e[4] = r, e[5] = c, e[6] = a) : a = e[6];
687
- let i;
688
- return e[7] !== n || e[8] !== a ? (i = /* @__PURE__ */ k(ee, { "data-single-value-stat": !0, direction: "column", gap: "2xs", alignItems: "flex-start", minWidth: "0", children: [
717
+ ] }), e[4] = i, e[5] = c, e[6] = s) : s = e[6];
718
+ let r;
719
+ return e[7] !== n || e[8] !== s ? (r = /* @__PURE__ */ _(oe, { "data-single-value-stat": !0, direction: "column", gap: "2xs", alignItems: "flex-start", minWidth: "0", children: [
689
720
  n,
690
- a
691
- ] }), e[7] = n, e[8] = a, e[9] = i) : i = e[9], i;
692
- }, Uo = (o) => {
721
+ s
722
+ ] }), e[7] = n, e[8] = s, e[9] = r) : r = e[9], r;
723
+ }, tl = (o) => {
693
724
  const e = z(22), {
694
725
  rows: t,
695
726
  columnId: l
696
727
  } = o;
697
- let n, r, c, a, i, d, m, u;
728
+ let n, i, c, s, r, d, u, m;
698
729
  if (e[0] !== l || e[1] !== t) {
699
- const h = Xo(t, l);
700
- r = ee, d = "column", m = "2xs", u = "flex-start", n = O, c = "label/L/medium", a = "1", i = G(h), e[0] = l, e[1] = t, e[2] = n, e[3] = r, e[4] = c, e[5] = a, e[6] = i, e[7] = d, e[8] = m, e[9] = u;
730
+ const b = Zo(t, l);
731
+ i = oe, d = "column", u = "2xs", m = "flex-start", n = O, c = "label/L/medium", s = "1", r = Y(b), e[0] = l, e[1] = t, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m;
701
732
  } else
702
- n = e[2], r = e[3], c = e[4], a = e[5], i = e[6], d = e[7], m = e[8], u = e[9];
733
+ n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9];
703
734
  let f;
704
- e[10] !== n || e[11] !== c || e[12] !== a || e[13] !== i ? (f = /* @__PURE__ */ s(n, { textStyle: c, lineHeight: a, children: i }), e[10] = n, e[11] = c, e[12] = a, e[13] = i, e[14] = f) : f = e[14];
705
- let g;
706
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ s(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = g) : g = e[15];
707
- let b;
708
- return e[16] !== r || e[17] !== d || e[18] !== m || e[19] !== u || e[20] !== f ? (b = /* @__PURE__ */ k(r, { direction: d, gap: m, alignItems: u, children: [
735
+ e[10] !== n || e[11] !== c || e[12] !== s || e[13] !== r ? (f = /* @__PURE__ */ a(n, { textStyle: c, lineHeight: s, children: r }), e[10] = n, e[11] = c, e[12] = s, e[13] = r, e[14] = f) : f = e[14];
736
+ let h;
737
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = h) : h = e[15];
738
+ let S;
739
+ return e[16] !== i || e[17] !== d || e[18] !== u || e[19] !== m || e[20] !== f ? (S = /* @__PURE__ */ _(i, { direction: d, gap: u, alignItems: m, children: [
709
740
  f,
710
- g
711
- ] }), e[16] = r, e[17] = d, e[18] = m, e[19] = u, e[20] = f, e[21] = b) : b = e[21], b;
712
- }, Yo = (o) => {
741
+ h
742
+ ] }), e[16] = i, e[17] = d, e[18] = u, e[19] = m, e[20] = f, e[21] = S) : S = e[21], S;
743
+ }, ol = (o) => {
713
744
  const e = z(36), {
714
745
  rows: t,
715
746
  columnId: l,
716
747
  binCount: n
717
748
  } = o;
718
- let r, c, a, i, d, m, u, f, g, b, h, v, x, p;
749
+ let i, c, s, r, d, u, m, f, h, S, b, x, g, v;
719
750
  if (e[0] !== n || e[1] !== l || e[2] !== t) {
720
- m = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
751
+ u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
721
752
  e: {
722
- const w = Go(t, l, n);
723
- if (!w) {
724
- let $;
725
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ s(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = $) : $ = e[17], m = $;
753
+ const C = el(t, l, n);
754
+ if (!C) {
755
+ let A;
756
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = A) : A = e[17], u = A;
726
757
  break e;
727
758
  }
728
- const I = w.bins.reduce(ol, 0);
729
- if (w.min === w.max) {
730
- m = /* @__PURE__ */ s(Qe, { value: G(w.min), count: I });
759
+ const y = C.bins.reduce(sl, 0);
760
+ if (C.min === C.max) {
761
+ u = /* @__PURE__ */ a(ot, { value: Y(C.min), count: y });
731
762
  break e;
732
763
  }
733
- a = ee, h = "column", v = "100%", x = "2xs", p = /* @__PURE__ */ s(Ye, { data: w.bins, dataKey: "count", color: Ze, height: "40px", ariaLabel: `Distribution for ${l}`, tooltipLabel: ll, tooltipValue: nl, tooltipSeriesLabel: "Count" }), c = ee, f = "space-between", g = "xs", b = /* @__PURE__ */ s(O, { textStyle: "label/XS/regular", color: "fg.muted", children: G(w.min) }), r = O, i = "label/XS/regular", d = "fg.muted", u = G(w.max);
764
+ s = oe, b = "column", x = "100%", g = "2xs", v = /* @__PURE__ */ a(et, { data: C.bins, dataKey: "count", color: tt, height: "40px", ariaLabel: `Distribution for ${l}`, tooltipLabel: al, tooltipValue: cl, tooltipSeriesLabel: "Count" }), c = oe, f = "space-between", h = "xs", S = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: Y(C.min) }), i = O, r = "label/XS/regular", d = "fg.muted", m = Y(C.max);
734
765
  }
735
- e[0] = n, e[1] = l, e[2] = t, e[3] = r, e[4] = c, e[5] = a, e[6] = i, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g, e[12] = b, e[13] = h, e[14] = v, e[15] = x, e[16] = p;
766
+ e[0] = n, e[1] = l, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v;
736
767
  } else
737
- r = e[3], c = e[4], a = e[5], i = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11], b = e[12], h = e[13], v = e[14], x = e[15], p = e[16];
738
- if (m !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
739
- return m;
740
- let y;
741
- e[18] !== r || e[19] !== i || e[20] !== d || e[21] !== u ? (y = /* @__PURE__ */ s(r, { textStyle: i, color: d, children: u }), e[18] = r, e[19] = i, e[20] = d, e[21] = u, e[22] = y) : y = e[22];
742
- let C;
743
- e[23] !== c || e[24] !== y || e[25] !== f || e[26] !== g || e[27] !== b ? (C = /* @__PURE__ */ k(c, { justifyContent: f, gap: g, children: [
744
- b,
745
- y
746
- ] }), e[23] = c, e[24] = y, e[25] = f, e[26] = g, e[27] = b, e[28] = C) : C = e[28];
747
- let S;
748
- return e[29] !== a || e[30] !== C || e[31] !== h || e[32] !== v || e[33] !== x || e[34] !== p ? (S = /* @__PURE__ */ k(a, { direction: h, width: v, gap: x, children: [
749
- p,
750
- C
751
- ] }), e[29] = a, e[30] = C, e[31] = h, e[32] = v, e[33] = x, e[34] = p, e[35] = S) : S = e[35], S;
752
- }, Zo = (o) => {
768
+ i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16];
769
+ if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
770
+ return u;
771
+ let w;
772
+ e[18] !== i || e[19] !== r || e[20] !== d || e[21] !== m ? (w = /* @__PURE__ */ a(i, { textStyle: r, color: d, children: m }), e[18] = i, e[19] = r, e[20] = d, e[21] = m, e[22] = w) : w = e[22];
773
+ let p;
774
+ e[23] !== c || e[24] !== w || e[25] !== f || e[26] !== h || e[27] !== S ? (p = /* @__PURE__ */ _(c, { justifyContent: f, gap: h, children: [
775
+ S,
776
+ w
777
+ ] }), e[23] = c, e[24] = w, e[25] = f, e[26] = h, e[27] = S, e[28] = p) : p = e[28];
778
+ let R;
779
+ return e[29] !== s || e[30] !== p || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v ? (R = /* @__PURE__ */ _(s, { direction: b, width: x, gap: g, children: [
780
+ v,
781
+ p
782
+ ] }), e[29] = s, e[30] = p, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = R) : R = e[35], R;
783
+ }, ll = (o) => {
753
784
  const e = z(15), {
754
785
  rows: t,
755
786
  columnId: l,
756
787
  limit: n
757
788
  } = o;
758
- let r, c, a, i, d, m;
789
+ let i, c, s, r, d, u;
759
790
  if (e[0] !== l || e[1] !== n || e[2] !== t) {
760
- m = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
791
+ u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
761
792
  e: {
762
- const f = qo(t, l, n);
793
+ const f = Qo(t, l, n);
763
794
  if (f.length === 1 && f[0]) {
764
- m = /* @__PURE__ */ s(Qe, { value: f[0].label, count: f[0].count });
795
+ u = /* @__PURE__ */ a(ot, { value: f[0].label, count: f[0].count });
765
796
  break e;
766
797
  }
767
- r = ee, c = "column", a = "100%", i = "2xs", d = f.map(sl);
798
+ i = oe, c = "column", s = "100%", r = "2xs", d = f.map(ml);
768
799
  }
769
- e[0] = l, e[1] = n, e[2] = t, e[3] = r, e[4] = c, e[5] = a, e[6] = i, e[7] = d, e[8] = m;
800
+ e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u;
770
801
  } else
771
- r = e[3], c = e[4], a = e[5], i = e[6], d = e[7], m = e[8];
772
- if (m !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
773
- return m;
774
- let u;
775
- return e[9] !== r || e[10] !== c || e[11] !== a || e[12] !== i || e[13] !== d ? (u = /* @__PURE__ */ s(r, { direction: c, width: a, gap: i, children: d }), e[9] = r, e[10] = c, e[11] = a, e[12] = i, e[13] = d, e[14] = u) : u = e[14], u;
776
- }, Qo = (o) => {
802
+ i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8];
803
+ if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
804
+ return u;
805
+ let m;
806
+ return e[9] !== i || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (m = /* @__PURE__ */ a(i, { direction: c, width: s, gap: r, children: d }), e[9] = i, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = m) : m = e[14], m;
807
+ }, nl = (o) => {
777
808
  const e = z(11), {
778
809
  rows: t,
779
810
  columnId: l,
780
811
  stat: n
781
812
  } = o;
782
813
  if (n.type === "unique") {
783
- let a;
784
- return e[0] !== l || e[1] !== t ? (a = /* @__PURE__ */ s(Uo, { rows: t, columnId: l }), e[0] = l, e[1] = t, e[2] = a) : a = e[2], a;
814
+ let s;
815
+ return e[0] !== l || e[1] !== t ? (s = /* @__PURE__ */ a(tl, { rows: t, columnId: l }), e[0] = l, e[1] = t, e[2] = s) : s = e[2], s;
785
816
  }
786
817
  if (n.type === "histogram") {
787
- const a = n.bins ?? 10;
788
- let i;
789
- return e[3] !== l || e[4] !== t || e[5] !== a ? (i = /* @__PURE__ */ s(Yo, { rows: t, columnId: l, binCount: a }), e[3] = l, e[4] = t, e[5] = a, e[6] = i) : i = e[6], i;
818
+ const s = n.bins ?? 10;
819
+ let r;
820
+ return e[3] !== l || e[4] !== t || e[5] !== s ? (r = /* @__PURE__ */ a(ol, { rows: t, columnId: l, binCount: s }), e[3] = l, e[4] = t, e[5] = s, e[6] = r) : r = e[6], r;
790
821
  }
791
- const r = n.limit ?? 2;
822
+ const i = n.limit ?? 2;
792
823
  let c;
793
- return e[7] !== l || e[8] !== t || e[9] !== r ? (c = /* @__PURE__ */ s(Zo, { rows: t, columnId: l, limit: r }), e[7] = l, e[8] = t, e[9] = r, e[10] = c) : c = e[10], c;
794
- }, el = (o) => {
824
+ return e[7] !== l || e[8] !== t || e[9] !== i ? (c = /* @__PURE__ */ a(ll, { rows: t, columnId: l, limit: i }), e[7] = l, e[8] = t, e[9] = i, e[10] = c) : c = e[10], c;
825
+ }, rl = (o) => {
795
826
  const e = z(12), {
796
827
  header: t,
797
828
  headerGroup: l,
798
829
  rows: n,
799
- columnStats: r,
830
+ columnStats: i,
800
831
  fullWidth: c
801
- } = o, a = r[t.column.id], i = a?.type;
832
+ } = o, s = i[t.column.id], r = s?.type;
802
833
  let d;
803
834
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
804
835
  borderRight: "none"
805
836
  }, e[0] = d) : d = e[0];
806
- const m = c && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
807
- let u;
808
- e[1] !== m ? (u = {
809
- width: m
810
- }, e[1] = m, e[2] = u) : u = e[2];
837
+ const u = c && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
838
+ let m;
839
+ e[1] !== u ? (m = {
840
+ width: u
841
+ }, e[1] = u, e[2] = m) : m = e[2];
811
842
  let f;
812
- e[3] !== t.column.id || e[4] !== n || e[5] !== a ? (f = a ? /* @__PURE__ */ s(Qo, { rows: n, columnId: t.column.id, stat: a }) : null, e[3] = t.column.id, e[4] = n, e[5] = a, e[6] = f) : f = e[6];
813
- let g;
814
- return e[7] !== t.column.id || e[8] !== i || e[9] !== u || e[10] !== f ? (g = /* @__PURE__ */ s(L.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": i, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: u, children: f }), e[7] = t.column.id, e[8] = i, e[9] = u, e[10] = f, e[11] = g) : g = e[11], g;
815
- }, tl = (o) => {
843
+ e[3] !== t.column.id || e[4] !== n || e[5] !== s ? (f = s ? /* @__PURE__ */ a(nl, { rows: n, columnId: t.column.id, stat: s }) : null, e[3] = t.column.id, e[4] = n, e[5] = s, e[6] = f) : f = e[6];
844
+ let h;
845
+ return e[7] !== t.column.id || e[8] !== r || e[9] !== m || e[10] !== f ? (h = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": r, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: m, children: f }), e[7] = t.column.id, e[8] = r, e[9] = m, e[10] = f, e[11] = h) : h = e[11], h;
846
+ }, il = (o) => {
816
847
  const e = z(8), {
817
848
  headerGroup: t,
818
849
  rows: l,
819
850
  columnStats: n,
820
- fullWidth: r,
851
+ fullWidth: i,
821
852
  noBorder: c
822
853
  } = o;
823
- if (!t.headers.some((u) => n[u.column.id]))
854
+ if (!t.headers.some((m) => n[m.column.id]))
824
855
  return null;
825
- const i = c ? "none" : "1px solid";
856
+ const r = c ? "none" : "1px solid";
826
857
  let d;
827
- e[0] !== n || e[1] !== r || e[2] !== t || e[3] !== l ? (d = t.headers.map((u) => /* @__PURE__ */ s(el, { header: u, headerGroup: t, rows: l, columnStats: n, fullWidth: r }, u.id)), e[0] = n, e[1] = r, e[2] = t, e[3] = l, e[4] = d) : d = e[4];
828
- let m;
829
- return e[5] !== i || e[6] !== d ? (m = /* @__PURE__ */ s(L.Row, { className: "data-table-stats-row", borderRight: i, borderColor: "border.subtle", children: d }), e[5] = i, e[6] = d, e[7] = m) : m = e[7], m;
858
+ e[0] !== n || e[1] !== i || e[2] !== t || e[3] !== l ? (d = t.headers.map((m) => /* @__PURE__ */ a(rl, { header: m, headerGroup: t, rows: l, columnStats: n, fullWidth: i }, m.id)), e[0] = n, e[1] = i, e[2] = t, e[3] = l, e[4] = d) : d = e[4];
859
+ let u;
860
+ return e[5] !== r || e[6] !== d ? (u = /* @__PURE__ */ a(L.Row, { className: "data-table-stats-row", borderRight: r, borderColor: "border.subtle", children: d }), e[5] = r, e[6] = d, e[7] = u) : u = e[7], u;
830
861
  };
831
- function ol(o, e) {
862
+ function sl(o, e) {
832
863
  return o + e.count;
833
864
  }
834
- function ll(o) {
835
- return `${G(o.start)} – ${G(o.end)}`;
865
+ function al(o) {
866
+ return `${Y(o.start)} – ${Y(o.end)}`;
836
867
  }
837
- function nl(o) {
838
- return `${G(Number(o))} values`;
868
+ function cl(o) {
869
+ return `${Y(Number(o))} values`;
839
870
  }
840
- function rl(o) {
841
- return `${o.label} · ${G(o.count)} values`;
871
+ function dl(o) {
872
+ return `${o.label} · ${Y(o.count)} values`;
842
873
  }
843
- function il(o) {
844
- return `${G(Number(o))}%`;
874
+ function ul(o) {
875
+ return `${Y(Number(o))}%`;
845
876
  }
846
- function sl(o) {
847
- return /* @__PURE__ */ k(le, { position: "relative", height: "18px", children: [
848
- /* @__PURE__ */ s(Ye, { data: [o], dataKey: "percentage", categoryKey: "label", color: Ze, height: "18px", ariaLabel: `${o.label}: ${o.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: rl, tooltipValue: il, tooltipSeriesLabel: "Share" }),
849
- /* @__PURE__ */ k(ee, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
850
- /* @__PURE__ */ s(O, { textStyle: "label/2XS", color: "fg.inverted", truncate: !0, children: o.label }),
851
- /* @__PURE__ */ k(O, { textStyle: "label/2XS/medium", color: "fg.muted", children: [
877
+ function ml(o) {
878
+ return /* @__PURE__ */ _(re, { position: "relative", height: "18px", children: [
879
+ /* @__PURE__ */ a(et, { data: [o], dataKey: "percentage", categoryKey: "label", color: tt, height: "18px", ariaLabel: `${o.label}: ${o.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: dl, tooltipValue: ul, tooltipSeriesLabel: "Share" }),
880
+ /* @__PURE__ */ _(oe, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
881
+ /* @__PURE__ */ a(O, { textStyle: "label/2XS", color: "fg.inverted", truncate: !0, children: o.label }),
882
+ /* @__PURE__ */ _(O, { textStyle: "label/2XS/medium", color: "fg.muted", children: [
852
883
  o.percentage,
853
884
  "%"
854
885
  ] })
855
886
  ] })
856
887
  ] }, o.label);
857
888
  }
858
- const al = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), cl = (o) => o === "asc" ? Fe : o === "desc" ? Ke : vt, dl = (o) => {
889
+ const fl = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), hl = (o) => o === "asc" ? Xe : o === "desc" ? qe : At, gl = (o) => {
859
890
  const e = z(37), {
860
891
  header: t,
861
892
  headerGroup: l,
862
893
  table: n,
863
- fullWidth: r,
894
+ fullWidth: i,
864
895
  hasDescription: c
865
896
  } = o;
866
- let a, i, d;
897
+ let s, r, d;
867
898
  if (e[0] !== t.column || e[1] !== n) {
868
- i = t.column.getIsSorted();
869
- let A;
870
- e[5] !== t.column.id || e[6] !== n ? (A = !al.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = A) : A = e[7], a = A, d = cl(i), e[0] = t.column, e[1] = n, e[2] = a, e[3] = i, e[4] = d;
899
+ r = t.column.getIsSorted();
900
+ let $;
901
+ e[5] !== t.column.id || e[6] !== n ? ($ = !fl.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = $) : $ = e[7], s = $, d = hl(r), e[0] = t.column, e[1] = n, e[2] = s, e[3] = r, e[4] = d;
871
902
  } else
872
- a = e[2], i = e[3], d = e[4];
873
- const m = d;
874
- let u;
875
- e[8] !== t ? (u = t.column.id === "rowSelection" ? "Select all" : ge(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = u) : u = e[9];
876
- const f = u, g = t.column.id;
877
- let b;
878
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
903
+ s = e[2], r = e[3], d = e[4];
904
+ const u = d;
905
+ let m;
906
+ e[8] !== t ? (m = t.column.id === "rowSelection" ? "Select all" : be(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = m) : m = e[9];
907
+ const f = m, h = t.column.id;
908
+ let S;
909
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
879
910
  borderRight: "none"
880
- }, e[10] = b) : b = e[10];
881
- const h = t.id, v = r && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
882
- let x;
883
- e[11] !== v ? (x = {
884
- width: v
885
- }, e[11] = v, e[12] = x) : x = e[12];
911
+ }, e[10] = S) : S = e[10];
912
+ const b = t.id, x = i && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
913
+ let g;
914
+ e[11] !== x ? (g = {
915
+ width: x
916
+ }, e[11] = x, e[12] = g) : g = e[12];
917
+ let v;
918
+ e[13] !== t ? (v = be(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = v) : v = e[14];
919
+ let w;
920
+ e[15] !== v ? (w = /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: v }), e[15] = v, e[16] = w) : w = e[16];
886
921
  let p;
887
- e[13] !== t ? (p = ge(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = p) : p = e[14];
888
- let y;
889
- e[15] !== p ? (y = /* @__PURE__ */ s(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: p }), e[15] = p, e[16] = y) : y = e[16];
890
- let C;
891
- e[17] !== m || e[18] !== a || e[19] !== t.column || e[20] !== i ? (C = a && /* @__PURE__ */ k(X.Root, { children: [
892
- /* @__PURE__ */ s(X.Trigger, { asChild: !0, children: /* @__PURE__ */ s(Se, { ml: "2px", size: "2xs", "aria-label": i ? `Sorted ${i}` : "Sort column", variant: "ghost", visibility: i ? "visible" : "hidden", _groupHover: {
922
+ e[17] !== u || e[18] !== s || e[19] !== t.column || e[20] !== r ? (p = s && /* @__PURE__ */ _(G.Root, { children: [
923
+ /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ml: "2px", size: "2xs", "aria-label": r ? `Sorted ${r}` : "Sort column", variant: "ghost", visibility: r ? "visible" : "hidden", _groupHover: {
893
924
  visibility: "visible"
894
- }, children: /* @__PURE__ */ s(Y, { as: m, boxSize: "14px" }) }) }),
895
- /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s(X.Positioner, { children: /* @__PURE__ */ k(X.Content, { zIndex: "popover", bg: "bg", children: [
896
- /* @__PURE__ */ s(X.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ s(ae, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ s(Y, { as: Fe, boxSize: "16px" }), disabled: i === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
897
- /* @__PURE__ */ s(X.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ s(ae, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ s(Y, { as: Ke, boxSize: "16px" }), disabled: i === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
898
- i && /* @__PURE__ */ s(X.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ s(ae, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
925
+ }, children: /* @__PURE__ */ a(ee, { as: u, boxSize: "14px" }) }) }),
926
+ /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(G.Positioner, { children: /* @__PURE__ */ _(G.Content, { zIndex: "popover", bg: "bg", children: [
927
+ /* @__PURE__ */ a(G.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ a(ee, { as: Xe, boxSize: "16px" }), disabled: r === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
928
+ /* @__PURE__ */ a(G.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ a(ee, { as: qe, boxSize: "16px" }), disabled: r === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
929
+ r && /* @__PURE__ */ a(G.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
899
930
  ] }) }) })
900
- ] }), e[17] = m, e[18] = a, e[19] = t.column, e[20] = i, e[21] = C) : C = e[21];
901
- let S;
902
- e[22] !== t ? (S = t.column.getCanResize() && /* @__PURE__ */ s("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = S) : S = e[23];
903
- let w;
904
- e[24] !== S || e[25] !== y || e[26] !== C ? (w = /* @__PURE__ */ k(ee, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
905
- y,
906
- C,
907
- S
908
- ] }), e[24] = S, e[25] = y, e[26] = C, e[27] = w) : w = e[27];
909
- let I;
910
- e[28] !== c || e[29] !== w || e[30] !== f ? (I = /* @__PURE__ */ s(We, { content: f, disabled: c, children: w }), e[28] = c, e[29] = w, e[30] = f, e[31] = I) : I = e[31];
911
- let $;
912
- return e[32] !== t.column.id || e[33] !== t.id || e[34] !== I || e[35] !== x ? ($ = /* @__PURE__ */ s(L.ColumnHeader, { "data-column-id": g, textTransform: "none", borderRight: "1px solid", _last: b, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: x, children: I }, h), e[32] = t.column.id, e[33] = t.id, e[34] = I, e[35] = x, e[36] = $) : $ = e[36], $;
913
- }, ul = (o) => {
914
- const e = z(20), {
931
+ ] }), e[17] = u, e[18] = s, e[19] = t.column, e[20] = r, e[21] = p) : p = e[21];
932
+ let R;
933
+ e[22] !== t ? (R = t.column.getCanResize() && /* @__PURE__ */ a("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = R) : R = e[23];
934
+ let C;
935
+ e[24] !== R || e[25] !== w || e[26] !== p ? (C = /* @__PURE__ */ _(oe, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
936
+ w,
937
+ p,
938
+ R
939
+ ] }), e[24] = R, e[25] = w, e[26] = p, e[27] = C) : C = e[27];
940
+ let y;
941
+ e[28] !== c || e[29] !== C || e[30] !== f ? (y = /* @__PURE__ */ a(Je, { content: f, disabled: c, children: C }), e[28] = c, e[29] = C, e[30] = f, e[31] = y) : y = e[31];
942
+ let A;
943
+ return e[32] !== t.column.id || e[33] !== t.id || e[34] !== y || e[35] !== g ? (A = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": h, textTransform: "none", borderRight: "1px solid", _last: S, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: g, children: y }, b), e[32] = t.column.id, e[33] = t.id, e[34] = y, e[35] = g, e[36] = A) : A = e[36], A;
944
+ }, bl = (o) => {
945
+ const e = z(26), {
915
946
  cell: t,
916
947
  row: l,
917
- getCellContextMenuActions: n
918
- } = o, r = t.column.columnDef.meta;
919
- let c;
920
- e[0] !== t || e[1] !== r ? (c = r?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = r, e[2] = c) : c = e[2];
921
- const a = c;
922
- let i;
923
- if (e[3] !== t || e[4] !== n || e[5] !== l.id || e[6] !== l.original) {
924
- const x = {
948
+ wrapRows: n,
949
+ getCellContextMenuActions: i
950
+ } = o, c = t.column.columnDef.meta;
951
+ let s;
952
+ e[0] !== t || e[1] !== c ? (s = c?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = c, e[2] = s) : s = e[2];
953
+ const r = s;
954
+ let d;
955
+ if (e[3] !== t || e[4] !== i || e[5] !== l.id || e[6] !== l.original) {
956
+ const A = {
925
957
  row: l.original,
926
958
  rowId: l.id,
927
959
  columnId: t.column.id,
928
960
  value: t.getValue()
929
961
  };
930
- i = n?.(x).map((p) => ({
931
- key: p.label,
932
- label: p.label,
933
- icon: p.icon,
934
- onClick: () => p.onSelect(x)
935
- })) ?? [], e[3] = t, e[4] = n, e[5] = l.id, e[6] = l.original, e[7] = i;
962
+ d = i?.(A).map(($) => ({
963
+ key: $.label,
964
+ label: $.label,
965
+ icon: $.icon,
966
+ onClick: () => $.onSelect(A)
967
+ })) ?? [], e[3] = t, e[4] = i, e[5] = l.id, e[6] = l.original, e[7] = d;
936
968
  } else
937
- i = e[7];
938
- const d = i, m = t.column.id;
939
- let u;
940
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
941
- borderRight: "none"
942
- }, e[8] = u) : u = e[8];
943
- const f = t.id;
944
- let g;
945
- e[9] !== t ? (g = ge(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = g) : g = e[10];
969
+ d = e[7];
970
+ const u = d, m = t.column.id, f = n ? "anywhere" : void 0, h = n ? void 0 : "10", S = n ? void 0 : "10";
946
971
  let b;
947
- e[11] !== t.column.id || e[12] !== t.id || e[13] !== a || e[14] !== g ? (b = /* @__PURE__ */ s(L.Cell, { "data-column-id": m, width: "fit-content", maxWidth: "12rem", overflow: "hidden", padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: u, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: "ellipsis", whiteSpace: "nowrap", style: a, children: g }, f), e[11] = t.column.id, e[12] = t.id, e[13] = a, e[14] = g, e[15] = b) : b = e[15];
948
- const h = b;
949
- if (d.length === 0)
950
- return h;
951
- let v;
952
- return e[16] !== t.id || e[17] !== h || e[18] !== d ? (v = /* @__PURE__ */ s(It, { actions: d, children: h }, t.id), e[16] = t.id, e[17] = h, e[18] = d, e[19] = v) : v = e[19], v;
953
- }, ml = (o) => {
954
- const e = z(21), {
972
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
973
+ borderRight: "none"
974
+ }, e[8] = b) : b = e[8];
975
+ const x = t.id, g = n ? void 0 : "ellipsis", v = n ? "top" : "middle", w = n ? "normal" : "nowrap";
976
+ let p;
977
+ e[9] !== t ? (p = be(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = p) : p = e[10];
978
+ let R;
979
+ e[11] !== t.column.id || e[12] !== t.id || e[13] !== r || e[14] !== w || e[15] !== p || e[16] !== f || e[17] !== h || e[18] !== S || e[19] !== g || e[20] !== v ? (R = /* @__PURE__ */ a(L.Cell, { "data-column-id": m, width: "fit-content", maxWidth: "12rem", overflow: "hidden", overflowWrap: f, padding: "xs", height: h, maxHeight: S, borderRight: "1px solid", borderColor: "border.subtle", _last: b, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: g, verticalAlign: v, whiteSpace: w, style: r, children: p }, x), e[11] = t.column.id, e[12] = t.id, e[13] = r, e[14] = w, e[15] = p, e[16] = f, e[17] = h, e[18] = S, e[19] = g, e[20] = v, e[21] = R) : R = e[21];
980
+ const C = R;
981
+ if (u.length === 0)
982
+ return C;
983
+ let y;
984
+ return e[22] !== t.id || e[23] !== C || e[24] !== u ? (y = /* @__PURE__ */ a(kt, { actions: u, children: C }, t.id), e[22] = t.id, e[23] = C, e[24] = u, e[25] = y) : y = e[25], y;
985
+ }, pl = (o) => {
986
+ const e = z(23), {
955
987
  row: t,
956
988
  noBorder: l,
957
989
  rowIsInteractive: n,
958
- rowIsActive: r,
990
+ rowIsActive: i,
959
991
  rowIsSelected: c,
960
- onRowClick: a,
961
- getCellContextMenuActions: i
962
- } = o, d = t.id, m = r ? "true" : void 0, u = c ? "true" : void 0, f = c ? "true" : void 0, g = n ? "pointer" : void 0;
963
- let b;
964
- e[0] !== a || e[1] !== t.original || e[2] !== n ? (b = n ? () => a?.(t.original) : void 0, e[0] = a, e[1] = t.original, e[2] = n, e[3] = b) : b = e[3];
965
- const h = l ? "none" : "1px solid", v = l ? "none" : "1px solid", x = l ? "none" : "1px solid";
992
+ wrapRows: s,
993
+ onRowClick: r,
994
+ getCellContextMenuActions: d
995
+ } = o, u = t.id, m = i ? "true" : void 0, f = c ? "true" : void 0, h = c ? "true" : void 0, S = s ? void 0 : "10", b = n ? "pointer" : void 0;
996
+ let x;
997
+ e[0] !== r || e[1] !== t.original || e[2] !== n ? (x = n ? () => r?.(t.original) : void 0, e[0] = r, e[1] = t.original, e[2] = n, e[3] = x) : x = e[3];
998
+ const g = l ? "none" : "1px solid", v = l ? "none" : "1px solid", w = l ? "none" : "1px solid";
966
999
  let p;
967
- e[4] !== x ? (p = {
968
- borderBottom: x,
1000
+ e[4] !== w ? (p = {
1001
+ borderBottom: w,
969
1002
  borderColor: "border.subtle"
970
- }, e[4] = x, e[5] = p) : p = e[5];
971
- const y = r ? "bg.active" : "bg";
1003
+ }, e[4] = w, e[5] = p) : p = e[5];
1004
+ const R = i ? "bg.active" : "bg";
972
1005
  let C;
973
- e[6] !== i || e[7] !== t ? (C = t.getVisibleCells().map((w) => /* @__PURE__ */ s(ul, { cell: w, row: t, getCellContextMenuActions: i }, w.id)), e[6] = i, e[7] = t, e[8] = C) : C = e[8];
974
- let S;
975
- return e[9] !== t.id || e[10] !== m || e[11] !== y || e[12] !== C || e[13] !== u || e[14] !== f || e[15] !== g || e[16] !== b || e[17] !== h || e[18] !== v || e[19] !== p ? (S = /* @__PURE__ */ s(L.Row, { "data-active": m, "data-selected": u, "aria-selected": f, cursor: g, onClick: b, borderTop: h, borderBottom: "1px solid", borderRight: v, _last: p, borderColor: "border.subtle", background: y, children: C }, d), e[9] = t.id, e[10] = m, e[11] = y, e[12] = C, e[13] = u, e[14] = f, e[15] = g, e[16] = b, e[17] = h, e[18] = v, e[19] = p, e[20] = S) : S = e[20], S;
976
- }, fl = (o) => {
1006
+ e[6] !== d || e[7] !== t || e[8] !== s ? (C = t.getVisibleCells().map((A) => /* @__PURE__ */ a(bl, { cell: A, row: t, wrapRows: s, getCellContextMenuActions: d }, A.id)), e[6] = d, e[7] = t, e[8] = s, e[9] = C) : C = e[9];
1007
+ let y;
1008
+ return e[10] !== t.id || e[11] !== m || e[12] !== p || e[13] !== R || e[14] !== C || e[15] !== f || e[16] !== h || e[17] !== S || e[18] !== b || e[19] !== x || e[20] !== g || e[21] !== v ? (y = /* @__PURE__ */ a(L.Row, { "data-active": m, "data-selected": f, "aria-selected": h, height: S, cursor: b, onClick: x, borderTop: g, borderBottom: "1px solid", borderRight: v, _last: p, borderColor: "border.subtle", background: R, children: C }, u), e[10] = t.id, e[11] = m, e[12] = p, e[13] = R, e[14] = C, e[15] = f, e[16] = h, e[17] = S, e[18] = b, e[19] = x, e[20] = g, e[21] = v, e[22] = y) : y = e[22], y;
1009
+ }, Sl = (o, e) => o.map((t) => ({
1010
+ id: t,
1011
+ label: e?.[t] ?? t
1012
+ })), wl = (o) => {
977
1013
  const e = z(12), {
978
1014
  table: t,
979
1015
  pagination: l,
980
1016
  pageSizeOptions: n
981
1017
  } = o;
982
- let r;
983
- e[0] !== t ? (r = t.getPageCount(), e[0] = t, e[1] = r) : r = e[1];
984
- const c = l.pageIndex, a = l.pageSize;
985
1018
  let i;
986
- e[2] !== t ? (i = t.getCoreRowModel(), e[2] = t, e[3] = i) : i = e[3];
1019
+ e[0] !== t ? (i = t.getPageCount(), e[0] = t, e[1] = i) : i = e[1];
1020
+ const c = l.pageIndex, s = l.pageSize;
1021
+ let r;
1022
+ e[2] !== t ? (r = t.getCoreRowModel(), e[2] = t, e[3] = r) : r = e[3];
987
1023
  let d;
988
- return e[4] !== n || e[5] !== l.pageIndex || e[6] !== l.pageSize || e[7] !== r || e[8] !== i.rows.length || e[9] !== t.setPageIndex || e[10] !== t.setPageSize ? (d = /* @__PURE__ */ s(Bt, { pageCount: r, pageIndex: c, pageSize: a, pageSizeOptions: n, totalRows: i.rows.length, onPageChange: t.setPageIndex, onPageSizeChange: t.setPageSize }), e[4] = n, e[5] = l.pageIndex, e[6] = l.pageSize, e[7] = r, e[8] = i.rows.length, e[9] = t.setPageIndex, e[10] = t.setPageSize, e[11] = d) : d = e[11], d;
989
- }, hl = (o) => {
1024
+ return e[4] !== n || e[5] !== l.pageIndex || e[6] !== l.pageSize || e[7] !== i || e[8] !== r.rows.length || e[9] !== t.setPageIndex || e[10] !== t.setPageSize ? (d = /* @__PURE__ */ a(Xt, { pageCount: i, pageIndex: c, pageSize: s, pageSizeOptions: n, totalRows: r.rows.length, onPageChange: t.setPageIndex, onPageSizeChange: t.setPageSize }), e[4] = n, e[5] = l.pageIndex, e[6] = l.pageSize, e[7] = i, e[8] = r.rows.length, e[9] = t.setPageIndex, e[10] = t.setPageSize, e[11] = d) : d = e[11], d;
1025
+ }, xl = (o) => {
990
1026
  const {
991
1027
  data: e,
992
1028
  noBorder: t,
993
1029
  fullWidth: l,
994
1030
  hiddenColumns: n,
995
- onRowClick: r,
1031
+ onRowClick: i,
996
1032
  isRowInteractive: c,
997
- activeRowId: a,
998
- columnIcons: i,
1033
+ activeRowId: s,
1034
+ columnIcons: r,
999
1035
  columnDescriptions: d,
1000
- compactHeaders: m,
1001
- columnStats: u,
1036
+ compactHeaders: u,
1037
+ columnStats: m,
1002
1038
  columnRenderers: f,
1003
- initialPageSize: g,
1004
- pageSizeOptions: b = [10, 20, 30, 50, 100],
1005
- rowActions: h = [],
1006
- getRowId: v,
1007
- toolbarStorageKey: x,
1008
- enableRowActivation: p = !1,
1009
- getCellContextMenuActions: y
1010
- } = o, [C, S] = Z([]), [w, I] = Z(() => ({
1039
+ initialPageSize: h,
1040
+ pageSizeOptions: S = [10, 20, 30, 50, 100],
1041
+ rowActions: b = [],
1042
+ getRowActions: x,
1043
+ getRowId: g,
1044
+ toolbarStorageKey: v,
1045
+ enableRowActivation: w = !1,
1046
+ getCellContextMenuActions: p
1047
+ } = o, [R, C] = Q([]), [y, A] = Q(() => ({
1011
1048
  pageIndex: 0,
1012
- pageSize: zt({
1013
- initialPageSize: g
1049
+ pageSize: Mt({
1050
+ initialPageSize: h
1014
1051
  })
1015
- })), [$, A] = Z({}), [T, F] = Z(!0), [M, P] = Z(() => {
1016
- const R = new Set(n ?? []);
1017
- return Object.keys(e[0] || {}).filter((V) => !R.has(V));
1018
- }), [N, j] = Z(() => /* @__PURE__ */ new Set()), E = new Set(n ?? []), B = Object.keys(e[0] || {}).filter((R) => !E.has(R)), W = ze(B, M), _ = new Set(W.filter((R) => !N.has(R))), D = W.filter((R) => _.has(R)), H = _t(o), K = Tt(o), ne = Dt(e, W, m), te = Vt(e, W, v), Ie = Mt({
1019
- toolbarStorageKey: x,
1020
- columnKeys: B
1021
- }), et = gt(Ie, (R) => R.filters, {
1052
+ })), [$, T] = Q({}), [P, M] = Q(!0), [D, K] = Q(!1), [W, N] = Q(() => {
1053
+ const I = new Set(n ?? []);
1054
+ return Object.keys(e[0] || {}).filter((V) => !I.has(V));
1055
+ }), [J, X] = Q(() => /* @__PURE__ */ new Set()), j = new Set(n ?? []), H = Object.keys(e[0] || {}).filter((I) => !j.has(I)), E = De(H, W), k = new Set(E.filter((I) => !J.has(I))), B = E.filter((I) => k.has(I)), F = Pt(o), le = Ht(o), Ae = Lt(e, E, u), $e = Ot(e, E, g), _e = Wt({
1056
+ toolbarStorageKey: v,
1057
+ columnKeys: H
1058
+ }), lt = St(_e, (I) => I.filters, {
1022
1059
  settings: {
1023
1060
  viewMode: "list"
1024
1061
  },
1025
1062
  views: o.defaultViews,
1026
1063
  activeViewId: o.defaultActiveViewId
1027
- }), $e = Pt(te, et, ne).map((R) => R.sourceRow), tt = jo(e, D, {
1028
- columnIcons: i,
1064
+ }), ke = Nt($e, lt, Ae).map((I) => I.sourceRow), nt = Ko(e, B, {
1065
+ columnIcons: r,
1029
1066
  columnDescriptions: d,
1030
- compactHeaders: m,
1031
- enableSelection: H,
1032
- rowActions: h,
1067
+ compactHeaders: u,
1068
+ enableSelection: F,
1069
+ rowActions: b,
1070
+ getRowActions: x,
1033
1071
  selectedRowIds: $,
1034
- columnRenderers: f
1035
- }), J = ct({
1036
- data: $e,
1037
- columns: tt,
1072
+ columnRenderers: f,
1073
+ wrapRows: D
1074
+ }), q = mt({
1075
+ data: ke,
1076
+ columns: nt,
1038
1077
  defaultColumn: {
1039
1078
  size: 150,
1040
1079
  minSize: 40,
1041
1080
  maxSize: 800
1042
1081
  },
1043
1082
  state: {
1044
- sorting: C,
1045
- pagination: w,
1083
+ sorting: R,
1084
+ pagination: y,
1046
1085
  rowSelection: $
1047
1086
  },
1048
- getRowId: (R, V) => Ht(R, V, v),
1087
+ getRowId: (I, V) => jt(I, V, g),
1049
1088
  columnResizeMode: "onChange",
1050
1089
  columnResizeDirection: "ltr",
1051
- onSortingChange: S,
1052
- onPaginationChange: I,
1053
- onRowSelectionChange: A,
1054
- getSortedRowModel: mt(),
1055
- getCoreRowModel: ut(),
1056
- getPaginationRowModel: dt(),
1057
- enableMultiRowSelection: H,
1058
- enableRowSelection: H,
1090
+ onSortingChange: C,
1091
+ onPaginationChange: A,
1092
+ onRowSelectionChange: T,
1093
+ getSortedRowModel: gt(),
1094
+ getCoreRowModel: ht(),
1095
+ getPaginationRowModel: ft(),
1096
+ enableMultiRowSelection: F,
1097
+ enableRowSelection: F,
1059
1098
  autoResetAll: !1
1060
1099
  });
1061
- Be(() => {
1062
- const R = J.getPageCount();
1063
- R === 0 || w.pageIndex < R || I((V) => ({
1100
+ Ke(() => {
1101
+ const I = q.getPageCount();
1102
+ I === 0 || y.pageIndex < I || A((V) => ({
1064
1103
  ...V,
1065
- pageIndex: Math.max(R - 1, 0)
1104
+ pageIndex: Math.max(I - 1, 0)
1066
1105
  }));
1067
- }, [w.pageIndex, J]);
1068
- const ot = (() => {
1069
- const R = J.getFlatHeaders(), V = {};
1070
- for (let U = 0; U < R.length; U++) {
1071
- const q = R[U];
1072
- V[`--header-${q.id}-size`] = q.getSize(), V[`--col-${q.column.id}-size`] = q.column.getSize();
1106
+ }, [y.pageIndex, q]);
1107
+ const rt = (() => {
1108
+ const I = q.getFlatHeaders(), V = {};
1109
+ for (let Z = 0; Z < I.length; Z++) {
1110
+ const U = I[Z];
1111
+ V[`--header-${U.id}-size`] = U.getSize(), V[`--col-${U.column.id}-size`] = U.column.getSize();
1073
1112
  }
1074
1113
  return V;
1075
- })(), me = J.getSelectedRowModel().rows, lt = J.getCoreRowModel().rows, nt = Lt(me), rt = /* @__PURE__ */ s(Bo, { columns: W.map((R) => ({
1076
- id: R,
1077
- label: m?.[R] ?? R
1078
- })), visibleColumnIds: _, showStats: T, statsAvailable: !!u, onColumnVisibilityChange: (R, V) => j((U) => {
1079
- const q = new Set(U);
1080
- return V ? q.delete(R) : q.add(R), q;
1081
- }), onColumnReorder: (R, V) => P((U) => Ot(ze(B, U), R, V)), onStatsVisibilityChange: F });
1082
- return /* @__PURE__ */ k(ee, { direction: "column", height: "100%", width: "100%", children: [
1083
- /* @__PURE__ */ s(Nt, { rows: te, storageKey: Ie, attributes: ne, columnControl: rt, defaultViews: o.defaultViews, defaultActiveViewId: o.defaultActiveViewId }),
1084
- /* @__PURE__ */ k(le, { position: "relative", flex: "1", minHeight: "0", children: [
1085
- /* @__PURE__ */ s(xe, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ k(L.Root, { className: `data-table${l ? " full-width" : ""}`, style: {
1086
- ...ot,
1087
- width: l ? "100%" : J.getTotalSize()
1114
+ })(), fe = q.getSelectedRowModel().rows, it = q.getCoreRowModel().rows, st = Et(fe), at = /* @__PURE__ */ a(Xo, { columns: Sl(E, u), visibleColumnIds: k, wrapRows: D, showStats: P, statsAvailable: !!m, onColumnVisibilityChange: (I, V) => X((Z) => {
1115
+ const U = new Set(Z);
1116
+ return V ? U.delete(I) : U.add(I), U;
1117
+ }), onColumnReorder: (I, V) => N((Z) => Bt(De(H, Z), I, V)), onWrapRowsChange: K, onStatsVisibilityChange: M });
1118
+ return /* @__PURE__ */ _(oe, { direction: "column", height: "100%", width: "100%", children: [
1119
+ /* @__PURE__ */ a(Ft, { rows: $e, storageKey: _e, attributes: Ae, columnControl: at, defaultViews: o.defaultViews, defaultActiveViewId: o.defaultActiveViewId }),
1120
+ /* @__PURE__ */ _(re, { position: "relative", flex: "1", minHeight: "0", children: [
1121
+ /* @__PURE__ */ a(xe, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ _(L.Root, { className: `data-table${l ? " full-width" : ""}`, style: {
1122
+ ...rt,
1123
+ width: l ? "100%" : q.getTotalSize()
1088
1124
  }, children: [
1089
- /* @__PURE__ */ s(L.Header, { children: J.getHeaderGroups().map((R) => /* @__PURE__ */ k(ht, { children: [
1090
- /* @__PURE__ */ s(L.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: R.headers.map((V) => /* @__PURE__ */ s(dl, { header: V, headerGroup: R, table: J, fullWidth: l, hasDescription: !!d?.[V.column.id] }, V.id)) }),
1091
- u && T ? /* @__PURE__ */ s(tl, { headerGroup: R, rows: $e, columnStats: u, noBorder: t, fullWidth: l }) : null
1092
- ] }, R.id)) }),
1093
- /* @__PURE__ */ s(L.Body, { children: J.getRowModel().rows.map((R) => {
1094
- const V = r ? c?.(R.original) ?? !0 : !1, U = jt({
1095
- enableRowActivation: p,
1096
- activeRowId: a,
1097
- rowId: R.id
1098
- }), q = R.getIsSelected();
1099
- return /* @__PURE__ */ s(ml, { row: R, noBorder: t, rowIsInteractive: V, rowIsActive: U, rowIsSelected: q, onRowClick: r, getCellContextMenuActions: y }, R.id);
1125
+ /* @__PURE__ */ a(L.Header, { children: q.getHeaderGroups().map((I) => /* @__PURE__ */ _(pt, { children: [
1126
+ /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: I.headers.map((V) => /* @__PURE__ */ a(gl, { header: V, headerGroup: I, table: q, fullWidth: l, hasDescription: !!d?.[V.column.id] }, V.id)) }),
1127
+ m && P ? /* @__PURE__ */ a(il, { headerGroup: I, rows: ke, columnStats: m, noBorder: t, fullWidth: l }) : null
1128
+ ] }, I.id)) }),
1129
+ /* @__PURE__ */ a(L.Body, { children: q.getRowModel().rows.map((I) => {
1130
+ const V = i ? c?.(I.original) ?? !0 : !1, Z = Kt({
1131
+ enableRowActivation: w,
1132
+ activeRowId: s,
1133
+ rowId: I.id
1134
+ }), U = I.getIsSelected();
1135
+ return /* @__PURE__ */ a(pl, { row: I, noBorder: t, rowIsInteractive: V, rowIsActive: Z, rowIsSelected: U, wrapRows: D, onRowClick: i, getCellContextMenuActions: p }, I.id);
1100
1136
  }) })
1101
1137
  ] }) }),
1102
- H && me.length > 0 ? /* @__PURE__ */ s(Et, { selectedCount: me.length, totalCount: lt.length, onClearSelection: () => J.toggleAllRowsSelected(!1), onSelectAll: () => J.toggleAllRowsSelected(!0), actions: K, selectedRows: nt }) : null
1138
+ F && fe.length > 0 ? /* @__PURE__ */ a(Jt, { selectedCount: fe.length, totalCount: it.length, onClearSelection: () => q.toggleAllRowsSelected(!1), onSelectAll: () => q.toggleAllRowsSelected(!0), actions: le, selectedRows: st }) : null
1103
1139
  ] }),
1104
- J.getPageCount() > 1 && /* @__PURE__ */ s(fl, { table: J, pagination: w, pageSizeOptions: b })
1140
+ q.getPageCount() > 1 && /* @__PURE__ */ a(wl, { table: q, pagination: y, pageSizeOptions: S })
1105
1141
  ] });
1106
- }, Hl = (o) => {
1142
+ }, jl = (o) => {
1107
1143
  const e = z(4);
1108
1144
  if (o.editMode) {
1109
1145
  let l;
1110
- return e[0] !== o ? (l = /* @__PURE__ */ s(At, { ...o }), e[0] = o, e[1] = l) : l = e[1], l;
1146
+ return e[0] !== o ? (l = /* @__PURE__ */ a(Vt, { ...o }), e[0] = o, e[1] = l) : l = e[1], l;
1111
1147
  }
1112
1148
  let t;
1113
- return e[2] !== o ? (t = /* @__PURE__ */ s(hl, { ...o }), e[2] = o, e[3] = t) : t = e[3], t;
1114
- }, Oe = ["70%", "45%", "60%", "35%", "55%"], Ll = (o) => {
1149
+ return e[2] !== o ? (t = /* @__PURE__ */ a(xl, { ...o }), e[2] = o, e[3] = t) : t = e[3], t;
1150
+ }, je = ["70%", "45%", "60%", "35%", "55%"], El = (o) => {
1115
1151
  const e = z(15), {
1116
1152
  columns: t,
1117
1153
  columnCount: l,
1118
1154
  rowCount: n
1119
- } = o, r = l === void 0 ? 3 : l, c = n === void 0 ? 5 : n;
1120
- let a;
1121
- e[0] !== r || e[1] !== t ? (a = t && t.length > 0 ? t : Array.from({
1122
- length: r
1123
- }, gl), e[0] = r, e[1] = t, e[2] = a) : a = e[2];
1124
- const i = a;
1155
+ } = o, i = l === void 0 ? 3 : l, c = n === void 0 ? 5 : n;
1156
+ let s;
1157
+ e[0] !== i || e[1] !== t ? (s = t && t.length > 0 ? t : Array.from({
1158
+ length: i
1159
+ }, yl), e[0] = i, e[1] = t, e[2] = s) : s = e[2];
1160
+ const r = s;
1125
1161
  let d;
1126
- e[3] !== i ? (d = i.map(bl), e[3] = i, e[4] = d) : d = e[4];
1127
- let m;
1128
- e[5] !== d ? (m = /* @__PURE__ */ s(L.Header, { children: /* @__PURE__ */ s(L.Row, { className: "data-table-column-header-row", borderRight: "1px solid", borderColor: "border.subtle", children: d }) }), e[5] = d, e[6] = m) : m = e[6];
1162
+ e[3] !== r ? (d = r.map(Cl), e[3] = r, e[4] = d) : d = e[4];
1129
1163
  let u;
1130
- if (e[7] !== i || e[8] !== c) {
1131
- let g;
1132
- e[10] !== i ? (g = (b, h) => /* @__PURE__ */ s(L.Row, { children: i.map((v, x) => /* @__PURE__ */ s(L.Cell, { padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: {
1164
+ e[5] !== d ? (u = /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: "1px solid", borderColor: "border.subtle", children: d }) }), e[5] = d, e[6] = u) : u = e[6];
1165
+ let m;
1166
+ if (e[7] !== r || e[8] !== c) {
1167
+ let h;
1168
+ e[10] !== r ? (h = (S, b) => /* @__PURE__ */ a(L.Row, { children: r.map((x, g) => /* @__PURE__ */ a(L.Cell, { padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: {
1133
1169
  borderRight: "none"
1134
- }, borderBottom: "none", children: /* @__PURE__ */ s(je, { height: "14px", width: Oe[(h + x) % Oe.length], borderRadius: "xs" }) }, v.id)) }, h), e[10] = i, e[11] = g) : g = e[11], u = /* @__PURE__ */ s(L.Body, { children: Array.from({
1170
+ }, borderBottom: "none", children: /* @__PURE__ */ a(Be, { height: "14px", width: je[(b + g) % je.length], borderRadius: "xs" }) }, x.id)) }, b), e[10] = r, e[11] = h) : h = e[11], m = /* @__PURE__ */ a(L.Body, { children: Array.from({
1135
1171
  length: c
1136
- }, g) }), e[7] = i, e[8] = c, e[9] = u;
1172
+ }, h) }), e[7] = r, e[8] = c, e[9] = m;
1137
1173
  } else
1138
- u = e[9];
1174
+ m = e[9];
1139
1175
  let f;
1140
- return e[12] !== m || e[13] !== u ? (f = /* @__PURE__ */ k(L.Root, { className: "data-table full-width", width: "100%", children: [
1141
- m,
1142
- u
1143
- ] }), e[12] = m, e[13] = u, e[14] = f) : f = e[14], f;
1176
+ return e[12] !== u || e[13] !== m ? (f = /* @__PURE__ */ _(L.Root, { className: "data-table full-width", width: "100%", children: [
1177
+ u,
1178
+ m
1179
+ ] }), e[12] = u, e[13] = m, e[14] = f) : f = e[14], f;
1144
1180
  };
1145
- function gl(o, e) {
1181
+ function yl(o, e) {
1146
1182
  return {
1147
1183
  id: `column-${e + 1}`,
1148
1184
  label: ""
1149
1185
  };
1150
1186
  }
1151
- function bl(o) {
1152
- return /* @__PURE__ */ s(L.ColumnHeader, { textTransform: "none", borderRight: "1px solid", _last: {
1187
+ function Cl(o) {
1188
+ return /* @__PURE__ */ a(L.ColumnHeader, { textTransform: "none", borderRight: "1px solid", _last: {
1153
1189
  borderRight: "none"
1154
- }, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children: o.label ? /* @__PURE__ */ s(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: o.label }) : /* @__PURE__ */ s(je, { height: "12px", width: "4rem", borderRadius: "xs" }) }, o.id);
1190
+ }, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children: o.label ? /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: o.label }) : /* @__PURE__ */ a(Be, { height: "12px", width: "4rem", borderRadius: "xs" }) }, o.id);
1155
1191
  }
1156
1192
  export {
1157
- Hl as DataTable,
1158
- Ll as DataTableSkeleton,
1159
- Ao as FriendlyJsonDisplay,
1160
- kt as formatDisplayValue,
1161
- $t as getIcon
1193
+ jl as DataTable,
1194
+ El as DataTableSkeleton,
1195
+ Do as FriendlyJsonDisplay,
1196
+ Tt as formatDisplayValue,
1197
+ zt as getIcon
1162
1198
  };
1163
1199
  //# sourceMappingURL=data-table.js.map