@pstdio/ui 0.20.1 → 0.21.0

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